From marcel.taeumel at student.hpi.uni-potsdam.de Sun Feb 1 09:06:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Feb 1 09:11:24 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.755.mcz In-Reply-To: References: Message-ID: <1422781601651-4803010.post@n4.nabble.com> Hi. :) You might then want to change the method's description, too. The "receiver's text" is not just the selection but the whole text the editor handles. Maybe we need a #compareSelectionToClipboard for this and not change the meaning of #compareToClipboard? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-cmm-755-mcz-tp4802968p4803010.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Sun Feb 1 11:53:03 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Feb 1 11:53:07 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.755.mcz In-Reply-To: <1422781601651-4803010.post@n4.nabble.com> References: <1422781601651-4803010.post@n4.nabble.com> Message-ID: How about something like this? compareToClipboard "Check to see if the receiver's selection or text - in case there's no selection - is the same as the text currently on the clipboard, and inform the user." | s1 s2 | s1 := self clipboardText string. s2 := self selection string ifEmpty: [ paragraph text string ]. s1 = s2 ifTrue: [^ self inform: 'Exact match']. (StringHolder new textContents: (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2)) openLabel: 'Comparison to Clipboard Text' Levente On Sun, 1 Feb 2015, Marcel Taeumel wrote: > Hi. :) > > You might then want to change the method's description, too. The "receiver's > text" is not just the selection but the whole text the editor handles. > > Maybe we need a #compareSelectionToClipboard for this and not change the > meaning of #compareToClipboard? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Morphic-cmm-755-mcz-tp4802968p4803010.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From marcel.taeumel at student.hpi.uni-potsdam.de Sun Feb 1 13:31:34 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Feb 1 13:36:18 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.755.mcz In-Reply-To: References: <1422781601651-4803010.post@n4.nabble.com> Message-ID: <1422797494495-4803042.post@n4.nabble.com> +1 Marcel :) -- View this message in context: http://forum.world.st/The-Trunk-Morphic-cmm-755-mcz-tp4802968p4803042.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Sun Feb 1 15:42:49 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Feb 1 15:42:51 2015 Subject: [squeak-dev] Trouble opening MC repositories "Error: subscript is out of bounds: 0" Message-ID: <20150201154249.GA83658@shell.msen.com> I am having problems opening Monticello repositories from any image running on any interpreter VM. I do not see the problem when running on Cog. I first noticed it today, but it may have started some time within the last few days (I don't recall for sure when I last refreshed a repository). To reproduce, evaluate this, running this on an interpreter VM: HTTPSocket httpGet: 'http://source.squeak.org/trunk/?C=M;O=D' args: nil user: '' passwd: '' The problem is apparently not related to recent image changes or VM changes, and it happens when trying to open any http repository. I'm stumped. Is anyone else seeing this? Dave From lewis at mail.msen.com Sun Feb 1 16:26:08 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Feb 1 16:26:10 2015 Subject: [squeak-dev] Trouble opening MC repositories "Error: subscript is out of bounds: 0" In-Reply-To: <20150201154249.GA83658@shell.msen.com> References: <20150201154249.GA83658@shell.msen.com> Message-ID: <20150201162608.GA90001@shell.msen.com> On Sun, Feb 01, 2015 at 10:42:49AM -0500, David T. Lewis wrote: > I am having problems opening Monticello repositories from any image running > on any interpreter VM. I do not see the problem when running on Cog. I first > noticed it today, but it may have started some time within the last few days > (I don't recall for sure when I last refreshed a repository). > > To reproduce, evaluate this, running this on an interpreter VM: > > HTTPSocket httpGet: 'http://source.squeak.org/trunk/?C=M;O=D' args: nil user: '' passwd: '' > > The problem is apparently not related to recent image changes or VM changes, > and it happens when trying to open any http repository. > > I'm stumped. Is anyone else seeing this? The problem was caused by a local installation mistake on my part, apparently related to insuffient coffee. My apologies, and sorry for the noise. Dave From commits at source.squeak.org Sun Feb 1 19:06:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Feb 1 19:06:51 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.756.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.756.mcz ==================== Summary ==================== Name: Morphic-cmm.756 Author: cmm Time: 1 February 2015, 1:06:11.045 pm UUID: c1553853-472d-45ca-a182-c07497c6f7a9 Ancestors: Morphic-cmm.755 - Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents. - Make the same change to ParagraphEditor, for consistency. =============== Diff against Morphic-cmm.755 =============== Item was changed: ----- Method: TextEditor>>compareToClipboard (in category 'menu messages') ----- compareToClipboard + "If any text is selected, present the modifications that would be made to it if the clipboard contents were pasted over it. If no text is selected, present the differences betwen the entire pane's contents and the clipboard text." + | subjectText proposedText | + subjectText := self selection string ifEmpty: [ paragraph text string ]. + proposedText := self clipboardText string. + subjectText = proposedText ifTrue: [^ self inform: 'Exact match']. + (StringHolder new + textContents: + (TextDiffBuilder + buildDisplayPatchFrom: subjectText + to: proposedText)) openLabel: 'Differences with Clipboard Text'! - "Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user." - | s1 s2 | - s1 := self clipboardText string. - s2 := self selection string. - s1 = s2 ifTrue: [^ self inform: 'Exact match']. - - (StringHolder new textContents: - (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2)) - openLabel: 'Comparison to Clipboard Text'! From asqueaker at gmail.com Sun Feb 1 21:05:01 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Feb 1 21:05:04 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.756.mcz In-Reply-To: <54ce7950.a868b40a.7aa6.ffff81e3SMTPIN_ADDED_MISSING@mx.google.com> References: <54ce7950.a868b40a.7aa6.ffff81e3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: ParagraphEditor is in ST-80, so not part of this package. Speaking of that, is a corresponding change to ParagraphEditor necessary? Is ParagraphEditor intended to be purged at some point? On Sun, Feb 1, 2015 at 1:06 PM, wrote: > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.756.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.756 > Author: cmm > Time: 1 February 2015, 1:06:11.045 pm > UUID: c1553853-472d-45ca-a182-c07497c6f7a9 > Ancestors: Morphic-cmm.755 > > - Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents. > - Make the same change to ParagraphEditor, for consistency. > > =============== Diff against Morphic-cmm.755 =============== > > Item was changed: > ----- Method: TextEditor>>compareToClipboard (in category 'menu messages') ----- > compareToClipboard > + "If any text is selected, present the modifications that would be made to it if the clipboard contents were pasted over it. If no text is selected, present the differences betwen the entire pane's contents and the clipboard text." > + | subjectText proposedText | > + subjectText := self selection string ifEmpty: [ paragraph text string ]. > + proposedText := self clipboardText string. > + subjectText = proposedText ifTrue: [^ self inform: 'Exact match']. > + (StringHolder new > + textContents: > + (TextDiffBuilder > + buildDisplayPatchFrom: subjectText > + to: proposedText)) openLabel: 'Differences with Clipboard Text'! > - "Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user." > - | s1 s2 | > - s1 := self clipboardText string. > - s2 := self selection string. > - s1 = s2 ifTrue: [^ self inform: 'Exact match']. > - > - (StringHolder new textContents: > - (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2)) > - openLabel: 'Comparison to Clipboard Text'! > > From commits at source.squeak.org Sun Feb 1 23:56:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Feb 1 23:56:32 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150201235631.18486.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-January/007436.html Name: Graphics-kfr.304 Ancestors: Graphics-bf.303 GIFReadWriter>>close caused error since change to read only file stream reading ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007437.html Name: System-kfr.693 Ancestors: System-bf.692 empty log message ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007438.html Name: System-kfr.694 Ancestors: System-kfr.693 empty log message ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007439.html Name: System.spur-kfr.693 Ancestors: System-kfr.693, System.spur-bf.692 System-kfr.693 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.234 empty log message ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007440.html Name: System.spur-kfr.694 Ancestors: System-kfr.694, System.spur-kfr.693 System-kfr.694 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.234 empty log message ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007441.html Name: System-kfr.695 Ancestors: System-kfr.694 Fix a image lock up with preference look up ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007442.html Name: System.spur-kfr.695 Ancestors: System-kfr.695, System.spur-kfr.694 System-kfr.695 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.234 Fix a image lock up with preference look up ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007443.html Name: Graphics-kfr.305 Ancestors: Graphics-kfr.304 Nil return if stream atEnd true ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007444.html Name: Collections-mt.589 Ancestors: Collections-bf.588 comment added to #concatenation ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007445.html Name: CollectionsTests-mt.226 Ancestors: CollectionsTests-bf.225 Tests added for #concatenation ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007446.html Name: Collections-mt.590 Ancestors: Collections-mt.589 Methods added to easily join split strings. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007447.html Name: CollectionsTests-mt.227 Ancestors: CollectionsTests-mt.226 Tests added for #join ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007448.html Name: Collections-mt.591 Ancestors: Collections-mt.590 Added #flatten as special case for #concatenation to remove any nesting except for strings. Very simple implementation with streams and recursion but not as efficient as #concatenation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007449.html Name: CollectionsTests-mt.228 Ancestors: CollectionsTests-mt.227 Tests added for #flatten. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007450.html Name: Collections.spur-mt.589 Ancestors: Collections-mt.589, Collections.spur-bf.588 Collections-mt.589 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.235 comment added to #concatenation ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007451.html Name: Collections.spur-mt.590 Ancestors: Collections-mt.590, Collections.spur-mt.589 Collections-mt.590 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.235 Methods added to easily join split strings. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007452.html Name: Collections.spur-mt.591 Ancestors: Collections-mt.591, Collections.spur-mt.590 Collections-mt.591 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.235 Added #flatten as special case for #concatenation to remove any nesting except for strings. Very simple implementation with streams and recursion but not as efficient as #concatenation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007453.html Name: Collections-mt.592 Ancestors: Collections-mt.591 Some nil checks replaced with #notNil because ProtoObject knows it and it is faster (about 15%) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007454.html Name: Collections-mt.593 Ancestors: Collections-mt.592 New ordered dictionary added, which keeps track of the insertion order. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007455.html Name: CollectionsTests-mt.229 Ancestors: CollectionsTests-mt.228 tests for ordered dictionary added ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007456.html Name: Collections-topa.594 Ancestors: Collections-mt.593 Add #flattened as alias for #flatten. The former makes it more clear a copy will be returned (cf. #reversed), the latter is more in line with ANSI names (cf. #reverse) and other languages. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007457.html Name: CollectionsTests-topa.230 Ancestors: CollectionsTests-mt.229 Add description to #flatten test. Add #flattened test (Collections-topa.594) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007458.html Name: Collections-mt.595 Ancestors: Collections-topa.594 Some fixes to the OrderedDictionary implementation and its class comment was updated. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007459.html Name: Collections-mt.596 Ancestors: Collections-mt.595 some fixes to OrderedDictionary including copy; small part of the protocol of OrderedCollection adopted (#sort, #first, ...). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007460.html Name: CollectionsTests-mt.231 Ancestors: CollectionsTests-topa.230 More tests for OrderedDictionary ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007461.html Name: Collections-mt.597 Ancestors: Collections-mt.596 Removed non-working #first: from OrderedDictionary. Was committed by accident. ^__^ ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007462.html Name: CommandLine-cmm.4 Ancestors: CommandLine-fbs.3 Let Errors print themselves. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007463.html Name: System-cmm.694 Ancestors: System-dtl.693 - #flush stdout and stderr after writing error information to them. - After that, if the exception is resumable (i.e. a Warning), resume it. Except if its a MessageNotUnderstood -- that is not an error you want to resume in a headless environment. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007464.html Name: System-cmm.696 Ancestors: System-kfr.695, System-cmm.694 - Remove the crazy check for MessageNotUnderstood in Smalltalk #run:.. Headless mode should always exit on any Error. - In fact, even when not in headless mode, we don't need to halt but simply #pass the Error to the default handler for Errors do what it does, whether that's popping a debugger which could be resumed (if the Error isResumable) or something else. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007465.html Name: Network-ul.158 Ancestors: Network-bf.157 Added Socket >> #setPort:interface:, which lets one bind an UDP socket to the specified IP address and port. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007466.html Name: Kernel-ul.893 Ancestors: Kernel-ul.891, Kernel-nice.892 - Added Delay >> #delayDuration: which allows one to reuse the same Delay instance with a different duration. - Merged Kernel-ul.891: - Introduced ThreadSafeRandom, a process-local variable holding a Random instance. Replaced all uses of Collection's RandomForPicking with ThreadSafeRandom value. - Faster Magnitude >> #between:and:. - Added an accessor for Semaphore's excessSignals variable. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007467.html Name: Collections-ul.598 Ancestors: Collections-ul.589, Collections-mt.597 - Fix: OrderedCollection >> #asArray returns an Array instead of an instance of the class returned by the class side #arrayType method. - Slightly more efficient OrderedCollection >> #sort:. - Merged Collections-ul.589: - Deprecated Collection class >> #randomForPicking. - Replaced all accesses to RandomForPicking with ThreadSafeRandom value. - WeakKeyDictionary >> associationsDo: ignores associations with GC'd keys. This affects all enumerator methods, and makes overriding #keysDo: unnecessary. - Added a new method SequenceableCollection #>> groupsDo:, which works like #groupsOf:atATimeDo:, but uses the block's argument count as the group size. Depends on Kernel-ul.893 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007468.html Name: Environments-cmm.53 Ancestors: Environments-cmm.52 - Only change key when it is NOT in the 'bindings' Dictionary, otherwise it would be in a state inconsistent with its new hash. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007469.html Name: Environments-cmm.52 Ancestors: Environments-cmm.51, Environments-nice.47 - Roll back cwp.50 because creating a new binding leaves the CM-literal bindings in their old state. - Don't signal #binding:removedFrom: because it's becoming the literal in CM's to a newly created Undeclared literal with the old name. - So since we no longer signal removed: don't signal #binding:addedTo: either. Renaming is a updating of a binding, not a removing or adding. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007470.html Name: CollectionsTests-ul.232 Ancestors: CollectionsTests-mt.231 - Fixed FloatCollectionTest >> #testAdd. #asArray returns an Array. #asFloatArray returns a FloatArray. - Added a test for #groupsDo:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007471.html Name: Collections-mt.599 Ancestors: Collections-ul.598 Implemented "First wins"-strategy wrt. to the order of associations. Allowed for simplifying the code. Order array does only grow to 75% to mitigate the greediness of the Dictionary. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007472.html Name: CollectionsTests-mt.233 Ancestors: CollectionsTests-ul.232 Tests updated for OrderedDictionary ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007473.html Name: Collections-mt.600 Ancestors: Collections-mt.599 Copy ranges of elements in OrderedDictionary. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007474.html Name: CollectionsTests-mt.234 Ancestors: CollectionsTests-mt.233 Tests about copying ranges added for OrderedDictionary ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007475.html Name: Morphic-mt.754 Ancestors: Morphic-bf.753 Fixed conversion of StringMorph as #imageForm when text color was white. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007476.html Name: Collections-mt.602 Ancestors: Collections-ul.601 Merged improvements for OrderedDictionary from inbox (ul.601). Fixed problem in (mt.600 version) #copyFrom:to: with memory allocation. Preferred this over ul.601 because it is faster (8 per second vs. 12 per second). d := OrderedDictionary new. 1 to: 1000000 do: [:ea | d at: ea put: nil]. [d copyFrom: 250000 to: 750000] bench. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007477.html Name: CollectionsTests-mt.235 Ancestors: CollectionsTests-mt.234 Updated tests for OrderedDictionary. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007478.html Name: Tests-topa.307 Ancestors: Tests-dtl.306 Environments: Don't break user code expecting the Dictionary API ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007479.html Name: Tests-topa.308 Ancestors: Tests-topa.307 Environments: The need for fresh bindings on class rename may be a good idea, we don't know yet. Need to talk to cwp, probably. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007480.html Name: Environments-topa.54 Ancestors: Environments-cmm.53 Update literal bindings in compiled methods when renaming a class. Restores working behavior of pre-Squeak4.5. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007481.html Name: Tests-topa.309 Ancestors: Tests-topa.308 Reinstall the 'new binding' condition in class renames. Also test that literals still work after renaming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007482.html Name: Environments-topa.55 Ancestors: Environments-topa.54 3rd attempt at class-rename fixes. This version a) avoids #becomeForward: b) fixes method homes after rename c) moves the obsolete binding to undeclared but keeps it working. Effectively, this is the outcome: | p | p := Object subclass: #A instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Unknown'. p compile: 'foo ^ A new'. " literals of #foo {#A=>A . #foo . #A=>A}" p rename: #B. " literals of #foo {#A=>B . #foo . #B=>B}" p new foo class == p. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007483.html Name: Tools-topa.533 Ancestors: Tools-ul.532 Fix notification about obsolete class references after a class rename ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007484.html Name: Environments-topa.56 Ancestors: Environments-topa.55 Provide more Dictionary protocol for exisiting users of Smalltalk globals. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007485.html Name: Compression-dtl.47 Ancestors: Compression-bf.46 ZipDirectoryMember>>localFileName should use host file system semantics to test for file directory path, it should not assume that unix conventions apply. This hopefully fixes the problem identified by Tim Oesterreich on squeak-dev: [BUG] ERROR: File not in Directory: [...] while trying to create a SAR-archive on Windows ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007486.html Name: Compiler-topa.292 Ancestors: Compiler-eem.291 Fix super-send DoIts in the debugger. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007487.html Name: Collections.spur-mt.592 Ancestors: Collections-mt.592, Collections.spur-mt.591 Collections-mt.592 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Some nil checks replaced with #notNil because ProtoObject knows it and it is faster (about 15%) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007488.html Name: Collections.spur-mt.593 Ancestors: Collections-mt.593, Collections.spur-mt.592 Collections-mt.593 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 New ordered dictionary added, which keeps track of the insertion order. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007489.html Name: Collections.spur-topa.594 Ancestors: Collections-topa.594, Collections.spur-mt.593 Collections-topa.594 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Add #flattened as alias for #flatten. The former makes it more clear a copy will be returned (cf. #reversed), the latter is more in line with ANSI names (cf. #reverse) and other languages. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007490.html Name: Collections.spur-mt.595 Ancestors: Collections-mt.595 Collections-mt.595 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Some fixes to the OrderedDictionary implementation and its class comment was updated. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007491.html Name: Collections.spur-mt.596 Ancestors: Collections-mt.596, Collections.spur-mt.595 Collections-mt.596 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 some fixes to OrderedDictionary including copy; small part of the protocol of OrderedCollection adopted (#sort, #first, ...). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007492.html Name: Collections.spur-mt.597 Ancestors: Collections-mt.597, Collections.spur-mt.596 Collections-mt.597 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Removed non-working #first: from OrderedDictionary. Was committed by accident. ^__^ ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007493.html Name: Collections.spur-ul.598 Ancestors: Collections-ul.598 Collections-ul.598 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 - Fix: OrderedCollection >> #asArray returns an Array instead of an instance of the class returned by the class side #arrayType method. - Slightly more efficient OrderedCollection >> #sort:. - Merged Collections-ul.589: - Deprecated Collection class >> #randomForPicking. - Replaced all accesses to RandomForPicking with ThreadSafeRandom value. - WeakKeyDictionary >> associationsDo: ignores associations with GC'd keys. This affects all enumerator methods, and makes overriding #keysDo: unnecessary. - Added a new method SequenceableCollection #>> groupsDo:, which works like #groupsOf:atATimeDo:, but uses the block's argument count as the group size. Depends on Kernel-ul.893 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007494.html Name: Collections.spur-mt.599 Ancestors: Collections-mt.599 Collections-mt.599 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Implemented "First wins"-strategy wrt. to the order of associations. Allowed for simplifying the code. Order array does only grow to 75% to mitigate the greediness of the Dictionary. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007495.html Name: Collections.spur-mt.600 Ancestors: Collections-mt.600, Collections.spur-mt.599 Collections-mt.600 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Copy ranges of elements in OrderedDictionary. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007496.html Name: Compiler.spur-topa.292 Ancestors: Compiler-topa.292, Compiler.spur-eem.291 Compiler-topa.292 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Fix super-send DoIts in the debugger. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007497.html Name: Collections.spur-mt.602 Ancestors: Collections-mt.602 Collections-mt.602 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 Merged improvements for OrderedDictionary from inbox (ul.601). Fixed problem in (mt.600 version) #copyFrom:to: with memory allocation. Preferred this over ul.601 because it is faster (8 per second vs. 12 per second). d := OrderedDictionary new. 1 to: 1000000 do: [:ea | d at: ea put: nil]. [d copyFrom: 250000 to: 750000] bench. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007498.html Name: Kernel.spur-ul.893 Ancestors: Kernel-ul.893 Kernel-ul.893 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 - Added Delay >> #delayDuration: which allows one to reuse the same Delay instance with a different duration. - Merged Kernel-ul.891: - Introduced ThreadSafeRandom, a process-local variable holding a Random instance. Replaced all uses of Collection's RandomForPicking with ThreadSafeRandom value. - Faster Magnitude >> #between:and:. - Added an accessor for Semaphore's excessSignals variable. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007499.html Name: System.spur-cmm.696 Ancestors: System-cmm.696, System.spur-kfr.695 System-cmm.696 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.236 - Remove the crazy check for MessageNotUnderstood in Smalltalk #run:.. Headless mode should always exit on any Error. - In fact, even when not in headless mode, we don't need to halt but simply #pass the Error to the default handler for Errors do what it does, whether that's popping a debugger which could be resumed (if the Error isResumable) or something else. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007500.html Name: System-mt.697 Ancestors: System-cmm.696 Let message tally ignore #home but just use #sender to handle block closures correctly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007501.html Name: System-eem.698 Ancestors: System-mt.697 Provide an obsolete method for ObjectHistory that kills the current ObjectHistory's mark process if the class is removed. This allows Spur to easily remove ObjectHistory, which it does not support. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007502.html Name: System-eem.699 Ancestors: System-eem.698 Add block nesting to MessageTally. c.f. AndreasProfiler-eem.10 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007503.html Name: Kernel-eem.894 Ancestors: Kernel-ul.893 Access a process's environment from effectiveProcess to provide correct environment access when debugging. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007504.html Name: System.spur-mt.697 Ancestors: System-mt.697, System.spur-cmm.696 System-mt.697 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Let message tally ignore #home but just use #sender to handle block closures correctly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007505.html Name: System.spur-eem.698 Ancestors: System-eem.698 System-eem.698 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Provide an obsolete method for ObjectHistory that kills the current ObjectHistory's mark process if the class is removed. This allows Spur to easily remove ObjectHistory, which it does not support. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007506.html Name: Kernel.spur-eem.894 Ancestors: Kernel-eem.894, Kernel.spur-ul.893 Kernel-eem.894 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Access a process's environment from effectiveProcess to provide correct environment access when debugging. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007507.html Name: System.spur-eem.699 Ancestors: System-eem.699, System.spur-eem.698 System-eem.699 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Add block nesting to MessageTally. c.f. AndreasProfiler-eem.10 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007508.html Name: Kernel-eem.895 Ancestors: Kernel-ul.893 Change Process>>evaluate:onBehalfOf: to update all non-scheduling variables, such as name and env, to ensure that access to these variables during debugging answers those of the debugged process. This is a smaller, if tricker, change than that in Kernel-eem.894 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007509.html Name: Kernel-eem.896 Ancestors: Kernel-eem.895 Tweak the write-back of variables in Process>>evaluate:onBehalfOf: so as not to smash variables initialized in the process. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007510.html Name: Kernel.spur-eem.895 Ancestors: Kernel-eem.895, Kernel.spur-ul.893 Kernel-eem.895 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Change Process>>evaluate:onBehalfOf: to update all non-scheduling variables, such as name and env, to ensure that access to these variables during debugging answers those of the debugged process. This is a smaller, if tricker, change than that in Kernel-eem.894 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007511.html Name: Kernel.spur-eem.896 Ancestors: Kernel-eem.896, Kernel.spur-eem.895 Kernel-eem.896 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Tweak the write-back of variables in Process>>evaluate:onBehalfOf: so as not to smash variables initialized in the process. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007512.html Name: Kernel-mt.897 Ancestors: Kernel-eem.896 Dynamic variables will not store their default values into the process' env anymore. This supports changing the result of #default without having to terminate that process (or fiddling with the env var directly...) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007513.html Name: KernelTests-mt.286 Ancestors: KernelTests-nice.285 new test for dynamic variables added ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007514.html Name: Morphic-cmm.755 Ancestors: Morphic-mt.754 Let the "Compare to Clipboard" function compare just the selected text to the clipboard text. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-January/007515.html Name: Help-Squeak-Project-cmm.21 Ancestors: Help-Squeak-Project-dtl.20 - Update Compare To Clipboard description. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007516.html Name: Morphic-cmm.756 Ancestors: Morphic-cmm.755 - Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents. - Make the same change to ParagraphEditor, for consistency. ============================================= From commits at source.squeak.org Mon Feb 2 01:51:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 2 01:51:12 2015 Subject: [squeak-dev] The Trunk: System-eem.700.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.700.mcz ==================== Summary ==================== Name: System-eem.700 Author: eem Time: 1 February 2015, 5:50:46.817 pm UUID: f755aede-d893-40a4-92a3-bfbbff0e4c01 Ancestors: System-eem.699 MessageTally>>tally:by: should check block nesting. =============== Diff against System-eem.699 =============== Item was changed: ----- Method: MessageTally>>tally:by: (in category 'tallying') ----- tally: context by: count "Explicitly tally the specified context and its stack." - | sender | - "Add to this node if appropriate" + (context method == method + and: [blockNesting = (self blockNestingCountOf: context)]) ifTrue: + [^self bumpBy: count]. + + ^context sender + ifNil: "No sender? Add new branch to the tree." + [(self bumpBy: count) tallyPath: context by: count] + ifNotNil: "Find the node for the sending context (or add it if necessary)" + [:sender| + (self tally: sender by: count) tallyPath: context by: count]! - context method == method ifTrue: [^self bumpBy: count]. - - "No sender? Add new branch to the tree." - (sender := context sender) ifNil: [ - ^ (self bumpBy: count) tallyPath: context by: count]. - - "Find the node for the sending context (or add it if necessary)" - ^ (self tally: sender by: count) tallyPath: context by: count! From eliot.miranda at gmail.com Mon Feb 2 01:54:33 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 2 01:54:35 2015 Subject: [squeak-dev] Re: The Trunk: System-eem.699.mcz In-Reply-To: <1422722753198-4802948.post@n4.nabble.com> References: <1422722753198-4802948.post@n4.nabble.com> Message-ID: On Sat, Jan 31, 2015 at 8:45 AM, Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > I think you missed to adapt #tally:by: ... :) > yep. Thanks Marcel! -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150201/41b21ff6/attachment.htm From eliot.miranda at gmail.com Mon Feb 2 01:57:40 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 2 01:57:43 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.756.mcz In-Reply-To: References: <54ce7950.a868b40a.7aa6.ffff81e3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On Sun, Feb 1, 2015 at 1:05 PM, Chris Muller wrote: > ParagraphEditor is in ST-80, so not part of this package. Speaking of > that, is a corresponding change to ParagraphEditor necessary? Is > ParagraphEditor intended to be purged at some point? > Not necessarily. People use it as a way of reducing footprint. Whether we can afford to keep it going long term is debatable but so far people like David Lewis have done a good job of keeping it working. So by all means fix compare to clipboard therein. > On Sun, Feb 1, 2015 at 1:06 PM, wrote: > > Chris Muller uploaded a new version of Morphic to project The Trunk: > > http://source.squeak.org/trunk/Morphic-cmm.756.mcz > > > > ==================== Summary ==================== > > > > Name: Morphic-cmm.756 > > Author: cmm > > Time: 1 February 2015, 1:06:11.045 pm > > UUID: c1553853-472d-45ca-a182-c07497c6f7a9 > > Ancestors: Morphic-cmm.755 > > > > - Present the comparison to clipboard text from the context of > paste-modification, since that is what the user is determining whether to > do with the clipboard contents. > > - Make the same change to ParagraphEditor, for consistency. > > > > =============== Diff against Morphic-cmm.755 =============== > > > > Item was changed: > > ----- Method: TextEditor>>compareToClipboard (in category 'menu > messages') ----- > > compareToClipboard > > + "If any text is selected, present the modifications that would > be made to it if the clipboard contents were pasted over it. If no text is > selected, present the differences betwen the entire pane's contents and the > clipboard text." > > + | subjectText proposedText | > > + subjectText := self selection string ifEmpty: [ paragraph text > string ]. > > + proposedText := self clipboardText string. > > + subjectText = proposedText ifTrue: [^ self inform: 'Exact > match']. > > + (StringHolder new > > + textContents: > > + (TextDiffBuilder > > + buildDisplayPatchFrom: subjectText > > + to: proposedText)) openLabel: > 'Differences with Clipboard Text'! > > - "Check to see if whether the receiver's text is the same as the > text currently on the clipboard, and inform the user." > > - | s1 s2 | > > - s1 := self clipboardText string. > > - s2 := self selection string. > > - s1 = s2 ifTrue: [^ self inform: 'Exact match']. > > - > > - (StringHolder new textContents: > > - (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2)) > > - openLabel: 'Comparison to Clipboard Text'! > > > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150201/82912940/attachment.htm From lewis at mail.msen.com Mon Feb 2 04:26:01 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Feb 2 04:26:03 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.756.mcz In-Reply-To: References: <54ce7950.a868b40a.7aa6.ffff81e3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <20150202042601.GA91817@shell.msen.com> On Sun, Feb 01, 2015 at 05:57:40PM -0800, Eliot Miranda wrote: > On Sun, Feb 1, 2015 at 1:05 PM, Chris Muller wrote: > > > ParagraphEditor is in ST-80, so not part of this package. Speaking of > > that, is a corresponding change to ParagraphEditor necessary? Is > > ParagraphEditor intended to be purged at some point? > > > > Not necessarily. People use it as a way of reducing footprint. Whether we > can afford to keep it going long term is debatable but so far people like > David Lewis have done a good job of keeping it working. So by all means > fix compare to clipboard therein. > +1 There are several reasons why this matters. 1) If you care about modularity, then you should care about packages that are unloadable and reloadable. MVC (the ST-80 package) is (or was? hopefully this is still true) fully reloadable. ParagraphEditor is a key part of the MVC environment, so if you want it to go away, you should just unload MVC. Morphic needs to be made reloadable also, but that has not happened yet. 2) If you care about making Morphic modular, either in the sense that it might become unloadable and reloadable, or in the sense that it might be replaced by something better (Morphic 3, or maybe something entirely different), then it is important to know where the boundaries of the Morphic package and behaviors lie. That is critical to the ToolBuilder, UIManager, and Project architecture. For better or for worse, we have only two working implementations of that architecture right now, so I think that it is important to keep both Morphic and MVC in good working order if we are to have any chance of knowing and maintaining the boundaries. 3) If you were interested in light weight images that might run on very large numbers of processors, then it would be convenient to have a small but usable UI environment available for those images. In that case, you might want to unload Morphic and everything that goes with it. You might then be happy to have a working MVC at hand, and of course you would want ParagraphEditor to work also. Dave From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 06:54:31 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 06:59:27 2015 Subject: [squeak-dev] How to change ActiveWorld extent resp. host window size programmatically? Message-ID: <1422860071131-4803109.post@n4.nabble.com> Hi! Is there a way to change a world's extent from within Smalltalk? This does not work: ActiveWorld extent: 500@500. Is there a primitive to modify the host window size? If no, could we add one? :) Scenario: If I make screencasts, I want to use common resolutions and make my capturing tool record a window's contents. It is quite tricky to achieve pixel-wise accuracy (offset + size). Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 06:58:03 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 07:02:52 2015 Subject: [squeak-dev] Re: Trouble opening MC repositories "Error: subscript is out of bounds: 0" In-Reply-To: <20150201162608.GA90001@shell.msen.com> References: <20150201154249.GA83658@shell.msen.com> <20150201162608.GA90001@shell.msen.com> Message-ID: <1422860283388-4803110.post@n4.nabble.com> Maybe. Or an unfavorable kind of coffee beans. :) Best, Marcel -- View this message in context: http://forum.world.st/Trouble-opening-MC-repositories-Error-subscript-is-out-of-bounds-0-tp4803061p4803110.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Mon Feb 2 07:33:56 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Feb 2 07:34:00 2015 Subject: [squeak-dev] How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422860071131-4803109.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> Message-ID: <0125C5C1-229D-471D-B808-B064DBE9824E@gmx.de> Hi, On 02.02.2015, at 07:54, Marcel Taeumel wrote: > Hi! > > Is there a way to change a world's extent from within Smalltalk? This does > not work: > > ActiveWorld extent: 500@500. > > Is there a primitive to modify the host window size? If no, could we add > one? :) > > Scenario: If I make screencasts, I want to use common resolutions and make > my capturing tool record a window's contents. It is quite tricky to achieve > pixel-wise accuracy (offset + size). > To my knowledge, we do not have a way to change the host window in-image. On Lukas Renggli's version of Builder-CI, however, I found a C-tool that patches the image to have the desired dimensions. Hacky, I know, but it works. Best -Tobias -------------- next part -------------- A non-text attachment was scrubbed... Name: build-resize.c Type: application/octet-stream Size: 932 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/8418bd33/build-resize.obj From bert at freudenbergs.de Mon Feb 2 08:12:15 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Feb 2 08:12:22 2015 Subject: [squeak-dev] How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422860071131-4803109.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> Message-ID: <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> Look at the class side of DisplayScreen. There is something like DisplayScreen hostWindowExtent: ... - Bert - > On 02.02.2015, at 07:54, Marcel Taeumel wrote: > > Hi! > > Is there a way to change a world's extent from within Smalltalk? This does > not work: > > ActiveWorld extent: 500@500. > > Is there a primitive to modify the host window size? If no, could we add > one? :) > > Scenario: If I make screencasts, I want to use common resolutions and make > my capturing tool record a window's contents. It is quite tricky to achieve > pixel-wise accuracy (offset + size). > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/82921f38/smime.bin From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 08:38:55 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 08:43:45 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> Message-ID: <1422866335748-4803120.post@n4.nabble.com> Hi! Thank you, Bert. You made me look at DisplayScreen's methods. There is no #hostWindowExtent: in Squeak 4.5 oder in Trunk, but this works: DisplayScreen depth: 32 width: 1024 height: 768 fullscreen: false. self assert: (1024@768) = ActiveWorld extent. However, we should introduce #hostWindowExtent: to Trunk. :) Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803120.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 08:40:04 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 08:44:55 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422866335748-4803120.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> Message-ID: <1422866404786-4803121.post@n4.nabble.com> ...and I also vote for making ActiveWorld extent: 800@600. call that method auto-magically. Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803121.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 09:18:42 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 09:23:32 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422866404786-4803121.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <1422866404786-4803121.post@n4.nabble.com> Message-ID: <1422868722736-4803123.post@n4.nabble.com> hostwindow.cs How about this? I chose to implement it in Project. Now this would work: Project current fullScreenOff; hostWindowExtent: 800@600. self assert: Display extent = (800@600). Project current fullScreenOn. self assert: Project current hostWindowExtent = (800@600). A class var keeps track of the last extent in case of full-screen. Just like LastScreenModeSelected does. Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803123.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lecteur at zogotounga.net Mon Feb 2 13:45:06 2015 From: lecteur at zogotounga.net (=?UTF-8?B?U3TDqXBoYW5lIFJvbGxhbmRpbg==?=) Date: Mon Feb 2 13:44:53 2015 Subject: [squeak-dev] ClassBuilder update:to: broken with Spur (Eliot ?) Message-ID: <54CF7F62.2000109@zogotounga.net> Hello, In order to load muO in the latest Spur image, I had to reintroduce the garbageCollect that has been deleted from method #update:to: in ClassBuilder. There is a verbose discussion in both the previous and current implementations of this methods. From nice 3/10/2013, we read (talking about the Smalltalk garbageCollect bit): "Warning: Read this before you even think about removing the GC. Yes, it slows us down. Quite heavily if you have a large image. However, there's no good and simple alternative here, since unfortunately, #become: does change class pointers. What happens is that after the above become all of the instances of the old class will have a class pointer identifying them as instances of newClass. If we get our hands on any of these instances we will break immediately since their expected instance layout (that of its class, e.g., newClass) will not match their actual instance layout (that of oldClass). And getting your hands on any of those instances is really simple - just reshaping one class two times in rapid succession will do it. Reflection techniques, interrupts, etc. will only add to this problem. In the case of Metaclass things get even worse since when we recompile the entire class hierarchy we will recompile both, Metaclass and its instances (and some of its instances will have the old and some the new layout). The only easy solution to this problem would be to 'fix up' the class pointers of the old instances to point to the old class (using primitiveChangeClassTo:). But this won't work either - as we do a one-way become we would have to search the entire object memory for the oldClass and couldn't even clearly identify it unless we give it some 'special token' which sounds quite error-prone. If you really need to get rid of the GC here are some alternatives: On the image level, one could create a copy of the oldClass before becoming it into the new class and, after becoming it, 'fix up' the old instances. That would certainly work but it sounds quite complex, as we need to make sure we're not breaking any of the superclass/subclass meta/non-meta class variants. Alternatively, fix up #becomeForward on the VM-level to 'dump the source objects' of #become. This would be quite doable (just 'convert' them into a well known special class such as bitmap) yet it has problems if (accidentally or not) one of the objects in #become: appears on 'both sides of the fence' (right now, this will work ... in a way ... even though the consequences are unclear). Another alternative is to provide a dedicated primitive for this (instead of using it implicitly in become) which would allow us to dump all the existing instances right here. This is equivalent to a more general primitiveChangeClassTo: and might be worthwhile but it would likely have to keep in mind the differences between bits and pointer thingies etc. Since all of the alternatives seem rather complex and magical compared to a straight-forward GC it seems best to stick with the GC solution for now. If someone has a real need to fix this problem, that person will likely be motivated enough to check out the alternatives. Personally I'd probably go for #1 (copy the old class and remap the instances to it) since it's a solution that could be easily reverted from within the image if there's any problem with it." In the current version we read: "eem 5/31/2014 07:22 At this point there used to be a garbage collect whose purpose was to ensure no old instances existed after the becomeForward:. Without the GC it was possible to resurrect old instances using e.g. allInstancesDo:. This was because the becomeForward: updated references from the old objects to new objects but didn't destroy the old objects. But as of late 2013/early 2014 becomeForward: has been modified to free all the old objects." This latest statement may not hold true, since I could not load muO due to "Metaclasses can only have one instance" errors (originating in ClassDescription>>#updateInstances:from:isMeta:. Stef From eliot.miranda at gmail.com Mon Feb 2 15:39:49 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 2 15:39:53 2015 Subject: [squeak-dev] ClassBuilder update:to: broken with Spur (Eliot ?) In-Reply-To: <54CF7F62.2000109@zogotounga.net> References: <54CF7F62.2000109@zogotounga.net> Message-ID: Hi St?phane, if you did then there's possibly a VM bug preventing it rather than the code being wrong. Can you email me an expression that loads the relevant version of muO and I'll try and reproduce the problem? Eliot (phone) On Feb 2, 2015, at 5:45 AM, St?phane Rollandin wrote: > Hello, > > In order to load muO in the latest Spur image, I had to reintroduce the garbageCollect that has been deleted from method #update:to: in ClassBuilder. > > There is a verbose discussion in both the previous and current implementations of this methods. > > From nice 3/10/2013, we read (talking about the Smalltalk garbageCollect bit): > > "Warning: Read this before you even think about removing the GC. Yes, it slows us down. Quite heavily if you have a large image. However, there's no good and simple alternative here, since unfortunately, #become: does change class pointers. What happens is that after the above become all of the instances of the old class will have a class pointer identifying them as instances of newClass. If we get our hands on any of these instances we will break immediately since their expected instance layout (that of its class, e.g., newClass) will not match their actual instance layout (that of oldClass). And getting your hands on any of those instances is really simple - just reshaping one class two times in rapid succession will do it. Reflection techniques, interrupts, etc. will only add to this problem. In the case of Metaclass things get even worse since when we recompile the entire class hierarchy we will recompile both, Metaclass and its instances (and some of its instances will have the old and some the new layout). > > The only easy solution to this problem would be to 'fix up' the class pointers of the old instances to point to the old class (using primitiveChangeClassTo:). But this won't work either - as we do a one-way become we would have to search the entire object memory for the oldClass and couldn't even clearly identify it unless we give it some 'special token' which sounds quite error-prone. If you really need to get rid of the GC here are some alternatives: > > On the image level, one could create a copy of the oldClass before becoming it into the new class and, after becoming it, 'fix up' the old instances. That would certainly work but it sounds quite complex, as we need to make sure we're not breaking any of the superclass/subclass meta/non-meta class variants. > > Alternatively, fix up #becomeForward on the VM-level to 'dump the source objects' of #become. This would be quite doable (just 'convert' them into a well known special class such as bitmap) yet it has problems if (accidentally or not) one of the objects in #become: appears on 'both sides of the fence' (right now, this will work ... in a way ... even though the consequences are unclear). > > Another alternative is to provide a dedicated primitive for this (instead of using it implicitly in become) which would allow us to dump all the existing instances right here. This is equivalent to a more general primitiveChangeClassTo: and might be worthwhile but it would likely have to keep in mind the differences between bits and pointer thingies etc. > > Since all of the alternatives seem rather complex and magical compared to a straight-forward GC it seems best to stick with the GC solution for now. If someone has a real need to fix this problem, that person will likely be motivated enough to check out the alternatives. Personally I'd probably go for #1 (copy the old class and remap the instances to it) since it's a solution that could be easily reverted from within the image if there's any problem with it." > > > In the current version we read: > > "eem 5/31/2014 07:22 At this point there used to be a garbage collect whose purpose was to ensure no old instances existed after the becomeForward:. Without the GC it was possible to resurrect old instances using e.g. allInstancesDo:. This was because the becomeForward: updated references from the old objects to new objects but didn't destroy the old objects. But as of late 2013/early 2014 becomeForward: has been modified to free all the old objects." > > > This latest statement may not hold true, since I could not load muO due to "Metaclasses can only have one instance" errors (originating in ClassDescription>>#updateInstances:from:isMeta:. > > > Stef > > From djm1329 at san.rr.com Mon Feb 2 17:24:31 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Mon Feb 2 17:24:33 2015 Subject: [squeak-dev] Re: [Pharo-dev] New Cog VMs available In-Reply-To: References: Message-ID: ARMv6 stack/v3 and stack/spur VMs updated accordingly. Doug > On Jan 29, 2015, at 17:26, Eliot Miranda wrote: > > at http://www.mirandabanda.org/files/Cog/VM/VM.r3236/ > > CogVM binaries as per VMMaker.oscog-eem.1029/r3236 > > Fix stupid, stupid bug in copying vm profile samples between buffers when the > circular buffer index has wrapped. > > Fix monumental blunder in jitted store-check code. The saved registers mask > needs to be the *or* of the value reg and the caller-saved registers, not the > *and*!! > > Make the pin primitives Spur-only. > > Never inline mapStackPages, for debugging. > > Spur: > Reduce the max num literals in the alternate header format to 15, and steal > the bit for the Sista optimized method flag. > > Make postBecomeAction's stack sweep only occur in Spur (fix regression). > Refactor so that the scan is not inlined. Don't assume newMethod is > non-immediate in post-become actions. > > Fix stack adjust slip in primitiveSmallFloatTimesTwoPower > > Make ensureBehaviorHash: fail for uninitialized > behaviours and hence fix the Behavior basicNew basicNew hang. > > Optionalize some api methods the Spur Cogit doesn't use. > > Rename and correct ensureSemaphoreForwardedThroughContext: to > ensureSemaphoreUnforwardedThroughContext:, its intended function. > > Make shouldRemapObj: filter-out objects already in newSpace > since mapStackPages, via mapInterpreterOops, can visit objects > twice in a scavenge, GC, compact sequence. > > Make sure the caller (& saved) context(s) in base frames stack page are > followed post-become in followForwardingPointersInStackZone:. > > Fix bad bug introduced in become changes in VMMaker.oscog-eem.841 through 844. > The class table contains puns, e.g. using Array and WeakArray. These class > index puns must not mislead the allInstances primitive into concluding that > the class in question is at multiple indices and wrongly purge it. > > Fix slip in primitivePin. Also be lenient w.r.t. unpinning married contexts. > Move the check down into StackInterpreter's version. This allows e.g. > self allObjectsDo: [:o| o unpin] > > Bow to the inevitable and add a manual override for primitive accessor depth. > Use it in at: & at:put:. If manual override is not used then the automatically > computed depth is too deep because of context access. > > Newspeak: > Integrate Ryan's newer absent receiver sends, which first apeared in > VMMaker.oscog-eem.919, abandoned because of Glue issues now resolved. Includes > nice refactoring of absent send argument marshalling into its own routine. > > LargeIntegersPlugin: > Remove/fix assumption of 32-bit digit length in normalization routines. > > -- > best, > Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/2dbd2db5/attachment.htm From tim at rowledge.org Mon Feb 2 18:04:34 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Feb 2 18:04:38 2015 Subject: [squeak-dev] Re: [Vm-dev] Re: [Pharo-dev] New Cog VMs available In-Reply-To: References: Message-ID: On 02-02-2015, at 9:24 AM, Douglas McPherson wrote: > ARMv6 stack/v3 and stack/spur VMs updated accordingly. We?ll soon be adding ARMv7 quadcore Pi support - http://www.raspberrypi.org/raspberry-pi-2-on-sale/ I?ve been using one for some time now and it is certainly nicely faster. The multiple cores make quite a difference to overall system performance even if Squeak can?t directly take advantage. The memory interface seems faster too. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: FD: Failsafe Disarmed From commits at source.squeak.org Mon Feb 2 18:09:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 2 18:09:09 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.700.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.700.mcz ==================== Summary ==================== Name: System.spur-eem.700 Author: eem Time: 2 February 2015, 10:08:19.311 am UUID: 282570b4-2301-4b91-bfb5-5a243b9be33e Ancestors: System-eem.700, System.spur-eem.699 System-eem.700 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 MessageTally>>tally:by: should check block nesting. =============== Diff against System-eem.700 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From tim at rowledge.org Mon Feb 2 18:20:25 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Feb 2 18:20:28 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422868722736-4803123.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <1422866404786-4803121.post@n4.nabble.com> <1422868722736-4803123.post@n4.nabble.com> Message-ID: <6097AFA2-6E63-4149-8D3C-37442C8C575D@rowledge.org> Host window stuff has been there for *years* -actually it?s now just passed a *decade* tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Soft rock From djm1329 at san.rr.com Mon Feb 2 20:02:49 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Mon Feb 2 20:02:52 2015 Subject: [squeak-dev] Re: [Vm-dev] Re: [Pharo-dev] New Cog VMs available In-Reply-To: Message-ID: <20150202200249.PP4F7.3437.root@cdptpa-web06> ---- tim Rowledge wrote: > > > On 02-02-2015, at 9:24 AM, Douglas McPherson wrote: > > > ARMv6 stack/v3 and stack/spur VMs updated accordingly. > > We?ll soon be adding ARMv7 quadcore Pi support - > http://www.raspberrypi.org/raspberry-pi-2-on-sale/ > > I?ve been using one for some time now and it is certainly nicely faster. The multiple cores make quite a difference to overall system performance even if Squeak can?t directly take advantage. The memory interface seems faster too. I was going to ask you about this as I saw the RPi 2 announcement today. I figured you probably already had one :) I haven?t been building the ARMv7 VMs recently since there is something broken in the ARM fast BitBlt enhancements for ARMv7, which I haven?t had time to look into. Have you been able to make any improvements to that? (There?s also some potential issues noted by Ken Dickey regarding atomic operations). Doug > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: FD: Failsafe Disarmed > > From eliot.miranda at gmail.com Mon Feb 2 20:47:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 2 20:47:48 2015 Subject: [squeak-dev] || Message-ID: Hi All, code as in the double bars forming the end of block arguments and the beginning of block temporaries in convertInstances | new old | old := Binding allInstances. new := old collect: [:ea | ClassBinding key: ea key value: ea value]. old elementsForwardIdentityTo: new. old := ReadOnlyVariableBinding allInstances. new := old collect: [:ea | ClassBinding key: ea key value: ea value]. old elementsForwardIdentityTo: new. Environment allInstancesDo: [:env | #('contents' 'bindings' 'public' 'undeclared') do: => [:var || dict | old := Array new writeStream. new := Array new writeStream. dict := env instVarNamed: var. dict associations do: [:binding | binding class == Association ifTrue: [old nextPut: binding. new nextPut: binding key => binding value]]. old contents elementsForwardIdentityTo: new contents]] is legal but highlighted as a syntax error by shout. What do you prefer, editing the source to | | or fixing Shout to accept the syntax? The right answer should be fixing shout but the fix will be ugly because || is a binary selector and so this will need to be special cased. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/026dd7cd/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Mon Feb 2 21:15:22 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Feb 2 21:20:16 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <6097AFA2-6E63-4149-8D3C-37442C8C575D@rowledge.org> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <1422866404786-4803121.post@n4.nabble.com> <1422868722736-4803123.post@n4.nabble.com> <6097AFA2-6E63-4149-8D3C-37442C8C575D@rowledge.org> Message-ID: <1422911722009-4803304.post@n4.nabble.com> Yep, but its API is not that convenient. :) Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803304.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Feb 2 21:55:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 2 21:55:13 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.898.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.898.mcz ==================== Summary ==================== Name: Kernel-eem.898 Author: eem Time: 2 February 2015, 1:54:44.676 pm UUID: ee76d58d-255c-464c-aa5e-0b88a264907c Ancestors: Kernel-mt.897 Use the brace construct in becomeForward:. Relax the comment in the become implementations to include Spur immediates. =============== Diff against Kernel-mt.897 =============== Item was changed: ----- Method: ProtoObject>>become: (in category 'system primitives') ----- become: otherObject "Primitive. Swap the object pointers of the receiver and the argument. + All variables in the entire system that used to point to the receiver + now point to the argument, and vice-versa. + Fails if either object is an immediate such as a SmallInteger." - All variables in the entire system that used to point to the - receiver now point to the argument, and vice-versa. - Fails if either object is a SmallInteger" {self} elementsExchangeIdentityWith: {otherObject}! Item was changed: ----- Method: ProtoObject>>becomeForward: (in category 'system primitives') ----- becomeForward: otherObject "Primitive. All variables in the entire system that used to point + to the receiver now point to the argument. + Fails if either argument is an immediate such as a SmallInteger." - to the receiver now point to the argument. - Fails if either argument is a SmallInteger." + {self} elementsForwardIdentityTo: {otherObject}! - (Array with: self) - elementsForwardIdentityTo: - (Array with: otherObject)! Item was changed: ----- Method: ProtoObject>>becomeForward:copyHash: (in category 'system primitives') ----- becomeForward: otherObject copyHash: copyHash + "Primitive. All variables in the entire system that used to point to + the receiver now point to the argument. If copyHash is true, the + argument's identity hash bits will be set to those of the receiver. + Fails if either argument is an immediate such as a SmallInteger." - "Primitive. All variables in the entire system that used to point to the receiver now point to the argument. - If copyHash is true, the argument's identity hash bits will be set to those of the receiver. - Fails if either argument is a SmallInteger." + {self} + elementsForwardIdentityTo: {otherObject} + copyHash: copyHash! - (Array with: self) - elementsForwardIdentityTo: - (Array with: otherObject) - copyHash: copyHash! From tim at rowledge.org Mon Feb 2 22:40:37 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Feb 2 22:40:40 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422911722009-4803304.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <1422866404786-4803121.post@n4.nabble.com> <1422868722736-4803123.post@n4.nabble.com> <6097AFA2-6E63-4149-8D3C-37442C8C575D@rowledge.org> <1422911722009-4803304.post@n4.nabble.com> Message-ID: On 02-02-2015, at 1:15 PM, Marcel Taeumel wrote: > Yep, but its API is not that convenient. :) How hard could it be to connect up an incantation like HostWindowProxy new primitiveWindowSize: 1 x: 1500 y: 1200 1500@1200 to the Display? And don?t forget DisplayScreen class>depth:width:height:fullscreen: even though that fiddles with the actual screen size it might do what you actually want. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Spero nos familiares mansuros. = I hope we'll still be friends. From bert at freudenbergs.de Mon Feb 2 22:47:45 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Feb 2 22:47:58 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422866335748-4803120.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> Message-ID: <44E2F928-7C73-46B4-B74B-715C603CC62B@freudenbergs.de> Im pretty sure it's there. I think I ported it over from Etoys. It uses the HostWindow primitive, as Tim suggested, just without any proxy stuff. If it is indeed not there, please look at an Etoys image. This is much better than the primitive you found, which was never properly supported on all platforms. - Bert - > On 02.02.2015, at 09:38, Marcel Taeumel wrote: > > Hi! > > Thank you, Bert. You made me look at DisplayScreen's methods. There is no > #hostWindowExtent: in Squeak 4.5 oder in Trunk, but this works: > > DisplayScreen depth: 32 width: 1024 height: 768 fullscreen: false. > self assert: (1024@768) = ActiveWorld extent. > > However, we should introduce #hostWindowExtent: to Trunk. :) > > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803120.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150202/6336dcca/smime.bin From commits at source.squeak.org Mon Feb 2 22:55:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 2 22:55:09 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150202225508.18706.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-February/007517.html Name: System-eem.700 Ancestors: System-eem.699 MessageTally>>tally:by: should check block nesting. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007518.html Name: Kernel.spur-mt.897 Ancestors: Kernel-mt.897, Kernel.spur-eem.896 Kernel-mt.897 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 Dynamic variables will not store their default values into the process' env anymore. This supports changing the result of #default without having to terminate that process (or fiddling with the env var directly...) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007519.html Name: System.spur-eem.700 Ancestors: System-eem.700, System.spur-eem.699 System-eem.700 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.237 MessageTally>>tally:by: should check block nesting. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007520.html Name: Kernel-eem.898 Ancestors: Kernel-mt.897 Use the brace construct in becomeForward:. Relax the comment in the become implementations to include Spur immediates. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007521.html Name: Kernel.spur-eem.898 Ancestors: Kernel-eem.898, Kernel.spur-mt.897 Kernel-eem.898 patched for Spur by SpurBootstrapMonticelloPackagePatcher * Cog-eem.237 Use the brace construct in becomeForward:. Relax the comment in the become implementations to include Spur immediates. ============================================= From commits at source.squeak.org Tue Feb 3 00:18:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 00:19:01 2015 Subject: [squeak-dev] The Trunk: System-eem.701.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.701.mcz ==================== Summary ==================== Name: System-eem.701 Author: eem Time: 2 February 2015, 4:18:29.276 pm UUID: 26de7d07-79ec-498e-be4c-b56922cfb457 Ancestors: System-eem.700 Invoke super obsolete in ObjectHistory class>>obsolete =============== Diff against System-eem.700 =============== Item was changed: ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- obsolete "Kill the mark process before removing the class." Current ifNotNil: [:objectHistory| + objectHistory terminate]. + super obsolete! - objectHistory terminate]! From commits at source.squeak.org Tue Feb 3 01:25:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 01:25:40 2015 Subject: [squeak-dev] The Trunk: Tests-eem.310.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.310.mcz ==================== Summary ==================== Name: Tests-eem.310 Author: eem Time: 2 February 2015, 5:25:25.875 pm UUID: f1730180-d653-4951-9fba-d8240f6b38c8 Ancestors: Tests-topa.309 Use classes for the ImageSegmentTest that don't result in an inoperative SUnit system if the test fails. Use the inactive UIManager subclasses. Also, make the test explicitly bring the classes back in, in the test. =============== Diff against Tests-topa.309 =============== Item was changed: ----- Method: ImageSegmentTest>>testImageSegmentsShouldBeWritableToaFile (in category 'as yet unclassified') ----- testImageSegmentsShouldBeWritableToaFile "This should not throw an exception" + | classes | + classes := UIManager subclasses reject: [:sc| sc isActiveManager]. ImageSegment new + copyFromRoots: classes asArray sizeHint: 100; - copyFromRoots: (Array with: TestCase) sizeHint: 100; extract; + writeToFile: 'InactiveUIManagers'; - writeToFile: 'TestCase'; yourself. + "TODO: write assertions showing that something meaningful actually happened." + + "now bring them back in again" + classes do: [:ea| ea new]! - "TODO: write assertions showing that something meaningful actually happened."! From lewis at mail.msen.com Tue Feb 3 04:35:52 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 3 04:36:01 2015 Subject: [squeak-dev] || In-Reply-To: References: Message-ID: <20150203043552.GA25183@shell.msen.com> On Mon, Feb 02, 2015 at 12:47:45PM -0800, Eliot Miranda wrote: > Hi All, > > code as in the double bars forming the end of block arguments and the > beginning of block temporaries in > > convertInstances > | new old | > old := Binding allInstances. > new := old collect: [:ea | ClassBinding key: ea key value: ea value]. > old elementsForwardIdentityTo: new. > old := ReadOnlyVariableBinding allInstances. > new := old collect: [:ea | ClassBinding key: ea key value: ea value]. > old elementsForwardIdentityTo: new. > Environment allInstancesDo: > [:env | > #('contents' 'bindings' 'public' 'undeclared') do: > => [:var || dict | > old := Array new writeStream. > new := Array new writeStream. > dict := env instVarNamed: var. > dict associations do: > [:binding | > binding class == Association ifTrue: > [old nextPut: binding. > new nextPut: binding key => binding value]]. > old contents elementsForwardIdentityTo: new contents]] > > is legal but highlighted as a syntax error by shout. > > What do you prefer, editing the source to | | or fixing Shout to accept the > syntax? The right answer should be fixing shout but the fix will be ugly > because || is a binary selector and so this will need to be special cased. If anything needs to be fixed, I would vote for fixing Shout. The syntax is legal, and to me it intuitively looks like it *should* be legal. On the other hand, adding some whitespace between the vertical bars is a good idea for readability, even if it is not a necessary part of the syntax. So it does not bother me if Shout complains about the missing whitespace. But I have to admit that it is confusing if Shout displays an apparent syntax error when in fact nothing is wrong with the syntax. Dave From marcus.denker at inria.fr Tue Feb 3 08:17:49 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Tue Feb 3 08:17:55 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: Message-ID: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> > On 02 Feb 2015, at 21:47, Eliot Miranda wrote: > > Hi All, > > code as in the double bars forming the end of block arguments and the beginning of block temporaries in > This is fixed in Pharo4 (I think we did that in Pharo3 already): In general, I really am convinced that we should continue to reduce the number of Smalltalk parsers in the system. Imagine there would be only *one*, then bugs like this would never happen, we would have less code to maintain and every improvement would benefit directly all subsystems that use the Parser or the AST. We already did that for the tools (RB) and the Compiler. We use the handwritten RBParser for now (I would like to use PetitParser?). The next would be to replace the Shout Parser+Tokenstream? we already in all tools create an AST as soon as you select a method anyway. (the is for per-AST-Node Navigation + the ?suggestions? menu). RBParser already has #parseFaultyMethod:, this means it can generate an AST even for incomplete input (with an error node). e.g. you can parse the expression ?1+?: There is already a SHRBTextStyler which uses it, we should finish that and replace the Shout parser. Marcus -------------- next part -------------- Skipped content of type multipart/related From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 3 10:55:00 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 3 10:59:58 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <44E2F928-7C73-46B4-B74B-715C603CC62B@freudenbergs.de> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <44E2F928-7C73-46B4-B74B-715C603CC62B@freudenbergs.de> Message-ID: <1422960900186-4803356.post@n4.nabble.com> Let me sum up the facts: - There is no implementor of #hostWindowExtent: in the Trunk. - DisplayScreen >> #depth:width:height:fullscreen: uses primitive 92, which is not properly supported on all platforms but seems to work under Windows. - There is a DisplayHostWindow and some HostWindowProxy subclasses in 'Graphics-External-Ffenestri', which seem to provide that feature I am looking for. I guess, Bert, you referred to that last point. Yes, this is in the Trunk. :) Now, I have to find out more about this concept of host windows in Squeak, which I did not know about. The following code, as proposed by Tim, works fine for me: HostWindowProxy new primitiveWindowSize: 1 x: 800 y: 600. Although, I find this API kind of inconvenient, remembering that my starting point was to change the #extent of ActiveWorld programmatically. ;) Thank you! Best, Marcel -- View this message in context: http://forum.world.st/How-to-change-ActiveWorld-extent-resp-host-window-size-programmatically-tp4803109p4803356.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Feb 3 11:07:21 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 11:07:22 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.757.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.757.mcz ==================== Summary ==================== Name: Morphic-mt.757 Author: mt Time: 3 February 2015, 12:06:47.624 pm UUID: 584dd819-8f9d-0e4a-a0cc-9449a4180066 Ancestors: Morphic-cmm.756 Let CMD+. use the current ToolSet to open the debugger. This is now consistent with the way exceptions do it. =============== Diff against Morphic-cmm.756 =============== Item was changed: ----- Method: MorphicProject>>interruptName:preemptedProcess: (in category 'utilities') ----- interruptName: labelString preemptedProcess: theInterruptedProcess "Create a Notifier on the active scheduling process with the given label." | preemptedProcess projectProcess | ActiveHand ifNotNil:[ActiveHand interrupted]. ActiveWorld := World. "reinstall active globals" ActiveHand := World primaryHand. ActiveHand interrupted. "make sure this one's interrupted too" ActiveEvent := nil. projectProcess := self uiProcess. "we still need the accessor for a while" preemptedProcess := theInterruptedProcess ifNil: [Processor preemptedProcess]. "Only debug preempted process if its priority is >= projectProcess' priority" preemptedProcess priority < projectProcess priority ifTrue:[preemptedProcess := projectProcess]. preemptedProcess suspend. + ToolSet interrupt: preemptedProcess label: labelString.! - Debugger openInterrupt: labelString onProcess: preemptedProcess - ! From bert at freudenbergs.de Tue Feb 3 12:49:48 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 3 12:53:29 2015 Subject: [squeak-dev] Re: How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <1422960900186-4803356.post@n4.nabble.com> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <44E2F928-7C73-46B4-B74B-715C603CC62B@freudenbergs.de> <1422960900186-4803356.post@n4.nabble.com> Message-ID: <4E6A1BFF-57EE-4A31-B309-95844C1DE7E3@freudenbergs.de> > On 03.02.2015, at 11:55, Marcel Taeumel wrote: > > HostWindowProxy new primitiveWindowSize: 1 x: 800 y: 600. The method I was suggesting uses the exact same primitive. I'm away from my computer so I can't check, but I'm almost certain it's there. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/8b70bbe4/smime.bin From craig at netjam.org Tue Feb 3 13:38:45 2015 From: craig at netjam.org (Craig Latta) Date: Tue Feb 3 13:38:55 2015 Subject: [squeak-dev] re: New Cog VMs available In-Reply-To: References: Message-ID: > > ARMv6 stack/v3 and stack/spur VMs updated accordingly. > > We?ll soon be adding ARMv7 quadcore Pi support - > http://www.raspberrypi.org/raspberry-pi-2-on-sale/ > > I?ve been using one for some time now and it is certainly nicely > faster. The multiple cores make quite a difference to overall system > performance even if Squeak can?t directly take advantage. The memory > interface seems faster too. Sweet! :) -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From herbertkoenig at gmx.net Tue Feb 3 13:49:54 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Tue Feb 3 13:49:57 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess Message-ID: <54D0D202.7030408@gmx.net> Hi, I start external OS processes via the class side method command: The returned instances correctly show runState #complete but the instances won't get garbage collected. Pointer Finder gets me ThisOSProvess allMyChildren. I start the external program every few seconds so the instances accumulate. So should I manually send unregisterChildProcess: or should I reuse one instance of ExternalUnixOSProcess via repeated forkChild to restart the program? Or something completely different? Thanks, Herbert From eliot.miranda at gmail.com Tue Feb 3 15:18:29 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 15:18:34 2015 Subject: [squeak-dev] ClassBuilder update:to: broken with Spur (Eliot ?) In-Reply-To: <54CF7F62.2000109@zogotounga.net> References: <54CF7F62.2000109@zogotounga.net> Message-ID: <1914DB58-ABA3-4719-A7F2-25FCD7D6DDD5@gmail.com> Hi all, I had failed to include a key change to make this work: On Feb 3, 2015, at 2:29 AM, St?phane Rollandin wrote: >> first I think I missed an essential modification. Find attached the key >> version of ClassDescription>>updateInstances:from:isMeta:. > > That did the trick ! No errors anymore, thanks ! > > Stef Eliot (phone) On Feb 2, 2015, at 5:45 AM, St?phane Rollandin wrote: > Hello, > > In order to load muO in the latest Spur image, I had to reintroduce the garbageCollect that has been deleted from method #update:to: in ClassBuilder. > > There is a verbose discussion in both the previous and current implementations of this methods. > > From nice 3/10/2013, we read (talking about the Smalltalk garbageCollect bit): > > "Warning: Read this before you even think about removing the GC. Yes, it slows us down. Quite heavily if you have a large image. However, there's no good and simple alternative here, since unfortunately, #become: does change class pointers. What happens is that after the above become all of the instances of the old class will have a class pointer identifying them as instances of newClass. If we get our hands on any of these instances we will break immediately since their expected instance layout (that of its class, e.g., newClass) will not match their actual instance layout (that of oldClass). And getting your hands on any of those instances is really simple - just reshaping one class two times in rapid succession will do it. Reflection techniques, interrupts, etc. will only add to this problem. In the case of Metaclass things get even worse since when we recompile the entire class hierarchy we will recompile both, Metaclass and its instances (and some of its instances will have the old and some the new layout). > > The only easy solution to this problem would be to 'fix up' the class pointers of the old instances to point to the old class (using primitiveChangeClassTo:). But this won't work either - as we do a one-way become we would have to search the entire object memory for the oldClass and couldn't even clearly identify it unless we give it some 'special token' which sounds quite error-prone. If you really need to get rid of the GC here are some alternatives: > > On the image level, one could create a copy of the oldClass before becoming it into the new class and, after becoming it, 'fix up' the old instances. That would certainly work but it sounds quite complex, as we need to make sure we're not breaking any of the superclass/subclass meta/non-meta class variants. > > Alternatively, fix up #becomeForward on the VM-level to 'dump the source objects' of #become. This would be quite doable (just 'convert' them into a well known special class such as bitmap) yet it has problems if (accidentally or not) one of the objects in #become: appears on 'both sides of the fence' (right now, this will work ... in a way ... even though the consequences are unclear). > > Another alternative is to provide a dedicated primitive for this (instead of using it implicitly in become) which would allow us to dump all the existing instances right here. This is equivalent to a more general primitiveChangeClassTo: and might be worthwhile but it would likely have to keep in mind the differences between bits and pointer thingies etc. > > Since all of the alternatives seem rather complex and magical compared to a straight-forward GC it seems best to stick with the GC solution for now. If someone has a real need to fix this problem, that person will likely be motivated enough to check out the alternatives. Personally I'd probably go for #1 (copy the old class and remap the instances to it) since it's a solution that could be easily reverted from within the image if there's any problem with it." > > > In the current version we read: > > "eem 5/31/2014 07:22 At this point there used to be a garbage collect whose purpose was to ensure no old instances existed after the becomeForward:. Without the GC it was possible to resurrect old instances using e.g. allInstancesDo:. This was because the becomeForward: updated references from the old objects to new objects but didn't destroy the old objects. But as of late 2013/early 2014 becomeForward: has been modified to free all the old objects." > > > This latest statement may not hold true, since I could not load muO due to "Metaclasses can only have one instance" errors (originating in ClassDescription>>#updateInstances:from:isMeta:. > > > Stef > > From aldeveron at graffiti.net Tue Feb 3 15:20:08 2015 From: aldeveron at graffiti.net (JohnReed Maffeo) Date: Tue Feb 3 15:20:10 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <54D0D202.7030408@gmx.net> References: <54D0D202.7030408@gmx.net> Message-ID: > Sent: Tuesday, February 03, 2015 at 6:49 AM > From: "Herbert K?nig" > To: "The general-purpose Squeak developers list" > Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess > > Hi, > > I start external OS processes via the class side method command: > The returned instances correctly show runState #complete but the > instances won't get garbage collected. > Pointer Finder gets me ThisOSProvess allMyChildren. > > I start the external program every few seconds so the instances accumulate. > > So should I manually send unregisterChildProcess: or should I reuse one > instance of ExternalUnixOSProcess via repeated forkChild to restart the > program? Or something completely different? > > Thanks, > > Herbert David T. Lewis wrote to the beginners list, "Just an FYI - I just made some updates to PipeableOSProcess class>>command: so that it will do a better job of cleaning up pipe handles. You'll still need to keep an eye out for pipe handle leaks, but expressions like this should now close all pipes after processing is completed: (PipeableOSProcess command: '/bin/echo this is a test') output The updates are in the latest version of CommandShell on SqueakSource." jrm From commits at source.squeak.org Tue Feb 3 16:15:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 16:15:20 2015 Subject: [squeak-dev] The Trunk: ST80-cmm.176.mcz Message-ID: Chris Muller uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-cmm.176.mcz ==================== Summary ==================== Name: ST80-cmm.176 Author: cmm Time: 3 February 2015, 10:14:55.973 am UUID: fa91361a-ca79-4c9a-8106-be54f2d641bd Ancestors: ST80-bf.175 - Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents. =============== Diff against ST80-bf.175 =============== Item was changed: ----- Method: ParagraphEditor>>compareToClipboard (in category 'menu messages') ----- compareToClipboard + "If any text is selected, present the modifications that would be made to it if the clipboard contents were pasted over it. If no text is selected, present the differences betwen the entire pane's contents and the clipboard text." + | subjectText proposedText | + subjectText := self selection string ifEmpty: [ paragraph text string ]. + proposedText := self clipboardText string. + subjectText = proposedText ifTrue: [^ self inform: 'Exact match']. + (StringHolder new + textContents: + (TextDiffBuilder + buildDisplayPatchFrom: subjectText + to: proposedText)) openLabel: 'Differences with Clipboard Text'! - "Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user." - | s1 s2 | - s1 := self clipboardText string. - s2 := paragraph text string. - s1 = s2 ifTrue: [^ self inform: 'Exact match']. - - (StringHolder new textContents: - (TextDiffBuilder buildDisplayPatchFrom: s1 to: s2)) - openLabel: 'Comparison to Clipboard Text'! From herbertkoenig at gmx.net Tue Feb 3 16:35:45 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Tue Feb 3 16:35:47 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: References: <54D0D202.7030408@gmx.net> Message-ID: <54D0F8E1.6050800@gmx.net> Hi JohnReed, thanks for your hint but PipeableOSProcess is in a different class hierarchy than ExternalUnixOSProcess. I updated to the latest versions of OSProcess and CommandShell and it doesn't help. I think I use it the wrong way. Do you know of documentation other than the examples in the code? Cheers, Herbert Am 03.02.2015 um 16:20 schrieb JohnReed Maffeo: >> Sent: Tuesday, February 03, 2015 at 6:49 AM >> From: "Herbert K?nig" >> To: "The general-purpose Squeak developers list" >> Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess >> >> Hi, >> >> I start external OS processes via the class side method command: >> The returned instances correctly show runState #complete but the >> instances won't get garbage collected. >> Pointer Finder gets me ThisOSProvess allMyChildren. >> >> I start the external program every few seconds so the instances accumulate. >> >> So should I manually send unregisterChildProcess: or should I reuse one >> instance of ExternalUnixOSProcess via repeated forkChild to restart the >> program? Or something completely different? >> >> Thanks, >> >> Herbert > David T. Lewis wrote to the beginners list, > "Just an FYI - I just made some updates to PipeableOSProcess class>>command: > so that it will do a better job of cleaning up pipe handles. You'll still need > to keep an eye out for pipe handle leaks, but expressions like this should now > close all pipes after processing is completed: > > (PipeableOSProcess command: '/bin/echo this is a test') output > > The updates are in the latest version of CommandShell on SqueakSource." > > > jrm > From herbertkoenig at gmx.net Tue Feb 3 17:12:02 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Tue Feb 3 17:12:04 2015 Subject: [squeak-dev] Bug in OSProcess>>unregisterChildProcess? Message-ID: <54D10162.5080201@gmx.net> Hi, shouldn't UnixProcess>>unregisterChildProcess: removeKey: anOSProcess pid instead of: removeKey: self pid? There are no senders of this message but at least with this change I can get rid of the instances of ExternalUnixOSProcess my problem from my other post. Which still leaves the question if reusing one ExternalUnixOSProcess would be more appropriate. Cheers, Herbert From marcus.denker at inria.fr Tue Feb 3 17:36:44 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Tue Feb 3 17:36:50 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> Message-ID: <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> > On 03 Feb 2015, at 09:17, Marcus Denker wrote: > > >> On 02 Feb 2015, at 21:47, Eliot Miranda > wrote: >> >> Hi All, >> >> code as in the double bars forming the end of block arguments and the beginning of block temporaries in >> > > This is fixed in Pharo4 (I think we did that in Pharo3 already): > I should search the issue in the issue tracker? it seems to be Pharo4, so just 1296 closed issues to check there? I will search for it. Another question: In the code I saw. ReadOnlyVariableBinding. I removed that in Pharo relatively early as it was not used: half of the classes were stored that binding (old ones) all newer ones where just associations. The code to make a binding "read only" was never called. Is this now used in Squeak? Is it worth the complexity? Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/64155988/attachment.htm From marcus.denker at inria.fr Tue Feb 3 17:48:12 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Tue Feb 3 17:48:19 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: > On 03 Feb 2015, at 18:36, Marcus Denker wrote: > > >> On 03 Feb 2015, at 09:17, Marcus Denker > wrote: >> >> >>> On 02 Feb 2015, at 21:47, Eliot Miranda > wrote: >>> >>> Hi All, >>> >>> code as in the double bars forming the end of block arguments and the beginning of block temporaries in >>> >> >> This is fixed in Pharo4 (I think we did that in Pharo3 already): >> > I should search the issue in the issue tracker? it seems to be Pharo4, so just 1296 closed issues to check there? > I will search for it. > It seems to be this one: https://pharo.fogbugz.com/f/cases/14630/Pipes-method-highlighting integrated in Pharo4 update #420 Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/3c78bbf5/attachment.htm From leves at elte.hu Tue Feb 3 17:51:24 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 3 17:51:28 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: On Tue, 3 Feb 2015, Marcus Denker wrote: > > On 03 Feb 2015, at 09:17, Marcus Denker wrote: > > > On 02 Feb 2015, at 21:47, Eliot Miranda wrote: > > Hi All, > ? ? code as in the double bars forming the end of block arguments and the beginning of block temporaries in > > > This is fixed in Pharo4 (I think we did that in Pharo3 already): > > I should search the issue in the issue tracker? it seems to be Pharo4, so just?1296 closed issues to check there? > I will search for it. > > Another question: In the code I saw. ReadOnlyVariableBinding. I removed that in Pharo relatively early as it was not used: > half of the classes?were stored that binding (old ones) all newer ones where just associations. > The code to make a?binding "read only" was never called. > > Is this now used in Squeak? Is it worth the complexity? Squeak doesn't use ReadOnlyVariableBinding anymore. The bindings of classes are instances of the ClassBinding class. Without using separate class it's a bit cumbersome (and less OO) to decide if an assignment to a global variable should be allowed or not. E.g.: Foo := 1. should work if Foo is a global, but not a behavior. It should raise an error if it's a behavior. Levente > > Marcus > > From eliot.miranda at gmail.com Tue Feb 3 18:01:51 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 18:01:54 2015 Subject: [squeak-dev] trunk update screwup Message-ID: Hi All, I've screwed up and somehow managed to create an update with the same number as a previous one. You'll see in trunk update update-eem.295.mcm update-ul.295.mcm and in update.spur update.spur-eem.295.mcm update.spur-ul.295.mcm I don't kno how I did this but can some kind authorised soul rename update-eem.295.mcm => update-eem.296.mcm update.spur-eem.295.mcm => update.spur-eem.296.mcm This is playing havoc with updates... -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/33adcbe6/attachment.htm From eliot.miranda at gmail.com Tue Feb 3 18:06:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 18:06:11 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: Hi Marcus, thanks! When I visit the fogbugz page there's a line that says "slice in inbox" but no link to any file containing the slice I can see. How do I track down the slice file itself? On Tue, Feb 3, 2015 at 9:48 AM, Marcus Denker wrote: > > On 03 Feb 2015, at 18:36, Marcus Denker wrote: > > > On 03 Feb 2015, at 09:17, Marcus Denker wrote: > > > On 02 Feb 2015, at 21:47, Eliot Miranda wrote: > > Hi All, > > code as in the double bars forming the end of block arguments and the > beginning of block temporaries in > > > This is fixed in Pharo4 (I think we did that in Pharo3 already): > > I should search the issue in the issue tracker? it seems to be Pharo4, so > just 1296 closed issues to check there? > I will search for it. > > It seems to be this one: > > https://pharo.fogbugz.com/f/cases/14630/Pipes-method-highlighting > > integrated in Pharo4 update #420 > > Marcus > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/5d87ec84/attachment.htm From marcus.denker at inria.fr Tue Feb 3 18:09:34 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Tue Feb 3 18:09:36 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: On Tue, Feb 3, 2015 at 7:06 PM, Eliot Miranda wrote: > Hi Marcus, > > thanks! When I visit the fogbugz page there's a line that says "slice > in inbox" but no link to any file containing the slice I can see. How do I > track down the slice file itself? > > The slice has the issue number as part of it's name. So you can just search for that in the inbox. To the the changes, sometimes I just download the version one before integration ( 40 #419 here) from http://files.pharo.org/image/40/ and do a merge there. Marcus > On Tue, Feb 3, 2015 at 9:48 AM, Marcus Denker > wrote: > >> >> On 03 Feb 2015, at 18:36, Marcus Denker wrote: >> >> >> On 03 Feb 2015, at 09:17, Marcus Denker wrote: >> >> >> On 02 Feb 2015, at 21:47, Eliot Miranda wrote: >> >> Hi All, >> >> code as in the double bars forming the end of block arguments and the >> beginning of block temporaries in >> >> >> This is fixed in Pharo4 (I think we did that in Pharo3 already): >> >> I should search the issue in the issue tracker? it seems to be Pharo4, so >> just 1296 closed issues to check there? >> I will search for it. >> >> It seems to be this one: >> >> https://pharo.fogbugz.com/f/cases/14630/Pipes-method-highlighting >> >> integrated in Pharo4 update #420 >> >> Marcus >> > > > > -- > best, > Eliot > -- -- Marcus Denker -- denker@acm.org http://www.marcusdenker.de -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/fa715f8a/attachment.htm From eliot.miranda at gmail.com Tue Feb 3 18:17:13 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 18:17:15 2015 Subject: [squeak-dev] Looking for a volunteer to help with DataStream on Spur Message-ID: Hi All, Spur adds two new immediate classes, Character and SmallFloat64. It also adds 61-bit SmallIntegers in 64-bits. DataStream/ReferenceStream/SmartRefStream are all affected by this. e.g. ReferenceStream testWith: $a fails on 32-bit and 64-bit Spur. ReferenceStream testWith: SmallInteger maxVal fails (silently, to be fixed soon) on 64-bit Spur. Is anyone kind enough and motivated enough to give this code some love and at least make it work for 32-bit Spur => 32-bit Spur 64-bit Spur => 64-bit Spur but also hopefully for 32-bit Spur <=> 64-bit Spur 32-bit V3 => 32-bit Spur 32-bit V3 => 64-bit Spur ? On Tue, Feb 3, 2015 at 8:59 AM, St?phane Rollandin wrote: > Yes. Can you send me a pair of doits for me to test this, one I can run >> in v3 and one I can run in Spur? >> > > I'm trying to set-up a faulty expression, but it is not so easy. > > Meanwhile I stumbled upon a similar bug: > > $a asReferenceStream reset fileInObjectAndCode > > The above succeeds in V3 and raises an error in Spur. Same reason: > basicNew being sent to Character. > > > But I'n curious, why codePoint: rather than >> >> createFrom: aSmartRefStream size: varsOnDisk version: instVarList >> >> ^ self value: instVarList first >> >> ? >> > > Well I got used to codePoint: ... Also value: has a lot more implementors > and senders and does not mean much by itself. Actually I never thought > about this. > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/247ac436/attachment.htm From commits at source.squeak.org Tue Feb 3 18:22:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 18:22:57 2015 Subject: [squeak-dev] The Trunk: System-eem.702.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.702.mcz ==================== Summary ==================== Name: System-eem.702 Author: eem Time: 3 February 2015, 10:22:27.685 am UUID: b07f9f90-735b-4389-b13f-9ce95be674c2 Ancestors: System-eem.701 Make DataStream class>>testWith: compare the result if #= doesn't default to #== (or at least doesn't default to Object's#=) =============== Diff against System-eem.701 =============== Item was changed: ----- Method: DataStream class>>testWith: (in category 'as yet unclassified') ----- testWith: anObject "As a test of DataStream/ReferenceStream, write out anObject and read it back. 11/19/92 jhm: Set the file type. More informative file name." "DataStream testWith: 'hi'" "ReferenceStream testWith: 'hi'" | file result | file := FileStream fileNamed: (self name, ' test'). file binary. (self on: file) nextPut: anObject. file close. file := FileStream fileNamed: (self name, ' test'). file binary. result := (self on: file) next. file close. + (anObject class whichClassIncludesSelector: #=) ifFalse: + [self assert: result = anObject]. + ^result! - ^ result! From commits at source.squeak.org Tue Feb 3 18:24:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 18:24:38 2015 Subject: [squeak-dev] The Trunk: System-eem.703.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.703.mcz ==================== Summary ==================== Name: System-eem.703 Author: eem Time: 3 February 2015, 10:24:10.335 am UUID: 749cbe08-4cc4-4c48-92bb-55dd1d5e8c1c Ancestors: System-eem.702 Fix Homer moment =============== Diff against System-eem.702 =============== Item was changed: ----- Method: DataStream class>>testWith: (in category 'as yet unclassified') ----- testWith: anObject "As a test of DataStream/ReferenceStream, write out anObject and read it back. 11/19/92 jhm: Set the file type. More informative file name." "DataStream testWith: 'hi'" "ReferenceStream testWith: 'hi'" | file result | file := FileStream fileNamed: (self name, ' test'). file binary. (self on: file) nextPut: anObject. file close. file := FileStream fileNamed: (self name, ' test'). file binary. result := (self on: file) next. file close. + (anObject class whichClassIncludesSelector: #=) == Object ifFalse: - (anObject class whichClassIncludesSelector: #=) ifFalse: [self assert: result = anObject]. ^result! From lewis at mail.msen.com Tue Feb 3 18:37:12 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 3 18:37:14 2015 Subject: [squeak-dev] Bug in OSProcess>>unregisterChildProcess? In-Reply-To: <54D10162.5080201@gmx.net> References: <54D10162.5080201@gmx.net> Message-ID: <17647.136.2.1.105.1422988632.squirrel@webmail.msen.com> Hi Herbert, Yes for sure, that is a bug. Thanks for finding it. I'll fix it as soon as I get home tonight. Dave > Hi, > > shouldn't UnixProcess>>unregisterChildProcess: > removeKey: anOSProcess pid > instead of: > removeKey: self pid? > > There are no senders of this message but at least with this change I can > get rid of the instances of ExternalUnixOSProcess my problem from my > other post. > > Which still leaves the question if reusing one ExternalUnixOSProcess > would be more appropriate. > > Cheers, > > Herbert > From cunningham.cb at gmail.com Tue Feb 3 19:26:41 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue Feb 3 19:26:43 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: Message-ID: >>I don't kno how I did this It's quite easy. You and Levante worked off of the same ancestor and committed your work. The names mean no collision. (or, just possibly, you overwrote the number in the title while committing - I've done that, but usually with a comment instead of a number). In either case, I could see how it would cause update to be unhappy. Was ul's version an ancestor of yours, or are you skipping over it? On Tue, Feb 3, 2015 at 10:01 AM, Eliot Miranda wrote: > Hi All, > > I've screwed up and somehow managed to create an update with the same > number as a previous one. You'll see in trunk update > > update-eem.295.mcm > update-ul.295.mcm > > and in update.spur > > update.spur-eem.295.mcm > update.spur-ul.295.mcm > > I don't kno how I did this but can some kind authorised soul rename > update-eem.295.mcm => update-eem.296.mcm > update.spur-eem.295.mcm => update.spur-eem.296.mcm > > This is playing havoc with updates... > -- > best, > Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/05ce88be/attachment-0001.htm From commits at source.squeak.org Tue Feb 3 19:38:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 19:38:24 2015 Subject: [squeak-dev] The Trunk: ShoutCore-eem.43.mcz Message-ID: Eliot Miranda uploaded a new version of ShoutCore to project The Trunk: http://source.squeak.org/trunk/ShoutCore-eem.43.mcz ==================== Summary ==================== Name: ShoutCore-eem.43 Author: eem Time: 3 February 2015, 11:38:17.924 am UUID: c34f1798-fdff-4e96-b35a-9c7b1b207289 Ancestors: ShoutCore-ul.42 Port Pharo fixes for parsing " :arg || temps | " in blocks and scaled decimals. =============== Diff against ShoutCore-ul.42 =============== Item was added: + ----- Method: SHParserST80>>parsingBlockArguments (in category 'token testing') ----- + parsingBlockArguments + ^ranges notEmpty and: [ranges last type = #blockPatternArg]! Item was changed: ----- Method: SHParserST80>>scanBinary (in category 'scan') ----- scanBinary | c d | c := self currentChar. currentTokenSourcePosition := sourcePosition. currentToken := c asString. d := self nextChar. ((self isSelectorCharacter: c) or: [c == $:]) ifFalse: [^currentToken]. + (c == $: and: [d == $=]) ifTrue: " := assignment" + [currentToken := currentToken , d asString. + self nextChar. + ^currentToken]. + ((c == $|) and: [self parsingBlockArguments]) ifTrue: + [^currentToken]. + [self isSelectorCharacter: d] whileTrue: + [currentToken := currentToken , d asString. + d := self nextChar]. - (c == $: and: [d == $=]) - ifTrue: [" := assignment" - currentToken := currentToken , d asString. - self nextChar. - ^currentToken]. - [self isSelectorCharacter: d] - whileTrue: [ - currentToken := currentToken , d asString. - d := self nextChar]. ^currentToken! Item was changed: ----- Method: SHParserST80>>scanNumber (in category 'scan') ----- scanNumber | start c nc base | start := sourcePosition. self skipDigits. c := self currentChar. c == $r ifTrue: [ base := Integer readFrom: (ReadStream on: (source copyFrom: start to: sourcePosition - 1)). self peekChar == $- ifTrue:[self nextChar]. self skipBigDigits: base. c := self currentChar. c == $. ifTrue: [ (self isBigDigit: self nextChar base: base) ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipBigDigits: base]]. c := self currentChar. ('deq'includes: c) ifTrue: [ ((encodedCharSet isDigit: (nc := self nextChar)) or: [nc == $- and:[(encodedCharSet isDigit: self peekChar)]]) ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipDigits]]. c == $s ifTrue: [ + (encodedCharSet isDigit: (nc := self nextChar)) + ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]] - (encodedCharSet isDigit: self nextChar) - ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipDigits]]. currentToken := source copyFrom: start to: sourcePosition - 1. ^currentTokenSourcePosition := start]. c == $s ifTrue: [ + (encodedCharSet isDigit: (nc := self nextChar)) + ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]] - (encodedCharSet isDigit: self nextChar) - ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipDigits.]. currentToken := source copyFrom: start to: sourcePosition - 1. ^currentTokenSourcePosition := start]. c == $. ifTrue: [ (encodedCharSet isDigit: self nextChar) ifFalse: [ sourcePosition := sourcePosition - 1. currentToken := source copyFrom: start to: sourcePosition - 1. ^currentTokenSourcePosition := start] ifTrue: [self skipDigits]]. c := self currentChar. ('deq' includes: c) ifTrue: [ ((encodedCharSet isDigit: (nc := self nextChar)) or: [nc == $- and:[(encodedCharSet isDigit: self peekChar)]]) ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipDigits]]. c == $s ifTrue: [ + (encodedCharSet isDigit: (nc := self nextChar)) + ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]] - (encodedCharSet isDigit: self nextChar) - ifFalse: [sourcePosition := sourcePosition - 1] ifTrue: [self skipDigits]]. currentToken := source copyFrom: start to: sourcePosition - 1. ^currentTokenSourcePosition := start! From leves at elte.hu Tue Feb 3 19:40:18 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 3 19:40:20 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: Message-ID: Hi Eliot, On Tue, 3 Feb 2015, Eliot Miranda wrote: > Hi All, > ? ? I've screwed up and somehow managed to create an update with the same number as a previous one.? You'll see in trunk update I guess you created the new .mcm before updating your image, otherwise the version number would have get bumped automatically. > > update-eem.295.mcm > update-ul.295.mcm > > and in update.spur > > update.spur-eem.295.mcm > update.spur-ul.295.mcm > > I don't kno how I did this but can some kind authorised soul rename > update-eem.295.mcm => update-eem.296.mcm > update.spur-eem.295.mcm =>?update.spur-eem.296.mcm The Admins of The Trunk project are the members of the Squeak Oversight Board group. So you should be able to log in to source.squeak.org, and if the .mcm files are exposed to the web interface (hopefully), then you should be able to move/delete them. I think there's no rename feature. If so, the the easiest way to fix this is to reupload the eem.295 versions as eem.296, and then delete the eem.295 ones from the web interface. Levente > > This is playing havoc with updates... > --? > best,Eliot > > From commits at source.squeak.org Tue Feb 3 19:40:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 19:40:26 2015 Subject: [squeak-dev] The Trunk: ShoutTests-eem.24.mcz Message-ID: Eliot Miranda uploaded a new version of ShoutTests to project The Trunk: http://source.squeak.org/trunk/ShoutTests-eem.24.mcz ==================== Summary ==================== Name: ShoutTests-eem.24 Author: eem Time: 3 February 2015, 11:40:19.199 am UUID: c4047776-b743-4f67-96e2-e2fa2d4ec5d2 Ancestors: ShoutTests-MarcusDenker.23 This is a cut-down version of ShoutTests-MarcusDenker.23 that omits SHStyleElementTest since Squeak's Shout doesn't include SHStyleElement. ==================== Snapshot ==================== SystemOrganization addCategory: #ShoutTests! TestCase subclass: #SHParserST80Test instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ShoutTests'! !SHParserST80Test commentStamp: 'TorstenBergmann 2/12/2014 23:22' prior: 0! SUnit tests for shouts ST80 parser! ----- Method: SHParserST80Test>>d (in category 'tests-manual') ----- d "ensure that d is defined so that we don't get an #undefinedUnary token type "! ----- Method: SHParserST80Test>>e (in category 'tests-manual') ----- e "ensure that e is defined so that we don't get an #undefinedUnary token type "! ----- Method: SHParserST80Test>>q (in category 'tests-manual') ----- q "ensure that q is defined so that we don't get an #undefinedUnary token type "! ----- Method: SHParserST80Test>>r (in category 'tests-manual') ----- r "ensure that r is defined so that we don't get an #undefinedUnary token type "! ----- Method: SHParserST80Test>>s (in category 'tests-manual') ----- s "ensure that s is defined so that we don't get an #undefinedUnary token type "! ----- Method: SHParserST80Test>>testBooleanHierarchy (in category 'tests-smoke') ----- testBooleanHierarchy self verifyHierarchy: Boolean! ----- Method: SHParserST80Test>>testNumberHierarchy (in category 'tests-smoke') ----- testNumberHierarchy self verifyHierarchy: Number! ----- Method: SHParserST80Test>>testNumbers (in category 'tests') ----- testNumbers | types tokens s | s := 'x 1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1'). s := 'x -1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number). self assert: tokens = #('x' '-' '1'). s := 'x -1.1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number). self assert: tokens = #('x' '-' '1.1'). s := 'x -1.1.'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number statementSeparator). self assert: tokens = #('x' '-' '1.1' '.'). s := 'x 1.true'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number statementSeparator #true). self assert: tokens = #('x' '1' '.' 'true'). s := 'x 2r1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2r1'). s := 'x 2d1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2d1'). s := 'x 2e1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2e1'). s := 'x 2q1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2q1'). s := 'x 16r-A'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r-A'). s := 'x -16r-A'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number). self assert: tokens = #('x' '-' '16r-A'). s := 'x 16r'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r'). s := 'x 16r-'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r-'). s := 'x 16r-d'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r-d'). s := 'x 2r2'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number excessCode). self assert: tokens = #('x' '2r' '2'). s := 'x 1.'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number statementSeparator). self assert: tokens = #('x' '1' '.'). s := 'x 1yourself'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1' 'yourself'). s := 'x 1size'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1' 'size'). s := 'x 1.1size'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1.1' 'size'). s := 'x 1s'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1s'). s := 'x 1.1s'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.1s'). s := 'x 2r1e26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2r1e26'). s := 'x 16r1e-26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1e' '-' '26'). s := 'x 16r1e'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1e'). s := 'x 16r1e-1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1e' '-' '1'). s := 'x 16r1e-'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary excessCode). self assert: tokens = #('x' '16r1e' '-' ''). s := 'x 16r1.ABe20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1.ABe20'). s := 'x 16r1.ABe-20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1.ABe' '-' '20'). s := 'x 1.0e14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0e14'). s := 'x 1.0e-14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0e-14'). s := 'x 1.0e14e'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1.0e14' 'e'). "" s := 'x 2r1q26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2r1q26'). s := 'x 16r1q-26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1q-26'). s := 'x 16r1q'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '16r1' 'q'). s := 'x 16r1q-1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1q-1'). s := 'x 16r1q-'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary binary excessCode). self assert: tokens = #('x' '16r1' 'q' '-' ''). s := 'x 16r1.ABq20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1.ABq20'). s := 'x 16r1.ABq-20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1.ABq-20'). s := 'x 1.0q14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0q14'). s := 'x 1.0q-14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0q-14'). s := 'x 1.0q14q'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1.0q14' 'q'). "" s := 'x 2r1d26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '2r1d26'). s := 'x 16r1d-26'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1d' '-' '26'). s := 'x 16r1d'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1d'). s := 'x 16r1d-1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1d' '-' '1'). s := 'x 16r1d-'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary excessCode). self assert: tokens = #('x' '16r1d' '-' ''). s := 'x 16r1.ABd20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '16r1.ABd20'). s := 'x 16r1.ABd-20'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number). self assert: tokens = #('x' '16r1.ABd' '-' '20'). s := 'x 1.0d14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0d14'). s := 'x 1.0d-14'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number). self assert: tokens = #('x' '1.0d-14'). s := 'x 1.0d14d'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number unary). self assert: tokens = #('x' '1.0d14' 'd'). "" s := 'x -1.1e-2'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number ). self assert: tokens = #('x' '-' '1.1e-2'). "only first - is separate token !!" s := 'x -16r-1.0e-2'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary #- number binary number). self assert: tokens = #('x' '-' '16r-1.0e' '-' '2'). "only first - is separate token !!" s := 'x 1-1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary number ). self assert: tokens = #('x' '1' '-' '1'). s := 'x 1--1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number incompleteBinary number ). self assert: tokens = #('x' '1' '--' '1'). s := 'x 1--"comment"1'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number incompleteBinary comment number ). self assert: tokens = #('x' '1' '--' '"comment"' '1'). s := 'x 1-self'. types := self tokenTypesIn: s. tokens := self tokensIn: s. self assert: types = #(patternUnary number binary self ). self assert: tokens = #('x' '1' '-' 'self'). ! ----- Method: SHParserST80Test>>testObjectClass (in category 'tests-smoke') ----- testObjectClass self verifyClass: Object! ----- Method: SHParserST80Test>>tokenTypesIn: (in category 'utilities') ----- tokenTypesIn: aString | parser ranges | parser := SHParserST80 new. ranges := parser rangesIn: aString classOrMetaClass: Object workspace: nil environment: nil. ^ranges asArray collect: [:each | each type]! ----- Method: SHParserST80Test>>tokensIn: (in category 'utilities') ----- tokensIn: aString | parser ranges | parser := SHParserST80 new. ranges := parser rangesIn: aString classOrMetaClass: Object workspace: nil environment: nil. ^ranges asArray collect: [:each | aString copyFrom: each start to: each end]! ----- Method: SHParserST80Test>>verifyClass: (in category 'utilities') ----- verifyClass: aBehavior aBehavior selectors do: [ :selector | self verifyClass: aBehavior selector: selector ] ! ----- Method: SHParserST80Test>>verifyClass:selector: (in category 'utilities') ----- verifyClass: aBehavior selector: aSymbol | ranges position types errors | ranges := SHParserST80 new rangesIn: (aBehavior sourceCodeAt: aSymbol) classOrMetaClass: aBehavior workspace: nil environment: nil. types := #(#default #invalid #excessCode #comment #unfinishedComment #'$' #character #integer #number #- #symbol #stringSymbol #literalArray #string #unfinishedString #assignment #ansiAssignment #literal #keyword #binary #unary #incompleteKeyword #incompleteBinary #incompleteUnary #undefinedKeyword #undefinedBinary #undefinedUnary #patternKeyword #patternBinary #patternUnary #self #super #true #false #nil #thisContext #return #patternArg #methodArg #blockPatternArg #blockArg #argument #blockArgColon #leftParenthesis #rightParenthesis #leftParenthesis1 #rightParenthesis1 #leftParenthesis2 #rightParenthesis2 #leftParenthesis3 #rightParenthesis3 #leftParenthesis4 #rightParenthesis4 #leftParenthesis5 #rightParenthesis5 #leftParenthesis6 #rightParenthesis6 #leftParenthesis7 #rightParenthesis7 #blockStart #blockEnd #blockStart1 #blockEnd1 #blockStart2 #blockEnd2 #blockStart3 #blockEnd3 #blockStart4 #blockEnd4 #blockStart5 #blockEnd5 #blockStart6 #blockEnd6 #blockStart7 #blockEnd7 #arrayStart #arrayEnd #arrayStart1 #arrayEnd1 #byteArrayStart #byteArrayEnd #byteArrayStart1 #byteArrayEnd1 #leftBrace #rightBrace #cascadeSeparator #statementSeparator #externalCallType #externalCallTypePointerIndicator #primitiveOrExternalCallStart #primitiveOrExternalCallEnd #methodTempBar #blockTempBar #blockArgsBar #primitive #externalFunctionCallingConvention #module #blockTempVar #blockPatternTempVar #instVar #workspaceVar #undefinedIdentifier #incompleteIdentifier #tempVar #patternTempVar #poolConstant #classVar #globalVar #pragmaKeyword #pragmaUnary #pragmaBinary) asIdentitySet. errors := #(#excessCode #unfinishedComment #unfinishedString) asIdentitySet. position := 0. ranges do: [ :each | self assert: 1 <= each length description: 'empty range'. self assert: position <= each start description: 'overlapping range'. self assert: each start <= each end description: 'empty range'. self assert: (types includes: each type) description: 'unknown type ' , each type. self deny: (errors includes: each type) description: 'error type ' , each type. position := each end ]! ----- Method: SHParserST80Test>>verifyHierarchy: (in category 'utilities') ----- verifyHierarchy: aBehavior aBehavior withAllSubclassesDo: [ :class | self verifyClass: class; verifyClass: class class ]! From eliot.miranda at gmail.com Tue Feb 3 19:41:47 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 19:41:49 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: Message-ID: On Tue, Feb 3, 2015 at 11:26 AM, Chris Cunningham wrote: > >>I don't kno how I did this > > It's quite easy. You and Levante worked off of the same ancestor and > committed your work. The names mean no collision. (or, just possibly, you > overwrote the number in the title while committing - I've done that, but > usually with a comment instead of a number). > > In either case, I could see how it would cause update to be unhappy. Was > ul's version an ancestor of yours, or are you skipping over it? > Looking at the version numbers, Levente's comes first. > > On Tue, Feb 3, 2015 at 10:01 AM, Eliot Miranda > wrote: > >> Hi All, >> >> I've screwed up and somehow managed to create an update with the same >> number as a previous one. You'll see in trunk update >> >> update-eem.295.mcm >> update-ul.295.mcm >> >> and in update.spur >> >> update.spur-eem.295.mcm >> update.spur-ul.295.mcm >> >> I don't kno how I did this but can some kind authorised soul rename >> update-eem.295.mcm => update-eem.296.mcm >> update.spur-eem.295.mcm => update.spur-eem.296.mcm >> >> This is playing havoc with updates... >> -- >> best, >> Eliot >> >> >> >> > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/5ab35f79/attachment.htm From eliot.miranda at gmail.com Tue Feb 3 19:44:14 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 19:44:17 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: Message-ID: Hi Levente, On Tue, Feb 3, 2015 at 11:40 AM, Levente Uzonyi wrote: > Hi Eliot, > > On Tue, 3 Feb 2015, Eliot Miranda wrote: > > Hi All, >> I've screwed up and somehow managed to create an update with the same >> number as a previous one. You'll see in trunk update >> > > I guess you created the new .mcm before updating your image, otherwise the > version number would have get bumped automatically. > > >> update-eem.295.mcm >> update-ul.295.mcm >> >> and in update.spur >> >> update.spur-eem.295.mcm >> update.spur-ul.295.mcm >> >> I don't kno how I did this but can some kind authorised soul rename >> update-eem.295.mcm => update-eem.296.mcm >> update.spur-eem.295.mcm => update.spur-eem.296.mcm >> > > The Admins of The Trunk project are the members of the Squeak Oversight > Board group. So you should be able to log in to source.squeak.org, and if > the .mcm files are exposed to the web interface (hopefully), then you > should be able to move/delete them. > I'm trying to login with my trunk credentials but am rebuffed. > I think there's no rename feature. If so, the the easiest way to fix this > is to reupload the eem.295 versions as eem.296, and then delete the eem.295 > ones from the web interface. OK, will do. Once I can login. David, any help there? > > > Levente > > > >> This is playing havoc with updates... >> -- >> best,Eliot >> >> > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/bc55586e/attachment.htm From eliot.miranda at gmail.com Tue Feb 3 19:45:37 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 19:45:39 2015 Subject: [squeak-dev] adding a package to trunk... Message-ID: Hi All, just to confirm... I'd like to add some tests for Shout to trunk. How's that done? Does it need a configuration? -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/f7c53bc5/attachment.htm From leves at elte.hu Tue Feb 3 19:49:19 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 3 19:49:23 2015 Subject: [squeak-dev] adding a package to trunk... In-Reply-To: References: Message-ID: Hi Eliot, First upload a version of the new package, then upload a new MC configuration which includes the package. Levente On Tue, 3 Feb 2015, Eliot Miranda wrote: > Hi All, > ? ? just to confirm... I'd like to add some tests for Shout to trunk.? How's that done?? Does it need a configuration? > > -- > best,Eliot > > From commits at source.squeak.org Tue Feb 3 20:07:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 20:07:19 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.603.mcz ==================== Summary ==================== Name: Collections-eem.603 Author: eem Time: 3 February 2015, 12:06:59.618 pm UUID: 6521c82f-d8de-4c07-a754-3bc3a8667746 Ancestors: Collections-mt.602 Three fewer uses of isKindOf: =============== Diff against Collections-mt.602 =============== Item was changed: ----- Method: Dictionary>>= (in category 'comparing') ----- = aDictionary "Two dictionaries are equal if (a) they are the same 'kind' of thing. (b) they have the same set of keys. (c) for each (common) key, they have the same value" self == aDictionary ifTrue: [ ^ true ]. + aDictionary isDictionary ifFalse: [^false]. - (aDictionary isKindOf: Dictionary) ifFalse: [^false]. self size = aDictionary size ifFalse: [^false]. self associationsDo: [:assoc| (aDictionary at: assoc key ifAbsent: [^false]) = assoc value ifFalse: [^false]]. ^true ! Item was changed: ----- Method: SequenceableCollection>>hasEqualElements: (in category 'comparing') ----- hasEqualElements: otherCollection "Answer whether the receiver's size is the same as otherCollection's size, and each of the receiver's elements equal the corresponding element of otherCollection. This should probably replace the current definition of #= ." | size | + otherCollection isSequenceable ifFalse: [^ false]. - (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ false]. (size := self size) = otherCollection size ifFalse: [^ false]. 1 to: size do: [:index | (self at: index) = (otherCollection at: index) ifFalse: [^ false]]. ^ true! Item was changed: ----- Method: String>>subStrings: (in category 'converting') ----- subStrings: separators "Answer an array containing the substrings in the receiver separated by the elements of separators." | char result sourceStream subString | #Collectn. "Changed 2000/04/08 For ANSI protocol." + (separators isString or:[separators allSatisfy: [:element | element isCharacter]]) ifFalse: + [^ self error: 'separators must be Characters.']. - (separators isString or:[separators allSatisfy: [:element | element isKindOf: Character]]) - ifFalse: [^ self error: 'separators must be Characters.']. sourceStream := ReadStream on: self. result := OrderedCollection new. subString := String new. [sourceStream atEnd] whileFalse: [char := sourceStream next. (separators includes: char) ifTrue: [subString notEmpty ifTrue: [result add: subString copy. subString := String new]] ifFalse: [subString := subString , (String with: char)]]. subString notEmpty ifTrue: [result add: subString copy]. ^ result asArray! From lewis at mail.msen.com Tue Feb 3 20:08:09 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 3 20:08:10 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: Message-ID: <53643.136.2.1.105.1422994089.squirrel@webmail.msen.com> > >> I think there's no rename feature. If so, the the easiest way to fix >> this >> is to reupload the eem.295 versions as eem.296, and then delete the >> eem.295 >> ones from the web interface. > > > OK, will do. Once I can login. David, any help there? > I am way behind on email. You want me to delete update-eem.295 from trunk, right? Dave From eliot.miranda at gmail.com Tue Feb 3 20:15:08 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 20:15:12 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: <53643.136.2.1.105.1422994089.squirrel@webmail.msen.com> References: <53643.136.2.1.105.1422994089.squirrel@webmail.msen.com> Message-ID: On Tue, Feb 3, 2015 at 12:08 PM, David T. Lewis wrote: > > > >> I think there's no rename feature. If so, the the easiest way to fix > >> this > >> is to reupload the eem.295 versions as eem.296, and then delete the > >> eem.295 > >> ones from the web interface. > > > > > > OK, will do. Once I can login. David, any help there? > > > > I am way behind on email. You want me to delete update-eem.295 from trunk, > right? > and update.spur-eem.295, yes. Or, tell me how to login to source.squeak.org (my trunk credentials don't work) and I'll do it myself. Levente says all SOB members should be allowed to login but I don't know which credentials to use. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/844b73dd/attachment.htm From leves at elte.hu Tue Feb 3 20:20:12 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 3 20:20:16 2015 Subject: [squeak-dev] Incomplete deoptimization of #ifNotNil: and #ifNotNil:ifNil: Message-ID: Hi All, There's a bug in the compiler which should be easy to fix for someone familiar with the code. The following expression returns #(nil nil true true) instead of #(nil nil nil nil): { nil ifNil: [ 1 ] ifNotNil: [ 2 ]; yourself. nil ifNil: [ 1 ]; yourself. nil ifNotNil: [ 2 ]; yourself. nil ifNotNil: [ 2 ] ifNil: [ 1 ]; yourself. } The cause of the problem is that in case of #ifNotNil: and #ifNotNil:ifNil: the deoptimization doesn't clear all previously generated optimized bytecodes. E.g. in case of #ifNotNil: instead of <73> pushConstant: nil <88> dup <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 <76> pushConstant: 1 <7D> blockReturn send: ifNotNil: <87> pop send: yourself we get <73> pushConstant: nil <73> pushConstant: nil send: == <88> dup <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 <76> pushConstant: 1 <7D> blockReturn send: ifNotNil: <87> pop send: yourself It would be great to write some tests which cover all such cases (including other methods), but I'm not sure what form is the best for this. Simple tests which just verify some values? Or something that checks the generated bytecodes? Levente From leves at elte.hu Tue Feb 3 20:22:21 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 3 20:22:25 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: On Tue, 3 Feb 2015, commits@source.squeak.org wrote: > Eliot Miranda uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-eem.603.mcz > > ==================== Summary ==================== > > Name: Collections-eem.603 > Author: eem > Time: 3 February 2015, 12:06:59.618 pm > UUID: 6521c82f-d8de-4c07-a754-3bc3a8667746 > Ancestors: Collections-mt.602 > > Three fewer uses of isKindOf: > > =============== Diff against Collections-mt.602 =============== > > Item was changed: > ----- Method: Dictionary>>= (in category 'comparing') ----- > = aDictionary > "Two dictionaries are equal if > (a) they are the same 'kind' of thing. > (b) they have the same set of keys. > (c) for each (common) key, they have the same value" > > self == aDictionary ifTrue: [ ^ true ]. > + aDictionary isDictionary ifFalse: [^false]. > - (aDictionary isKindOf: Dictionary) ifFalse: [^false]. > self size = aDictionary size ifFalse: [^false]. > self associationsDo: [:assoc| > (aDictionary at: assoc key ifAbsent: [^false]) = assoc value > ifFalse: [^false]]. > ^true > > ! > > Item was changed: > ----- Method: SequenceableCollection>>hasEqualElements: (in category 'comparing') ----- > hasEqualElements: otherCollection > "Answer whether the receiver's size is the same as otherCollection's > size, and each of the receiver's elements equal the corresponding > element of otherCollection. > This should probably replace the current definition of #= ." > > | size | > + otherCollection isSequenceable ifFalse: [^ false]. > - (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ false]. This should either include an #isCollection check, or #isSequenceable should be moved up to Object. Levente > (size := self size) = otherCollection size ifFalse: [^ false]. > 1 to: size do: > [:index | > (self at: index) = (otherCollection at: index) ifFalse: [^ false]]. > ^ true! > > Item was changed: > ----- Method: String>>subStrings: (in category 'converting') ----- > subStrings: separators > "Answer an array containing the substrings in the receiver separated > by the elements of separators." > | char result sourceStream subString | > #Collectn. > "Changed 2000/04/08 For ANSI protocol." > + (separators isString or:[separators allSatisfy: [:element | element isCharacter]]) ifFalse: > + [^ self error: 'separators must be Characters.']. > - (separators isString or:[separators allSatisfy: [:element | element isKindOf: Character]]) > - ifFalse: [^ self error: 'separators must be Characters.']. > sourceStream := ReadStream on: self. > result := OrderedCollection new. > subString := String new. > [sourceStream atEnd] > whileFalse: > [char := sourceStream next. > (separators includes: char) > ifTrue: [subString notEmpty > ifTrue: > [result add: subString copy. > subString := String new]] > ifFalse: [subString := subString , (String with: char)]]. > subString notEmpty ifTrue: [result add: subString copy]. > ^ result asArray! > > > From lewis at mail.msen.com Tue Feb 3 20:29:46 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 3 20:29:47 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: References: <53643.136.2.1.105.1422994089.squirrel@webmail.msen.com> Message-ID: <5623.136.2.1.105.1422995386.squirrel@webmail.msen.com> > On Tue, Feb 3, 2015 at 12:08 PM, David T. Lewis > wrote: > >> > >> >> I think there's no rename feature. If so, the the easiest way to fix >> >> this >> >> is to reupload the eem.295 versions as eem.296, and then delete the >> >> eem.295 >> >> ones from the web interface. >> > >> > >> > OK, will do. Once I can login. David, any help there? >> > >> >> I am way behind on email. You want me to delete update-eem.295 from >> trunk, >> right? >> > > and update.spur-eem.295, yes. I am away and I cannot do any updates. I can get at the web page to delete the old file if you want, but that's all I'm able to do right now. > > Or, tell me how to login to source.squeak.org (my trunk credentials don't > work) and I'll do it myself. Levente says all SOB members should be > allowed to login but I don't know which credentials to use. I'm not sure what's wrong. The web site should accept your author initials and password, exactly as in your MC browser. The site claims that you should have access, so I'm not sure why it's not letting you in. Dave From eliot.miranda at gmail.com Tue Feb 3 20:54:08 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 3 20:54:11 2015 Subject: [squeak-dev] trunk update screwup In-Reply-To: <5623.136.2.1.105.1422995386.squirrel@webmail.msen.com> References: <53643.136.2.1.105.1422994089.squirrel@webmail.msen.com> <5623.136.2.1.105.1422995386.squirrel@webmail.msen.com> Message-ID: On Tue, Feb 3, 2015 at 12:29 PM, David T. Lewis wrote: > > On Tue, Feb 3, 2015 at 12:08 PM, David T. Lewis > > wrote: > > > >> > > >> >> I think there's no rename feature. If so, the the easiest way to fix > >> >> this > >> >> is to reupload the eem.295 versions as eem.296, and then delete the > >> >> eem.295 > >> >> ones from the web interface. > >> > > >> > > >> > OK, will do. Once I can login. David, any help there? > >> > > >> > >> I am way behind on email. You want me to delete update-eem.295 from > >> trunk, > >> right? > >> > > > > and update.spur-eem.295, yes. > > I am away and I cannot do any updates. I can get at the web page to delete > the old file if you want, but that's all I'm able to do right now. > > > > > Or, tell me how to login to source.squeak.org (my trunk credentials > don't > > work) and I'll do it myself. Levente says all SOB members should be > > allowed to login but I don't know which credentials to use. > > I'm not sure what's wrong. The web site should accept your author initials > and password, exactly as in your MC browser. The site claims that you > should have access, so I'm not sure why it's not letting you in. > got it. excuse the noise. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/be4948f4/attachment.htm From commits at source.squeak.org Tue Feb 3 20:56:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 20:56:26 2015 Subject: [squeak-dev] The Trunk: Collections.spur-eem.603.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections.spur-eem.603.mcz ==================== Summary ==================== Name: Collections.spur-eem.603 Author: eem Time: 3 February 2015, 12:55:20.24 pm UUID: 2f461b08-7ce0-4465-b532-4ad5ebe36480 Ancestors: Collections-eem.603, Collections.spur-mt.602 Collections-eem.603 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Three fewer uses of isKindOf: =============== Diff against Collections-eem.603 =============== Item was changed: ----- Method: Array>>elementsExchangeIdentityWith: (in category 'converting') ----- elementsExchangeIdentityWith: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + At the same time, all pointers to the elements of otherArray are replaced by + pointers to the corresponding elements of this array. The identityHashes remain + with the pointers rather than with the objects so that objects in hashed structures + should still be properly indexed after the mutation." - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. At the same time, all pointers to the elements of otherArray are replaced by pointers to the corresponding elements of this array. The identityHashes remain with the pointers rather than with the objects so that objects in hashed structures should still be properly indexed after the mutation." + + ec == #'bad receiver' ifTrue: + [^self error: 'receiver must be of class Array']. + ec == #'bad argument' ifTrue: + [^self error: (otherArray class == Array + ifTrue: ['arg must be of class Array'] + ifFalse: ['receiver and argument must have the same size'])]. + ec == #'inappropriate operation' ifTrue: + [^self error: 'can''t become immediates such as SmallIntegers or Characters']. + ec == #'no modification' ifTrue: + [^self error: 'can''t become immutable objects']. + ec == #'object is pinned' ifTrue: + [^self error: 'can''t become pinned objects']. + ec == #'insufficient object memory' ifTrue: + [Smalltalk garbageCollect < 1048576 ifTrue: + [Smalltalk growMemoryByAtLeast: 1048576]. + ^self elementsExchangeIdentityWith: otherArray]. + self primitiveFailed! - - otherArray class == Array ifFalse: [^ self error: 'arg must be array']. - self size = otherArray size ifFalse: [^ self error: 'arrays must be same size']. - (self anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - (otherArray anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - self with: otherArray do:[:a :b| a == b ifTrue:[^self error:'can''t become yourself']]. - - "Must have failed because not enough space in forwarding table (see ObjectMemory-prepareForwardingTableForBecoming:with:twoWay:). Do GC and try again only once" - (Smalltalk bytesLeft: true) = Smalltalk primitiveGarbageCollect - ifTrue: [^ self primitiveFailed]. - ^ self elementsExchangeIdentityWith: otherArray! Item was changed: ----- Method: Array>>elementsForwardIdentityTo: (in category 'converting') ----- elementsForwardIdentityTo: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + The identityHashes remain with the pointers rather than with the objects so that + the objects in this array should still be properly indexed in any existing hashed + structures after the mutation." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') ----- elementsForwardIdentityTo: otherArray copyHash: copyHash + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + If copyHash is true, the identityHashes remain with the pointers rather than with the + objects so that the objects in the receiver should still be properly indexed in any + existing hashed structures after the mutation. If copyHash is false, then the hashes + of the objects in otherArray remain unchanged. If you know what you're doing this + may indeed be what you want." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ==== ERROR === Error: Unrecognized class type 3 February 2015 8:56:21.71 pm VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(Character) Arguments and temporary variables: Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(Character) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeModification: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Tue Feb 3 20:57:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 20:57:07 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.701.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.701.mcz ==================== Summary ==================== Name: System.spur-eem.701 Author: eem Time: 3 February 2015, 12:55:25.315 pm UUID: c5dca3e2-c307-4408-b796-d73ce3816b42 Ancestors: System-eem.701, System.spur-eem.700 System-eem.701 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Invoke super obsolete in ObjectHistory class>>obsolete =============== Diff against System-eem.701 =============== Item was removed: - ----- Method: Object>>oopAge (in category '*system-support') ----- - oopAge - ^ ObjectHistory current ageOf: self! Item was removed: - ----- Method: Object>>oopTimestamp (in category '*system-support') ----- - oopTimestamp - ^ ObjectHistory current timestampOf: self! Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Feb 3 20:57:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 20:57:09 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.702.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.702.mcz ==================== Summary ==================== Name: System.spur-eem.702 Author: eem Time: 3 February 2015, 12:55:28.04 pm UUID: 57660ee2-37b2-4057-b7db-b7a217f5cd35 Ancestors: System-eem.702, System.spur-eem.701 System-eem.702 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Make DataStream class>>testWith: compare the result if #= doesn't default to #== (or at least doesn't default to Object's#=) =============== Diff against System-eem.702 =============== Item was removed: - ----- Method: Object>>oopAge (in category '*system-support') ----- - oopAge - ^ ObjectHistory current ageOf: self! Item was removed: - ----- Method: Object>>oopTimestamp (in category '*system-support') ----- - oopTimestamp - ^ ObjectHistory current timestampOf: self! Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Feb 3 20:57:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 20:57:13 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.703.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.703.mcz ==================== Summary ==================== Name: System.spur-eem.703 Author: eem Time: 3 February 2015, 12:55:30.455 pm UUID: 9294419a-a052-4875-aab1-8b071e430b0e Ancestors: System-eem.703, System.spur-eem.702 System-eem.703 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Fix Homer moment =============== Diff against System-eem.703 =============== Item was removed: - ----- Method: Object>>oopAge (in category '*system-support') ----- - oopAge - ^ ObjectHistory current ageOf: self! Item was removed: - ----- Method: Object>>oopTimestamp (in category '*system-support') ----- - oopTimestamp - ^ ObjectHistory current timestampOf: self! Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Feb 3 22:55:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 3 22:55:41 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150203225539.10965.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-February/007522.html Name: System-eem.701 Ancestors: System-eem.700 Invoke super obsolete in ObjectHistory class>>obsolete ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007523.html Name: Tests-eem.310 Ancestors: Tests-topa.309 Use classes for the ImageSegmentTest that don't result in an inoperative SUnit system if the test fails. Use the inactive UIManager subclasses. Also, make the test explicitly bring the classes back in, in the test. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007524.html Name: Morphic-mt.757 Ancestors: Morphic-cmm.756 Let CMD+. use the current ToolSet to open the debugger. This is now consistent with the way exceptions do it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007525.html Name: ST80-cmm.176 Ancestors: ST80-bf.175 - Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007526.html Name: System-eem.702 Ancestors: System-eem.701 Make DataStream class>>testWith: compare the result if #= doesn't default to #== (or at least doesn't default to Object's#=) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007527.html Name: System-eem.703 Ancestors: System-eem.702 Fix Homer moment ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007528.html Name: ShoutCore-eem.43 Ancestors: ShoutCore-ul.42 Port Pharo fixes for parsing " :arg || temps | " in blocks and scaled decimals. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007529.html Name: ShoutTests-eem.24 Ancestors: ShoutTests-MarcusDenker.23 This is a cut-down version of ShoutTests-MarcusDenker.23 that omits SHStyleElementTest since Squeak's Shout doesn't include SHStyleElement. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007530.html Name: Collections-eem.603 Ancestors: Collections-mt.602 Three fewer uses of isKindOf: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007531.html Name: Collections.spur-eem.603 Ancestors: Collections-eem.603, Collections.spur-mt.602 Collections-eem.603 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Three fewer uses of isKindOf: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007532.html Name: System.spur-eem.702 Ancestors: System-eem.702, System.spur-eem.701 System-eem.702 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Make DataStream class>>testWith: compare the result if #= doesn't default to #== (or at least doesn't default to Object's#=) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007533.html Name: System.spur-eem.701 Ancestors: System-eem.701, System.spur-eem.700 System-eem.701 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Invoke super obsolete in ObjectHistory class>>obsolete ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007534.html Name: System.spur-eem.703 Ancestors: System-eem.703, System.spur-eem.702 System-eem.703 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.238 Fix Homer moment ============================================= From lewis at mail.msen.com Tue Feb 3 23:50:00 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 3 23:50:01 2015 Subject: [squeak-dev] Bug in OSProcess>>unregisterChildProcess? In-Reply-To: <54D10162.5080201@gmx.net> References: <54D10162.5080201@gmx.net> Message-ID: <20150203235000.GA27170@shell.msen.com> On Tue, Feb 03, 2015 at 06:12:02PM +0100, Herbert K??nig wrote: > Hi, > > shouldn't UnixProcess>>unregisterChildProcess: > removeKey: anOSProcess pid > instead of: > removeKey: self pid? Thanks Herbert, I just added your fix to the OSProcess repository. Dave From lewis at mail.msen.com Wed Feb 4 00:01:44 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Feb 4 00:01:46 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <54D0D202.7030408@gmx.net> References: <54D0D202.7030408@gmx.net> Message-ID: <20150204000144.GB27170@shell.msen.com> On Tue, Feb 03, 2015 at 02:49:54PM +0100, Herbert K??nig wrote: > Hi, > > I start external OS processes via the class side method command: > The returned instances correctly show runState #complete but the > instances won't get garbage collected. > Pointer Finder gets me ThisOSProvess allMyChildren. > > I start the external program every few seconds so the instances accumulate. > > So should I manually send unregisterChildProcess: or should I reuse one > instance of ExternalUnixOSProcess via repeated forkChild to restart the > program? Or something completely different? All of the child processes that run in your current Squeak session (beginning when you start the image) are saved in a dictionary. This is just to make them browsable (OSProcess thisOSProcess allMyChildren). Unregistering each child process, as you suggest above, will work fine, at least after fixing the bug that you found (thank you for that, it is updated on squeaksource now). But you can also clean up all of the terminated processes like this: OSProcess thisOSProcess discardExitedChildren Or you can empty the dictionary completely: OSProcess thisOSProcess resetChildProcessDictionary I never implemented anything to automatically clean up the child process dictionary because it did not really seem necessary based on how I was using OSProcess. But for the kind of thing you are doing (restart a new process every few seconds, maybe for a long time) I can see that it might be a real problem. Do you think that this should be changed? Thanks, Dave From tim at rowledge.org Wed Feb 4 01:37:50 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 4 01:37:56 2015 Subject: [squeak-dev] Re: [Vm-dev] [Pharo-dev] New Cog VMs available In-Reply-To: <20150202200249.PP4F7.3437.root@cdptpa-web06> References: <20150202200249.PP4F7.3437.root@cdptpa-web06> Message-ID: <78309AC0-588B-4B39-8B34-E4DB61C5167F@rowledge.org> On 02-02-2015, at 12:02 PM, Douglas McPherson wrote: > > ---- tim Rowledge wrote: >> >> >> On 02-02-2015, at 9:24 AM, Douglas McPherson wrote: >> >>> ARMv6 stack/v3 and stack/spur VMs updated accordingly. >> >> We?ll soon be adding ARMv7 quadcore Pi support - >> http://www.raspberrypi.org/raspberry-pi-2-on-sale/ >> >> I?ve been using one for some time now and it is certainly nicely faster. The multiple cores make quite a difference to overall system performance even if Squeak can?t directly take advantage. The memory interface seems faster too. > > I was going to ask you about this as I saw the RPi 2 announcement today. I figured you probably already had one :) VM building seems much faster if you add -j4 to the make line in the .mvm script. It?s quite impressive to see 99% cpu utilisation on a quadcore tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother" said Pooh, as the IRS kicked his door in. From eliot.miranda at gmail.com Wed Feb 4 02:59:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 4 02:59:48 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: On Tue, Feb 3, 2015 at 12:22 PM, Levente Uzonyi wrote: > On Tue, 3 Feb 2015, commits@source.squeak.org wrote: > > Eliot Miranda uploaded a new version of Collections to project The Trunk: >> http://source.squeak.org/trunk/Collections-eem.603.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-eem.603 >> Author: eem >> Time: 3 February 2015, 12:06:59.618 pm >> UUID: 6521c82f-d8de-4c07-a754-3bc3a8667746 >> Ancestors: Collections-mt.602 >> >> Three fewer uses of isKindOf: >> >> =============== Diff against Collections-mt.602 =============== >> >> Item was changed: >> ----- Method: Dictionary>>= (in category 'comparing') ----- >> = aDictionary >> "Two dictionaries are equal if >> (a) they are the same 'kind' of thing. >> (b) they have the same set of keys. >> (c) for each (common) key, they have the same value" >> >> self == aDictionary ifTrue: [ ^ true ]. >> + aDictionary isDictionary ifFalse: [^false]. >> - (aDictionary isKindOf: Dictionary) ifFalse: [^false]. >> self size = aDictionary size ifFalse: [^false]. >> self associationsDo: [:assoc| >> (aDictionary at: assoc key ifAbsent: [^false]) = assoc >> value >> ifFalse: [^false]]. >> ^true >> >> ! >> >> Item was changed: >> ----- Method: SequenceableCollection>>hasEqualElements: (in category >> 'comparing') ----- >> hasEqualElements: otherCollection >> "Answer whether the receiver's size is the same as >> otherCollection's >> size, and each of the receiver's elements equal the corresponding >> element of otherCollection. >> This should probably replace the current definition of #= ." >> >> | size | >> + otherCollection isSequenceable ifFalse: [^ false]. >> - (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ >> false]. >> > > This should either include an #isCollection check, or #isSequenceable > should be moved up to Object. Oops. Good catch. Which would you do? I favour the latter. Levente > > > (size := self size) = otherCollection size ifFalse: [^ false]. >> 1 to: size do: >> [:index | >> (self at: index) = (otherCollection at: index) ifFalse: >> [^ false]]. >> ^ true! >> >> Item was changed: >> ----- Method: String>>subStrings: (in category 'converting') ----- >> subStrings: separators >> "Answer an array containing the substrings in the receiver >> separated >> by the elements of separators." >> | char result sourceStream subString | >> #Collectn. >> "Changed 2000/04/08 For ANSI protocol." >> + (separators isString or:[separators allSatisfy: [:element | >> element isCharacter]]) ifFalse: >> + [^ self error: 'separators must be Characters.']. >> - (separators isString or:[separators allSatisfy: [:element | >> element isKindOf: Character]]) >> - ifFalse: [^ self error: 'separators must be Characters.']. >> sourceStream := ReadStream on: self. >> result := OrderedCollection new. >> subString := String new. >> [sourceStream atEnd] >> whileFalse: >> [char := sourceStream next. >> (separators includes: char) >> ifTrue: [subString notEmpty >> ifTrue: >> [result add: >> subString copy. >> subString := >> String new]] >> ifFalse: [subString := subString , >> (String with: char)]]. >> subString notEmpty ifTrue: [result add: subString copy]. >> ^ result asArray! >> >> >> >> > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150203/3160a4b8/attachment.htm From marcus.denker at inria.fr Wed Feb 4 08:19:21 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Wed Feb 4 08:19:24 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: On Tue, Feb 3, 2015 at 6:51 PM, Levente Uzonyi wrote: > On Tue, 3 Feb 2015, Marcus Denker wrote: > > >> On 03 Feb 2015, at 09:17, Marcus Denker >> wrote: >> >> >> On 02 Feb 2015, at 21:47, Eliot Miranda >> wrote: >> >> Hi All, >> code as in the double bars forming the end of block arguments and the >> beginning of block temporaries in >> >> >> This is fixed in Pharo4 (I think we did that in Pharo3 already): >> >> I should search the issue in the issue tracker? it seems to be Pharo4, so >> just 1296 closed issues to check there? >> I will search for it. >> >> Another question: In the code I saw. ReadOnlyVariableBinding. I removed >> that in Pharo relatively early as it was not used: >> half of the classes were stored that binding (old ones) all newer ones >> where just associations. >> The code to make a binding "read only" was never called. >> >> Is this now used in Squeak? Is it worth the complexity? >> > > Squeak doesn't use ReadOnlyVariableBinding anymore. The bindings of > classes are instances of the ClassBinding class. > Without using separate class it's a bit cumbersome (and less OO) to decide > if an assignment to a global variable should be allowed or not. E.g.: > > Foo := 1. > > should work if Foo is a global, but not a behavior. It should raise an > error if it's a behavior. > > I thought this is how ReadOnlyVariableBinding was supposed to be used: classes would use it, globals not. Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150204/cca0f0fe/attachment.htm From herbertkoenig at gmx.net Wed Feb 4 10:04:06 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Wed Feb 4 10:04:10 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <20150204000144.GB27170@shell.msen.com> References: <54D0D202.7030408@gmx.net> <20150204000144.GB27170@shell.msen.com> Message-ID: <54D1EE96.8090102@gmx.net> Hi Dave, > All of the child processes that run in your current Squeak session (beginning > when you start the image) are saved in a dictionary. This is just to make > them browsable (OSProcess thisOSProcess allMyChildren). > > Unregistering each child process, as you suggest above, will work fine, at > least after fixing the bug that you found (thank you for that, it is updated > on squeaksource now). > > But you can also clean up all of the terminated processes like this: > > OSProcess thisOSProcess discardExitedChildren > > Or you can empty the dictionary completely: > > OSProcess thisOSProcess resetChildProcessDictionary thanks, these helped a lot. > process every few seconds, maybe for a long time) I can see that it might > be a real problem. Do you think that this should be changed? I have been doing embedded with scarce RAM and now I play with home automation (in a very broad sense) which is supposed to run 24/7 me being abroad and my family not programming. From this perspective my immediate instinct is to not collect the instances at all. Now that I know about the fact I prefer to remove them myself. But I'm sure other users have a different perspective on this and you might break somebody's code if you wouldn't collect them at all. I former uses I collected the processes myself (to kill them, query their state) and for that purpose wouldn't want to pick them out of a dictionary. I'm very interested in learning when this dictionary comes in handy or is needed because I see many methods referencing allMyChildren but most of them are not sent in my image so I can't find out. Cheers, Herbert From asqueaker at gmail.com Wed Feb 4 17:07:01 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 4 17:07:05 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: isSequenceable is a term that refers to a particular *kind* of Collection, a sequenceable one. Therefore, IMO, I am unable to think of any more clear and explicit way of expressing that than "isKindOf: SequenceableCollection"... On Tue, Feb 3, 2015 at 8:59 PM, Eliot Miranda wrote: > > > On Tue, Feb 3, 2015 at 12:22 PM, Levente Uzonyi wrote: >> >> On Tue, 3 Feb 2015, commits@source.squeak.org wrote: >> >>> Eliot Miranda uploaded a new version of Collections to project The Trunk: >>> http://source.squeak.org/trunk/Collections-eem.603.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Collections-eem.603 >>> Author: eem >>> Time: 3 February 2015, 12:06:59.618 pm >>> UUID: 6521c82f-d8de-4c07-a754-3bc3a8667746 >>> Ancestors: Collections-mt.602 >>> >>> Three fewer uses of isKindOf: >>> >>> =============== Diff against Collections-mt.602 =============== >>> >>> Item was changed: >>> ----- Method: Dictionary>>= (in category 'comparing') ----- >>> = aDictionary >>> "Two dictionaries are equal if >>> (a) they are the same 'kind' of thing. >>> (b) they have the same set of keys. >>> (c) for each (common) key, they have the same value" >>> >>> self == aDictionary ifTrue: [ ^ true ]. >>> + aDictionary isDictionary ifFalse: [^false]. >>> - (aDictionary isKindOf: Dictionary) ifFalse: [^false]. >>> self size = aDictionary size ifFalse: [^false]. >>> self associationsDo: [:assoc| >>> (aDictionary at: assoc key ifAbsent: [^false]) = assoc >>> value >>> ifFalse: [^false]]. >>> ^true >>> >>> ! >>> >>> Item was changed: >>> ----- Method: SequenceableCollection>>hasEqualElements: (in category >>> 'comparing') ----- >>> hasEqualElements: otherCollection >>> "Answer whether the receiver's size is the same as >>> otherCollection's >>> size, and each of the receiver's elements equal the corresponding >>> element of otherCollection. >>> This should probably replace the current definition of #= ." >>> >>> | size | >>> + otherCollection isSequenceable ifFalse: [^ false]. >>> - (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ >>> false]. >> >> >> This should either include an #isCollection check, or #isSequenceable >> should be moved up to Object. > > > Oops. Good catch. Which would you do? I favour the latter. > >> Levente >> >> >>> (size := self size) = otherCollection size ifFalse: [^ false]. >>> 1 to: size do: >>> [:index | >>> (self at: index) = (otherCollection at: index) ifFalse: >>> [^ false]]. >>> ^ true! >>> >>> Item was changed: >>> ----- Method: String>>subStrings: (in category 'converting') ----- >>> subStrings: separators >>> "Answer an array containing the substrings in the receiver >>> separated >>> by the elements of separators." >>> | char result sourceStream subString | >>> #Collectn. >>> "Changed 2000/04/08 For ANSI protocol." >>> + (separators isString or:[separators allSatisfy: [:element | >>> element isCharacter]]) ifFalse: >>> + [^ self error: 'separators must be Characters.']. >>> - (separators isString or:[separators allSatisfy: [:element | >>> element isKindOf: Character]]) >>> - ifFalse: [^ self error: 'separators must be >>> Characters.']. >>> sourceStream := ReadStream on: self. >>> result := OrderedCollection new. >>> subString := String new. >>> [sourceStream atEnd] >>> whileFalse: >>> [char := sourceStream next. >>> (separators includes: char) >>> ifTrue: [subString notEmpty >>> ifTrue: >>> [result add: >>> subString copy. >>> subString := >>> String new]] >>> ifFalse: [subString := subString , >>> (String with: char)]]. >>> subString notEmpty ifTrue: [result add: subString copy]. >>> ^ result asArray! >>> >>> >>> >> > > > > -- > best, > Eliot > > > From eliot.miranda at gmail.com Wed Feb 4 17:17:34 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 4 17:17:36 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: On Wed, Feb 4, 2015 at 9:07 AM, Chris Muller wrote: > isSequenceable is a term that refers to a particular *kind* of > Collection, a sequenceable one. > > Therefore, IMO, I am unable to think of any more clear and explicit > way of expressing that than "isKindOf: SequenceableCollection"... > self isCollection and: [self isSequenceable] is better. isKinfOf: is a) not object-oriented as it forces an argument to be in a particular hierarchy rather than having a particular interface, and b) is horribly inefficient, causing a potentially long search of an object's class hierarchy. isKindOf: doesn't just smell, it stinks. So what do you prefer Chris, making isSequenceable an Object method too, or using self isCollection and: [self isSequenceable]? I like the former because its simple, but you might have valid objections to extending Object. That's why I'm canvassing opinions. I wont stop nuking isKindOf:'s as I see them though ;-) > > On Tue, Feb 3, 2015 at 8:59 PM, Eliot Miranda > wrote: > > > > > > On Tue, Feb 3, 2015 at 12:22 PM, Levente Uzonyi wrote: > >> > >> On Tue, 3 Feb 2015, commits@source.squeak.org wrote: > >> > >>> Eliot Miranda uploaded a new version of Collections to project The > Trunk: > >>> http://source.squeak.org/trunk/Collections-eem.603.mcz > >>> > >>> ==================== Summary ==================== > >>> > >>> Name: Collections-eem.603 > >>> Author: eem > >>> Time: 3 February 2015, 12:06:59.618 pm > >>> UUID: 6521c82f-d8de-4c07-a754-3bc3a8667746 > >>> Ancestors: Collections-mt.602 > >>> > >>> Three fewer uses of isKindOf: > >>> > >>> =============== Diff against Collections-mt.602 =============== > >>> > >>> Item was changed: > >>> ----- Method: Dictionary>>= (in category 'comparing') ----- > >>> = aDictionary > >>> "Two dictionaries are equal if > >>> (a) they are the same 'kind' of thing. > >>> (b) they have the same set of keys. > >>> (c) for each (common) key, they have the same value" > >>> > >>> self == aDictionary ifTrue: [ ^ true ]. > >>> + aDictionary isDictionary ifFalse: [^false]. > >>> - (aDictionary isKindOf: Dictionary) ifFalse: [^false]. > >>> self size = aDictionary size ifFalse: [^false]. > >>> self associationsDo: [:assoc| > >>> (aDictionary at: assoc key ifAbsent: [^false]) = assoc > >>> value > >>> ifFalse: [^false]]. > >>> ^true > >>> > >>> ! > >>> > >>> Item was changed: > >>> ----- Method: SequenceableCollection>>hasEqualElements: (in category > >>> 'comparing') ----- > >>> hasEqualElements: otherCollection > >>> "Answer whether the receiver's size is the same as > >>> otherCollection's > >>> size, and each of the receiver's elements equal the > corresponding > >>> element of otherCollection. > >>> This should probably replace the current definition of #= ." > >>> > >>> | size | > >>> + otherCollection isSequenceable ifFalse: [^ false]. > >>> - (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ > >>> false]. > >> > >> > >> This should either include an #isCollection check, or #isSequenceable > >> should be moved up to Object. > > > > > > Oops. Good catch. Which would you do? I favour the latter. > > > >> Levente > >> > >> > >>> (size := self size) = otherCollection size ifFalse: [^ false]. > >>> 1 to: size do: > >>> [:index | > >>> (self at: index) = (otherCollection at: index) ifFalse: > >>> [^ false]]. > >>> ^ true! > >>> > >>> Item was changed: > >>> ----- Method: String>>subStrings: (in category 'converting') ----- > >>> subStrings: separators > >>> "Answer an array containing the substrings in the receiver > >>> separated > >>> by the elements of separators." > >>> | char result sourceStream subString | > >>> #Collectn. > >>> "Changed 2000/04/08 For ANSI protocol." > >>> + (separators isString or:[separators allSatisfy: [:element | > >>> element isCharacter]]) ifFalse: > >>> + [^ self error: 'separators must be Characters.']. > >>> - (separators isString or:[separators allSatisfy: [:element | > >>> element isKindOf: Character]]) > >>> - ifFalse: [^ self error: 'separators must be > >>> Characters.']. > >>> sourceStream := ReadStream on: self. > >>> result := OrderedCollection new. > >>> subString := String new. > >>> [sourceStream atEnd] > >>> whileFalse: > >>> [char := sourceStream next. > >>> (separators includes: char) > >>> ifTrue: [subString notEmpty > >>> ifTrue: > >>> [result add: > >>> subString copy. > >>> subString := > >>> String new]] > >>> ifFalse: [subString := subString , > >>> (String with: char)]]. > >>> subString notEmpty ifTrue: [result add: subString copy]. > >>> ^ result asArray! > >>> > >>> > >>> > >> > > > > > > > > -- > > best, > > Eliot > > > > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150204/cdfde2a4/attachment-0001.htm From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 4 17:20:05 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 4 17:25:11 2015 Subject: [squeak-dev] Re: The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: <1423070405433-4803678.post@n4.nabble.com> I vote for: "... xx isCollection and: [xx isSequenceable] ..." Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Collections-eem-603-mcz-tp4803479p4803678.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Wed Feb 4 17:36:24 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Feb 4 17:36:33 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: On 04.02.2015, at 18:17, Eliot Miranda wrote: > isKindOf: doesn't just smell, it stinks. ACK. From tim at rowledge.org Wed Feb 4 18:56:02 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 4 18:56:07 2015 Subject: [squeak-dev] Re: The Trunk: Collections-eem.603.mcz In-Reply-To: <1423070405433-4803678.post@n4.nabble.com> References: <1423070405433-4803678.post@n4.nabble.com> Message-ID: <817D1754-AF11-4961-8BDE-88D06B944E5B@rowledge.org> On 04-02-2015, at 9:20 AM, Marcel Taeumel wrote: > I vote for: > > "... xx isCollection and: [xx isSequenceable] ?" And I?d prefer a simple isSequenceableCollection over that. I don?t actually like any of them because there is almost always A Better Way(?) hidden in there somewhere, but at least a very specific method is easy to track down and replace when said better way is discovered. They?re all over the place in nuScratch but the performance improvements simply from removing multiple isKindOf: sends within large loops are well worth the slight stinkiness. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "How many Slavers does it take to change a lightbulb?? "Dunno. How susceptible are lightbulbs to telepathy?" From ma.chris.m at gmail.com Wed Feb 4 19:12:51 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Feb 4 19:12:54 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: > On Wed, Feb 4, 2015 at 9:07 AM, Chris Muller wrote: >> >> isSequenceable is a term that refers to a particular *kind* of >> Collection, a sequenceable one. >> >> Therefore, IMO, I am unable to think of any more clear and explicit >> way of expressing that than "isKindOf: SequenceableCollection"... > > > self isCollection and: [self isSequenceable] is better. isKinfOf: is a) > not object-oriented as it forces an argument to be in a particular hierarchy > rather than having a particular interface, and b) is horribly inefficient, > causing a potentially long search of an object's class hierarchy. isKindOf: > doesn't just smell, it stinks. Yes, and class-testing via #class as well, for the same reasons. But sometimes we really do want to know whether we have a _particular implementation_ of a Dictionary, not just dictionary behaviors and API's. I'm not saying I'm against your change, I'm just saying that I feel this kind of "cleaning" should be done with deliberation and careful consideration, not whimsically. Today all of the #= implementations in the system are based on type coherence, except for this one which was just changed. It's easier than it seems for semantics to be subtly changed. For example, I have several of my own dictionary implementations which do not inherit from Dictionary; but if they implement #isDictionary for a different reason, I will now get a different answer from #= depending on which I ask it; (aDictionary = theirSpecialDictionary) vs. (theirSpecialDictionary = aDictionary) might produce different results if SpecialDictionary is doing the conventional "type" check. > So what do you prefer Chris, making isSequenceable an Object method too, or > using self isCollection and: [self isSequenceable]? I like the former > because its simple, but you might have valid objections to extending Object. > That's why I'm canvassing opinions. I wont stop nuking isKindOf:'s as I see > them though ;-) I prefer the latter because its asking if its a particular sub-types require a super-type check first. I think if you want simplicity you should implement #isSequenceableCollection on Object to return the "self isCollection and: [self isSequenceable]". Because another consideration is consumption of the method namespace on Object with simple terms that then become unavailable to applications. The most egregious example I can think of is Object>>#name. It means an app implement #name without overriding the one in Object. But every app has things that have #names. There is a remote possibility that an app might want to implement the #isSequenceable for a application-specific purpose.. From asqueaker at gmail.com Wed Feb 4 20:40:25 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 4 20:40:29 2015 Subject: [squeak-dev] What is equivalence? (was: The Trunk: Collections-eem.603.mcz) Message-ID: On Wed, Feb 4, 2015 at 1:12 PM, Chris Muller wrote: >> On Wed, Feb 4, 2015 at 9:07 AM, Chris Muller wrote: >>> >>> isSequenceable is a term that refers to a particular *kind* of >>> Collection, a sequenceable one. >>> >>> Therefore, IMO, I am unable to think of any more clear and explicit >>> way of expressing that than "isKindOf: SequenceableCollection"... >> >> >> self isCollection and: [self isSequenceable] is better. isKinfOf: is a) >> not object-oriented as it forces an argument to be in a particular hierarchy >> rather than having a particular interface, and b) is horribly inefficient, >> causing a potentially long search of an object's class hierarchy. isKindOf: >> doesn't just smell, it stinks. > > Yes, and class-testing via #class as well, for the same reasons. But > sometimes we really do want to know whether we have a _particular > implementation_ of a Dictionary, not just dictionary behaviors and > API's. Eliots subStrings: change is obviously a fine improvement and I think the hasEqualElements: is too with one of Levente's suggestions. But may we scrutinize this change to Dictionary>>#= just a bit more? Everyone agrees using #isDictionary is faster and more OO and less smelly than isKindOf: Dictionary. If #isDictionary refers to particular API and behaviors, one could argue that a BTree should answer true to #isDictionary, because it has similar API and behaviors. In the context of _equivalence testing_ though, a BTree is not a Dictionary. So as long as we interpret the various #isSomeType methods as truly of *that type* (same semantics as isKindOf:), and not "similar to", then I can see no side-effects (unless someone added #isDictionary to BTree, of course). However, we may want to visit the other #= implementations elsewhere in the system too, unless this would appear to be an inconsistency producing its own odor of sorts. From leves at elte.hu Wed Feb 4 20:56:30 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Feb 4 20:56:36 2015 Subject: [squeak-dev] The Trunk: Collections-eem.603.mcz In-Reply-To: References: Message-ID: On Tue, 3 Feb 2015, Eliot Miranda wrote: > Oops.? Good catch.? Which would you do?? I favour the latter. I would not do the latter, because #isSequenceable is too general for Object. I would either add a new method - #isSequenceableCollection - or use the combination of #isCollection and #isSequenceable. Levente From leves at elte.hu Wed Feb 4 20:58:25 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Feb 4 20:58:29 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <9E871599-AEB1-489B-999D-852EF36BC58E@inria.fr> Message-ID: On Wed, 4 Feb 2015, Marcus Denker wrote: > > > On Tue, Feb 3, 2015 at 6:51 PM, Levente Uzonyi wrote: > On Tue, 3 Feb 2015, Marcus Denker wrote: > > > ? ? ? On 03 Feb 2015, at 09:17, Marcus Denker wrote: > > > ? ? ? On 02 Feb 2015, at 21:47, Eliot Miranda wrote: > > Hi All, > ? ? code as in the double bars forming the end of block arguments and the beginning of block temporaries in > > > This is fixed in Pharo4 (I think we did that in Pharo3 already): > > I should search the issue in the issue tracker? it seems to be Pharo4, so just?1296 closed issues to check there? > I will search for it. > > Another question: In the code I saw. ReadOnlyVariableBinding. I removed that in Pharo relatively early as it was not used: > half of the classes?were stored that binding (old ones) all newer ones where just associations. > The code to make a?binding "read only" was never called. > > Is this now used in Squeak? Is it worth the complexity? > > > Squeak doesn't use ReadOnlyVariableBinding anymore. The bindings of classes are instances of the ClassBinding class. > Without using separate class it's a bit cumbersome (and less OO) to decide if an assignment to a global variable should be allowed or not. E.g.: > > ? ? ? ? Foo := 1. > > should work if Foo is a global, but not a behavior. It should raise an error if it's a behavior. > > > I thought this is how ReadOnlyVariableBinding was supposed to be used: classes would use it, globals not. Probably that was the goal, but it was not implemented correctly, and the name ClassBinding fits better the use case than ReadOnlyVariableBinding. Levente > > ? ?Marcus > > > > > From leves at elte.hu Wed Feb 4 21:04:04 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Feb 4 21:04:08 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> Message-ID: A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? Levente On Tue, 3 Feb 2015, Marcus Denker wrote: > >> On 02 Feb 2015, at 21:47, Eliot Miranda wrote: >> >> Hi All, >> >> code as in the double bars forming the end of block arguments and the beginning of block temporaries in >> > > This is fixed in Pharo4 (I think we did that in Pharo3 already): > > > > > In general, I really am convinced that we should continue to reduce the number of Smalltalk parsers > in the system. Imagine there would be only *one*, then bugs like this would never happen, we would > have less code to maintain and every improvement would benefit directly all subsystems that use > the Parser or the AST. > > We already did that for the tools (RB) and the Compiler. We use the handwritten RBParser for now > (I would like to use PetitParser?). > The next would be to replace the Shout Parser+Tokenstream? we already in all tools create an AST > as soon as you select a method anyway. (the is for per-AST-Node Navigation + the ?suggestions? menu). > > RBParser already has #parseFaultyMethod:, this means it can generate an AST even for incomplete input > (with an error node). e.g. you can parse the expression ?1+?: > > > > There is already a SHRBTextStyler which uses it, we should finish that and replace the Shout parser. > > Marcus > > > From eliot.miranda at gmail.com Wed Feb 4 21:24:19 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 4 21:24:22 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: On Wed, Feb 4, 2015 at 12:40 PM, Chris Muller wrote: > On Wed, Feb 4, 2015 at 1:12 PM, Chris Muller wrote: > >> On Wed, Feb 4, 2015 at 9:07 AM, Chris Muller > wrote: > >>> > >>> isSequenceable is a term that refers to a particular *kind* of > >>> Collection, a sequenceable one. > >>> > >>> Therefore, IMO, I am unable to think of any more clear and explicit > >>> way of expressing that than "isKindOf: SequenceableCollection"... > >> > >> > >> self isCollection and: [self isSequenceable] is better. isKinfOf: is > a) > >> not object-oriented as it forces an argument to be in a particular > hierarchy > >> rather than having a particular interface, and b) is horribly > inefficient, > >> causing a potentially long search of an object's class hierarchy. > isKindOf: > >> doesn't just smell, it stinks. > > > > Yes, and class-testing via #class as well, for the same reasons. But > > sometimes we really do want to know whether we have a _particular > > implementation_ of a Dictionary, not just dictionary behaviors and > > API's. > > Eliots subStrings: change is obviously a fine improvement and I think > the hasEqualElements: is too with one of Levente's suggestions. But > may we scrutinize this change to Dictionary>>#= just a bit more? > > Everyone agrees using #isDictionary is faster and more OO and less > smelly than isKindOf: Dictionary. > > If #isDictionary refers to particular API and behaviors, one could > argue that a BTree should answer true to #isDictionary, because it has > similar API and behaviors. In the context of _equivalence testing_ > though, a BTree is not a Dictionary. > > So as long as we interpret the various #isSomeType methods as truly of > *that type* (same semantics as isKindOf:), and not "similar to", then > I can see no side-effects (unless someone added #isDictionary to > BTree, of course). However, we may want to visit the other #= > implementations elsewhere in the system too, unless this would appear > to be an inconsistency producing its own odor of sorts. > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: (and think that most experienced Smalltalk programmers don't either). In Smalltalk type = protocol. So these methods imply that an object implements a given set of messages, not that they are of any given class. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150204/0a4e89ed/attachment.htm From tim at rowledge.org Wed Feb 4 21:37:42 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 4 21:37:47 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> Message-ID: <7906A36C-2A37-46D6-A24F-3E7628D84BE7@rowledge.org> On 04-02-2015, at 1:04 PM, Levente Uzonyi wrote: > A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. > Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? Make that less than 10mS on a single core Pi... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Diarrhea of the mouth; constipation of the ideas. From ma.chris.m at gmail.com Wed Feb 4 21:40:54 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Feb 4 21:40:57 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: >> If #isDictionary refers to particular API and behaviors, one could >> argue that a BTree should answer true to #isDictionary, because it has >> similar API and behaviors. In the context of _equivalence testing_ >> though, a BTree is not a Dictionary. >> >> So as long as we interpret the various #isSomeType methods as truly of >> *that type* (same semantics as isKindOf:), and not "similar to", then >> I can see no side-effects (unless someone added #isDictionary to >> BTree, of course). However, we may want to visit the other #= >> implementations elsewhere in the system too, unless this would appear >> to be an inconsistency producing its own odor of sorts. > > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: (and > think that most experienced Smalltalk programmers don't either). > In > Smalltalk type = protocol. So these methods imply that an object implements > a given set of messages, not that they are of any given class. Then I am very interested to know your thoughts about my BTree question, above, which shares the same protocol as Dictionary. Should (BTree new at: 3 put: 'three'; yourself) = (Dictionary new at: 3 put: 'three'; yourself) return true? Why or why not? From Das.Linux at gmx.de Wed Feb 4 21:45:59 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Feb 4 21:46:03 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: Hi, On 04.02.2015, at 22:24, Eliot Miranda wrote: > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: (and think that most experienced Smalltalk programmers don't either). In Smalltalk type = protocol. So these methods imply that an object implements a given set of messages, not that they are of any given class. I second this interpretation. Taking our example at hand[1] we want the otherCollection to have two properties: a) it should be a collection of object; or differently phrased, have a multiplicity >1 b) it needs an internal order (or a half-order may be) and a way to access things via an index. a is clear but now we question b. Aren't SequenceableCollections the only thing that fit here? No. I can think of a domain Object, say Banquet that is sequenceable (courses), but that I would not call being collection. So what I would think: Dictionary new isCollection. "true" Dictionary new isSequenceable. "false" OrderedCollection new isCollection. "true" OrderedCollection new isSequenceable. "true" Banquet new isCollection. "false" Banquet new if Sequenceable. "true !" So what ever we as community expect from a sequenceable should at least in parts be exhibited by the DinnerCourse, while exhibiting a collection protocol is unnecessary.[2] Best -Tobias [1]: Original Code SequenceableCollection>>hasEqualElements: otherCollection "Answer whether the receiver's size is the same as otherCollection's size, and each of the receiver's elements equal the corresponding element of otherCollection. This should probably replace the current definition of #= ." | size | (otherCollection isKindOf: SequenceableCollection) ifFalse: [^ false]. (size := self size) = otherCollection size ifFalse: [^ false]. 1 to: size do: [:index | (self at: index) = (otherCollection at: index) ifFalse: [^ false]]. ^ true [2]: One _can_ say a banquet is a collection of courses, and indeed, that would be how I would implement it (object composition, delegating to an ordered collection) but I wouldn't consider it part of the protocol / exhibited interface. From tim at rowledge.org Wed Feb 4 22:10:29 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 4 22:10:33 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into Message-ID: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> I haven?t been able to uncover *any* decent doc for FFI calls, so any pointers would be nice. In particular, given a C function def void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) What on earth do I do ? # seems to be the basic incantation but so far I see nothing that might explain to me what would make it actually work. Really basic stuff like piBoardRev "Read the revision code of the Pi. ." "ScratchWiringPiInterface new piBoardRev" # ^self externalCallFailed seems fine, as does digitalRead: pin "Read the value of a given Pin, returning HIGH or LOW" "ScratchWiringPiInterface new digitalRead: 1" # ^self externalCallFailed What has my assorted googling missed? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Wasn't fully debugged before being released. From eliot.miranda at gmail.com Wed Feb 4 22:13:44 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 4 22:13:47 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: On Wed, Feb 4, 2015 at 1:40 PM, Chris Muller wrote: > >> If #isDictionary refers to particular API and behaviors, one could > >> argue that a BTree should answer true to #isDictionary, because it has > >> similar API and behaviors. In the context of _equivalence testing_ > >> though, a BTree is not a Dictionary. > >> > >> So as long as we interpret the various #isSomeType methods as truly of > >> *that type* (same semantics as isKindOf:), and not "similar to", then > >> I can see no side-effects (unless someone added #isDictionary to > >> BTree, of course). However, we may want to visit the other #= > >> implementations elsewhere in the system too, unless this would appear > >> to be an inconsistency producing its own odor of sorts. > > > > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: > (and > > think that most experienced Smalltalk programmers don't either). > > In > > Smalltalk type = protocol. So these methods imply that an object > implements > > a given set of messages, not that they are of any given class. > > Then I am very interested to know your thoughts about my BTree > question, above, which shares the same protocol as Dictionary. Should > > (BTree new at: 3 put: 'three'; yourself) = (Dictionary new at: 3 > put: 'three'; yourself) > > return true? Why or why not? > Duck typing applies here, if it quacks like a duck. So if your BTree behaves like a Dictionary to the extent that e.g. MethodDictionary does (MethodDictionary supports associationAt: but isn't answering an association within it cuz it does't contain associations) then sure, it's a Dictionary. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150204/e376b134/attachment.htm From leves at elte.hu Wed Feb 4 22:34:45 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Feb 4 22:34:49 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> Message-ID: For each variable allocate some bytes on the external heap using an ExternalAddress, and wrap into an ExternalData, then pass the ExternalData as the argument. Something like this: | modelData modelValue ... | modelData := ExternalData fromHandle: (ExternalAddress gcallocate: 4) type: ExternalType long asPointerType. ... self piBoardId: modelData ... modelValue := modelData getHandle signedLongAt: 1 Or you can create an ExternalStructure with a single field, and declare the arguments as pointers to that type instead of long. Levente On Wed, 4 Feb 2015, tim Rowledge wrote: > I haven?t been able to uncover *any* decent doc for FFI calls, so any pointers would be nice. > > In particular, given a C function def > void piBoardId (int *model, int *rev, int *mem, int *maker, int *overVolted) > What on earth do I do ? > > # > seems to be the basic incantation but so far I see nothing that might explain to me what would make it actually work. > > Really basic stuff like > piBoardRev > "Read the revision code of the Pi. ." > "ScratchWiringPiInterface new piBoardRev" > # > ^self externalCallFailed > > seems fine, as does > digitalRead: pin > "Read the value of a given Pin, returning HIGH or LOW" > "ScratchWiringPiInterface new digitalRead: 1" > # > ^self externalCallFailed > > What has my assorted googling missed? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Wasn't fully debugged before being released. > > > > From ma.chris.m at gmail.com Thu Feb 5 00:49:20 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Feb 5 00:49:22 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: >> >> If #isDictionary refers to particular API and behaviors, one could >> >> argue that a BTree should answer true to #isDictionary, because it has >> >> similar API and behaviors. In the context of _equivalence testing_ >> >> though, a BTree is not a Dictionary. >> >> >> >> So as long as we interpret the various #isSomeType methods as truly of >> >> *that type* (same semantics as isKindOf:), and not "similar to", then >> >> I can see no side-effects (unless someone added #isDictionary to >> >> BTree, of course). However, we may want to visit the other #= >> >> implementations elsewhere in the system too, unless this would appear >> >> to be an inconsistency producing its own odor of sorts. >> > >> > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: >> > (and >> > think that most experienced Smalltalk programmers don't either). >> > In >> > Smalltalk type = protocol. So these methods imply that an object >> > implements >> > a given set of messages, not that they are of any given class. >> >> Then I am very interested to know your thoughts about my BTree >> question, above, which shares the same protocol as Dictionary. Should >> >> (BTree new at: 3 put: 'three'; yourself) = (Dictionary new at: 3 >> put: 'three'; yourself) >> >> return true? Why or why not? > > Duck typing applies here, if it quacks like a duck. So if your BTree > behaves like a Dictionary to the extent that e.g. MethodDictionary does > (MethodDictionary supports associationAt: but isn't answering an association > within it cuz it does't contain associations) then sure, it's a Dictionary. I do not wish to be argumentative, but does a WeakArray quack like an Array? Not only does WeakArray share exactly the same API, but even inherits from Array and "is-a" Array. So why shouldn't this be true? (Array with: 1 with: 2 with: 3) = (WeakArray with: 1 with: 2 with: 3) "false" I think the answer is because #= (not any other method, just #=) needs to care about which _implementation_ of the argument which is passed when considering true equivalence to another object. I agree we human developers can consider unequal but same-quacking objects interchangeable in our fuzzy minds when we design our applications, and that is powerful, however, *within the system*, I just it needs #= to make implementation-specific distinctions, especially for as base-classes as Array and Dictionary. This seems to be reflected by most of the #= implementations in the system, which check either #class, #species, or #isKindOf:. From eliot.miranda at gmail.com Thu Feb 5 01:22:49 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 5 01:22:52 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: On Wed, Feb 4, 2015 at 4:49 PM, Chris Muller wrote: > >> >> If #isDictionary refers to particular API and behaviors, one could > >> >> argue that a BTree should answer true to #isDictionary, because it > has > >> >> similar API and behaviors. In the context of _equivalence testing_ > >> >> though, a BTree is not a Dictionary. > >> >> > >> >> So as long as we interpret the various #isSomeType methods as truly > of > >> >> *that type* (same semantics as isKindOf:), and not "similar to", then > >> >> I can see no side-effects (unless someone added #isDictionary to > >> >> BTree, of course). However, we may want to visit the other #= > >> >> implementations elsewhere in the system too, unless this would appear > >> >> to be an inconsistency producing its own odor of sorts. > >> > > >> > "similar to" is vague. I *don't* interpret isFoo methods as isKindOf: > >> > (and > >> > think that most experienced Smalltalk programmers don't either). > >> > In > >> > Smalltalk type = protocol. So these methods imply that an object > >> > implements > >> > a given set of messages, not that they are of any given class. > >> > >> Then I am very interested to know your thoughts about my BTree > >> question, above, which shares the same protocol as Dictionary. Should > >> > >> (BTree new at: 3 put: 'three'; yourself) = (Dictionary new at: 3 > >> put: 'three'; yourself) > >> > >> return true? Why or why not? > > > > Duck typing applies here, if it quacks like a duck. So if your BTree > > behaves like a Dictionary to the extent that e.g. MethodDictionary does > > (MethodDictionary supports associationAt: but isn't answering an > association > > within it cuz it does't contain associations) then sure, it's a > Dictionary. > > I do not wish to be argumentative, but does a WeakArray quack like an > Array? Not only does WeakArray share exactly the same API, but even > inherits from Array and "is-a" Array. So why shouldn't this be true? > > (Array with: 1 with: 2 with: 3) = (WeakArray with: 1 with: 2 with: > 3) "false" > IMO that's a bug. And the bug is that WeakArray species = WeakArray, whereas it should be Array. If one selects/rejects/copies a WeakArray the result is more useful if it is strong. It would be interesting to make the change and see what effect it has on the standard test suite. I think the answer is because #= (not any other method, just #=) needs > to care about which _implementation_ of the argument which is passed > when considering true equivalence to another object. > IMO the problem is because coming up with general purpose #= implementations is hard. You must have seen the controversy my definition of CompiledMethod>>#= has caused over recent years. #= has evolved a lot since Smalltalk-80 as its been more affordable to be cleverer, but that evolution also shows that its not absolutely obvious what #= should do; it depends on context, and current definitions of #= are general agreements of useful behaviour, some of these agreements having been made a long time ago. I agree we human developers can consider unequal but same-quacking > objects interchangeable in our fuzzy minds when we design our > applications, and that is powerful, however, *within the system*, I > just it needs #= to make implementation-specific distinctions, > especially for as base-classes as Array and Dictionary. > One thing #= should do is accept any object as an argument without error. This wasn't always the case, but Smalltalk was not and never will be perfect. Apart from that, what #= means is something we have to negotiate. I don't think my recent changes broke anything. > This seems to be reflected by most of the #= implementations in the > system, which check either #class, #species, or #isKindOf:. > Few of them use isKindOf:. Some use class or species. Some use #isFoo. I don't see that #isFoo is worse than #class or #species. Do you think it is? -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150204/ff058f9e/attachment.htm From tim at rowledge.org Thu Feb 5 01:48:05 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 5 01:48:11 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> Message-ID: <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> On 04-02-2015, at 2:34 PM, Levente Uzonyi wrote: > For each variable allocate some bytes on the external heap using an ExternalAddress, and wrap into an ExternalData, then pass the ExternalData as the argument. Something like this: Thanks; I also found X11Display>queryPointer: which does something similar but a tad simpler by just using WordArrays. I think for quick in-and-out calls that should be ok but if there is any chance whatsoever of the pointer sticking around than an external object is going to be quite important. Assuming we don?t want any Earth shattering KaBooms. I?m still hoping someone can point me to some readable doc about all this. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Do you like me for my brain or my baud? From ma.chris.m at gmail.com Thu Feb 5 02:38:44 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Feb 5 02:38:47 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: > IMO that's a bug. And the bug is that WeakArray species = WeakArray, > whereas it should be Array. If one selects/rejects/copies a WeakArray the > result is more useful if it is strong. It would be interesting to make the > change and see what effect it has on the standard test suite. Indeed.. >> I think the answer is because #= (not any other method, just #=) needs >> to care about which _implementation_ of the argument which is passed >> when considering true equivalence to another object. > > IMO the problem is because coming up with general purpose #= implementations > is hard. You must have seen the controversy my definition of > CompiledMethod>>#= has caused over recent years. #= has evolved a lot since > Smalltalk-80 as its been more affordable to be cleverer, but that evolution > also shows that its not absolutely obvious what #= should do; it depends on > context, and current definitions of #= are general agreements of useful > behaviour, some of these agreements having been made a long time ago. Being cleverer in #= feels right but general agreements also feels right in terms of having dependable contracts. For example, its really nice that everyone has "agreed" to include a valid #hash method when they write an #= method. We just do it regardless whether we actually think we will put them in a HashedCollection. >> I agree we human developers can consider unequal but same-quacking >> objects interchangeable in our fuzzy minds when we design our >> applications, and that is powerful, however, *within the system*, I >> just it needs #= to make implementation-specific distinctions, >> especially for as base-classes as Array and Dictionary. > > One thing #= should do is accept any object as an argument without error. Another very good general agreement for equivalence testing. I agree! :) > This wasn't always the case, but Smalltalk was not and never will be > perfect. Apart from that, what #= means is something we have to negotiate. > I don't think my recent changes broke anything. I don't think anything will be broken. None of my outboard SpecialDictionary's implement isDictionary. It gave me pause to wonder what it should answer.. >> This seems to be reflected by most of the #= implementations in the >> system, which check either #class, #species, or #isKindOf:. > > Few of them use isKindOf:. Some use class or species. Some use #isFoo. I > don't see that #isFoo is worse than #class or #species. Do you think it is? Hm. In any other method besides #=, #isFoo is always better. In Dictionary>>#=, it will perform better, it probably won't break anything even external. So, definitely not worse. :) Just making sure when changing such a method as Dictionary>>#=... - Chris From lewis at mail.msen.com Thu Feb 5 03:27:52 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 5 03:27:55 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> Message-ID: <20150205032752.GA12560@shell.msen.com> On Wed, Feb 04, 2015 at 05:48:05PM -0800, tim Rowledge wrote: > > On 04-02-2015, at 2:34 PM, Levente Uzonyi wrote: > > > For each variable allocate some bytes on the external heap using an ExternalAddress, and wrap into an ExternalData, then pass the ExternalData as the argument. Something like this: > > Thanks; I also found X11Display>queryPointer: which does something similar but a tad simpler by just using WordArrays. I think for quick in-and-out calls that should be ok but if there is any chance whatsoever of the pointer sticking around than an external object is going to be quite important. Assuming we don?t want any Earth shattering KaBooms. > WordArrays hold 32-bit values by definition. That does not sound like a good way to store pointers. > I?m still hoping someone can point me to some readable doc about all this. > I can't say that I have ever seen any documentation other than examples in the image. Is there some reason that you would not just write a plugin for this? Dave From tim at rowledge.org Thu Feb 5 04:06:37 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 5 04:06:43 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <20150205032752.GA12560@shell.msen.com> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> Message-ID: <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> On 04-02-2015, at 7:27 PM, David T. Lewis wrote: > > WordArrays hold 32-bit values by definition. That does not sound like a good way to store pointers. Not so much storing pointers as providing somewhere to be pointed *to* so the ffi call can write answers according to the pointers it passes out. > >> I?m still hoping someone can point me to some readable doc about all this. >> > > I can't say that I have ever seen any documentation other than examples in the image. I can?t say I?ve even found any there, worst luck. > > > Is there some reason that you would not just write a plugin for this? > It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Why do we want intelligent terminals when there are so many stupid users? From lewis at mail.msen.com Thu Feb 5 04:07:56 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 5 04:08:00 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <54D1EE96.8090102@gmx.net> References: <54D0D202.7030408@gmx.net> <20150204000144.GB27170@shell.msen.com> <54D1EE96.8090102@gmx.net> Message-ID: <20150205040756.GA23199@shell.msen.com> On Wed, Feb 04, 2015 at 11:04:06AM +0100, Herbert K?nig wrote: > Hi Dave, > > >All of the child processes that run in your current Squeak session (beginning > >when you start the image) are saved in a dictionary. This is just to make > >them browsable (OSProcess thisOSProcess allMyChildren). > > > >Unregistering each child process, as you suggest above, will work fine, at > >least after fixing the bug that you found (thank you for that, it is updated > >on squeaksource now). > > > >But you can also clean up all of the terminated processes like this: > > > > OSProcess thisOSProcess discardExitedChildren > > > >Or you can empty the dictionary completely: > > > > OSProcess thisOSProcess resetChildProcessDictionary > > thanks, these helped a lot. > > >process every few seconds, maybe for a long time) I can see that it might > >be a real problem. Do you think that this should be changed? > > I have been doing embedded with scarce RAM and now I play with home > automation (in a very broad sense) which is supposed to run 24/7 me > being abroad and my family not programming. I see what you mean! It would be rediculous to accumulate all of the process proxies in this case. > > From this perspective my immediate instinct is to not collect the > instances at all. Now that I know about the fact I prefer to remove > them myself. But I'm sure other users have a different perspective on > this and you might break somebody's code if you wouldn't collect them at > all. > > I former uses I collected the processes myself (to kill them, query > their state) and for that purpose wouldn't want to pick them out of a > dictionary. > As a quick and dirty workaround, you might want to just modify UnixProcess>unregisterChildProcess: to make it do nothing at all. That would be a hack, but you have no real need for the child process registry anyway, so that would be an easy way to make the problem go away for your home automation application. Meanwhile, I'll see if I can come up with more sensible solution. > I'm very interested in learning when this dictionary comes in handy or > is needed because I see many methods referencing allMyChildren but most > of them are not sent in my image so I can't find out. > Well, when I wrote OSProcess/CommandShell, it was sort of an experiment to figure out if I could wrap various functions of common operating systems (not just Unix) in such a way that they could be accessible from Squeak. I wanted to be able to browse the objects that represented those OS functions, and I wanted to be able to watch the proxy objects change state as external processes ran and then exited. I figured that an object that represents the current OS process (the one in which your Squeak VM is running) should be able to know about the child processes that it creates. So I added a child process registry to keep track of this. When the image started, the registry would be empty, and as time goes on and you run various child processes using OSProcess, the proxies for those child processes are maintained in the registry dictionary. None of this has any practical application that I know of, but it fit in with my idea of having an abstract representation of OS process functions that can be viewed and manipulated directly from the Squeak image. Dave From lewis at mail.msen.com Thu Feb 5 04:24:58 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 5 04:24:59 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> Message-ID: <20150205042458.GA28821@shell.msen.com> On Wed, Feb 04, 2015 at 08:06:37PM -0800, tim Rowledge wrote: > > On 04-02-2015, at 7:27 PM, David T. Lewis wrote: > > > > > > Is there some reason that you would not just write a plugin for this? > > > > It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? > Yes :-) From ron at usmedrec.com Thu Feb 5 04:46:11 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Thu Feb 5 04:46:22 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections Message-ID: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Hi All, It's that time again. Time to raise your voices and elect your leaders! It's a time for you to stand up, help your community and volunteer to serve! Squeak wants you! Every year we elect the SOB (Squeak Oversight Board) consisting of seven members from our community. The current board members are: 1. Bert Freudenberg 2. Eliot Miranda 3. Tim Rowledge 4. Frank Shearar 5. Craig Latta 6. Chris Muller 7. David T. Lewis For more info on the board please see: https://squeakboard.wordpress.com/our-mission/ Everything about the election, including schedule and more, can be tracked here: http://wiki.squeak.org/squeak/6200 Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB members and campaigning! Candidates should nominate themselves and start their campaign on the squeak-dev mailing list. Or if you nominate someone else, make sure that person really wants to run. :) I will not put anyone on the candidate list until that person makes it known on squeak-dev that he/she intends to run. During this period, the candidates should ideally present themselves on squeak-dev, unless they have already done so, and the community can ask questions. I encourage you to reach out to potential candidates, people that are active in the community and represent your views, and ask them to run. Some people will not run without encouragement. Also I know that some people wait to the last minute to run for the board to see if others will run but please consider getting this year off to a faster start and just jump right in! *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB members and campaigning! *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is finalized. *** Monday 16th of February 2015 4PM (21.00 UTC): Online election starts. *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. *** Results will be announced immediately when the election ends. The voting period is one week long and ballots are sent out via email. And how do you end up on the voter list? See below. :) IMPORTANT: New voters will NOT be added once the election is started. You MUST try to get on the voter list before the 16th of February 2014 or you will NOT be able to vote. If your Email has changed please make sure it is changed on the list of voters before the election starts. -------------------------- If you were invited to vote last year you are already on the voter list, no worries! If you are a new Squeaker and wish to vote do ONE of the following: * Get a "known" Squeaker to vouch for you. If a known Squeaker sends an email to voters (at) squeak.org giving me name and email for you, then I will add you. * Send an email to voters at squeak.org yourself (and CC to squeak-dev if you like) with information/arguments showing me that you are indeed serious about voting and that you are indeed a Squeaker. When the voting period starts all voters will receive an email with instructions and a link to the voting website. If there are any further questions, just reply *in this thread* and I will closely track it - or send email to voters (at) squeak.org which points to me. ...so let's get on with it! All the best, Ron Teitelbaum From casey.obrien.r at gmail.com Thu Feb 5 05:28:26 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Thu Feb 5 05:28:31 2015 Subject: Throwing my hat in (was Re: [squeak-dev] Squeak Oversight Board 2015 Elections) In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <23D7E57B-2D12-4913-B707-0ECCB4D848D5@gmail.com> I'll run. I'm running on the not-a-cabbage ticket. In recent times I had a financial crisis, but it's really looking like I'm out of the woods now. I'd be glad to volunteer if the people of Squeak would have me, and I do believe that right now I'm in a position to focus a good deal of time on the Squeak community. Last time, I probably would have been swept up in day to day survival stuff, but that's not the situation now. My interests currently include leveraging improvements made to Morphic in Cuis, and figuring how we're going to use Spoon to explore and extract them. I'd also like to do what I can to support and/or continue the work Frank Shearar has done with both disentangling dependencies and maintaining a continuous integration infrastructure. You should really consider the other contenders, though, because I'm quite sure that all of them will be great candidates. Cheers! --C > On Feb 4, 2015, at 8:46 PM, "Ron Teitelbaum" wrote: > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of seven > members from our community. The current board members are: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Frank Shearar > 5. Craig Latta > 6. Chris Muller > 7. David T. Lewis > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure that > person really wants to run. :) I will not put anyone on the candidate list > until that person makes it known on squeak-dev that he/she intends to run. > > During this period, the candidates should ideally present themselves on > squeak-dev, unless they have already done so, and the community can ask > questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some people > will not run without encouragement. Also I know that some people wait to > the last minute to run for the board to see if others will run but please > consider getting this year off to a faster start and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. You > MUST try to get on the voter list before the 16th of February 2014 or you > will NOT be able to vote. If your Email has changed please make sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter list, no > worries! If you are a new Squeaker and wish to vote do ONE of the following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker sends > an email to voters (at) squeak.org giving me name and email for you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I will > closely track it - or send email to voters (at) squeak.org which points to > me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > > From herbertkoenig at gmx.net Thu Feb 5 06:54:19 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Thu Feb 5 06:54:22 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> Message-ID: <54D3139B.9000306@gmx.net> Am 05.02.2015 um 05:06 schrieb tim Rowledge: > It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? > Hi, I'm blinking LED's and read buttons via the Linux file interface (that broke with one of the last updates to Raspbian). Are you willing to share what you are doing? Need a tester? I use I2C through OSProcess and i2ctools, are you working on that too? Cheers, Herbert From djm1329 at san.rr.com Thu Feb 5 07:18:27 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Thu Feb 5 07:18:31 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <54D3139B.9000306@gmx.net> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> <54D3139B.9000306@gmx.net> Message-ID: <2B66BE45-9FE2-4D3E-BF3D-2B2F9D8132A9@san.rr.com> I?ve done similar things too. I created a GPIOPin class which uses an abstract GPIOAccessor class to actually perform the access. I have two concrete subclasses of GPIOAccessor, one uses the file interface like you did for portability (so it works on the BeagleBone Black for example), and the other uses an FFI I developed based on a library called libbcm2835 IIRC. For I2C I took a similar approach. I developed an abstract I2CBus class which has two concrete subclasses depending on access method. One uses the portable SMBus file i/o style of accessing I2C, the other is an FFI interface again using libbcm2835. The /dev/mem interfaces (the ones using FFI) are not portable and only work on the RPi, but they are /much/ faster. I?ve got flashing LEDS, buttons and many kinds of I2C sensors hooked up; even a kind of mini weather station I demoed at Camp Smalltalk Vancouver Island. I planned to release this months ago but got tied up with other stuff. I also was trying to decide whether to publish as an FFI library or go ahead and write a plugin. I decided a plugin would be better, but haven?t got around to writing it. I believe Tim has followed a similar FFI approach, except instead of using libbcm2835 he is using WiringPi. I think long term we should use WiringPi since it has a lot of traction in the RPi community, but perhaps make a plugin based on it for ease of distribution. I am happy to share all this .. I just got bogged down trying to figure out the best way to release it. Best, Doug > On Feb 4, 2015, at 22:54, Herbert K?nig wrote: > > > Am 05.02.2015 um 05:06 schrieb tim Rowledge: >> It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? >> > Hi, > I'm blinking LED's and read buttons via the Linux file interface (that broke with one of the last updates to Raspbian). > Are you willing to share what you are doing? Need a tester? > > I use I2C through OSProcess and i2ctools, are you working on that too? > > Cheers, > > Herbert > From marcus.denker at inria.fr Thu Feb 5 09:04:27 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Thu Feb 5 09:04:30 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> Message-ID: <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> > On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: > > A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. > Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? I have not yet benchmarked it? PetitParser as it is is too slow, but we will soon have a faster version (factor 10). We should do some benchmarks. For using, it seems ok. With a fast machine + JIT, which does not say much of course. (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is turned off by default). One thing that is nice with the AST is that it can be used for other things, too. e.g. in Pharo we have a menu that is defined by the AST nodes and structural navigation in the editor. Marcus From marcus.denker at inria.fr Thu Feb 5 09:12:34 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Thu Feb 5 09:12:38 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> Message-ID: <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> > On 05 Feb 2015, at 10:04, Marcus Denker wrote: > > >> On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: >> >> A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. >> Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? > > I have not yet benchmarked it? PetitParser as it is is too slow, but we will soon have a faster version (factor 10). > > We should do some benchmarks. For using, it seems ok. With a fast machine + JIT, which does not say much of course. > (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is turned off by default). > > One thing that is nice with the AST is that it can be used for other things, too. e.g. in Pharo we have a menu that is defined > by the AST nodes and structural navigation in the editor. > Another way to see it: How would the original Smalltalk be designed if they would have had 4GB RAM in 1978? What fascinates me still is that Smalltalk used the existing resources (even building their own machines) to an extreme, while today we are obsessed to find reasons why we can not do anything that makes the system slower or use more memory than yesterday. And that even with resources growing every year? This is why we e.g. now have a meta object describing every instance variable in Pharo. I am sure there are people who will see these ~7000 objects as pure waste? while I would say that we have already *now* the resources to be even more radical. Marcus From nicolas.cellier.aka.nice at gmail.com Thu Feb 5 09:34:36 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Feb 5 09:34:37 2015 Subject: [squeak-dev] Re: What is equivalence? (was: The Trunk: Collections-eem.603.mcz) In-Reply-To: References: Message-ID: As a side note, sometimes I'd like to relax =. For example (1 to: 3) = #( 1 2 3) is a problem - it either violate the hash equality or prevent an efficient hash computation for Intervals - it violates transitivity of = - indeed (3 to: 2) and (5 to: 4) are not equal because they are (historically) used for marking different cursor positions in a Text, but they both equal #() They behave similarly enough to be easily exchanged, so we might express this with hasSameElements or isSameSequence but not necessarily =, = is too strong IMO. 2015-02-05 3:38 GMT+01:00 Chris Muller : > > IMO that's a bug. And the bug is that WeakArray species = WeakArray, > > whereas it should be Array. If one selects/rejects/copies a WeakArray > the > > result is more useful if it is strong. It would be interesting to make > the > > change and see what effect it has on the standard test suite. > > Indeed.. > > >> I think the answer is because #= (not any other method, just #=) needs > >> to care about which _implementation_ of the argument which is passed > >> when considering true equivalence to another object. > > > > IMO the problem is because coming up with general purpose #= > implementations > > is hard. You must have seen the controversy my definition of > > CompiledMethod>>#= has caused over recent years. #= has evolved a lot > since > > Smalltalk-80 as its been more affordable to be cleverer, but that > evolution > > also shows that its not absolutely obvious what #= should do; it depends > on > > context, and current definitions of #= are general agreements of useful > > behaviour, some of these agreements having been made a long time ago. > > Being cleverer in #= feels right but general agreements also feels > right in terms of having dependable contracts. For example, its > really nice that everyone has "agreed" to include a valid #hash method > when they write an #= method. We just do it regardless whether we > actually think we will put them in a HashedCollection. > > >> I agree we human developers can consider unequal but same-quacking > >> objects interchangeable in our fuzzy minds when we design our > >> applications, and that is powerful, however, *within the system*, I > >> just it needs #= to make implementation-specific distinctions, > >> especially for as base-classes as Array and Dictionary. > > > > One thing #= should do is accept any object as an argument without error. > > Another very good general agreement for equivalence testing. I agree! :) > > > This wasn't always the case, but Smalltalk was not and never will be > > perfect. Apart from that, what #= means is something we have to > negotiate. > > I don't think my recent changes broke anything. > > I don't think anything will be broken. None of my outboard > SpecialDictionary's implement isDictionary. It gave me pause to > wonder what it should answer.. > > >> This seems to be reflected by most of the #= implementations in the > >> system, which check either #class, #species, or #isKindOf:. > > > > Few of them use isKindOf:. Some use class or species. Some use > #isFoo. I > > don't see that #isFoo is worse than #class or #species. Do you think it > is? > > Hm. In any other method besides #=, #isFoo is always better. In > Dictionary>>#=, it will perform better, it probably won't break > anything even external. So, definitely not worse. :) Just making > sure when changing such a method as Dictionary>>#=... > > - Chris > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150205/e215442e/attachment.htm From edgardec2005 at gmail.com Thu Feb 5 11:24:07 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Thu Feb 5 11:24:23 2015 Subject: Throwing my hat in (was Re: [squeak-dev] Squeak Oversight Board 2015 Elections) In-Reply-To: <23D7E57B-2D12-4913-B707-0ECCB4D848D5@gmail.com> Message-ID: And you have my vote El 2/5/15, 2:28 AM, "Casey Ransberger" escribi?: >I'll run. I'm running on the not-a-cabbage ticket. > >In recent times I had a financial crisis, but it's really looking like >I'm out of the woods now. I'd be glad to volunteer if the people of >Squeak would have me, and I do believe that right now I'm in a position >to focus a good deal of time on the Squeak community. Last time, I >probably would have been swept up in day to day survival stuff, but >that's not the situation now. > >My interests currently include leveraging improvements made to Morphic in >Cuis, and figuring how we're going to use Spoon to explore and extract >them. I'd also like to do what I can to support and/or continue the work >Frank Shearar has done with both disentangling dependencies and >maintaining a continuous integration infrastructure. > >You should really consider the other contenders, though, because I'm >quite sure that all of them will be great candidates. > >Cheers! From unoduetre at poczta.onet.pl Thu Feb 5 13:02:04 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Thu Feb 5 12:28:08 2015 Subject: [SPAM] Throwing my hat in (was Re: [squeak-dev] Squeak Oversight Board 2015 Elections) In-Reply-To: <23D7E57B-2D12-4913-B707-0ECCB4D848D5@gmail.com> (from casey.obrien.r@gmail.com on Thu Feb 5 06:28:26 2015) References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <23D7E57B-2D12-4913-B707-0ECCB4D848D5@gmail.com> Message-ID: <1423141324.24094.3@mglap> > My interests currently include leveraging improvements made to > Morphic in Cuis, and figuring how we're going to use Spoon to explore > and extract them. +1 for integrating Spoon and Cuis From unoduetre at poczta.onet.pl Thu Feb 5 13:05:04 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Thu Feb 5 12:31:09 2015 Subject: [SPAM] [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> (from ron@usmedrec.com on Thu Feb 5 05:46:11 2015) References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <1423141504.24094.4@mglap> Please, please, please make Craig Latta to candidate and integrate Spoon/Context!!!! :-) From marcus.denker at inria.fr Thu Feb 5 12:54:51 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Thu Feb 5 12:54:54 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> Message-ID: <235C7562-3A3A-4879-ACFA-CA16367D58EC@inria.fr> > On 05 Feb 2015, at 10:12, Marcus Denker wrote: > >> >> On 05 Feb 2015, at 10:04, Marcus Denker wrote: >> >> >>> On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: >>> >>> A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. >>> Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? >> >> I have not yet benchmarked it? PetitParser as it is is too slow, but we will soon have a faster version (factor 10). >> >> We should do some benchmarks. For using, it seems ok. With a fast machine + JIT, which does not say much of course. >> (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is turned off by default). >> >> One thing that is nice with the AST is that it can be used for other things, too. e.g. in Pharo we have a menu that is defined >> by the AST nodes and structural navigation in the editor. >> > > Another way to see it: How would the original Smalltalk be designed if they would have had 4GB RAM in 1978? > > What fascinates me still is that Smalltalk used the existing resources (even building their own machines) to an > extreme, while today we are obsessed to find reasons why we can not do anything that makes the system > slower or use more memory than yesterday. And that even with resources growing every year? > > This is why we e.g. now have a meta object describing every instance variable in Pharo. I am sure there are people > who will see these ~7000 objects as pure waste? while I would say that we have already *now* the resources to be > even more radical. > Seemingly I still can not explain what I mean in away that people get it, so please just ignore this mail. Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150205/f0ad5213/attachment.htm From casey.obrien.r at gmail.com Thu Feb 5 13:26:20 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Thu Feb 5 13:26:25 2015 Subject: [SPAM] [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <1423141504.24094.4@mglap> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423141504.24094.4@mglap> Message-ID: <8A29D2BC-D90D-42D5-918D-890E86B468DE@gmail.com> I'd love it if Craig ran again as well. And basically everyone who's served in the five-odd years (has it been longer?) I've been around, all have been great. Run, people. Please. Not for me, but for everyone else. You're wanted, and you're needed. Besides, if you don't, you'll be stuck with me. BWAHAHAHAHA! --C > On Feb 5, 2015, at 5:05 AM, Mateusz Grotek wrote: > > Please, please, please make Craig Latta to candidate and integrate Spoon/Context!!!! :-) > From herbertkoenig at gmx.net Thu Feb 5 14:24:08 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Thu Feb 5 14:24:12 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <2B66BE45-9FE2-4D3E-BF3D-2B2F9D8132A9@san.rr.com> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> <54D3139B.9000306@gmx.net> <2B66BE45-9FE2-4D3E-BF3D-2B2F9D8132A9@san.rr.com> Message-ID: <54D37D08.6000800@gmx.net> Hey Doug, that's great. My approach is a RasPiGPIO class which keeps track of the opened Pins and I2C buses. Then I have RasPiIoPin and RasPiI2C which do the actual I/O. I2C goes through OSProcess which I use to call the I2Ctools. A Smalltalk process polls one I/O pin every 100 ms where I generate interrupts in Hardware. Only then I deal with the other pins or I2C. The update of Raspbian which accommodated the RPi B2 broke may file interface to the GPIO pins by making the files for a freshly exported pin only accessible to root. So I'd have to export the pin, chmod its files as root and then deal with the the pins normally. Do you need root permissions in your approach? Does an upgraded Raspbian break your approach? I think before I want a speedier /dev/mem interface I'd try to get I/O events into Squeak. But not for this project. If you like to discuss further (I do very much) we can take this to email. Cheers, Herbert Am 05.02.2015 um 08:18 schrieb Douglas McPherson: > I?ve done similar things too. I created a GPIOPin class which uses an abstract GPIOAccessor class to actually perform the access. I have two concrete subclasses of GPIOAccessor, one uses the file interface like you did for portability (so it works on the BeagleBone Black for example), and the other uses an FFI I developed based on a library called libbcm2835 IIRC. > > For I2C I took a similar approach. I developed an abstract I2CBus class which has two concrete subclasses depending on access method. One uses the portable SMBus file i/o style of accessing I2C, the other is an FFI interface again using libbcm2835. > > The /dev/mem interfaces (the ones using FFI) are not portable and only work on the RPi, but they are /much/ faster. > > I?ve got flashing LEDS, buttons and many kinds of I2C sensors hooked up; even a kind of mini weather station I demoed at Camp Smalltalk Vancouver Island. I planned to release this months ago but got tied up with other stuff. I also was trying to decide whether to publish as an FFI library or go ahead and write a plugin. I decided a plugin would be better, but haven?t got around to writing it. > > I believe Tim has followed a similar FFI approach, except instead of using libbcm2835 he is using WiringPi. I think long term we should use WiringPi since it has a lot of traction in the RPi community, but perhaps make a plugin based on it for ease of distribution. > > I am happy to share all this .. I just got bogged down trying to figure out the best way to release it. > > Best, > Doug > >> On Feb 4, 2015, at 22:54, Herbert K?nig wrote: >> >> >> Am 05.02.2015 um 05:06 schrieb tim Rowledge: >>> It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? >>> >> Hi, >> I'm blinking LED's and read buttons via the Linux file interface (that broke with one of the last updates to Raspbian). >> Are you willing to share what you are doing? Need a tester? >> >> I use I2C through OSProcess and i2ctools, are you working on that too? >> >> Cheers, >> >> Herbert >> > From leves at elte.hu Thu Feb 5 15:35:50 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 5 15:35:55 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> Message-ID: On Thu, 5 Feb 2015, Marcus Denker wrote: > >> On 05 Feb 2015, at 10:04, Marcus Denker wrote: >> >> >>> On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: >>> >>> A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. >>> Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? >> >> I have not yet benchmarked it? PetitParser as it is is too slow, but we will soon have a faster version (factor 10). >> >> We should do some benchmarks. For using, it seems ok. With a fast machine + JIT, which does not say much of course. >> (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is turned off by default). >> >> One thing that is nice with the AST is that it can be used for other things, too. e.g. in Pharo we have a menu that is defined >> by the AST nodes and structural navigation in the editor. >> Rebuilding the whole AST after every keystroke is possible, but keeping it real-time is a bit challenging. I would love to see an editor, which works on the AST directly - aka it maps the source code to AST nodes, and just updates the smallest possible subtree at each keystroke. Implementing such editor has it's challenges ofc, like typing a single character can invalidate the whole code, but the editor should keep the AST somehow in that case too. > > Another way to see it: How would the original Smalltalk be designed if they would have had 4GB RAM in 1978? > > What fascinates me still is that Smalltalk used the existing resources (even building their own machines) to an > extreme, while today we are obsessed to find reasons why we can not do anything that makes the system > slower or use more memory than yesterday. And that even with resources growing every year? > > This is why we e.g. now have a meta object describing every instance variable in Pharo. I am sure there are people > who will see these ~7000 objects as pure waste? while I would say that we have already *now* the resources to be > even more radical. I think this is a different thing. Improvements are always welcome, as long as they don't step on your toes. About Slots: I don't see their advantages yet (other than bitfields, but those are so rare in Smalltalk that I implement them causes no trouble. And they are just an optimization over using multiple fields.). Levente > > Marcus > > > From marcus.denker at inria.fr Thu Feb 5 15:41:21 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Thu Feb 5 15:41:24 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> Message-ID: <21E82407-340D-4A87-8A8B-BE82AA39BCF8@inria.fr> > On 05 Feb 2015, at 16:35, Levente Uzonyi wrote: > > On Thu, 5 Feb 2015, Marcus Denker wrote: > >> >>> On 05 Feb 2015, at 10:04, Marcus Denker wrote: >>> >>> >>>> On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: >>>> >>>> A single parser is a nice goal, but performance is top priority for Shout, because it should do it's job real-time. When it starts lagging behind, then people just turn it off, because it doesn't help them. >>>> Can those parsers (SHRBTextStyler and a Smalltalk parser written using PetitParser) parse an average method in less than 20ms on an average machine? >>> >>> I have not yet benchmarked it? PetitParser as it is is too slow, but we will soon have a faster version (factor 10). >>> >>> We should do some benchmarks. For using, it seems ok. With a fast machine + JIT, which does not say much of course. >>> (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is turned off by default). >>> >>> One thing that is nice with the AST is that it can be used for other things, too. e.g. in Pharo we have a menu that is defined >>> by the AST nodes and structural navigation in the editor. >>> > > Rebuilding the whole AST after every keystroke is possible, but keeping it real-time is a bit challenging. > > I would love to see an editor, which works on the AST directly - aka it maps the source code to AST nodes, and just updates the smallest possible subtree at each keystroke. Implementing such editor has it's challenges ofc, like typing a single character can invalidate the whole code, but the editor should keep the AST somehow in that case too. > Yes! Marcus From frank.shearar at gmail.com Thu Feb 5 15:52:52 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Feb 5 15:52:54 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> Message-ID: On 5 February 2015 at 15:35, Levente Uzonyi wrote: > On Thu, 5 Feb 2015, Marcus Denker wrote: > >> >>> On 05 Feb 2015, at 10:04, Marcus Denker wrote: >>> >>> >>>> On 04 Feb 2015, at 22:04, Levente Uzonyi wrote: >>>> >>>> A single parser is a nice goal, but performance is top priority for >>>> Shout, because it should do it's job real-time. When it starts lagging >>>> behind, then people just turn it off, because it doesn't help them. >>>> Can those parsers (SHRBTextStyler and a Smalltalk parser written using >>>> PetitParser) parse an average method in less than 20ms on an average >>>> machine? >>> >>> >>> I have not yet benchmarked it? PetitParser as it is is too slow, but we >>> will soon have a faster version (factor 10). >>> >>> We should do some benchmarks. For using, it seems ok. With a fast machine >>> + JIT, which does not say much of course. >>> (there is a setting 'AST based coloring? in Pharo3 and Pharo4, but it is >>> turned off by default). >>> >>> One thing that is nice with the AST is that it can be used for other >>> things, too. e.g. in Pharo we have a menu that is defined >>> by the AST nodes and structural navigation in the editor. >>> > > Rebuilding the whole AST after every keystroke is possible, but keeping it > real-time is a bit challenging. > > I would love to see an editor, which works on the AST directly - aka it maps > the source code to AST nodes, and just updates the smallest possible subtree > at each keystroke. Implementing such editor has it's challenges ofc, like > typing a single character can invalidate the whole code, but the editor > should keep the AST somehow in that case too. C#'s Roslyn does this: http://blogs.msdn.com/b/ericlippert/archive/2012/06/08/persistence-facades-and-roslyn-s-red-green-trees.aspx frank >> Another way to see it: How would the original Smalltalk be designed if >> they would have had 4GB RAM in 1978? >> >> What fascinates me still is that Smalltalk used the existing resources >> (even building their own machines) to an >> extreme, while today we are obsessed to find reasons why we can not do >> anything that makes the system >> slower or use more memory than yesterday. And that even with resources >> growing every year? >> >> This is why we e.g. now have a meta object describing every instance >> variable in Pharo. I am sure there are people >> who will see these ~7000 objects as pure waste? while I would say that we >> have already *now* the resources to be >> even more radical. > > > I think this is a different thing. Improvements are always welcome, as long > as they don't step on your toes. > > About Slots: I don't see their advantages yet (other than bitfields, but > those are so rare in Smalltalk that I implement them causes no trouble. And > they are just an optimization over using multiple fields.). > > Levente > >> >> Marcus From ron at usmedrec.com Thu Feb 5 16:53:08 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Thu Feb 5 16:53:21 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <13a601d04164$3929cc40$ab7d64c0$@usmedrec.com> Hi All, Well we are off to a great start. We now have 1 candidate for 7 positions. 1. Casey Ransberger You only have until Monday the 16th of February to join the list of candidates. If you are going to run please announce your candidacy soon. All the best, Ron Teitelbaum > -----Original Message----- > From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak- > dev-bounces@lists.squeakfoundation.org] On Behalf Of Ron Teitelbaum > Sent: Wednesday, February 04, 2015 11:46 PM > To: The general-purpose Squeak developers list; Squeak Oversight Board > Discussion; squeakland@squeakland.org; voters@squeak.org; 'Squeak > Virtual Machine Development Discussion' > Subject: [squeak-dev] Squeak Oversight Board 2015 Elections > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of seven > members from our community. The current board members are: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Frank Shearar > 5. Craig Latta > 6. Chris Muller > 7. David T. Lewis > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure that > person really wants to run. :) I will not put anyone on the candidate list > until that person makes it known on squeak-dev that he/she intends to run. > > During this period, the candidates should ideally present themselves on > squeak-dev, unless they have already done so, and the community can ask > questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some > people will not run without encouragement. Also I know that some people > wait to the last minute to run for the board to see if others will run but > please consider getting this year off to a faster start and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of > SOB members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election > starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. > You > MUST try to get on the voter list before the 16th of February 2014 or you > will NOT be able to vote. If your Email has changed please make sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter list, no > worries! If you are a new Squeaker and wish to vote do ONE of the > following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker sends > an email to voters (at) squeak.org giving me name and email for you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I will > closely track it - or send email to voters (at) squeak.org which points to me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > > From djm1329 at san.rr.com Thu Feb 5 17:00:25 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Thu Feb 5 17:00:27 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <54D37D08.6000800@gmx.net> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> <54D3139B.9000306@gmx.net> <2B66BE45-9FE2-4D3E-BF3D-2B2F9D8132A9@san.rr.com> <54D37D08.6000800@gmx.net> Message-ID: <4C9C854C-01EB-47FE-B181-6A177637E2AE@san.rr.com> > On Feb 5, 2015, at 06:24, Herbert K?nig wrote: > > Hey Doug, > > that's great. > > My approach is a RasPiGPIO class which keeps track of the opened Pins and I2C buses. Then I have RasPiIoPin and RasPiI2C which do the actual I/O. I2C goes through OSProcess which I use to call the I2Ctools. Yes, interesting. I also used OSProcess when I was initially experimenting. My design was similar: GPIOPin keeps track of open pins and attempts to close no-longer needed resources with functionality on the class side. The GPIO access was implemented in a separate hierarchy which as I mentioned has 2 concrete subclasses, one for sysfs based file i/o access and one for /dev/mem via FFI. For I2C, a class representing an I2CBus and another representing a I2CDevice which gets subclassed for different devices. An I2CDevice gets associated with a particular instance of I2CBus. > > A Smalltalk process polls one I/O pin every 100 ms where I generate interrupts in Hardware. Only then I deal with the other pins or I2C. > > The update of Raspbian which accommodated the RPi B2 broke may file interface to the GPIO pins by making the files for a freshly exported pin only accessible to root. So I'd have to export the pin, chmod its files as root and then deal with the the pins normally. > > Do you need root permissions in your approach? Does an upgraded Raspbian break your approach? For manipulating the GPIO files in sysfs on Raspbian I did not need root. However, when used on BeagleBone Black Ubuntu root was required. That?s Linux for you. I have not tried on a recent Raspbian. The /dev/mem solutions all required root of course. > > I think before I want a speedier /dev/mem interface I'd try to get I/O events into Squeak. But not for this project. > The /dev/mem provided by the FFI interfaces is immensely faster. For example I hooked up photocell and capacitor on a GPIO as sort of a (very) poor mans ADC to read the resistance of the photocell. Driving the GPIO low and then reversing the GPIO direction and polling continuously until it comes high was a way to measure the relative time it takes the circuit to charge. Doing this using the file i/o GPIO access was impossible since it was far too slow ? usually 1 or 2 polls and the GPIO had already returned to a 1. But with /dev/mem, I could get in the range of 200-400 or higher polls before logic high was detected. So the resolution was much much better. Of course, one could enable an interrupt on the pin but I wasn?t sure how to get that event quickly into Smalltalk. > If you like to discuss further (I do very much) we can take this to email. It would be great to collaborate on and publish a package to wrap GPIO, I2C, and PWM functionalities. I think we should combine our efforts with Tim?s too, as he has been using the wiringPi library via FFI for /dev/mem access, which is probably a better choice than the cobbled together library I used. I think we should include the file i/o based access methods for both GPIO and I2C since it gives some measure of portability to other Linux systems (such as the BeagleBone Black). > > Cheers, > > Herbert > > > Am 05.02.2015 um 08:18 schrieb Douglas McPherson: >> I?ve done similar things too. I created a GPIOPin class which uses an abstract GPIOAccessor class to actually perform the access. I have two concrete subclasses of GPIOAccessor, one uses the file interface like you did for portability (so it works on the BeagleBone Black for example), and the other uses an FFI I developed based on a library called libbcm2835 IIRC. >> >> For I2C I took a similar approach. I developed an abstract I2CBus class which has two concrete subclasses depending on access method. One uses the portable SMBus file i/o style of accessing I2C, the other is an FFI interface again using libbcm2835. >> >> The /dev/mem interfaces (the ones using FFI) are not portable and only work on the RPi, but they are /much/ faster. >> >> I?ve got flashing LEDS, buttons and many kinds of I2C sensors hooked up; even a kind of mini weather station I demoed at Camp Smalltalk Vancouver Island. I planned to release this months ago but got tied up with other stuff. I also was trying to decide whether to publish as an FFI library or go ahead and write a plugin. I decided a plugin would be better, but haven?t got around to writing it. >> >> I believe Tim has followed a similar FFI approach, except instead of using libbcm2835 he is using WiringPi. I think long term we should use WiringPi since it has a lot of traction in the RPi community, but perhaps make a plugin based on it for ease of distribution. >> >> I am happy to share all this .. I just got bogged down trying to figure out the best way to release it. >> >> Best, >> Doug >> >>> On Feb 4, 2015, at 22:54, Herbert K?nig wrote: >>> >>> >>> Am 05.02.2015 um 05:06 schrieb tim Rowledge: >>>> It may well come to that, but at the moment I?m playing around and an ffi call is (usually) easy. I can make an led blink and read a button now! Pretty cool, eh? >>>> >>> Hi, >>> I'm blinking LED's and read buttons via the Linux file interface (that broke with one of the last updates to Raspbian). >>> Are you willing to share what you are doing? Need a tester? >>> >>> I use I2C through OSProcess and i2ctools, are you working on that too? >>> >>> Cheers, >>> >>> Herbert >>> >> > > From eliot.miranda at gmail.com Thu Feb 5 20:54:55 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 5 20:54:58 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: On Wed, Feb 4, 2015 at 8:46 PM, Ron Teitelbaum wrote: > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of seven > members from our community. The current board members are: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Frank Shearar > 5. Craig Latta > 6. Chris Muller > 7. David T. Lewis > I'd like to stand again. My priorities for the community are - to continue improving the VM - with Spur, the new memory manager, that will be the VM for the Squeak 5.0 release - with a full 64-bit x64 JIT VM, and with an ARM JIT. - with Sista, Cl?ment Bera's adaptive optimizer - with a new FFI that will use Ronie Salgado's Lowcode that is an important component in Sista - to continue to foster collaboration with the Pharo community - to keep Squeak relevant, doing whatever I can to support existing users/programmers, or to bring in new users/programmers -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150205/10213b49/attachment.htm From tim at rowledge.org Thu Feb 5 20:59:50 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 5 20:59:55 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <13a601d04164$3929cc40$ab7d64c0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <13a601d04164$3929cc40$ab7d64c0$@usmedrec.com> Message-ID: On 05-02-2015, at 8:53 AM, Ron Teitelbaum wrote: > Hi All, > > Well we are off to a great start. We now have 1 candidate for 7 positions. Me too! I?d like to continue to cause trouble, annoy the annoyable, joust with windbags, push for good things and generally be tim. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: RDRI: Rotate Disk Right Immediate From edgardec2005 at gmail.com Fri Feb 6 08:50:00 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Fri Feb 6 08:50:11 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: Message-ID: Also have my vote :=) El 2/5/15, 5:59 PM, "tim Rowledge" escribi?: >I?d like to continue to cause trouble, annoy the annoyable, joust with >windbags, push for good things and generally be tim. > > >tim From craig at netjam.org Fri Feb 6 14:38:34 2015 From: craig at netjam.org (Craig Latta) Date: Fri Feb 6 14:38:48 2015 Subject: [squeak-dev] re: Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <54D4D1EA.5090400@netjam.org> Hi everyone-- I'd like to serve on the Squeak board again. In the current term, I've made progress on Context initiative[1] for bringing distributed modularity to Squeak and the other Smalltalks. I've worked with some brave testers, including Lawson English and Philippe Back. I contributed to our outreach effort by attending and speaking about Squeak again at FOSDEM 2015 [2] (video coming), attending Pharo Days[3], and mentioning Squeak on social media[4], my blog[5], and the weekly Smalltalk Reflections podcast[6] with my co-host David Buck. I'm collaborating with Bert and others on SqueakJS[7]. I'm writing WebSocket support so that SqueakJS systems can form peer-to-peer remote messaging meshes, like any normal Smalltalk (and for use with distributed modules). I started a Squeak presence at Slack[8], which is off to a good start for improving collaboration communication. My main priority for the next term is to put Naiad (the module system) into wider use. This will draw upon the other elements of Context (Spoon, the minimal object memory kernel, and Lightning, the remote messaging protocol). I would like to increase Squeak's presence at ESUG 2015 and other conferences, and in the Raspberry Pi community. I'd like to reduce the Squeak community's gender imbalance. Through outreach we can improve the situation, along with merely becoming more popular. Like the community itself, I think the board is very strong. I enjoy working with its members very much. Thanks for your vote! -C [1] http://thiscontext.com/2015/01/16/context-status-2015-01-16 [2] https://fosdem.org/2015 [3] https://medium.com/concerning-pharo/pharo-days-2015-6336d6ee2a23 [4] twitter: @ccrraaiigg (the other services, too) [5] http://thiscontext.com [6] http://bit.ly/1zb29Kn (itunes.apple.com) [7] http://try.squeak.org [8] http://squeak.slack.com [9] Thanks for looking at all this stuff. :) -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From herbertkoenig at gmx.net Fri Feb 6 20:59:24 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Fri Feb 6 20:59:27 2015 Subject: [squeak-dev] FFI calls to functions that expect pointers to write results into In-Reply-To: <4C9C854C-01EB-47FE-B181-6A177637E2AE@san.rr.com> References: <55CB8B86-1AD5-4AE5-957F-39BB612477B5@rowledge.org> <03F0AA73-C14F-4222-B9B2-D1E1BB277E50@rowledge.org> <20150205032752.GA12560@shell.msen.com> <472EAE9B-D0A0-4C7C-8662-F9833C6796DA@rowledge.org> <54D3139B.9000306@gmx.net> <2B66BE45-9FE2-4D3E-BF3D-2B2F9D8132A9@san.rr.com> <54D37D08.6000800@gmx.net> <4C9C854C-01EB-47FE-B181-6A177637E2AE@san.rr.com> Message-ID: <54D52B2C.6060503@gmx.net> Hie Doug, Am 05.02.2015 um 18:00 schrieb Douglas McPherson: > The /dev/mem provided by the FFI interfaces is immensely faster. For > example I hooked up photocell and capacitor on a GPIO as sort of a > (very) poor mans ADC to read the resistance of the photocell. Driving > the GPIO low and then reversing the GPIO direction and polling > continuously until it comes high was a way to measure the relative > time it takes the circuit to charge. I can appreciate that (EE background :-)) > It would be great to collaborate on and publish a package to wrap > GPIO, I2C, and PWM functionalities. I think we should combine our > efforts with Tim?s too, as he has been using the wiringPi library via > FFI for /dev/mem access, which is probably a better choice than the > cobbled together library I used. I think we should include the file > i/o based access methods for both GPIO and I2C since it gives some > measure of portability to other Linux systems (such as the BeagleBone > Black). Definitely yes to all. I'll cook up some documentation, then send you my code. It's a mere 12K fileout. Right now I have the problem that it crashes the Pi after about 12 hours, no signs of warning. The Pi is unwilling to start another process. In the X server I can't open other programs any more and if I try to SSH into the Pi it says 'The computer is not willing to start a shell'. Dunno if it's the latest Raspbian update or my use of OSProcess or GPIO. So I started everything on a not updated Pi. Half a day between Errors is not nice to debug :-)) I had two crashes up to now. Tomorrow I'll know more. Cheers, Herbert From jannik.laval at gmail.com Fri Feb 6 21:17:47 2015 From: jannik.laval at gmail.com (jannik laval) Date: Fri Feb 6 21:17:58 2015 Subject: [squeak-dev] CFP - IWST 2015 Message-ID: [Please accept our apologies if you receive multiple copies of this call] [Please send to interested colleagues / mailing-lists] ************************************************************************************************************ CALL FOR PAPERS IWST15 ? International Workshop on Smalltalk Technologies Brescia, Italy; July 15, 2015 http://www.esug.org/wiki/pier/Conferences/2015/International-Workshop-IWST_15 ************************************************************************************************************ ------------------- Goals and scopes ------------------- The goals of the workshop is to create a forum around advances or experience in Smalltalk and to trigger discussions and exchanges of ideas. The topics of your paper can be on all aspect of Smalltalk, theoretical as well as practical. Participants are invited to submit research articles or industrial papers. This year we want to open two different tracks: one research track and one industrial track with less scientific constraints. We expect papers of three kinds: Short position papers describing emerging ideas Long research papers with deeper description of experiments and of research results. Industrial papers with presentation of real and innovative Smalltalk applications; this kind of paper should enlighten why Smalltalk is really appropriate for your application. We will not enforce any length restriction. -------------------- Important Dates -------------------- Submission deadline: April 10th, 2015 Notification deadline: May 20th, 2015 Workshop : July 15th, 2015 All accepted papers will be published in ACM DL (To be confirmed) ------------------- Topics ------------------- We welcome contributions on all aspects, theoretical as well as practical, of Smalltalk related topics such as: -Aspect-oriented programming, -Design patterns, -Experience reports, -Frameworks, -Implementation, new dialects or languages implemented in Smalltalk, -Interaction with other languages, -Meta-programming and Meta-modeling, -Tools ------------------- Best Paper Award ------------------- To encourage the submission of high-quality papers, the IWST organizing committee is very proud to announce a Best Paper Award for this edition of IWST. We thank the Lam Research Corporation for its financial contribution which makes it possible for prizes for the three best papers: 1000 USD for first place, 600 USD for second place and 400 USD for third place. The ranking will be decided by the program committee during the review process. The awards will be given during the ESUG conference social event. The Best Paper Award will take place only with a minimum of six submissions. Notice also that to be illegible, a paper must be presented at the workshop by one of the author and that the presenting author must be registered at the ESUG conference. ------------------- Publication ------------------- Both submissions and final papers must be prepared using the ACM SIGPLAN 10 point format. Templates for Word and LaTeX are available at http://www.acm.org/sigs/sigplan/authorInformation.htm. This site also contains links to useful informations on how to write effective submissions. ------------------- Submission ------------------- All submissions must be sent via easychair: https://easychair.org/conferences/?conf=iwst2015 ------------------- Program chairs ------------------- Anne Etien (Universit? de Lille 1, France) Jannik Laval (Ecole des Mines de Douai, France) -- ~~Jannik Laval~~ ?cole des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://www.approchealpes.info http://car.mines-douai.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150206/c8cd4ef7/attachment.htm From ma.chris.m at gmail.com Fri Feb 6 22:29:01 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Feb 6 22:29:04 2015 Subject: [Board] Re: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <13a601d04164$3929cc40$ab7d64c0$@usmedrec.com> Message-ID: On Thu, Feb 5, 2015 at 2:59 PM, tim Rowledge wrote: > > On 05-02-2015, at 8:53 AM, Ron Teitelbaum wrote: > >> Hi All, >> >> Well we are off to a great start. We now have 1 candidate for 7 positions. > > Me too! > > I?d like to continue to cause trouble, annoy the annoyable, joust with windbags, push for good things and generally be tim. You should be commended for the fantastic job you did! ;) From commits at source.squeak.org Fri Feb 6 23:01:45 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 6 23:01:46 2015 Subject: [squeak-dev] The Trunk: Tests-eem.311.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.311.mcz ==================== Summary ==================== Name: Tests-eem.311 Author: eem Time: 6 February 2015, 3:01:31.128 pm UUID: b80216c2-f80e-4e1a-aa1a-e87310d382bf Ancestors: Tests-eem.310 Eliminate an interactive prompt in the MCEnvironmentLoadTest =============== Diff against Tests-eem.310 =============== Item was changed: ----- Method: MCEnvironmentLoadTest>>testLoadIntoEnvironment (in category 'testing') ----- testLoadIntoEnvironment + [[MCPackageLoader installSnapshot: self mockSnapshot] + valueSupplyingAnswers: #(('The pool dictionary*does not exist*automatically created?' true))] + on: CurrentEnvironment + do: [:e | e resume: environment]. + self assert: (environment bindingOf: #MCMockClassA) notNil + description: 'Environment has no binding for MCMockClassA'.! - [MCPackageLoader installSnapshot: self mockSnapshot] on: CurrentEnvironment do: [:e | e resume: environment]. - self assert: (environment bindingOf: #MCMockClassA) notNil description: 'Environment has no binding for MCMockClassA'.! From lewis at mail.msen.com Sat Feb 7 02:58:06 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Feb 7 02:58:09 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <54D1EE96.8090102@gmx.net> References: <54D0D202.7030408@gmx.net> <20150204000144.GB27170@shell.msen.com> <54D1EE96.8090102@gmx.net> Message-ID: <20150207025806.GA70389@shell.msen.com> On Wed, Feb 04, 2015 at 11:04:06AM +0100, Herbert K?nig wrote: > Hi Dave, > > >All of the child processes that run in your current Squeak session (beginning > >when you start the image) are saved in a dictionary. This is just to make > >them browsable (OSProcess thisOSProcess allMyChildren). > > > >Unregistering each child process, as you suggest above, will work fine, at > >least after fixing the bug that you found (thank you for that, it is updated > >on squeaksource now). > > > >But you can also clean up all of the terminated processes like this: > > > > OSProcess thisOSProcess discardExitedChildren > > > >Or you can empty the dictionary completely: > > > > OSProcess thisOSProcess resetChildProcessDictionary > > thanks, these helped a lot. > > >process every few seconds, maybe for a long time) I can see that it might > >be a real problem. Do you think that this should be changed? > > I have been doing embedded with scarce RAM and now I play with home > automation (in a very broad sense) which is supposed to run 24/7 me > being abroad and my family not programming. > > From this perspective my immediate instinct is to not collect the > instances at all. Now that I know about the fact I prefer to remove > them myself. But I'm sure other users have a different perspective on > this and you might break somebody's code if you wouldn't collect them at > all. > > I former uses I collected the processes myself (to kill them, query > their state) and for that purpose wouldn't want to pick them out of a > dictionary. > > I'm very interested in learning when this dictionary comes in handy or > is needed because I see many methods referencing allMyChildren but most > of them are not sent in my image so I can't find out. Hi Herbert, I think I finally came up with a way to handle this problem in a better way. I changed the child process registry to be a list of recent child processes, and set it up so the list gets pruned to a reasonable size every time a new child process is registered. I kept "OSProcess thisOSProcess allMyChildren" as a way to get a dictionary of recent child processes, so this is still easy to browse as before. For your application with home automation, you should see the child process list maintained at a maximum size of 20, trimmed continuously as each new process is started. The update on squeaksource.com is: Name: OSProcess-dtl.95 Author: dtl Time: 6 February 2015, 9:02:45.087 pm UUID: aaffb554-75d2-406d-be2b-f9d83428f6a8 Ancestors: OSProcess-dtl.94 OSProcess 4.5.16 The allMyChildren registry is convenient for browsing, but should not be allowed to accumulate exited children without limit. Change it from a dictionary to an ordered collection, retaining #allMyChildren as a method that answers a dictionary of process proxies by pid. Internally keep a list of recent children, and prune the list to a reasonable size each time a new child process is registered. Dave From ron at usmedrec.com Sat Feb 7 03:39:38 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Feb 7 03:39:49 2015 Subject: [squeak-dev] RE: Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <18a601d04287$b3553b70$19ffb250$@usmedrec.com> Hi All, I hope everyone has a wonderful weekend. Just a reminder that you don't have to wait for Monday to announce your candidacy for the Squeak Oversight Board. So far we have 4 candidates for 7 spots. Candidates (order of announcement): 1. Casey Ransberger 2. Eliot Miranda 3. Tim Rowledge 4. Craig Latta If you are going to run please announce your intention to run soon. You have until Monday 16th of February 3PM (20.00 UTC). Thank you for your work on Squeak! All the best, Ron Teitelbaum > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of seven > members from our community. The current board members are: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Frank Shearar > 5. Craig Latta > 6. Chris Muller > 7. David T. Lewis > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure that > person really wants to run. :) I will not put anyone on the candidate list > until that person makes it known on squeak-dev that he/she intends to run. > > During this period, the candidates should ideally present themselves on > squeak-dev, unless they have already done so, and the community can ask > questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some > people will not run without encouragement. Also I know that some people > wait to the last minute to run for the board to see if others will run but > please consider getting this year off to a faster start and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of > SOB members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election > starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. > You > MUST try to get on the voter list before the 16th of February 2014 or you > will NOT be able to vote. If your Email has changed please make sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter list, no > worries! If you are a new Squeaker and wish to vote do ONE of the > following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker sends > an email to voters (at) squeak.org giving me name and email for you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I will > closely track it - or send email to voters (at) squeak.org which points to me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > From casey.obrien.r at gmail.com Sat Feb 7 10:13:03 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Sat Feb 7 10:13:08 2015 Subject: [squeak-dev] re: Squeak Oversight Board 2015 Elections In-Reply-To: <54D4D1EA.5090400@netjam.org> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <54D4D1EA.5090400@netjam.org> Message-ID: Below, heavily snipped. > On Feb 6, 2015, at 6:38 AM, Craig Latta wrote: > > I'd like to reduce the Squeak community's gender imbalance. This alone is a good reason to vote for Craig. The other things he listed were also golden, but if he'd run on just this one sentence alone, he'd have my vote. Vote for Craig. --Casey From stephan at stack.nl Sat Feb 7 08:41:19 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Feb 7 10:15:06 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> Message-ID: On 05/02/15 16:52, Frank Shearar wrote: > On 5 February 2015 at 15:35, Levente Uzonyi wrote: >> Rebuilding the whole AST after every keystroke is possible, but keeping it >> real-time is a bit challenging. >> >> I would love to see an editor, which works on the AST directly - aka it maps >> the source code to AST nodes, and just updates the smallest possible subtree >> at each keystroke. Implementing such editor has it's challenges ofc, like >> typing a single character can invalidate the whole code, but the editor >> should keep the AST somehow in that case too. > > C#'s Roslyn does this: > http://blogs.msdn.com/b/ericlippert/archive/2012/06/08/persistence-facades-and-roslyn-s-red-green-trees.aspx This is an interesting approach. Their problem is not just updating the AST after every keystroke but keeping usable performance when doing code rewriting/refactoring. My first Macintosh, a SE/30 with a 16 MHz 68030, was able to do this with Think Pascal (by Mel Conway) 25 years ago. On my next machine, a 25 MHz 68040LC was fast enough... Stephan From lewis at mail.msen.com Sat Feb 7 15:18:40 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Feb 7 15:18:53 2015 Subject: [squeak-dev] Re: [Pharo-dev] || In-Reply-To: <235C7562-3A3A-4879-ACFA-CA16367D58EC@inria.fr> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> <235C7562-3A3A-4879-ACFA-CA16367D58EC@inria.fr> Message-ID: <20150207151840.GA81680@shell.msen.com> On Thu, Feb 05, 2015 at 01:54:51PM +0100, Marcus Denker wrote: > > > On 05 Feb 2015, at 10:12, Marcus Denker wrote: > >> > >> On 05 Feb 2015, at 10:04, Marcus Denker wrote: > > > > Another way to see it: How would the original Smalltalk be designed if they would have had 4GB RAM in 1978? > > > > What fascinates me still is that Smalltalk used the existing resources (even building their own machines) to an > > extreme, while today we are obsessed to find reasons why we can not do anything that makes the system > > slower or use more memory than yesterday. And that even with resources growing every year??? > > > > This is why we e.g. now have a meta object describing every instance variable in Pharo. I am sure there are people > > who will see these ~7000 objects as pure waste??? while I would say that we have already *now* the resources to be > > even more radical. > > > > Seemingly I still can not explain what I mean in away that people get it, so please just ignore this mail. > > Marcus > Your point makes good sense to me. In 1978, a system in which a low-level integer was represented as an object with behavior would have been perceived as a rediculously wasteful idea. And can you imagine someone seriously suggesting something so wasteful as automatic memory management? So if the "same" system was being designed today, it might very well include new concepts that today are perceived as wasteful. Some of those concepts might turn out to be very good thing once we get used to them. Dave From a.wacknitz at gmx.de Sat Feb 7 16:01:30 2015 From: a.wacknitz at gmx.de (Andreas Wacknitz) Date: Sat Feb 7 16:01:40 2015 Subject: [Pharo-dev] [squeak-dev] Re: || In-Reply-To: <20150207151840.GA81680@shell.msen.com> References: <87F10A88-AE09-4055-83C9-672EC75ADBD8@inria.fr> <6EED3CDD-9A0E-415E-8D38-110D1D729C22@inria.fr> <36A3BAE0-49FA-4C1D-9FAE-367D151E8696@inria.fr> <235C7562-3A3A-4879-ACFA-CA16367D58EC@inria.fr> <20150207151840.GA81680@shell.msen.com> Message-ID: > Am 07.02.2015 um 16:18 schrieb David T. Lewis : > > On Thu, Feb 05, 2015 at 01:54:51PM +0100, Marcus Denker wrote: >> >>> On 05 Feb 2015, at 10:12, Marcus Denker wrote: >>>> >>>> On 05 Feb 2015, at 10:04, Marcus Denker wrote: >>> >>> Another way to see it: How would the original Smalltalk be designed if they would have had 4GB RAM in 1978? >>> >>> What fascinates me still is that Smalltalk used the existing resources (even building their own machines) to an >>> extreme, while today we are obsessed to find reasons why we can not do anything that makes the system >>> slower or use more memory than yesterday. And that even with resources growing every year??? >>> >>> This is why we e.g. now have a meta object describing every instance variable in Pharo. I am sure there are people >>> who will see these ~7000 objects as pure waste??? while I would say that we have already *now* the resources to be >>> even more radical. >>> >> >> Seemingly I still can not explain what I mean in away that people get it, so please just ignore this mail. >> >> Marcus >> > > Your point makes good sense to me. In 1978, a system in which a low-level > integer was represented as an object with behavior would have been perceived > as a rediculously wasteful idea. And can you imagine someone seriously > suggesting something so wasteful as automatic memory management? > > So if the "same" system was being designed today, it might very well include > new concepts that today are perceived as wasteful. Some of those concepts > might turn out to be very good thing once we get used to them. The times have changed. Today waste seems to be a requirement. Whatever application you have - reimplement it using ?web technologies?. Whatever data you have - store it in ?the cloud? and tunnel its transportation over port 80, gain extra points for using XML here. Today, beautiful small things like Smalltalk are ignored by the masses and being laughed at. Andreas From herbertkoenig at gmx.net Sat Feb 7 16:23:19 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Sat Feb 7 16:23:20 2015 Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess In-Reply-To: <20150207025806.GA70389@shell.msen.com> References: <54D0D202.7030408@gmx.net> <20150204000144.GB27170@shell.msen.com> <54D1EE96.8090102@gmx.net> <20150207025806.GA70389@shell.msen.com> Message-ID: <54D63BF7.1060601@gmx.net> Hi Dave, Am 07.02.2015 um 03:58 schrieb David T. Lewis: > Hi Herbert, I think I finally came up with a way to handle this > problem in a better way. I changed the child process registry to be a > list of recent child processes, and set it up so the list gets pruned > to a reasonable size every time a new child process is registered. I > kept "OSProcess thisOSProcess allMyChildren" as a way to get a > dictionary of recent child processes, so this is still easy to browse > as before. For your application with home automation, you should see > the child process list maintained at a maximum size of 20, trimmed > continuously as each new process is started. The update on > squeaksource.com is: Name: OSProcess-dtl.95 Author: dtl Time: 6 > February 2015, 9:02:45.087 pm UUID: > aaffb554-75d2-406d-be2b-f9d83428f6a8 Ancestors: OSProcess-dtl.94 > OSProcess 4.5.16 The allMyChildren registry is convenient for > browsing, but should not be allowed to accumulate exited children > without limit. Change it from a dictionary to an ordered collection, > retaining #allMyChildren as a method that answers a dictionary of > process proxies by pid. Internally keep a list of recent children, and > prune the list to a reasonable size each time a new child process is > registered. > Dave I'll try this next, it sounds good. Especially as unregistering the processes failed though I tried to unregister them with the changed version of the method. But my problems are not from a growing allMyChildren so I'll open another thread for this. Thanks, Herbert From herbertkoenig at gmx.net Sat Feb 7 17:11:16 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Sat Feb 7 17:11:17 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process Message-ID: <54D64734.1030003@gmx.net> Hi, I managed to make Raspbian unwilling to open any new process. Neither in the X session, nor from Squeak nor from a SSH session. It seems I create Zombie processes (what is that, in the SSH session I ran top and it reports thousands of zombies). What I do: I poll a GPIO pin every 100ms. When it is high I query I2C via: (PipeableOSProcess command: 'i2cget -y ', busNo, ' ', address) output and when I find a certain bit set, I switch on some LEDs via: current := ExternalUnixOSProcess command: 'i2cset -y ', busNo, ' ', address, ' ', aString. OSProcess thisOSProcess unregisterChildProcess: current. "This doesn't unregister the process?????" current := nil. I found 2700++ instances of ExternalOSProcess, emptied the Dictionary via UnixProcess>>unregisterChildProcess and it stopped when it accumulated to another 900+ instances. This ran for half a day until It can't start another process. First I thought this was the Raspbian update for the PasPi B2 but now I reproduced it on a Pi A+ last updated mid January. Having read Wikipedia on Zombie Process it seems, that I should try to kill each process I started? What do I do to the PipeableOSProcess? closePipes? release? Thanks, Herbert From herbertkoenig at gmx.net Sat Feb 7 18:46:43 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Sat Feb 7 18:46:45 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process In-Reply-To: <54D64734.1030003@gmx.net> References: <54D64734.1030003@gmx.net> Message-ID: <54D65D93.4070906@gmx.net> Hi, now that I noticed the zombies I can experiment much faster so here some further information: Stopping Squeak removes all Zombies. Each sensor event creates 3 Zombies, two for the I2Csends, one for the I2Cread. Sending the PipeableOSProcess instances #closePipes then #release doesn't help. Sending the ExternalUnixProcess instances #terminate doesn't help either. Sending an additional PipeableOSProcess>>unixCommandPipeLine doesn't add a Zombie but returns ''. PipeableOSProcess>>tkExample works fine and doesn't add Zombies. So is it a problem of I2Ctools? Should I try other Linux commands? Thanks, Herbert Am 07.02.2015 um 18:11 schrieb Herbert K?nig: > Hi, > > I managed to make Raspbian unwilling to open any new process. Neither > in the X session, nor from Squeak nor from a SSH session. > It seems I create Zombie processes (what is that, in the SSH session I > ran top and it reports thousands of zombies). > > What I do: I poll a GPIO pin every 100ms. When it is high I query I2C > via: > (PipeableOSProcess command: 'i2cget -y ', busNo, ' ', address) output > > and when I find a certain bit set, I switch on some LEDs via: > current := ExternalUnixOSProcess command: 'i2cset -y ', busNo, ' ', > address, ' ', aString. > OSProcess thisOSProcess unregisterChildProcess: current. "This doesn't > unregister the process?????" > current := nil. > > I found 2700++ instances of ExternalOSProcess, emptied the Dictionary > via UnixProcess>>unregisterChildProcess and it stopped when it > accumulated to another 900+ instances. > > This ran for half a day until It can't start another process. First I > thought this was the Raspbian update for the PasPi B2 but now I > reproduced it on a Pi A+ last updated mid January. > > Having read Wikipedia on Zombie Process it seems, that I should try to > kill each process I started? > What do I do to the PipeableOSProcess? closePipes? release? > > Thanks, > > Herbert > > > > From bernhard at pieber.com Sat Feb 7 20:28:59 2015 From: bernhard at pieber.com (Bernhard Pieber) Date: Sat Feb 7 20:29:05 2015 Subject: [squeak-dev] How to update trunk46-spur.image? Message-ID: <619F6C5A-1E87-4AAA-A111-F7D8B7AF87C3@pieber.com> Dear Squeakers, I want to have a look at the latest Spur trunk image and run into some issues updating. I am on OS X Yosemite 10.10.2. Here are the steps I do: 1. I create an empty folder. 2. Into this I download and unzip the latest CogSpur VM: http://www.mirandabanda.org/files/Cog/VM/VM.r3248/CogSpur.app-15.05.3248.tgz 3. I download and unzip the latest SqueakV41.sources: ftp://ftp.squeak.org/4.5/SqueakV41.sources.zip 4. I download trunk46-spur.image and trunk46-spur.changes from http://www.mirandabanda.org/files/Cog/VM/SpurImages/ 5. I open the trunk46-spur.image with CogSpur.app. 6. I update Squeak using the drop-down menu. It starts updating and then opens a dialog box saying "No changes". 7. I click "OK". 8. It continues to update and opens a merge dialog: Merging Kernel.spur-nice.881 during processing update.spur-ul.295.mcm. Does anyone have the same problem? I am not sure what is the best/correct way to proceed. Any tips? Cheers, Bernhard From eliot.miranda at gmail.com Sat Feb 7 20:30:39 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Feb 7 20:30:43 2015 Subject: [squeak-dev] How to update trunk46-spur.image? In-Reply-To: <619F6C5A-1E87-4AAA-A111-F7D8B7AF87C3@pieber.com> References: <619F6C5A-1E87-4AAA-A111-F7D8B7AF87C3@pieber.com> Message-ID: On Sat, Feb 7, 2015 at 12:28 PM, Bernhard Pieber wrote: > Dear Squeakers, > > I want to have a look at the latest Spur trunk image and run into some > issues updating. > > I am on OS X Yosemite 10.10.2. Here are the steps I do: > 1. I create an empty folder. > 2. Into this I download and unzip the latest CogSpur VM: > http://www.mirandabanda.org/files/Cog/VM/VM.r3248/CogSpur.app-15.05.3248.tgz > 3. I download and unzip the latest SqueakV41.sources: > ftp://ftp.squeak.org/4.5/SqueakV41.sources.zip > 4. I download trunk46-spur.image and trunk46-spur.changes from > http://www.mirandabanda.org/files/Cog/VM/SpurImages/ > 5. I open the trunk46-spur.image with CogSpur.app. > 6. I update Squeak using the drop-down menu. It starts updating and then > opens a dialog box saying "No changes". > 7. I click "OK". > 8. It continues to update and opens a merge dialog: Merging > Kernel.spur-nice.881 during processing update.spur-ul.295.mcm. > > Does anyone have the same problem? > > I am not sure what is the best/correct way to proceed. Any tips? > Hi Bernard, I'll update a new image soon that doesn't have this problem. But for now reject all the black changes and merge. > > Cheers, > Bernhard > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150207/5e26e712/attachment.htm From tim at rowledge.org Sun Feb 8 00:47:53 2015 From: tim at rowledge.org (tim Rowledge) Date: Sun Feb 8 00:47:59 2015 Subject: [squeak-dev] v4linux & CameraPlugin Message-ID: <8ECB2875-E45D-4FB0-9A3A-A039BAFA286A@rowledge.org> Is there anyone out there that actually feels they understand v4linux and how it is supposed to work with the CameraPlugin? At the moment, on a Pi, it works *once* but only once per run of squeak. The error message is libv4l2: error setting pixformat: Device or resource busy which seems to be a very common problem if you do a quick google. The problem is that it appears to have been common for a lot of people for a long time and many of the purported fixes make no sense to me at all. It doesn?t help that the code in the CameraPlugin/sqCamera-linux.c file doesn?t appear to fit in my head either. Mind you, it does at least have the colours correct now; last time I managed to try it out (and I can?t recall whether it worked more than once back then, unfortunately) the RGB was more BGR. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim On a clear disk you can seek forever... From lewis at mail.msen.com Sun Feb 8 19:42:53 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Feb 8 19:42:56 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <20150208194253.GA57758@shell.msen.com> On Wed, Feb 04, 2015 at 11:46:11PM -0500, Ron Teitelbaum wrote: > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to serve! > Squeak wants you! > I am running for a position on the board again this year. I see 2015 as a very important year for Squeak. We are moving to an advanced 64-bit image and VM, and at the same time we are seeing the amazing run-anywhere portability of the SqueakJS VM that can host all the images of the last 15 years on any computer with a modern web browser. This range of capability, performance, and portability is unmatched by anything else I know of in the world of computing. Our challenge as a community is to keep all of these things working and easily accessible to people all around the world, running all sorts of computers, everyone from young kids in schools to people pursuing advanced computer science research. I participate in Squeak as a hobby programmer, and I value things like FunSqueak, Scratch, and Etoys that make computing fun and accessible to all. I see Squeak as much more than technology, it is a human-focused system that needs insight and vision in order to thrive and grow. We really need to bring women into the community. And we need to do a better job of connecting with Squeak users and contributors around the world, especially in places where English language is not a first language. Dave From lewis at mail.msen.com Sun Feb 8 20:04:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Feb 8 20:04:33 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process In-Reply-To: <54D65D93.4070906@gmx.net> References: <54D64734.1030003@gmx.net> <54D65D93.4070906@gmx.net> Message-ID: <20150208200431.GA59498@shell.msen.com> Hi Herbert, On Sat, Feb 07, 2015 at 07:46:43PM +0100, Herbert K??nig wrote: > Hi, > > now that I noticed the zombies I can experiment much faster so here some > further information: > > Stopping Squeak removes all Zombies. Each sensor event creates 3 > Zombies, two for the I2Csends, one for the I2Cread. > Sending the PipeableOSProcess instances #closePipes then #release > doesn't help. > Sending the ExternalUnixProcess instances #terminate doesn't help either. > Sending an additional PipeableOSProcess>>unixCommandPipeLine doesn't add > a Zombie but returns ''. > PipeableOSProcess>>tkExample works fine and doesn't add Zombies. > > So is it a problem of I2Ctools? Should I try other Linux commands? > This looks like some kind of problem in OSProcess. I am not sure what is wrong, so let me try to explain how it works. In Unix, a zombie process is a process that has exited, but its parent process has not yet acknowledged that it has exited. When you run a command with OSProcess, it starts a new process that is a child of the VM process. When that external process exits, it is the responsibility of OSProcess (running in the VM process) to notice this, and to acknowledge the exit by calling the Unix waitpid() system call. When things are working right, you should be able to open a process browser in Squeak, and see an active process labeled "the child OSProcess watcher". That process is normally blocking on a Semaphore, and it wake up whenever the semaphore is signalled (which occurs when the OSProcess plugin detects a SIGCHLD signal from the operating system). Each time it wakes up, it calls a primitive (UnixOSProcessPlugin>>primitiveReapChildProcess). That primitive uses a call to waitpid() to obtain the exit status of the child process, and as soon as that happens the process is no longer in a zombie state. I am not sure where this is going wrong, but one thing you can try is to restart the child watcher process, and see if that makes the zombies go away: "OSProcess accessor restartChildWatcherProcess" The actual child watcher process is UnixOSProcessAccessor>>grimReaperProcess, so you may want to look at that and see if it gives you any other ideas. Please let us know if you figure out the problem. Whatever is going wrong here, I definitely want to get it fixed. Thanks, Dave > Thanks, > > Herbert > > > Am 07.02.2015 um 18:11 schrieb Herbert K??nig: > >Hi, > > > >I managed to make Raspbian unwilling to open any new process. Neither > >in the X session, nor from Squeak nor from a SSH session. > >It seems I create Zombie processes (what is that, in the SSH session I > >ran top and it reports thousands of zombies). > > > >What I do: I poll a GPIO pin every 100ms. When it is high I query I2C > >via: > >(PipeableOSProcess command: 'i2cget -y ', busNo, ' ', address) output > > > >and when I find a certain bit set, I switch on some LEDs via: > >current := ExternalUnixOSProcess command: 'i2cset -y ', busNo, ' ', > >address, ' ', aString. > >OSProcess thisOSProcess unregisterChildProcess: current. "This doesn't > >unregister the process?????" > >current := nil. > > > >I found 2700++ instances of ExternalOSProcess, emptied the Dictionary > >via UnixProcess>>unregisterChildProcess and it stopped when it > >accumulated to another 900+ instances. > > > >This ran for half a day until It can't start another process. First I > >thought this was the Raspbian update for the PasPi B2 but now I > >reproduced it on a Pi A+ last updated mid January. > > > >Having read Wikipedia on Zombie Process it seems, that I should try to > >kill each process I started? > >What do I do to the PipeableOSProcess? closePipes? release? > > > >Thanks, > > > >Herbert > > > > > > > > > From edgardec2005 at gmail.com Sun Feb 8 20:06:20 2015 From: edgardec2005 at gmail.com (Edgar J De Cleene) Date: Sun Feb 8 20:06:23 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <20150208194253.GA57758@shell.msen.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <20150208194253.GA57758@shell.msen.com> Message-ID: <80FBCC0F-5BA1-4E31-A33F-DF80C39CE21B@gmail.com> Seems this year we have a amazing Board again. Bravo Dave ! Env?ado desde Edgar's iPad mini > El 8/2/2015, a las 16:42, David T. Lewis escribi?: > >> On Wed, Feb 04, 2015 at 11:46:11PM -0500, Ron Teitelbaum wrote: >> Hi All, >> >> It's that time again. Time to raise your voices and elect your leaders! >> It's a time for you to stand up, help your community and volunteer to serve! >> Squeak wants you! >> > > I am running for a position on the board again this year. > > I see 2015 as a very important year for Squeak. We are moving to an > advanced 64-bit image and VM, and at the same time we are seeing the > amazing run-anywhere portability of the SqueakJS VM that can host all > the images of the last 15 years on any computer with a modern web browser. > This range of capability, performance, and portability is unmatched by > anything else I know of in the world of computing. Our challenge as a > community is to keep all of these things working and easily accessible > to people all around the world, running all sorts of computers, everyone > from young kids in schools to people pursuing advanced computer science > research. > > I participate in Squeak as a hobby programmer, and I value things like > FunSqueak, Scratch, and Etoys that make computing fun and accessible to > all. I see Squeak as much more than technology, it is a human-focused > system that needs insight and vision in order to thrive and grow. We > really need to bring women into the community. And we need to do a better > job of connecting with Squeak users and contributors around the world, > especially in places where English language is not a first language. > > Dave > > From fabian.windheuser at student.hpi.de Mon Feb 9 13:41:45 2015 From: fabian.windheuser at student.hpi.de (Fabian Windheuser) Date: Mon Feb 9 13:42:18 2015 Subject: [squeak-dev] Error when saving class comments Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Error_RemoteString.png Type: image/png Size: 25124 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150209/a3737bf4/Error_RemoteString.png From herbertkoenig at gmx.net Mon Feb 9 14:38:09 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Mon Feb 9 14:38:12 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process In-Reply-To: <20150208200431.GA59498@shell.msen.com> References: <54D64734.1030003@gmx.net> <54D65D93.4070906@gmx.net> <20150208200431.GA59498@shell.msen.com> Message-ID: <54D8C651.7010001@gmx.net> Hi David, Am 08.02.2015 um 21:04 schrieb David T. Lewis: > This looks like some kind of problem in OSProcess. I am not sure what > is wrong, so let me try to explain how it works. In Unix, a zombie > process is a process that has exited, but its parent process has not > yet acknowledged that it has exited. When you run a command with > OSProcess, it starts a new process that is a child of the VM process. > When that external process exits, it is the responsibility of > OSProcess (running in the VM process) to notice this, and to > acknowledge the exit by calling the Unix waitpid() system call. When > things are working right, you should be able to open a process browser > in Squeak, and see an active process labeled "the child OSProcess > watcher". I see that process while producing Zombies > That process is normally blocking on a Semaphore, and it wake up > whenever the semaphore is signalled (which occurs when the OSProcess > plugin detects a SIGCHLD signal from the operating system). Each time > it wakes up, it calls a primitive > (UnixOSProcessPlugin>>primitiveReapChildProcess). That primitive uses > a call to waitpid() to obtain the exit status of the child process, > and as soon as that happens the process is no longer in a zombie > state. I am not sure where this is going wrong, but one thing you can > try is to restart the child watcher process, and see if that makes the > zombies go away: "OSProcess accessor restartChildWatcherProcess" leaves the number of Zombies constant and continues to produce new ones on each call of ExternalUnixOSProcess>>command > The actual child watcher process is > UnixOSProcessAccessor>>grimReaperProcess, so you may want to look at that That looked like more than I can handle before I'm off again so I tried something different. On Saturday I had bookmarked: http://en.wikipedia.org/wiki/Zombie_process where the fourth paragraph of the overview section talks about sending SIGCHLD so I tried that. It works but only adds to the mystery. For each event in the real world (me moving in front of a PIR sensor) I send one PipeableOSProcess command: 'i2cget -y 1 0x20) and two ExternalUnixOSProcess command: 'i2cset -y 1 0x20', commandByte This gave me three new Zombies per event. PipeableOSProcess does not understand sigchld so I only sent sigchld to the two ExternalUnixOSProcess end expected a reduction to one Zombie per event. But no more Zombies are produced. We called that "Fehler unerkannt entkommen" (roughly "the error escaped incognito") and I'm very interested what happened here. > and see if it gives you any other ideas. Please let us know if you > figure out the problem. Whatever is going wrong here, I definitely > want to get it fixed. Thanks, Dave Later I'll try to step through grimReaperProcess to see what I can learn. And then I'll also look at the version of OSProcess you recently uploaded. Also the other mystery: When I overflowed the process table I couldn't from a terminal do 'ls | grep something' but I could do that via ExternalUnixOSProcess without creating additional Zombies. So which commands create Zombies and which don't? Cheers, Herbert From eliot.miranda at gmail.com Mon Feb 9 14:55:06 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 9 14:55:11 2015 Subject: [squeak-dev] Error when saving class comments In-Reply-To: References: Message-ID: <06A635A5-9F71-4BD2-B401-30C4C979BB14@gmail.com> Hi Fabian, what are the permissions on the changes file? What happens when you save a method? Eliot (phone) On Feb 9, 2015, at 5:41 AM, Fabian Windheuser wrote: > Hello, > Whenever I try to modify and save a class comment I get the following error: > "Error: RemoteString past end of file" (see the attachment for the error trace). > > My changes are not getting saved and the file seems to get corrupted. I am no longer able to reopen this class comment because it always throws the same error. > I tried restarting my image and using new unmodified .image and .changes files however the error still occurred. > > I am running Squeak 4.5 with update number #13702 on a 64bit Arch Linux distribution. > > Best regards, > Fabian > > > > From bert at freudenbergs.de Mon Feb 9 16:36:11 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Feb 9 16:36:12 2015 Subject: [squeak-dev] v4linux & CameraPlugin In-Reply-To: <8ECB2875-E45D-4FB0-9A3A-A039BAFA286A@rowledge.org> References: <8ECB2875-E45D-4FB0-9A3A-A039BAFA286A@rowledge.org> Message-ID: <3D632914-1612-4AC2-847C-DFF3354C2DC2@freudenbergs.de> On 08.02.2015, at 01:47, tim Rowledge wrote: > > Is there anyone out there that actually feels they understand v4linux and how it is supposed to work with the CameraPlugin? Well, I suppose Derek (the original author) would have an idea. Cc'ed. Also, v4l has an IRC channel and a mailing list: http://www.linuxtv.org/lists.php > At the moment, on a Pi, it works *once* but only once per run of squeak. The error message is > libv4l2: error setting pixformat: Device or resource busy > which seems to be a very common problem if you do a quick google. The problem is that it appears to have been common for a lot of people for a long time and many of the purported fixes make no sense to me at all. It doesn?t help that the code in the CameraPlugin/sqCamera-linux.c file doesn?t appear to fit in my head either. > > Mind you, it does at least have the colours correct now; last time I managed to try it out (and I can?t recall whether it worked more than once back then, unfortunately) the RGB was more BGR. What camera are you using? Does it work with other software? If it's the Pi-specific Camera Module then this might help: http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=50639 - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150209/da95918d/smime.bin From bert at freudenbergs.de Mon Feb 9 17:30:38 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Feb 9 17:30:35 2015 Subject: [squeak-dev] v4linux & CameraPlugin In-Reply-To: <3D632914-1612-4AC2-847C-DFF3354C2DC2@freudenbergs.de> References: <8ECB2875-E45D-4FB0-9A3A-A039BAFA286A@rowledge.org> <3D632914-1612-4AC2-847C-DFF3354C2DC2@freudenbergs.de> Message-ID: Derek isn't subscribed to squeak-dev anymore, forwarding his reply: Begin forwarded message from Derek O'Connell > > Hi Bert, Tim, > > the fact that it works once makes it smells like an "EINTR" problem. If > you can "strace" to locate where it's occurring then it's simply a > matter of wrapping it in a retry-loop. There will be other places where > sys-calls are similarly wrapped (if not there then definitely in the > ALSA/PA plug-in's and probably in the VM itself). > > In case you're not aware, a change in the Linux kernel several years ago > dictated that anything could be interrupted at any time. I forget the > details but it had a big impact on user-land code. It has took a long > time for coders to adapt their code, not helped by the unpredictable > nature of such interrupts and that there is no one-shot solution, hence > some code could run for years without problem. To make matters worse you > can end up plugging one bit of code only for EINTR to start popping up > elsewhere. OTOH it seems insane to have to have to wrap every sys-call. > > Re camera code: std v4l code taken straight from examples plus > non-circular buffering. Anything else can only be to do pixel formatting. > > Best wishes, > > -D -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150209/93aae188/smime.bin From ron at usmedrec.com Mon Feb 9 18:02:34 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Feb 9 18:02:47 2015 Subject: FW: [squeak-dev] RE: Squeak Oversight Board 2015 Elections In-Reply-To: <18a601d04287$b3553b70$19ffb250$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <18a601d04287$b3553b70$19ffb250$@usmedrec.com> Message-ID: <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> Hi All, Well only one week to go. If you are planning on running for the Squeak Oversight Board, please announce your candidacy soon. So far we have 5 candidates for 7 spots. Candidates (order of announcement): 1. Casey Ransberger 2. Eliot Miranda 3. Tim Rowledge 4. Craig Latta 5. David T. Lewis You have until Monday 16th of February 3PM (20.00 UTC). Thank you for your work on Squeak! All the best, Ron Teitelbaum > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of > seven members from our community. The current board members are: > > In alphabetical order: > > Bert Freudenberg > Chris Muller > Craig Latta > David T. Lewis > Eliot Miranda > Frank Shearar > Tim Rowledge > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure > that person really wants to run. :) I will not put anyone on the > candidate list until that person makes it known on squeak-dev that he/she intends to run. > > During this period, the candidates should ideally present themselves > on squeak-dev, unless they have already done so, and the community can > ask questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some > people will not run without encouragement. Also I know that some > people wait to the last minute to run for the board to see if others > will run but please consider getting this year off to a faster start > and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of > SOB members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election > starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. > You > MUST try to get on the voter list before the 16th of February 2014 or > you will NOT be able to vote. If your Email has changed please make > sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter > list, no > worries! If you are a new Squeaker and wish to vote do ONE of the > following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker > sends an email to voters (at) squeak.org giving me name and email for > you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I > will closely track it - or send email to voters (at) squeak.org which > points to me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > From tim at rowledge.org Mon Feb 9 19:07:20 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Feb 9 19:07:25 2015 Subject: [squeak-dev] v4linux & CameraPlugin In-Reply-To: <3D632914-1612-4AC2-847C-DFF3354C2DC2@freudenbergs.de> References: <8ECB2875-E45D-4FB0-9A3A-A039BAFA286A@rowledge.org> <3D632914-1612-4AC2-847C-DFF3354C2DC2@freudenbergs.de> Message-ID: On 09-02-2015, at 8:36 AM, Bert Freudenberg wrote: > On 08.02.2015, at 01:47, tim Rowledge wrote: >> >> Is there anyone out there that actually feels they understand v4linux and how it is supposed to work with the CameraPlugin? > > Well, I suppose Derek (the original author) would have an idea. Cc?ed. Oh, of course. I even have his address from some ancient emails. D?oh. > > What camera are you using? Does it work with other software? It?s the Pi camera. The interesting thing is that I?m *fairly* sure it used to (as in at least a year ago) work multiple times but the colour map was screwed. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The world is not magic From asqueaker at gmail.com Mon Feb 9 20:20:37 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Feb 9 20:20:43 2015 Subject: FW: [squeak-dev] RE: Squeak Oversight Board 2015 Elections In-Reply-To: <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <18a601d04287$b3553b70$19ffb250$@usmedrec.com> <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> Message-ID: On Mon, Feb 9, 2015 at 12:02 PM, Ron Teitelbaum wrote: > > Hi All, > > Well only one week to go. If you are planning on running for the Squeak > Oversight Board, please announce your candidacy soon. > > So far we have 5 candidates for 7 spots. I'm pretty good when it comes to taking up space, so let me announce my candidacy for one of those two remaining slots. :) 2015 is going to be a huge year for me; besides the doors that have already been opened by a stable Spur VM, I can already see that the new 64-bit images will require a file-format change for Magma. On top of that, I also want to reinvent Maui inside the browser, backed by Squeak and Seaside. The goal of these frameworks is to provide the shallowest possible entrance-ramp for Squeak, so that users can write usable applications even by focusing almost solely on domain code, instead of on "developer issues" like persistence and UI code. Squeak and you people in its community are important to me, I truly like everyone here as fellow humans, maybe to the point that it has made me too comfortable around you at times that I would continue to pester you with my arguments. I think the mention of attracting women in the community invites a whole new and better dimension of communication-style in this community which I wholeheartedly support. In fact I would like to embrace it now, whether we have women in the community yet or not. I'm committing myself to /ensuring/ I only engage in positive and productive discussion. This reflects my same passion I've always had to fulfill our dreams and goals for Squeak. I want it to be great (as we all do), and I want it to remain accessible, even to a non-developer audience. From garduino at gmail.com Mon Feb 9 20:50:09 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Mon Feb 9 20:50:12 2015 Subject: FW: [squeak-dev] RE: Squeak Oversight Board 2015 Elections In-Reply-To: References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <18a601d04287$b3553b70$19ffb250$@usmedrec.com> <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> Message-ID: 2015-02-09 17:20 GMT-03:00 Chris Muller : > > > The goal of these frameworks is to provide the shallowest possible > entrance-ramp for Squeak, so that users can write usable applications > even by focusing almost solely on domain code, instead of on > "developer issues" like persistence and UI code. > > +111111111 I fully support such goals! > and I > want it to remain accessible, even to a non-developer audience. > > +1 also! -- Saludos / Regards, Germ?n Arduino -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150209/e684d432/attachment.htm From gettimothy at zoho.com Mon Feb 9 22:59:29 2015 From: gettimothy at zoho.com (gettimothy) Date: Mon Feb 9 22:59:40 2015 Subject: [squeak-dev] Error when saving class comments In-Reply-To: <06A635A5-9F71-4BD2-B401-30C4C979BB14@gmail.com> References: <06A635A5-9F71-4BD2-B401-30C4C979BB14@gmail.com> Message-ID: <14b70917a78.b68beb5184864.4169092147674391231@zoho.com> This is could be the WriteStream>>nextChunkPut:aString "bug" At the end of that method, put a self flush. I just tested on a fresh Squeak4.6 image and that fix fixed the error for me. cheers. tty. ---- On Mon, 09 Feb 2015 09:55:06 -0500 Eliot Miranda <eliot.miranda@gmail.com> wrote ---- Hi Fabian, what are the permissions on the changes file? What happens when you save a method? Eliot (phone) On Feb 9, 2015, at 5:41 AM, Fabian Windheuser <fabian.windheuser@student.hpi.de> wrote: > Hello, > Whenever I try to modify and save a class comment I get the following error: > "Error: RemoteString past end of file" (see the attachment for the error trace). > > My changes are not getting saved and the file seems to get corrupted. I am no longer able to reopen this class comment because it always throws the same error. > I tried restarting my image and using new unmodified .image and .changes files however the error still occurred. > > I am running Squeak 4.5 with update number #13702 on a 64bit Arch Linux distribution. > > Best regards, > Fabian > > > <Error_RemoteString.png> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150209/2d33f97e/attachment-0001.htm From casey.obrien.r at gmail.com Mon Feb 9 23:20:05 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Mon Feb 9 23:20:10 2015 Subject: [squeak-dev] For Pete's Sake Message-ID: Can we have two more people run? I really don't relish the idea of winning by default. Please. Run. Quickly. --C From bert at freudenbergs.de Tue Feb 10 01:51:40 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 10 01:51:43 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <18a601d04287$b3553b70$19ffb250$@usmedrec.com> <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> Message-ID: <655A3524-3238-40C1-B905-35CF9A964981@freudenbergs.de> On 09.02.2015, at 21:20, Chris Muller wrote: > > On Mon, Feb 9, 2015 at 12:02 PM, Ron Teitelbaum wrote: >> >> Hi All, >> >> Well only one week to go. If you are planning on running for the Squeak >> Oversight Board, please announce your candidacy soon. >> >> So far we have 5 candidates for 7 spots. > > I'm pretty good when it comes to taking up space, so let me announce > my candidacy for one of those two remaining slots. :) Looks like a mighty fine lineup already! I'd be honored to serve on the Board with any of you. I'll run, too :) As for an agenda, I'd like to keep our community as friendly and fun a place as it is, plus make it even more welcoming to anyone. I will support any effort in that direction. That also means to me that Squeak should work well across all platforms, providing a truly universal personal computing environment. This is what sets Squeak apart from pretty much all other development systems. Computing for anyone, anywhere. Sounds almost like a campaign slogan ;^) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/cb560af6/smime.bin From ron at usmedrec.com Tue Feb 10 04:19:17 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Feb 10 04:19:24 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections Message-ID: <204d01d044e8$bcedb1e0$36c915a0$@usmedrec.com> Hi All, Well so far so good. Thank you all for stepping up to run. We have 7 candidates for 7 spots. We still have a week left for more candidates to step up. It would be great if more people would also run. Maybe now is the time for you to step out of the shadows, If you have been part of this community for a while. Do you have 2 X chromosomes? You are encouraged to run! Please talk to people you know and encourage them to run. There are some great people in this community that would be great on the board but need a gentle push. Candidates (order of announcement): 1. Casey Ransberger 2. Eliot Miranda 3. Tim Rowledge 4. Craig Latta 5. David T. Lewis 6. Chris Muller 7. Bert Freudenberg You have until Monday 16th of February 3PM (20.00 UTC). Thank you for your work on Squeak! All the best, Ron Teitelbaum > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of > seven members from our community. The current board members are: > > In alphabetical order (by first name): > > Bert Freudenberg > Chris Muller > Craig Latta > David T. Lewis > Eliot Miranda > Frank Shearar > Tim Rowledge > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure > that person really wants to run. :) I will not put anyone on the > candidate list until that person makes it known on squeak-dev that > he/she intends to run. > > During this period, the candidates should ideally present themselves > on squeak-dev, unless they have already done so, and the community can > ask questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some > people will not run without encouragement. Also I know that some > people wait to the last minute to run for the board to see if others > will run but please consider getting this year off to a faster start > and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of > SOB members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election > starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. > You > MUST try to get on the voter list before the 16th of February 2014 or > you will NOT be able to vote. If your Email has changed please make > sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter > list, no > worries! If you are a new Squeaker and wish to vote do ONE of the > following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker > sends an email to voters (at) squeak.org giving me name and email for > you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I > will closely track it - or send email to voters (at) squeak.org which > points to me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 10 08:45:26 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 10 08:51:13 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> Message-ID: <1423557926229-4804841.post@n4.nabble.com> Hi, everyone. :) I'd like to run for the Squeak Oversight Board this time. I have a strong interest in improving Squeak's user experience. This does not necessarily mean to introduce all the features known from mainstream programming environments such as Eclipse. In my PhD thesis, I am exploring the benefits of live programming systems. Some of those ideas could easily flow back from that research project [1] into Squeak. ;) Recently, I joined Squeak's core development team and provided several fixes and features to the base system, Morphic, and its tools. I collaborated with Levente to provide an implementation of OrderedDictionary [2], with Elliot to provide support for long file paths to Windows-related parts of the CogVM [3], and with Bert to discuss several implementation details/issues in the base system. I have been working with Squeak since 2007. Back then, we have created a small Sokoban clone [4]. Other (research) projects include an issue tracker with Seaside [5], source code annotation in Morphic [6], and a prototypical requirements planning tool [7]. Some current side-projects include an observer framework based on Qt's Signals [8], an animation framework [9], and a full replacement of Morphic's widgets [10] that makes use of signals. I enjoy the Squeak community and its discussions on the mailing lists. To give you an impression of how my current Squeak programming system looks like: vivide-squeak.png Best, Marcel [1] https://github.com/hpi-swa/vivide [2] http://forum.world.st/The-Trunk-Collections-mt-593-mcz-td4799750.html [3] http://www.mirandabanda.org/cogblog/collaborators/ [4] http://www.hpi.uni-potsdam.de/hirschfeld/projects/olpc/index.html [5] https://vimeo.com/102603629 [6] https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk [7] https://vimeo.com/102603631 [8] https://github.com/marceltaeumel/signals [9] https://github.com/marceltaeumel/animations [10] https://github.com/marceltaeumel/widgets -- View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4804841.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lenglish5 at cox.net Tue Feb 10 09:39:19 2015 From: lenglish5 at cox.net (Lawson English) Date: Tue Feb 10 09:39:22 2015 Subject: [squeak-dev] Squeak 4.5 error: #isPrime fails with relatively small Mersenne prime Message-ID: <54D9D1C7.9050306@cox.net> This bit of code fails at numb := 1024: error: Cannot truncate this number numb := 1024. 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime) ifTrue: [Transcript show: n; tab; show: test;cr]] #isProbablyPrime fails with the same number. numb := 1023. works for both. L -- Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner). https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan From edgardec2005 at gmail.com Tue Feb 10 10:38:28 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Tue Feb 10 10:38:42 2015 Subject: [squeak-dev] RE: Squeak Oversight Board 2015 Elections In-Reply-To: Message-ID: El 2/9/15, 5:20 PM, "Chris Muller" escribi?: >I'm pretty good when it comes to taking up space, so let me announce >my candidacy for one of those two remaining slots. :) > >2015 is going to be a huge year for me; besides the doors that have >already been opened by a stable Spur VM, I can already see that the >new 64-bit images will require a file-format change for Magma. On top >of that, I also want to reinvent Maui inside the browser, backed by >Squeak and Seaside. > >The goal of these frameworks is to provide the shallowest possible >entrance-ramp for Squeak, so that users can write usable applications >even by focusing almost solely on domain code, instead of on >"developer issues" like persistence and UI code. > >Squeak and you people in its community are important to me, I truly >like everyone here as fellow humans, maybe to the point that it has >made me too comfortable around you at times that I would continue to >pester you with my arguments. I think the mention of attracting women >in the community invites a whole new and better dimension of >communication-style in this community which I wholeheartedly support. >In fact I would like to embrace it now, whether we have women in the >community yet or not. I'm committing myself to /ensuring/ I only >engage in positive and productive discussion. > >This reflects my same passion I've always had to fulfill our dreams >and goals for Squeak. I want it to be great (as we all do), and I >want it to remain accessible, even to a non-developer audience. > > >+1 From fabian.windheuser at student.hpi.de Tue Feb 10 11:25:20 2015 From: fabian.windheuser at student.hpi.de (Fabian Windheuser) Date: Tue Feb 10 11:25:53 2015 Subject: [squeak-dev] Re: Error when saving class comments Message-ID: Hey All, The "self flush" at the end of "WriteStream>>nextChunkPut:aString" fixed the problem for me. It works as intended now. Thank you very much! On a side note for Eliot: The changes file has sufficient permissions and all changes besides class comments can be saved without a problem. Greetings, Fabian ---- On Mon, 09 Feb 2015 17:59:29 -0500 gettimothy wrote ---- >This is could be the WriteStream>>nextChunkPut:aString "bug" > >At the end of that method, put a > >self flush. > >I just tested on a fresh Squeak4.6 image and that fix fixed the error for me. > >cheers. ---- On Mon, 09 Feb 2015 09:55:06 -0500 Eliot Miranda & lt;eliot.miranda@gmail.com> wrote ---- Hi Fabian, what are the permissions on the changes file? What happens when you save a method? Eliot (phone) On Feb 9, 2015, at 5:41 AM, Fabian Windheuser & lt;fabian.windheuser@student.hpi.de> wrote: > Hello, > Whenever I try to modify and save a class comment I get the following error: > "Error: RemoteString past end of file" (see the attachment for the error trace). > > My changes are not getting saved and the file seems to get corrupted. I am no longer able to reopen this class comment because it always throws the same error. > I tried restarting my image and using new unmodified .image and .changes files however the error still occurred. > > I am running Squeak 4.5 with update number #13702 on a 64bit Arch Linux distribution. > > Best regards, > Fabian > > > <Error_RemoteString.png> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/3c0215c9/attachment.htm From garduino at gmail.com Tue Feb 10 11:57:06 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Tue Feb 10 11:57:09 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <1423557926229-4804841.post@n4.nabble.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> Message-ID: Hi Marcel! It's nice to see you running for a site in the Board! I saw some of your projects, but not all of them (Noticed now with the links that you provided) and are really very interesting stuff! BTW the yaiiit.net site is not working, from here at least 2015-02-10 5:45 GMT-03:00 Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de>: > Hi, everyone. :) > > I'd like to run for the Squeak Oversight Board this time. > > I have a strong interest in improving Squeak's user experience. This does > not necessarily mean to introduce all the features known from mainstream > programming environments such as Eclipse. In my PhD thesis, I am exploring > the benefits of live programming systems. Some of those ideas could easily > flow back from that research project [1] into Squeak. ;) > > Recently, I joined Squeak's core development team and provided several > fixes > and features to the base system, Morphic, and its tools. I collaborated > with > Levente to provide an implementation of OrderedDictionary [2], with Elliot > to provide support for long file paths to Windows-related parts of the > CogVM > [3], and with Bert to discuss several implementation details/issues in the > base system. > > I have been working with Squeak since 2007. Back then, we have created a > small Sokoban clone [4]. Other (research) projects include an issue tracker > with Seaside [5], source code annotation in Morphic [6], and a prototypical > requirements planning tool [7]. Some current side-projects include an > observer framework based on Qt's Signals [8], an animation framework [9], > and a full replacement of Morphic's widgets [10] that makes use of signals. > > I enjoy the Squeak community and its discussions on the mailing lists. > > To give you an impression of how my current Squeak programming system looks > like: > > vivide-squeak.png > > Best, > Marcel > > [1] https://github.com/hpi-swa/vivide > [2] http://forum.world.st/The-Trunk-Collections-mt-593-mcz-td4799750.html > [3] http://www.mirandabanda.org/cogblog/collaborators/ > [4] http://www.hpi.uni-potsdam.de/hirschfeld/projects/olpc/index.html > [5] https://vimeo.com/102603629 > [6] > > https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk > [7] https://vimeo.com/102603631 > [8] https://github.com/marceltaeumel/signals > [9] https://github.com/marceltaeumel/animations > [10] https://github.com/marceltaeumel/widgets > > > > -- > View this message in context: > http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4804841.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- Saludos / Regards, Germ?n Arduino www.arduinosoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/cfeafb06/attachment.htm From lewis at mail.msen.com Tue Feb 10 12:30:05 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 10 12:30:07 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <1423557926229-4804841.post@n4.nabble.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> Message-ID: <20150210123005.GA82540@shell.msen.com> On Tue, Feb 10, 2015 at 12:45:26AM -0800, Marcel Taeumel wrote: > Hi, everyone. :) > > I'd like to run for the Squeak Oversight Board this time. > Excellent. Thank you for running! Dave From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 10 12:27:55 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 10 12:33:43 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> Message-ID: <1423571275122-4804873.post@n4.nabble.com> Unfortunately, there is no running instance of yaiiit. No sure, whether my colleague owns that domain anymore. Best, Marcel -- View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4804873.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Tue Feb 10 12:39:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 10 12:39:36 2015 Subject: [squeak-dev] Squeak 4.5 error: #isPrime fails with relatively small Mersenne prime In-Reply-To: <54D9D1C7.9050306@cox.net> References: <54D9D1C7.9050306@cox.net> Message-ID: <20150210123931.GB82540@shell.msen.com> On Tue, Feb 10, 2015 at 02:39:19AM -0700, Lawson English wrote: > This bit of code fails at numb := 1024: > > error: Cannot truncate this number > > numb := 1024. > 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime) > ifTrue: [Transcript show: n; tab; show: test;cr]] > > #isProbablyPrime fails with the same number. > > > numb := 1023. > works for both. > It looks like a problem in random number generation. It is failing in LargePositiveInteger>>atRandom which somehow results in the random generator producing a value of Float infinity. Dave From commits at source.squeak.org Tue Feb 10 15:37:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 10 15:37:30 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.899.mcz ==================== Summary ==================== Name: Kernel-bf.899 Author: bf Time: 10 February 2015, 4:37:05.988 pm UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e Ancestors: Kernel-eem.898 Fix random for Really Large Integers. =============== Diff against Kernel-eem.898 =============== Item was changed: ----- Method: Random>>nextInt: (in category 'accessing') ----- nextInt: anInteger " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. + "avoid Float arithmetic in #next to work with LargeInts" + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1! - ^ (self next * anInteger) truncated + 1! From bert at freudenbergs.de Tue Feb 10 15:37:35 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 10 15:37:38 2015 Subject: [squeak-dev] Squeak 4.5 error: #isPrime fails with relatively small Mersenne prime In-Reply-To: <20150210123931.GB82540@shell.msen.com> References: <54D9D1C7.9050306@cox.net> <20150210123931.GB82540@shell.msen.com> Message-ID: On 10.02.2015, at 13:39, David T. Lewis wrote: > > On Tue, Feb 10, 2015 at 02:39:19AM -0700, Lawson English wrote: >> This bit of code fails at numb := 1024: >> >> error: Cannot truncate this number >> >> numb := 1024. >> 1 to: numb do: [:n||test| test:=(2 raisedTo: n) -1. (test isPrime) >> ifTrue: [Transcript show: n; tab; show: test;cr]] >> >> #isProbablyPrime fails with the same number. >> >> >> numb := 1023. >> works for both. >> > > It looks like a problem in random number generation. It is failing in > LargePositiveInteger>>atRandom which somehow results in the random > generator producing a value of Float infinity. > > Dave Yep. Random>>nextInt: does not work for really large ints. Fixed in Kernel-bf.899. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/40407f1a/smime.bin From garduino at gmail.com Tue Feb 10 15:40:23 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Tue Feb 10 15:40:25 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <1423571275122-4804873.post@n4.nabble.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> <1423571275122-4804873.post@n4.nabble.com> Message-ID: ah ok, and the software is open source, in some smalltalk repo? 2015-02-10 9:27 GMT-03:00 Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de>: > Unfortunately, there is no running instance of yaiiit. No sure, whether my > colleague owns that domain anymore. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4804873.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- Saludos / Regards, Germ?n Arduino www.arduinosoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/c84c597c/attachment.htm From bert at freudenbergs.de Tue Feb 10 15:43:19 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 10 15:43:22 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: Message-ID: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: > > Bert Freudenberg uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-bf.899.mcz > > ==================== Summary ==================== > > Name: Kernel-bf.899 > Author: bf > Time: 10 February 2015, 4:37:05.988 pm > UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e > Ancestors: Kernel-eem.898 > > Fix random for Really Large Integers. > > =============== Diff against Kernel-eem.898 =============== > > Item was changed: > ----- Method: Random>>nextInt: (in category 'accessing') ----- > nextInt: anInteger > " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " > > anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. > + "avoid Float arithmetic in #next to work with LargeInts" > + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1! > - ^ (self next * anInteger) truncated + 1! We might want to do something better if anInteger > 16r80000000, because that's the maximum number of different random integers we can produce. We would need to call nextValue twice (or more times) to produce enough randomness. My fix just solves the immediate problem of running into infinite Floats. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/89c7bfac/smime.bin From casey.obrien.r at gmail.com Tue Feb 10 20:09:13 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Tue Feb 10 20:09:17 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <655A3524-3238-40C1-B905-35CF9A964981@freudenbergs.de> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <18a601d04287$b3553b70$19ffb250$@usmedrec.com> <1ea001d04492$983d69e0$c8b83da0$@usmedrec.com> <655A3524-3238-40C1-B905-35CF9A964981@freudenbergs.de> Message-ID: > On Feb 9, 2015, at 5:51 PM, Bert Freudenberg wrote: > > Computing for anyone, anywhere. Sounds almost like a campaign slogan ;^) > > - Bert - And a good one at that. Thanks for running! From casey.obrien.r at gmail.com Tue Feb 10 20:10:42 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Tue Feb 10 20:10:47 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <1423557926229-4804841.post@n4.nabble.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> Message-ID: <5D34EFA0-AE6D-4FEA-BFDA-7E514474898E@gmail.com> Bravo! Thanks for running Marcel. > On Feb 10, 2015, at 12:45 AM, Marcel Taeumel wrote: > > Hi, everyone. :) > > I'd like to run for the Squeak Oversight Board this time. > > I have a strong interest in improving Squeak's user experience. This does > not necessarily mean to introduce all the features known from mainstream > programming environments such as Eclipse. In my PhD thesis, I am exploring > the benefits of live programming systems. Some of those ideas could easily > flow back from that research project [1] into Squeak. ;) > > Recently, I joined Squeak's core development team and provided several fixes > and features to the base system, Morphic, and its tools. I collaborated with > Levente to provide an implementation of OrderedDictionary [2], with Elliot > to provide support for long file paths to Windows-related parts of the CogVM > [3], and with Bert to discuss several implementation details/issues in the > base system. > > I have been working with Squeak since 2007. Back then, we have created a > small Sokoban clone [4]. Other (research) projects include an issue tracker > with Seaside [5], source code annotation in Morphic [6], and a prototypical > requirements planning tool [7]. Some current side-projects include an > observer framework based on Qt's Signals [8], an animation framework [9], > and a full replacement of Morphic's widgets [10] that makes use of signals. > > I enjoy the Squeak community and its discussions on the mailing lists. > > To give you an impression of how my current Squeak programming system looks > like: > > vivide-squeak.png > > Best, > Marcel > > [1] https://github.com/hpi-swa/vivide > [2] http://forum.world.st/The-Trunk-Collections-mt-593-mcz-td4799750.html > [3] http://www.mirandabanda.org/cogblog/collaborators/ > [4] http://www.hpi.uni-potsdam.de/hirschfeld/projects/olpc/index.html > [5] https://vimeo.com/102603629 > [6] > https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/codetalk > [7] https://vimeo.com/102603631 > [8] https://github.com/marceltaeumel/signals > [9] https://github.com/marceltaeumel/animations > [10] https://github.com/marceltaeumel/widgets > > > > -- > View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4804841.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From bert at freudenbergs.de Tue Feb 10 21:03:29 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 10 21:03:31 2015 Subject: [squeak-dev] Fwd: Call for Participation - ESUG 2015 @Brescia References: Message-ID: <862574CA-0530-4901-AF56-85E113351567@freudenbergs.de> Please distribute widely 23rd International Smalltalk Joint Conference - Call for Contributions Brescia, Italy from 13 to 17 July 2015 http://www.esug.org/Conferences/2015/ This call includes: Developer Forum Smalltalk Technology Award International Workshop http://www.esug.org/wiki/pier/Conferences/2015/International-Workshop-IWST_15 Student Volunteer http://www.esug.org/wiki/pier/Conferences/2015/Student-volunteers Camp Smalltalk 12 July 2015 ---------------------------------------------------------------------- You can support the ESUG conference in many different ways: * Sponsor the conference. New sponsoring packages are described at http://www.esug.org/wiki/pier/About/BecomeSponsor * Submit a talk, a software or a paper to one of the events. See below. * Attend the conference. We'd like to beat the previous record of attendance (170 people at Amsterdam 2008)! * Students can get free registration and hosting if they enrol into the the Student Volunteers program. See below. Developers Forum: International Smalltalk Developers Conference ------------------------------------------------------------------------ We are looking for YOUR experience on using Smalltalk. You will have 30 min for presentations and 45-60 min for hand-ons tutorial. The list of topics for the normal talks and tutorials includes, but is not limited to the following: * XP practices, Development tools, Experience reports * Model driven development, Web development, Team management * Meta-Modeling, Security, New libraries & frameworks * Educational material, Embedded systems and robotics * SOA and Web services, Interaction with other programming languages Teaching Pearls and Show us Your Business ----------------------------------------- - Show your business 10 min session (Get prepared!!) - Teaching pearls : we want some session on how to teach some design aspects. We want your tip and tricks to teach Smalltalk or OOP. We expect to have several 10 to 15 min sessions aggregated. !! How to submit? -------------- Submissions deadline is 15 of May 2015 Notification of acceptance will be on done on the fly. More information at http://www.esug.org/conferences/2015 Pay attention: the places are limited so do not wait till the last minute to apply. Prospective presenters should submit a request to Stephane.Ducasse at inria.fr AND USE THE following header [ESUG 2015 Developers]. Please follow the template below the email will be automatically processed! Subject: [ESUG 2015 Developers] + your name First Name: Last Name: Email where you can always be reached: Title: Type: Tutorial/Talk/Teaching Pearl Abstract: Bio: Any presentation not respecting this form will be discarded automatically International Workshop on Smalltalk Technologies ------------------------------------------------------------------------ Read the page: http://www.esug.org/wiki/pier/Conferences/2015/International-Workshop-IWST_15 Technology Award Competition ------------------------------------------------------------------------ The top 3 teams with the most innovative software will receive, respectively, 500 Euros, 300 Euros and 200 Euros during an awards ceremony at the conference. Developers of any Smalltalk-based software are welcome to compete. More information at http://www.esug.org/conferences/2015/ Student Volunteer Program ------------------------------------------------------------------------ If you are a student wanting to attend ESUG, have you considered being a student volunteer? Student volunteers help keep the conference running smoothly; in return, they have free accommodations, while still having most of the time to enjoy the conference. More information at http://www.esug.org/wiki/pier/Conferences/2015/ http://www.esug.org/wiki/pier/Conferences/2015/Student-volunteers We hope to see you there and have fun together. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/b08ab0fb/smime-0001.bin From bert at freudenbergs.de Tue Feb 10 21:44:46 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 10 21:44:50 2015 Subject: [squeak-dev] How to change ActiveWorld extent resp. host window size programmatically? In-Reply-To: <4E6A1BFF-57EE-4A31-B309-95844C1DE7E3@freudenbergs.de> References: <1422860071131-4803109.post@n4.nabble.com> <6B28DDD8-4A60-4DF3-BFC0-6147762166F9@freudenbergs.de> <1422866335748-4803120.post@n4.nabble.com> <44E2F928-7C73-46B4-B74B-715C603CC62B@freudenbergs.de> <1422960900186-4803356.post@n4.nabble.com> <4E6A1BFF-57EE-4A31-B309-95844C1DE7E3@freudenbergs.de> Message-ID: Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150210/5d6b0fa1/smime.bin From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 11 09:32:25 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 11 09:38:20 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> <1423571275122-4804873.post@n4.nabble.com> Message-ID: <1423647145658-4805090.post@n4.nabble.com> Sure. The source code can be found here: http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/swe07-team08.html Best, Marcel -- View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4805090.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From garduino at gmail.com Wed Feb 11 10:51:29 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Wed Feb 11 10:51:30 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 Elections In-Reply-To: <1423647145658-4805090.post@n4.nabble.com> References: <119c01d040fe$ab840050$028c00f0$@usmedrec.com> <1423557926229-4804841.post@n4.nabble.com> <1423571275122-4804873.post@n4.nabble.com> <1423647145658-4805090.post@n4.nabble.com> Message-ID: Thanks! 2015-02-11 6:32 GMT-03:00 Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de>: > Sure. The source code can be found here: > > http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/swe07-team08.html > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Squeak-Oversight-Board-2015-Elections-tp4803827p4805090.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- Saludos / Regards, Germ?n Arduino www.arduinosoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150211/30d87927/attachment.htm From commits at source.squeak.org Wed Feb 11 20:39:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Feb 11 20:39:15 2015 Subject: [squeak-dev] The Inbox: Collections-cmm.603.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-cmm.603.mcz ==================== Summary ==================== Name: Collections-cmm.603 Author: cmm Time: 11 February 2015, 2:38:57.218 pm UUID: 48d4fe0c-cde3-4244-b87f-2d44e3214240 Ancestors: Collections-mt.602 - Collection>>#groupBy:having: is already being used for non-Integer groups, and integerDictionary is now slower than a regular Dictionary in Spur. - PositionableStream>>#nextInto:, #next:into:, #nextInto:startingAt:, #next:into:startingAt:, and #readInto:startingAt:count require no services specific to PositionableStream. Move them up to Stream and remove the redundant implementations from various subclasses. - Let WeakArray>>#species be a regular Array instead of its own class, so that WeakArray's can be successfully compared to Arrays with equivalent contents. =============== Diff against Collections-mt.602 =============== Item was changed: ----- Method: Collection>>groupBy:having: (in category 'enumerating') ----- groupBy: keyBlock having: selectBlock + "Like in SQL operation - Split the recievers contents into collections of elements for which keyBlock returns the same results, and return those collections allowed by selectBlock." - "Like in SQL operation - Split the recievers contents into collections of - elements for which keyBlock returns the same results, and return those - collections allowed by selectBlock. keyBlock should return an Integer." | result | + result := Dictionary new. + self do: + [ : each | | key | + key := keyBlock value: each. + (result + at: key + ifAbsentPut: [ OrderedCollection new ]) add: each ]. + ^ result select: selectBlock! - result := PluggableDictionary integerDictionary. - self do: - [:e | - | key | - key := keyBlock value: e. - (result includesKey: key) - ifFalse: [result at: key put: OrderedCollection new]. - (result at: key) - add: e]. - ^result select: selectBlock! Item was removed: - ----- Method: NullStream>>next:into: (in category 'reading') ----- - next: n into: aCollection - "Read n objects into the given collection. - Return aCollection or a partial copy if less than - n elements have been read." - - ^self next: n into: aCollection startingAt: 1! Item was removed: - ----- Method: NullStream>>nextInto:startingAt: (in category 'reading') ----- - nextInto: aCollection startingAt: startIndex - "Read the next elements of the receiver into aCollection. - Return aCollection or a partial copy if less than aCollection - size elements have been read." - - ^self next: (aCollection size - startIndex+1) into: aCollection startingAt: startIndex.! Item was removed: - ----- Method: PositionableStream>>next:into: (in category 'accessing') ----- - next: n into: aCollection - "Read n objects into the given collection. - Return aCollection or a partial copy if less than - n elements have been read." - ^self next: n into: aCollection startingAt: 1! Item was removed: - ----- Method: PositionableStream>>next:into:startingAt: (in category 'accessing') ----- - next: n into: aCollection startingAt: startIndex - "Read n objects into the given collection. - Return aCollection or a partial copy if less than n elements have been read." - - | count | - count := self readInto: aCollection startingAt: startIndex count: n. - count = n - ifTrue:[ ^aCollection ] - ifFalse:[ ^aCollection copyFrom: 1 to: startIndex + count - 1 ]! Item was removed: - ----- Method: PositionableStream>>nextInto: (in category 'accessing') ----- - nextInto: aCollection - "Read the next elements of the receiver into aCollection. - Return aCollection or a partial copy if less than aCollection - size elements have been read." - ^self next: aCollection size into: aCollection startingAt: 1.! Item was removed: - ----- Method: PositionableStream>>nextInto:startingAt: (in category 'accessing') ----- - nextInto: aCollection startingAt: startIndex - "Read the next elements of the receiver into aCollection. - Return aCollection or a partial copy if less than aCollection - size elements have been read." - ^self next: (aCollection size - startIndex+1) into: aCollection startingAt: startIndex.! Item was removed: - ----- Method: PositionableStream>>readInto:startingAt:count: (in category 'accessing') ----- - readInto: aCollection startingAt: startIndex count: n - "Read n objects into the given collection. - Return number of elements that have been read." - | obj | - 0 to: n - 1 do: [:i | - (obj := self next) == nil ifTrue: [^i]. - aCollection at: startIndex + i put: obj]. - ^n! Item was added: + ----- Method: Stream>>next:into: (in category 'accessing') ----- + next: n into: aCollection + "Read n objects into the given collection. + Return aCollection or a partial copy if less than + n elements have been read." + ^self next: n into: aCollection startingAt: 1! Item was added: + ----- Method: Stream>>next:into:startingAt: (in category 'accessing') ----- + next: n into: aCollection startingAt: startIndex + "Read n objects into the given collection. + Return aCollection or a partial copy if less than n elements have been read." + + | count | + count := self readInto: aCollection startingAt: startIndex count: n. + count = n + ifTrue:[ ^aCollection ] + ifFalse:[ ^aCollection copyFrom: 1 to: startIndex + count - 1 ]! Item was added: + ----- Method: Stream>>nextInto: (in category 'accessing') ----- + nextInto: aCollection + "Read the next elements of the receiver into aCollection. + Return aCollection or a partial copy if less than aCollection + size elements have been read." + ^self next: aCollection size into: aCollection startingAt: 1.! Item was added: + ----- Method: Stream>>nextInto:startingAt: (in category 'accessing') ----- + nextInto: aCollection startingAt: startIndex + "Read the next elements of the receiver into aCollection. + Return aCollection or a partial copy if less than aCollection + size elements have been read." + ^self next: (aCollection size - startIndex+1) into: aCollection startingAt: startIndex.! Item was added: + ----- Method: Stream>>readInto:startingAt:count: (in category 'accessing') ----- + readInto: aCollection startingAt: startIndex count: n + "Read n objects into the given collection. + Return number of elements that have been read." + | obj | + 0 to: n - 1 do: [:i | + (obj := self next) == nil ifTrue: [^i]. + aCollection at: startIndex + i put: obj]. + ^n! Item was added: + ----- Method: WeakArray>>species (in category 'as yet unclassified') ----- + species + "More useful to have strongly-referenced results of #select: and #collect:." + ^ Array! From commits at source.squeak.org Thu Feb 12 01:54:35 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 12 01:54:36 2015 Subject: [squeak-dev] The Trunk: KernelTests-nice.287.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.287.mcz ==================== Summary ==================== Name: KernelTests-nice.287 Author: nice Time: 12 February 2015, 2:54:16.228 am UUID: 1840fdc4-1888-4577-8c05-804aee4bdd99 Ancestors: KernelTests-mt.286 Put some higher expectations from #timesTwoPower: fallback code than it can currently handle. Some of these test will start failing when the primitive is disabled. Some will fail immediately. =============== Diff against KernelTests-mt.286 =============== Item was added: + ----- Method: FloatTest>>testTimesTwoPowerGradualUnderflow (in category 'testing - arithmetic') ----- + testTimesTwoPowerGradualUnderflow + "Here is a vicious case where timesTwoPower is inexact because it underflows. + And two consecutive inexact operations lead to a different result than a single one. + A naive implementation might fail to handle such case correctly." + | f | + f := 3.0 reciprocal predecessor predecessor predecessor. + self deny: ((f timesTwoPower: Float emin) timesTwoPower: -3) = (f timesTwoPower: Float emin - 3)! Item was added: + ----- Method: FloatTest>>testTimesTwoPowerOverflow (in category 'testing - arithmetic') ----- + testTimesTwoPowerOverflow + self assert: (Float fminNormalized timesTwoPower: Float emax - Float emin) equals: (2.0 raisedTo: Float emax). + self assert: (Float zero timesTwoPower: SmallInteger maxVal squared) equals: Float zero. + ! Item was added: + ----- Method: FloatTest>>testTimesTwoPowerUnderflow (in category 'testing - arithmetic') ----- + testTimesTwoPowerUnderflow + self assert: ((2.0 raisedTo: Float emax) timesTwoPower: Float emin - Float emax) equals: Float fminNormalized. + self assert: (Float infinity timesTwoPower: SmallInteger minVal * SmallInteger maxVal) equals: Float infinity. + ! From commits at source.squeak.org Thu Feb 12 02:03:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 12 02:03:42 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.900.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.900.mcz ==================== Summary ==================== Name: Kernel-nice.900 Author: nice Time: 12 February 2015, 3:02:47.866 am UUID: 3366e84f-225d-4519-b571-b099acdaba70 Ancestors: Kernel-bf.899 Rescue #timesTwoPower: fallback code from freshly discovered flaws. Don't be sparing of comments, if we ever need some, that gonna be here Some of us try very hard to make the tests speak in place of comments, I feel that having both don't hurt. =============== Diff against Kernel-bf.899 =============== Item was changed: ----- Method: Float>>timesTwoPower: (in category 'mathematical functions') ----- timesTwoPower: anInteger "Primitive. Answer with the receiver multiplied by 2.0 raised to the power of the argument. Optional. See Object documentation whatIsAPrimitive." + self isFinite ifFalse: [^self]. + self isZero ifTrue: [^self]. + + "Make sure that (2.0 raisedTo: Integer) can be safely used without overflow + For example: + Float fminNormalized * (2.0 raisedTo: 2000) = Float infinity. + while: + (Float fminNormalized timesTwoPower: 2000) = (2.0 raisedTo: 2000+Float emin)." + anInteger > Float emax ifTrue: [^(self timesTwoPower: Float emax) timesTwoPower: anInteger - Float emax]. + + "In case of gradual underflow, timesTwoPower: is not exact, so greatest care must be taken + because two consecutive timesTwoPower: might differ from a single one" + anInteger < Float emin + ifTrue: + [| deltaToUnderflow | + deltaToUnderflow := Float emin - self exponent max: Float emin. + deltaToUnderflow >= 0 ifTrue: + ["self is already near or past underflow, so don't care, result will be zero" + deltaToUnderflow := Float emin]. + ^(self timesTwoPower: deltaToUnderflow) timesTwoPower: anInteger - deltaToUnderflow]. + + "If (2.0 raisedToInteger: anInteger) fit in a positive SmallInteger, then use faster SmallInteger conversion. + Note that SmallInteger maxVal highBit = 30 in a 32 bits image, so 1 can be shifted 29 times." + anInteger > -29 ifTrue: [ + anInteger < 0 ifTrue: [^ self / (1 bitShift: (0 - anInteger)) asFloat]. + anInteger < 30 ifTrue: [^ self * (1 bitShift: anInteger) asFloat]]. + - - anInteger < -29 ifTrue: [^ self * (2.0 raisedToInteger: anInteger)]. - anInteger < 0 ifTrue: [^ self / (1 bitShift: (0 - anInteger)) asFloat]. - anInteger < 30 ifTrue: [^ self * (1 bitShift: anInteger) asFloat]. ^ self * (2.0 raisedToInteger: anInteger)! From lewis at mail.msen.com Thu Feb 12 03:17:19 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 12 03:17:21 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.900.mcz In-Reply-To: <201502120203.t1C23g93045394@shell.msen.com> References: <201502120203.t1C23g93045394@shell.msen.com> Message-ID: <20150212031719.GB51571@shell.msen.com> On Thu, Feb 12, 2015 at 02:03:14AM +0000, commits@source.squeak.org wrote: > Don't be sparing of comments, if we ever need some, that gonna be here > Some of us try very hard to make the tests speak in place of comments, I feel that having both don't hurt. +1 Dave From commits at source.squeak.org Thu Feb 12 14:28:09 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 12 14:28:11 2015 Subject: [squeak-dev] The Inbox: Balloon-tfel.26.mcz Message-ID: Tim Felgentreff uploaded a new version of Balloon to project The Inbox: http://source.squeak.org/inbox/Balloon-tfel.26.mcz ==================== Summary ==================== Name: Balloon-tfel.26 Author: tfel Time: 12 February 2015, 3:28:04.366 pm UUID: 94ab88a7-1f0f-0048-b15f-1a604dc5601a Ancestors: Balloon-tfel.22, Balloon-bf.25 Instead of failing hard, return default values from Balloon primitive methods, for VMs without plugin (i.e., RSqueakVM) =============== Diff against Balloon-bf.25 =============== Item was changed: ----- Method: BalloonEngine>>primAddActiveEdgeTableEntryFrom: (in category 'primitives-incremental') ----- primAddActiveEdgeTableEntryFrom: edgeEntry "Add edge entry to the AET." (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddActiveEdgeTableEntryFrom: edgeEntry ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddBezierFrom:to:via:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- primAddBezierFrom: start to: end via: via leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddBezierFrom: start to: end via: via leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddBezierShape:segments:fill:lineWidth:lineFill: (in category 'primitives-adding') ----- primAddBezierShape: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddBezierShape: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddBitmapFill:colormap:tile:from:along:normal:xIndex: (in category 'primitives-adding') ----- primAddBitmapFill: form colormap: cmap tile: tileFlag from: origin along: direction normal: normal xIndex: xIndex (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddBitmapFill: form colormap: cmap tile: tileFlag from: origin along: direction normal: normal xIndex: xIndex ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList: (in category 'primitives-adding') ----- primAddCompressedShape: points segments: nSegments leftFills: leftFills rightFills: rightFills lineWidths: lineWidths lineFills: lineFills fillIndexList: fillIndexList (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddCompressedShape: points segments: nSegments leftFills: leftFills rightFills: rightFills lineWidths: lineWidths lineFills: lineFills fillIndexList: fillIndexList ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddExternalEdge:initialX:initialY:initialZ:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- primAddExternalEdge: index initialX: initialX initialY: initialY initialZ: initialZ leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddExternalEdge: index initialX: initialX initialY: initialY initialZ: initialZ leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddExternalFill: (in category 'primitives-adding') ----- primAddExternalFill: index (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddExternalFill: index ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddGradientFill:from:along:normal:radial: (in category 'primitives-adding') ----- primAddGradientFill: colorRamp from: origin along: direction normal: normal radial: isRadial (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddGradientFill: colorRamp from: origin along: direction normal: normal radial: isRadial ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddLineFrom:to:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- primAddLineFrom: start to: end leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddLineFrom: start to: end leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddOvalFrom:to:fillIndex:borderWidth:borderColor: (in category 'primitives-adding') ----- primAddOvalFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddOvalFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddPolygon:segments:fill:lineWidth:lineFill: (in category 'primitives-adding') ----- primAddPolygon: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddPolygon: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primAddRectFrom:to:fillIndex:borderWidth:borderColor: (in category 'primitives-adding') ----- primAddRectFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 (self canProceedAfter: self primGetFailureReason) ifTrue:[ ^self primAddRectFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 ]. + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primChangeActiveEdgeTableEntryFrom: (in category 'primitives-incremental') ----- primChangeActiveEdgeTableEntryFrom: edgeEntry "Change the entry in the active edge table from edgeEntry" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primClipRectInto: (in category 'primitives-access') ----- primClipRectInto: rect + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primCopyBufferFrom:to: (in category 'primitives-misc') ----- primCopyBufferFrom: oldBuffer to: newBuffer "Copy the contents of oldBuffer into the (larger) newBuffer" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primDisplaySpanBuffer (in category 'primitives-incremental') ----- primDisplaySpanBuffer "Display the current scan line if necessary" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primFinishedProcessing (in category 'primitives-incremental') ----- primFinishedProcessing "Return true if there are no more entries in AET and GET and the last scan line has been displayed" + ^ true! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primFlushNeeded (in category 'primitives-access') ----- primFlushNeeded + ^ false! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primFlushNeeded: (in category 'primitives-access') ----- primFlushNeeded: aBoolean + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetAALevel (in category 'primitives-access') ----- primGetAALevel "Set the AA level" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetBezierStats: (in category 'primitives-access') ----- primGetBezierStats: statsArray + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetClipRect: (in category 'primitives-access') ----- primGetClipRect: rect + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetCounts: (in category 'primitives-access') ----- primGetCounts: statsArray + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetDepth (in category 'primitives-access') ----- primGetDepth + ^ 32! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetOffset (in category 'primitives-access') ----- primGetOffset + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primGetTimes: (in category 'primitives-access') ----- primGetTimes: statsArray + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primInitializeBuffer: (in category 'primitives-misc') ----- primInitializeBuffer: buffer + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primInitializeProcessing (in category 'primitives-incremental') ----- primInitializeProcessing "Initialize processing in the GE. Create the active edge table and sort it." + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primMergeFill:from: (in category 'primitives-incremental') ----- primMergeFill: fillBitmap from: fill "Merge the filled bitmap into the current output buffer." + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primNextActiveEdgeEntryInto: (in category 'primitives-incremental') ----- primNextActiveEdgeEntryInto: edgeEntry "Store the next entry of the AET at the current y-value in edgeEntry. Return false if there is no entry, true otherwise." + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primNextFillEntryInto: (in category 'primitives-incremental') ----- primNextFillEntryInto: fillEntry "Store the next fill entry of the active edge table in fillEntry. Return false if there is no such entry, true otherwise" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primNextGlobalEdgeEntryInto: (in category 'primitives-incremental') ----- primNextGlobalEdgeEntryInto: edgeEntry "Store the next entry of the GET at the current y-value in edgeEntry. Return false if there is no entry, true otherwise." + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primRenderImage:with: (in category 'primitives-incremental') ----- primRenderImage: edge with: fill "Start/Proceed rendering the current scan line" + ^0 ! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primRenderScanline:with: (in category 'primitives-incremental') ----- primRenderScanline: edge with: fill "Start/Proceed rendering the current scan line" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetAALevel: (in category 'primitives-access') ----- primSetAALevel: level "Set the AA level" + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetClipRect: (in category 'primitives-access') ----- primSetClipRect: rect + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetColorTransform: (in category 'primitives-access') ----- primSetColorTransform: transform + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetDepth: (in category 'primitives-access') ----- primSetDepth: depth + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetEdgeTransform: (in category 'primitives-access') ----- primSetEdgeTransform: transform + ^ 0! - ^self primitiveFailed! Item was changed: ----- Method: BalloonEngine>>primSetOffset: (in category 'primitives-access') ----- primSetOffset: point + ^ 0! - ^self primitiveFailed! From bert at freudenbergs.de Thu Feb 12 14:48:06 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Feb 12 14:48:09 2015 Subject: [squeak-dev] The Inbox: Balloon-tfel.26.mcz In-Reply-To: References: Message-ID: <2DDC2F3D-EAF3-42E4-BD64-DE1A088757DA@freudenbergs.de> > On 12.02.2015, at 14:28, commits@source.squeak.org wrote: > > Tim Felgentreff uploaded a new version of Balloon to project The Inbox: > http://source.squeak.org/inbox/Balloon-tfel.26.mcz > > ==================== Summary ==================== > > Name: Balloon-tfel.26 > Author: tfel > Time: 12 February 2015, 3:28:04.366 pm > UUID: 94ab88a7-1f0f-0048-b15f-1a604dc5601a > Ancestors: Balloon-tfel.22, Balloon-bf.25 > > Instead of failing hard, return default values from Balloon primitive methods, for VMs without plugin (i.e., RSqueakVM) > > =============== Diff against Balloon-bf.25 =============== > > Item was changed: > ----- Method: BalloonEngine>>primAddActiveEdgeTableEntryFrom: (in category 'primitives-incremental') ----- > primAddActiveEdgeTableEntryFrom: edgeEntry > "Add edge entry to the AET." > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddActiveEdgeTableEntryFrom: edgeEntry > ]. > + ^ 0! > - ^self primitiveFailed! I'm not so sure suppressing the error messages is a good idea. Shouldn't we rather change some higher-level code to not use Balloon if the plugin is not available? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150212/aced988b/smime.bin From commits at source.squeak.org Thu Feb 12 15:31:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 12 15:31:21 2015 Subject: [squeak-dev] The Inbox: Graphics-tfel.306.mcz Message-ID: A new version of Graphics was added to project The Inbox: http://source.squeak.org/inbox/Graphics-tfel.306.mcz ==================== Summary ==================== Name: Graphics-tfel.306 Author: tfel Time: 12 February 2015, 4:30:55.231 pm UUID: d29337c1-4ded-b541-bf1e-9a8ca326eb04 Ancestors: Graphics-kfr.305 get rid of the self>>error: call in BitBlt>>copyBits. This is not really useful, as we can just proceed and it still works. In addition, the RSqueakVM needs to go through this fallback code to run the BitBltSimulation (it doesn't have a plugin) =============== Diff against Graphics-kfr.305 =============== Item was changed: ----- Method: BitBlt>>copyBits (in category 'copying') ----- copyBits "Primitive. Perform the movement of bits from the source form to the destination form. Fail if any variables are not of the right type (Integer, Float, or Form) or if the combination rule is not implemented. In addition to the original 16 combination rules, this BitBlt supports 16 fail (to simulate paint) 17 fail (to simulate mask) 18 sourceWord + destinationWord 19 sourceWord - destinationWord 20 rgbAdd: sourceWord with: destinationWord 21 rgbSub: sourceWord with: destinationWord 22 rgbDiff: sourceWord with: destinationWord 23 tallyIntoMap: destinationWord 24 alphaBlend: sourceWord with: destinationWord 25 pixPaint: sourceWord with: destinationWord 26 pixMask: sourceWord with: destinationWord 27 rgbMax: sourceWord with: destinationWord 28 rgbMin: sourceWord with: destinationWord 29 rgbMin: sourceWord bitInvert32 with: destinationWord " "Check for compressed source, destination or halftone forms" (combinationRule >= 30 and: [combinationRule <= 31]) ifTrue: ["No alpha specified -- re-run with alpha = 1.0" ^ self copyBitsTranslucent: 255]. ((sourceForm isForm) and: [sourceForm unhibernate]) ifTrue: [^ self copyBits]. ((destForm isForm) and: [destForm unhibernate]) ifTrue: [^ self copyBits]. ((halftoneForm isForm) and: [halftoneForm unhibernate]) ifTrue: [^ self copyBits]. "Check for unimplmented rules" combinationRule = Form oldPaint ifTrue: [^ self paintBits]. combinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits]. "Check if BitBlt doesn't support full color maps" (colorMap notNil and:[colorMap isColormap]) ifTrue:[ colorMap := colorMap colors. ^self copyBits]. "Check if clipping gots us way out of range" self clipRange ifTrue:[self roundVariables. ^self copyBitsAgain]. - self error: 'Bad BitBlt arg (Fraction?); proceed to convert.'. "Convert all numeric parameters to integers and try again." self roundVariables. ^ self copyBitsAgain! From timfelgentreff at gmail.com Thu Feb 12 15:44:27 2015 From: timfelgentreff at gmail.com (timfelgentreff) Date: Thu Feb 12 15:50:31 2015 Subject: [squeak-dev] Re: The Inbox: Graphics-tfel.306.mcz In-Reply-To: References: Message-ID: <1423755867754-4805346.post@n4.nabble.com> This is just a small change, but I wasn't sure if anyone can think of a reason for this line to be there. My reason for wanting it gone is that we, for RSqueakVM, do not include the BitBltPlugin, but instead run the simulator. The way we do it is that, when the image wants the RSqueakVM to run the copyBits primitive, we repeatedly fail (to let the fallback code unhibernate stuff and so on), and then, when the primitive is finally called from BitBlt>>copyBitsAgain, we instead call BitBlt>>copyBitsSimulated (so RSqueakVM requires the VMMaker to be loaded). So, this error line would bring up the debugger, call BitBlt to draw it, bring up a debugger .... Long story short, anyone have anything against removing this line? -- View this message in context: http://forum.world.st/The-Inbox-Graphics-tfel-306-mcz-tp4805343p4805346.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ma.chris.m at gmail.com Thu Feb 12 16:12:43 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Feb 12 16:12:45 2015 Subject: [squeak-dev] how to pass default startup parameters to VM? Message-ID: Has anyone noticed that cutting text out of Chrome and trying to paste it in Squeak does not work at all unless you first paste into a text-editor first and copy it out of there? Or, if you simply pass the -textenc utf8 paramter to the VM, all C&P'ing seems to work just fine. But I never remember to do it, plus its more to type every time I start a VM. So I wnat to put it into the actual bash script. I thought I could just sneak it into the last line in that file: LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" "$@" changing it to: LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak -textenc utf8" "$@" but that isn't right. Any suggestions? Thx. From Yoshiki.Ohshima at acm.org Thu Feb 12 16:36:06 2015 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Feb 12 16:36:09 2015 Subject: [squeak-dev] Re: The Inbox: Graphics-tfel.306.mcz In-Reply-To: <1423755867754-4805346.post@n4.nabble.com> References: <1423755867754-4805346.post@n4.nabble.com> Message-ID: On Thu, Feb 12, 2015 at 7:44 AM, timfelgentreff wrote: > This is just a small change, but I wasn't sure if anyone can think of a > reason for this line to be there. My reason for wanting it gone is that we, > for RSqueakVM, do not include the BitBltPlugin, but instead run the > simulator. The way we do it is that, when the image wants the RSqueakVM to > run the copyBits primitive, we repeatedly fail (to let the fallback code > unhibernate stuff and so on), and then, when the primitive is finally called > from BitBlt>>copyBitsAgain, we instead call BitBlt>>copyBitsSimulated (so > RSqueakVM requires the VMMaker to be loaded). > > So, this error line would bring up the debugger, call BitBlt to draw it, > bring up a debugger .... > > Long story short, anyone have anything against removing this line? Ha. The line used to be crucial to stay alive but I think it is totally fine to remove it.. -- -- Yoshiki From leves at elte.hu Thu Feb 12 18:52:38 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 12 18:52:42 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: On Tue, 10 Feb 2015, Bert Freudenberg wrote: > On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >> >> Bert Freudenberg uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-bf.899.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-bf.899 >> Author: bf >> Time: 10 February 2015, 4:37:05.988 pm >> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >> Ancestors: Kernel-eem.898 >> >> Fix random for Really Large Integers. >> >> =============== Diff against Kernel-eem.898 =============== >> >> Item was changed: >> ----- Method: Random>>nextInt: (in category 'accessing') ----- >> nextInt: anInteger >> " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " >> >> anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. >> + "avoid Float arithmetic in #next to work with LargeInts" >> + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1! >> - ^ (self next * anInteger) truncated + 1! > > > We might want to do something better if anInteger > 16r80000000, because that's the maximum number of different random integers we can produce. We would need to call nextValue twice (or more times) to produce enough randomness. Fetching more bits from the generator won't be better. This generator has 31 bits internal state, so it can't generate longer random numbers. We need a better PRNG. Levente > > My fix just solves the immediate problem of running into infinite Floats. > > - Bert - > > > > From eliot.miranda at gmail.com Thu Feb 12 18:59:20 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 12 18:59:23 2015 Subject: [squeak-dev] how to pass default startup parameters to VM? In-Reply-To: References: Message-ID: Hi Chris, damn, I thought I'd fixed this. Linux right? I see r2275 | eliot | 2010-09-04 08:52:10 -0700 (Sat, 04 Sep 2010) | 3 lines Fix filename character encoding for Mac OS X (in Info.plist; use UTF-8). Update minimal VMMaker image to latest trunk. But that's only Mac. I should fix this for the Spur VM on linux. On Thu, Feb 12, 2015 at 8:12 AM, Chris Muller wrote: > Has anyone noticed that cutting text out of Chrome and trying to paste > it in Squeak does not work at all unless you first paste into a > text-editor first and copy it out of there? > > Or, if you simply pass the -textenc utf8 paramter to the VM, all > C&P'ing seems to work just fine. > > But I never remember to do it, plus its more to type every time I > start a VM. So I wnat to put it into the actual bash script. > > I thought I could just sneak it into the last line in that file: > > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" > "$@" > > changing it to: > > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec > "$BIN/squeak -textenc utf8" "$@" > > but that isn't right. Any suggestions? Thx. > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150212/7157b81c/attachment.htm From asqueaker at gmail.com Thu Feb 12 18:59:26 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Feb 12 18:59:29 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: Maybe adopt one of the ones from the Cryptography package? On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: > On Tue, 10 Feb 2015, Bert Freudenberg wrote: > >> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>> >>> >>> Bert Freudenberg uploaded a new version of Kernel to project The Trunk: >>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Kernel-bf.899 >>> Author: bf >>> Time: 10 February 2015, 4:37:05.988 pm >>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>> Ancestors: Kernel-eem.898 >>> >>> Fix random for Really Large Integers. >>> >>> =============== Diff against Kernel-eem.898 =============== >>> >>> Item was changed: >>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>> nextInt: anInteger >>> " Answer a random integer in the interval [1, anInteger]. >>> anInteger should be less than 16r80000000. " >>> >>> anInteger strictlyPositive ifFalse: [ self error: 'Range must be >>> positive' ]. >>> + "avoid Float arithmetic in #next to work with LargeInts" >>> + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) >>> + 1! >>> - ^ (self next * anInteger) truncated + 1! >> >> >> >> We might want to do something better if anInteger > 16r80000000, because >> that's the maximum number of different random integers we can produce. We >> would need to call nextValue twice (or more times) to produce enough >> randomness. > > > Fetching more bits from the generator won't be better. This generator has 31 > bits internal state, so it can't generate longer random numbers. > We need a better PRNG. > > Levente > > >> >> My fix just solves the immediate problem of running into infinite Floats. >> >> - Bert - >> >> >> >> > From leves at elte.hu Thu Feb 12 19:18:53 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 12 19:19:02 2015 Subject: [squeak-dev] how to pass default startup parameters to VM? In-Reply-To: References: Message-ID: On Thu, 12 Feb 2015, Chris Muller wrote: > Has anyone noticed that cutting text out of Chrome and trying to paste > it in Squeak does not work at all unless you first paste into a > text-editor first and copy it out of there? > > Or, if you simply pass the -textenc utf8 paramter to the VM, all > C&P'ing seems to work just fine. > > But I never remember to do it, plus its more to type every time I > start a VM. So I wnat to put it into the actual bash script. > > I thought I could just sneak it into the last line in that file: > > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" "$@" > > changing it to: > > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec > "$BIN/squeak -textenc utf8" "$@" > > but that isn't right. Any suggestions? Thx. Try replacing the line with this two: arguments="-textenc utf8 $@" LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" $arguments Levente > > From leves at elte.hu Thu Feb 12 19:21:49 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 12 19:21:54 2015 Subject: [squeak-dev] The Inbox: Balloon-tfel.26.mcz In-Reply-To: References: Message-ID: Would it be possible to provide an empty plugin for RSqueakVM instead? Btw, I wonder if #primGetFailureReason is still useful now that we have error codes. Levente On Thu, 12 Feb 2015, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of Balloon to project The Inbox: > http://source.squeak.org/inbox/Balloon-tfel.26.mcz > > ==================== Summary ==================== > > Name: Balloon-tfel.26 > Author: tfel > Time: 12 February 2015, 3:28:04.366 pm > UUID: 94ab88a7-1f0f-0048-b15f-1a604dc5601a > Ancestors: Balloon-tfel.22, Balloon-bf.25 > > Instead of failing hard, return default values from Balloon primitive methods, for VMs without plugin (i.e., RSqueakVM) > > =============== Diff against Balloon-bf.25 =============== > > Item was changed: > ----- Method: BalloonEngine>>primAddActiveEdgeTableEntryFrom: (in category 'primitives-incremental') ----- > primAddActiveEdgeTableEntryFrom: edgeEntry > "Add edge entry to the AET." > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddActiveEdgeTableEntryFrom: edgeEntry > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddBezierFrom:to:via:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- > primAddBezierFrom: start to: end via: via leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddBezierFrom: start to: end via: via leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddBezierShape:segments:fill:lineWidth:lineFill: (in category 'primitives-adding') ----- > primAddBezierShape: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddBezierShape: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddBitmapFill:colormap:tile:from:along:normal:xIndex: (in category 'primitives-adding') ----- > primAddBitmapFill: form colormap: cmap tile: tileFlag from: origin along: direction normal: normal xIndex: xIndex > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddBitmapFill: form colormap: cmap tile: tileFlag from: origin along: direction normal: normal xIndex: xIndex > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList: (in category 'primitives-adding') ----- > primAddCompressedShape: points segments: nSegments leftFills: leftFills rightFills: rightFills lineWidths: lineWidths lineFills: lineFills fillIndexList: fillIndexList > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddCompressedShape: points segments: nSegments leftFills: leftFills rightFills: rightFills lineWidths: lineWidths lineFills: lineFills fillIndexList: fillIndexList > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddExternalEdge:initialX:initialY:initialZ:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- > primAddExternalEdge: index initialX: initialX initialY: initialY initialZ: initialZ leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddExternalEdge: index initialX: initialX initialY: initialY initialZ: initialZ leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddExternalFill: (in category 'primitives-adding') ----- > primAddExternalFill: index > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddExternalFill: index > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddGradientFill:from:along:normal:radial: (in category 'primitives-adding') ----- > primAddGradientFill: colorRamp from: origin along: direction normal: normal radial: isRadial > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddGradientFill: colorRamp > from: origin > along: direction > normal: normal > radial: isRadial > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddLineFrom:to:leftFillIndex:rightFillIndex: (in category 'primitives-adding') ----- > primAddLineFrom: start to: end leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddLineFrom: start to: end leftFillIndex: leftFillIndex rightFillIndex: rightFillIndex > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddOvalFrom:to:fillIndex:borderWidth:borderColor: (in category 'primitives-adding') ----- > primAddOvalFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddOvalFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddPolygon:segments:fill:lineWidth:lineFill: (in category 'primitives-adding') ----- > primAddPolygon: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddPolygon: points segments: nSegments fill: fillStyle lineWidth: lineWidth lineFill: lineFill > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primAddRectFrom:to:fillIndex:borderWidth:borderColor: (in category 'primitives-adding') ----- > primAddRectFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 > > (self canProceedAfter: self primGetFailureReason) ifTrue:[ > ^self primAddRectFrom: start to: end fillIndex: fillIndex borderWidth: width borderColor: pixelValue32 > ]. > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primChangeActiveEdgeTableEntryFrom: (in category 'primitives-incremental') ----- > primChangeActiveEdgeTableEntryFrom: edgeEntry > "Change the entry in the active edge table from edgeEntry" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primClipRectInto: (in category 'primitives-access') ----- > primClipRectInto: rect > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primCopyBufferFrom:to: (in category 'primitives-misc') ----- > primCopyBufferFrom: oldBuffer to: newBuffer > "Copy the contents of oldBuffer into the (larger) newBuffer" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primDisplaySpanBuffer (in category 'primitives-incremental') ----- > primDisplaySpanBuffer > "Display the current scan line if necessary" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primFinishedProcessing (in category 'primitives-incremental') ----- > primFinishedProcessing > "Return true if there are no more entries in AET and GET and the last scan line has been displayed" > > + ^ true! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primFlushNeeded (in category 'primitives-access') ----- > primFlushNeeded > > + ^ false! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primFlushNeeded: (in category 'primitives-access') ----- > primFlushNeeded: aBoolean > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetAALevel (in category 'primitives-access') ----- > primGetAALevel > "Set the AA level" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetBezierStats: (in category 'primitives-access') ----- > primGetBezierStats: statsArray > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetClipRect: (in category 'primitives-access') ----- > primGetClipRect: rect > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetCounts: (in category 'primitives-access') ----- > primGetCounts: statsArray > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetDepth (in category 'primitives-access') ----- > primGetDepth > > + ^ 32! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetOffset (in category 'primitives-access') ----- > primGetOffset > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primGetTimes: (in category 'primitives-access') ----- > primGetTimes: statsArray > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primInitializeBuffer: (in category 'primitives-misc') ----- > primInitializeBuffer: buffer > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primInitializeProcessing (in category 'primitives-incremental') ----- > primInitializeProcessing > "Initialize processing in the GE. > Create the active edge table and sort it." > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primMergeFill:from: (in category 'primitives-incremental') ----- > primMergeFill: fillBitmap from: fill > "Merge the filled bitmap into the current output buffer." > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primNextActiveEdgeEntryInto: (in category 'primitives-incremental') ----- > primNextActiveEdgeEntryInto: edgeEntry > "Store the next entry of the AET at the current y-value in edgeEntry. > Return false if there is no entry, true otherwise." > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primNextFillEntryInto: (in category 'primitives-incremental') ----- > primNextFillEntryInto: fillEntry > "Store the next fill entry of the active edge table in fillEntry. > Return false if there is no such entry, true otherwise" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primNextGlobalEdgeEntryInto: (in category 'primitives-incremental') ----- > primNextGlobalEdgeEntryInto: edgeEntry > "Store the next entry of the GET at the current y-value in edgeEntry. > Return false if there is no entry, true otherwise." > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primRenderImage:with: (in category 'primitives-incremental') ----- > primRenderImage: edge with: fill > "Start/Proceed rendering the current scan line" > > + ^0 ! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primRenderScanline:with: (in category 'primitives-incremental') ----- > primRenderScanline: edge with: fill > "Start/Proceed rendering the current scan line" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetAALevel: (in category 'primitives-access') ----- > primSetAALevel: level > "Set the AA level" > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetClipRect: (in category 'primitives-access') ----- > primSetClipRect: rect > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetColorTransform: (in category 'primitives-access') ----- > primSetColorTransform: transform > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetDepth: (in category 'primitives-access') ----- > primSetDepth: depth > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetEdgeTransform: (in category 'primitives-access') ----- > primSetEdgeTransform: transform > > + ^ 0! > - ^self primitiveFailed! > > Item was changed: > ----- Method: BalloonEngine>>primSetOffset: (in category 'primitives-access') ----- > primSetOffset: point > > + ^ 0! > - ^self primitiveFailed! > > > From leves at elte.hu Thu Feb 12 19:29:47 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 12 19:29:51 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: IIRC it has a mersenne twister (which is a quite common choice for prngs). We should check the implementation and see if it's efficient enough. Levente On Thu, 12 Feb 2015, Chris Muller wrote: > Maybe adopt one of the ones from the Cryptography package? > > On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >> >>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>> >>>> >>>> Bert Freudenberg uploaded a new version of Kernel to project The Trunk: >>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Kernel-bf.899 >>>> Author: bf >>>> Time: 10 February 2015, 4:37:05.988 pm >>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>> Ancestors: Kernel-eem.898 >>>> >>>> Fix random for Really Large Integers. >>>> >>>> =============== Diff against Kernel-eem.898 =============== >>>> >>>> Item was changed: >>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>> nextInt: anInteger >>>> " Answer a random integer in the interval [1, anInteger]. >>>> anInteger should be less than 16r80000000. " >>>> >>>> anInteger strictlyPositive ifFalse: [ self error: 'Range must be >>>> positive' ]. >>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>> + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) >>>> + 1! >>>> - ^ (self next * anInteger) truncated + 1! >>> >>> >>> >>> We might want to do something better if anInteger > 16r80000000, because >>> that's the maximum number of different random integers we can produce. We >>> would need to call nextValue twice (or more times) to produce enough >>> randomness. >> >> >> Fetching more bits from the generator won't be better. This generator has 31 >> bits internal state, so it can't generate longer random numbers. >> We need a better PRNG. >> >> Levente >> >> >>> >>> My fix just solves the immediate problem of running into infinite Floats. >>> >>> - Bert - >>> >>> >>> >>> >> > > From leves at elte.hu Thu Feb 12 19:46:00 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Feb 12 19:46:05 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: It seems like it only has csprngs. I see there one based on the Fortuna algorithm, and one based on SHA1 in counter mode. Levente On Thu, 12 Feb 2015, Levente Uzonyi wrote: > IIRC it has a mersenne twister (which is a quite common choice for prngs). We > should check the implementation and see if it's efficient enough. > > Levente > > On Thu, 12 Feb 2015, Chris Muller wrote: > >> Maybe adopt one of the ones from the Cryptography package? >> >> On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >>> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >>> >>>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>>> >>>>> >>>>> Bert Freudenberg uploaded a new version of Kernel to project The Trunk: >>>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: Kernel-bf.899 >>>>> Author: bf >>>>> Time: 10 February 2015, 4:37:05.988 pm >>>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>>> Ancestors: Kernel-eem.898 >>>>> >>>>> Fix random for Really Large Integers. >>>>> >>>>> =============== Diff against Kernel-eem.898 =============== >>>>> >>>>> Item was changed: >>>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>>> nextInt: anInteger >>>>> " Answer a random integer in the interval [1, anInteger]. >>>>> anInteger should be less than 16r80000000. " >>>>> >>>>> anInteger strictlyPositive ifFalse: [ self error: 'Range must be >>>>> positive' ]. >>>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>>> + ^ ((seed := self nextValue) asInteger * anInteger // M >>>>> asInteger) >>>>> + 1! >>>>> - ^ (self next * anInteger) truncated + 1! >>>> >>>> >>>> >>>> We might want to do something better if anInteger > 16r80000000, because >>>> that's the maximum number of different random integers we can produce. We >>>> would need to call nextValue twice (or more times) to produce enough >>>> randomness. >>> >>> >>> Fetching more bits from the generator won't be better. This generator has >>> 31 >>> bits internal state, so it can't generate longer random numbers. >>> We need a better PRNG. >>> >>> Levente >>> >>> >>>> >>>> My fix just solves the immediate problem of running into infinite Floats. >>>> >>>> - Bert - >>>> >>>> >>>> >>>> >>> >> >> > > From asqueaker at gmail.com Thu Feb 12 20:23:12 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Feb 12 20:23:15 2015 Subject: [Vm-dev] Re: [squeak-dev] how to pass default startup parameters to VM? In-Reply-To: References: Message-ID: > Try replacing the line with this two: > > arguments="-textenc utf8 $@" > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" > $arguments I don't know why, but it works! My only wild guess is that exec only wants two "arguments", the binary and the arguments to that binary..? Clearly I do not know much about bash. Many thanks. From eliot.miranda at gmail.com Thu Feb 12 20:42:50 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 12 20:42:52 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ These fix two important bugs in the Spur VMs, so Newspeakers should update, and changes the default text encoding to UTF-8 on linux. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150212/c0fda89a/attachment.htm From eliot.miranda at gmail.com Thu Feb 12 20:44:37 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 12 20:44:40 2015 Subject: [Vm-dev] Re: [squeak-dev] how to pass default startup parameters to VM? In-Reply-To: References: Message-ID: Hi Chris, check out the new r3254 VMs. These should provide utf-8 by default. And yes, the issue was that the quotes turned everything into a single argument. exec "$BIN/squeak" -textenc utf8 "$@" would have worked also. On Thu, Feb 12, 2015 at 12:23 PM, Chris Muller wrote: > > Try replacing the line with this two: > > > > arguments="-textenc utf8 $@" > > LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec "$BIN/squeak" > > $arguments > > I don't know why, but it works! My only wild guess is that exec only > wants two "arguments", the binary and the arguments to that binary..? > Clearly I do not know much about bash. > > Many thanks. > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150212/2aafdc9c/attachment.htm From timfelgentreff at gmail.com Thu Feb 12 21:36:37 2015 From: timfelgentreff at gmail.com (timfelgentreff) Date: Thu Feb 12 21:42:41 2015 Subject: [squeak-dev] Re: The Inbox: Balloon-tfel.26.mcz In-Reply-To: References: Message-ID: <1423776997172-4805410.post@n4.nabble.com> I would then actually prefer Bert's option. I'd rather have a sane in-image fallback rather than having to provide an empty plugin. I will look into it. -- View this message in context: http://forum.world.st/The-Inbox-Balloon-tfel-26-mcz-tp4805333p4805410.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From casey.obrien.r at gmail.com Thu Feb 12 23:09:16 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Thu Feb 12 23:09:20 2015 Subject: [squeak-dev] More Candidates Message-ID: <86C0E161-D9DC-4591-BE17-6C848A6A96D8@gmail.com> So everybody running is pretty darned cool. Yeah, we got that going. But there's something missing. Haven't quite put my finger on it. It's not that much of an investment at minimum. You have to telecommute to a meeting. Beyond that, you're still just a volunteer and you can still do whatever you want. I think of it more as an opportunity to put what you want to do in a place proximal to the center of the frame, where the lights are pointed. An opportunity to draw attention to the things you want to do. Inspire people to help you do them. The point is, there's plenty of time for vampire slaying after Smalltalk club. I bet there are a whole lot of people here, who -- deep down -- would like to do this thing, but for whatever reason, dismiss the possibility. To all of you, I say: just think of the possibilities! I don't care who you are. Just, please run. This message is brought to you by the number nine, which is really very interesting in itself, and the International Endowment for Giving Casey a Run for His Money, as well as the Campaign for Someone Other than Casey. --C From tim at rowledge.org Thu Feb 12 23:42:24 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 12 23:42:28 2015 Subject: [squeak-dev] More Candidates In-Reply-To: <86C0E161-D9DC-4591-BE17-6C848A6A96D8@gmail.com> References: <86C0E161-D9DC-4591-BE17-6C848A6A96D8@gmail.com> Message-ID: <86641DCB-E5EE-4B30-8DFB-8148BCA04F57@rowledge.org> On 12-02-2015, at 3:09 PM, Casey Ransberger wrote: > I don't care who you are. Just, please run. Run, Spot, run! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: WAF: Warn After the Fact From casey.obrien.r at gmail.com Fri Feb 13 01:38:01 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Fri Feb 13 01:38:07 2015 Subject: [squeak-dev] More Candidates In-Reply-To: <86641DCB-E5EE-4B30-8DFB-8148BCA04F57@rowledge.org> References: <86C0E161-D9DC-4591-BE17-6C848A6A96D8@gmail.com> <86641DCB-E5EE-4B30-8DFB-8148BCA04F57@rowledge.org> Message-ID: <2F3E4F69-B83F-40C4-8023-676962831126@gmail.com> > On Feb 12, 2015, at 3:42 PM, tim Rowledge wrote: > > >> On 12-02-2015, at 3:09 PM, Casey Ransberger wrote: >> >> I don't care who you are. Just, please run. > > Run, Spot, run! > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: WAF: Warn After the Fact I'm trying okay? But I'm pigeon-toed and knock-kneed, so it's kind of a pain! Seriously, pigeon-toes and knock-knees. It seriously hurt. Add eczema, and you have cracked and bleeding knees. I started hiding up in trees with books on physics during P.E., that's how I became an intellectual. I really didn't have any other field to move into. It's a shame that I wasn't bright enough to really understand the physics books, but I still had more fun in that tree than I would have had tripping over my own feet on that track! So anyway, yeah, running isn't really my strong suit :D From nicolas.cellier.aka.nice at gmail.com Fri Feb 13 12:43:55 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Feb 13 12:43:58 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: Also look into Sci-Smalltalk, there are several PRNG there. For large integers, we need to construct them by chunk anyway. We construct a large X in interval [0,2^N-1], where for example N is a multiple of 32 for simple PRNG. Then we perform Max * X // (2^N) for generating in interval [0,Max-1]. Some guard must be taken with N > highbit(Max) so as to obtain a fair distribution (uniform). 2015-02-12 20:46 GMT+01:00 Levente Uzonyi : > It seems like it only has csprngs. I see there one based on the Fortuna > algorithm, and one based on SHA1 in counter mode. > > Levente > > > On Thu, 12 Feb 2015, Levente Uzonyi wrote: > > IIRC it has a mersenne twister (which is a quite common choice for >> prngs). We should check the implementation and see if it's efficient enough. >> >> Levente >> >> On Thu, 12 Feb 2015, Chris Muller wrote: >> >> Maybe adopt one of the ones from the Cryptography package? >>> >>> On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >>> >>>> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >>>> >>>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>>> >>>>>> >>>>>> >>>>>> Bert Freudenberg uploaded a new version of Kernel to project The >>>>>> Trunk: >>>>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>>>> >>>>>> ==================== Summary ==================== >>>>>> >>>>>> Name: Kernel-bf.899 >>>>>> Author: bf >>>>>> Time: 10 February 2015, 4:37:05.988 pm >>>>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>>>> Ancestors: Kernel-eem.898 >>>>>> >>>>>> Fix random for Really Large Integers. >>>>>> >>>>>> =============== Diff against Kernel-eem.898 =============== >>>>>> >>>>>> Item was changed: >>>>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>>>> nextInt: anInteger >>>>>> " Answer a random integer in the interval [1, anInteger]. >>>>>> anInteger should be less than 16r80000000. " >>>>>> >>>>>> anInteger strictlyPositive ifFalse: [ self error: 'Range must >>>>>> be >>>>>> positive' ]. >>>>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>>>> + ^ ((seed := self nextValue) asInteger * anInteger // M >>>>>> asInteger) >>>>>> + 1! >>>>>> - ^ (self next * anInteger) truncated + 1! >>>>>> >>>>> >>>>> >>>>> >>>>> We might want to do something better if anInteger > 16r80000000, >>>>> because >>>>> that's the maximum number of different random integers we can produce. >>>>> We >>>>> would need to call nextValue twice (or more times) to produce enough >>>>> randomness. >>>>> >>>> >>>> >>>> Fetching more bits from the generator won't be better. This generator >>>> has 31 >>>> bits internal state, so it can't generate longer random numbers. >>>> We need a better PRNG. >>>> >>>> Levente >>>> >>>> >>>> >>>>> My fix just solves the immediate problem of running into infinite >>>>> Floats. >>>>> >>>>> - Bert - >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150213/75ff0dd2/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Feb 13 18:39:43 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Feb 13 18:39:45 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: 2015-02-13 13:43 GMT+01:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > Also look into Sci-Smalltalk, there are several PRNG there. > For large integers, we need to construct them by chunk anyway. > > We construct a large X in interval [0,2^N-1], where for example N is a > multiple of 32 for simple PRNG. > Then we perform Max * X // (2^N) for generating in interval [0,Max-1]. > Some guard must be taken with N > highbit(Max) so as to obtain a fair > distribution (uniform). > > And as an example of unfair dice, let's generate an integer in [0,5] using 3 bits (8 solutions): If the bit generator is fair, then the restriction in [0,5] is not: ((0 to: 7) collect: [:e | (e *6) bitShift: -3]) sorted -> #(0 0 1 2 3 3 4 5) 0 and 3 have a probability of 25% while the others only 12.5%. Of course, fairness improves when N grow. An alternative algorithm would be to draw the fair bits and reject those greater than 4 Indeed (0 to: 7) select: [:e | e < 6] is fair... But we can reject up to half the toss when drawing a number in [0,2^(N-1)] with N bits... > > 2015-02-12 20:46 GMT+01:00 Levente Uzonyi : > >> It seems like it only has csprngs. I see there one based on the Fortuna >> algorithm, and one based on SHA1 in counter mode. >> >> Levente >> >> >> On Thu, 12 Feb 2015, Levente Uzonyi wrote: >> >> IIRC it has a mersenne twister (which is a quite common choice for >>> prngs). We should check the implementation and see if it's efficient enough. >>> >>> Levente >>> >>> On Thu, 12 Feb 2015, Chris Muller wrote: >>> >>> Maybe adopt one of the ones from the Cryptography package? >>>> >>>> On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >>>> >>>>> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >>>>> >>>>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> Bert Freudenberg uploaded a new version of Kernel to project The >>>>>>> Trunk: >>>>>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>>>>> >>>>>>> ==================== Summary ==================== >>>>>>> >>>>>>> Name: Kernel-bf.899 >>>>>>> Author: bf >>>>>>> Time: 10 February 2015, 4:37:05.988 pm >>>>>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>>>>> Ancestors: Kernel-eem.898 >>>>>>> >>>>>>> Fix random for Really Large Integers. >>>>>>> >>>>>>> =============== Diff against Kernel-eem.898 =============== >>>>>>> >>>>>>> Item was changed: >>>>>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>>>>> nextInt: anInteger >>>>>>> " Answer a random integer in the interval [1, anInteger]. >>>>>>> anInteger should be less than 16r80000000. " >>>>>>> >>>>>>> anInteger strictlyPositive ifFalse: [ self error: 'Range >>>>>>> must be >>>>>>> positive' ]. >>>>>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>>>>> + ^ ((seed := self nextValue) asInteger * anInteger // M >>>>>>> asInteger) >>>>>>> + 1! >>>>>>> - ^ (self next * anInteger) truncated + 1! >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> We might want to do something better if anInteger > 16r80000000, >>>>>> because >>>>>> that's the maximum number of different random integers we can >>>>>> produce. We >>>>>> would need to call nextValue twice (or more times) to produce enough >>>>>> randomness. >>>>>> >>>>> >>>>> >>>>> Fetching more bits from the generator won't be better. This generator >>>>> has 31 >>>>> bits internal state, so it can't generate longer random numbers. >>>>> We need a better PRNG. >>>>> >>>>> Levente >>>>> >>>>> >>>>> >>>>>> My fix just solves the immediate problem of running into infinite >>>>>> Floats. >>>>>> >>>>>> - Bert - >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150213/4a907c44/attachment.htm From asqueaker at gmail.com Fri Feb 13 20:02:55 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Feb 13 20:02:57 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: Well, is a csprng (I had to look that acronym up) a problem? Do you mean its too slow? Speed is important for the general case. Hopefully we'll find a solution that does not need to compromise randomness for speed. On Thu, Feb 12, 2015 at 1:46 PM, Levente Uzonyi wrote: > It seems like it only has csprngs. I see there one based on the Fortuna > algorithm, and one based on SHA1 in counter mode. > > Levente > > > On Thu, 12 Feb 2015, Levente Uzonyi wrote: > >> IIRC it has a mersenne twister (which is a quite common choice for prngs). >> We should check the implementation and see if it's efficient enough. >> >> Levente >> >> On Thu, 12 Feb 2015, Chris Muller wrote: >> >>> Maybe adopt one of the ones from the Cryptography package? >>> >>> On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >>>> >>>> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >>>> >>>>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>>>> >>>>>> >>>>>> >>>>>> Bert Freudenberg uploaded a new version of Kernel to project The >>>>>> Trunk: >>>>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>>>> >>>>>> ==================== Summary ==================== >>>>>> >>>>>> Name: Kernel-bf.899 >>>>>> Author: bf >>>>>> Time: 10 February 2015, 4:37:05.988 pm >>>>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>>>> Ancestors: Kernel-eem.898 >>>>>> >>>>>> Fix random for Really Large Integers. >>>>>> >>>>>> =============== Diff against Kernel-eem.898 =============== >>>>>> >>>>>> Item was changed: >>>>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>>>> nextInt: anInteger >>>>>> " Answer a random integer in the interval [1, anInteger]. >>>>>> anInteger should be less than 16r80000000. " >>>>>> >>>>>> anInteger strictlyPositive ifFalse: [ self error: 'Range must >>>>>> be >>>>>> positive' ]. >>>>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>>>> + ^ ((seed := self nextValue) asInteger * anInteger // M >>>>>> asInteger) >>>>>> + 1! >>>>>> - ^ (self next * anInteger) truncated + 1! >>>>> >>>>> >>>>> >>>>> >>>>> We might want to do something better if anInteger > 16r80000000, >>>>> because >>>>> that's the maximum number of different random integers we can produce. >>>>> We >>>>> would need to call nextValue twice (or more times) to produce enough >>>>> randomness. >>>> >>>> >>>> >>>> Fetching more bits from the generator won't be better. This generator >>>> has 31 >>>> bits internal state, so it can't generate longer random numbers. >>>> We need a better PRNG. >>>> >>>> Levente >>>> >>>> >>>>> >>>>> My fix just solves the immediate problem of running into infinite >>>>> Floats. >>>>> >>>>> - Bert - >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >> >> > From commits at source.squeak.org Fri Feb 13 21:01:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 13 21:01:20 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.901.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.901.mcz ==================== Summary ==================== Name: Kernel-eem.901 Author: eem Time: 13 February 2015, 1:00:47.881 pm UUID: 01852b3d-2d73-4a23-8de0-7ca117279435 Ancestors: Kernel-nice.900 Make Integer class>>byte1:byte2:byte3:byte4: 64-bit Spur savvy, and add a similarly savvy byte1:byte2:byte3:byte4:byte5:byte6:byte7:byte8: =============== Diff against Kernel-nice.900 =============== Item was changed: ----- Method: Integer class>>byte1:byte2:byte3:byte4: (in category 'instance creation') ----- + byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4 + "Depending on the size of SmallInteger maxVal and the high-order byte, + either copy directly into a LargeInteger, or build up a SmallInteger by shifting" - byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4 - "Depending on high-order byte copy directly into a LargeInteger, - or build up a SmallInteger by shifting" | value | + ((SmallInteger maxVal > 1073741823) + or: [byte4 < 16r40]) ifTrue: - byte4 < 16r40 ifTrue: [^ (byte4 bitShift: 24) + (byte3 bitShift: 16) + (byte2 bitShift: 8) + byte1]. value := LargePositiveInteger new: 4. value digitAt: 4 put: byte4. value digitAt: 3 put: byte3. value digitAt: 2 put: byte2. value digitAt: 1 put: byte1. + ^value! - ^ value! Item was added: + ----- Method: Integer class>>byte1:byte2:byte3:byte4:byte5:byte6:byte7:byte8: (in category 'instance creation') ----- + byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4 byte5: byte5 byte6: byte6 byte7: byte7 byte8: byte8 + "Depending on the size of SmallInteger maxVal and the high-order byte, + either copy directly into a LargeInteger, or build up a SmallInteger by shifting" + | value | + (SmallInteger maxVal > 1073741823 + ifTrue: [byte8 <= (SmallInteger maxVal digitAt: 8)] + ifFalse: [byte5 + byte6 + byte7 = 0 and: [byte4 < 16r40]]) ifTrue: + [^ (byte8 bitShift: 56) + + (byte7 bitShift: 48) + + (byte6 bitShift: 40) + + (byte5 bitShift: 32) + + (byte4 bitShift: 24) + + (byte3 bitShift: 16) + + (byte2 bitShift: 8) + + byte1]. + value := LargePositiveInteger new: 8. + value digitAt: 8 put: byte8. + value digitAt: 7 put: byte7. + value digitAt: 6 put: byte6. + value digitAt: 5 put: byte5. + value digitAt: 4 put: byte4. + value digitAt: 3 put: byte3. + value digitAt: 2 put: byte2. + value digitAt: 1 put: byte1. + ^value! From commits at source.squeak.org Fri Feb 13 21:06:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 13 21:06:49 2015 Subject: [squeak-dev] The Trunk: KernelTests-eem.288.mcz Message-ID: Eliot Miranda uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-eem.288.mcz ==================== Summary ==================== Name: KernelTests-eem.288 Author: eem Time: 13 February 2015, 1:06:38.236 pm UUID: 88e264d5-a798-40c5-b260-b5ad42222ef4 Ancestors: KernelTests-nice.287 Make the testCreationFromBytes tests 64-bit Spur savvy =============== Diff against KernelTests-nice.287 =============== Item was changed: ----- Method: IntegerTest>>testCreationFromBytes1 (in category 'tests - instance creation') ----- testCreationFromBytes1 "self run: #testCreationFromBytes1" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs SmallInteger maxVal as an instance of SmallInteger. " + | maxSmallInt hexString + builtInteger bytes | - | maxSmallInt hexString byte1 byte2 byte3 byte4 - builtInteger | maxSmallInt := SmallInteger maxVal. hexString := maxSmallInt printStringHex. + hexString size odd ifTrue: + [hexString := '0', hexString]. + self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := (1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. + builtInteger := bytes size > 4 + ifTrue: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) + byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] + ifFalse: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. - self assert: hexString size = 8. - byte4 := Number readFrom: (hexString copyFrom: 1 to: 2) base: 16. - byte3 := Number readFrom: (hexString copyFrom: 3 to: 4) base: 16. - byte2 := Number readFrom: (hexString copyFrom: 5 to: 6) base: 16. - byte1 := Number readFrom: (hexString copyFrom: 7 to: 8) base: 16. - builtInteger := Integer byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4. self assert: builtInteger = maxSmallInt. self assert: builtInteger class = SmallInteger ! Item was changed: ----- Method: IntegerTest>>testCreationFromBytes2 (in category 'tests - instance creation') ----- testCreationFromBytes2 "self run: #testCreationFromBytes2" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs (SmallInteger maxVal + 1) as an instance of LargePositiveInteger. " + | maxSmallInt hexString builtInteger bytes | - | maxSmallInt hexString byte1 byte2 byte3 byte4 builtInteger | maxSmallInt := SmallInteger maxVal. hexString := (maxSmallInt + 1) printStringHex. + hexString size odd ifTrue: + [hexString := '0', hexString]. + self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := (1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. + builtInteger := bytes size > 4 + ifTrue: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) + byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] + ifFalse: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. - self assert: hexString size = 8. - byte4 := Number readFrom: (hexString copyFrom: 1 to: 2) base: 16. - byte3 := Number readFrom: (hexString copyFrom: 3 to: 4) base: 16. - byte2 := Number readFrom: (hexString copyFrom: 5 to: 6) base: 16. - byte1 := Number readFrom: (hexString copyFrom: 7 to: 8) base: 16. - builtInteger := Integer byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4. self assert: builtInteger = (maxSmallInt + 1). self deny: builtInteger class = SmallInteger ! Item was changed: ----- Method: IntegerTest>>testCreationFromBytes3 (in category 'tests - instance creation') ----- testCreationFromBytes3 "self run: #testCreationFromBytes3" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs (SmallInteger maxVal - 1) as an instance of SmallInteger. " + | maxSmallInt hexString + builtInteger bytes | - | maxSmallInt hexString byte1 byte2 byte3 byte4 - builtInteger | maxSmallInt := SmallInteger maxVal. hexString := (maxSmallInt - 1) printStringHex. + hexString size odd ifTrue: + [hexString := '0', hexString]. + self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := (1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. + builtInteger := bytes size > 4 + ifTrue: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) + byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] + ifFalse: + [Integer + byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. - self assert: hexString size = 8. - byte4 := Number readFrom: (hexString copyFrom: 1 to: 2) base: 16. - byte3 := Number readFrom: (hexString copyFrom: 3 to: 4) base: 16. - byte2 := Number readFrom: (hexString copyFrom: 5 to: 6) base: 16. - byte1 := Number readFrom: (hexString copyFrom: 7 to: 8) base: 16. - builtInteger := Integer byte1: byte1 byte2: byte2 byte3: byte3 byte4: byte4. self assert: builtInteger = (maxSmallInt - 1). self assert: builtInteger class = SmallInteger ! From commits at source.squeak.org Fri Feb 13 22:39:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 13 22:39:44 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.902.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.902.mcz ==================== Summary ==================== Name: Kernel-nice.902 Author: nice Time: 13 February 2015, 11:39:01.472 pm UUID: 056a5cce-fafc-4bd8-a6e2-e85f9114b48a Ancestors: Kernel-eem.901 Generate large random integers a bit more fairly. The idea is just to generate a large bit sequence by gathering enough pseudo random chunks. Note that this implementation knows that Random cannot fairly generate 32 bits, so limit itself to 24 bits chunk. It knows two much about Random already and should better delegate, but since we have a single Pseudo Random Number Generator so far, don't bother too much. =============== Diff against Kernel-eem.901 =============== Item was added: + ----- Method: LargePositiveInteger>>atRandom: (in category 'truncation and round off') ----- + atRandom: aGenerator + "Answer a random integer from 1 to self picked from aGenerator." + + | chunkByteLength chunkBitLength chunkCount chunkMax bigRandomInteger | + chunkByteLength := 3. + chunkBitLength := chunkByteLength * 8. + chunkCount := + self highBitOfMagnitude + chunkBitLength - 1 // chunkBitLength "self would fit in that many chunks..." + + 2. "and two more chunks (48 bits) so as to have a pretty fair distribution" + chunkMax := 1<> (chunkCount * chunkBitLength) + 1! From commits at source.squeak.org Sat Feb 14 01:20:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Feb 14 01:20:25 2015 Subject: [squeak-dev] The Inbox: Kernel-nice.903.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.903.mcz ==================== Summary ==================== Name: Kernel-nice.903 Author: nice Time: 14 February 2015, 2:19:44.184 am UUID: d4f06790-d47b-4cb0-b9ff-9e0ff7dea9fc Ancestors: Kernel-nice.902 Introduce two new alternatives to integer division: #ratio: and #residue: are like #quo: and #rem: except that they round the quotient to nearest integer (tie to even) instead of truncating (note that // and \\ floor the quotient...). The second thing that they do differently is that they compute the exact ratio and exact residue when given a pair of Float. The third thing that they do differently is that they first coerce a pair of numbers to the highest generality before attempting any operation. =============== Diff against Kernel-nice.902 =============== Item was added: + ----- Method: Float>>fratio: (in category 'mathematical functions') ----- + fratio: aFloat + "Compute the exact ratio of self divided by aFloat (rounded to nearest integer, tie to even). + The result is either a Float in case of null (to wear correct sign) or exceptional value, + or an Integer (required in order to avoid overflow and inexact rounding)." + + | ex ey sx sy xa ya n result sign | + (self isFinite and: [self ~= 0.0 and: [aFloat isFinite and: [aFloat ~= 0.0]]]) + ifFalse: + ["purge cases of exceptional and trivial values" + ^self/aFloat]. + + xa := self abs. + ya := aFloat abs. + ex := xa exponent. + ey := ya exponent. + sx := xa significand. + sy := ya significand. + n := ex - ey. + sign := self significand*aFloat significand. + n < -1 ifTrue: [^sign copySignTo: 0.0]. + result := 0. + "subtract as many y significand as we can from x significand" + [(n >= 0 and: [sx >= sy]) + ifTrue: + [sx := sx - sy. + result := 1< sy or: [result odd and: [sx = sy]]) + ifTrue: + ["Round to nearest integer, tie to even" + result := result + 1]. + ^sign copySignTo: (result = 0 ifTrue: [0.0] ifFalse: [result])! Item was added: + ----- Method: Float>>fresidue: (in category 'mathematical functions') ----- + fresidue: aFloat + "Compute the exact residue of self divided by aFloat (rounded to nearest integer, tie to even). + This operation emulates libm remainder(self,aFloat) and is always exact. + The residue is between aFloat negated / 2 and aFloat / 2." + + | ex ey sx sy xa ya n sign odd roundToZero | + (self isFinite and: [self ~= 0.0 and: [aFloat isFinite and: [aFloat ~= 0.0]]]) + ifFalse: + ["purge cases of exceptional values" + ^self*aFloat / (self * aFloat)]. + + xa := self abs. + ya := aFloat abs. + ex := xa exponent. + ey := ya exponent. + sx := xa significand. + sy := ya significand. + n := ex - ey. + n < -1 ifTrue: [^self]. + sign := self. + roundToZero := true. + odd := false. + "subtract as many y significand as we can from x significand" + [(n >= 0 and: [sx >= sy]) + ifTrue: + [sx := sx - sy. + n = 0 ifTrue: [odd := true]. + sx = 0.0 ifTrue: [^sign copySignTo: 0.0]]. + n < 0] + whileFalse: + [n := n - 1. + sx := sx * 2.0]. + (sx > sy or: [odd and: [sx = sy]]) + ifTrue: + ["Round to nearest integer, tie to even" + sx := sx * 0.5 - sy. + sign := sign negated] + ifFalse: + [sx := sx * 0.5]. + ^(sign copySignTo: sx) timesTwoPower: ey! Item was added: + ----- Method: Float>>ratio: (in category 'arithmetic') ----- + ratio: aNumber + aNumber isFloat ifTrue: [^self fratio: aNumber]. + ^aNumber adaptToFloat: self andSend: #ratio:! Item was added: + ----- Method: Float>>residue: (in category 'arithmetic') ----- + residue: aNumber + aNumber isFloat ifTrue: [^self fresidue: aNumber]. + ^aNumber adaptToFloat: self andSend: #residue:! Item was added: + ----- Method: Fraction>>ratio: (in category 'arithmetic') ----- + ratio: aNumber + aNumber isFraction ifTrue: [^super ratio: aNumber]. + ^aNumber adaptToFraction: self andSend: #ratio:! Item was added: + ----- Method: Fraction>>residue: (in category 'arithmetic') ----- + residue: aNumber + aNumber isFraction ifTrue: [^super residue: aNumber]. + ^aNumber adaptToFraction: self andSend: #residue:! Item was added: + ----- Method: Fraction>>roundedTieToEven (in category 'truncation and round off') ----- + roundedTieToEven + "Faster than super." + | result | + denominator = 2 ifFalse: [^self rounded]. + result := numerator abs bitShift: -1. + result := result + (result bitAt: 1). + ^numerator positive + ifTrue: [result] + ifFalse: [result negated]! Item was added: + ----- Method: Integer>>ratio: (in category 'arithmetic') ----- + ratio: aNumber + aNumber isFraction ifTrue: [^super ratio: aNumber]. + ^aNumber adaptToInteger: self andSend: #ratio:! Item was added: + ----- Method: Integer>>residue: (in category 'arithmetic') ----- + residue: aNumber + aNumber isFraction ifTrue: [^super residue: aNumber]. + ^aNumber adaptToInteger: self andSend: #residue:! Item was added: + ----- Method: Integer>>roundedTieToEven (in category 'truncation and round off') ----- + roundedTieToEven + ^self! Item was added: + ----- Method: Number>>ratio: (in category 'arithmetic') ----- + ratio: aNumber + "Integer quotient defined by division with rounding, tie to nearest even. + residue: answers the remainder from this division." + + ^(self / aNumber) roundedTieToEven! Item was added: + ----- Method: Number>>residue: (in category 'arithmetic') ----- + residue: aNumber + "Remainder defined in terms of ratio:. + Answer a Number between aNumber/-2 and aNumber/2" + + ^self - ((self ratio: aNumber) * aNumber)! Item was added: + ----- Method: Number>>roundedTieToEven (in category 'truncation and round off') ----- + roundedTieToEven + "Answer the integer nearest the receiver. + In case of perfect tie, round to nearest even. + Unlike rounded (round away from zero), this mode of rounding is unbiased." + + | sign truncated fractionPart | + sign := self sign. + truncated := self truncated. + fractionPart := self - self truncated. + ^(fractionPart abs > (1/2) or: [fractionPart = (sign/2) and: [truncated odd]]) + ifTrue: [truncated + sign] + ifFalse: [truncated]! Item was added: + ----- Method: ScaledDecimal>>ratio: (in category 'arithmetic') ----- + ratio: aNumber + "Answer the integer quotient after dividing the receiver by aNumber + with rounding, tie to even." + (aNumber isKindOf: ScaledDecimal) ifTrue: [^super ratio: aNumber]. + ^aNumber adaptToScaledDecimal: self andSend: #ratio:! Item was added: + ----- Method: ScaledDecimal>>residue: (in category 'arithmetic') ----- + residue: aNumber + (aNumber isKindOf: ScaledDecimal) ifTrue: [^super residue: aNumber]. + ^aNumber adaptToScaledDecimal: self andSend: #residue:! From nicolas.cellier.aka.nice at gmail.com Sat Feb 14 01:29:12 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Feb 14 01:29:14 2015 Subject: [squeak-dev] The Inbox: Kernel-nice.903.mcz In-Reply-To: <54dea2dd.13ea8c0a.03c3.2ec3SMTPIN_ADDED_MISSING@mx.google.com> References: <54dea2dd.13ea8c0a.03c3.2ec3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-02-14 2:20 GMT+01:00 : > Nicolas Cellier uploaded a new version of Kernel to project The Inbox: > http://source.squeak.org/inbox/Kernel-nice.903.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.903 > Author: nice > Time: 14 February 2015, 2:19:44.184 am > UUID: d4f06790-d47b-4cb0-b9ff-9e0ff7dea9fc > Ancestors: Kernel-nice.902 > > Introduce two new alternatives to integer division: #ratio: and #residue: > are like #quo: and #rem: except that they round the quotient to nearest > integer (tie to even) instead of truncating (note that // and \\ floor the > quotient...). > > The second thing that they do differently is that they compute the exact > ratio and exact residue when given a pair of Float. > > The third thing that they do differently is that they first coerce a pair > of numbers to the highest generality before attempting any operation. > > =============== Diff against Kernel-nice.902 =============== > > Hi folks, I've already bent Squeak/Pharo handling of Float a bit, and I'd like to increase further Smalltalk dialects compliance to language independent arithmetic standard (ISO/IEC 10967). The subject of the day is state of the art quotient and remainder operations for Floats. I noticed that the libm function fmod which computes the remainder of division of two floats (quotient being the truncated fraction) is and should be exact. Our equivalent Float version of #rem: is not, and I had the feeling that it ain't good. So I wrote a pair of methods #fquo: and #fmod: that evaluates the (truncated) quotient (quo:) and remainder (rem:) of 2 floats exactly. Then I plugged these functions to implementors of quo: and rem:. They are not only exact, they also support extreme Floats without overflow, like (Float fmax quo: Float fmin*5). (Float fmax rem: Float fmin*5). We will let // and \\ apart for the moment - see below for the reason. Once plugged, some results might unfortunately look surprising like: (1 to: 100) count: [:i | ((i/100.0) fquo: 0.01) ~= i]. -> 58 (1 to: 100) count: [:i | ((i/100.0) fmod: 0.01) ~= 0]. -> 93 The seven exact multiple are of course (0 to: 6) collect:[:i | 0.01 timesTwoPower: i] The others just tell the awful truth about floating point... While with the old implementation was a little less surprising: (1 to: 100) count: [:i | ((i/100.0) / 0.01) truncated ~= i]. -> 6 (1 to: 100) count: [:i | (((i/100.0) / 0.01) truncated * 0.01 - (i/100.0)) ~= 0]. -> 13 Then I realized that language independent arithmetic standard and also older floating point standard (IEEE 754), do rather define quotient and remainder (ratio and residue) in term of rounded rather than truncated quotient. So I implemented fratio: and fresidue: as prescribed by the standard (with an unbiased roundedTieToEven). And these two operations better fit our expectations, at least for the ratio: (1 to: 100) count: [:i | ((i/100.0) fratio: 0.01) ~= i]. -> 0 The residues are exact allways small: (1 to: 100) count: [:i | | a b fa fb ea eb | a := 1/100. fa := a asFloat. ea := a - fa asFraction. "exact, float, and error" b := i*a. fb := b asFloat.. eb := b - fb asFraction. [eb <= (0.5*fb ulp) and: [ea <= (0.5*fa ulp)]] assert. (fb fresidue: fa) abs > (ea*i-eb) abs]. -> 0 The naive implementation works well too for the ratio: (1 to: 100) count: [:i | ((i/100.0) / 0.01) rounded ~= i]. -> 0 but of course with inexact residue: (1 to: 100) count: [:i | | a b fa fb ea eb | a := 1/100. fa := a asFloat. ea := a - fa asFraction. "exact, float, and error" b := i*a. fb := b asFloat.. eb := b - fb asFraction. [eb <= (0.5*fb ulp) and: [ea <= (0.5*fa ulp)]] assert. (fb - ((fb/fa) rounded*fb)) abs > (ea*i-eb) abs]. -> 99 Rounded quotient is exactly what we want for Float. The rounding problems still exist, but they are rejected near exact tie. But that means implementing yet another quo/rem message (#ratio: #residue: using terms of the standard) while we already have two pairs... Do you think that such extension ratio/residue is valuable? Do you think that modification of quo:/rem: is bearable? The alternative would be to provide an external package (eventually with overrides) to turn Squeak/Pharo behavior into standard, but I don't like the idea that the kernel does not respect the standards by default... ------------------------------------------------ About // and \\: The problem with \\ is that it can't always be exact when expressed as Float. (b \\ a) can be near a when b abs < a abs, a*b < 0. So when b is of very small magnitude relative to a, remainder requires many bits. For example Float fmin negated asFraction \\ 1.0 asFraction would exactly be (1.0 asFraction - Float fmin asFraction) and thus require a significand of 1074 bits. We don't have ArbitraryPrecisionFloat in trunk, and Fraction is overkill... We can't either let the exact remainder be rounded to nearest Float because it will be equal to the divider (it should be less than in magnitude). So, there is no easy solution for this case in Float... But note that current naive implementation suffers exactly from same problem and would answer 1.0 (the divider). ------------------------------------------------ I've also asked peers for a good reason to implement an exact #rem: but knowledgeable peers are unreachable yet ;) http://cs.stackexchange.com/questions/24362/why-does-floating-point-modulus-exactness-matters So maybe it's time to push this stuff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150214/6c6aacea/attachment-0001.htm From ron at usmedrec.com Sat Feb 14 03:05:53 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Feb 14 03:05:58 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections Message-ID: <718801d04803$25da7540$718f5fc0$@usmedrec.com> Hi All, Time goes fast. It's Friday again and there is only the weekend left to run for the 2015 Squeak Oversight Board. We have a great list of candidates but there is still room for more. Have a great weekend everyone! Candidates (order of announcement): 1. Casey Ransberger 2. Eliot Miranda 3. Tim Rowledge 4. Craig Latta 5. David T. Lewis 6. Chris Muller 7. Bert Freudenberg 8. Marcel Taeumel You have until Monday 16th of February 3PM (20.00 UTC). Thank you for your work on Squeak! All the best, Ron Teitelbaum > > Hi All, > > It's that time again. Time to raise your voices and elect your leaders! > It's a time for you to stand up, help your community and volunteer to > serve! > Squeak wants you! > > Every year we elect the SOB (Squeak Oversight Board) consisting of > seven members from our community. The current board members are: > > In alphabetical order (by first name): > > Bert Freudenberg > Chris Muller > Craig Latta > David T. Lewis > Eliot Miranda > Frank Shearar > Tim Rowledge > > For more info on the board please see: > https://squeakboard.wordpress.com/our-mission/ > > Everything about the election, including schedule and more, can be > > tracked here: > > http://wiki.squeak.org/squeak/6200 > > > Now until Monday 16th of February 3PM (20.00 UTC): Nominations of SOB > members and campaigning! > > Candidates should nominate themselves and start their campaign on the > squeak-dev mailing list. Or if you nominate someone else, make sure > that person really wants to run. :) I will not put anyone on the > candidate list until that person makes it known on squeak-dev that > he/she intends to run. > > During this period, the candidates should ideally present themselves > on squeak-dev, unless they have already done so, and the community can > ask questions. > > I encourage you to reach out to potential candidates, people that are active > in the community and represent your views, and ask them to run. Some > people will not run without encouragement. Also I know that some > people wait to the last minute to run for the board to see if others > will run but please consider getting this year off to a faster start > and just jump right in! > > *** Now until Monday 16th of February 3PM (20.00 UTC): Nominations of > SOB members and campaigning! > *** Monday 16th of February 2015 3PM (20.00 UTC): Candidate list is > finalized. > *** Monday 16th of February 2015 4PM (21.00 UTC): Online election > starts. > *** Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > *** Results will be announced immediately when the election ends. > > The voting period is one week long and ballots are sent out via email. > > And how do you end up on the voter list? See below. :) > > IMPORTANT: New voters will NOT be added once the election is started. > You > MUST try to get on the voter list before the 16th of February 2014 or > you will NOT be able to vote. If your Email has changed please make > sure it is > changed on the list of voters before the election starts. > > -------------------------- > > If you were invited to vote last year you are already on the voter > list, no > worries! If you are a new Squeaker and wish to vote do ONE of the > following: > > * Get a "known" Squeaker to vouch for you. If a known Squeaker > sends an email to voters (at) squeak.org giving me name and email for > you, then I > will add you. > * Send an email to voters at squeak.org yourself (and CC to squeak-dev > if you like) with information/arguments showing me that you are indeed > serious about voting and that you are indeed a Squeaker. > > When the voting period starts all voters will receive an email with > instructions and a link to the voting website. > > If there are any further questions, just reply *in this thread* and I > will closely track it - or send email to voters (at) squeak.org which > points to me. > > ...so let's get on with it! > > All the best, > > Ron Teitelbaum > > > > > > From tim at rowledge.org Sat Feb 14 03:13:00 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Feb 14 03:13:04 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Elections In-Reply-To: <718801d04803$25da7540$718f5fc0$@usmedrec.com> References: <718801d04803$25da7540$718f5fc0$@usmedrec.com> Message-ID: <9B9AAF4A-6D60-4587-9F2A-FC0413FB1A39@rowledge.org> On 13-02-2015, at 7:05 PM, Ron Teitelbaum wrote: > Hi All, > > Time goes fast. It's Friday again and there is only the weekend left to run > for the 2015 Squeak Oversight Board. We have a great list of candidates but > there is still room for more. C?mon people! How about you, yes *you* - John McIntosh Nic Cellier Norbert Hartl Chris Cunnington Juan Vuletich .. to name just 5 randomly picked from recentish squeak emails. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim .signature not found! reformat hard drive? [Yn] From frank.shearar at gmail.com Sat Feb 14 13:47:49 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Sat Feb 14 13:47:50 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On 12 February 2015 at 20:42, Eliot Miranda wrote: > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ > > > These fix two important bugs in the Spur VMs, so Newspeakers should update, > and changes the default text encoding to UTF-8 on linux. I updated CI with 3254, and now I see errors like this: spawning command 1 with timeout 1500 seconds: /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak -vm-sound-null -vm-display-null "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" ../update-image.st pthread_setschedparam failed: Operation not permitted Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 As it happens, we do have a /etc/security/limits.d/squeak.conf on build.squeak.org that looks like this: * hard rtprio 2 * soft rtprio 2 Thoughts? frank From eliot.miranda at gmail.com Sun Feb 15 18:13:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun Feb 15 18:13:11 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: Hi Frank, can you revert to 3253? This one should be good. I'm pretty sure the 3254 VMs are subject to the same inlning bug that I mentioned after the latest VMMaker.oscog commit and am working on fixing now. On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar wrote: > On 12 February 2015 at 20:42, Eliot Miranda > wrote: > > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ > > > > > > These fix two important bugs in the Spur VMs, so Newspeakers should > update, > > and changes the default text encoding to UTF-8 on linux. > > I updated CI with 3254, and now I see errors like this: > > spawning command 1 with timeout 1500 seconds: > > /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak > -vm-sound-null -vm-display-null > "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" > ../update-image.st > pthread_setschedparam failed: Operation not permitted > Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 > > As it happens, we do have a /etc/security/limits.d/squeak.conf on > build.squeak.org that looks like this: > > * hard rtprio 2 > * soft rtprio 2 > > Thoughts? > > frank > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150215/92295b53/attachment.htm From commits at source.squeak.org Sun Feb 15 21:00:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Feb 15 21:00:18 2015 Subject: [squeak-dev] The Inbox: Kernel-ul.903.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-ul.903.mcz ==================== Summary ==================== Name: Kernel-ul.903 Author: ul Time: 15 February 2015, 9:57:57.503 pm UUID: f1522d00-538e-45d7-a988-e541ea56db56 Ancestors: Kernel-nice.902 Introduced MTRandom, an implementation of the 32-bit Mersenne Twister PRNG. It includes a version optimized for Squeak, which is used by default. It's a possible replacement for Random. Removed LargePositiveInteger >> #atRandom:, since it's something that Random >> #nextInt: should do. Alternatively it can do something different later (eg send #nextLargeInt:). This is for review-only. If we decide to use this generator, then Random has to be replaced with this. After loading, the generator will only used by ThreadSafeRandom class >> #default. If you want to replace all existing generators in the image, then you can use the following snippet: | old new | old := Random allInstances. new := old collect: [ :each | MTRandom new ]. old elementsForwardIdentityTo: new =============== Diff against Kernel-nice.902 =============== Item was removed: - ----- Method: LargePositiveInteger>>atRandom: (in category 'truncation and round off') ----- - atRandom: aGenerator - "Answer a random integer from 1 to self picked from aGenerator." - - | chunkByteLength chunkBitLength chunkCount chunkMax bigRandomInteger | - chunkByteLength := 3. - chunkBitLength := chunkByteLength * 8. - chunkCount := - self highBitOfMagnitude + chunkBitLength - 1 // chunkBitLength "self would fit in that many chunks..." - + 2. "and two more chunks (48 bits) so as to have a pretty fair distribution" - chunkMax := 1<> (chunkCount * chunkBitLength) + 1! Item was added: + Object subclass: #MTRandom + instanceVariableNames: 'states index parameters' + classVariableNames: '' + poolDictionaries: '' + category: 'Kernel-Numbers'! + + !MTRandom commentStamp: 'ul 2/15/2015 15:02' prior: 0! + I implement the 32-bit version of the Mersenne Twister PRNG, based on http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf . Alternatively the w parameter (number of bits per word) can be less than 32, but it should be at least 27. + + Instance Variables + index: + parameters: + states: + + index + - the index of the state, which should be used to generate the next random integer value + + parameters + - an MTRandomParameters instance which defines the parameters to be used with this genetator. Must be set before the seed is defined. + + states + - a WordArray holding the internal state of the generator + ! Item was added: + ----- Method: MTRandom class>>new (in category 'instance creation') ----- + new + + | seed | + seed := Time primUTCMicrosecondClock. + seed = 0 ifTrue: [ seed := Time millisecondClockValue ]. + ^self seed: seed! Item was added: + ----- Method: MTRandom class>>parameters:seed: (in category 'instance creation') ----- + parameters: anMTRandomParameters seed: anInteger + + ^self basicNew + parameters: anMTRandomParameters seed: anInteger; + yourself! Item was added: + ----- Method: MTRandom class>>seed: (in category 'instance creation') ----- + seed: anInteger + + ^self + parameters: MTRandomParameters mt521b30 + seed: anInteger! Item was added: + ----- Method: MTRandom>>check: (in category 'compatibility - die rolling') ----- + check: nDice + "Roll some dice, WoD-style." + + ^ self check: nDice difficulty: 6! Item was added: + ----- Method: MTRandom>>check:against: (in category 'compatibility - die rolling') ----- + check: nAttack against: nDefend + "Roll some dice, WoD-style." + + ^ self check: nAttack against: nDefend difficulty: 6! Item was added: + ----- Method: MTRandom>>check:against:difficulty: (in category 'compatibility - die rolling') ----- + check: nAttack against: nDefend difficulty: diff + "Roll some dice, WoD-style." + + | attacks defends | + attacks := self check: nAttack difficulty: diff. + attacks < 0 ifTrue: [^ attacks]. + defends := self check: nDefend difficulty: diff. + ^ attacks - defends min: 0! Item was added: + ----- Method: MTRandom>>check:difficulty: (in category 'compatibility - die rolling') ----- + check: nDice difficulty: diff + "Roll some dice, WoD-style." + + | result | + result := 0. + nDice timesRepeat: + [ | die | + (die := self nextInt: 10) = 1 + ifTrue: [result := result - 1] + ifFalse: [die >= diff ifTrue: [result := result + 1]]]. + ^ result! Item was added: + ----- Method: MTRandom>>diceToken: (in category 'compatibility - die rolling') ----- + diceToken: stream + "Private. Mini scanner, see #roll:" + + stream atEnd ifTrue: [^ nil]. + stream peek isDigit ifTrue: [^ Number readFrom: stream]. + ^ stream next asLowercase! Item was added: + ----- Method: MTRandom>>generate (in category 'private') ----- + generate + "Generate untempered numbers into the states variable, and reset the index to 1." + + parameters generate: states. + index := 1! Item was added: + ----- Method: MTRandom>>next (in category 'accessing') ----- + next + "Answer a random 53-bit Float from the [0, 1) interval. The implementation assumes that the w parameter is between 27 and 53." + + | multiplier | + multiplier := parameters wFloatMultiplier. + ^self nextValue asFloat * multiplier + (self nextValue bitAnd: multiplier - 1) / 9.007199254740992e15 "(1 << 53) asFloat"! Item was added: + ----- Method: MTRandom>>next: (in category 'compatibility') ----- + next: anInteger + "To be exchangable with Random." + + ^self next: anInteger into: (Array new: anInteger)! Item was added: + ----- Method: MTRandom>>next:into: (in category 'compatibility') ----- + next: anInteger into: anArray + "To be exchangable with Random." + + 1 to: anInteger do: [ :index | anArray at: index put: self next ]. + ^anArray! Item was added: + ----- Method: MTRandom>>nextInt: (in category 'accessing') ----- + nextInt: anInteger + "Answer a random integer value from the interval [1, anInteger]" + + anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. + anInteger isLarge ifTrue: [ ^self nextLargeInt: anInteger ]. + "Here we assume that the w parameter is at least 30. Using any less is a waste." + anInteger isPowerOfTwo ifTrue: [ ^(self nextValue bitAnd: anInteger - 1) + 1 ]. + ^(self next * anInteger) truncated + 1! Item was added: + ----- Method: MTRandom>>nextLargeInt: (in category 'private') ----- + nextLargeInt: anInteger + + | byteCount bigRandom remainder remainingBits i | + byteCount := anInteger digitLength + 4. + bigRandom := LargePositiveInteger new: byteCount. + remainder := remainingBits := 0. + i := 1. + [ i <= byteCount ] whileTrue: [ + remainingBits >= 8 + ifTrue: [ + bigRandom at: i put: (remainder bitAnd: 16rFF). + remainder := remainder bitShift: -8. + remainingBits := remainingBits - 8. + i := i + 1 ] + ifFalse: [ + remainingBits = 0 + ifTrue: [ remainder := self nextValue ] + ifFalse: [ + | newRandom | + newRandom := self nextValue. "Assume that at least 8 new bits are generated" + bigRandom at: i put: (remainder bitShift: 8 - remainingBits) + + (newRandom bitAnd: (1 bitShift: 8 - remainingBits) - 1). + i := i + 1. + remainder := newRandom bitShift: 0 - remainingBits ]. + remainingBits := parameters w - remainingBits ] ]. + ^(anInteger * bigRandom bitShift: -8 * byteCount) + 1 + ! Item was added: + ----- Method: MTRandom>>nextValue (in category 'private') ----- + nextValue + "Answer a random integer between 0 and wordMask, and increment the index." + + | result | + result := states at: index. + result isLarge + ifTrue: [ result := parameters temperLarge: result ] + ifFalse: [ result := parameters temperSmall: result ]. + (index := index + 1) > states size ifTrue: [ self generate ]. + ^result! Item was added: + ----- Method: MTRandom>>parameters:seed: (in category 'initialization') ----- + parameters: anMTRandomParameters seed: anInteger + "Initialize the generator for the given parameters, and seed." + + parameters := anMTRandomParameters. + self seed: anInteger! Item was added: + ----- Method: MTRandom>>roll: (in category 'compatibility - die rolling') ----- + roll: diceString + "Roll some dice, DnD-style, according to this mini-grammar: + dice := epxr {pm expr} + pm := '+' | '-' + expr := num | num dD | dD numP | num dD numP + dD := 'd' | 'D' + num := digit+ + numP := num | '%'" + + | stream op result | + stream := diceString readStream. + result := 0. + op := #+. + [ | res range dice token | + token := self diceToken: stream. + token isNumber + ifTrue: [dice := token. + token := self diceToken: stream] + ifFalse: [token == $d + ifTrue: [dice := 1] + ifFalse: [res := 0]]. + token == $d + ifTrue: [token := self diceToken: stream. + token isNumber + ifTrue: [range := token. + token := self diceToken: stream] + ifFalse: [token == $% + ifTrue: [range := 100. + token := self diceToken: stream] + ifFalse: [range := 6]]. + res := 0. + dice timesRepeat: [res := res + (self nextInt: range)]]. + result := result perform: op with: res. + token ifNil: [^ result]. + (token == $+ or: [token == $-]) + ifFalse: [self error: 'unknown token ' , token]. + op := token asSymbol] repeat! Item was added: + ----- Method: MTRandom>>seed: (in category 'initialization') ----- + seed: anInteger + "Initialize the generator for the given seed." + + states := parameters createStatesArrayForSeed: anInteger. + self generate! Item was added: + Object subclass: #MTRandomParameters + instanceVariableNames: 'p w a m b c uDiv sMul tMul lDiv upperMask lowerMask wordMask n l u s t bShifted cShifted r wFloatMultiplier' + classVariableNames: 'MT19937b32 MT521b30 MT521b31 MT521b32' + poolDictionaries: '' + category: 'Kernel-Numbers'! + + !MTRandomParameters commentStamp: 'ul 2/15/2015 03:13' prior: 0! + I provide the parameters for MTRandom instances. Once initialized, my values must not be changed, because they are shared among multiple MTRandom instances. + + Instance Variables + a: + b: + bShifted: + c: + cShifted: + l: + lDiv: + lowerMask: + m: + n: + p: + r: + s: + sMul: + t: + tMul: + u: + uDiv: + upperMask: + w: + wFloatMultiplier: + wordMask: + + a + - the last row of matrix A + + b + - tempering mask b + + bShifted + - tempering mask b shifted by s. This is a computed value. + + c + - tempering mask c + + cShifted + - tempering mask c shifted by t. This is a computed value. + + l + - the bits used for lower shifts. Its value must be negative. + + lDiv + - this number can be used to replace shifting by l with a division. This is a computed value. + + lowerMask + - the mask for the low r bits + + m + - the middle term + + n + - the number of words used in the state array. This is a computed value. + + p + - the exponent of the period of the generator. 2^p-1 must be a mersenne prime, therefore p must be a prime. + + r + - the number of set bits in the lowerMask. This is a computed value. + + s + - the shifts used after applying the tempering mask b + + sMul + - this number can be used to replace shifting by s with a multiplication. This is a computed value. + + t + - the shifts used after applying the tempering mask c + + tMul + - this number can be used to replace shifting by t with a multiplication. This is a computed value. + + u + - the bits used for upper shifts. Its value must be negative. + + uDiv + - this number can be used to replace shifting by u with a division. This is a computed value. + + upperMask + - a mask with w - r set bits in the upper region, and r zero bits in the lower region. This is a computed value. + + w + - the number of bits in a word + + wFloatMultiplier + - a multiplier which can create an 53 bit number from a word. This is a computed value. + + wordMask + - a mask with w bits + ! Item was added: + ----- Method: MTRandomParameters class>>initialize (in category 'class initialization') ----- + initialize + " self initialize " + + MT19937b32 := self new initializeForMT19937. + MT521b32 := self new initializeForMT521. + MT521b31 := self new initializeFor31BitsMT521. + MT521b30 := self new initializeFor30BitsMT521.! Item was added: + ----- Method: MTRandomParameters class>>mt19937b32 (in category 'accessing') ----- + mt19937b32 + + ^MT19937b32! Item was added: + ----- Method: MTRandomParameters class>>mt521b30 (in category 'accessing') ----- + mt521b30 + + ^MT521b30! Item was added: + ----- Method: MTRandomParameters class>>mt521b31 (in category 'accessing') ----- + mt521b31 + + ^MT521b31! Item was added: + ----- Method: MTRandomParameters class>>mt521b32 (in category 'accessing') ----- + mt521b32 + + ^MT521b32! Item was added: + ----- Method: MTRandomParameters>>a (in category 'accessing') ----- + a + + ^ a! Item was added: + ----- Method: MTRandomParameters>>b (in category 'accessing') ----- + b + + ^ b! Item was added: + ----- Method: MTRandomParameters>>bShifted (in category 'accessing') ----- + bShifted + + ^ bShifted! Item was added: + ----- Method: MTRandomParameters>>c (in category 'accessing') ----- + c + + ^ c! Item was added: + ----- Method: MTRandomParameters>>cShifted (in category 'accessing') ----- + cShifted + + ^ cShifted! Item was added: + ----- Method: MTRandomParameters>>calculateValues (in category 'private') ----- + calculateValues + " Calculate multipliers, divisors and masks used by the actual implementation. " + + self + assert: p isPrime; + assert: (w between: 27 and: 32); + assert: u < 0; + assert: l < 0. + n := (p / w) ceiling. "The size of the array." + r := n * w - p. "The number of bits in lowerMask" + lDiv := 1 bitShift: l negated. + uDiv := 1 bitShift: u negated. + sMul := 1 bitShift: s. + tMul := 1 bitShift: t. + bShifted := b bitShift: s negated. + cShifted := c bitShift: t negated. + wordMask := 1 bitShift: w - 1. + lowerMask := 1 bitShift: r - 1. + upperMask := wordMask - lowerMask. + wFloatMultiplier := 1 bitShift: (53 - w)! Item was added: + ----- Method: MTRandomParameters>>createStatesArrayForSeed: (in category 'generatring') ----- + createStatesArrayForSeed: anInteger + "Create an array for these parameters and the given seed. Hash the seed if it's not a 32-bit unsigned integer." + + | seed states | + seed := (anInteger between: 0 and: 16rFFFFFFFF) + ifTrue: [ anInteger ] + ifFalse: [ self hashSeed: anInteger ]. + states := Array new: n. + 1 to: n do: [ :i | + states at: i put: (wordMask bitAnd: seed). + seed := 16rFFFFFFFF bitAnd: (16r6C078965 * (seed bitXor: seed // 1073741824 "bitShift: -30") + i) ]. + ^states! Item was added: + ----- Method: MTRandomParameters>>generate: (in category 'generatring') ----- + generate: states + "Generate untempered numbers into the states variable. Choose the best method based on word size." + + wordMask isLarge ifTrue: [ ^self generateLarge: states ]. + ^self generateSmall: states! Item was added: + ----- Method: MTRandomParameters>>generateLarge: (in category 'generatring') ----- + generateLarge: states + "Generate untempered numbers into the states variable. Split up the operation into three parts to avoid the use of #atWrap: for accessing the states array. Optimized for LargeInteger operations." + + | i limit y offset | + "Part 1" + i := 0. + offset := m. + limit := n - offset. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: i + 1)). + states + at: i + put: (y even + ifTrue: [ (states at: i + offset) bitXor: y // 2 ] + ifFalse: [ a bitXor: ((states at: i + offset) bitXor: y // 2) ]) ]. + "Part 2" + limit := n - 1. + offset := m - n + 1. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: i + 1)). + states + at: i + put: (y even + ifTrue: [ (states at: i + offset) bitXor: y // 2 ] + ifFalse: [ a bitXor: ((states at: i + offset) bitXor: y // 2) ]) ]. + "Part 3" + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: 1)). + states + at: i + put: (y even + ifTrue: [ (states at: m) bitXor: y // 2 ] + ifFalse: [ a bitXor: ((states at: m) bitXor: y // 2) ])! Item was added: + ----- Method: MTRandomParameters>>generateSmall: (in category 'generatring') ----- + generateSmall: states + "Generate untempered numbers into the states variable. Split up the operation into three parts to avoid the use of #atWrap: for accessing the states array. Optimized for SmallInteger operations." + + | i limit y offset | + "Part 1" + i := 0. + offset := m. + limit := n - offset. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: i + 1)). + states + at: i + put: ((y bitAnd: 1) = 0 + ifTrue: [ (states at: i + offset) bitXor: (y bitShift: -1) ] + ifFalse: [ a bitXor: ((states at: i + offset) bitXor: (y bitShift: -1)) ]) ]. + "Part 2" + limit := n - 1. + offset := m - n + 1. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: i + 1)). + states + at: i + put: ((y bitAnd: 1) = 0 + ifTrue: [ (states at: i + offset) bitXor: (y bitShift: -1) ] + ifFalse: [ a bitXor: ((states at: i + offset) bitXor: (y bitShift: -1)) ]) ]. + "Part 3" + y := (upperMask bitAnd: (states at: i)) bitOr: (lowerMask bitAnd: (states at: 1)). + states + at: i + put: ((y bitAnd: 1) = 0 + ifTrue: [ (states at: m) bitXor: (y bitShift: -1) ] + ifFalse: [ a bitXor: ((states at: m) bitXor: (y bitShift: -1)) ])! Item was added: + ----- Method: MTRandomParameters>>hashSeed: (in category 'private') ----- + hashSeed: anInteger + "Use the 32-bit version of the FNV-1a algorithm to hash the seed, and produce a 32-bit unsigned integer." + + | fnvPrime hash | + fnvPrime := 16777619 " 32-bit FVN prime ". + hash := anInteger negative + ifTrue: [ 3490449840 " mix in the sign as (2166136261 bitXor: 2r1010101) * 16777619 bitAnd: 16rFFFFFFFF "] + ifFalse: [ 2166136261 " 32-bit FVN offset basis "]. + 1 to: anInteger digitLength do: [ :index | + hash := 16rFFFFFFFF bitAnd: (hash bitXor: (anInteger digitAt: index)) * fnvPrime ]. + ^hash! Item was added: + ----- Method: MTRandomParameters>>initializeFor30BitsMT521 (in category 'initialize-release') ----- + initializeFor30BitsMT521 + "30-bit MT521 parameters. generated with a modified version of dcmt, ID=4172. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html" + + p := 521. + w := 30. + m := 9. + a := 16r2c0b19af. + u := -12. + l := -18. + s := 7. + t := 15. + b := 16r1caf6480. + c := 16r3fcd0000. + self calculateValues + ! Item was added: + ----- Method: MTRandomParameters>>initializeFor31BitsMT521 (in category 'initialize-release') ----- + initializeFor31BitsMT521 + "31-bit MT521 parameters, generated with dcmt, ID=4172. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html" + + p := 521. + w := 31. + m := 8. + a := 16r54dc9020. + u := -12. + l := -18. + s := 7. + t := 15. + b := 16r4bbadf80. + c := 16r3dee8000. + self calculateValues! Item was added: + ----- Method: MTRandomParameters>>initializeForMT19937 (in category 'initialize-release') ----- + initializeForMT19937 + "32-bit MT19937 parameters as in http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf on page 8." + + p := 19937. + w := 32. + m := 397. + a := 16r9908B0DF. + u := -11. + l := -18. + s := 7. + t := 15. + b := 16r9D2C5680. + c := 16rEFC60000. + self calculateValues! Item was added: + ----- Method: MTRandomParameters>>initializeForMT521 (in category 'initialize-release') ----- + initializeForMT521 + "32-bit MT521 parameters, generated with dcmt, ID=4172. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html" + + p := 521. + w := 32. + m := 8. + a := 16rF0C1E1B8. + u := -12. + l := -18. + s := 7. + t := 15. + b := 16r74BD5f80. + c := 16rFFD50000. + self calculateValues! Item was added: + ----- Method: MTRandomParameters>>l (in category 'accessing') ----- + l + + ^ l! Item was added: + ----- Method: MTRandomParameters>>lDiv (in category 'accessing') ----- + lDiv + + ^ lDiv! Item was added: + ----- Method: MTRandomParameters>>lowerMask (in category 'accessing') ----- + lowerMask + + ^ lowerMask! Item was added: + ----- Method: MTRandomParameters>>m (in category 'accessing') ----- + m + + ^ m! Item was added: + ----- Method: MTRandomParameters>>n (in category 'accessing') ----- + n + + ^ n! Item was added: + ----- Method: MTRandomParameters>>r (in category 'accessing') ----- + r + + ^ r! Item was added: + ----- Method: MTRandomParameters>>s (in category 'accessing') ----- + s + + ^ s! Item was added: + ----- Method: MTRandomParameters>>sMul (in category 'accessing') ----- + sMul + + ^ sMul! Item was added: + ----- Method: MTRandomParameters>>t (in category 'accessing') ----- + t + + ^ t! Item was added: + ----- Method: MTRandomParameters>>tMul (in category 'accessing') ----- + tMul + + ^ tMul! Item was added: + ----- Method: MTRandomParameters>>temperLarge: (in category 'tempering') ----- + temperLarge: anInteger + " Optimized for 32-bit LargeInteger operations. " + + | y | + y := anInteger bitXor: anInteger // uDiv. + y := y bitXor: ((y bitAnd: bShifted) * sMul). + y := y bitXor: ((y bitAnd: cShifted) * tMul). + ^y bitXor: y // lDiv! Item was added: + ----- Method: MTRandomParameters>>temperSmall: (in category 'tempering') ----- + temperSmall: anInteger + " Optimized for SmallInteger operations. " + + | y | + y := anInteger bitXor: (anInteger bitShift: u). + y := ((y bitAnd: bShifted) bitShift: s) bitXor: y. + y := ((y bitAnd: cShifted) bitShift: t) bitXor: y. + ^(y bitShift: l) bitXor: y! Item was added: + ----- Method: MTRandomParameters>>u (in category 'accessing') ----- + u + + ^ u! Item was added: + ----- Method: MTRandomParameters>>uDiv (in category 'accessing') ----- + uDiv + + ^ uDiv! Item was added: + ----- Method: MTRandomParameters>>upperMask (in category 'accessing') ----- + upperMask + + ^ upperMask! Item was added: + ----- Method: MTRandomParameters>>w (in category 'accessing') ----- + w + + ^ w! Item was added: + ----- Method: MTRandomParameters>>wFloatMultiplier (in category 'accessing') ----- + wFloatMultiplier + + ^ wFloatMultiplier! Item was added: + ----- Method: MTRandomParameters>>wordMask (in category 'accessing') ----- + wordMask + + ^ wordMask! Item was changed: ----- Method: ThreadSafeRandom class>>default (in category 'accessing') ----- default + ^self value: MTRandom new! - ^self value: Random new! From leves at elte.hu Sun Feb 15 21:02:18 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Feb 15 21:02:29 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: Thanks for the pointer. It indeed has an implementation of MT, but it's not very efficient (I suspect that it was written by a student, who was new to Smalltalk, or Squeak), and it also has a few bugs. I decided to roll my own version, which can be found in the Inbox as Kernel-ul.903. Levente On Fri, 13 Feb 2015, Nicolas Cellier wrote: > Also look into Sci-Smalltalk, there are several PRNG there. > For large integers, we need to construct them by chunk anyway. > > We construct a large X in interval [0,2^N-1], where for example N is a multiple of 32 for simple PRNG. > Then we perform Max * X // (2^N) for generating in interval [0,Max-1]. > Some guard must be taken with N > highbit(Max) so as to obtain a fair distribution (uniform). > > > 2015-02-12 20:46 GMT+01:00 Levente Uzonyi : > It seems like it only has csprngs. I see there one based on the Fortuna algorithm, and one based on SHA1 in counter mode. > > Levente > > On Thu, 12 Feb 2015, Levente Uzonyi wrote: > > IIRC it has a mersenne twister (which is a quite common choice for prngs). We should check the implementation and see if it's efficient enough. > > Levente > > On Thu, 12 Feb 2015, Chris Muller wrote: > > Maybe adopt one of the ones from the Cryptography package? > > On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: > On Tue, 10 Feb 2015, Bert Freudenberg wrote: > > On 10.02.2015, at 15:37, commits@source.squeak.org wrote: > > > Bert Freudenberg uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-bf.899.mcz > > ==================== Summary ==================== > > Name: Kernel-bf.899 > Author: bf > Time: 10 February 2015, 4:37:05.988 pm > UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e > Ancestors: Kernel-eem.898 > > Fix random for Really Large Integers. > > =============== Diff against Kernel-eem.898 =============== > > Item was changed: > ?----- Method: Random>>nextInt: (in category 'accessing') ----- > ?nextInt: anInteger > ? ? ? ? " Answer a random integer in the interval [1, anInteger]. > anInteger should be less than 16r80000000. " > > ? ? ? ? anInteger strictlyPositive ifFalse: [ self error: 'Range must be > positive' ]. > +? ? ? ?"avoid Float arithmetic in #next to work with LargeInts" > +? ? ? ?^ ((seed := self nextValue) asInteger * anInteger // M asInteger) > + 1! > -? ? ? ?^ (self next * anInteger) truncated + 1! > > > > > We might want to do something better if anInteger > 16r80000000, because > that's the maximum number of different random integers we can produce. We > would need to call nextValue twice (or more times) to produce enough > randomness. > > > > Fetching more bits from the generator won't be better. This generator has 31 > bits internal state, so it can't generate longer random numbers. > We need a better PRNG. > > Levente > > > > My fix just solves the immediate problem of running into infinite Floats. > > - Bert - > > > > > > > > > > > > > From leves at elte.hu Sun Feb 15 21:12:53 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Feb 15 21:12:56 2015 Subject: [squeak-dev] The Trunk: Kernel-bf.899.mcz In-Reply-To: References: <16344B22-D240-4A54-97F3-2A7FD45E45E6@freudenbergs.de> Message-ID: Yes, I expect them to be too slow to be used as a general purpose generator. Here's a small benchmark with the Fortuna generator, Random, and MTRandom: f := Fortuna key: (1 to: 32) asArray asByteArray. [ f nextBytes: 4 ] bench. '7,480 per second.'. "32 bits" r := Random new. [ r nextValue ] bench. '5,740,000 per second.'. "31 bits" r := MTRandom new. [ r nextValue ] bench. '5,770,000 per second.'. "30 bits" The comparison is not absolutely fair, because of the number of generated bits (see the comments), but it still shows, that Fortuna (as it is implemented in the Cryptography package) is 2-3 magnitudes slower than a well optimized PRNG. Levente On Fri, 13 Feb 2015, Chris Muller wrote: > Well, is a csprng (I had to look that acronym up) a problem? Do you > mean its too slow? Speed is important for the general case. > Hopefully we'll find a solution that does not need to compromise > randomness for speed. > > On Thu, Feb 12, 2015 at 1:46 PM, Levente Uzonyi wrote: >> It seems like it only has csprngs. I see there one based on the Fortuna >> algorithm, and one based on SHA1 in counter mode. >> >> Levente >> >> >> On Thu, 12 Feb 2015, Levente Uzonyi wrote: >> >>> IIRC it has a mersenne twister (which is a quite common choice for prngs). >>> We should check the implementation and see if it's efficient enough. >>> >>> Levente >>> >>> On Thu, 12 Feb 2015, Chris Muller wrote: >>> >>>> Maybe adopt one of the ones from the Cryptography package? >>>> >>>> On Thu, Feb 12, 2015 at 12:52 PM, Levente Uzonyi wrote: >>>>> >>>>> On Tue, 10 Feb 2015, Bert Freudenberg wrote: >>>>> >>>>>> On 10.02.2015, at 15:37, commits@source.squeak.org wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Bert Freudenberg uploaded a new version of Kernel to project The >>>>>>> Trunk: >>>>>>> http://source.squeak.org/trunk/Kernel-bf.899.mcz >>>>>>> >>>>>>> ==================== Summary ==================== >>>>>>> >>>>>>> Name: Kernel-bf.899 >>>>>>> Author: bf >>>>>>> Time: 10 February 2015, 4:37:05.988 pm >>>>>>> UUID: 1cc7d0c6-0a3d-457f-9609-fa508d11310e >>>>>>> Ancestors: Kernel-eem.898 >>>>>>> >>>>>>> Fix random for Really Large Integers. >>>>>>> >>>>>>> =============== Diff against Kernel-eem.898 =============== >>>>>>> >>>>>>> Item was changed: >>>>>>> ----- Method: Random>>nextInt: (in category 'accessing') ----- >>>>>>> nextInt: anInteger >>>>>>> " Answer a random integer in the interval [1, anInteger]. >>>>>>> anInteger should be less than 16r80000000. " >>>>>>> >>>>>>> anInteger strictlyPositive ifFalse: [ self error: 'Range must >>>>>>> be >>>>>>> positive' ]. >>>>>>> + "avoid Float arithmetic in #next to work with LargeInts" >>>>>>> + ^ ((seed := self nextValue) asInteger * anInteger // M >>>>>>> asInteger) >>>>>>> + 1! >>>>>>> - ^ (self next * anInteger) truncated + 1! >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> We might want to do something better if anInteger > 16r80000000, >>>>>> because >>>>>> that's the maximum number of different random integers we can produce. >>>>>> We >>>>>> would need to call nextValue twice (or more times) to produce enough >>>>>> randomness. >>>>> >>>>> >>>>> >>>>> Fetching more bits from the generator won't be better. This generator >>>>> has 31 >>>>> bits internal state, so it can't generate longer random numbers. >>>>> We need a better PRNG. >>>>> >>>>> Levente >>>>> >>>>> >>>>>> >>>>>> My fix just solves the immediate problem of running into infinite >>>>>> Floats. >>>>>> >>>>>> - Bert - >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >>> >> > > From ron at usmedrec.com Mon Feb 16 01:28:38 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Feb 16 01:28:57 2015 Subject: [squeak-dev] Squeak Election Starts on Monday Message-ID: <006401d04987$e48cf500$ada6df00$@usmedrec.com> Hi All, This is a reminder that the election for the Squeak Oversight Board starts soon. If you have not announced your candidacy please do it now. If you are not on the voters list please get yourself added now. Time is running out. You have until Monday 16th of February 3PM (20.00 UTC). All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150215/2a773018/attachment.htm From overcomer.man at gmail.com Mon Feb 16 16:44:55 2015 From: overcomer.man at gmail.com (Kirk Fraser) Date: Mon Feb 16 16:44:58 2015 Subject: [squeak-dev] Fwd: [Newbies] How do I start Squeak on Raspberry Pi ? In-Reply-To: References: Message-ID: Please update Squeak 4.5 All-In-One so it works on Raspberry Pi with the default OS (which should be about as popular as OLPC). In Terminal I entered ./squeak.sh and got a popup: Error This Squeak version does not support Linux-armv6| [ok] Also, for beginners, the download webpage should be updated. 1) Mention double-clicking on squeak.sh and other ways of starting Squeak in Linux, which are all different from double-clicking on Squeak.exe 2) Update or remove the FunSqueak Demo Image which requires beginners to do brain surgery to make it work. Replace it with a one click download. (Personally I saw no value in FunSqueak other than the name. So how about replacing it with a Squeak 4.5 preloaded to do all the things shown on the screenshots on www.squeak.org) Thanks. Kirk Fraser -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/9578918a/attachment.htm From frank.shearar at gmail.com Mon Feb 16 17:12:43 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Mon Feb 16 17:12:44 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: Reverted, but I still get the same error. frank On 15 February 2015 at 18:13, Eliot Miranda wrote: > Hi Frank, > > can you revert to 3253? This one should be good. I'm pretty sure the > 3254 VMs are subject to the same inlning bug that I mentioned after the > latest VMMaker.oscog commit and am working on fixing now. > > On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar > wrote: >> >> On 12 February 2015 at 20:42, Eliot Miranda >> wrote: >> > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >> > >> > >> > These fix two important bugs in the Spur VMs, so Newspeakers should >> > update, >> > and changes the default text encoding to UTF-8 on linux. >> >> I updated CI with 3254, and now I see errors like this: >> >> spawning command 1 with timeout 1500 seconds: >> >> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >> -vm-sound-null -vm-display-null >> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >> ../update-image.st >> pthread_setschedparam failed: Operation not permitted >> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >> >> As it happens, we do have a /etc/security/limits.d/squeak.conf on >> build.squeak.org that looks like this: >> >> * hard rtprio 2 >> * soft rtprio 2 >> >> Thoughts? >> >> frank >> > > > > -- > best, > Eliot > > > From overcomer.man at gmail.com Mon Feb 16 17:17:30 2015 From: overcomer.man at gmail.com (Kirk Fraser) Date: Mon Feb 16 17:17:33 2015 Subject: [squeak-dev] Please add Robot support tools Message-ID: Here are improvements to make Squeak more useful for Robot control. 1) Add machine vision tools. I'm told eToys has video camera access but more access to each frame is needed for autonomous robot control including "contour" to reduce the image to arcs and lines to start visual object identification and measurement of object speed and direction as the robot is moving, to either intercept or avoid an object. The same arcs and lines may in some applications be processed into readable text, read your lips, or other interesting things. 2) Method to stop Garbage Collection. I see Squeak 4.5 has a menu item to perform garbage collection so performing collections can be put under program control but there should also be a message to stop any garbage collection until requested or resumed. Why? Imagine you are in a self-driving car powered by Squeak. You enter a curve, turn, or need to stop while going 60 MPH then encounter a 100 millisecond delay for garbage collection. That scenario could put you 8 feet off course into a canyon, oncoming traffic, or a child chasing a ball. So the only way is to use two Squeaks operating in separate cores and use socket communication to guarantee one Squeak is paying close attention to the road while the other collects its garbage, trading off as needed. Perhaps a measure of the garbage pile and growth rate would also help decide which image gets to proceed. 3) The Raspberry Pi has many pins to connect electronics to. Supporting those could potentially provide control for many projects for children and adults. Thank you. Kirk W. Fraser w ww.JesusGospelChurch.com - Replace the fraud churches with the true church. http://freetom.info - Example of False Justice common in America -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/202cf61a/attachment.htm From unoduetre at poczta.onet.pl Mon Feb 16 18:34:11 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Mon Feb 16 17:49:43 2015 Subject: [SPAM] [squeak-dev] Fwd: [Newbies] How do I start Squeak on Raspberry Pi ? In-Reply-To: (from overcomer.man@gmail.com on Mon Feb 16 17:44:55 2015) Message-ID: <1424111651.9410.2@mglap> > 2) Update or remove the FunSqueak Demo Image which requires beginners > to do > brain surgery to make it work. Replace it with a one click download. > (Personally I saw no value in FunSqueak other than the name. So how > about > replacing it with a Squeak 4.5 preloaded to do all the things shown > on the > screenshots on www.squeak.org) Please do not remove it :-P. Kirk, FunSqueak is an additional image, not the standard one. It is only for those people who want to try it and play with it. But you're right that it should be marked as something extra, not the standard thing in order not to confuse people. (Isn't the word "demo" enough?) Maybe it is not for beginners in this case... I don't know, what other Squeakers think? Edgar? Mateusz From eliot.miranda at gmail.com Mon Feb 16 19:55:36 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 16 19:55:39 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar wrote: > Reverted, but I still get the same error. > What's the last good version? > > frank > > On 15 February 2015 at 18:13, Eliot Miranda > wrote: > > Hi Frank, > > > > can you revert to 3253? This one should be good. I'm pretty sure > the > > 3254 VMs are subject to the same inlning bug that I mentioned after the > > latest VMMaker.oscog commit and am working on fixing now. > > > > On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar > > wrote: > >> > >> On 12 February 2015 at 20:42, Eliot Miranda > >> wrote: > >> > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ > >> > > >> > > >> > These fix two important bugs in the Spur VMs, so Newspeakers should > >> > update, > >> > and changes the default text encoding to UTF-8 on linux. > >> > >> I updated CI with 3254, and now I see errors like this: > >> > >> spawning command 1 with timeout 1500 seconds: > >> > >> > /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak > >> -vm-sound-null -vm-display-null > >> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" > >> ../update-image.st > >> pthread_setschedparam failed: Operation not permitted > >> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 > >> > >> As it happens, we do have a /etc/security/limits.d/squeak.conf on > >> build.squeak.org that looks like this: > >> > >> * hard rtprio 2 > >> * soft rtprio 2 > >> > >> Thoughts? > >> > >> frank > >> > > > > > > > > -- > > best, > > Eliot > > > > > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/23ab9817/attachment.htm From ron at usmedrec.com Mon Feb 16 20:22:09 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Feb 16 20:22:32 2015 Subject: [squeak-dev] Voting has started! Please VOTE! Message-ID: <013401d04a26$3e67ff40$bb37fdc0$@usmedrec.com> Hi all, It's time to vote. Please do find the voting email in your inbox and vote! Look for an email from: andru@cs.cornell.edu Subject: Poll: Squeak Oversight Board 2015 Your voice matters. Voting for None of the Below Voting for "None of the Below" allows you to vote for the people you want most without having to vote for candidates that you do not prefer. Candidates that get less votes than "None of the Below" are not elected to the board. In the case that "None of the Below" is chosen above the 7 candidates needed, the board will have fewer than 7 members for the year. When voting starts you will be asked to rank the candidates in the order you wish to have them added to the board. If you don't have a preference between two candidates rank the users with the same rank. Ranking "None of the Below" above other members indicates your desire to vote against the remaining candidates. DO NOT select "No Opinion" as this does not rank the remaining candidates at all. Select a lower rank then "None of the Below" to vote against them. If you have questions please contact voters@squeak.org for more information. Your question and answer will be posted to squeak-dev. All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/4a019b27/attachment.htm From casey.obrien.r at gmail.com Tue Feb 17 03:15:00 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Tue Feb 17 03:15:02 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: 1) You doIt:) 2) I know why you want this. Realtime stuff. You'd have to modify the VM, and deal with new bottlenecks and potential (read: certain) crashes when the system runs out of memory, not to mention deciding on another way of freeing space (Objective-C does this with reference counting. Recently they've added automatic reference counting, which sounds interesting, but I haven't explored it.) Anyway, for most people using the system, an easy way to shut down the garbage collector for the entire system would be catastrophically bad news. I don't think this should be built-in. Maybe a VM plugin to do it would be okay, if someone figured out how to do it that way. 3) Yeah, that's cool. I bet there are already people doing stuff like this. I thought I saw a tim post that mentioned something like this. The Pi is relatively new, but I feel really confident that if we give it some time, we'll have excellent support for that machine. I have and use one myself. I'll add a few 4) here. While we're sending out wants into the ether. It'd be great to get a package supporting OpenGL ES and maybe some 3D printing/CADD software to go with it. Would help with doing simulations of e.g. autonomous vehicles; presently the 3D stuff seems pretty tangled up with Croquet. Wouldn't be surprised if someone had something that did the latter already, but hasn't yet been cajoled into taking the open-source plunge! Another thing I'd like to see is some stuff for laying out and designing chips. It would be a quantum leap for Squeak to not only be the instrument of it's own design software-wise, but also the instrument of the design of the hardware that its software runs on. Jecel, anybody? :D One of the things I love about Squeak is all of the possibilities it presents. We can absolutely make it do whatever we want, if we're willing to do our homework, and then get it done. On Mon, Feb 16, 2015 at 9:17 AM, Kirk Fraser wrote: > Here are improvements to make Squeak more useful for Robot control. > > 1) Add machine vision tools. I'm told eToys has video camera access but > more access to each frame is needed for autonomous robot control including > "contour" to reduce the image to arcs and lines to start visual object > identification and measurement of object speed and direction as the robot > is moving, to either intercept or avoid an object. The same arcs and lines > may in some applications be processed into readable text, read your lips, > or other interesting things. > > 2) Method to stop Garbage Collection. I see Squeak 4.5 has a menu item to > perform garbage collection so performing collections can be put under > program control but there should also be a message to stop any garbage > collection until requested or resumed. Why? Imagine you are in a > self-driving car powered by Squeak. You enter a curve, turn, or need to > stop while going 60 MPH then encounter a 100 millisecond delay for garbage > collection. That scenario could put you 8 feet off course into a canyon, > oncoming traffic, or a child chasing a ball. So the only way is to use two > Squeaks operating in separate cores and use socket communication to > guarantee one Squeak is paying close attention to the road while the other > collects its garbage, trading off as needed. Perhaps a measure of the > garbage pile and growth rate would also help decide which image gets to > proceed. > > 3) The Raspberry Pi has many pins to connect electronics to. Supporting > those could potentially provide control for many projects for children and > adults. > > Thank you. > > Kirk W. Fraser > w ww.JesusGospelChurch.com > - Replace the fraud churches with the > true church. > http://freetom.info - Example of False Justice common in America > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/e82a161c/attachment-0001.htm From eliot.miranda at gmail.com Tue Feb 17 04:06:02 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 17 04:06:09 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: Hi Kirk, On Feb 16, 2015, at 9:17 AM, Kirk Fraser wrote: > Here are improvements to make Squeak more useful for Robot control. > > 1) Add machine vision tools. I'm told eToys has video camera access but more access to each frame is needed for autonomous robot control including "contour" to reduce the image to arcs and lines to start visual object identification and measurement of object speed and direction as the robot is moving, to either intercept or avoid an object. The same arcs and lines may in some applications be processed into readable text, read your lips, or other interesting things. > > 2) Method to stop Garbage Collection. I see Squeak 4.5 has a menu item to perform garbage collection so performing collections can be put under program control but there should also be a message to stop any garbage collection until requested or resumed. Why? Imagine you are in a self-driving car powered by Squeak. You enter a curve, turn, or need to stop while going 60 MPH then encounter a 100 millisecond delay for garbage collection. That scenario could put you 8 feet off course into a canyon, oncoming traffic, or a child chasing a ball. So the only way is to use two Squeaks operating in separate cores and use socket communication to guarantee one Squeak is paying close attention to the road while the other collects its garbage, trading off as needed. Perhaps a measure of the garbage pile and growth rate would also help decide which image gets to proceed. Instead of turning off GC, which will mean that eventually you'll run out if memory, you should ask what is the maximum pause time you want. Pause times for the scavenger in Sour are around a millisecond on typical hardware. Spur will introduce an incremental global scan-mark to collect old space some time this year and it will be set to have similar pause times as the scavenger. So how far would your car drift in 2ms? If you could tune the VM to pause for less than this, what pause time would be acceptable? Can you provide the range of times that spans from marginal to more than satisfactory? > > 3) The Raspberry Pi has many pins to connect electronics to. Supporting those could potentially provide control for many projects for children and adults. > > Thank you. > > Kirk W. Fraser > www.JesusGospelChurch.com - Replace the fraud churches with the true church. > http://freetom.info - Example of False Justice common in America > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150216/680c6377/attachment.htm From herbertkoenig at gmx.net Tue Feb 17 10:44:02 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Tue Feb 17 10:44:06 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: <54E31B72.8040505@gmx.net> Hi, unless we run under a real time OS the OS will prevent a process from getting CPU cycles for arbitrary timespans. So you cannot ensure that a Squeak program on a Pi will prevent a car from bumping into an obstacle even if you set a very short pause time for GC. Otherwise I'd set the pause equal to the longest time the OS will pause Squeak. Cheers, Herbert Am 17.02.2015 um 05:06 schrieb Eliot Miranda: > Instead of turning off GC, which will mean that eventually you'll run > out if memory, you should ask what is the maximum pause time you want. > Pause times for the scavenger in Sour are around a millisecond on > typical hardware. Spur will introduce an incremental global scan-mark > to collect old space some time this year and it will be set to have > similar pause times as the scavenger. So how far would your car drift > in 2ms? If you could tune the VM to pause for less than this, what > pause time would be acceptable? Can you provide the range of times > that spans from marginal to more than satisfactory? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/bd805f72/attachment.htm From frank.shearar at gmail.com Tue Feb 17 10:56:22 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Feb 17 10:56:24 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On 16 February 2015 at 19:55, Eliot Miranda wrote: > > > On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar > wrote: >> >> Reverted, but I still get the same error. > > > What's the last good version? I'm not convinced it's a Cog issue: the last known good was 3164 [1] but the next build showed the "Operation not permitted" problem [2], also with 3164. [1] http://build.squeak.org/job/SqueakTrunk/990/console [2] http://build.squeak.org/job/SqueakTrunk/991/console frank >> frank >> >> On 15 February 2015 at 18:13, Eliot Miranda >> wrote: >> > Hi Frank, >> > >> > can you revert to 3253? This one should be good. I'm pretty sure >> > the >> > 3254 VMs are subject to the same inlning bug that I mentioned after the >> > latest VMMaker.oscog commit and am working on fixing now. >> > >> > On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >> > wrote: >> >> >> >> On 12 February 2015 at 20:42, Eliot Miranda >> >> wrote: >> >> > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >> >> > >> >> > >> >> > These fix two important bugs in the Spur VMs, so Newspeakers should >> >> > update, >> >> > and changes the default text encoding to UTF-8 on linux. >> >> >> >> I updated CI with 3254, and now I see errors like this: >> >> >> >> spawning command 1 with timeout 1500 seconds: >> >> >> >> >> >> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >> >> -vm-sound-null -vm-display-null >> >> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >> >> ../update-image.st >> >> pthread_setschedparam failed: Operation not permitted >> >> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >> >> >> >> As it happens, we do have a /etc/security/limits.d/squeak.conf on >> >> build.squeak.org that looks like this: >> >> >> >> * hard rtprio 2 >> >> * soft rtprio 2 >> >> >> >> Thoughts? >> >> >> >> frank >> >> >> > >> > >> > >> > -- >> > best, >> > Eliot >> > >> > >> > >> > > > > -- > best, > Eliot From overcomer.man at gmail.com Tue Feb 17 11:52:49 2015 From: overcomer.man at gmail.com (Kirk Fraser) Date: Tue Feb 17 11:52:51 2015 Subject: [squeak-dev] CAD, Electroics, and my interests Message-ID: Casey, Thanks for your replies. On 3D CAD I recommend taking a course in SolidWorks - it is a very simple way of dealing with graphic objects compared to others and is popular even at $4,,000 per seat - I don't suggest purchase but seeing the simple user interface would help duplicate it and improve on it. The hardest part to me would be writing the file translators such as .dxf. On chip design, one tip is to get a free education starting at Parallax.com which released their Propeller micro-controller chip design into public domain. There is a community of people on their forum which can help. Then move up to a CPU core design like Raspberry Pi uses. If you can make it this far, I suggest a chip with 0.1" pin-outs is way easier to hand solder than smaller surface mount designs. While I'm interested in all this, I have other interests with more leverage that I choose to spend time on. One is Bible analysis which provides understanding of deep text analysis beyond the skills of most Artificial Intelligence (AI) folks. I am working on my own AI after I finish an AI language on top of Smalltalk, with a small object database. I'm also working on a robot which will drive a tractor around a field and more if I can get the garbage collection problem solved. I suspect tag team GC requests on cooperating cores MIGHT do it but I'd rather be sure than end up dead. The first driverless car was programmed in Python which has garbage collection control. My robot work is shown at www.reliablerobots.com Of primary concern at present is a result of my Bible studies at http://jesusgospelchurch.com/Timeline.html which indicates two possible limits on my lifespan, the Rev. 12:5 ascension aka. pre-trib rapture I'm guessing will be in 2024 for good Christians and the one as Jesus returns in 2031 which will take the majority of currently bad Christians including Pope, Pastors, etc. who will have been humbled by the Rev. 16 world earthquake, and having to look to God to help them survive. As it appears I'm the only guy speculating these years. leaving days and hours alone, I think it may become important for me to spend more time preaching after the Rev. 8 asteroid hits I'm guessing in 2020. So I have only 5-6 years to spend on technology and trying to make more than sustenance income. Thus I must prioritize. I'm making great progress on my AI language, it's half done, executing the first example. So I'm thinking I need to spend time on software. Robot hardware is expensive and I cannot afford it except for prior investments in a period of life where I had money. So I dribble toward it as I can, say $250 a month plus or minus. I realized a humanoid robot is virtually worthless without machine vision so I plan to work on the higher levels of that in my AI language after getting camera access in Squeak. All this is to say I won't become a Virtual Machine expert for Linux because I don't have time at present. If my AI is wildly successful in being the first to pass a GED then a copy could be assigned that or any job except being part of the image of the Beast robot in Rev. 13 - which fear has hindered me since college. My industrial farm robot won't be pretty enough to fulfill that prophecy. Sometimes I make bad investment choices like anyone, but it hurts more when poor. For example I hired an offshore programmer in India to work on Squeak for a month and the result was basically nothing with no refund - later I did the first half of the job in 2 weeks. So in any case my time is limited. Kirk W. Fraser w ww.JesusGospelChurch.com - Replace the fraud churches with the true church. http://freetom.info - Example of False Justice common in America -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/b18b056b/attachment.htm From lewis at mail.msen.com Tue Feb 17 12:32:09 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 17 12:32:11 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: <20150217123209.GA93442@shell.msen.com> On Tue, Feb 17, 2015 at 10:56:22AM +0000, Frank Shearar wrote: > On 16 February 2015 at 19:55, Eliot Miranda wrote: > > > > > > On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar > > wrote: > >> > >> Reverted, but I still get the same error. > > > > > > What's the last good version? > > I'm not convinced it's a Cog issue: the last known good was 3164 [1] > but the next build showed the "Operation not permitted" problem [2], > also with 3164. > > [1] http://build.squeak.org/job/SqueakTrunk/990/console > [2] http://build.squeak.org/job/SqueakTrunk/991/console > Hi Frank, The Jenkins system on box4 is running in a chroot environment, with /srv/box2/ as the effective root. It may be that the configuration settings for Cog in /etc/security/limits.d/squeak.conf do not apply in that case. Dave > frank > > >> frank > >> > >> On 15 February 2015 at 18:13, Eliot Miranda > >> wrote: > >> > Hi Frank, > >> > > >> > can you revert to 3253? This one should be good. I'm pretty sure > >> > the > >> > 3254 VMs are subject to the same inlning bug that I mentioned after the > >> > latest VMMaker.oscog commit and am working on fixing now. > >> > > >> > On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar > >> > wrote: > >> >> > >> >> On 12 February 2015 at 20:42, Eliot Miranda > >> >> wrote: > >> >> > http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ > >> >> > > >> >> > > >> >> > These fix two important bugs in the Spur VMs, so Newspeakers should > >> >> > update, > >> >> > and changes the default text encoding to UTF-8 on linux. > >> >> > >> >> I updated CI with 3254, and now I see errors like this: > >> >> > >> >> spawning command 1 with timeout 1500 seconds: > >> >> > >> >> > >> >> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak > >> >> -vm-sound-null -vm-display-null > >> >> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" > >> >> ../update-image.st > >> >> pthread_setschedparam failed: Operation not permitted > >> >> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 > >> >> > >> >> As it happens, we do have a /etc/security/limits.d/squeak.conf on > >> >> build.squeak.org that looks like this: > >> >> > >> >> * hard rtprio 2 > >> >> * soft rtprio 2 > >> >> > >> >> Thoughts? > >> >> > >> >> frank > >> >> > >> > > >> > > >> > > >> > -- > >> > best, > >> > Eliot > >> > > >> > > >> > > >> > > > > > > > > -- > > best, > > Eliot From leves at elte.hu Tue Feb 17 12:35:09 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Feb 17 12:35:11 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: <20150217123209.GA93442@shell.msen.com> References: <20150217123209.GA93442@shell.msen.com> Message-ID: On Tue, 17 Feb 2015, David T. Lewis wrote: > On Tue, Feb 17, 2015 at 10:56:22AM +0000, Frank Shearar wrote: >> On 16 February 2015 at 19:55, Eliot Miranda wrote: >>> >>> >>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>> wrote: >>>> >>>> Reverted, but I still get the same error. >>> >>> >>> What's the last good version? >> >> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >> but the next build showed the "Operation not permitted" problem [2], >> also with 3164. >> >> [1] http://build.squeak.org/job/SqueakTrunk/990/console >> [2] http://build.squeak.org/job/SqueakTrunk/991/console >> > > Hi Frank, > > The Jenkins system on box4 is running in a chroot environment, with > /srv/box2/ as the effective root. It may be that the configuration settings > for Cog in /etc/security/limits.d/squeak.conf do not apply in that case. > > Dave Jenkins is running on box3. Levente > > >> frank >> >>>> frank >>>> >>>> On 15 February 2015 at 18:13, Eliot Miranda >>>> wrote: >>>>> Hi Frank, >>>>> >>>>> can you revert to 3253? This one should be good. I'm pretty sure >>>>> the >>>>> 3254 VMs are subject to the same inlning bug that I mentioned after the >>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>> >>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>> wrote: >>>>>> >>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>> wrote: >>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>> >>>>>>> >>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>> update, >>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>> >>>>>> I updated CI with 3254, and now I see errors like this: >>>>>> >>>>>> spawning command 1 with timeout 1500 seconds: >>>>>> >>>>>> >>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>> -vm-sound-null -vm-display-null >>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>> ../update-image.st >>>>>> pthread_setschedparam failed: Operation not permitted >>>>>> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>> >>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>> build.squeak.org that looks like this: >>>>>> >>>>>> * hard rtprio 2 >>>>>> * soft rtprio 2 >>>>>> >>>>>> Thoughts? >>>>>> >>>>>> frank >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> best, >>>>> Eliot >>>>> >>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> best, >>> Eliot > > From lewis at mail.msen.com Tue Feb 17 12:41:05 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 17 12:41:07 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: <20150217123209.GA93442@shell.msen.com> Message-ID: <20150217124105.GA95721@shell.msen.com> On Tue, Feb 17, 2015 at 01:35:09PM +0100, Levente Uzonyi wrote: > On Tue, 17 Feb 2015, David T. Lewis wrote: > > >On Tue, Feb 17, 2015 at 10:56:22AM +0000, Frank Shearar wrote: > >>On 16 February 2015 at 19:55, Eliot Miranda > >>wrote: > >>> > >>> > >>>On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar > >>>wrote: > >>>> > >>>>Reverted, but I still get the same error. > >>> > >>> > >>>What's the last good version? > >> > >>I'm not convinced it's a Cog issue: the last known good was 3164 [1] > >>but the next build showed the "Operation not permitted" problem [2], > >>also with 3164. > >> > >>[1] http://build.squeak.org/job/SqueakTrunk/990/console > >>[2] http://build.squeak.org/job/SqueakTrunk/991/console > >> > > > >Hi Frank, > > > >The Jenkins system on box4 is running in a chroot environment, with > >/srv/box2/ as the effective root. It may be that the configuration settings > >for Cog in /etc/security/limits.d/squeak.conf do not apply in that case. > > > >Dave > > Jenkins is running on box3. > > Levente Oops, sorry, I forgot. Please disregard. Dave From commits at source.squeak.org Tue Feb 17 12:46:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 17 12:47:01 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.904.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.904.mcz ==================== Summary ==================== Name: Kernel-ul.904 Author: ul Time: 17 February 2015, 1:40:49.811 pm UUID: 7e873979-7e22-4abb-bd69-fa6d72f8c7fc Ancestors: Kernel-nice.902 Avoid the frequent time checks, and the clock rollover bug in BlockClosure >> #bench. Introduced BlockClosure >> #benchFor:, a variant of #bench, which takes the duration of the benchmark as its parameter. Added more information about the running times to the answer. E.g.: [ 10 factorial ] benchFor: 0.1 seconds. "'7,990,000 per second. 125 nanoseconds per run.'" [ 100 factorial ] benchFor: 10 seconds. "'19,900 per second. 50.3 microseconds per run.'" [ 1000 factorial ] bench. "'378 per second. 2.65 milliseconds per run.'" [ 20000 factorial ] bench. "'0.843 per second. 1.19 seconds per run.'" =============== Diff against Kernel-nice.902 =============== Item was changed: ----- Method: BlockClosure>>bench (in category 'evaluating') ----- bench "See how many times I can value in 5 seconds. I'll answer a meaningful description." + ^self benchFor: 5 seconds! - | startTime endTime count roundTo3Digits | - roundTo3Digits := [:num | - | rounded lowDigit | - rounded := (num * 1000) rounded. "round to 1/1000" - lowDigit := (rounded numberOfDigitsInBase: 10) - 3. "keep only first 3 digits" - rounded := rounded roundTo:(10 raisedTo: lowDigit). - (lowDigit >= 3 or: [rounded \\ 1000 = 0]) "display fractional part only when needed" - ifTrue: [(rounded // 1000) asStringWithCommas] - ifFalse: [(rounded / 1000.0) printString]]. - count := 0. - endTime := Time millisecondClockValue + 5000. - startTime := Time millisecondClockValue. - [ Time millisecondClockValue > endTime ] whileFalse: [ self value. count := count + 1 ]. - endTime := Time millisecondClockValue. - ^count = 1 - ifTrue: [ (roundTo3Digits value: (endTime - startTime) / 1000) , ' seconds.' ] - ifFalse: - [ (roundTo3Digits value: (count * 1000) / (endTime - startTime)) , ' per second.' ]! Item was added: + ----- Method: BlockClosure>>benchFor: (in category 'evaluating') ----- + benchFor: aDuration + "See how many times I can value within the given duration. I'll answer a meaningful description." + + | startTime shouldRun count elapsedTime roundTo3Digits delay | + roundTo3Digits := [:num | + | rounded lowDigit | + rounded := (num * 1000) rounded. "round to 1/1000" + lowDigit := (rounded numberOfDigitsInBase: 10) - 3. "keep only first 3 digits" + rounded := rounded roundTo:(10 raisedTo: lowDigit). + (lowDigit >= 3 or: [rounded \\ 1000 = 0]) "display fractional part only when needed" + ifTrue: [(rounded // 1000) asStringWithCommas] + ifFalse: [(rounded / 1000.0) printString]]. + delay := aDuration asDelay. + count := 0. + shouldRun := true. + [ delay wait. shouldRun := false ] forkAt: Processor timingPriority - 1. + startTime := Time millisecondClockValue. + [ shouldRun ] whileTrue: [ + self value. + count := count + 1 ]. + elapsedTime := Time millisecondsSince: startTime. + ^(roundTo3Digits value: count * 1000 / elapsedTime) , ' per second.', (( + #( + (1e-3 'seconds') + (1 'milliseconds') + (1e3 'microseconds') + (1e6 'nanoseconds') + ) + detect: [ :pair | elapsedTime * pair first >= count ] + ifNone: [ #(1e9 'picoseconds') ]) + in: [ :pair | + ' {1} {2} per run.' format: { + (roundTo3Digits value: elapsedTime * pair first / count). + pair second } ])! From ron at usmedrec.com Tue Feb 17 16:19:27 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Feb 17 16:20:13 2015 Subject: [squeak-dev] Don't forget to Vote Message-ID: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> Hi All, Just a reminder to everyone that received a ballot for the 2015 Squeak Oversight Board. Please look for an email from an andru@cs.cornell.edu Subject: Poll: Squeak Oversight Board 2015 Sent on Monday Feb 16, 2015. Follow the link and vote. Thanks! Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/c3bb74b8/attachment.htm From tim at rowledge.org Tue Feb 17 17:59:08 2015 From: tim at rowledge.org (tim Rowledge) Date: Tue Feb 17 17:59:12 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: <54E31B72.8040505@gmx.net> References: <54E31B72.8040505@gmx.net> Message-ID: <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> On 17-02-2015, at 2:44 AM, Herbert K?nig wrote: > Hi, > > unless we run under a real time OS the OS will prevent a process from getting CPU cycles for arbitrary timespans. There are bare-metal kernels for Pi, and RISC OS, which whilst not strictly speaking RTOS is pretty damn close. If you run Squeak on RISC OS with no other apps you can get consistent sub-millisecond ticks etc. Linux does quite a few useful things but the more I work on the Pi the more I appreciate how many deeply annoying things it does too. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Paralyzed from the neck up. From herbertkoenig at gmx.net Tue Feb 17 22:15:38 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Tue Feb 17 22:15:41 2015 Subject: [squeak-dev] Don't forget to Vote .... Server down? In-Reply-To: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> Message-ID: <54E3BD8A.2060203@gmx.net> Hi, > Hi All, > > Just a reminder to everyone that received a ballot for the 2015 Squeak > Oversight Board. > Just wanted to vote but the server took too long to respond also http://civs.cs.cornell.edu/ gives no reply. Neither through my DSL nor through my mobile. But it seems only down for me because downforme.org says its up. I'll retry tomorrow. Cheers, Herbert -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/2739a659/attachment.htm From ron at usmedrec.com Tue Feb 17 23:05:09 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Feb 17 23:06:05 2015 Subject: [squeak-dev] Don't forget to Vote .... Server down? In-Reply-To: <54E3BD8A.2060203@gmx.net> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> <54E3BD8A.2060203@gmx.net> Message-ID: <03c701d04b06$2e16fd90$8a44f8b0$@usmedrec.com> Thank you for letting me know. I?ve contacted them to find out more. I?ll post an update when I hear back. All the best, Ron Teitelbaum From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Herbert K?nig Sent: Tuesday, February 17, 2015 5:16 PM To: squeak-dev@lists.squeakfoundation.org Subject: Re: [squeak-dev] Don't forget to Vote .... Server down? Hi, Hi All, Just a reminder to everyone that received a ballot for the 2015 Squeak Oversight Board. Just wanted to vote but the server took too long to respond also http://civs.cs.cornell.edu/ gives no reply. Neither through my DSL nor through my mobile. But it seems only down for me because downforme.org says its up. I'll retry tomorrow. Cheers, Herbert -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/0f5f28e2/attachment.htm From commits at source.squeak.org Wed Feb 18 00:12:14 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Feb 18 00:12:15 2015 Subject: [squeak-dev] The Trunk: KernelTests-eem.289.mcz Message-ID: Eliot Miranda uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-eem.289.mcz ==================== Summary ==================== Name: KernelTests-eem.289 Author: eem Time: 17 February 2015, 4:12:02.897 pm UUID: 64e0435e-3bad-413e-9523-d0d35493ee61 Ancestors: KernelTests-eem.288 Fix the 64-bitized testCreationFromBytes tests. The read bytes need to be reversed. =============== Diff against KernelTests-eem.288 =============== Item was changed: ----- Method: IntegerTest>>testCreationFromBytes1 (in category 'tests - instance creation') ----- testCreationFromBytes1 "self run: #testCreationFromBytes1" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs SmallInteger maxVal as an instance of SmallInteger. " | maxSmallInt hexString builtInteger bytes | maxSmallInt := SmallInteger maxVal. hexString := maxSmallInt printStringHex. hexString size odd ifTrue: [hexString := '0', hexString]. self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := ((1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]) reversed. - bytes := (1 to: hexString size by: 2) collect: - [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. builtInteger := bytes size > 4 ifTrue: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] ifFalse: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. self assert: builtInteger = maxSmallInt. self assert: builtInteger class = SmallInteger ! Item was changed: ----- Method: IntegerTest>>testCreationFromBytes2 (in category 'tests - instance creation') ----- testCreationFromBytes2 "self run: #testCreationFromBytes2" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs (SmallInteger maxVal + 1) as an instance of LargePositiveInteger. " | maxSmallInt hexString builtInteger bytes | maxSmallInt := SmallInteger maxVal. hexString := (maxSmallInt + 1) printStringHex. hexString size odd ifTrue: [hexString := '0', hexString]. self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := ((1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]) reversed. - bytes := (1 to: hexString size by: 2) collect: - [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. builtInteger := bytes size > 4 ifTrue: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] ifFalse: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. self assert: builtInteger = (maxSmallInt + 1). self deny: builtInteger class = SmallInteger ! Item was changed: ----- Method: IntegerTest>>testCreationFromBytes3 (in category 'tests - instance creation') ----- testCreationFromBytes3 "self run: #testCreationFromBytes3" "it is illegal for a LargeInteger to be less than SmallInteger maxVal." "here we test that Integer>>byte!!byte2:byte3:byte4: resconstructs (SmallInteger maxVal - 1) as an instance of SmallInteger. " | maxSmallInt hexString builtInteger bytes | maxSmallInt := SmallInteger maxVal. hexString := (maxSmallInt - 1) printStringHex. hexString size odd ifTrue: [hexString := '0', hexString]. self assert: hexString size / 2 = maxSmallInt digitLength. + bytes := ((1 to: hexString size by: 2) collect: + [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]) reversed. - bytes := (1 to: hexString size by: 2) collect: - [:i| Number readFrom: (hexString copyFrom: i to: i + 1) base: 16]. builtInteger := bytes size > 4 ifTrue: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4) byte5: (bytes at: 5) byte6: (bytes at: 6) byte7: (bytes at: 7) byte8: (bytes at: 8)] ifFalse: [Integer byte1: (bytes at: 1) byte2: (bytes at: 2) byte3: (bytes at: 3) byte4: (bytes at: 4)]. self assert: builtInteger = (maxSmallInt - 1). self assert: builtInteger class = SmallInteger ! From ron at usmedrec.com Wed Feb 18 03:25:59 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Feb 18 03:27:00 2015 Subject: [squeak-dev] Voting System Down - Should be back up tomorrow. Voted today? Pease check your votes tomorrow! Message-ID: <041b01d04b2a$9e02aef0$da080cd0$@usmedrec.com> Hi All, I heard back from Cornell. The voting system is down and has been since 4pm EDT (9pm UTC). It is possible you will need to revote if you voted near that time. I will check the system tomorrow and report back or if you see the system is up and running please post to squeak-dev. When the system is up and you voted today please check your vote. Revote if necessary. Sorry about the trouble. Thank you for your participation in the Squeak Oversight Board 2015 election. All the best, Ron Teitelbaum >From Cornell: Hi Ron, We had a hard disk failure but we have backups. Unfortunately the replacement disk also went bad immediately (Go Seagate!). Hopefully it will be back up tomorrow. A small number of people might need to vote again if they voted just before the system went down around 4pm (the system will be able to tell them if it has registered their votes). Apologies for the inconvenience. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150217/b1ce50b3/attachment.htm From casimiro.barreto at gmail.com Wed Feb 18 12:10:26 2015 From: casimiro.barreto at gmail.com (Casimiro de Almeida Barreto) Date: Wed Feb 18 12:10:51 2015 Subject: [squeak-dev] Voting System Down - Should be back up tomorrow. Voted today? Pease check your votes tomorrow! In-Reply-To: <041b01d04b2a$9e02aef0$da080cd0$@usmedrec.com> References: <041b01d04b2a$9e02aef0$da080cd0$@usmedrec.com> Message-ID: <54E48132.8070209@gmail.com> Dear sirs, I didn't receive the email to the voting site :( Best regards, Casimiro Barreto -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/51a5787c/signature.pgp From casimiro.barreto at gmail.com Wed Feb 18 12:34:10 2015 From: casimiro.barreto at gmail.com (Casimiro de Almeida Barreto) Date: Wed Feb 18 12:34:23 2015 Subject: [squeak-dev] Don't forget to Vote In-Reply-To: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> Message-ID: <54E486C2.6060500@gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/6a992f6c/signature.pgp From ron at usmedrec.com Wed Feb 18 16:30:02 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Feb 18 16:30:24 2015 Subject: [squeak-dev] Don't forget to Vote In-Reply-To: <54E486C2.6060500@gmail.com> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> <54E486C2.6060500@gmail.com> Message-ID: <063f01d04b98$25b7f770$7127e650$@usmedrec.com> Hi Casimiro, I verified you are on the voters list. I will resend the email when the voting system comes back up. All the best, Ron Teitelbaum From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Casimiro de Almeida Barreto Sent: Wednesday, February 18, 2015 7:34 AM To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] Don't forget to Vote Didn't receive the email... voted last year... Best regards, Casimiro Barreto On 17-02-2015 14:19, Ron Teitelbaum wrote: Hi All, Just a reminder to everyone that received a ballot for the 2015 Squeak Oversight Board. Please look for an email from an andru@cs.cornell.edu Subject: Poll: Squeak Oversight Board 2015 Sent on Monday Feb 16, 2015. Follow the link and vote. Thanks! Ron Teitelbaum -- The information contained in this message is confidential and intended to the recipients specified in the headers. If you received this message by error, notify the sender immediately. The unauthorized use, disclosure, copy or alteration of this message are strictly forbidden and subjected to civil and criminal sanctions. == This email may be signed using PGP key ID: 1455478743A83CC3 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/4b3fcd19/attachment-0001.htm From ron at usmedrec.com Wed Feb 18 16:31:31 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Feb 18 16:31:52 2015 Subject: [squeak-dev] Voting System Down - Should be back up tomorrow. Voted today? Pease check your votes tomorrow! In-Reply-To: <041b01d04b2a$9e02aef0$da080cd0$@usmedrec.com> References: <041b01d04b2a$9e02aef0$da080cd0$@usmedrec.com> Message-ID: <064401d04b98$5a720b40$0f5621c0$@usmedrec.com> Hi all, FYI, The voting system is still down. I will continue to check the system and report back when it comes back online. All the best, Ron Teitelbaum From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Ron Teitelbaum Sent: Tuesday, February 17, 2015 10:26 PM To: The general-purpose Squeak developers list Subject: [squeak-dev] Voting System Down - Should be back up tomorrow. Voted today? Pease check your votes tomorrow! Hi All, I heard back from Cornell. The voting system is down and has been since 4pm EDT (9pm UTC). It is possible you will need to revote if you voted near that time. I will check the system tomorrow and report back or if you see the system is up and running please post to squeak-dev. When the system is up and you voted today please check your vote. Revote if necessary. Sorry about the trouble. Thank you for your participation in the Squeak Oversight Board 2015 election. All the best, Ron Teitelbaum >From Cornell: Hi Ron, We had a hard disk failure but we have backups. Unfortunately the replacement disk also went bad immediately (Go Seagate!). Hopefully it will be back up tomorrow. A small number of people might need to vote again if they voted just before the system went down around 4pm (the system will be able to tell them if it has registered their votes). Apologies for the inconvenience. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/8f7bd369/attachment.htm From tim at rowledge.org Wed Feb 18 20:06:41 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 18 20:06:47 2015 Subject: [squeak-dev] So who broke bitOr: ? Message-ID: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> On a fresh Pi vm (as in svn updated yesterday) 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 On a slightly older Mac vm 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF This breaks, amongst other things, Color>bitPatternForDepth:, whcih pretty much trashes an image since that gets used to makes cursor bitmaps as you move the pointer around. Nicely fills your window with notifiers? So come along; hands up the boy that did that! I?ll keep you all in late unless someone confesses. It?s only your own time you?re wasting! Was it *you* Molesworth? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: PBC: Print and Break Chain From bert at freudenbergs.de Wed Feb 18 20:15:52 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Feb 18 20:15:59 2015 Subject: [squeak-dev] Re: [Vm-dev] So who broke bitOr: ? In-Reply-To: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> Message-ID: <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> On 18.02.2015, at 12:06, tim Rowledge wrote: > On a fresh Pi vm (as in svn updated yesterday) > 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 > On a slightly older Mac vm > 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF Uggh. Disgusting. What exactly is a "fresh Pi VM"? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/c2567df0/smime.bin From tim at rowledge.org Wed Feb 18 20:21:28 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 18 20:21:32 2015 Subject: [squeak-dev] Re: [Vm-dev] So who broke bitOr: ? In-Reply-To: <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> Message-ID: <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> On 18-02-2015, at 12:15 PM, Bert Freudenberg wrote: > On 18.02.2015, at 12:06, tim Rowledge wrote: > >> On a fresh Pi vm (as in svn updated yesterday) >> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 >> On a slightly older Mac vm >> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF > > Uggh. Disgusting. > Exactly. And I should probably add that a few-week-old Pi vm got it right, so it?s a recent change. > What exactly is a "fresh Pi VM?? Uh, a freshly built vm for a Raspberry Pi? As in the things that have not only now sold 5m, but about 500,00 in the last 3 weeks, almost all Pi 2 ? they?re taking over the planet I tell you! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MW: Multiply Work From tim at rowledge.org Wed Feb 18 21:13:33 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 18 21:13:38 2015 Subject: [squeak-dev] [Vm-dev] So who broke bitOr: ? In-Reply-To: <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> Message-ID: Also pretty sure that 16rFFFF0000 bitAnd: 16rFFFFFFFF should be 16rFFFF0000 and not -65536 tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "How many Motie Warriors does it take to change a lightbulb?? "None. One of the dead ones will do it." From bert at freudenbergs.de Wed Feb 18 22:47:36 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Feb 18 22:47:41 2015 Subject: [squeak-dev] Re: [Vm-dev] So who broke bitOr: ? In-Reply-To: <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> Message-ID: > On 18.02.2015, at 12:21, tim Rowledge wrote: > > > On 18-02-2015, at 12:15 PM, Bert Freudenberg wrote: > >> On 18.02.2015, at 12:06, tim Rowledge wrote: >> >>> On a fresh Pi vm (as in svn updated yesterday) >>> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 >>> On a slightly older Mac vm >>> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF >> >> Uggh. Disgusting. >> > Exactly. And I should probably add that a few-week-old Pi vm got it right, so it?s a recent change. > > >> What exactly is a "fresh Pi VM?? > > Uh, a freshly built vm for a Raspberry Pi? As in the things that have not only now sold 5m, but about 500,00 in the last 3 weeks, almost all Pi 2 ? they?re taking over the planet I tell you! I meant that quite literally. As in, what's the output of "Smalltalk vmVersion"? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/d9962d10/smime.bin From lewis at mail.msen.com Thu Feb 19 01:21:22 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 19 01:21:25 2015 Subject: [squeak-dev] Re: [Vm-dev] So who broke bitOr: ? In-Reply-To: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> Message-ID: <20150219012122.GA68478@shell.msen.com> On Wed, Feb 18, 2015 at 12:06:41PM -0800, tim Rowledge wrote: > > On a fresh Pi vm (as in svn updated yesterday) > 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 > On a slightly older Mac vm > 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF > > This breaks, amongst other things, Color>bitPatternForDepth:, whcih pretty much trashes an image since that gets used to makes cursor bitmaps as you move the pointer around. Nicely fills your window with notifiers? > It looks like a type declaration and/or slang inlining issue. Back up a few versions in VMMaker.oscog and you will probably find the cause. Eliot has been doing a lot of work related to 64-bit immediates, and you may be running some version that introduces a bug in the 32-bit variation (just guessing). Dave From overcomer.man at gmail.com Thu Feb 19 03:04:18 2015 From: overcomer.man at gmail.com (Kirk Fraser) Date: Thu Feb 19 03:04:21 2015 Subject: [squeak-dev] Add Search To Message Archive Message-ID: A search on the archive would help beginners find previous discussions, in some cases before asking again. Thanks. Kirk W. Fraser w ww.JesusGospelChurch.com - Replace the fraud churches with the true church. http://freetom.info - Example of False Justice common in America -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150218/81317f97/attachment.htm From eliot.miranda at gmail.com Thu Feb 19 03:56:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 19 03:56:53 2015 Subject: [squeak-dev] Re: [Vm-dev] So who broke bitOr: ? In-Reply-To: <20150219012122.GA68478@shell.msen.com> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <20150219012122.GA68478@shell.msen.com> Message-ID: <004EAC9E-5040-49DE-A66D-16CD79094BAF@gmail.com> On Feb 18, 2015, at 5:21 PM, "David T. Lewis" wrote: > > On Wed, Feb 18, 2015 at 12:06:41PM -0800, tim Rowledge wrote: >> >> On a fresh Pi vm (as in svn updated yesterday) >> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> -1 >> On a slightly older Mac vm >> 16rFFFF bitOr:(16rFFFF bitShift: 16) -> 4294967295, aka 16rFFFFFFFF >> >> This breaks, amongst other things, Color>bitPatternForDepth:, whcih pretty much trashes an image since that gets used to makes cursor bitmaps as you move the pointer around. Nicely fills your window with notifiers? > > It looks like a type declaration and/or slang inlining issue. Back up > a few versions in VMMaker.oscog and you will probably find the cause. > > Eliot has been doing a lot of work related to 64-bit immediates, and you > may be running some version that introduces a bug in the 32-bit variation > (just guessing). Mea culpa. In getting 64-bit Sour working I broke Slang and that broke the bit logic primitives. I just committed a working VMMaker.oscog. Tim, Bert's question was germane. The oscog VM was broken, not the interpreter one, and you could have said "freshly generated from VMMaker.oscog-???.nnn" ;-) > Dave > From pdebruic at gmail.com Thu Feb 19 04:36:29 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Thu Feb 19 04:43:18 2015 Subject: [squeak-dev] Re: Add Search To Message Archive In-Reply-To: References: Message-ID: <1424320589647-4806437.post@n4.nabble.com> Nabble has one e.g. http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=45488&query=Kirk+Fraser&n=45488 -- View this message in context: http://forum.world.st/Add-Search-To-Message-Archive-tp4806430p4806437.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Feb 19 15:59:23 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Feb 19 15:59:27 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> Message-ID: <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Tim, what about a SqueakNOS approach. What software support is there? Xen etc... Eliot (phone) On Feb 17, 2015, at 9:59 AM, tim Rowledge wrote: > > On 17-02-2015, at 2:44 AM, Herbert K?nig wrote: > >> Hi, >> >> unless we run under a real time OS the OS will prevent a process from getting CPU cycles for arbitrary timespans. > > There are bare-metal kernels for Pi, and RISC OS, which whilst not strictly speaking RTOS is pretty damn close. If you run Squeak on RISC OS with no other apps you can get consistent sub-millisecond ticks etc. Linux does quite a few useful things but the more I work on the Pi the more I appreciate how many deeply annoying things it does too. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Paralyzed from the neck up. > > > From jon at huv.com Thu Feb 19 17:57:45 2015 From: jon at huv.com (Jon Hylands) Date: Thu Feb 19 17:57:48 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: <698858C2-1820-4161-84A8-6551B1209803@gmail.com> References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: I'd really like to see a pared-down version of Squeak that would fit on the same hardware that MicroPython runs on (a Cortex M4 chip running at 168 MHz, with 192 KB of RAM and 1 MB of FLASH). Maybe something like Little Smalltalk. No user interface beyond a simple REPL. I've got a couple robots being controlled now with custom boards I designed running MicroPython on this chip. - Jon On Thu, Feb 19, 2015 at 10:59 AM, Eliot Miranda wrote: > Tim, > > what about a SqueakNOS approach. What software support is there? Xen > etc... > > Eliot (phone) > > On Feb 17, 2015, at 9:59 AM, tim Rowledge wrote: > > > > > On 17-02-2015, at 2:44 AM, Herbert K?nig wrote: > > > >> Hi, > >> > >> unless we run under a real time OS the OS will prevent a process from > getting CPU cycles for arbitrary timespans. > > > > There are bare-metal kernels for Pi, and RISC OS, which whilst not > strictly speaking RTOS is pretty damn close. If you run Squeak on RISC OS > with no other apps you can get consistent sub-millisecond ticks etc. Linux > does quite a few useful things but the more I work on the Pi the more I > appreciate how many deeply annoying things it does too. > > > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > Useful random insult:- Paralyzed from the neck up. > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150219/daaf5c69/attachment.htm From jon at huv.com Thu Feb 19 18:00:06 2015 From: jon at huv.com (Jon Hylands) Date: Thu Feb 19 18:00:10 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: Here's a couple links I forgot to add to my post: MicroPython: http://micropython.org/ NanoSeeker (one of my robots): http://blog.huv.com/2014/10/nanoseeker-v21-populated-board.html - Jon On Thu, Feb 19, 2015 at 12:57 PM, Jon Hylands wrote: > I'd really like to see a pared-down version of Squeak that would fit on > the same hardware that MicroPython runs on (a Cortex M4 chip running at 168 > MHz, with 192 KB of RAM and 1 MB of FLASH). Maybe something like Little > Smalltalk. No user interface beyond a simple REPL. > > I've got a couple robots being controlled now with custom boards I > designed running MicroPython on this chip. > > - Jon > > > On Thu, Feb 19, 2015 at 10:59 AM, Eliot Miranda > wrote: > >> Tim, >> >> what about a SqueakNOS approach. What software support is there? >> Xen etc... >> >> Eliot (phone) >> >> On Feb 17, 2015, at 9:59 AM, tim Rowledge wrote: >> >> > >> > On 17-02-2015, at 2:44 AM, Herbert K?nig wrote: >> > >> >> Hi, >> >> >> >> unless we run under a real time OS the OS will prevent a process from >> getting CPU cycles for arbitrary timespans. >> > >> > There are bare-metal kernels for Pi, and RISC OS, which whilst not >> strictly speaking RTOS is pretty damn close. If you run Squeak on RISC OS >> with no other apps you can get consistent sub-millisecond ticks etc. Linux >> does quite a few useful things but the more I work on the Pi the more I >> appreciate how many deeply annoying things it does too. >> > >> > >> > tim >> > -- >> > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> > Useful random insult:- Paralyzed from the neck up. >> > >> > >> > >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150219/2805cf67/attachment.htm From tim at rowledge.org Thu Feb 19 18:00:27 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 19 18:00:31 2015 Subject: [squeak-dev] [Vm-dev] So who broke bitOr: ? In-Reply-To: References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <09798477-6F42-4348-8A3F-FE4A53811C11@freudenbergs.de> <230D519A-8FF1-4F51-B27A-49B0EF82D5F5@rowledge.org> Message-ID: <2A216E0C-53B4-45B6-BD08-AC787685E3BD@rowledge.org> On 18-02-2015, at 2:47 PM, Bert Freudenberg wrote: > > I meant that quite literally. As in, what's the output of "Smalltalk vmVersion?? Well duh. I was in a hurry, completely misread and mis-answered. English is such a fun language. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Quality assurance: A way to ensure you never deliver shoddy goods accidentally. From tim at rowledge.org Thu Feb 19 22:08:07 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 19 22:08:13 2015 Subject: [squeak-dev] [Vm-dev] So who broke bitOr: ? In-Reply-To: <004EAC9E-5040-49DE-A66D-16CD79094BAF@gmail.com> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <20150219012122.GA68478@shell.msen.com> <004EAC9E-5040-49DE-A66D-16CD79094BAF@gmail.com> Message-ID: <1CED19CA-7CF5-4AFD-95B9-CDA5BBF95E57@rowledge.org> On 18-02-2015, at 7:56 PM, Eliot Miranda wrote: > Mea culpa. In getting 64-bit Sour working I broke Slang and that broke the bit logic primitives. I just committed a working VMMaker.oscog. Fired up a vmmaker image as built by your script, updated to oscog-eem1071. Ran VMMaker generateConfiguration - attempted Squeak Stack VM (for Pi) - Boom! - attempted Squeak Spur Stack VM - seemed to generate ok. So maybe it produces a working spur vm but it doesn?t seem to want to make a non-spur one! The problem with the plain stack vm appears to be to do with CCodeGenerator>sizeOfIntegralCType: which complained about #void. In translating NewObjectMemory>fwdTableInit: the ?sendNode args first? is ?self baseHeaderSize? and the result of - argType := self typeFor: sendNode args first self baseHeaderSize in: aTMethod. is #void. That doesn?t seem quite right though since ObjectMemory>baseHeaderSIze is returning something - though I can?t help noticing that a method ObjectMemory>baseHeaderSize "To support SmartSyntaxPluginCodeGenerator" ^self baseHeaderSize .. somehow looks a touch *odd*. Can?t quite put my finger on it? If I do the obvious and ugly hack of making #baseHeaderSize just return 4, then the codegen completes. I wonder if it will make a working vm? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Klingon Code Warrior:- 6) "Our competitors are without honor!" From tim at rowledge.org Thu Feb 19 23:21:55 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 19 23:22:00 2015 Subject: [squeak-dev] [Vm-dev] So who broke bitOr: ? In-Reply-To: <1CED19CA-7CF5-4AFD-95B9-CDA5BBF95E57@rowledge.org> References: <23F09B3E-2928-4CDF-9B34-1E4C49E85712@rowledge.org> <20150219012122.GA68478@shell.msen.com> <004EAC9E-5040-49DE-A66D-16CD79094BAF@gmail.com> <1CED19CA-7CF5-4AFD-95B9-CDA5BBF95E57@rowledge.org> Message-ID: On 19-02-2015, at 2:08 PM, tim Rowledge wrote: > If I do the obvious and ugly hack of making #baseHeaderSize just return 4, then the codegen completes. I wonder if it will make a working vm? So far, so good. A properly principled solution would clearly be nicer but at least it ain?t in-yer-face broken anymore. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- APRES MOE LE DELUGE - Larry and Curly get wet From juanlists at jvuletich.org Fri Feb 20 01:35:44 2015 From: juanlists at jvuletich.org (J. Vuletich (mail lists)) Date: Fri Feb 20 01:35:47 2015 Subject: [squeak-dev] Incomplete deoptimization of #ifNotNil: and #ifNotNil:ifNil: In-Reply-To: References: Message-ID: <20150220013544.Horde.oxuuY5flKXzp7IjxpYMhQg3@gator3294.hostgator.com> Hi Levente, Thanks for raising this. I don't know how to fix it, but in Cuis, I've just disabled these selectors in #canCascade (#ifNil: too, even if not really needed). I recompiled the system afterwards without error notifications. And I see no real value in this coding style, so I see no downside in just disallowing it. Cheers, Juan Vuletich Quoting Levente Uzonyi : > Hi All, > > There's a bug in the compiler which should be easy to fix for > someone familiar with the code. > The following expression returns #(nil nil true true) instead of > #(nil nil nil nil): > > { > nil > ifNil: [ 1 ] ifNotNil: [ 2 ]; > yourself. > nil > ifNil: [ 1 ]; > yourself. > nil > ifNotNil: [ 2 ]; > yourself. > nil > ifNotNil: [ 2 ] ifNil: [ 1 ]; > yourself. > } > > The cause of the problem is that in case of #ifNotNil: and > #ifNotNil:ifNil: the deoptimization doesn't clear all previously > generated optimized bytecodes. > E.g. in case of #ifNotNil: instead of > > <73> pushConstant: nil > <88> dup > <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 > <76> pushConstant: 1 > <7D> blockReturn > send: ifNotNil: > <87> pop > send: yourself > > we get > > <73> pushConstant: nil > <73> pushConstant: nil > send: == > <88> dup > <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 > <76> pushConstant: 1 > <7D> blockReturn > send: ifNotNil: > <87> pop > send: yourself > > It would be great to write some tests which cover all such cases > (including other methods), but I'm not sure what form is the best > for this. Simple tests which just verify some values? Or something > that checks the generated bytecodes? > > Levente From bert at freudenbergs.de Fri Feb 20 01:50:52 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Feb 20 01:50:57 2015 Subject: [squeak-dev] Incomplete deoptimization of #ifNotNil: and #ifNotNil:ifNil: In-Reply-To: <20150220013544.Horde.oxuuY5flKXzp7IjxpYMhQg3@gator3294.hostgator.com> References: <20150220013544.Horde.oxuuY5flKXzp7IjxpYMhQg3@gator3294.hostgator.com> Message-ID: <21CC5E32-9794-4387-A002-F2346811102A@freudenbergs.de> It looks like Eliot removed the check in 2011. Before that it read: canCascade ^(receiver == NodeSuper or: [special > 0]) not - Bert - > On 19.02.2015, at 17:35, J. Vuletich (mail lists) wrote: > > Hi Levente, > > Thanks for raising this. I don't know how to fix it, but in Cuis, I've just disabled these selectors in #canCascade (#ifNil: too, even if not really needed). I recompiled the system afterwards without error notifications. And I see no real value in this coding style, so I see no downside in just disallowing it. > > Cheers, > Juan Vuletich > > Quoting Levente Uzonyi : > >> Hi All, >> >> There's a bug in the compiler which should be easy to fix for someone familiar with the code. >> The following expression returns #(nil nil true true) instead of #(nil nil nil nil): >> >> { >> nil >> ifNil: [ 1 ] ifNotNil: [ 2 ]; >> yourself. >> nil >> ifNil: [ 1 ]; >> yourself. >> nil >> ifNotNil: [ 2 ]; >> yourself. >> nil >> ifNotNil: [ 2 ] ifNil: [ 1 ]; >> yourself. >> } >> >> The cause of the problem is that in case of #ifNotNil: and #ifNotNil:ifNil: the deoptimization doesn't clear all previously generated optimized bytecodes. >> E.g. in case of #ifNotNil: instead of >> >> <73> pushConstant: nil >> <88> dup >> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >> <76> pushConstant: 1 >> <7D> blockReturn >> send: ifNotNil: >> <87> pop >> send: yourself >> >> we get >> >> <73> pushConstant: nil >> <73> pushConstant: nil >> send: == >> <88> dup >> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >> <76> pushConstant: 1 >> <7D> blockReturn >> send: ifNotNil: >> <87> pop >> send: yourself >> >> It would be great to write some tests which cover all such cases (including other methods), but I'm not sure what form is the best for this. Simple tests which just verify some values? Or something that checks the generated bytecodes? >> >> Levente -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150219/8a635add/smime.bin From commits at source.squeak.org Fri Feb 20 02:26:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 20 02:26:16 2015 Subject: [squeak-dev] The Trunk: Compiler-bf.293.mcz Message-ID: Bert Freudenberg uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-bf.293.mcz ==================== Summary ==================== Name: Compiler-bf.293 Author: bf Time: 19 February 2015, 6:22:49.349 pm UUID: 737af1fb-e8f0-4653-851b-0c1b3ed0f65f Ancestors: Compiler-topa.292 Fix deoptimization of ifNil: etc. =============== Diff against Compiler-topa.292 =============== Item was changed: ParseNode subclass: #MessageNode + instanceVariableNames: 'receiver selector precedence special arguments sizes equalNode caseErrorNode originalReceiver originalSelector originalArguments' - instanceVariableNames: 'receiver selector precedence special arguments sizes equalNode caseErrorNode originalSelector originalArguments' classVariableNames: 'MacroEmitters MacroPrinters MacroSelectors MacroSizers MacroTransformers StdTypers ThenFlag' poolDictionaries: '' category: 'Compiler-ParseNodes'! !MessageNode commentStamp: '' prior: 0! I represent a receiver and its message. Precedence codes: 1 unary 2 binary 3 keyword 4 other If special>0, I compile special code in-line instead of sending messages with literal methods as remotely copied contexts.! Item was changed: + ----- Method: MessageNode>>ensureCanCascade: (in category 'cascading') ----- - ----- Method: MessageNode>>ensureCanCascade: (in category 'testing') ----- ensureCanCascade: encoder - special > 0 ifTrue: [special := 0. + receiver := originalReceiver. selector := encoder encodeSelector: originalSelector. arguments := originalArguments. receiver isBlockNode ifTrue: [receiver deoptimize]. arguments do: [:each| each isBlockNode ifTrue: [each deoptimize]]]! Item was changed: + ----- Method: MessageNode>>receiver:arguments:precedence: (in category 'cascading') ----- - ----- Method: MessageNode>>receiver:arguments:precedence: (in category 'private') ----- receiver: rcvr arguments: args precedence: p receiver := rcvr. + originalReceiver := rcvr copy. arguments := args. originalArguments := arguments copy. sizes := Array new: arguments size. precedence := p! From bert at freudenbergs.de Fri Feb 20 02:34:59 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Feb 20 02:35:07 2015 Subject: [squeak-dev] Incomplete deoptimization of #ifNotNil: and #ifNotNil:ifNil: In-Reply-To: <21CC5E32-9794-4387-A002-F2346811102A@freudenbergs.de> References: <20150220013544.Horde.oxuuY5flKXzp7IjxpYMhQg3@gator3294.hostgator.com> <21CC5E32-9794-4387-A002-F2346811102A@freudenbergs.de> Message-ID: Found the problem. Unlike the other optimizations, optimizing ifNil replaces the original receiver of the MessageNode by {rcvr == nil}. But it is not restored when deoptimizing. We can fix it easily by restoring the original receiver in #ensureCanCascade:. I just did that in Compiler-bf.293. - Bert - On 19.02.2015, at 17:50, Bert Freudenberg wrote: > > It looks like Eliot removed the check in 2011. Before that it read: > > canCascade > ^(receiver == NodeSuper or: [special > 0]) not > > - Bert - > >> On 19.02.2015, at 17:35, J. Vuletich (mail lists) wrote: >> >> Hi Levente, >> >> Thanks for raising this. I don't know how to fix it, but in Cuis, I've just disabled these selectors in #canCascade (#ifNil: too, even if not really needed). I recompiled the system afterwards without error notifications. And I see no real value in this coding style, so I see no downside in just disallowing it. >> >> Cheers, >> Juan Vuletich >> >> Quoting Levente Uzonyi : >> >>> Hi All, >>> >>> There's a bug in the compiler which should be easy to fix for someone familiar with the code. >>> The following expression returns #(nil nil true true) instead of #(nil nil nil nil): >>> >>> { >>> nil >>> ifNil: [ 1 ] ifNotNil: [ 2 ]; >>> yourself. >>> nil >>> ifNil: [ 1 ]; >>> yourself. >>> nil >>> ifNotNil: [ 2 ]; >>> yourself. >>> nil >>> ifNotNil: [ 2 ] ifNil: [ 1 ]; >>> yourself. >>> } >>> >>> The cause of the problem is that in case of #ifNotNil: and #ifNotNil:ifNil: the deoptimization doesn't clear all previously generated optimized bytecodes. >>> E.g. in case of #ifNotNil: instead of >>> >>> <73> pushConstant: nil >>> <88> dup >>> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >>> <76> pushConstant: 1 >>> <7D> blockReturn >>> send: ifNotNil: >>> <87> pop >>> send: yourself >>> >>> we get >>> >>> <73> pushConstant: nil >>> <73> pushConstant: nil >>> send: == >>> <88> dup >>> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >>> <76> pushConstant: 1 >>> <7D> blockReturn >>> send: ifNotNil: >>> <87> pop >>> send: yourself >>> >>> It would be great to write some tests which cover all such cases (including other methods), but I'm not sure what form is the best for this. Simple tests which just verify some values? Or something that checks the generated bytecodes? >>> >>> Levente > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150219/09a6cd76/smime-0001.bin From commits at source.squeak.org Fri Feb 20 02:40:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 20 02:40:25 2015 Subject: [squeak-dev] The Trunk: Compiler-bf.294.mcz Message-ID: Bert Freudenberg uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-bf.294.mcz ==================== Summary ==================== Name: Compiler-bf.294 Author: bf Time: 19 February 2015, 6:40:12.921 pm UUID: 729e0ce5-c7f6-4758-a553-22ba8004be57 Ancestors: Compiler-bf.293 Accidentally changed method category. =============== Diff against Compiler-bf.293 =============== Item was changed: + ----- Method: MessageNode>>receiver:arguments:precedence: (in category 'private') ----- - ----- Method: MessageNode>>receiver:arguments:precedence: (in category 'cascading') ----- receiver: rcvr arguments: args precedence: p receiver := rcvr. originalReceiver := rcvr copy. arguments := args. originalArguments := arguments copy. sizes := Array new: arguments size. precedence := p! From craig at netjam.org Fri Feb 20 09:35:18 2015 From: craig at netjam.org (Craig Latta) Date: Fri Feb 20 09:35:37 2015 Subject: [squeak-dev] re: Please add Robot support tools In-Reply-To: References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: Hi Jon and all-- > I'd really like to see a pared-down version of Squeak that would fit > on the same hardware that MicroPython runs on (a Cortex M4 chip > running at 168 MHz, with 192 KB of RAM and 1 MB of FLASH)... No user > interface beyond a simple REPL. Would there be a network interface? I can make an object memory with a network-based REPL (based on, for example, web services or telnet) that would fit in either the FLASH or RAM. The virtual machine still needs paring, and I would like some pairing on that. :) Currently the VM would take up almost all of the FLASH, but there's still lots that can be left out. http://netjam.org/context/smallest -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From juanlists at jvuletich.org Fri Feb 20 11:35:23 2015 From: juanlists at jvuletich.org (J. Vuletich (mail lists)) Date: Fri Feb 20 11:35:25 2015 Subject: [squeak-dev] Incomplete deoptimization of #ifNotNil: and #ifNotNil:ifNil: In-Reply-To: References: <20150220013544.Horde.oxuuY5flKXzp7IjxpYMhQg3@gator3294.hostgator.com> <21CC5E32-9794-4387-A002-F2346811102A@freudenbergs.de> Message-ID: <20150220113523.Horde.ANxStSGtXbxnvIjgRVaKQQ1@gator3294.hostgator.com> Thanks Bert. Your fix works perfectly and is integrated into Cuis. I removed my previous change, allowing cascading of ifNil again. Cheers, Juan Vuletich Quoting Bert Freudenberg : > Found the problem. Unlike the other optimizations, optimizing ifNil > replaces the original receiver of the MessageNode by {rcvr == nil}. > But it is not restored when deoptimizing. > > We can fix it easily by restoring the original receiver in > #ensureCanCascade:. I just did that in Compiler-bf.293. > > - Bert - > > On 19.02.2015, at 17:50, Bert Freudenberg wrote: >> >> It looks like Eliot removed the check in 2011. Before that it read: >> >> canCascade >> ^(receiver == NodeSuper or: [special > 0]) not >> >> - Bert - >> >>> On 19.02.2015, at 17:35, J. Vuletich (mail lists) >>> wrote: >>> >>> Hi Levente, >>> >>> Thanks for raising this. I don't know how to fix it, but in Cuis, >>> I've just disabled these selectors in #canCascade (#ifNil: too, >>> even if not really needed). I recompiled the system afterwards >>> without error notifications. And I see no real value in this >>> coding style, so I see no downside in just disallowing it. >>> >>> Cheers, >>> Juan Vuletich >>> >>> Quoting Levente Uzonyi : >>> >>>> Hi All, >>>> >>>> There's a bug in the compiler which should be easy to fix for >>>> someone familiar with the code. >>>> The following expression returns #(nil nil true true) instead of >>>> #(nil nil nil nil): >>>> >>>> { >>>> nil >>>> ifNil: [ 1 ] ifNotNil: [ 2 ]; >>>> yourself. >>>> nil >>>> ifNil: [ 1 ]; >>>> yourself. >>>> nil >>>> ifNotNil: [ 2 ]; >>>> yourself. >>>> nil >>>> ifNotNil: [ 2 ] ifNil: [ 1 ]; >>>> yourself. >>>> } >>>> >>>> The cause of the problem is that in case of #ifNotNil: and >>>> #ifNotNil:ifNil: the deoptimization doesn't clear all previously >>>> generated optimized bytecodes. >>>> E.g. in case of #ifNotNil: instead of >>>> >>>> <73> pushConstant: nil >>>> <88> dup >>>> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >>>> <76> pushConstant: 1 >>>> <7D> blockReturn >>>> send: ifNotNil: >>>> <87> pop >>>> send: yourself >>>> >>>> we get >>>> >>>> <73> pushConstant: nil >>>> <73> pushConstant: nil >>>> send: == >>>> <88> dup >>>> <8F 00 00 02> closureNumCopied: 0 numArgs: 0 bytes 33 to 34 >>>> <76> pushConstant: 1 >>>> <7D> blockReturn >>>> send: ifNotNil: >>>> <87> pop >>>> send: yourself >>>> >>>> It would be great to write some tests which cover all such cases >>>> (including other methods), but I'm not sure what form is the best >>>> for this. Simple tests which just verify some values? Or >>>> something that checks the generated bytecodes? >>>> >>>> Levente >> >> >> >> From stephan at stack.nl Fri Feb 20 12:23:35 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Fri Feb 20 12:23:44 2015 Subject: [squeak-dev] Re: Don't forget to Vote .... Server down? In-Reply-To: <03c701d04b06$2e16fd90$8a44f8b0$@usmedrec.com> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> <54E3BD8A.2060203@gmx.net> <03c701d04b06$2e16fd90$8a44f8b0$@usmedrec.com> Message-ID: Still looks down for me from here too. Stephan From jon at huv.com Fri Feb 20 15:10:29 2015 From: jon at huv.com (Jon Hylands) Date: Fri Feb 20 15:10:33 2015 Subject: [squeak-dev] re: Please add Robot support tools In-Reply-To: References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: Craig, That sounds interesting - I had forgotten about Context when I wrote that email. It would be better if the REPL could be done through either a hardware serial port, or the USB/serial interface. To add networking is doable, but requires additional hardware modules. The tricky part in all this, once you have the VM and image actually running, is to interface with all the hardware capabilities of the chip. MicroPython uses a uSD card (which is mounted as a flash drive on the host PC via composite USB) to store source files - they are compiled on demand from source when you boot the chip. - Jon On Fri, Feb 20, 2015 at 4:35 AM, Craig Latta wrote: > > Hi Jon and all-- > > > I'd really like to see a pared-down version of Squeak that would fit > > on the same hardware that MicroPython runs on (a Cortex M4 chip > > running at 168 MHz, with 192 KB of RAM and 1 MB of FLASH)... No user > > interface beyond a simple REPL. > > Would there be a network interface? I can make an object memory > with a network-based REPL (based on, for example, web services or > telnet) that would fit in either the FLASH or RAM. The virtual machine > still needs paring, and I would like some pairing on that. :) Currently > the VM would take up almost all of the FLASH, but there's still lots > that can be left out. > > http://netjam.org/context/smallest > > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150220/c612ebd1/attachment.htm From craig at netjam.org Fri Feb 20 20:11:35 2015 From: craig at netjam.org (Craig Latta) Date: Fri Feb 20 20:11:42 2015 Subject: [squeak-dev] re: Please add Robot support tools In-Reply-To: References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: > It would be better if the REPL could be done through either a hardware > serial port, or the USB/serial interface. Cool, I've supported hardware serial ports, too. I think USB would be straightforward, but I haven't done it before. > The tricky part in all this, once you have the VM and image actually > running, is to interface with all the hardware capabilities of the > chip. How are they accessible? -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From jon at huv.com Sat Feb 21 02:56:01 2015 From: jon at huv.com (Jon Hylands) Date: Sat Feb 21 02:56:04 2015 Subject: [squeak-dev] re: Please add Robot support tools In-Reply-To: References: <54E31B72.8040505@gmx.net> <0B4625A4-CCEF-4A3B-94FE-424E615FBFE7@rowledge.org> <698858C2-1820-4161-84A8-6551B1209803@gmail.com> Message-ID: With MicroPython, they use a C library called HAL to access it - I'm not sure of all the details, but I could find out. USB is basically just like a hardware serial port I think, so it shouldn't be hard. - Jon On Fri, Feb 20, 2015 at 3:11 PM, Craig Latta wrote: > > > It would be better if the REPL could be done through either a hardware > > serial port, or the USB/serial interface. > > Cool, I've supported hardware serial ports, too. I think USB would > be straightforward, but I haven't done it before. > > > The tricky part in all this, once you have the VM and image actually > > running, is to interface with all the hardware capabilities of the > > chip. > > How are they accessible? > > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150220/e79589e3/attachment.htm From ron at usmedrec.com Sat Feb 21 04:16:46 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Feb 21 04:17:26 2015 Subject: [squeak-dev] Don't forget to Vote In-Reply-To: <54E486C2.6060500@gmail.com> References: <02b501d04acd$80b808c0$82281a40$@usmedrec.com> <54E486C2.6060500@gmail.com> Message-ID: <01c001d04d8d$35b2eb70$a118c250$@usmedrec.com> Hi Casimiro, Your email has been resent. Please check your email. All the best, Ron Teitelbaum From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Casimiro de Almeida Barreto Sent: Wednesday, February 18, 2015 7:34 AM To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] Don't forget to Vote Didn't receive the email... voted last year... Best regards, Casimiro Barreto On 17-02-2015 14:19, Ron Teitelbaum wrote: Hi All, Just a reminder to everyone that received a ballot for the 2015 Squeak Oversight Board. Please look for an email from an andru@cs.cornell.edu Subject: Poll: Squeak Oversight Board 2015 Sent on Monday Feb 16, 2015. Follow the link and vote. Thanks! Ron Teitelbaum -- The information contained in this message is confidential and intended to the recipients specified in the headers. If you received this message by error, notify the sender immediately. The unauthorized use, disclosure, copy or alteration of this message are strictly forbidden and subjected to civil and criminal sanctions. == This email may be signed using PGP key ID: 1455478743A83CC3 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150220/a82f3c03/attachment.htm From ron at usmedrec.com Sat Feb 21 04:30:34 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Feb 21 04:31:12 2015 Subject: [squeak-dev] Ok Now Go vote! Message-ID: <01ca01d04d8f$22e21b90$68a652b0$@usmedrec.com> Hi Everyone, If you voted on Tuesday Feb 17th 2015 when the voting server went down please go and vote again. Your vote may be recorded but if the system lets you vote then your vote was lost. Anyone that has not voted yet, what are you waiting for? The voting system is back up and running and waiting for you to go vote! I've considered extending the election but I'm not sure it needs to be done. If anyone objects we can extend the election for 3 days. Hearing no objections the vote will end on schedule on: Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. Sorry for the issue but a big thank you to Andrew for the software and for getting it up and running again after the crash! Don't forget to vote! All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150220/8544b324/attachment.htm From herbertkoenig at gmx.net Sat Feb 21 07:02:50 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Sat Feb 21 07:02:53 2015 Subject: [squeak-dev] Ok Now Go vote! In-Reply-To: <01ca01d04d8f$22e21b90$68a652b0$@usmedrec.com> References: <01ca01d04d8f$22e21b90$68a652b0$@usmedrec.com> Message-ID: <54E82D9A.7040702@gmx.net> Voted, it worked. Cheers, Herbert Am 21.02.2015 um 05:30 schrieb Ron Teitelbaum: > > Hi Everyone, > > If you voted on Tuesday Feb 17^th 2015 when the voting server went > down please go and vote again. Your vote may be recorded but if the > system lets you vote then your vote was lost. > > Anyone that has not voted yet, what are you waiting for? The voting > system is back up and running and waiting for you to go vote! > > I?ve considered extending the election but I?m not sure it needs to be > done. If anyone objects we can extend the election for 3 days. > Hearing no objections the vote will end on schedule on: > > Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > > Sorry for the issue but a big thank you to Andrew for the software and > for getting it up and running again after the crash! > > Don?t forget to vote! > > All the best, > > Ron Teitelbaum > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150221/09e2a21e/attachment.htm From unoduetre at poczta.onet.pl Sat Feb 21 15:47:28 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Sat Feb 21 14:58:21 2015 Subject: [SPAM] [squeak-dev] Ok Now Go vote! In-Reply-To: <01ca01d04d8f$22e21b90$68a652b0$@usmedrec.com> (from ron@usmedrec.com on Sat Feb 21 05:30:34 2015) References: <01ca01d04d8f$22e21b90$68a652b0$@usmedrec.com> Message-ID: <1424533648.1516.1@mglap> I've voted. :-) From tim at rowledge.org Sun Feb 22 18:48:44 2015 From: tim at rowledge.org (tim Rowledge) Date: Sun Feb 22 18:48:49 2015 Subject: [squeak-dev] recording sound on *nix via ALSA libs Message-ID: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> I?m attempting to hook up the scratch sound recording on Pi; which amongst other things requires setting up add-on hardware that may or may not work, be comprehendable, or even taste of the correct chocolate . Before I get too lost in trying to work out why things don?t work I would love to know if anyone has been able to use ALSA libs to record on any machine/*nix version/hardware? Just knowing a workable configuration exists would be helpful. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: AII: Add Insult to Injury From tom.b.rushworth at gmail.com Sun Feb 22 18:57:58 2015 From: tom.b.rushworth at gmail.com (Tom Rushworth) Date: Sun Feb 22 18:57:51 2015 Subject: [squeak-dev] recording sound on *nix via ALSA libs In-Reply-To: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> References: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> Message-ID: <54EA26B6.3010005@gmail.com> The folks on the ALSA users mailing list are usually pretty helpful: https://lists.sourceforge.net/lists/listinfo/alsa-user On 15-02-22 10:48 , tim Rowledge wrote: > I?m attempting to hook up the scratch sound recording on Pi; which amongst other things requires setting up add-on hardware that may or may not work, be comprehendable, or even taste of the correct chocolate . > > Before I get too lost in trying to work out why things don?t work I would love to know if anyone has been able to use ALSA libs to record on any machine/*nix version/hardware? Just knowing a workable configuration exists would be helpful. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: AII: Add Insult to Injury I'll get right on the insult as soon as I finish the injury :). Regards, -- Tom Rushworth From lewis at mail.msen.com Sun Feb 22 20:27:32 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Feb 22 20:27:35 2015 Subject: [squeak-dev] recording sound on *nix via ALSA libs In-Reply-To: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> References: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> Message-ID: <20150222202732.GA41775@shell.msen.com> On Sun, Feb 22, 2015 at 10:48:44AM -0800, tim Rowledge wrote: > I?m attempting to hook up the scratch sound recording on Pi; which amongst other things requires setting up add-on hardware that may or may not work, be comprehendable, or even taste of the correct chocolate . > > Before I get too lost in trying to work out why things don?t work I would love to know if anyone has been able to use ALSA libs to record on any machine/*nix version/hardware? Just knowing a workable configuration exists would be helpful. > On a trunk image, if I enable the shared flaps, then drag a "Sound" morph from the Widgets flap, I can record and play awful sounding things with an interpreter VM running whatever it gets hooked up to on my Ubuntu box. If I specify -vm-sound-pulse, I get fairly good audio quality. If I specify -vm-sound-ALSA, I get a primitive failure with this error on the VM console: sound_StartRecording: snd_add_pcm_handler: Function not implemented If I use a precompiled interpreter VM or Cog VM on my system, and specify -vm-sound-ALSA, I get this error on the VM console: ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default start_SoundRecording: snd_pcm_open: No such file or directory The primitive failure is for primitiveSoundStartRecording in the SoundPlugin. I think that the ALSA support code is out of date with respect to the libraries provided in current Linux distributions. There are several issues related to ALSA on bugs.squeak.org. This one looks like the issue I am seeing, and may give you an idea of what needs to be done: http://bugs.squeak.org/view.php?id=7328 Dave From commits at source.squeak.org Mon Feb 23 01:24:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 23 01:24:55 2015 Subject: [squeak-dev] The Trunk: Compiler.spur-bf.293.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler.spur-bf.293.mcz ==================== Summary ==================== Name: Compiler.spur-bf.293 Author: eem Time: 22 February 2015, 5:24:34.483 pm UUID: 106ba5b5-093c-46bc-8f23-3c1a26aaaf41 Ancestors: Compiler-bf.293, Compiler.spur-topa.292 Compiler-bf.293 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Fix deoptimization of ifNil: etc. =============== Diff against Compiler-bf.293 =============== Item was changed: ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex + numArgs > 15 ifTrue: + [^self error: 'Cannot compile -- too many arguments']. + numTemps > 63 ifTrue: + [^self error: 'Cannot compile -- too many temporary variables']. + numLits > 65535 ifTrue: + [^self error: 'Cannot compile -- too many literals']. + ^(CompiledMethod headerFlagForEncoder: self) + + (numArgs bitShift: 24) + + (numTemps bitShift: 18) + "+ (largeBit bitShift: 17)" "largeBit gets filled in later" + + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + + numLits! - "Compute the compiled method header that encodes the arguments - in the receiver's header format (see CompiledMehtod's class comment)." - self subclassResponsibility! Item was removed: - ----- Method: EncoderForV3>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- - computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex - | primBits | - numTemps > 63 ifTrue: - [^self error: 'Cannot compile -- too many temporary variables']. - numLits > 255 ifTrue: - [^self error: 'Cannot compile -- too many literals']. - primBits := primitiveIndex <= 16r1FF - ifTrue: [primitiveIndex] - ifFalse: "For now the high bit of primitive no. is in the 29th bit of header" - [primitiveIndex > 16r3FF ifTrue: [self error: 'prim num too large']. - (primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r200) bitShift: 19)]. - ^(numArgs bitShift: 24) - + (numTemps bitShift: 18) - "+ (largeBit bitShift: 17)" "largeBit gets filled in later" - + (numLits bitShift: 9) - + primBits! Item was changed: ----- Method: EncoderForV3PlusClosures class>>bytecodeSize: (in category 'instruction stream support') ----- bytecodeSize: bytecode "Answer the number of bytes in the bytecode." bytecode <= 125 ifTrue: [^1]. bytecode >= 176 ifTrue: [^1]. bytecode >= 160 ifTrue: "long jumps" [^2]. bytecode >= 144 ifTrue: "short jumps" [^1]. "extensions" bytecode >= 128 ifTrue: + [^#(2 2 2 2 3 2 2 1 1 1 2 3 3 3 3 4) at: bytecode - 127]. - [^#(2 2 2 2 3 2 2 1 1 1 2 nil 3 3 3 4) at: bytecode - 127]. ^nil! Item was added: + ----- Method: EncoderForV3PlusClosures class>>callPrimitiveCode (in category 'bytecode decoding') ----- + callPrimitiveCode + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + ^139! Item was added: + ----- Method: EncoderForV3PlusClosures>>genCallPrimitive: (in category 'bytecode generation') ----- + genCallPrimitive: primitiveIndex + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + (primitiveIndex < 1 or: [primitiveIndex > 65535]) ifTrue: + [self outOfRangeError: 'primitive index' index: primitiveIndex range: 1 to: 65535]. + stream + nextPut: 139; + nextPut: (primitiveIndex bitAnd: 255); + nextPut: (primitiveIndex bitShift: -8)! Item was changed: ----- Method: MethodNode>>generate:using: (in category 'code generation') ----- generate: trailer using: aCompiledMethodClass "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass. The argument, trailer, is arbitrary but is typically either the reference to the source code that is stored with every CompiledMethod, or an encoding of the method's temporary names." + | primErrNode blkSize nLits locals literals stack header method | - | primErrNode blkSize nLits literals stack method | self generate: trailer using: aCompiledMethodClass ifQuick: [:m | encoder noteBlockExtent: (0 to: 2) hasLocals: arguments. m literalAt: 2 put: encoder associationForClass; properties: properties. ^m]. primErrNode := self primitiveErrorVariableName ifNotNil: [encoder fixTemp: self primitiveErrorVariableName]. + self ensureClosureAnalysisDone. + encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:" - encoder supportsClosureOpcodes ifTrue: - [self ensureClosureAnalysisDone. - encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:"]. blkSize := (block sizeCodeForEvaluatedValue: encoder) + + (primitive > 0 + ifTrue: [encoder sizeCallPrimitive: primitive] + ifFalse: [0]) + (primErrNode ifNil: [0] ifNotNil: [primErrNode index: arguments size + temporaries size; sizeCodeForStore: encoder "The VM relies on storeIntoTemp: (129)"]). + locals := arguments, temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]). + encoder noteBlockExtent: block blockExtent hasLocals: locals. + header := encoder computeMethodHeaderForNumArgs: arguments size + numTemps: locals size + numLits: (nLits := (literals := encoder allLiterals) size) + primitive: primitive. + method := trailer + createMethod: blkSize + class: aCompiledMethodClass + header: header. - method := aCompiledMethodClass - newBytes: blkSize - trailerBytes: trailer - nArgs: arguments size - nTemps: (encoder supportsClosureOpcodes - ifTrue: [| locals | - locals := arguments, - temporaries, - (primErrNode - ifNil: [#()] - ifNotNil: [{primErrNode}]). - encoder - noteBlockExtent: block blockExtent - hasLocals: locals. - locals size] - ifFalse: [encoder maxTemp]) - nStack: 0 - nLits: (nLits := (literals := encoder allLiterals) size) - primitive: primitive. - nLits > 255 ifTrue: - [^self error: 'Too many literals referenced']. 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)]. encoder streamToMethod: method. stack := ParseStack new init. + primitive > 0 ifTrue: + [encoder genCallPrimitive: primitive. + primErrNode ifNotNil: + [primErrNode emitCodeForStore: stack encoder: encoder]]. - primErrNode ifNotNil: [primErrNode emitCodeForStore: stack encoder: encoder]. stack position: method numTemps. [block emitCodeForEvaluatedValue: stack encoder: encoder] on: Error "If an attempt is made to write too much code the method will be asked" do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:" ex signalerContext sender method = (CompiledMethod class>>#new:) ifTrue: [^self error: 'Compiler code size discrepancy'] ifFalse: [ex pass]]. stack position ~= (method numTemps + 1) ifTrue: [^self error: 'Compiler stack discrepancy']. encoder methodStreamPosition ~= (method size - trailer size) ifTrue: [^self error: 'Compiler code size discrepancy']. method needsFrameSize: stack size - method numTemps. method properties: properties. ^method! From commits at source.squeak.org Mon Feb 23 01:25:11 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Feb 23 01:25:13 2015 Subject: [squeak-dev] The Trunk: Compiler.spur-bf.294.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler.spur-bf.294.mcz ==================== Summary ==================== Name: Compiler.spur-bf.294 Author: eem Time: 22 February 2015, 5:24:35.514 pm UUID: b10f34e0-1de1-41f6-8e1c-9d160807637a Ancestors: Compiler-bf.294, Compiler.spur-bf.293 Compiler-bf.294 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Accidentally changed method category. =============== Diff against Compiler-bf.294 =============== Item was changed: ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex + numArgs > 15 ifTrue: + [^self error: 'Cannot compile -- too many arguments']. + numTemps > 63 ifTrue: + [^self error: 'Cannot compile -- too many temporary variables']. + numLits > 65535 ifTrue: + [^self error: 'Cannot compile -- too many literals']. + ^(CompiledMethod headerFlagForEncoder: self) + + (numArgs bitShift: 24) + + (numTemps bitShift: 18) + "+ (largeBit bitShift: 17)" "largeBit gets filled in later" + + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + + numLits! - "Compute the compiled method header that encodes the arguments - in the receiver's header format (see CompiledMehtod's class comment)." - self subclassResponsibility! Item was removed: - ----- Method: EncoderForV3>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- - computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex - | primBits | - numTemps > 63 ifTrue: - [^self error: 'Cannot compile -- too many temporary variables']. - numLits > 255 ifTrue: - [^self error: 'Cannot compile -- too many literals']. - primBits := primitiveIndex <= 16r1FF - ifTrue: [primitiveIndex] - ifFalse: "For now the high bit of primitive no. is in the 29th bit of header" - [primitiveIndex > 16r3FF ifTrue: [self error: 'prim num too large']. - (primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r200) bitShift: 19)]. - ^(numArgs bitShift: 24) - + (numTemps bitShift: 18) - "+ (largeBit bitShift: 17)" "largeBit gets filled in later" - + (numLits bitShift: 9) - + primBits! Item was changed: ----- Method: EncoderForV3PlusClosures class>>bytecodeSize: (in category 'instruction stream support') ----- bytecodeSize: bytecode "Answer the number of bytes in the bytecode." bytecode <= 125 ifTrue: [^1]. bytecode >= 176 ifTrue: [^1]. bytecode >= 160 ifTrue: "long jumps" [^2]. bytecode >= 144 ifTrue: "short jumps" [^1]. "extensions" bytecode >= 128 ifTrue: + [^#(2 2 2 2 3 2 2 1 1 1 2 3 3 3 3 4) at: bytecode - 127]. - [^#(2 2 2 2 3 2 2 1 1 1 2 nil 3 3 3 4) at: bytecode - 127]. ^nil! Item was added: + ----- Method: EncoderForV3PlusClosures class>>callPrimitiveCode (in category 'bytecode decoding') ----- + callPrimitiveCode + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + ^139! Item was added: + ----- Method: EncoderForV3PlusClosures>>genCallPrimitive: (in category 'bytecode generation') ----- + genCallPrimitive: primitiveIndex + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + (primitiveIndex < 1 or: [primitiveIndex > 65535]) ifTrue: + [self outOfRangeError: 'primitive index' index: primitiveIndex range: 1 to: 65535]. + stream + nextPut: 139; + nextPut: (primitiveIndex bitAnd: 255); + nextPut: (primitiveIndex bitShift: -8)! Item was changed: ----- Method: MethodNode>>generate:using: (in category 'code generation') ----- generate: trailer using: aCompiledMethodClass "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass. The argument, trailer, is arbitrary but is typically either the reference to the source code that is stored with every CompiledMethod, or an encoding of the method's temporary names." + | primErrNode blkSize nLits locals literals stack header method | - | primErrNode blkSize nLits literals stack method | self generate: trailer using: aCompiledMethodClass ifQuick: [:m | encoder noteBlockExtent: (0 to: 2) hasLocals: arguments. m literalAt: 2 put: encoder associationForClass; properties: properties. ^m]. primErrNode := self primitiveErrorVariableName ifNotNil: [encoder fixTemp: self primitiveErrorVariableName]. + self ensureClosureAnalysisDone. + encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:" - encoder supportsClosureOpcodes ifTrue: - [self ensureClosureAnalysisDone. - encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:"]. blkSize := (block sizeCodeForEvaluatedValue: encoder) + + (primitive > 0 + ifTrue: [encoder sizeCallPrimitive: primitive] + ifFalse: [0]) + (primErrNode ifNil: [0] ifNotNil: [primErrNode index: arguments size + temporaries size; sizeCodeForStore: encoder "The VM relies on storeIntoTemp: (129)"]). + locals := arguments, temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]). + encoder noteBlockExtent: block blockExtent hasLocals: locals. + header := encoder computeMethodHeaderForNumArgs: arguments size + numTemps: locals size + numLits: (nLits := (literals := encoder allLiterals) size) + primitive: primitive. + method := trailer + createMethod: blkSize + class: aCompiledMethodClass + header: header. - method := aCompiledMethodClass - newBytes: blkSize - trailerBytes: trailer - nArgs: arguments size - nTemps: (encoder supportsClosureOpcodes - ifTrue: [| locals | - locals := arguments, - temporaries, - (primErrNode - ifNil: [#()] - ifNotNil: [{primErrNode}]). - encoder - noteBlockExtent: block blockExtent - hasLocals: locals. - locals size] - ifFalse: [encoder maxTemp]) - nStack: 0 - nLits: (nLits := (literals := encoder allLiterals) size) - primitive: primitive. - nLits > 255 ifTrue: - [^self error: 'Too many literals referenced']. 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)]. encoder streamToMethod: method. stack := ParseStack new init. + primitive > 0 ifTrue: + [encoder genCallPrimitive: primitive. + primErrNode ifNotNil: + [primErrNode emitCodeForStore: stack encoder: encoder]]. - primErrNode ifNotNil: [primErrNode emitCodeForStore: stack encoder: encoder]. stack position: method numTemps. [block emitCodeForEvaluatedValue: stack encoder: encoder] on: Error "If an attempt is made to write too much code the method will be asked" do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:" ex signalerContext sender method = (CompiledMethod class>>#new:) ifTrue: [^self error: 'Compiler code size discrepancy'] ifFalse: [ex pass]]. stack position ~= (method numTemps + 1) ifTrue: [^self error: 'Compiler stack discrepancy']. encoder methodStreamPosition ~= (method size - trailer size) ifTrue: [^self error: 'Compiler code size discrepancy']. method needsFrameSize: stack size - method numTemps. method properties: properties. ^method! From eliot.miranda at gmail.com Mon Feb 23 15:36:12 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 23 15:36:19 2015 Subject: [squeak-dev] Re: [Pharo-dev] Determine if a method is Jitted or not In-Reply-To: References: Message-ID: <01229F10-412B-4E74-844F-522A5B03ADA9@gmail.com> Hi Thierry, there's an unadvertised primitive called Context>>#xRay (or ContextPart>>#xRay) that answers these questions for tests. I'm away from the system right now but I'll get you the source soon. Also, the limit on jutting methods, 60 literals, is a default. There's a command line option -maxcoglits (IIRC) that you can change. Eliot (phone) On Feb 23, 2015, at 5:05 AM, Thierry Goubier wrote: > Hi All, > > anybody knows how to check if a method is jitted or not? > > I remember (maybe wrongly) that the Jit in Cog has a configurable limit on the number of bytecodes for a method to be jitted or not; I'm looking into the performance of generated code where I can, more or less, control the length of methods (SmaCC) and I'd like to find the optimum point. > > Thanks, > > Thierry From eliot.miranda at gmail.com Mon Feb 23 17:07:16 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Feb 23 17:07:24 2015 Subject: [squeak-dev] Re: [Pharo-dev] Determine if a method is Jitted or not In-Reply-To: References: <01229F10-412B-4E74-844F-522A5B03ADA9@gmail.com> Message-ID: On Feb 23, 2015, at 7:50 AM, Thierry Goubier wrote: > > > 2015-02-23 16:36 GMT+01:00 Eliot Miranda : >> Hi Thierry, >> >> there's an unadvertised primitive called Context>>#xRay (or ContextPart>>#xRay) that answers these questions for tests. I'm away from the system right now but I'll get you the source soon. Also, the limit on jutting methods, 60 literals, is a default. There's a command line option -maxcoglits (IIRC) that you can change. > > Thanks Eliot! > > It's helping a lot to guide me, even if I have to work at the ast level and, as a result, I estimate the number of literals in the bytecode by counting the number of literal nodes in the AST, with the approximation that ~100 literal nodes will make it under the limit. > > Making it under the limit shaves 30% of the execution time of a parse with SmaCC. And it avoids the too long methods as a side benefit. > > I would dream of having precise ways of estimating things like that on the AST. It's interesting to hit those "I'd like to be able to predict the performance of that piece of code" issues. Alas two things other than the AST affect the number of literals. First is the specialSelectors; these are used for sends only. So if a method only sends one of the special selectors the selector will not occur in the method as a literal. Second is the bytecode set. While we only have one set now, Sista is introducing another, and Newspeak has its own. In the current set, -1, 0, 1 & 2 and true and false have bytecodes to push these literals, so they don't occur as literals in methods. In both the Sista and the Newspeak sets there are bytecodes that encode a much wider range of integers and characters as bytecodes (a push literal bytecode takes 1 byte for the bytecode and 4 or 8 bytes for the literal; a bytecode for the 16-bit integer range takes 3 bytes). Another thing that affects the number of literals is the compiler's decision to include selectors for optimized methods such as ifTrue: et al (which I think is a very good thing). If you could ask the back end which literal would be encoded as a literal (and if course the question is asked when bytecode is generated) you could get a more accurate count. HTH > > Thierry > >> >> Eliot (phone) >> >> On Feb 23, 2015, at 5:05 AM, Thierry Goubier wrote: >> >> > Hi All, >> > >> > anybody knows how to check if a method is jitted or not? >> > >> > I remember (maybe wrongly) that the Jit in Cog has a configurable limit on the number of bytecodes for a method to be jitted or not; I'm looking into the performance of generated code where I can, more or less, control the length of methods (SmaCC) and I'd like to find the optimum point. >> > >> > Thanks, >> > >> > Thierry > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150223/d743ee40/attachment-0001.htm From tim at rowledge.org Mon Feb 23 18:30:28 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Feb 23 18:30:33 2015 Subject: [squeak-dev] recording sound on *nix via ALSA libs In-Reply-To: <20150222202732.GA41775@shell.msen.com> References: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> <20150222202732.GA41775@shell.msen.com> Message-ID: Thanks for trying that out Dave; it looks like at least I?m not getting any different errors, so that?s ? good? ALSA really does seem to be a major cause of pain and gnashing of teeth. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- She doesn't suffer from insanity; she enjoys every minute of it. From herbertkoenig at gmx.net Mon Feb 23 19:27:42 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Mon Feb 23 19:28:07 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process In-Reply-To: <54D8C651.7010001@gmx.net> References: <54D64734.1030003@gmx.net> <54D65D93.4070906@gmx.net> <20150208200431.GA59498@shell.msen.com> <54D8C651.7010001@gmx.net> Message-ID: <54EB7F2E.5090702@gmx.net> Hi, just a short follow up. Am 09.02.2015 um 15:38 schrieb Herbert K?nig: > Hi David, > Am 08.02.2015 um 21:04 schrieb David T. Lewis: >> This looks like some kind of problem in OSProcess. I am not sure what >> is wrong, so let me try to explain how it works. several updates of Raspbian later I do not need to send sigchld any more. So I assume it was a bug in Raspbian introduced by the transition to the Pi 2. Nothing to do with OSProcess. Also I now use the version of OSProcess which limits the number of children it holds on to. This has run uninterrupted now for two weeks without a single more Zombie and Squeak's memory consumption being constant. Thanks, Herbert From ron at usmedrec.com Mon Feb 23 23:49:08 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Feb 23 23:49:28 2015 Subject: [squeak-dev] Vote now or forever hold your piece Message-ID: <001401d04fc3$51455660$f3d00320$@usmedrec.com> Hi All, Can you believe it is Monday already. If you have been waiting to vote for the Squeak Oversight Board but figured you would wait until the very last minute, you succeeded. If you figured you would wait until others voted so that you can vote like they did, I have no idea how that works since the results will be released tomorrow. Whatever your reason for waiting please don't wait any more. Go vote. Please look for an email from an andru@cs.cornell.edu Subject: Poll: Squeak Oversight Board 2015 Sent on Monday Feb 16, 2015. You have until: Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150223/f0c47891/attachment.htm From lewis at mail.msen.com Tue Feb 24 00:06:00 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 24 00:06:02 2015 Subject: [squeak-dev] Starting processes from Squeak makes Raspbian unwilling to start another process In-Reply-To: <54EB7F2E.5090702@gmx.net> References: <54D64734.1030003@gmx.net> <54D65D93.4070906@gmx.net> <20150208200431.GA59498@shell.msen.com> <54D8C651.7010001@gmx.net> <54EB7F2E.5090702@gmx.net> Message-ID: <20150224000600.GA31385@shell.msen.com> On Mon, Feb 23, 2015 at 08:27:42PM +0100, Herbert K?nig wrote: > Hi, > > just a short follow up. Hi Herbert, Thank you for the follow up message, much appreciated! Dave > > Am 09.02.2015 um 15:38 schrieb Herbert K?nig: > >Hi David, > >Am 08.02.2015 um 21:04 schrieb David T. Lewis: > >>This looks like some kind of problem in OSProcess. I am not sure what > >>is wrong, so let me try to explain how it works. > > several updates of Raspbian later I do not need to send sigchld any > more. So I assume it was a bug in Raspbian introduced by the transition > to the Pi 2. Nothing to do with OSProcess. > > Also I now use the version of OSProcess which limits the number of > children it holds on to. > > This has run uninterrupted now for two weeks without a single more > Zombie and Squeak's memory consumption being constant. > > Thanks, > > Herbert From casey.obrien.r at gmail.com Tue Feb 24 01:46:15 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Tue Feb 24 01:46:24 2015 Subject: [squeak-dev] Vote now or forever hold your piece In-Reply-To: <001401d04fc3$51455660$f3d00320$@usmedrec.com> References: <001401d04fc3$51455660$f3d00320$@usmedrec.com> Message-ID: <1F8DE7D5-FB39-49EA-B5BB-D912F5FC95AB@gmail.com> s/piece/peace And also peace. May I recommend voting for *everyone* who isn't me. The other contenders, in my view, will make an excellent body of leadership for our community. They're all amazing by themselves. Together, we're talking Voltron-level awesome. I am _humbled_ to have had the opportunity to run against such good people. Yours, --C > On Feb 23, 2015, at 3:49 PM, "Ron Teitelbaum" wrote: > > Hi All, > > Can you believe it is Monday already. If you have been waiting to vote for the Squeak Oversight Board but figured you would wait until the very last minute, you succeeded. If you figured you would wait until others voted so that you can vote like they did, I have no idea how that works since the results will be released tomorrow. Whatever your reason for waiting please don?t wait any more. Go vote. > > Please look for an email from an andru@cs.cornell.edu > > Subject: Poll: Squeak Oversight Board 2015 > > Sent on Monday Feb 16, 2015. > > You have until: > Tuesday 24th of February 2015 6PM (23.00 UTC): Online election ends. > All the best, > > Ron Teitelbaum > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150223/84bc4134/attachment.htm From bert at freudenbergs.de Tue Feb 24 03:25:28 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 24 03:25:34 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <20150220235528.GA20595@shell.msen.com> Message-ID: (moving to squeak-dev) > On 22.02.2015, at 14:40, Chris Muller wrote: > >>>> Some people like this preference a lot. Others think it is horrible. >>> >>> This implmenentation is not the best. The one in E/OCompletion is better. >> >> I love the feature (in other editors), but hate its current behavior. If that one is better, why don't we use that? > > This preference is part of the low-level interface which affects the > overall fidelity of the Squeak user-experience. If we are going to > make any changes to this, may we please start it out in the Inbox The onus is actually on whoever enabled this feature by default before it was mature, IMNSHO. Until we fix it properly (see below) we need to turn it off. > where we can all try it and discuss it in more objective terms than > "love", "hate", "better" and "horrible"? "Horrible" is a technically accurate description in this case ;) Because it interferes with the user's wishes. It gets in the way unless you consciously anticipate how it's going to mess with what you type. And it doesn't have to, as other editors clearly demonstrate. If I am blindly typing (foo) I expect to end up with (foo) In current Squeak I end up with (foo)) which is clearly wrong and extremely annoying and makes me hate the feature. For an editor that gets it right, try ACE online ( http://ace.c9.io/ ). If an editor does auto-insertion, it *must* keep track of that and anticipate the user typing the corresponding characters. E.g. in ACE I can type [('foo and get [('foo')] but then I can proceed to type ')] end it will just skip over the auto-inserted part. Similarly in Squeak when typing [(2)+(3)] it results in [(2)+(3)]))] but in ACE it gets me [(2)+(3)] which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. So, as others have pointed out, it's not that we don't want the editor to be helpful, it is a very useful feature, but it must be mindful of what the user wants. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150223/0c5837c3/smime.bin From marcus.denker at inria.fr Tue Feb 24 07:10:53 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Tue Feb 24 07:10:56 2015 Subject: [squeak-dev] Re: [Pharo-dev] Determine if a method is Jitted or not In-Reply-To: References: <01229F10-412B-4E74-844F-522A5B03ADA9@gmail.com> Message-ID: > On 23 Feb 2015, at 18:07, Eliot Miranda wrote: > > On Feb 23, 2015, at 7:50 AM, Thierry Goubier > wrote: > >> >> >> 2015-02-23 16:36 GMT+01:00 Eliot Miranda >: >> Hi Thierry, >> >> there's an unadvertised primitive called Context>>#xRay (or ContextPart>>#xRay) that answers these questions for tests. I'm away from the system right now but I'll get you the source soon. Also, the limit on jutting methods, 60 literals, is a default. There's a command line option -maxcoglits (IIRC) that you can change. >> >> Thanks Eliot! >> >> It's helping a lot to guide me, even if I have to work at the ast level and, as a result, I estimate the number of literals in the bytecode by counting the number of literal nodes in the AST, with the approximation that ~100 literal nodes will make it under the limit. >> >> Making it under the limit shaves 30% of the execution time of a parse with SmaCC. And it avoids the too long methods as a side benefit. >> >> I would dream of having precise ways of estimating things like that on the AST. It's interesting to hit those "I'd like to be able to predict the performance of that piece of code" issues. > > Alas two things other than the AST affect the number of literals. First is the specialSelectors; these are used for sends only. So if a method only sends one of the special selectors the selector will not occur in the method as a literal. Second is the bytecode set. While we only have one set now, Sista is introducing another, and Newspeak has its own. In the current set, -1, 0, 1 & 2 and true and false have bytecodes to push these literals, so they don't occur as literals in methods. In both the Sista and the Newspeak sets there are bytecodes that encode a much wider range of integers and characters as bytecodes (a push literal bytecode takes 1 byte for the bytecode and 4 or 8 bytes for the literal; a bytecode for the 16-bit integer range takes 3 bytes). > > Another thing that affects the number of literals is the compiler's decision to include selectors for optimized methods such as ifTrue: et al (which I think is a very good thing). > > If you could ask the back end which literal would be encoded as a literal (and if course the question is asked when bytecode is generated) you could get a more accurate count. > Another thing that we use the literal array for is (will be) meta object? if you annotate an AST node or variable with a MetaLink, it stores that in the literal array. For example: link := MetaLink new metaObject: Halt; selector: #now. then installing this on some AST node (or Slot) will lead to bytecode like ... pushLiteral: Halt send: #now ... This means that the meta object is stored in the literal frame of the compiledMethod (the Link itself is just an annotation on the structural element). Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/7f554365/attachment.htm From commits at source.squeak.org Tue Feb 24 08:13:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 24 08:13:02 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.758.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.758.mcz ==================== Summary ==================== Name: Morphic-mt.758 Author: mt Time: 24 February 2015, 9:12:34.081 am UUID: ff6992c3-f93d-a444-a7c4-c04be3fd34af Ancestors: Morphic-mt.757 Preferences for gradient* fixed or implemented: Windows, buttons, scrollbars, menus. The gradient fill-styles can now be fully disabled in all standard tools. Default is still "enabled". =============== Diff against Morphic-mt.757 =============== Item was changed: AlignmentMorph subclass: #PluggableButtonMorph instanceVariableNames: 'model label getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback allButtons arguments argumentsProvider argumentsSelector style' + classVariableNames: 'GradientButton RoundedButtonCorners' - classVariableNames: 'RoundedButtonCorners' poolDictionaries: '' category: 'Morphic-Pluggable Widgets'! !PluggableButtonMorph commentStamp: '' prior: 0! A PluggableButtonMorph is a combination of an indicator for a boolean value stored in its model and an action button. The action of a button is often, but not always, to toggle the boolean value that it shows. Its pluggable selectors are: getStateSelector fetch a boolean value from the model actionSelector invoke this button's action on the model getLabelSelector fetch this button's lable from the model getMenuSelector fetch a pop-up menu for this button from the model Any of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if getStateSelector is nil, then this button shows the state of a read-only boolean that is always false. The model informs its view(s) of changes by sending #changed: to itself with getStateSelector as a parameter. The view tells the model when the button is pressed by sending actionSelector. If the actionSelector takes one or more arguments, then the following are relevant: arguments A list of arguments to provide when the actionSelector is called. argumentsProvider The object that is sent the argumentSelector to obtain arguments, if dynamic argumentsSelector The message sent to the argumentProvider to obtain the arguments. Options: askBeforeChanging have model ask user before allowing a change that could lose edits triggerOnMouseDown do this button's action on mouse down (vs. up) transition shortcutCharacter a place to record an optional shortcut key ! Item was added: + ----- Method: PluggableButtonMorph class>>gradientButton (in category 'preferences') ----- + gradientButton + + ^ GradientButton ifNil: [ true ]! Item was added: + ----- Method: PluggableButtonMorph class>>gradientButton: (in category 'preferences') ----- + gradientButton: aBoolean + + GradientButton := aBoolean.! Item was changed: ----- Method: PluggableButtonMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas + | cc gradient borderColor fill | - | cc gradient borderColor | cc := self color. cc isTransparent ifTrue:[cc := Color gray: 0.9]. self enabled ifFalse:[cc := Color lightGray]. cc brightness > 0.9 ifTrue:[cc := cc adjustBrightness: 0.9 - cc brightness]. showSelectionFeedback ifTrue:[ borderColor := cc muchDarker. gradient := GradientFillStyle ramp: { 0.0 -> cc muchDarker. 0.1-> (cc adjustBrightness: -0.2). 0.5 -> cc. 0.9-> (cc adjustBrightness: -0.1). + 1 -> cc muchDarker}. + cc := cc muchDarker. - 1 -> cc muchDarker. - }. ] ifFalse:[ borderColor := Color lightGray. gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.1-> (cc adjustBrightness: 0.05). + 0.6 -> (cc darker)}. - 0.6 -> (cc darker). - } ]. gradient origin: bounds topLeft. gradient direction: 0@self height. + + PluggableButtonMorph gradientButton + ifFalse: [fill := SolidFillStyle color: cc] + ifTrue: [fill := gradient]. + ^ self roundedButtonCorners ifTrue: [aCanvas frameAndFillRoundRect: bounds radius: 8 + fillStyle: fill - fillStyle: gradient borderWidth: 1 borderColor: borderColor] ifFalse: [aCanvas frameAndFillRectangle: self innerBounds + fillColor: fill asColor - fillColor: gradient asColor borderWidth: 1 borderColor: borderColor darker; fillRectangle: (self innerBounds insetBy: 1) + fillStyle: fill]! - fillStyle: gradient]! Item was changed: ----- Method: ScrollBar class>>createArrowOfDirection:size:color: (in category 'images') ----- createArrowOfDirection: aSymbolDirection size: finalSizeInteger color: aColor "PRIVATE - create an arrow with aSymbolDirectionDirection, finalSizeInteger and aColor aSymbolDirectionDirection = #top, #bottom. #left or #right Try with: (ScrollBar createArrowOfDirection: #top size: 32 color: Color lightGreen) asMorph openInHand. " | resizeFactor outerBox arrow resizedForm gradient | resizeFactor := 4. + outerBox := RectangleMorph new + extent: finalSizeInteger asPoint * resizeFactor; + borderWidth: 0; + color: aColor. + + Preferences gradientScrollBars ifTrue: [ + gradient := GradientFillStyle ramp: { + 0 -> (Color gray: 0.95). + 0.49 -> (Color gray: 0.9). + 0.5 -> (Color gray: 0.87). + 1 -> (Color gray: 0.93). + }. + gradient origin: outerBox topLeft. + (aSymbolDirection == #left or:[aSymbolDirection == #right]) + ifTrue:[gradient direction: 0@ outerBox height] + ifFalse:[gradient direction: outerBox width @ 0]. + outerBox fillStyle: gradient]. - outerBox := RectangleMorph new. - outerBox extent: finalSizeInteger asPoint * resizeFactor; - borderWidth: 0; - color: aColor. - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.95). - 0.49 -> (Color gray: 0.9). - 0.5 -> (Color gray: 0.87). - 1 -> (Color gray: 0.93). - }. - gradient origin: outerBox topLeft. - (aSymbolDirection == #left or:[aSymbolDirection == #right]) - ifTrue:[gradient direction: 0@ outerBox height] - ifFalse:[gradient direction: outerBox width @ 0]. - outerBox fillStyle: gradient. outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). "" arrow := self createArrowOfDirection: aSymbolDirection in: (outerBox bounds expandBy: -4). self updateScrollBarButtonAspect: arrow color: aColor muchDarker. outerBox addMorphCentered: arrow. "" resizedForm := outerBox imageForm magnify: outerBox imageForm boundingBox by: 1 / resizeFactor smoothing: 4. "" ^ (resizedForm replaceColor: aColor withColor: Color transparent) trimBordersOfColor: Color transparent! Item was changed: ----- Method: ScrollBar class>>createBoxOfSize:color: (in category 'images') ----- createBoxOfSize: finalSizeInteger color: aColor "PRIVATE - create a box with finalSizeInteger and aColor Try with: (ScrollBar createBoxOfSize: 32 color: Color lightGreen) asMorph openInHand. " | resizeFactor outerBox innerBox resizedForm gradient | resizeFactor := 4. + outerBox := RectangleMorph new + extent: finalSizeInteger asPoint * resizeFactor; + borderWidth: 0; + color: aColor. + Preferences gradientScrollBars ifTrue: [ + gradient := GradientFillStyle ramp: { + 0 -> (Color gray: 0.95). + 0.49 -> (Color gray: 0.9). + 0.5 -> (Color gray: 0.87). + 1 -> (Color gray: 0.93). + }. + gradient origin: outerBox topLeft. + gradient direction: outerBox width @ 0. + outerBox fillStyle: gradient]. - outerBox := RectangleMorph new. - outerBox extent: finalSizeInteger asPoint * resizeFactor; - borderWidth: 0; - color: aColor. - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.95). - 0.49 -> (Color gray: 0.9). - 0.5 -> (Color gray: 0.87). - 1 -> (Color gray: 0.93). - }. - gradient origin: outerBox topLeft. - gradient direction: outerBox width @ 0. - outerBox fillStyle: gradient. outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). "" innerBox := self createBoxIn: (outerBox bounds expandBy: -4). self updateScrollBarButtonAspect: innerBox color: aColor muchDarker. outerBox addMorphCentered: innerBox. "" resizedForm := outerBox imageForm magnify: outerBox imageForm boundingBox by: 1 / resizeFactor smoothing: 4. "" ^ (resizedForm replaceColor: aColor withColor: Color transparent) trimBordersOfColor: Color transparent! Item was changed: ----- Method: ScrollBar class>>updateScrollBarButtonAspect:color: (in category 'coloring morphs') ----- updateScrollBarButtonAspect: aMorph color: aColor "update aMorph with aColor" | fill direction | aMorph isNil ifTrue: [^ self]. "" + aMorph color: aColor. - aMorph color: aColor. Preferences gradientScrollBars ifFalse: [^ self]. "" + fill := GradientFillStyle ramp: { + 0.0 -> aColor twiceLighter twiceLighter. + 1.0 -> aColor twiceDarker}. - fill := GradientFillStyle ramp: {0.0 -> aColor twiceLighter twiceLighter. 1.0 -> aColor twiceDarker}. "" direction := ((aMorph width min: aMorph height) + ((aMorph width - aMorph height) abs * 0.3)) rounded. "" fill origin: aMorph topLeft + (direction // 8). fill direction: direction @ direction. fill radial: true. "" aMorph fillStyle: fill! Item was changed: ----- Method: ScrollBar>>updateSliderColor: (in category 'access') ----- updateSliderColor: aColor | gradient | + + slider borderStyle: (BorderStyle width: 1 color: Color lightGray). + self borderWidth: 0. + + Preferences gradientScrollBars ifFalse: [ + slider color: aColor. + pagingArea color: aColor darker darker. + ^ self]. + + "Fill the slider." gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.95). 0.49 -> (Color gray: 0.9). 0.5 -> (Color gray: 0.87). 1 -> (Color gray: 0.93). }. gradient origin: slider topLeft. gradient direction: (self bounds isWide ifTrue:[0@slider height] ifFalse:[slider width@0]). slider fillStyle: gradient. + + "Fill the paging area." - slider borderStyle: (BorderStyle width: 1 color: Color lightGray). - gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.65). 0.6 -> (Color gray: 0.82). 1 -> (Color gray: 0.88). }. gradient origin: self topLeft. gradient direction: (self bounds isWide ifTrue:[0@self height] ifFalse:[self width@0]). - self borderWidth: 0. pagingArea fillStyle: gradient.! Item was changed: MorphicModel subclass: #SystemWindow instanceVariableNames: 'labelString stripes label closeBox collapseBox activeOnlyOnTop paneMorphs paneRects collapsedFrame fullFrame isCollapsed menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' + classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage GradientWindow HideExpandButton MenuBoxFrame MenuBoxImage ResizeAlongEdges ReuseWindows TopWindow' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage HideExpandButton MenuBoxFrame MenuBoxImage ResizeAlongEdges ReuseWindows TopWindow' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '' prior: 0! SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! Item was added: + ----- Method: SystemWindow class>>gradientWindow (in category 'preferences') ----- + gradientWindow + + + ^ GradientWindow ifNil: [true] + ! Item was added: + ----- Method: SystemWindow class>>gradientWindow: (in category 'preferences') ----- + gradientWindow: aBoolean + + GradientWindow := aBoolean.! Item was changed: ----- Method: SystemWindow>>setStripeColorsFrom: (in category 'label') ----- setStripeColorsFrom: paneColor "Set the stripe color based on the given paneColor" labelArea ifNotNil: [labelArea color: Color transparent]. self updateBoxesColor: (self isActive ifTrue: [paneColor] ifFalse: [paneColor muchDarker]). stripes ifNil: [^self]. + + SystemWindow gradientWindow + ifTrue: [ + self fillStyle: (self isActive + ifTrue: [self gradientWithColor: paneColor duller "lighter lighter lighter"] + ifFalse: [self gradientWithColor: paneColor duller darker])] + ifFalse: [ + self color: (self isActive + ifTrue: [paneColor] + ifFalse: [paneColor duller])].! - self isActive - ifTrue: [self fillStyle: (self gradientWithColor: paneColor duller "lighter lighter lighter")] - ifFalse: ["This could be much faster" - self fillStyle: (self gradientWithColor: paneColor duller)].! Item was changed: ----- Method: SystemWindow>>updateBox:color: (in category 'panes') ----- updateBox: anIconMorph color: aColor + | fill | anIconMorph isNil ifTrue: [^ self]. anIconMorph extent: self boxExtent; useRoundedCorners. - fill := GradientFillStyle ramp: {0.0 -> aColor muchLighter muchLighter. 1.0 -> aColor twiceDarker}. - - fill origin: anIconMorph topLeft + (5 @ 5). - fill direction: anIconMorph extent. + SystemWindow gradientWindow + ifFalse: [anIconMorph color: aColor] + ifTrue: [ + fill := GradientFillStyle ramp: { + 0.0 -> aColor muchLighter muchLighter. + 1.0 -> aColor twiceDarker}. + fill origin: anIconMorph topLeft + (5 @ 5). + fill direction: anIconMorph extent. + anIconMorph fillStyle: fill]. + + anIconMorph + borderWidth: (Preferences alternativeWindowBoxesLook + ifTrue: [1] + ifFalse: [0]); + borderColor: aColor darker.! - anIconMorph fillStyle: fill. - anIconMorph borderWidth: (Preferences alternativeWindowBoxesLook - ifTrue: [1] - ifFalse: [0]); - borderColor: aColor darker! From eliot.miranda at gmail.com Tue Feb 24 09:32:37 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 24 09:32:44 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <20150220235528.GA20595@shell.msen.com> Message-ID: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> On Feb 23, 2015, at 7:25 PM, Bert Freudenberg wrote: > (moving to squeak-dev) > >> On 22.02.2015, at 14:40, Chris Muller wrote: >> >>>>> Some people like this preference a lot. Others think it is horrible. >>>> >>>> This implmenentation is not the best. The one in E/OCompletion is better. >>> >>> I love the feature (in other editors), but hate its current behavior. If that one is better, why don't we use that? >> >> This preference is part of the low-level interface which affects the >> overall fidelity of the Squeak user-experience. If we are going to >> make any changes to this, may we please start it out in the Inbox > > The onus is actually on whoever enabled this feature by default before it was mature, IMNSHO. Until we fix it properly (see below) we need to turn it off. > >> where we can all try it and discuss it in more objective terms than >> "love", "hate", "better" and "horrible"? > > "Horrible" is a technically accurate description in this case ;) > > Because it interferes with the user's wishes. It gets in the way unless you consciously anticipate how it's going to mess with what you type. And it doesn't have to, as other editors clearly demonstrate. > > If I am blindly typing > (foo) > I expect to end up with > (foo) > > In current Squeak I end up with > (foo)) > which is clearly wrong and extremely annoying and makes me hate the feature. > > For an editor that gets it right, try ACE online ( http://ace.c9.io/ ). If an editor does auto-insertion, it *must* keep track of that and anticipate the user typing the corresponding characters. E.g. in ACE I can type > [('foo > and get > [('foo')] > but then I can proceed to type > ')] > end it will just skip over the auto-inserted part. Similarly in Squeak when typing > [(2)+(3)] > it results in > [(2)+(3)]))] > but in ACE it gets me > [(2)+(3)] > which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. +1. Hate is not too strong a word. Horribly broken is accurate. Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered. Can we either get it right or get rid of it, please? > So, as others have pointed out, it's not that we don't want the editor to be helpful, it is a very useful feature, but it must be mindful of what the user wants. > > - Bert - > > From Das.Linux at gmx.de Tue Feb 24 10:21:48 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Feb 24 10:21:55 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: <2269F41D-7E12-444C-BC0C-00AC3DE751B0@gmx.de> On 24.02.2015, at 10:32, Eliot Miranda wrote: > On Feb 23, 2015, at 7:25 PM, Bert Freudenberg wrote: > >> (moving to squeak-dev) >> >>> On 22.02.2015, at 14:40, Chris Muller wrote: >>> >>>>> >>>>> This implmenentation is not the best. The one in E/OCompletion is better. >>>> >>>> I love the feature (in other editors), but hate its current behavior. If that one is better, why don't we use that? >>> >>> This preference is part of the low-level interface which affects the >>> overall fidelity of the Squeak user-experience. If we are going to >>> make any changes to this, may we please start it out in the Inbox >> >> The onus is actually on whoever enabled this feature by default before it was mature, IMNSHO. Until we fix it properly (see below) we need to turn it off. >> >>> where we can all try it and discuss it in more objective terms than >>> "love", "hate", "better" and "horrible"? >> >> "Horrible" is a technically accurate description in this case ;) >> >> Because it interferes with the user's wishes. It gets in the way unless you consciously anticipate how it's going to mess with what you type. And it doesn't have to, as other editors clearly demonstrate. >> >> If I am blindly typing >> (foo) >> I expect to end up with >> (foo) >> >> In current Squeak I end up with >> (foo)) >> which is clearly wrong and extremely annoying and makes me hate the feature. >> >> For an editor that gets it right, try ACE online ( http://ace.c9.io/ ). If an editor does auto-insertion, it *must* keep track of that and anticipate the user typing the corresponding characters. E.g. in ACE I can type >> [('foo >> and get >> [('foo')] >> but then I can proceed to type >> ')] >> end it will just skip over the auto-inserted part. Similarly in Squeak when typing >> [(2)+(3)] >> it results in >> [(2)+(3)]))] >> but in ACE it gets me >> [(2)+(3)] >> which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. > > +1. Hate is not too strong a word. Horribly broken is accurate. +1 I am constantly annoyed by code that looks like ()self foo: bar (because I more often edit than write forward) > Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered. However, this is less approachable. I figured that out when I was already using Squeak for 5 years. I for one would like "delimiter character"[1] to just behave like auto-enclose if (and only if) there is a text selection > Can we either get it right or get rid of it, please? > Best -Tobias [1]: my list of these (to not forget them) [], {}, (), <> (and >< too), "", '', `` more esotheric || (helpful for temps) _ _, * *, = =, # #, + + (helpful for emphasis in comments) and probably (a little harder) ??, ??, ??, ?? (or ??), ?? (or ??) From trygver at ifi.uio.no Tue Feb 24 11:22:08 2015 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Tue Feb 24 11:22:15 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: <54EC5EE0.5080306@ifi.uio.no> This is all about the future. But how do I get rid of the automatic $) NOW? I'm not quarreling with other people's preferences, only that I personally need the option to work without it. On 24.02.2015 10:32, Eliot Miranda wrote: > On Feb 23, 2015, at 7:25 PM, Bert Freudenberg wrote: > >> (moving to squeak-dev) >> >>> On 22.02.2015, at 14:40, Chris Muller wrote: >>> >>>>>> Some people like this preference a lot. Others think it is horrible. >>>>> This implmenentation is not the best. The one in E/OCompletion is better. >>>> I love the feature (in other editors), but hate its current behavior. If that one is better, why don't we use that? >>> This preference is part of the low-level interface which affects the >>> overall fidelity of the Squeak user-experience. If we are going to >>> make any changes to this, may we please start it out in the Inbox >> The onus is actually on whoever enabled this feature by default before it was mature, IMNSHO. Until we fix it properly (see below) we need to turn it off. >> >>> where we can all try it and discuss it in more objective terms than >>> "love", "hate", "better" and "horrible"? >> "Horrible" is a technically accurate description in this case ;) >> >> Because it interferes with the user's wishes. It gets in the way unless you consciously anticipate how it's going to mess with what you type. And it doesn't have to, as other editors clearly demonstrate. >> >> If I am blindly typing >> (foo) >> I expect to end up with >> (foo) >> >> In current Squeak I end up with >> (foo)) >> which is clearly wrong and extremely annoying and makes me hate the feature. >> >> For an editor that gets it right, try ACE online ( http://ace.c9.io/ ). If an editor does auto-insertion, it *must* keep track of that and anticipate the user typing the corresponding characters. E.g. in ACE I can type >> [('foo >> and get >> [('foo')] >> but then I can proceed to type >> ')] >> end it will just skip over the auto-inserted part. Similarly in Squeak when typing >> [(2)+(3)] >> it results in >> [(2)+(3)]))] >> but in ACE it gets me >> [(2)+(3)] >> which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. > +1. Hate is not too strong a word. Horribly broken is accurate. Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered. Can we either get it right or get rid of it, please? > > >> So, as others have pointed out, it's not that we don't want the editor to be helpful, it is a very useful feature, but it must be mindful of what the user wants. >> >> - Bert - >> >> > > -- /The essence of object orientation is that objects collaborateto achieve a goal. / Trygve Reenskaug mailto: trygver@ifi.uio.no Morgedalsvn. 5A http://folk.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway Tel: (+47) 22 49 57 27 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/59a28300/attachment-0001.htm From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 24 12:15:12 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 24 12:22:41 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <54EC5EE0.5080306@ifi.uio.no> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <54EC5EE0.5080306@ifi.uio.no> Message-ID: <1424780112577-4807265.post@n4.nabble.com> Go to the preferences browser and disable "auto enclose". Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807265.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Tue Feb 24 12:33:17 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 24 12:33:19 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424780112577-4807265.post@n4.nabble.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <54EC5EE0.5080306@ifi.uio.no> <1424780112577-4807265.post@n4.nabble.com> Message-ID: <20150224123317.GA45824@shell.msen.com> On Tue, Feb 24, 2015 at 04:15:12AM -0800, Marcel Taeumel wrote: > Go to the preferences browser and disable "auto enclose". > It is located in preference category "Morphic", so under "Tools" on the toolbar, open a Preference Browser. Select category "Morphic", and then disable the "auto enclose" preference. Dave From lewis at mail.msen.com Tue Feb 24 12:40:46 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 24 12:40:48 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.758.mcz In-Reply-To: <201502240813.t1O8D4xd009928@shell.msen.com> References: <201502240813.t1O8D4xd009928@shell.msen.com> Message-ID: <20150224124046.GB45824@shell.msen.com> On Tue, Feb 24, 2015 at 08:12:39AM +0000, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.758.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.758 > Author: mt > Time: 24 February 2015, 9:12:34.081 am > UUID: ff6992c3-f93d-a444-a7c4-c04be3fd34af > Ancestors: Morphic-mt.757 > > Preferences for gradient* fixed or implemented: Windows, buttons, scrollbars, menus. The gradient fill-styles can now be fully disabled in all standard tools. Default is still "enabled". > Nice. I expect that this will be helpful on slower machines. Dave From trygver at ifi.uio.no Tue Feb 24 12:48:35 2015 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Tue Feb 24 12:48:39 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <20150224123317.GA45824@shell.msen.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <54EC5EE0.5080306@ifi.uio.no> <1424780112577-4807265.post@n4.nabble.com> <20150224123317.GA45824@shell.msen.com> Message-ID: <54EC7323.3080408@ifi.uio.no> Thanks. I looked for it but didn't find it. On 24.02.2015 13:33, David T. Lewis wrote: > On Tue, Feb 24, 2015 at 04:15:12AM -0800, Marcel Taeumel wrote: >> Go to the preferences browser and disable "auto enclose". >> > It is located in preference category "Morphic", so under "Tools" on > the toolbar, open a Preference Browser. Select category "Morphic", and > then disable the "auto enclose" preference. > > Dave > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/b3d60e96/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 24 15:49:13 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 24 15:56:43 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.758.mcz In-Reply-To: <20150224124046.GB45824@shell.msen.com> References: <20150224124046.GB45824@shell.msen.com> Message-ID: <1424792953528-4807312.post@n4.nabble.com> no-gradients.png Here a picture for the visual impression. :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-758-mcz-tp4807174p4807312.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lenglish5 at cox.net Tue Feb 24 15:56:57 2015 From: lenglish5 at cox.net (Lawson English) Date: Tue Feb 24 15:57:05 2015 Subject: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) Message-ID: <54EC9F49.8010407@cox.net> Is it just me or is this place a ghost town? L -- Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner). https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan From mbaehr at email.archlab.tuwien.ac.at Tue Feb 24 16:16:23 2015 From: mbaehr at email.archlab.tuwien.ac.at (=?utf-8?q?Martin_B=C3=A4hr?=) Date: Tue Feb 24 16:17:30 2015 Subject: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) In-Reply-To: <54EC9F49.8010407@cox.net> References: <54EC9F49.8010407@cox.net> Message-ID: <1424794510-sup-2301@email.archlab.tuwien.ac.at> Excerpts from Lawson English's message of 2015-02-24 16:56:57 +0100: > Is it just me or is this place a ghost town? it must be you, because i got 120 messages in the past two weeks. greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin B?hr working in china http://societyserver.org/mbaehr/ From commits at source.squeak.org Tue Feb 24 16:35:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 24 16:35:40 2015 Subject: [squeak-dev] The Inbox: Graphics-mt.306.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Inbox: http://source.squeak.org/inbox/Graphics-mt.306.mcz ==================== Summary ==================== Name: Graphics-mt.306 Author: mt Time: 24 February 2015, 5:35:33.139 pm UUID: 59d79db7-87e0-8c48-945f-67edbd50cbf2 Ancestors: Graphics-kfr.305 Support rounded corners with a radius of 4. Adds a preference to change radius (but still only supports 6 or 4). Not sure, whether the corner rounder should survive in the long term... =============== Diff against Graphics-kfr.305 =============== Item was changed: Object subclass: #CornerRounder instanceVariableNames: 'cornerMasks cornerOverlays underBits' + classVariableNames: 'CR0 CR1 CR2 PreferredRadius' - classVariableNames: 'CR0 CR1 CR2' poolDictionaries: '' category: 'Graphics-Display Objects'! !CornerRounder commentStamp: '' prior: 0! This class is a quick hack to support rounded corners in morphic. Rather than produce rounded rectangles, it tweaks the display of corners. Rather than work for any radius, it only supports a radius of 6. Rather than work for any border width, it only supports widths 0, 1 and 2. The corners, while apparently transparent, still behave opaquely to mouse clicks. Worse than this, the approach relies on the ability to extract underlying bits from the canvas prior to display. This ran afoul of top-down display, it seems, in SystemWindow spawnReframeHandle: (qv). It will also make a postscript printer very unhappy. But, hey, it's cute.! Item was changed: ----- Method: CornerRounder class>>initialize (in category 'all') ----- initialize "CornerRounder initialize" + CR0 := self new - CR0 := CR1 := self new masterMask: + (Form extent: 4@4 + fromArray: #(2r1100e26 2r11100e26 2r111100e26 2r111100e26) + offset: 0@0) + masterOverlay: + (Form extent: 4@4 + fromArray: #(2r1100e26 2r10000e26 2r100000e26 2r100000e26) + offset: 0@0). + CR1 := self new + masterMask: (Form extent: 6@6 fromArray: #(2r1e26 2r111e26 2r1111e26 2r11111e26 2r11111e26 2r111111e26) offset: 0@0) masterOverlay: (Form extent: 6@6 fromArray: #(2r1e26 2r110e26 2r1000e26 2r10000e26 2r10000e26 2r100000e26) offset: 0@0). CR2 := self new masterMask: (Form extent: 6@6 fromArray: #(2r1e26 2r111e26 2r1111e26 2r11111e26 2r11111e26 2r111111e26) offset: 0@0) masterOverlay: (Form extent: 6@6 fromArray: #(2r1e26 2r111e26 2r1111e26 2r11100e26 2r11000e26 2r111000e26) offset: 0@0). ! Item was added: + ----- Method: CornerRounder class>>preferredRadius (in category 'preferences') ----- + preferredRadius + + + ^ PreferredRadius ifNil: [6]! Item was added: + ----- Method: CornerRounder class>>preferredRadius: (in category 'preferences') ----- + preferredRadius: anInteger + + PreferredRadius := anInteger.! Item was changed: ----- Method: CornerRounder class>>roundCornersOf:on:in:displayBlock:borderWidth:corners: (in category 'all') ----- roundCornersOf: aMorph on: aCanvas in: bounds displayBlock: displayBlock borderWidth: w corners: aList | rounder | + + {CR0.CR1.CR2} + detect: [:r | r cornerMasks first width = self preferredRadius] + ifFound: [:r | rounder := r] + ifNone: [ + rounder := CR0. + w = 1 ifTrue: [rounder := CR1]. + w = 2 ifTrue: [rounder := CR2]]. + - rounder := CR0. - w = 1 ifTrue: [rounder := CR1]. - w = 2 ifTrue: [rounder := CR2]. rounder := rounder copy. rounder saveBitsUnderCornersOf: aMorph on: aCanvas in: bounds corners: aList. displayBlock value. rounder tweakCornersOf: aMorph on: aCanvas in: bounds borderWidth: w corners: aList! Item was added: + ----- Method: CornerRounder>>cornerMasks (in category 'accessing') ----- + cornerMasks + + ^ cornerMasks! Item was added: + ----- Method: CornerRounder>>cornerOverlays (in category 'accessing') ----- + cornerOverlays + + ^ cornerOverlays! Item was added: + ----- Method: CornerRounder>>underBits (in category 'accessing') ----- + underBits + + ^ underBits! Item was added: + (PackageInfo named: 'Graphics') postscript: 'CornerRounder initialize.'! From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 24 17:02:39 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 24 17:10:09 2015 Subject: [squeak-dev] Speaking of rounded corners... Message-ID: <1424797359184-4807342.post@n4.nabble.com> I think that the CornerRounder is not appropriate. It's a hack like its class comment sais. ;-) What about using the methods from FormCanvas to draw rounded rectangles? The result would be nicer because we could play with anti-aliasing: BUT: Pharo dismissed that interface from canvas and I was wondering, how portable it is. Canvas does not have it. Only FormCanvas has it: frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc frameRoundRect: aRectangle radius: radius width: borderWidth color: borderColor fillRoundRect: aRectangle radius: radius fillStyle: fillStyle At the moment, PluggableButtons round their corners _without_ the CornerRounder but by using the canvas interface to draw rounded rectangles. Is performance an issue? Well, the corner rounder is quite hacky... Best, Marcel P.S.: The anti-aliasing trick works like this and may be slow: aCanvas frameRoundRect: self bounds radius: 7 width: self borderWidth color: (self borderColor alpha: 0.5). aCanvas frameAndFillRoundRect: self bounds radius: 8 fillStyle: self fillStyle borderWidth: self borderWidth borderColor: self borderColor. aCanvas frameRoundRect: self bounds radius: 9 width: self borderWidth color: (self borderColor alpha: 0.3) -- View this message in context: http://forum.world.st/Speaking-of-rounded-corners-tp4807342.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From timfelgentreff at gmail.com Tue Feb 24 17:07:23 2015 From: timfelgentreff at gmail.com (timfelgentreff) Date: Tue Feb 24 17:14:54 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: <1424797359184-4807342.post@n4.nabble.com> References: <1424797359184-4807342.post@n4.nabble.com> Message-ID: <1424797643609-4807345.post@n4.nabble.com> Nice! -- View this message in context: http://forum.world.st/Speaking-of-rounded-corners-tp4807342p4807345.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Tue Feb 24 17:23:29 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Feb 24 17:23:31 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: >> If I am blindly typing >> (foo) >> I expect to end up with >> (foo) >> >> In current Squeak I end up with >> (foo)) >> which is clearly wrong and extremely annoying and makes me hate the feature. Okay, thanks for explaining that. Sure, that's how eclipse works too. I figured that's what you meant, but I wasn't sure because wailing about that is almost harder than simply fixing it. ;) Try filing in the attached patch and see if it does what you want. It simply checks the next non-whitespace character in front of the cursor and if its the same closer that was typed, simply advances the cursor rather than type the closing character. >> ... snip ... >> which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. Eliot wrote: > +1. Hate is not too strong a word. Horribly broken is accurate. Guys, I thought *I* was the emotional one. If you reserve such strong words for things this small then you won't be able to differentiate from the bigger things. I've been learning that such words are not always the most productive way to criticize and can can make others feel bad.. Lighten up people! :) > Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered. Can we either get it right or get rid of it, please? There is no chance this feature will be removed because it is one of several necessary components that make up a fantastic suite of expression-editing functions. Some people operate by "editing text" and others by "editing expressions". This feature is an absolutely essential component of a group of functions for the latter; along with Control+enclose, Expression-selection (via Command+[space]), and Paren-Blinking. I've put quite a bit of thought into this.. Please check out the attached improvement, and I hope you can switch your hate to love... :) >> So, as others have pointed out, it's not that we don't want the editor to be helpful, it is a very useful feature, but it must be mindful of what the user wants. >> >> - Bert - >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: TextEditor-dispatchOnKeyboardEvent.st.gz Type: application/x-gzip Size: 1045 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/ddbc73a0/TextEditor-dispatchOnKeyboardEvent.st.bin From asqueaker at gmail.com Tue Feb 24 17:28:07 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Feb 24 17:28:09 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <54EC7323.3080408@ifi.uio.no> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <54EC5EE0.5080306@ifi.uio.no> <1424780112577-4807265.post@n4.nabble.com> <20150224123317.GA45824@shell.msen.com> <54EC7323.3080408@ifi.uio.no> Message-ID: On Tue, Feb 24, 2015 at 6:48 AM, Trygve Reenskaug wrote: > Thanks. I looked for it but didn't find it. If you type "paren"(thesis) or "brack"(et) into the Preferences search, it's the only search result. From juanlists at jvuletich.org Tue Feb 24 17:44:39 2015 From: juanlists at jvuletich.org (J. Vuletich (mail lists)) Date: Tue Feb 24 17:44:45 2015 Subject: [squeak-dev] Speaking of rounded corners... In-Reply-To: <1424797359184-4807342.post@n4.nabble.com> References: <1424797359184-4807342.post@n4.nabble.com> Message-ID: <20150224174439.Horde.oPRA5pgPdtkF9aQAu9ceEg7@gator3294.hostgator.com> Hi Marcel, Take a look at #windowFrame:color:radius:border:labelHeight:gradientTop:gradientBottom:insideColor: in Cuis. Besides anti aliasing, it also does gradients. CornerRounder was one of the first things I removed when started Cuis. Cheers, Juan Vuletich Quoting Marcel Taeumel : > I think that the CornerRounder is not appropriate. It's a hack like its class > comment sais. ;-) > > What about using the methods from FormCanvas to draw rounded rectangles? The > result would be nicer because we could play with anti-aliasing: > > > > BUT: Pharo dismissed that interface from canvas and I was wondering, how > portable it is. Canvas does not have it. Only FormCanvas has it: > > frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle > borderWidth: bw borderColor: bc > frameRoundRect: aRectangle radius: radius width: borderWidth color: > borderColor > fillRoundRect: aRectangle radius: radius fillStyle: fillStyle > > At the moment, PluggableButtons round their corners _without_ the > CornerRounder but by using the canvas interface to draw rounded rectangles. > > Is performance an issue? Well, the corner rounder is quite hacky... > > Best, > Marcel > > P.S.: The anti-aliasing trick works like this and may be slow: > > aCanvas > frameRoundRect: self bounds > radius: 7 > width: self borderWidth > color: (self borderColor alpha: 0.5). > > aCanvas > frameAndFillRoundRect: self bounds > radius: 8 > fillStyle: self fillStyle > borderWidth: self borderWidth > borderColor: self borderColor. > > aCanvas > frameRoundRect: self bounds > radius: 9 > width: self borderWidth > color: (self borderColor alpha: 0.3) > > > > -- > View this message in context: > http://forum.world.st/Speaking-of-rounded-corners-tp4807342.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Tue Feb 24 17:45:46 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue Feb 24 17:45:49 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <2269F41D-7E12-444C-BC0C-00AC3DE751B0@gmx.de> References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <2269F41D-7E12-444C-BC0C-00AC3DE751B0@gmx.de> Message-ID: On Tue, Feb 24, 2015 at 2:21 AM, Tobias Pape wrote: ... > > I am constantly annoyed by code that looks like > > ()self foo: bar > > (because I more often edit than write forward) > ... > Best > -Tobias > Yes, this annoys me, too (which is why I turn it off). Maybe if it automatically adds the close only if it is at the end of the line (or the next space is a white space), that would work better. This added to Chris' suggestion of checking if the next character is the same closing character that you just typed and skipping over it would probably convince me to leave it on. Reasonable auto-complete + control-enclose for editing - I'd like that. -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/05c8a095/attachment.htm From bert at freudenbergs.de Tue Feb 24 18:05:17 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 24 18:05:22 2015 Subject: [squeak-dev] Speaking of rounded corners... In-Reply-To: <1424797359184-4807342.post@n4.nabble.com> References: <1424797359184-4807342.post@n4.nabble.com> Message-ID: <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> On 24.02.2015, at 09:02, Marcel Taeumel wrote: > > I think that the CornerRounder is not appropriate. It's a hack like its class > comment sais. ;-) Indeed. > Is performance an issue? It might be. Our window redraws are pretty slow anyway so it might not matter much, but then making it even slower may not be the best idea ;) You also have to watch out for the different border styles a morph can have (OTOH the CornerRounder only handles borders up to 2 pixels wide anyway). A related issue is that we should start to take advantage of higher-resolution displays without pixel-doubling. Squeak looks seriously outdated on a 200 dpi screen. Drawing things properly is a step in that direction. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/44c17924/smime.bin From bert at freudenbergs.de Tue Feb 24 18:12:14 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 24 18:12:19 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: On 24.02.2015, at 09:23, Chris Muller wrote: > Try filing in the attached patch and see if it does what you want. MNU: nextNonwhitespaceCharacter > It > simply checks the next non-whitespace character in front of the cursor > and if its the same closer that was typed, simply advances the cursor > rather than type the closing character. This sounds too simplistic to me. Wouldn't that mean I can never insert an additional closing paren? I think the editor needs to keep a stack of auto-inserted characters. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/44f7e69d/smime.bin From eliot.miranda at gmail.com Tue Feb 24 18:19:04 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Feb 24 18:19:10 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: Hi Chris, On Feb 24, 2015, at 9:23 AM, Chris Muller wrote: >>> If I am blindly typing >>> (foo) >>> I expect to end up with >>> (foo) >>> >>> In current Squeak I end up with >>> (foo)) >>> which is clearly wrong and extremely annoying and makes me hate the feature. > > Okay, thanks for explaining that. Sure, that's how eclipse works too. > I figured that's what you meant, but I wasn't sure because wailing > about that is almost harder than simply fixing it. ;) > > Try filing in the attached patch and see if it does what you want. It > simply checks the next non-whitespace character in front of the cursor > and if its the same closer that was typed, simply advances the cursor > rather than type the closing character. > >>> ... snip ... >>> which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken. > > Eliot wrote: >> +1. Hate is not too strong a word. Horribly broken is accurate. > > Guys, I thought *I* was the emotional one. If you reserve such strong > words for things this small then you won't be able to differentiate > from the bigger things. I've been learning that such words are not > always the most productive way to criticize and can can make others > feel bad.. Lighten up people! :) :). Maybe you're taking the reaction to the feature personally. I don't hate you but yes, I /do/ hate the auto enclose because do often it does the wrong thing, causes me to to have to compensate with editing and therefore breaks my flow. It is /so/ in my face. I do hate it. > >> Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered. Can we either get it right or get rid of it, please? > > There is no chance this feature will be removed because it is one of > several necessary components that make up a fantastic suite of > expression-editing functions. Some people operate by "editing text" > and others by "editing expressions". This feature is an absolutely > essential component of a group of functions for the latter; along with > Control+enclose, Expression-selection (via Command+[space]), and > Paren-Blinking. I've put quite a bit of thought into this.. > > Please check out the attached improvement, and I hope you can switch > your hate to love... :) > >>> So, as others have pointed out, it's not that we don't want the editor to be helpful, it is a very useful feature, but it must be mindful of what the user wants. >>> >>> - Bert - > > From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 24 18:35:22 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 24 18:42:54 2015 Subject: [squeak-dev] Add tags to preferences to improve the search space? Message-ID: <1424802922575-4807372.post@n4.nabble.com> Hi, there! What about adding tags so that there could be a place to add additional terms for looking up preferences w/o polluting the description yet preference name? Or maybe just replace "category" with "tags"? So we could even put preferences into multiple categories. Best, Marcel -- View this message in context: http://forum.world.st/Add-tags-to-preferences-to-improve-the-search-space-tp4807372.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Feb 24 18:44:15 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Feb 24 18:51:45 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: <1424803455881-4807373.post@n4.nabble.com> I like the way OCompletion does it. Almost. We need this behavior with one addition: You should be able to manually set braces/brackets/paren... (german: "Klammern" ^__^) around a term w/o automatic insertion of the second one if there is so selection: |aMorph color: Color blue (|aMorph color: Color blue (aMorph color: Color blue| (aMorph color: Color blue)| Right now, this is not possible with OCompletion's Smart Characters. But the algorithm should be simple. I argue that you do not need to keep track of automatically inserted braces but only consider the text cursor and its surroundings (e.g. whitespaces or other braces). That's the way OCompletion does it. Maybe do some automatic parsing of the text to check whether there will be a closing bracket too much. ;-) Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807373.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Tue Feb 24 19:00:29 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 24 19:00:34 2015 Subject: [squeak-dev] Add tags to preferences to improve the search space? In-Reply-To: <1424802922575-4807372.post@n4.nabble.com> References: <1424802922575-4807372.post@n4.nabble.com> Message-ID: <708EDAE9-E5CC-4947-AA06-3D248982DD72@freudenbergs.de> > On 24.02.2015, at 10:35, Marcel Taeumel wrote: > > Hi, there! > > What about adding tags so that there could be a place to add additional > terms for looking up preferences w/o polluting the description yet > preference name? > > Or maybe just replace "category" with "tags"? > > tags: 'windows morphic graphics' > description: 'A longer description to explain everything...' > type: #Boolean> You can already pass an array of categories: Btw, I just noticed the "show category..." item in a preference's "more" menu is broken. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/6d9ee233/smime.bin From bert at freudenbergs.de Tue Feb 24 19:03:20 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Feb 24 19:03:26 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.758.mcz In-Reply-To: <1424792953528-4807312.post@n4.nabble.com> References: <20150224124046.GB45824@shell.msen.com> <1424792953528-4807312.post@n4.nabble.com> Message-ID: > On 24.02.2015, at 07:49, Marcel Taeumel wrote: > > no-gradients.png > > Here a picture for the visual impression. :) Nice. Now you just need to make it fall back to that automatically if the VM does not have the balloon rendering plugin :) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/21fe9ecf/smime.bin From Das.Linux at gmx.de Tue Feb 24 19:10:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Feb 24 19:10:16 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.758.mcz In-Reply-To: References: <20150224124046.GB45824@shell.msen.com> <1424792953528-4807312.post@n4.nabble.com> Message-ID: <96178103-9A52-453E-82C4-C596813F9B2D@gmx.de> On 24.02.2015, at 20:03, Bert Freudenberg wrote: > >> On 24.02.2015, at 07:49, Marcel Taeumel wrote: >> >> no-gradients.png >> >> Here a picture for the visual impression. :) > > Nice. Now you just need to make it fall back to that automatically if the VM does not have the balloon rendering plugin :) \o/ yes please :) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1625 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/3e714850/signature-0001.pgp From commits at source.squeak.org Tue Feb 24 20:54:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Feb 24 20:54:59 2015 Subject: [squeak-dev] The Inbox: Morphic-cmm.759.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-cmm.759.mcz ==================== Summary ==================== Name: Morphic-cmm.759 Author: cmm Time: 24 February 2015, 2:54:22.757 pm UUID: c7ecd89e-da26-47fb-8302-3ccaff6b9b54 Ancestors: Morphic-mt.758 Improved "Auto Enclose" preference to behave like it does in eclipse; when typing the closer (paren / bracket / curly), simply advance the cursor past it rather than insert an additional closer. =============== Diff against Morphic-mt.758 =============== Item was changed: ----- Method: TextEditor>>dispatchOnKeyboardEvent: (in category 'typing support') ----- + dispatchOnKeyboardEvent: aKeyboardEvent + "Carry out the action associated with this character, if any. Type-ahead is passed so some routines can flush or use it." + | honorCommandKeys openers closers result typedChar | + ((typedChar := aKeyboardEvent keyCharacter) == Character cr and: [ morph acceptOnCR ]) ifTrue: + [ self closeTypeIn. + ^ true ]. - dispatchOnKeyboardEvent: aKeyboardEvent - "Carry out the action associated with this character, if any. - Type-ahead is passed so some routines can flush or use it." - - | honorCommandKeys openers closers result | - (aKeyboardEvent keyCharacter == Character cr and: [ morph acceptOnCR ]) - ifTrue: [ - self closeTypeIn. - ^ true ]. self clearParens. + aKeyboardEvent keyValue = 13 ifTrue: + [ aKeyboardEvent controlKeyPressed ifTrue: [ ^ self normalCharacter: aKeyboardEvent ]. + aKeyboardEvent shiftPressed ifTrue: [ ^ self lf: aKeyboardEvent ]. + aKeyboardEvent commandKeyPressed ifTrue: [ ^ self crlf: aKeyboardEvent ]. + ^ self crWithIndent: aKeyboardEvent ]. + ((honorCommandKeys := Preferences cmdKeysInText) and: [ typedChar = Character enter ]) ifTrue: [ ^ self dispatchOnEnterWith: aKeyboardEvent ]. + "Special keys overwrite crtl+key combinations - at least on Windows. To resolve this - aKeyboardEvent keyValue = 13 - ifTrue: [ - aKeyboardEvent controlKeyPressed - ifTrue: [ ^ self normalCharacter: aKeyboardEvent ]. - aKeyboardEvent shiftPressed - ifTrue: [ ^ self lf: aKeyboardEvent ]. - aKeyboardEvent commandKeyPressed - ifTrue: [ ^ self crlf: aKeyboardEvent ]. - ^ self crWithIndent: aKeyboardEvent ]. - ((honorCommandKeys := Preferences cmdKeysInText) and: [ aKeyboardEvent keyCharacter = Character enter ]) - ifTrue: [ ^ self dispatchOnEnterWith: aKeyboardEvent ]. "Special keys overwrite crtl+key combinations - at least on Windows. To resolve this conflict, assume that keys other than cursor keys aren't used together with Crtl." + ((self class specialShiftCmdKeys includes: aKeyboardEvent keyValue) and: [ aKeyboardEvent keyValue < 27 ]) ifTrue: [ ^ aKeyboardEvent controlKeyPressed + ifTrue: + [ self + perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) + with: aKeyboardEvent ] + ifFalse: + [ self + perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) + with: aKeyboardEvent ] ]. + "backspace, and escape keys (ascii 8 and 27) are command keys" + ((honorCommandKeys and: [ aKeyboardEvent commandKeyPressed ]) or: [ self class specialShiftCmdKeys includes: aKeyboardEvent keyValue ]) ifTrue: [ ^ aKeyboardEvent shiftPressed + ifTrue: + [ self + perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) + with: aKeyboardEvent ] + ifFalse: + [ self + perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) + with: aKeyboardEvent ] ]. + "the control key can be used to invoke shift-cmd shortcuts" + (honorCommandKeys and: [ aKeyboardEvent controlKeyPressed ]) ifTrue: [ ^ self + perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) + with: aKeyboardEvent ]. - ((self class specialShiftCmdKeys includes: aKeyboardEvent keyValue) and: [ aKeyboardEvent keyValue < 27 ]) - ifTrue: [ - ^ aKeyboardEvent controlKeyPressed - ifTrue: [ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] - ifFalse: [ self perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ]. "backspace, and escape keys (ascii 8 and 27) are command keys" - ((honorCommandKeys and: [ aKeyboardEvent commandKeyPressed ]) - or: [ self class specialShiftCmdKeys includes: aKeyboardEvent keyValue ]) - ifTrue: [ - ^ aKeyboardEvent shiftPressed - ifTrue: [ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] - ifFalse: [ self perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ]. "the control key can be used to invoke shift-cmd shortcuts" - (honorCommandKeys and: [ aKeyboardEvent controlKeyPressed ]) - ifTrue: [ ^ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ]. openers := '([{'. closers := ')]}'. + (closers includes: typedChar) + ifTrue: + [ self blinkPrevParen: typedChar. + self nextNonwhitespaceCharacter = typedChar + ifTrue: + [ [self nextNonwhitespaceCharacter = typedChar] whileTrue: [self + moveCursor: [ : position | position + 1 ] + forward: true + select: false ]. + ^ false ] + ifFalse: [ result := self normalCharacter: aKeyboardEvent ] ] + ifFalse: [ result := self normalCharacter: aKeyboardEvent ]. + (self class autoEnclose and: [ openers includes: typedChar ]) ifTrue: + [ self + addString: (closers at: (openers indexOf: typedChar)) asString ; + insertTypeAhead ; + + moveCursor: + [ : position | position - 1 ] + forward: false + select: false ]. - result := self normalCharacter: aKeyboardEvent. - (closers includes: aKeyboardEvent keyCharacter) - ifTrue: [ self blinkPrevParen: aKeyboardEvent keyCharacter]. - (self class autoEnclose and: [ openers includes: aKeyboardEvent keyCharacter ]) - ifTrue: [ - self - addString: (closers at: (openers indexOf: aKeyboardEvent keyCharacter)) asString; - insertTypeAhead ; - - moveCursor: [ :position | position - 1 ] - forward: false - select: false ]. ^ result! Item was added: + ----- Method: TextEditor>>nextNonwhitespaceCharacter (in category 'private') ----- + nextNonwhitespaceCharacter + pointBlock stringIndex + to: paragraph string size + do: + [ : n | | char | (char := paragraph string at: n) isSeparator ifFalse: [ ^ char ] ]. + ^ nil! From asqueaker at gmail.com Tue Feb 24 21:07:42 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Feb 24 21:07:45 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <20150220235528.GA20595@shell.msen.com> <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: On Tue, Feb 24, 2015 at 12:12 PM, Bert Freudenberg wrote: > On 24.02.2015, at 09:23, Chris Muller wrote: >> Try filing in the attached patch and see if it does what you want. > > MNU: nextNonwhitespaceCharacter > >> It >> simply checks the next non-whitespace character in front of the cursor >> and if its the same closer that was typed, simply advances the cursor >> rather than type the closing character. > > This sounds too simplistic to me. Wouldn't that mean I can never insert an additional closing paren? Of course not. You talked about the requirement that "typed-input should equal expected output" to address the use-case of "blind-typing". That makes perfect sense and this fix addresses that whilst preserving all of the current behaviors. The only time it could possibly be an "issue" is if you needed to pass a closer Character to the argument of a keyword message, like: (myObject includesCharacter: $)) > I think the editor needs to keep a stack of auto-inserted characters. ... which your stack wouldn't solve, but you could simply type _another_ closing paren and you're golden. That's a rare case that doesn't really behave all that badly and if there is even a worse case than that (which, I can't fathom), you have the clipboard pasting available to paste whatever you want. I made a proper version in the Inbox. Why not just try it and see if its an improvement over what we already have? From lenglish5 at cox.net Tue Feb 24 21:54:47 2015 From: lenglish5 at cox.net (Lawson English) Date: Tue Feb 24 21:54:51 2015 Subject: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) In-Reply-To: References: <54EC9F49.8010407@cox.net> Message-ID: <54ECF327.8010201@cox.net> Wow. This message and one other are the only ones I have received since 2/10/15 L On 2/24/15 9:16 AM, Martin B?hr wrote: > Excerpts from Lawson English's message of 2015-02-24 16:56:57 +0100: >> Is it just me or is this place a ghost town? > it must be you, because i got 120 messages in the past two weeks. > > greetings, martin. > -- Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner). https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan From ron at usmedrec.com Tue Feb 24 23:23:41 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Feb 24 23:24:01 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 Message-ID: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Hello everyone, I'm pleased to announce the Squeak Oversight Board for 2015. First I would like to thank everyone that participated, everyone that ran for a seat, but also everyone that voted! Without further ado here is your new Squeak Oversight Board for 2015, give a round of applause for: 1. Bert Freudenberg 2. Eliot Miranda 3. Tim Rowledge 4. Craig Latta 5. David T. Lewis 6. Chris Muller 7. Marcel Taeumel All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/0d1c6a27/attachment.htm From lewis at mail.msen.com Tue Feb 24 23:28:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Feb 24 23:28:33 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: <20150224232831.GA69032@shell.msen.com> On Tue, Feb 24, 2015 at 06:23:41PM -0500, Ron Teitelbaum wrote: > Hello everyone, > > I'm pleased to announce the Squeak Oversight Board for 2015. First I would > like to thank everyone that participated, everyone that ran for a seat, but > also everyone that voted! Ron, Thank you for conducting the election again this year. It is a real service to the community. Thank you very much! Dave From ron at usmedrec.com Tue Feb 24 23:30:44 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Feb 24 23:31:03 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: <20150224232831.GA69032@shell.msen.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> <20150224232831.GA69032@shell.msen.com> Message-ID: <039101d05089$e9d00490$bd700db0$@usmedrec.com> On Tue, Feb 24, 2015 at 06:23:41PM -0500, Ron Teitelbaum wrote: >> Hello everyone, >> >> I'm pleased to announce the Squeak Oversight Board for 2015. First I >> would like to thank everyone that participated, everyone that ran for >> a seat, but also everyone that voted! >Ron, >Thank you for conducting the election again this year. It is a real service to the community. Thank you very much! >Dave Thanks! That is very nice! Ron From eliot.miranda at gmail.com Wed Feb 25 00:41:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 25 00:41:13 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: Hi All, after a period of instability due to internal changes needed for the Spur 64-bit V I hope that these latest VMs will be more stable. ------------------------------------------------------------------------ CogVM source as per VMMaker.oscog-eem.1080/r3263 Mostly internal changes due to better inlining and type inferrence machinery in Slang. General: Fix a type declaration error uncovered by the new inlining. Simplify primitiveMakePoint. Include primitiveMethodXray Include freeMethod: in Cogit's api for method xray. Spur: Fix a typing bug in initializeOldSpaceFirstFree:. Newspeak: Move the Newspeak plugins to nsspursrc/plugins. Fix privacy violation checking for super sends. Fix some type warnings in Spur stack VMs. Slang: More improvement to type inferrence/propagation. Support ifTrue:ifFalse:. Better separate the passes in inferTypesForImplicitlyTypedVariablesAndMethods. Fix slip in nodeToCast:to:. Provide types for atan, et al. Avoid casting nil. Don't inline complex expressions that are bound to variables used in asserts. General: Add an option to control FailUnbalancedPrimitives and no longer burden the Stack VMs with the responsibility. Fix typing multiple assignments to a variable - promote the type to the largest integral type of all assignments (primitiveDecompressFromByteArray) - do /not/ promote a variable typed with integral type to a floating point type (transformColor:) On type compatibility of inlined expressions, insist on signed compatibility or accept an untyped actual. Improve the type inferrence machinery further to support pointer subtraction. Eliminate code duplication (determineTypeFor:in: now uses returnTypeForSend:, etc). Change the heuristic for inlining expressions to include a maximum usage count. Slang: Rescue translation of the non-64-bit Spur VMs by a) doing a better job of super expansions, handling expansions that are returning ifs as well as just returns correctly. b) transforming variable := expr ifTrue: [s1] ifFalse: [s2] into expr ifTrue: [variable := s1] ifFalse: [variable := s2] to allow inlining of s1 & s2. And take advantage of the better inlining in copyAndForward: General: Simplify primitiveDisplayString given isArray:. Refactor positive32BitIntegerFor: and signed32BitIntegerFor: in the realization that these reduce to essentially integerObjectOf: in 64-bit Spur. The idea is to inline if in 64-bit Spur but not if in the 32-bit VMs. Add notOption: processing to allow excluding noInlineSigned32BitIntegerFor: et al. Add hasSixtyFourBitImmediates to no longer assume that wordSize = 8 implies 64-bit immediates. Use positiveMachineIntegerFor: in place of positive32BitIntegerFor: in some plugins. Simplify two B3DAcceleratorPlugin prims given topRemappableOop and isArray: -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/91ea78d5/attachment.htm From lewis at mail.msen.com Wed Feb 25 01:21:51 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Feb 25 01:21:53 2015 Subject: [squeak-dev] recording sound on *nix via ALSA libs In-Reply-To: <20150222202732.GA41775@shell.msen.com> References: <15A413E0-D8CE-4BD1-825B-30A7059B21E0@rowledge.org> <20150222202732.GA41775@shell.msen.com> Message-ID: <20150225012151.GA85141@shell.msen.com> > On Sun, Feb 23, 2015 at 1:30 PM, tim Rowledge wrote: > > On Sun, Feb 22, 2015 at 03:27:32PM -0500, David T. Lewis wrote: > > On Sun, Feb 22, 2015 at 10:48:44AM -0800, tim Rowledge wrote: > > > I?m attempting to hook up the scratch sound recording on Pi; which > > > amongst other things requires setting up add-on hardware that may or > > > may not work, be comprehendable, or even taste of the correct chocolate . > > > > > > Before I get too lost in trying to work out why things don?t work I would > > > love to know if anyone has been able to use ALSA libs to record on any > > > machine/*nix version/hardware? Just knowing a workable configuration exists > > > would be helpful. > > > > On a trunk image, if I enable the shared flaps, then drag a "Sound" morph > > from the Widgets flap, I can record and play awful sounding things with > > an interpreter VM running whatever it gets hooked up to on my Ubuntu box. > > > > If I specify -vm-sound-pulse, I get fairly good audio quality. > > > > If I specify -vm-sound-ALSA, I get a primitive failure with this error on > > the VM console: > > > > sound_StartRecording: snd_add_pcm_handler: Function not implemented > > > > If I use a precompiled interpreter VM or Cog VM on my system, and specify > > -vm-sound-ALSA, I get this error on the VM console: > > > > ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so > > ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default > > start_SoundRecording: snd_pcm_open: No such file or directory > > > > The primitive failure is for primitiveSoundStartRecording in the SoundPlugin. > > > > I think that the ALSA support code is out of date with respect to the > > libraries provided in current Linux distributions. > > > > There are several issues related to ALSA on bugs.squeak.org. This one looks > > like the issue I am seeing, and may give you an idea of what needs to be done: > > > > http://bugs.squeak.org/view.php?id=7328 > > Thanks for trying that out Dave; it looks like at least I???m not getting any > different errors, so that???s ??? good? > ALSA really does seem to be a major cause of pain and gnashing of teeth. > I also found this old post from Derek O'Connell concerning ALSA sound recording on the OLPC: http://lists.squeakland.org/pipermail/etoys-dev/2010-June/005040.html Derek explains some ALSA sound recording issues on the OLPC XO platform, which I think are loosely equivalent to what you may need for the Raspberry Pi. My poorly educated impression is that ALSA is considered outdated on generic Linux distributions, but that it probably still serves as a workable low end solution on minimalist platforms like the Pi. I think that Derek implemented, or was at least involved in, the pulse audio support for Squeak (the one that actually records and plays listenable sound on my Ubuntu laptop). His post offers suggestions for fixing ALSA based on what he did for pulse. I believe that Derek's changes for ALSA were adopted by Ian in the trunk code in SVN commit #2712 for sqUnixSoundALSA.c. That update is from 22 months ago. The oscog branch is older (sqUnixSoundALSA.c update 4 years ago and not changed since then), but is a larger file size so presumably contains various other enhancements. I do not know if it includes Derek's changes. I don't know if any of this is helpful, but I suspect that the OLPC platform, though older, may be similar to Raspberry Pi in the sense that it runs on low cost minimal hardware, and probably uses the smallest and simplest sound support available. I am getting the impression that updating the ALSA support would be a good thing to do for low end platforms like the Pi. Tim, is this something you plan to be working on? I appreciate your lack of sympathy for all things *nix, but it does seem like this might be a worthwhile effort for support of Scratch (and Etoys?) on the Pi. Dave From mbaehr at email.archlab.tuwien.ac.at Wed Feb 25 02:56:05 2015 From: mbaehr at email.archlab.tuwien.ac.at (=?utf-8?q?Martin_B=C3=A4hr?=) Date: Wed Feb 25 02:56:11 2015 Subject: [squeak-dev] Re: This forum seems very close to inactive (2 weeks since last message) In-Reply-To: <54ECF327.8010201@cox.net> References: <54ECF327.8010201@cox.net> Message-ID: <1424832613-sup-5132@email.archlab.tuwien.ac.at> Excerpts from Lawson English's message of 2015-02-24 22:54:47 +0100: > >> Is it just me or is this place a ghost town? > > it must be you, because i got 120 messages in the past two weeks. > Wow. This message and one other are the only ones I have received since > 2/10/15 and mine you received because i cc'd it to you. i am removing [squeak-dev] from the subject, so you can easily see the difference. if you get this email from the list, it should have "[squeak-dev]" in the subject. most likely your list settings are, to not receive email. you need to go to the list server and change that: http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-dev check the [unsubscribe or edit options] button at the bottom. greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin B?hr working in china http://societyserver.org/mbaehr/ From eliot.miranda at gmail.com Wed Feb 25 04:10:58 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Feb 25 04:11:01 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On Tue, Feb 24, 2015 at 4:41 PM, Eliot Miranda wrote: > Hi All, > > after a period of instability due to internal changes needed for the > Spur 64-bit V I hope that these latest VMs will be more stable. > Alas, no. Large file support is broken. I'm taking these down. > > ------------------------------------------------------------------------ > CogVM source as per VMMaker.oscog-eem.1080/r3263 > > Mostly internal changes due to better inlining and type inferrence > machinery > in Slang. > > General: > Fix a type declaration error uncovered by the new inlining. > Simplify primitiveMakePoint. Include primitiveMethodXray > Include freeMethod: in Cogit's api for method xray. > > Spur: > Fix a typing bug in initializeOldSpaceFirstFree:. > > Newspeak: > Move the Newspeak plugins to nsspursrc/plugins. > > Fix privacy violation checking for super sends. > Fix some type warnings in Spur stack VMs. > > Slang: > More improvement to type inferrence/propagation. Support ifTrue:ifFalse:. > Better separate the passes in > inferTypesForImplicitlyTypedVariablesAndMethods. > Fix slip in nodeToCast:to:. Provide types for atan, et al. Avoid casting > nil. > > Don't inline complex expressions that are bound to variables used in > asserts. > > General: > Add an option to control FailUnbalancedPrimitives and > no longer burden the Stack VMs with the responsibility. > > Fix typing multiple assignments to a variable > - promote the type to the largest integral type of all assignments > (primitiveDecompressFromByteArray) > - do /not/ promote a variable typed with integral type to a floating point > type > (transformColor:) > > On type compatibility of inlined expressions, insist on signed > compatibility or > accept an untyped actual. > > Improve the type inferrence machinery further to > support pointer subtraction. Eliminate code duplication > (determineTypeFor:in: now uses returnTypeForSend:, etc). > > Change the heuristic for inlining expressions to include a maximum usage > count. > > Slang: > Rescue translation of the non-64-bit Spur VMs by > a) doing a better job of super expansions, handling expansions > that are returning ifs as well as just returns correctly. > b) transforming variable := expr ifTrue: [s1] ifFalse: [s2] into > expr ifTrue: [variable := s1] ifFalse: [variable := s2] > to allow inlining of s1 & s2. > > And take advantage of the better inlining in copyAndForward: > > General: > Simplify primitiveDisplayString given isArray:. > > Refactor positive32BitIntegerFor: and signed32BitIntegerFor: in the > realization > that these reduce to essentially integerObjectOf: in 64-bit Spur. The > idea is > to inline if in 64-bit Spur but not if in the 32-bit VMs. Add notOption: > processing to allow excluding noInlineSigned32BitIntegerFor: et al. Add > hasSixtyFourBitImmediates to no longer assume that wordSize = 8 implies > 64-bit > immediates. > > Use positiveMachineIntegerFor: in place of > positive32BitIntegerFor: in some plugins. > > Simplify two B3DAcceleratorPlugin prims given topRemappableOop and isArray: > -- > best, > Eliot > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150224/837020b6/attachment.htm From Das.Linux at gmx.de Wed Feb 25 07:28:36 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Feb 25 07:28:43 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: <25021D3A-F725-496F-AA0D-15AF9CA71A1C@gmx.de> Hi On 25.02.2015, at 00:23, Ron Teitelbaum wrote: > Hello everyone, > > I?m pleased to announce the Squeak Oversight Board for 2015. First I would like to thank everyone that participated, everyone that ran for a seat, but also everyone that voted! > Thanks Ron for taking the burden to push us all to vote and for making sure the election is actually possible. > Without further ado here is your new Squeak Oversight Board for 2015, give a round of applause for: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Craig Latta > 5. David T. Lewis > 6. Chris Muller > 7. Marcel Taeumel > Congratulations! Best -Tobias From craig at netjam.org Wed Feb 25 07:57:53 2015 From: craig at netjam.org (Craig Latta) Date: Wed Feb 25 07:57:59 2015 Subject: [squeak-dev] re: Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: Thanks, Ron, for conducting the election, and to everyone for voting. -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 25 08:23:58 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 25 08:31:32 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> Message-ID: <1424852638182-4807479.post@n4.nabble.com> Hi Chris, this version is better than the original one. However, we still need: - direct removal of opening bracket should remove (automatically inserted) closing bracket, too - closing the innermost of several opening brackets should not jump to the end (i.e. "((((|))))" -> "(((())))|") - single and double quotes should be considered, too - opening a bracket in front of a letter should not insert the closing one, too (i.e. "(|Morph new") I agree with you that we do not need a stack of automatically inserted brackets but only consider the current context of the text cursor. Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807479.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 25 08:30:16 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 25 08:37:48 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: <1424853016976-4807480.post@n4.nabble.com> Wohoo, thank you! :) Which channel should I register to to get notifications about upcoming hangouts/meetings? Best, Marcel -- View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-tp4807431p4807480.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From casey.obrien.r at gmail.com Wed Feb 25 09:27:07 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Wed Feb 25 09:27:14 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: Hooray! What a great new board. If I'd have picked them by hand, well... same group of people. Thanks to all contenders for volunteering. I mean really thanks. Super excited to see what Marcel might do next. Excelsior! > On Feb 24, 2015, at 3:23 PM, "Ron Teitelbaum" wrote: > > Hello everyone, > > I?m pleased to announce the Squeak Oversight Board for 2015. First I would like to thank everyone that participated, everyone that ran for a seat, but also everyone that voted! > > Without further ado here is your new Squeak Oversight Board for 2015, give a round of applause for: > > 1. Bert Freudenberg > 2. Eliot Miranda > 3. Tim Rowledge > 4. Craig Latta > 5. David T. Lewis > 6. Chris Muller > 7. Marcel Taeumel > > All the best, > > Ron Teitelbaum > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/36514dd6/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 25 09:35:25 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 25 09:43:02 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> References: <1424797359184-4807342.post@n4.nabble.com> <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> Message-ID: <1424856925560-4807489.post@n4.nabble.com> Remove_Corner_Rounder.cs Could somebody please check the attached code? I want to commit it to trunk. As it affects several packages, I preferred to use a change set for now. :) Preferences -> Morphic -> Preferred Corner Radius Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-rounded-corners-tp4807342p4807489.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From edgardec2005 at gmail.com Wed Feb 25 10:15:11 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Wed Feb 25 10:15:23 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: Message-ID: +1 And you deserve a seat also. Maybe you could be nominated for cases when one or more members don?t could meet .... On 2/25/15 6:27 AM, "Casey Ransberger" wrote: > Hooray! What a great new board. If I'd have picked them by hand, well... same > group of people. > > Thanks to all contenders for volunteering. I mean really thanks. > > Super excited to see what Marcel might do next. > > Excelsior! > > On Feb 24, 2015, at 3:23 PM, "Ron Teitelbaum" wrote: > >> Hello everyone, >> >> I?m pleased to announce the Squeak Oversight Board for 2015. First I would >> like to thank everyone that participated, everyone that ran for a seat, but >> also everyone that voted! >> >> Without further ado here is your new Squeak Oversight Board for 2015, give a >> round of applause for: >> >> 1. Bert Freudenberg >> 2. Eliot Miranda >> 3. Tim Rowledge >> 4. Craig Latta >> 5. David T. Lewis >> 6. Chris Muller >> 7. Marcel Taeumel >> >> All the best, >> >> Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/b195b5a2/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 25 13:38:40 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 25 13:46:15 2015 Subject: [squeak-dev] Re: Squeak Oversight Board 2015 In-Reply-To: <1424853016976-4807480.post@n4.nabble.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> <1424853016976-4807480.post@n4.nabble.com> Message-ID: <1424871520452-4807557.post@n4.nabble.com> I found this in our blog: "In the 2011-12 term, we meet every 1st and 3rd Tuesday of the month at 9 am Los Angeles time." (https://squeakboard.wordpress.com/meetings/) What's the current schedule? Best, Marcel -- View this message in context: http://forum.world.st/Squeak-Oversight-Board-2015-tp4807431p4807557.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lists at dcorking.com Wed Feb 25 14:19:06 2015 From: lists at dcorking.com (David Corking) Date: Wed Feb 25 14:19:28 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: On Mon, Feb 16, 2015 at 9:17 AM, Kirk Fraser wrote >> 3) The Raspberry Pi has many pins to connect electronics to. Supporting >> those could potentially provide control for many projects for children and >> adults. On Tue, Feb 17, 2015 at 3:15 AM, Casey Ransberger wrote: > 3) Yeah, that's cool. I bet there are already people doing stuff like this. I have read that there is a version of Scratch that controls Raspberry Pi GPIO pins for input and output. See: http://simplesi.net/scratchgpio/scratch-raspberrypi-gpio/ By the way, Physical Etoys is an amazing Squeak project that supports lots of hobby and educational robotic platforms, with Lego NXT, Arduino and Duinobot built in. However it doesn't support Raspberry Pi's I/O pins, but only those boards that you can connect to a computer's USB. (Some Physical Etoys are Windows only, so take care to choose one that works on Raspberry Pi.) http://tecnodacta.com.ar/gira/projects/physical-etoys/ Have fun! David From craig at netjam.org Wed Feb 25 15:03:33 2015 From: craig at netjam.org (Craig Latta) Date: Wed Feb 25 15:04:00 2015 Subject: [squeak-dev] re: Squeak Oversight Board 2015 In-Reply-To: <1424871520452-4807557.post@n4.nabble.com> References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> <1424853016976-4807480.post@n4.nabble.com> <1424871520452-4807557.post@n4.nabble.com> Message-ID: Hi Marcel and all-- > Which channel should I register to to get notifications about > upcoming hangouts/meetings? I invited you to http://squeak.slack.com , that's our notification system of first and last resort. :) There are several channels there for different things (the board, modules, squeakjs, vm, etc.). If anyone else would like an invite, please let me know. > What's the current schedule? Currently we meet on first and third Thursdays from 18.30 to 19.30 Central European Time, but we usually revisit that during the first meeting of the term. welcome! -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From unoduetre at poczta.onet.pl Wed Feb 25 17:39:35 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Wed Feb 25 16:46:06 2015 Subject: [SPAM] Re: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) In-Reply-To: <54ECF327.8010201@cox.net> (from lenglish5@cox.net on Tue Feb 24 22:54:47 2015) References: <54EC9F49.8010407@cox.net> Message-ID: <1424885975.19201.1@mglap> Please check the archives at http://lists.squeakfoundation.org/pipermail/squeak-dev/ Mateusz From unoduetre at poczta.onet.pl Wed Feb 25 17:40:11 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Wed Feb 25 16:47:10 2015 Subject: [SPAM] Re: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) In-Reply-To: <54ECF327.8010201@cox.net> (from lenglish5@cox.net on Tue Feb 24 22:54:47 2015) References: <54EC9F49.8010407@cox.net> Message-ID: <1424886011.19201.2@mglap> Dnia 24.02.2015 22:54:47, Lawson English napisa?(a): > Wow. This message and one other are the only ones I have received > since 2/10/15 > > L > Please check the archives at http://lists.squeakfoundation.org/pipermail/squeak-dev/ Mateusz From unoduetre at poczta.onet.pl Wed Feb 25 17:46:46 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Wed Feb 25 16:56:04 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> (from ron@usmedrec.com on Wed Feb 25 00:23:41 2015) Message-ID: <1424886406.19201.3@mglap> > 1. Bert Freudenberg > > 2. Eliot Miranda > > 3. Tim Rowledge > > 4. Craig Latta > > 5. David T. Lewis > > 6. Chris Muller > > 7. Marcel Taeumel > Congratulations for the new board members. Ron, thank you for conducting the elections. Special congratulations for Marcel - a new face in the Squeak Oversight Board - for the courage of beeing a candidate. Mateusz From unoduetre at poczta.onet.pl Wed Feb 25 17:50:43 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Wed Feb 25 16:57:03 2015 Subject: [SPAM] Re: [squeak-dev] This forum seems very close to inactive (2 weeks since last message) In-Reply-To: <1424886011.19201.2@mglap> (from unoduetre@poczta.onet.pl on Wed Feb 25 18:40:11 2015) References: <54EC9F49.8010407@cox.net> Message-ID: <1424886643.19201.4@mglap> Dnia 25.02.2015 18:40:11, Mateusz Grotek napisa?(a): > Dnia 24.02.2015 22:54:47, Lawson English napisa?(a): >> Wow. This message and one other are the only ones I have received >> since 2/10/15 >> >> L >> > Please check the archives at > http://lists.squeakfoundation.org/pipermail/squeak-dev/ > Mateusz > Sorry for the duplication. From commits at source.squeak.org Wed Feb 25 17:11:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Feb 25 17:11:35 2015 Subject: [squeak-dev] The Inbox: Morphic-cmm.760.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-cmm.760.mcz ==================== Summary ==================== Name: Morphic-cmm.760 Author: cmm Time: 25 February 2015, 11:10:50.52 am UUID: cb56fac4-692f-4ad9-8b44-066b81780f66 Ancestors: Morphic-cmm.759 - Remove attempt to advance past "logical" expressions when typing closers with Auto Enclose because it causes it to advance past multiple consecutive identical closers, undesirably. =============== Diff against Morphic-cmm.759 =============== Item was changed: ----- Method: TextEditor>>dispatchOnKeyboardEvent: (in category 'typing support') ----- dispatchOnKeyboardEvent: aKeyboardEvent "Carry out the action associated with this character, if any. Type-ahead is passed so some routines can flush or use it." | honorCommandKeys openers closers result typedChar | ((typedChar := aKeyboardEvent keyCharacter) == Character cr and: [ morph acceptOnCR ]) ifTrue: [ self closeTypeIn. ^ true ]. self clearParens. aKeyboardEvent keyValue = 13 ifTrue: [ aKeyboardEvent controlKeyPressed ifTrue: [ ^ self normalCharacter: aKeyboardEvent ]. aKeyboardEvent shiftPressed ifTrue: [ ^ self lf: aKeyboardEvent ]. aKeyboardEvent commandKeyPressed ifTrue: [ ^ self crlf: aKeyboardEvent ]. ^ self crWithIndent: aKeyboardEvent ]. ((honorCommandKeys := Preferences cmdKeysInText) and: [ typedChar = Character enter ]) ifTrue: [ ^ self dispatchOnEnterWith: aKeyboardEvent ]. "Special keys overwrite crtl+key combinations - at least on Windows. To resolve this conflict, assume that keys other than cursor keys aren't used together with Crtl." ((self class specialShiftCmdKeys includes: aKeyboardEvent keyValue) and: [ aKeyboardEvent keyValue < 27 ]) ifTrue: [ ^ aKeyboardEvent controlKeyPressed ifTrue: [ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ifFalse: [ self perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ]. "backspace, and escape keys (ascii 8 and 27) are command keys" ((honorCommandKeys and: [ aKeyboardEvent commandKeyPressed ]) or: [ self class specialShiftCmdKeys includes: aKeyboardEvent keyValue ]) ifTrue: [ ^ aKeyboardEvent shiftPressed ifTrue: [ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ifFalse: [ self perform: (self class cmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ] ]. "the control key can be used to invoke shift-cmd shortcuts" (honorCommandKeys and: [ aKeyboardEvent controlKeyPressed ]) ifTrue: [ ^ self perform: (self class shiftCmdActions at: aKeyboardEvent keyValue + 1) with: aKeyboardEvent ]. openers := '([{'. closers := ')]}'. (closers includes: typedChar) ifTrue: [ self blinkPrevParen: typedChar. self nextNonwhitespaceCharacter = typedChar ifTrue: + [ self moveCursor: [ : position | position + 1 ] forward: true select: false. - [ [self nextNonwhitespaceCharacter = typedChar] whileTrue: [self - moveCursor: [ : position | position + 1 ] - forward: true - select: false ]. ^ false ] ifFalse: [ result := self normalCharacter: aKeyboardEvent ] ] ifFalse: [ result := self normalCharacter: aKeyboardEvent ]. (self class autoEnclose and: [ openers includes: typedChar ]) ifTrue: [ self addString: (closers at: (openers indexOf: typedChar)) asString ; insertTypeAhead ; moveCursor: [ : position | position - 1 ] forward: false select: false ]. ^ result! From asqueaker at gmail.com Wed Feb 25 17:13:41 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 25 17:13:47 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424852638182-4807479.post@n4.nabble.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: On Wed, Feb 25, 2015 at 2:23 AM, Marcel Taeumel wrote: > Hi Chris, > > this version is better than the original one. However, we still need: > > - direct removal of opening bracket should remove (automatically inserted) > closing bracket, too Squeak already supports that. Simply select the expression, and then press Command+( to remove parenthesis, Command+[ to remove [, etc. That is one of Squeak's *expression-editing* functions. Currently, Squeak brilliantly supports both *text-editing* and expression-editing simultaneously in a _modalless_ way. The proposal to automatically remove the inserted closing bracket by a *text-editing* operation intrudes across the boundary between text vs. expression editing. We should not do that, we should maintain the current brilliant balance between the two which we have now. > - closing the innermost of several opening brackets should not jump to the > end (i.e. "((((|))))" -> "(((())))|") Okay, I fixed that by removing my special feature of skipping past the "logical expression" (through any potential whitespace) so that now it just checks the next character and . > - single and double quotes should be considered, too I'm not making enhancements right now, just trying to make this great feature less annoying to my Squeakers. Just spreading some love. :) Double-quote would require a little more work to make work wiht the Paren-blinking function. And single-quote is used singly often enough (e.g., in contractions) that I'm not sure it wouldn't turn into an annoyance -- although I can see itwould be great for typing Strings literals.. > - opening a bracket in front of a letter should not insert the closing one, > too (i.e. "(|Morph new") I'm not sure I understand, but it sounds like this would again intermix text and expression-editing in a way that would be too intrusive for pure text-editing. The "Auto Enclose" preference needs to maximize its helpfulness, while minimizing its instrusiveness.. From asqueaker at gmail.com Wed Feb 25 17:36:57 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 25 17:37:01 2015 Subject: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: References: <037d01d05088$ee2b64e0$ca822ea0$@usmedrec.com> Message-ID: On Wed, Feb 25, 2015 at 3:27 AM, Casey Ransberger wrote: > Hooray! What a great new board. If I'd have picked them by hand, well... > same group of people. It would have been just as great had you gotten elected instead (and you were near very the top of my ballot). I definitely like your attitude and will vote for you again if you run next year. From tim at rowledge.org Wed Feb 25 17:50:10 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 25 17:50:14 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424852638182-4807479.post@n4.nabble.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: Shouldn?t the automatic text completion & wrapping stuff be made a part of Shout? Seems like a place where textual/semantic analysis is being done already, where one might be able to work out whether a ( is closing a chunk that already has a ) etc. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- His head whistles in a cross wind. From tim at rowledge.org Wed Feb 25 18:10:28 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Feb 25 18:10:34 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: On 25-02-2015, at 6:19 AM, David Corking wrote: > On Mon, Feb 16, 2015 at 9:17 AM, Kirk Fraser wrote > >>> 3) The Raspberry Pi has many pins to connect electronics to. Supporting >>> those could potentially provide control for many projects for children and >>> adults. > > On Tue, Feb 17, 2015 at 3:15 AM, Casey Ransberger > wrote: > >> 3) Yeah, that's cool. I bet there are already people doing stuff like this. > > I have read that there is a version of Scratch that controls Raspberry > Pi GPIO pins for input and output. See: > > http://simplesi.net/scratchgpio/scratch-raspberrypi-gpio/ Si?s scratchGPIO is a python sorta-server app that listens to the Scratch broadcasts and handles all sorts of wild and whacky cases. It also broadcasts back sensor values etc. It?s pretty damn clever, although the code is, well, a bit grungy in places. It?s also Python. I?m not a huge fan of vast chunks of text in files. And whitespace being the major syntactical determinant of semantics? Eek. There?s also a bundle of Python based stuff from Pridopia in the uk to support there range of add-on boards. I know of several people working on more direct gpio/pi access - Doug, Marten, Herbert, me - from Squeak and/or scratch. I have a fairly nicely working demo that can do basic gpio pin control and i2c device support for PiGlow/PiFace etc. Doing things in squeak allows some options not available to any outside code such as providing lists of understood broadcasts & variables, UI access etc. Anyone interested in the latest state of scratch on squeak can try running the current Pi release - https://copy.com/lmzI1gwLrdfYuxzf Obviously it runs on all modern platforms. To get behind the friendly facade, shift-click on the top half of the $R in ?Scratch? and choose ?turn fillscreen off?. For robot specific stuff there is (or at least was) Enchanting, a variant that has lots of ?bot stuff. And there is ?S4A? that provides scratchy arduino programming tools. And there is Phratch, which is a pharo image with scratch stuff and a lot of interesting extensions. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: HEM: Hide Evidence of Malfunction From unoduetre at poczta.onet.pl Wed Feb 25 19:30:11 2015 From: unoduetre at poczta.onet.pl (Mateusz Grotek) Date: Wed Feb 25 18:37:00 2015 Subject: [SPAM] Re: [squeak-dev] Squeak Oversight Board 2015 In-Reply-To: (from asqueaker@gmail.com on Wed Feb 25 18:36:57 2015) Message-ID: <1424892611.21529.2@mglap> Dnia 25.02.2015 18:36:57, Chris Muller napisa?(a): > On Wed, Feb 25, 2015 at 3:27 AM, Casey Ransberger > wrote: > > Hooray! What a great new board. If I'd have picked them by hand, > well... > > same group of people. > > It would have been just as great had you gotten elected instead (and > you were near very the top of my ballot). I definitely like your > attitude and will vote for you again if you run next year. > > Well, I think Casey did not give himself a chance with the text: "May I recommend voting for *everyone* who isn't me." Casey, please be more positive in the next elections! :-) From bert at freudenbergs.de Wed Feb 25 18:41:23 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Feb 25 18:41:30 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424852638182-4807479.post@n4.nabble.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: On 25.02.2015, at 00:23, Marcel Taeumel wrote: > > Hi Chris, > > this version is better than the original one. However, we still need: > > - direct removal of opening bracket should remove (automatically inserted) > closing bracket, too Yep. Typing "("-"" needs to delete both the typed and auto-inserted parens. Similarly, typing "["-"("-""-"" needs to delete the two typed and the two inserted chars. > - closing the innermost of several opening brackets should not jump to the > end (i.e. "((((|))))" -> "(((())))|") > - single and double quotes should be considered, too > - opening a bracket in front of a letter should not insert the closing one, > too (i.e. "(|Morph new") +1 to all of these. > I agree with you that we do not need a stack of automatically inserted > brackets but only consider the current context of the text cursor. To get it Right?, we do need a stack, IMHO. Morphic-cmm.760 still ignores what the user typed. It *explicitly* ignores it. If I have "bar)))))" and want to type another ")" after the "r", it does not let me. And that's not Right? :) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/9fb326be/smime.bin From marcel.taeumel at student.hpi.uni-potsdam.de Wed Feb 25 19:12:19 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Feb 25 19:19:57 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: <1424891539996-4807691.post@n4.nabble.com> Hmm... I guess the user keeps track on what she sees on the screen. Such a stack of inserted backets must be discoverable/visible somehow. That's why I think simple context recognition (i.e. the character next du the text cursor) should be enough and quite discoverable/usable. We could do it like this: If there is a non-letter-non-digit or nothing after the cursor, insert the closing char, too. If you type that closing char yourself, overwrite it--one after another. If you remove an opening char, remove the closing one, too, if it follows directly. Typing the opening char on a selection of text encloses that selection. Such chars could be () [] {} "" '' Eclipse seems to do it roughly this way...except for the selection trick. But I like that. :) @Bert: If you want to type another ) at "bar|))))" then you would miss an opening brace. ;) If not, you would have to append it after the last ) -- like it is in OCompletion right now. Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807691.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Wed Feb 25 19:59:05 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Feb 25 19:59:08 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424891539996-4807691.post@n4.nabble.com> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> <1424891539996-4807691.post@n4.nabble.com> Message-ID: <22498E38-C7A4-482B-9B03-DB28E7C7BF41@freudenbergs.de> On 25.02.2015, at 11:12, Marcel Taeumel wrote: > > Hmm... I guess the user keeps track on what she sees on the screen. Such a > stack of inserted backets must be discoverable/visible somehow. No. The user doesn't have to keep track, because the editor does. It's the editor doing magic tricks, so it's the editor's responsibility to keep track of what it did. Try ACE (http://ace.c9.io), or any editor that gets it Right?. > @Bert: If you want to type another ) at "bar|))))" then you would miss an > opening brace. Huh? I of course would have inserted that opening paren before. Click somewhere in the expression, type "(", click somewhere else, type ")". Why wouldn't it let me do that? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/b858fb17/smime.bin From asqueaker at gmail.com Wed Feb 25 20:52:28 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 25 20:52:31 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: > Morphic-cmm.760 still ignores what the user typed. It *explicitly* ignores it. If I have "bar)))))" and want to type another ")" after the "r", it does not let me. And that's not Right? :) Anytime you have multiple consecutive closers of the same type, it doesn't matter whether you add it to the front or the end. Just keep typing ) until you get there and it'll start adding. Bert, the way this went down was: 1) you complained with only emotion, 2) I asked for concrete clarification, 3) you clarified, 4) I went and (tried to) fix to your specification, 5) you complain about a new (non)problem. I'm trying to help here, but what is not helpful is to block any and all progress with these complaints about how these non-real-world use-cases aren't solved, and then to top it off, offering no guidance about what it SHOULD do. It's clear this is more about you wanting to complicate the implementation with a stack. If you have time for that go for it. I won't do it because when I analyze the use-cases, it's clear that implementation is way overkill. Not worth the effort nor the extra complexity. Just be sure to please start it out in the Inbox first so I can offer my own critique.. From nicolas.cellier.aka.nice at gmail.com Wed Feb 25 22:01:53 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Feb 25 22:01:57 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: 2015-02-25 21:52 GMT+01:00 Chris Muller : > > Morphic-cmm.760 still ignores what the user typed. It *explicitly* > ignores it. If I have "bar)))))" and want to type another ")" after the > "r", it does not let me. And that's not Right? :) > > Anytime you have multiple consecutive closers of the same type, it > doesn't matter whether you add it to the front or the end. Just keep > typing ) until you get there and it'll start adding. > > Oh yes it does matter. If I click to position the cursor and type some character, then yes i expect some character to be inserted where I clicked. If I want to do something special, then I prefer to tell it with some special key combination (alt ctrl cmd esc whatever...). Every other behaviour is a surprising hurdle suddenly raising in my way. It forces my mind to shift focus on this damn editor than cannot do the most simple thing. Having to concentrate to guess how to make it understand what I want instead of focusing on my own problem, is the exact definition for disruptive. That just mean that: - the editor is restricted to a specific way of doing things instead of being versatile, - it's to the user to do things like the editor want them to be done, rather than the contrary. Bert, the way this went down was: 1) you complained with only > emotion, 2) I asked for concrete clarification, 3) you clarified, 4) I > went and (tried to) fix to your specification, 5) you complain about a > new (non)problem. > > I think this is unfair here. I feel this is a problem just like Bert think it's a problem. > I'm trying to help here, but what is not helpful is to block any and > all progress with these complaints about how these non-real-world > use-cases aren't solved, and then to top it off, offering no guidance > about what it SHOULD do. > > The real world use case is to let the most simple behaviour just work. An editor that is kindly proposing an automatic completion is what I would expect. If it has a good matching ratio I'll eventually keep it up, otherwise it will be another distraction that I prefer to switch off. But an editor that is interpreting my input in a way that doesn't match my will is the best candidate for trash bin. I think Bert gave example of behaviour in a form of a link. Maybe that is not detailed enough, but it's a guidance already. It's clear this is more about you wanting to complicate the > implementation with a stack. If you have time for that go for it. I > won't do it because when I analyze the use-cases, it's clear that > implementation is way overkill. Not worth the effort nor the extra > complexity. > > A program that does not fullfil my expectations just for the sake of being simple to implement is not of high value. What matters more than implementation is a versatile and unsurprising behavior of the editor. That's why a majority of us simply prefer no auto-completion at all rather than a broken one. It can be a gadget to try in the Preferences if we're in the mood to, but not the default behavior. > Just be sure to please start it out in the Inbox first so I can offer > my own critique.. > > Well, I feel sorry to write such mail that may seem much more violent than it needs too. I'd prefer to be more positive and helpful, but Chris, you have to understand our griefs: we don't want compromise or workaround, We want an editor that just works. You are making progress and yet improving the gadget, but the minimum features to make it acceptable is not yet there. Please keep on :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/33f39a4b/attachment.htm From bert at freudenbergs.de Wed Feb 25 22:04:18 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Feb 25 22:04:24 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: On 25.02.2015, at 12:52, Chris Muller wrote: > Just keep typing ) until you get there and it'll start adding. Please tell me you're kidding. > Bert, the way this went down was: 1) you complained with only > emotion, 2) I asked for concrete clarification, 3) you clarified, 4) I > went and (tried to) fix to your specification, 5) you complain about a > new (non)problem. No. My specification was (and I quote): "skip over the auto-inserted part". Not "always ignore a typed paren if there happens to be one at the cursor". > I'm trying to help here, but what is not helpful is to block any and > all progress with these complaints about how these non-real-world > use-cases aren't solved, and then to top it off, offering no guidance > about what it SHOULD do. Marcel and I tried to tell you exactly what it should do. And I pointed you repeatedly to an example of the right behavior. Which you continue to ignore. > It's clear this is more about you wanting to complicate the > implementation Nonsense. It's about not breaking fundamental invariants of typing behavior in the editor. > with a stack. If you can make the editor keep track of what it auto-inserted by something else than a stack, yay, go for it. The point is that it needs to be able to distinguish between automatically inserted parts and user-typed parts *somehow*. > If you have time for that go for it. I > won't do it because when I analyze the use-cases, it's clear that > implementation is way overkill. Not worth the effort nor the extra > complexity. Then the only solution right now is to turn off the feature by default. Which is what I was suggesting back at the beginning of this discussion. It's a reasonable fix until someone does it right. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150225/32373edc/smime.bin From asqueaker at gmail.com Wed Feb 25 23:52:47 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Feb 25 23:52:49 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: >> Just keep typing ) until you get there and it'll start adding. > > Please tell me you're kidding. Of course I'm not. >> Bert, the way this went down was: 1) you complained with only >> emotion, 2) I asked for concrete clarification, 3) you clarified, 4) I >> went and (tried to) fix to your specification, 5) you complain about a >> new (non)problem. > > No. My specification was (and I quote): "skip over the auto-inserted part". Not "always ignore a typed paren if there happens to be one at the cursor". Well, in normal 99% usage, it does skip over the auto-inserted part. I get what you're saying, I just can't believe you consider such a strange and rare case a deal breaker. >> I'm trying to help here, but what is not helpful is to block any and >> all progress with these complaints about how these non-real-world >> use-cases aren't solved, and then to top it off, offering no guidance >> about what it SHOULD do. > > Marcel and I tried to tell you exactly what it should do. And I pointed you repeatedly to an example of the right behavior. Which you continue to ignore. Not at all. Marcel and I were already conversing privately about those things you said "+1 to all these" and I agree with all of them too (except the last one for good reason which I cut-and-pasted for you below from my conversation with Marcel). Marcel and I tried to tell you that we don't need a stack to keep track of that. I actually meant, "we don't need to keep track of that at all (stack or however)" and I think maybe Marcel meant the same but he can clarify for himself. > Nonsense. It's about not breaking fundamental invariants of typing behavior in the editor. Auto Enclose is -->all about--> "breaking fundamental invariants of typing behavior" for the benefit of assembling and editing valid, well-formed Smalltalk expressions! What you've done is chosen a very specific corner-case (it doesn't even deserve to be called it a "case", so far its just a "hypothetical") that 1) rarely occurs and 2) has an easy work-around when it does occur, as reason to block the whole thing. > The point is that it needs to be able to distinguish between automatically inserted parts and user-typed parts *somehow*. Why? Maybe you could provide 1 example from the image where you feel typing that method with Auto Enclose wouldn't perform to your specification or otherwise be a terrible nuisance compared to with it turned off. How many methods in the system present such a challenge? For every 1 you find, I bet can I find 10 (or 100!) where it does meet your specification ("skip over the auto-inserted part") and therefore overall better to enjoy the benefits of Auto Enclose turned on. >> If you have time for that go for it. I >> won't do it because when I analyze the use-cases, it's clear that >> implementation is way overkill. Not worth the effort nor the extra >> complexity. > > Then the only solution right now is to turn off the feature by default. Which is what I was suggesting back at the beginning of this discussion. It's a reasonable fix until someone does it right. I think its unfortunate and very confusing that the guy who has helped thousands of people write well-formed and properly nested expressions via Etoys would prefer to let one specific (hypothetical?) corner case which occurs in < 1% of all Smalltalk code deprive new users the benefit of helping them assemble valid, well-formed Smalltalk expressions the other 99% of the time. - Chris [1] -- In offline discussion with Marcel concerning those "+1 to all those" items: (Marcels is demarked by >). Marcel wrote: > Hmm... If there is a non-letter, non-digit, or nothing after the cursor, > insert the closing char, too. You mean, "only if" there is a non-letter, non-digit, right? I think it needs to stay as unconditional insertion. The reason is, when I enter or edit a method, I enjoy the luxury of not worrying at all about formatting. I position my cursor anywhere between two expressions and start streaming code out of my fingers as fast as they can type without wasting time using Return or Tab keys whatsoever. Sure, I have ugly, unformatted code for a moment, but thanks to Auto Enclose, I know I have whole expressions and so am assured that the parser-formatter *can* format with a single keystroke (Command+Shift+S). When I initially position the cursor to insert my expression, I'm totally unconcerned about the "text" and only looking at my code in terms of its chunky "expressions". So, I don't have to worry whether the auto-enclose is going to work or not; I *know* it is going to work. The above proposal takes me out of my ability to do that, and forces me to stop to think about what text / whitespace exists in front of the cursor when I go to insert my expression. Whew! Sorry for the long-winded explanation.. :) Does it make sense? > If you remove an opening char, remove the closing one, too, if > it follows directly. I like that, because its consistent with the way the expression was brought into the code; as a single gesture. > Such chars could be () [] {} "" '' Already there for () [] and {}. " seems to make sense, however ' is used so much in contractions; I don't know... From asqueaker at gmail.com Thu Feb 26 00:18:25 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Feb 26 00:18:26 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: >> > Morphic-cmm.760 still ignores what the user typed. It *explicitly* >> > ignores it. If I have "bar)))))" and want to type another ")" after the "r", >> > it does not let me. And that's not Right? :) >> >> Anytime you have multiple consecutive closers of the same type, it >> doesn't matter whether you add it to the front or the end. Just keep >> typing ) until you get there and it'll start adding. >> > > Oh yes it does matter. > If I click to position the cursor and type some character, then yes i expect > some character to be inserted where I clicked. Which is exactly what it does except for the case where you would desire to mess up the balance of your nested expressions.. > If I want to do something special, then I prefer to tell it with some > special key combination (alt ctrl cmd esc whatever...). I think what you said you want to do in your above paragraph sounds like "something special". With Auto Enclose already on, there should be no need to ever insert your own closers, which means you're just talking about *extra* closers (or closer characters that are not being used as closers), and *even then* would only trip your gripe if the very next character happened to be the same closer-character. Is it really worth putting so much effort and complexity to cover the case that occurs that rarely? > ... snip... > > The real world use case is to let the most simple behaviour just work. Could you possibly articulate a real-world use-case DOESN'T "just work?" > I think Bert gave example of behaviour in a form of a link. Maybe that is > not detailed enough, but it's a guidance already. Give one example of Smalltalk code that works in Ace but not TextEditor that a Smalltalker would care about. > A program that does not fullfil my expectations just for the sake of being > simple to implement is not of high value. > What matters more than implementation is a versatile and unsurprising > behavior of the editor. It's when its simple that users can get to understand its behavior so that it is not surprising. It's when we make it so overly complicated with so many rules and internal stacks or speical-characters that the surprises creep in.. Such complex solutions to such rare corner cases is the kind of thing I think that the Pharo camp might refer to as "crap"... > That's why a majority of us simply prefer no auto-completion at all rather > than a broken one. (I assume by "auto-completion" you mean Auto Enclose). There is no data that a "majority" prefers it off, certainly not with the new enhacnement in the Inbox, because it has not had enough usage for people to try it and weigh in. > I'd prefer to be more positive and helpful, but Chris, you have to > understand our griefs: we don't want compromise or workaround, > We want an editor that just works. I am making effort to understand your grief. That's why I prodded y'all for details and worked up an Inbox contributions. > You are making progress and yet improving the gadget, but the minimum > features to make it acceptable is not yet there. > Please keep on :) For me, Auto Enclose was already good enough even before Morphic-cmm.759. For just a little code change, Morphic-cmm.760, while surely not perfect, was my attempt to provide a decent step of improvement TOWARD what you guys expressed your dissatisfaction about. Regards, Chris From Das.Linux at gmx.de Thu Feb 26 00:23:57 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Feb 26 00:24:02 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: Hey, On 26.02.2015, at 00:52, Chris Muller wrote: >>> Just keep typing ) until you get there and it'll start adding. >> >> Please tell me you're kidding. > > Of course I'm not. > >>> Bert, the way this went down was: 1) you complained with only >>> emotion, 2) I asked for concrete clarification, 3) you clarified, 4) I >>> went and (tried to) fix to your specification, 5) you complain about a >>> new (non)problem. >> >> No. My specification was (and I quote): "skip over the auto-inserted part". Not "always ignore a typed paren if there happens to be one at the cursor". > > Well, in normal 99% usage, it does skip over the auto-inserted part. > I get what you're saying, I just can't believe you consider such a > strange and rare case a deal breaker. Sorry, but I must chime in. This is not rare, at least for me. I had other editors that did it like you suggest (for example RStudio) and it is annoying; it has this 'hey, I am way smarter than you ;)' attitude wich gets very annoying over time > >>> I'm trying to help here, but what is not helpful is to block any and >>> all progress with these complaints about how these non-real-world >>> use-cases aren't solved, and then to top it off, offering no guidance >>> about what it SHOULD do. >> >> Marcel and I tried to tell you exactly what it should do. And I pointed you repeatedly to an example of the right behavior. Which you continue to ignore. > > Not at all. Marcel and I were already conversing privately about > those things you said "+1 to all these" and I agree with all of them > too (except the last one for good reason which I cut-and-pasted for > you below from my conversation with Marcel). > > Marcel and I tried to tell you that we don't need a stack to keep > track of that. I actually meant, "we don't need to keep track of that > at all (stack or however)" and I think maybe Marcel meant the same but > he can clarify for himself. > >> Nonsense. It's about not breaking fundamental invariants of typing behavior in the editor. > > Auto Enclose is -->all about--> "breaking fundamental invariants of > typing behavior" for the benefit of assembling and editing valid, > well-formed Smalltalk expressions! It is? I thought it is just for putting parens around stuff. Because code is not all there is?. > > What you've done is chosen a very specific corner-case (it doesn't > even deserve to be called it a "case", so far its just a > "hypothetical") that 1) rarely occurs nope. > and 2) has an easy work-around > when it does occur, as reason to block the whole thing. > >> The point is that it needs to be able to distinguish between automatically inserted parts and user-typed parts *somehow*. > > Why? Maybe you could provide 1 example from the image where you feel > typing that method with Auto Enclose wouldn't perform to your > specification or otherwise be a terrible nuisance compared to with it > turned off. How many methods in the system present such a challenge? > For every 1 you find, I bet can I find 10 (or 100!) where it does meet > your specification ("skip over the auto-inserted part") and therefore > overall better to enjoy the benefits of Auto Enclose turned on. See: code I have ( | is cursor ) self foo: (knorz bar: max) "ah, there is something missing" |self foo: (knorz bar: max) " ... " c add: |self foo: (knorz bar: max) " oh, that now needs parens " c add: ()|self foo: (knorz bar: max) " ARGH " c add: (|self foo: (knorz bar: max) " Backspace " c add: (self foo: (knorz bar: max|) " maybe an off by one? add +1 " c add: (self foo: (knorz bar: max + 1|) " Ohm a closing paren still missing. I now type )" c add: (self foo: (knorz bar: max + 1)| " ARGH " Best -Tobias > >>> If you have time for that go for it. I >>> won't do it because when I analyze the use-cases, it's clear that >>> implementation is way overkill. Not worth the effort nor the extra >>> complexity. >> >> Then the only solution right now is to turn off the feature by default. Which is what I was suggesting back at the beginning of this discussion. It's a reasonable fix until someone does it right. > > I think its unfortunate and very confusing that the guy who has helped > thousands of people write well-formed and properly nested expressions > via Etoys would prefer to let one specific (hypothetical?) corner case > which occurs in < 1% of all Smalltalk code deprive new users the > benefit of helping them assemble valid, well-formed Smalltalk > expressions the other 99% of the time. > > - Chris > > [1] -- In offline discussion with Marcel concerning those "+1 to all > those" items: (Marcels is demarked by >). > > Marcel wrote: > >> Hmm... If there is a non-letter, non-digit, or nothing after the cursor, >> insert the closing char, too. > > You mean, "only if" there is a non-letter, non-digit, right? I think > it needs to stay as unconditional insertion. The reason is, when I > enter or edit a method, I enjoy the luxury of not worrying at all > about formatting. I position my cursor anywhere between two > expressions and start streaming code out of my fingers as fast as they > can type without wasting time using Return or Tab keys whatsoever. > Sure, I have ugly, unformatted code for a moment, but thanks to Auto > Enclose, I know I have whole expressions and so am assured that the > parser-formatter *can* format with a single keystroke > (Command+Shift+S). > > When I initially position the cursor to insert my expression, I'm > totally unconcerned about the "text" and only looking at my code in > terms of its chunky "expressions". So, I don't have to worry whether > the auto-enclose is going to work or not; I *know* it is going to > work. The above proposal takes me out of my ability to do that, and > forces me to stop to think about what text / whitespace exists in > front of the cursor when I go to insert my expression. > > Whew! Sorry for the long-winded explanation.. :) Does it make sense? > >> If you remove an opening char, remove the closing one, too, if >> it follows directly. > > I like that, because its consistent with the way the expression was > brought into the code; as a single gesture. > >> Such chars could be () [] {} "" '' > > Already there for () [] and {}. " seems to make sense, however ' is > used so much in contractions; I don't know... From lewis at mail.msen.com Thu Feb 26 02:52:35 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Feb 26 02:52:36 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: <1424856925560-4807489.post@n4.nabble.com> References: <1424797359184-4807342.post@n4.nabble.com> <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> <1424856925560-4807489.post@n4.nabble.com> Message-ID: <20150226025235.GA69064@shell.msen.com> On Wed, Feb 25, 2015 at 01:35:25AM -0800, Marcel Taeumel wrote: > Remove_Corner_Rounder.cs > > > Could somebody please check the attached code? I want to commit it to trunk. > As it affects several packages, I preferred to use a change set for now. :) > > Preferences -> Morphic -> Preferred Corner Radius > I loaded the changes with no problem. It looks good to me. The only minor concern would be that the preference for roundedWindowsCorners is in the "windows" preference category, and the new preference for Preferred Corner Radius is in category "Morphic". Should we have them grouped together in the same preference category? Dave From marcel.taeumel at student.hpi.uni-potsdam.de Thu Feb 26 07:26:00 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Feb 26 07:33:39 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: <1424935560085-4807757.post@n4.nabble.com> One more argument against the stack: ( ... |aMorph ... ) The last parenthesis was inserted automatically. No the user types another one: ( ... (|aMorph ... ) Finally, she wants to close that at the end. Now, where to place the cursor? She forgot. The behavior is unexpected. If she tries this: ( ... (aMorph ... |) The closing one will be overwritten, because it was inserted automatically. The stack keeps track of it. ( ... (aMorph ... )| Here, it is clear that a new closing parenthesis will be appended. Now if you have this: ((((( ... ))|))) You have *no clue* what will happen if there is a magic stack that manages those auto-parenthesis. I still vote for a simple, clear, local semantic here. Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807757.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Feb 26 07:30:28 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Feb 26 07:38:10 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: <20150226025235.GA69064@shell.msen.com> References: <1424797359184-4807342.post@n4.nabble.com> <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> <1424856925560-4807489.post@n4.nabble.com> <20150226025235.GA69064@shell.msen.com> Message-ID: <1424935828845-4807758.post@n4.nabble.com> I think we need multiple categories for that. Otherwise, I would move the "rounded windows" to "Morphic" because the corner radius affects all morphs, not just windows. Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-rounded-corners-tp4807342p4807758.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Feb 26 10:46:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 10:46:41 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.905.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.905.mcz ==================== Summary ==================== Name: Kernel-topa.905 Author: topa Time: 26 February 2015, 11:46:08.016 am UUID: ab4128de-7440-4a90-94c2-171a33b906c6 Ancestors: Kernel-ul.904 Add a convenience method to access arguments of a context. Also: increases compatibility. =============== Diff against Kernel-ul.904 =============== Item was added: + ----- Method: ContextPart>>arguments (in category 'accessing') ----- + arguments + + ^ Array new: self numArgs streamContents: [:args | + 1 to: self numArgs do: [: i | + args nextPut: (self tempAt: i)]]! From lists at dcorking.com Thu Feb 26 11:15:42 2015 From: lists at dcorking.com (David Corking) Date: Thu Feb 26 11:16:05 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: Thanks, Tim, for all those tips. You wrote: > I have a fairly nicely working demo that can do basic gpio pin control and i2c device > support for PiGlow/PiFace etc. Doing things in squeak allows some options not available to any > outside code such as providing lists of understood broadcasts & variables, UI access etc. > > Anyone interested in the latest state of scratch on squeak can try running the current Pi release - > > https://copy.com/lmzI1gwLrdfYuxzf And thanks for the NuScratch image. Are any VM changes, configs or VM plugins needed to access Pi GPIO pins from NuScratch on Raspbian? Do you (or Doug, Marten or Herbert) have a Monticello repo or changesets for your GPIO pin source code ? Have fun! David From nicolaihess at web.de Thu Feb 26 11:49:31 2015 From: nicolaihess at web.de (Nicolai Hess) Date: Thu Feb 26 11:49:41 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: <1424856925560-4807489.post@n4.nabble.com> References: <1424797359184-4807342.post@n4.nabble.com> <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> <1424856925560-4807489.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: round_corner_fill_and_frame.png Type: image/png Size: 14056 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150226/0b182385/round_corner_fill_and_frame.png From commits at source.squeak.org Thu Feb 26 12:08:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 12:08:39 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.759.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.759.mcz ==================== Summary ==================== Name: Morphic-topa.759 Author: topa Time: 26 February 2015, 1:08:03.145 pm UUID: 8e04bded-d049-42f5-a03b-8a8a8b5e244b Ancestors: Morphic-mt.758 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) =============== Diff against Morphic-mt.758 =============== Item was changed: (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. "Force SystemProgressMorph to be reset" SystemProgressMorph initialize; reset. "Initialize the key bindings and menus" Editor initialize. + "Retain scrollBar look now that the pref actually does something" + Preferences enable: #gradientScrollBars. + "apply the new icons" MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. '! From commits at source.squeak.org Thu Feb 26 12:09:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 12:09:09 2015 Subject: [squeak-dev] The Trunk: ReleaseBuilder-topa.116.mcz Message-ID: Tobias Pape uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-topa.116.mcz ==================== Summary ==================== Name: ReleaseBuilder-topa.116 Author: topa Time: 26 February 2015, 1:09:03.414 pm UUID: 8d8f67bb-60b9-4652-a14b-3b5b84119302 Ancestors: ReleaseBuilder-cmm.115 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) =============== Diff against ReleaseBuilder-cmm.115 =============== Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'private') ----- setPreferences Workspace shouldStyle: false. SystemWindow reuseWindows: true. TextEditor autoEnclose: true ; autoIndent: false ; destructiveBackWord: false ; blinkingCursor: false ; dumbbellCursor: false. BalloonMorph setBalloonColorTo: (TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.75). Preferences installBrightWindowColors ; insertionPointColor: Color red ; enable: #scrollBarsWithoutMenuButton ; + enable: #gradientScrollBars ; enable: #swapMouseButtons ; enable: #annotationPanes ; disable: #showSplitterHandles ; enable: #showBoundsInHalo ; disable: #alternateHandlesLook ; disable: #roundedMenuCorners ; disable: #roundedWindowCorners ; enable: #traceMessages ; enable: #thoroughSenders ; enable: #diffsWithPrettyPrint ; disable: #alwaysShowVScrollbar ; enable: #alternativeBrowseIt. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. Workspace shouldStyle: false. NetNameResolver enableIPv6: false. Browser listClassesHierarchically: true! From commits at source.squeak.org Thu Feb 26 12:10:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 12:10:18 2015 Subject: [squeak-dev] The Trunk: System-topa.704.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.704.mcz ==================== Summary ==================== Name: System-topa.704 Author: topa Time: 26 February 2015, 1:09:51.89 pm UUID: 9faa3cc5-0d63-401a-a2e0-342909710a93 Ancestors: System-eem.703 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) =============== Diff against System-eem.703 =============== Item was changed: ----- Method: Preferences class>>defaultValueTableForCurrentRelease (in category 'misc') ----- defaultValueTableForCurrentRelease "Answer a table defining default values for all the preferences in the release. Returns a list of (pref-symbol, boolean-symbol) pairs" ^ #( (abbreviatedBrowserButtons false) (alternativeBrowseIt false) (annotationPanes false) (areaFillsAreTolerant false) (areaFillsAreVeryTolerant false) (automaticFlapLayout true) (automaticKeyGeneration false) (automaticPlatformSettings true) (automaticViewerPlacement true) (balloonHelpEnabled true) (balloonHelpInMessageLists false) (batchPenTrails false) (canRecordWhilePlaying false) (capitalizedReferences true) (caseSensitiveFinds false) (cautionBeforeClosing false) (changeSetVersionNumbers true) (checkForSlips true) (checkForUnsavedProjects true) (classicNavigatorEnabled false) (clickOnLabelToEdit false) (cmdDotEnabled true) (collapseWindowsInPlace false) (compactViewerFlaps false) (compressFlashImages false) (confirmFirstUseOfStyle true) (conversionMethodsAtFileOut false) (debugHaloHandle true) (debugPrintSpaceLog false) (debugShowDamage false) (decorateBrowserButtons true) (diffsInChangeList true) (diffsWithPrettyPrint false) (dismissAllOnOptionClose false) (dragNDropWithAnimation false) (eToyFriendly false) (eToyLoginEnabled false) (enableLocalSave true) (extractFlashInHighQuality true) (extractFlashInHighestQuality false) (fastDragWindowForMorphic true) (fenceEnabled true) (fullScreenLeavesDeskMargins true) (haloTransitions false) (hiddenScrollBars false) (higherPerformance false) (honorDesktopCmdKeys true) (ignoreStyleIfOnlyBold true) (includeSoundControlInNavigator false) (infiniteUndo false) (logDebuggerStackToFile true) (magicHalos false) (menuButtonInToolPane false) (menuColorFromWorld false) (menuKeyboardControl false) (modalColorPickers true) (mouseOverForKeyboardFocus false) (mouseOverHalos false) (mvcProjectsAllowed true) (navigatorOnLeftEdge true) (noviceMode false) (okToReinitializeFlaps true) (optionalButtons true) (passwordsOnPublish false) (personalizedWorldMenu true) (postscriptStoredAsEPS false) (projectViewsInWindows true) (projectZoom true) (projectsSentToDisk false) (propertySheetFromHalo false) (readDocumentAtStartup true) (restartAlsoProceeds false) (reverseWindowStagger true) (roundedMenuCorners true) (roundedWindowCorners true) (scrollBarsNarrow false) (scrollBarsOnRight true) (scrollBarsWithoutMenuButton false) + (gradientScrollBars true) (securityChecksEnabled false) (selectiveHalos false) (showBoundsInHalo false) (showDirectionForSketches false) (showDirectionHandles false) (showFlapsWhenPublishing false) (showProjectNavigator false) (showSecurityStatus true) (showSharedFlaps true) (signProjectFiles true) (simpleMenus false) (smartUpdating true) (soundQuickStart false) (stopSoundWhenDone false) (soundEnabled true) (startInUntrustedDirectory false) (systemWindowEmbedOK false) (thoroughSenders true) (tileTranslucentDrag true) (timeStampsInMenuTitles true) (turnOffPowerManager false) (twentyFourHourFileStamps true) (typeCheckingInTileScripting true) (uniTilesClassic true) (uniqueNamesInHalos false) (universalTiles false) (unlimitedPaintArea false) (useButtonProprtiesToFire false) (useUndo true) (viewersInFlaps true) (warnAboutInsecureContent true) (warnIfNoChangesFile true) (warnIfNoSourcesFile true)) " Preferences defaultValueTableForCurrentRelease do: [:pair | (Preferences preferenceAt: pair first ifAbsent: [nil]) ifNotNilDo: [:pref | pref defaultValue: (pair last == true)]]. Preferences chooseInitialSettings. "! From marcel.taeumel at student.hpi.uni-potsdam.de Thu Feb 26 12:05:16 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Feb 26 12:12:58 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424935560085-4807757.post@n4.nabble.com> References: <1424852638182-4807479.post@n4.nabble.com> <1424935560085-4807757.post@n4.nabble.com> Message-ID: <1424952316951-4807804.post@n4.nabble.com> Okay. Tim just explained to me, what Bert's "stack" actually means, and that it is not necessarily a stack from an implementation point of view but merely a smart counter. :) Sounds reasonable. And much cheaper than asking the Parser if there are too few closing brackets. And similar (even better) from a usability perspective. I will look into it later this day. Best, Marcel -- View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807804.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From herbertkoenig at gmx.net Thu Feb 26 14:58:42 2015 From: herbertkoenig at gmx.net (=?UTF-8?B?SGVyYmVydCBLw7ZuaWc=?=) Date: Thu Feb 26 14:58:46 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: <54EF34A2.7010103@gmx.net> Hi David, I plan to release my code together with Douglas McPherson. What keeps me is the lack of documentation of what I've done and I haven't yet coordinated with Douglas. I use the IO pins via the file interface. I use I2C via OS-Process. You can mail me in private and I send you my code and reply to questions (will help me to cook up docs). Cheers, Herbert Am 26.02.2015 um 12:15 schrieb David Corking: > Thanks, Tim, for all those tips. > > You wrote: > >> I have a fairly nicely working demo that can do basic gpio pin control and i2c device >> support for PiGlow/PiFace etc. Doing things in squeak allows some options not available to any > outside code such as providing lists of understood broadcasts & variables, UI access etc. >> >> Anyone interested in the latest state of scratch on squeak can try running the current Pi release - >> >> https://copy.com/lmzI1gwLrdfYuxzf > And thanks for the NuScratch image. Are any VM changes, configs or VM > plugins needed to access Pi GPIO pins from NuScratch on Raspbian? > > Do you (or Doug, Marten or Herbert) have a Monticello repo or > changesets for your GPIO pin source code ? > > Have fun! David > From mathieu at cosmocows.com Thu Feb 26 15:05:47 2015 From: mathieu at cosmocows.com (Mathieu van Echtelt) Date: Thu Feb 26 15:05:50 2015 Subject: [squeak-dev] [Job] Smalltalk job opening, AG5 Berlin Germany Message-ID: Hi List, We've a Smalltalk job opening at our office in Berlin Germany, see job description: http://skills.ag5.com/job/software-developer-berlin-germany/ greetings, Mathieu van Echtelt -- AG5 software GmbH www.ag5.com tel: 0049 (0)30 81828464 mobile: 0049 (0)178-2016515 Kreuzbergstrasse 37/38, 10965 Berlin, Germany ---------------------------------------------------------------------------------- This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. From asqueaker at gmail.com Thu Feb 26 16:11:35 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Feb 26 16:11:37 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: >>> No. My specification was (and I quote): "skip over the auto-inserted part". Not "always ignore a typed paren if there happens to be one at the cursor". >> >> Well, in normal 99% usage, it does skip over the auto-inserted part. >> I get what you're saying, I just can't believe you consider such a >> strange and rare case a deal breaker. > > Sorry, but I must chime in. > This is not rare, at least for me. > I had other editors that did it like you suggest > (for example RStudio) and it is annoying; it > has this 'hey, I am way smarter than you ;)' attitude > wich gets very annoying over time I know what you're talking about, which is why I'm surprised anyone would want to try to make it even smarter than it already is. Right now, the user can simply look at what text is at the cursor and, from that, ascertain the behavior that pressing the next key will evoke. With what is being proposed by Bert, the user will now have to examine the full nesting, count the parentheses and brackets, maybe check the leading character, etc. to understand why it did, or did not, insert their closer character. The whole purpose of Auto Enclose (et al) is to relieve the user from ever having to go through this tedious exercise. And what about when their expressions will get out-of-balance? Will the system handle that "perfectly" and how will the user understand what happened when they typed a character and the system didn't behave like they thought because it was so complicated. I think we're in agreement about what we want the user experience to be, I just think we totally disagree about how it should be provided. >> Why? Maybe you could provide 1 example from the image where you feel >> typing that method with Auto Enclose wouldn't perform to your >> specification or otherwise be a terrible nuisance compared to with it >> turned off. How many methods in the system present such a challenge? >> For every 1 you find, I bet can I find 10 (or 100!) where it does meet >> your specification ("skip over the auto-inserted part") and therefore >> overall better to enjoy the benefits of Auto Enclose turned on. > > See: code I have ( | is cursor ) > 1 > self foo: (knorz bar: max) "ah, there is something missing" 2 > |self foo: (knorz bar: max) " ... " 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " 4 > c add: ()|self foo: (knorz bar: max) " ARGH " 5 > c add: (|self foo: (knorz bar: max) " Backspace " 6 > c add: (self foo: (knorz bar: max|) " maybe an off by one? add +1 " 7 > c add: (self foo: (knorz bar: max + 1|) " Ohm a closing paren still missing. I now type )" 8 > c add: (self foo: (knorz bar: max + 1)| " ARGH " This is a good working example, thanks, let's look at this together (I added line numbers for reference). At line 4, the cursor is actually between the parens, like this: c add: (|)self foo: (knorz bar: max) I understand your ARGH at line 4, but there's a problem with the one at line 8. Because this user is starting to work on their /next/ expression (max+1) before they finished their /current/ expression (c add: (self foo: (knorz bar: max))). Maybe you have a "dual-core" brain where mine is only a single-core, because I think a normal user would not do that. I think users who are trying to work on multiple expressions at once are the ones who will most benefit from Auto Enclose. IOW, just for clarity, here is the process a normal user would follow: 0 > self foo: (|) "ah, the system typed the closing paren for me, NICE!" 1 > self foo: (knorz bar: max) "ah, there is something missing" 2 > |self foo: (knorz bar: max) " ... " 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " 4 > c add: (|)self foo: (knorz bar: max) "ah, the system saved me a keystroke at 0, so I understand why it did this, is there a better way?" 5 > c add: (|self foo: (knorz bar: max) "Delete" 5.1 > c add: (self foo: (knorz bar: max)| "End key" 5.2 > c add: (self foo: (knorz bar: max))| "Closing paren. Expression modification completed. Next?" 6 > c add: (self foo: (knorz bar: max|)) "maybe an off by one? add +1 " 7 > c add: (self foo: (knorz bar: max + 1|)) "Ohm a closing paren still missing. I now type )" 8 > c add: (self foo: (knorz bar: max + 1)|) "System did not insert an additional paren, NICE!" So, that leaves your ARGH at line 4 but because of what happened at 0, the user probably understands what and why it happened. So instead of saying "ARGH" I think they might be more inquisitive to ask, "Is there a better way?" Which, of course, there is: 3 > c add: |self foo: (knorz bar: max) "Press Shift+End, followed by Command+(." 4 > c add: (self foo: (knorz bar: max))| "NICE!" Once they learn that, I think occurrences of the line 4 case will diminish and they'll continue to gain appreciation for Auto Enclose (et al). When I ran for the board I said I wanted to promote Squeak for *power-users* over developers. This is why I defend this position. Text-editors are for developers who are already skilled enough to make Squeak their own. Squeak has really great expression-editing capabilities which greatly help non-developer "users". We should be making those features even better, not surrendering and regressing Squeak back to the way it was pre 3.7... From Das.Linux at gmx.de Thu Feb 26 16:25:21 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Feb 26 16:25:29 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: <7EB06A0B-A0F6-41D6-800B-74D8C40DBFF8@gmx.de> On 26.02.2015, at 17:11, Chris Muller wrote: >>>> No. My specification was (and I quote): "skip over the auto-inserted part". Not "always ignore a typed paren if there happens to be one at the cursor". >>> >>> Well, in normal 99% usage, it does skip over the auto-inserted part. >>> I get what you're saying, I just can't believe you consider such a >>> strange and rare case a deal breaker. >> >> Sorry, but I must chime in. >> This is not rare, at least for me. >> I had other editors that did it like you suggest >> (for example RStudio) and it is annoying; it >> has this 'hey, I am way smarter than you ;)' attitude >> wich gets very annoying over time > > I know what you're talking about, which is why I'm surprised anyone > would want to try to make it even smarter than it already is. Right > now, the user can simply look at what text is at the cursor and, from > that, ascertain the behavior that pressing the next key will evoke. > No. I type earlier than I see. To actively having to decide whether to press 'right' or ')' disrupts my flow. Not cool. > With what is being proposed by Bert, the user will now have to examine > the full nesting, count the parentheses and brackets, maybe check the > leading character, etc. to understand why it did, or did not, insert > their closer character. The whole purpose of Auto Enclose (et al) is > to relieve the user from ever having to go through this tedious > exercise. > > And what about when their expressions will get out-of-balance? Will > the system handle that "perfectly" and how will the user understand > what happened when they typed a character and the system didn't behave > like they thought because it was so complicated. > > I think we're in agreement about what we want the user experience to > be, I just think we totally disagree about how it should be provided. > >>> Why? Maybe you could provide 1 example from the image where you feel >>> typing that method with Auto Enclose wouldn't perform to your >>> specification or otherwise be a terrible nuisance compared to with it >>> turned off. How many methods in the system present such a challenge? >>> For every 1 you find, I bet can I find 10 (or 100!) where it does meet >>> your specification ("skip over the auto-inserted part") and therefore >>> overall better to enjoy the benefits of Auto Enclose turned on. >> >> See: code I have ( | is cursor ) >> > > 1 > self foo: (knorz bar: max) "ah, there is something missing" > 2 > |self foo: (knorz bar: max) " ... " > 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " > 4 > c add: ()|self foo: (knorz bar: max) " ARGH " > 5 > c add: (|self foo: (knorz bar: max) " Backspace " > 6 > c add: (self foo: (knorz bar: max|) " maybe an off by one? add +1 " > 7 > c add: (self foo: (knorz bar: max + 1|) " Ohm a closing paren > still missing. I now type )" > 8 > c add: (self foo: (knorz bar: max + 1)| " ARGH " > > This is a good working example, thanks, let's look at this together (I > added line numbers for reference). > > At line 4, the cursor is actually between the parens, like this: > > c add: (|)self foo: (knorz bar: max) > > I understand your ARGH at line 4, but there's a problem with the one > at line 8. Because this user is starting to work on their /next/ > expression (max+1) before they finished their /current/ expression (c > add: (self foo: (knorz bar: max))). Maybe you have a "dual-core" > brain where mine is only a single-core, because I think a normal user > would not do that. That has nothing to do with 'dual-core' but just "scanning left-to-right", and encountering another thing I have to do. Call it 'thought stacking' or more commonly known as 'yak shaving' > I think users who are trying to work on multiple > expressions at once are the ones who will most benefit from Auto > Enclose. IOW, just for clarity, here is the process a normal user > would follow: > > 0 > self foo: (|) "ah, the system > typed the closing paren for me, NICE!" > 1 > self foo: (knorz bar: max) "ah, there is something missing" > 2 > |self foo: (knorz bar: max) " ... " > 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " > 4 > c add: (|)self foo: (knorz bar: max) "ah, the system saved me > a keystroke at 0, so I understand why it did this, is there a better > way?" > 5 > c add: (|self foo: (knorz bar: max) "Delete" > 5.1 > c add: (self foo: (knorz bar: max)| "End key" Does not work If there is stuff after that, (which it typically is). Also, All keyboards I use have no dedicated 'end' key and, Ctrl-e (as in every unix) does not work. > 5.2 > c add: (self foo: (knorz bar: max))| "Closing paren. > Expression modification completed. Next?" I do not at all think in 'expression modification'. This does not work in comments, either. > 6 > c add: (self foo: (knorz bar: max|)) "maybe an off by one? add +1 " > 7 > c add: (self foo: (knorz bar: max + 1|)) "Ohm a closing paren > still missing. I now type )" > 8 > c add: (self foo: (knorz bar: max + 1)|) "System did not insert > an additional paren, NICE!" > So, that leaves your ARGH at line 4 but because of what happened at 0, > the user probably understands what and why it happened. So instead of > saying "ARGH" I think they might be more inquisitive to ask, "Is there > a better way?" Which, of course, there is: > > 3 > c add: |self foo: (knorz bar: max) "Press Shift+End, followed by > Command+(." again, no end key. and how should I type Command+(? like, Command-Shift-9? Ok. Why not '(' at that point. > 4 > c add: (self foo: (knorz bar: max))| "NICE!" > > Once they learn that, I think occurrences of the line 4 case will > diminish and they'll continue to gain appreciation for Auto Enclose > (et al). Chris, I work for +5 year with Editors where I cannot disable auto-enclose and I constantly get this | "type (" (|) "i just wanted (, Delete" | "Whut? (" (|) "again? Backspace" | "Whut? (" (|) "Ok. 'right'" ()| "Backspace " (| "finally" Actually, the "delete" case is rare, as I have to type fn+BACKSPACE. > > When I ran for the board I said I wanted to promote Squeak for > *power-users* over developers. This is why I defend this position. > Text-editors are for developers who are already skilled enough to make > Squeak their own. Squeak has really great expression-editing > capabilities which greatly help non-developer "users". We should be > making those features even better, not surrendering and regressing > Squeak back to the way it was pre 3.7... Then I just want the basic Readline keybindings. Really. No Magic, just line editing. No expression editing. Best -Tobias From mbaehr at email.archlab.tuwien.ac.at Thu Feb 26 16:48:20 2015 From: mbaehr at email.archlab.tuwien.ac.at (=?utf-8?q?Martin_B=C3=A4hr?=) Date: Thu Feb 26 16:52:07 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> Message-ID: <1424967362-sup-9982@email.archlab.tuwien.ac.at> Excerpts from Chris Muller's message of 2015-02-26 17:11:35 +0100: > 0 > self foo: (|) "ah, the system > typed the closing paren for me, NICE!" > 1 > self foo: (knorz bar: max) "ah, there is something missing" > 2 > |self foo: (knorz bar: max) " ... " > 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " > 4 > c add: (|)self foo: (knorz bar: max) "ah, the system saved me > a keystroke at 0, so I understand why it did this, is there a better > way?" pharo solves this problem by not inserting a closing ) if there is other text right after the cursor: 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " 4 > c add: (|self foo: (knorz bar: max) if i wanted to insert a new expression i'd type: 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " 4 > c add:| self foo: (knorz bar: max) " back off to get some space" 3 > c add: (|) self foo: (knorz bar: max) " type space and ( ..." in the other case it behaves the same. what i am wondering is, why at line 1, once the user moved away from the closing ) it does not count as accepted? that would solve the problem in line 8, because, someone typing without paying attention to the auto-inserts would not move the cursor without actually typing the ) directly. greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin B?hr working in china http://societyserver.org/mbaehr/ From marcel.taeumel at student.hpi.uni-potsdam.de Thu Feb 26 16:49:55 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Feb 26 16:57:40 2015 Subject: [squeak-dev] Re: Speaking of rounded corners... In-Reply-To: References: <1424797359184-4807342.post@n4.nabble.com> <71A718F5-BB44-4A82-B29B-0DB057AE9A4D@freudenbergs.de> <1424856925560-4807489.post@n4.nabble.com> Message-ID: <1424969395850-4807977.post@n4.nabble.com> Thank you! I missed to check the version with all gradients enabled. Seems to be buggy. I'll fix that! :) Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-rounded-corners-tp4807342p4807977.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Thu Feb 26 17:11:12 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Feb 26 17:11:16 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <7EB06A0B-A0F6-41D6-800B-74D8C40DBFF8@gmx.de> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> <7EB06A0B-A0F6-41D6-800B-74D8C40DBFF8@gmx.de> Message-ID: >> I think users who are trying to work on multiple >> expressions at once are the ones who will most benefit from Auto >> Enclose. IOW, just for clarity, here is the process a normal user >> would follow: >> >> 0 > self foo: (|) "ah, the system >> typed the closing paren for me, NICE!" >> 1 > self foo: (knorz bar: max) "ah, there is something missing" >> 2 > |self foo: (knorz bar: max) " ... " >> 3 > c add: |self foo: (knorz bar: max) " oh, that now needs parens " >> 4 > c add: (|)self foo: (knorz bar: max) "ah, the system saved me >> a keystroke at 0, so I understand why it did this, is there a better >> way?" >> 5 > c add: (|self foo: (knorz bar: max) "Delete" >> 5.1 > c add: (self foo: (knorz bar: max)| "End key" > > Does not work If there is stuff after that, (which it typically is). > Also, All keyboards I use have no dedicated 'end' key and, Ctrl-e (as in every unix) does not work. Then use the arrows or click there. We're talking about Auto Enclose not navigation.. >> 5.2 > c add: (self foo: (knorz bar: max))| "Closing paren. >> Expression modification completed. Next?" > > I do not at all think in 'expression modification'. > This does not work in comments, either. > >> 6 > c add: (self foo: (knorz bar: max|)) "maybe an off by one? add +1 " >> 7 > c add: (self foo: (knorz bar: max + 1|)) "Ohm a closing paren >> still missing. I now type )" >> 8 > c add: (self foo: (knorz bar: max + 1)|) "System did not insert >> an additional paren, NICE!" > >> So, that leaves your ARGH at line 4 but because of what happened at 0, >> the user probably understands what and why it happened. So instead of >> saying "ARGH" I think they might be more inquisitive to ask, "Is there >> a better way?" Which, of course, there is: >> >> 3 > c add: |self foo: (knorz bar: max) "Press Shift+End, followed by >> Command+(." > > again, no end key. This is off topic.. simply use another means to select the expression, there are several ways. > and how should I type Command+(? like, Command-Shift-9? Ok. Yes. > Why not '(' at that point. Because that is used to /replace/ the currently selected expression with a new expression. Selection replace is how all editors work, and we agreed we wish to minimize surprises and violations of typing behavior invariants. >> 4 > c add: (self foo: (knorz bar: max))| "NICE!" >> >> Once they learn that, I think occurrences of the line 4 case will >> diminish and they'll continue to gain appreciation for Auto Enclose >> (et al). > > Chris, I work for +5 year with Editors where I cannot disable auto-enclose and > I constantly get this > > | "type (" > (|) "i just wanted (, Delete" > | "Whut? (" > (|) "again? Backspace" > | "Whut? (" > (|) "Ok. 'right'" > ()| "Backspace " > (| "finally" > > Actually, the "delete" case is rare, as I have to type fn+BACKSPACE. The above may be the case for other editors, but not Squeak. With Squeak, the worst you have is: | "type (" (|) "i just wanted (, Delete" (| "finally" When one considers all the cases where Auto Enclose helps by keeping one's expression nestings balanced, I think the problem of 2nd line above becomes understandable to the user, and, if it is happening "constantly" that they will like to learn and use the better way; of selecting the expression and pressing Command+(.. You are an experienced developer who has his ways set by now; I'm more interested for this feature to help new users who want to be empowered by a system suitable for power-users and not just developers.. From commits at source.squeak.org Thu Feb 26 17:19:46 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 17:19:50 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.760.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.760.mcz ==================== Summary ==================== Name: Morphic-mt.760 Author: mt Time: 26 February 2015, 6:19:14.906 pm UUID: fb8f4f20-e595-d444-a291-58885547c05f Ancestors: Morphic-topa.759 Corner rounding refactored. Does not rely on (spooky) CornerRounder implementation anymore. Many hacks for that CornerRounder could be removed from Morphic. A preference can be used to choose the preferred corner radius for rounded morphs. (Preferences > Morphic > Preferred Corner Radius) Subclasses may override the drawing of corners as needed. See draw* methods. =============== Diff against Morphic-topa.759 =============== Item was removed: - ----- Method: Canvas>>roundCornersOf:during: (in category 'drawing-general') ----- - roundCornersOf: aMorph during: aBlock - ^self roundCornersOf: aMorph in: aMorph bounds during: aBlock! Item was removed: - ----- Method: Canvas>>roundCornersOf:in:during: (in category 'drawing-general') ----- - roundCornersOf: aMorph in: bounds during: aBlock - ^aBlock value! Item was removed: - ----- Method: FormCanvas>>roundCornersOf:in:during: (in category 'drawing-general') ----- - roundCornersOf: aMorph in: bounds during: aBlock - aMorph wantsRoundedCorners ifFalse:[^aBlock value]. - (self seesNothingOutside: (CornerRounder rectWithinCornersOf: bounds)) - ifTrue: ["Don't bother with corner logic if the region is inside them" - ^ aBlock value]. - CornerRounder roundCornersOf: aMorph on: self in: bounds - displayBlock: aBlock - borderWidth: aMorph borderWidthForRounding - corners: aMorph roundedCorners! Item was changed: ----- Method: HandMorph>>fullDrawOn: (in category 'drawing') ----- fullDrawOn: aCanvas "A HandMorph has unusual drawing requirements: 1. the hand itself (i.e., the cursor) appears in front of its submorphs 2. morphs being held by the hand cast a shadow on the world/morphs below The illusion is that the hand plucks up morphs and carries them above the world." "Note: This version caches an image of the morphs being held by the hand for better performance. This cache is invalidated if one of those morphs changes." + | disableCaching subBnds | - | disableCaching subBnds roundCorners rounded | self visible ifFalse: [^self]. (aCanvas isVisible: self fullBounds) ifFalse: [^self]. (self hasProperty: #errorOnDraw) ifTrue:[^self drawErrorOn: aCanvas]. disableCaching := false. disableCaching ifTrue: [self nonCachingFullDrawOn: aCanvas. ^self]. submorphs isEmpty ifTrue: [cacheCanvas := nil. ^self drawOn: aCanvas]. "just draw the hand itself" subBnds := Rectangle merging: (submorphs collect: [:m | m fullBounds]). self updateCacheCanvas: aCanvas. (cacheCanvas isNil or: [cachedCanvasHasHoles and: [cacheCanvas depth = 1]]) ifTrue: ["could not use caching due to translucency; do full draw" self nonCachingFullDrawOn: aCanvas. ^self]. - "--> begin rounded corners hack <---" - roundCorners := cachedCanvasHasHoles == false - and: [submorphs size = 1 and: [submorphs first wantsRoundedCorners]]. - roundCorners - ifTrue: - [rounded := submorphs first. - aCanvas asShadowDrawingCanvas translateBy: self shadowOffset - during: - [:shadowCanvas | - shadowCanvas roundCornersOf: rounded - during: - [(subBnds areasOutside: (rounded boundsWithinCorners - translateBy: self shadowOffset negated)) - do: [:r | shadowCanvas fillRectangle: r color: Color black]]]. - aCanvas roundCornersOf: rounded - during: - [aCanvas - drawImage: cacheCanvas form - at: subBnds origin - sourceRect: cacheCanvas form boundingBox]. - ^self drawOn: aCanvas "draw the hand itself in front of morphs"]. - "--> end rounded corners hack <---" - "draw the shadow" aCanvas asShadowDrawingCanvas translateBy: self shadowOffset during: [:shadowCanvas | cachedCanvasHasHoles ifTrue: ["Have to draw the real shadow of the form" shadowCanvas paintImage: cacheCanvas form at: subBnds origin] ifFalse: ["Much faster if only have to shade the edge of a solid rectangle" (subBnds areasOutside: (subBnds translateBy: self shadowOffset negated)) do: [:r | shadowCanvas fillRectangle: r color: Color black]]]. "draw morphs in front of the shadow using the cached Form" cachedCanvasHasHoles ifTrue: [aCanvas paintImage: cacheCanvas form at: subBnds origin] ifFalse: [aCanvas drawImage: cacheCanvas form at: subBnds origin sourceRect: cacheCanvas form boundingBox]. self drawOn: aCanvas "draw the hand itself in front of morphs"! Item was changed: Object subclass: #Morph instanceVariableNames: 'bounds owner submorphs fullBounds color extension' + classVariableNames: 'PreferredCornerRadius' - classVariableNames: '' poolDictionaries: '' category: 'Morphic-Kernel'! !Morph commentStamp: 'efc 2/26/2003 20:01' prior: 0! A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at http://minnow.cc.gatech.edu/squeak/30. Morphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method. The World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain. My instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly. Structure: instance var Type Description bounds Rectangle A Rectangle indicating my position and a size that will enclose me. owner Morph My parent Morph, or nil for the top-level Morph, which is a or nil world, typically a PasteUpMorph. submorphs Array My child Morphs. fullBounds Rectangle A Rectangle minimally enclosing me and my submorphs. color Color My primary color. Subclasses can use this in different ways. extension MorphExtension Allows extra properties to be stored without adding a or nil storage burden to all morphs. By default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning. Although Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.! Item was added: + ----- Method: Morph class>>preferredCornerRadius (in category 'preferences') ----- + preferredCornerRadius + + + ^ PreferredCornerRadius ifNil: [6]! Item was added: + ----- Method: Morph class>>preferredCornerRadius: (in category 'preferences') ----- + preferredCornerRadius: anInteger + + PreferredCornerRadius := anInteger.! Item was changed: ----- Method: Morph>>boundsWithinCorners (in category 'drawing') ----- boundsWithinCorners + "Return a single sub-rectangle that lies entirely inside corners + that are made by me. + Used to identify large regions of window that do not need to be redrawn." + ^ self wantsRoundedCorners + ifTrue: [self bounds insetBy: 0@self class preferredCornerRadius] + ifFalse: [self bounds] + ! - ^ CornerRounder rectWithinCornersOf: self bounds! Item was changed: ----- Method: Morph>>drawDropHighlightOn: (in category 'drawing') ----- drawDropHighlightOn: aCanvas + self highlightedForDrop ifTrue: [ + self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self fullBounds radius: self class preferredCornerRadius width: 1 color: self dropHighlightColor] + ifFalse: [aCanvas frameRectangle: self fullBounds color: self dropHighlightColor]].! - aCanvas frameRectangle: self fullBounds color: self dropHighlightColor].! Item was changed: ----- Method: Morph>>drawDropShadowOn: (in category 'drawing') ----- drawDropShadowOn: aCanvas aCanvas translateBy: self shadowOffset during: [ :shadowCanvas | + (shadowCanvas isVisible: self bounds) ifTrue: [ + self wantsRoundedCorners + ifTrue: [shadowCanvas fillRoundRect: self bounds radius: self class preferredCornerRadius fillStyle: self shadowColor] + ifFalse: [shadowCanvas fillRectangle: self bounds fillStyle: self shadowColor]]]. - shadowCanvas shadowColor: self shadowColor. - shadowCanvas roundCornersOf: self during: [ - (shadowCanvas isVisible: self bounds) ifTrue: - [shadowCanvas fillRectangle: self bounds fillStyle: self fillStyle]] - ]. ! Item was changed: ----- Method: Morph>>drawMouseDownHighlightOn: (in category 'drawing') ----- drawMouseDownHighlightOn: aCanvas + self highlightedForMouseDown ifTrue: [ + self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self fullBounds radius: self class preferredCornerRadius width: 1 color: self color darker darker] + ifFalse: [aCanvas frameRectangle: self fullBounds color: self color darker darker]].! - aCanvas frameRectangle: self fullBounds color: self color darker darker].! Item was changed: ----- Method: Morph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas + self wantsRoundedCorners + ifTrue: [aCanvas frameAndFillRoundRect: self bounds radius: self class preferredCornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] + ifFalse: [aCanvas fillRectangle: self bounds fillStyle: self fillStyle borderStyle: self borderStyle]. + - aCanvas fillRectangle: self bounds fillStyle: self fillStyle borderStyle: self borderStyle. ! Item was changed: ----- Method: Morph>>fullDrawOn: (in category 'drawing') ----- fullDrawOn: aCanvas "Draw the full Morphic structure on the given Canvas" self visible ifFalse: [^ self]. (aCanvas isVisible: self fullBounds) ifFalse:[^self]. (self hasProperty: #errorOnDraw) ifTrue:[^self drawErrorOn: aCanvas]. "Note: At some point we should generalize this into some sort of multi-canvas so that we can cross-optimize some drawing operations." + "Pass 1: Draw eventual drop-shadow" self hasDropShadow ifTrue: [self drawDropShadowOn: aCanvas]. (self hasRolloverBorder and: [(aCanvas seesNothingOutside: self bounds) not]) ifTrue: [self drawRolloverBorderOn: aCanvas]. "Pass 2: Draw receiver itself" + (aCanvas isVisible: self bounds) ifTrue:[aCanvas drawMorph: self]. + self drawSubmorphsOn: aCanvas. + self drawDropHighlightOn: aCanvas. + self drawMouseDownHighlightOn: aCanvas.! - aCanvas roundCornersOf: self during:[ - (aCanvas isVisible: self bounds) ifTrue:[aCanvas drawMorph: self]. - self drawSubmorphsOn: aCanvas. - self drawDropHighlightOn: aCanvas. - self drawMouseDownHighlightOn: aCanvas].! Item was removed: - ----- Method: PluggableCanvas>>roundCornersOf:in:during: (in category 'drawing-general') ----- - roundCornersOf: aMorph in: bounds during: aBlock - aMorph wantsRoundedCorners ifFalse:[^aBlock value]. - (self seesNothingOutside: (CornerRounder rectWithinCornersOf: bounds)) - ifTrue: ["Don't bother with corner logic if the region is inside them" - ^ aBlock value]. - CornerRounder roundCornersOf: aMorph on: self in: bounds - displayBlock: aBlock - borderWidth: aMorph borderWidthForRounding - corners: aMorph roundedCorners! Item was changed: ----- Method: WorldState>>displayWorld:submorphs: (in category 'update cycle') ----- displayWorld: aWorld submorphs: submorphs "Update this world's display." + | deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects | - | deferredUpdateMode handsToDraw allDamage | submorphs do: [:m | m fullBounds]. "force re-layout if needed" self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date" deferredUpdateMode := self doDeferredUpdatingFor: aWorld. deferredUpdateMode ifFalse: [self assuredCanvas]. - canvas roundCornersOf: aWorld during:[ | handDamageRects worldDamageRects | - worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: canvas. "repair world's damage on canvas" - "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." - handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. - handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. - allDamage := worldDamageRects, handDamageRects. + worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: canvas. "repair world's damage on canvas" + "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." + handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. + handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. + allDamage := worldDamageRects, handDamageRects. + + handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" + - handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" - ]. "*make this true to flash damaged areas for testing*" Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black]. canvas finish: allDamage. "quickly copy altered rects of canvas to Display:" deferredUpdateMode ifTrue: [self forceDamageToScreen: allDamage] ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage]. handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands" Display deferUpdates: false; forceDisplayUpdate. ! From commits at source.squeak.org Thu Feb 26 17:21:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 17:21:39 2015 Subject: [squeak-dev] The Trunk: Nebraska-mt.40.mcz Message-ID: Marcel Taeumel uploaded a new version of Nebraska to project The Trunk: http://source.squeak.org/trunk/Nebraska-mt.40.mcz ==================== Summary ==================== Name: Nebraska-mt.40 Author: mt Time: 26 February 2015, 6:21:34.677 pm UUID: 87029112-f31e-4d46-a380-9c0442f2bec7 Ancestors: Nebraska-bf.39 No CornerRounder anymore. Depended morphs have to round corners themselves. See Morphic-mt.760. =============== Diff against Nebraska-bf.39 =============== Item was removed: - ----- Method: RemoteCanvas>>roundCornersOf:in:during: (in category 'drawing-general') ----- - roundCornersOf: aMorph in: bounds during: aBlock - - self flag: #roundedRudeness. - - aMorph wantsRoundedCorners ifFalse:[^aBlock value]. - (self seesNothingOutside: (CornerRounder rectWithinCornersOf: bounds)) - ifTrue: ["Don't bother with corner logic if the region is inside them" - ^ aBlock value]. - CornerRounder roundCornersOf: aMorph on: self in: bounds - displayBlock: aBlock - borderWidth: aMorph borderWidthForRounding - corners: aMorph roundedCorners! From commits at source.squeak.org Thu Feb 26 17:22:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 17:22:41 2015 Subject: [squeak-dev] The Trunk: Graphics-mt.307.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.307.mcz ==================== Summary ==================== Name: Graphics-mt.307 Author: mt Time: 26 February 2015, 6:22:20.558 pm UUID: 15e4bf40-5f71-5f45-a0a4-86179930d6d5 Ancestors: Graphics-kfr.305 No CornerRounder anymore. Depended morphs have to round corners themselves. See Morphic-mt.760. =============== Diff against Graphics-kfr.305 =============== Item was removed: - Object subclass: #CornerRounder - instanceVariableNames: 'cornerMasks cornerOverlays underBits' - classVariableNames: 'CR0 CR1 CR2' - poolDictionaries: '' - category: 'Graphics-Display Objects'! - - !CornerRounder commentStamp: '' prior: 0! - This class is a quick hack to support rounded corners in morphic. - - Rather than produce rounded rectangles, it tweaks the display of corners. - Rather than work for any radius, it only supports a radius of 6. - Rather than work for any border width, it only supports widths 0, 1 and 2. - The corners, while apparently transparent, still behave opaquely to mouse clicks. - - Worse than this, the approach relies on the ability to extract underlying bits from the canvas prior to display. This ran afoul of top-down display, it seems, in SystemWindow spawnReframeHandle: (qv). It will also make a postscript printer very unhappy. - - But, hey, it's cute.! Item was removed: - ----- Method: CornerRounder class>>initialize (in category 'all') ----- - initialize "CornerRounder initialize" - - CR0 := CR1 := self new - masterMask: - (Form extent: 6@6 - fromArray: #(2r1e26 2r111e26 2r1111e26 2r11111e26 2r11111e26 2r111111e26) - offset: 0@0) - masterOverlay: - (Form extent: 6@6 - fromArray: #(2r1e26 2r110e26 2r1000e26 2r10000e26 2r10000e26 2r100000e26) - offset: 0@0). - CR2 := self new - masterMask: - (Form extent: 6@6 - fromArray: #(2r1e26 2r111e26 2r1111e26 2r11111e26 2r11111e26 2r111111e26) - offset: 0@0) - masterOverlay: - (Form extent: 6@6 - fromArray: #(2r1e26 2r111e26 2r1111e26 2r11100e26 2r11000e26 2r111000e26) - offset: 0@0). - - ! Item was removed: - ----- Method: CornerRounder class>>rectWithinCornersOf: (in category 'all') ----- - rectWithinCornersOf: aRectangle - "Return a single sub-rectangle that lies entirely inside corners - that are made by me. - Used to identify large regions of window that do not need to be redrawn." - - ^ aRectangle insetBy: 0@6! Item was removed: - ----- Method: CornerRounder class>>roundCornersOf:on:in:displayBlock:borderWidth:corners: (in category 'all') ----- - roundCornersOf: aMorph on: aCanvas in: bounds displayBlock: displayBlock borderWidth: w corners: aList - - | rounder | - rounder := CR0. - w = 1 ifTrue: [rounder := CR1]. - w = 2 ifTrue: [rounder := CR2]. - rounder := rounder copy. - rounder saveBitsUnderCornersOf: aMorph on: aCanvas in: bounds corners: aList. - displayBlock value. - rounder tweakCornersOf: aMorph on: aCanvas in: bounds borderWidth: w corners: aList! Item was removed: - ----- Method: CornerRounder>>masterMask:masterOverlay: (in category 'all') ----- - masterMask: maskForm masterOverlay: overlayForm - - cornerMasks := #(none left pi right) collect: - [:dir | (maskForm rotateBy: dir centerAt: 0@0) offset: 0@0]. - cornerOverlays := #(none left pi right) collect: - [:dir | (overlayForm rotateBy: dir centerAt: 0@0) offset: 0@0]. - ! Item was removed: - ----- Method: CornerRounder>>saveBitsUnderCornersOf:on:in:corners: (in category 'all') ----- - saveBitsUnderCornersOf: aMorph on: aCanvas in: bounds corners: cornerList - - | corners | - underBits := Array new: 4. - corners := bounds corners. - cornerList do:[:i| - | offset corner mask form rect | - mask := cornerMasks at: i. - corner := corners at: i. - i = 1 ifTrue: [offset := 0@0]. - i = 2 ifTrue: [offset := 0@mask height negated]. - i = 3 ifTrue: [offset := mask extent negated]. - i = 4 ifTrue: [offset := mask width negated@0]. - rect := corner + offset extent: mask extent. - (aCanvas isVisible: rect) ifTrue:[ - form := aCanvas contentsOfArea: rect. - form copyBits: form boundingBox from: mask at: 0@0 clippingBox: form boundingBox rule: Form and fillColor: nil map: (Bitmap with: 16rFFFFFFFF with: 0). - underBits at: i put: form]]. - ! Item was removed: - ----- Method: CornerRounder>>tweakCornersOf:on:in:borderWidth:corners: (in category 'all') ----- - tweakCornersOf: aMorph on: aCanvas in: bounds borderWidth: w corners: cornerList - "This variant has a cornerList argument, to allow some corners to be rounded and others not" - | fourColors mask shadowColor corners | - shadowColor := aCanvas shadowColor. - aCanvas shadowColor: nil. "for tweaking it's essential" - w > 0 ifTrue:[ - fourColors := shadowColor - ifNil:[aMorph borderStyle colorsAtCorners] - ifNotNil:[Array new: 4 withAll: Color transparent]]. - mask := Form extent: cornerMasks first extent depth: aCanvas depth. - corners := bounds corners. - cornerList do:[:i| - | offset corner saveBits outBits | - corner := corners at: i. - saveBits := underBits at: i. - saveBits ifNotNil:[ - i = 1 ifTrue: [offset := 0@0]. - i = 2 ifTrue: [offset := 0@saveBits height negated]. - i = 3 ifTrue: [offset := saveBits extent negated]. - i = 4 ifTrue: [offset := saveBits width negated@0]. - - "Mask out corner area (painting saveBits won't clear if transparent)." - mask copyBits: mask boundingBox from: (cornerMasks at: i) at: 0@0 clippingBox: mask boundingBox rule: Form over fillColor: nil map: (Bitmap with: 0 with: 16rFFFFFFFF). - outBits := aCanvas contentsOfArea: (corner + offset extent: mask extent). - mask displayOn: outBits at: 0@0 rule: Form and. - "Paint back corner bits." - saveBits displayOn: outBits at: 0@0 rule: Form paint. - "Paint back corner bits." - aCanvas drawImage: outBits at: corner + offset. - - w > 0 ifTrue:[ - - aCanvas stencil: (cornerOverlays at: i) at: corner + offset - color: (fourColors at: i)]]]. - aCanvas shadowColor: shadowColor. "restore shadow color" - ! From commits at source.squeak.org Thu Feb 26 17:33:11 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 17:33:11 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.761.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.761.mcz ==================== Summary ==================== Name: Morphic-mt.761 Author: mt Time: 26 February 2015, 6:32:43.542 pm UUID: 5cad7567-3a07-a94e-8544-72737cc6bbf0 Ancestors: Morphic-mt.760 Make pluggable buttons use the appropriate code for handling rounded corners (e.g. like system windows do). Corner rounding is now also configurable for buttons. Same preference: 'Preferred corner radius'. =============== Diff against Morphic-mt.760 =============== Item was changed: ----- Method: PluggableButtonMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | cc gradient borderColor fill | cc := self color. cc isTransparent ifTrue:[cc := Color gray: 0.9]. self enabled ifFalse:[cc := Color lightGray]. cc brightness > 0.9 ifTrue:[cc := cc adjustBrightness: 0.9 - cc brightness]. showSelectionFeedback ifTrue:[ borderColor := cc muchDarker. gradient := GradientFillStyle ramp: { 0.0 -> cc muchDarker. 0.1-> (cc adjustBrightness: -0.2). 0.5 -> cc. 0.9-> (cc adjustBrightness: -0.1). 1 -> cc muchDarker}. cc := cc muchDarker. ] ifFalse:[ borderColor := Color lightGray. gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.1-> (cc adjustBrightness: 0.05). 0.6 -> (cc darker)}. ]. gradient origin: bounds topLeft. gradient direction: 0@self height. PluggableButtonMorph gradientButton ifFalse: [fill := SolidFillStyle color: cc] ifTrue: [fill := gradient]. + ^ self wantsRoundedCorners - ^ self roundedButtonCorners ifTrue: [aCanvas frameAndFillRoundRect: bounds + radius: self class preferredCornerRadius - radius: 8 fillStyle: fill borderWidth: 1 borderColor: borderColor] ifFalse: [aCanvas frameAndFillRectangle: self innerBounds fillColor: fill asColor borderWidth: 1 borderColor: borderColor darker; fillRectangle: (self innerBounds insetBy: 1) fillStyle: fill]! Item was removed: - ----- Method: PluggableButtonMorph>>roundedButtonCorners (in category 'drawing') ----- - roundedButtonCorners - "If the button is intended to invoke a menu for selection, provide a visual - distinction by inverting the rounded corners attribute." - ^self class roundedButtonCorners - xor: style == #menuButton! Item was added: + ----- Method: PluggableButtonMorph>>wantsRoundedCorners (in category 'rounding') ----- + wantsRoundedCorners + "If the button is intended to invoke a menu for selection, provide a visual + distinction by inverting the rounded corners attribute." + + ^ (self class roundedButtonCorners or: [super wantsRoundedCorners]) + xor: style == #menuButton! From commits at source.squeak.org Thu Feb 26 17:40:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 17:41:00 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.762.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.762.mcz ==================== Summary ==================== Name: Morphic-mt.762 Author: mt Time: 26 February 2015, 6:40:30.831 pm UUID: bf4412d4-1e58-344a-ab7b-05e401f170d4 Ancestors: Morphic-mt.761 Flag added to document that we don't handle rounded corners for roll-over borders. (eToys only?) =============== Diff against Morphic-mt.761 =============== Item was changed: ----- Method: Morph>>drawRolloverBorderOn: (in category 'drawing') ----- drawRolloverBorderOn: aCanvas | colorToUse offsetToUse myShadow newForm f | colorToUse := self valueOfProperty: #rolloverColor ifAbsent: [Color blue alpha: 0.5]. offsetToUse := self valueOfProperty: #rolloverWidth ifAbsent: [10 @ 10]. self hasRolloverBorder: false. myShadow := self shadowForm. self hasRolloverBorder: true. myShadow offset: 0 @ 0. f := ColorForm extent: myShadow extent depth: 1. myShadow displayOn: f. f colors: {Color transparent. colorToUse}. newForm := Form extent: offsetToUse * 2 + myShadow extent depth: 32. (WarpBlt toForm: newForm) sourceForm: f; cellSize: 1; combinationRule: 3; copyQuad: f boundingBox innerCorners toRect: newForm boundingBox. + + self flag: #roundedCorners. "mt: Check for #wantsRoundedCorners and call appropriate things in canvas." aCanvas translateBy: offsetToUse negated during: [:shadowCanvas | shadowCanvas shadowColor: colorToUse. shadowCanvas paintImage: newForm at: self position]! From tim at rowledge.org Thu Feb 26 18:16:35 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Feb 26 18:16:43 2015 Subject: [squeak-dev] Please add Robot support tools In-Reply-To: References: Message-ID: <99E3D2B6-B84E-4B97-8673-1B5CA586D100@rowledge.org> On 26-02-2015, at 3:15 AM, David Corking wrote: > And thanks for the NuScratch image. Are any VM changes, configs or VM > plugins needed to access Pi GPIO pins from NuScratch on Raspbian? No extra vm plugins, though you do need ffi to be working. On a Pi you need to do some magic dancing to configure i2c & spi ( http://www.raspberrypi.org/documentation/configuration/raspi-config.md) and if your OS version is a bit old there is some /etc/module-thingy editing. This just got a bit more complex to describe because Raspbian now support Device Tree. Spelling it correctly is about as far as my knowledge goes. See http://www.raspberrypi.org/documentation/configuration/device-tree.md etc. My code isn?t ready to be seen by others as yet but soon, probably. www.wiringPi.com will tell you how to install wiringPi and hooking up to it is just the same as any other ffi stuff - # etc. I still haven?t found anything approaching doc for ffi so it?s very much search©. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: KFP: Kindle Fire in Printer From bert at freudenbergs.de Thu Feb 26 18:54:38 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Feb 26 18:54:43 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <1424952316951-4807804.post@n4.nabble.com> References: <1424852638182-4807479.post@n4.nabble.com> <1424935560085-4807757.post@n4.nabble.com> <1424952316951-4807804.post@n4.nabble.com> Message-ID: On 26.02.2015, at 04:05, Marcel Taeumel wrote: > > Okay. Tim just explained to me, what Bert's "stack" actually means, and that > it is not necessarily a stack from an implementation point of view but > merely a smart counter. :) > > Sounds reasonable. And much cheaper than asking the Parser if there are too > few closing brackets. And similar (even better) from a usability > perspective. What I was proposing (and what is *standard* behavior in about any code editor) has nothing to do with the parser. It is not counting any parens that are in the text already. It's not even aware of syntax. It merely temporarily keeps track of what was auto-inserted, on a single line, not globally, not forever. As soon as you move the cursor you're back to regular, non-magic editing. Auto-inserted parens are magic. This magic lasts until the user is done editing that single expression. It should be nothing fancy from a user's point of view. Using it should not be any more complicated than using a non-magic editor. But most importantly, the magic must not get in the way. We should delight our users with magic, not make them wish for a dumb editor because the magic is annoying. > I will look into it later this day. Awesome! - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150226/6181a8bd/smime.bin From commits at source.squeak.org Thu Feb 26 21:03:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 21:03:26 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.906.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.906.mcz ==================== Summary ==================== Name: Kernel-ul.906 Author: ul Time: 26 February 2015, 9:22:02.722 pm UUID: 9fd0ffbc-c774-442a-baa5-5b0e13950856 Ancestors: Kernel-topa.905 Added an implementation of a 30-bit Mersenne Twister (p=521) to Random. All existing Random instances are migrated to the new implementation. =============== Diff against Kernel-topa.905 =============== Item was changed: Object subclass: #Random + instanceVariableNames: 'seed states index' + classVariableNames: 'A M MTa MTbShifted MTcShifted MTl MTlowerMask MTm MTn MTs MTt MTu MTupperMask MTw MTwFloatMultiplier MTwordMask Q R' - instanceVariableNames: 'seed' - classVariableNames: 'A M Q R' poolDictionaries: '' category: 'Kernel-Numbers'! !Random commentStamp: 'nice 3/24/2010 07:38' prior: 0! This Random Number Generator graciously contributed by David N. Smith. It is an adaptation of the Park-Miller RNG which uses Floats to avoid the need for LargeInteger arithmetic. If you just want a quick random integer, use: 10 atRandom Every integer interval can give a random number: (6 to: 12) atRandom SequenceableCollections can give randomly selected elements: 'pick one of these letters randomly' atRandom SequenceableCollections also respond to shuffled, as in: ($A to: $Z) shuffled The correct way to use class Random is to store one in an instance or class variable: myGenerator := Random new. Then use it every time you need another number between 0.0 and 1.0 (excluding) myGenerator next You can also generate a positive integer myGenerator nextInt: 10! Item was changed: ----- Method: Random class>>bucketTest: (in category 'testing') ----- bucketTest: randy "Execute this: Random bucketTest: Random new" " A quick-and-dirty bucket test. Prints nbuckets values on the Transcript. Each should be 'near' the value of ntries. Any run with any value 'far' from ntries indicates something is very wrong. Each run generates different values. For a slightly better test, try values of nbuckets of 200-1000 or more; go get coffee. This is a poor test; see Knuth. Some 'OK' runs: 1000 1023 998 969 997 1018 1030 1019 1054 985 1003 1011 987 982 980 982 974 968 1044 976 1029 1011 1025 1016 997 1019 991 954 968 999 991 978 1035 995 988 1038 1009 988 993 976 " | nbuckets buckets ntrys | nbuckets := 200. buckets := Array new: nbuckets. buckets atAllPut: 0. + ntrys := 10000. - ntrys := 1000. ntrys*nbuckets timesRepeat: [ | slot | + slot := randy nextInt: nbuckets. - slot := (randy next * nbuckets) floor + 1. buckets at: slot put: (buckets at: slot) + 1 ]. Transcript cr. 1 to: nbuckets do: [ :nb | Transcript print: (buckets at: nb); space ]. Transcript flush! Item was changed: ----- Method: Random class>>initialize (in category 'class initialization') ----- initialize + "30-bit MT521 parameters. generated with a modified version of dcmt with ID=1. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html" + + "Base parameters" + "MTp := 521. Not used directly." + MTw := 30. + MTm := 9. + MTa := 16r3235DEE2. + "MTb := 16r39BB2B00. Not used directly." + "MTc := 16r3EFD0000. Not used directly." + MTl := -18. + MTu := -12. + MTs := 7. + MTt := 15. + "Calculated parameters" + MTn := 18. + "MTr := 19. Not used directly." + MTupperMask := 16r3FF80000. + MTlowerMask := 16r7FFFF. + MTwordMask := 16r3FFFFFFF. + MTbShifted := 7566934. + MTcShifted := 32250. + MTwFloatMultiplier := 8388608. + self allInstancesDo: [ :each | each instVarNamed: #seed put: nil; seed: nil ]! - "Initialize the magic constants. All instances share these values. Use floats to avoid LargeInteger computations (it still gives about 3-4x speedup)." - - A := 16807.0. " magic constant = 16807 " - M := 2147483647.0. " magic constant = 2147483647 " - Q := 127773.0. "(m quo: a) asFloat." - R := 2836.0 "(m \\ a) asFloat."! Item was changed: ----- Method: Random class>>seed: (in category 'instance creation') ----- + seed: anInteger + - seed: anInteger ^self basicNew seed: anInteger! Item was added: + ----- Method: Random>>generateStates (in category 'private') ----- + generateStates + "Generate untempered numbers into the states variable. Split up the operation into three parts to avoid the use of #atWrap: for accessing the states array. Optimized for SmallInteger operations." + + | i limit y offset | + "Part 1" + i := 0. + offset := MTm. + limit := MTn - offset. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (MTupperMask bitAnd: (states at: i)) bitOr: (MTlowerMask bitAnd: (states at: i + 1)). + states + at: i + put: ((y bitAnd: 1) * MTa bitXor: ((states at: i + offset) bitXor: (y bitShift: -1))) ]. + "Part 2" + limit := MTn - 1. + offset := MTm - MTn. + i := i - 1. + [ (i := i + 1) <= limit ] whileTrue: [ + y := (MTupperMask bitAnd: (states at: i)) bitOr: (MTlowerMask bitAnd: (states at: i + 1)). + states + at: i + put: ((y bitAnd: 1) * MTa bitXor: ((states at: i + offset) bitXor: (y bitShift: -1))) ]. + "Part 3" + y := (MTupperMask bitAnd: (states at: MTn)) bitOr: (MTlowerMask bitAnd: (states at: 1)). + states + at: MTn + put: ((y bitAnd: 1) * MTa bitXor: ((states at: MTm) bitXor: (y bitShift: -1))). + index := 1 + ! Item was changed: + ----- Method: Random>>hashSeed: (in category 'private') ----- - ----- Method: Random>>hashSeed: (in category 'initialization') ----- hashSeed: anInteger + "Use the 32-bit version of the FNV-1a algorithm to hash the seed, and return a 32-bit unsigned integer." - " Use the 32-bit version of the FNV-1a algorithm to hash the seed. Keep only 31 bits during the calculation. " | fnvPrime hash | fnvPrime := 16777619 " 32-bit FVN prime ". hash := anInteger negative + ifTrue: [ 3490449840 " mix in the sign as (2166136261 bitXor: 2r1010101) * 16777619 bitAnd: 16rFFFFFFFF "] - ifTrue: [ 1342966192 " mix in the sign as (2166136261 bitXor: 2r1010101) * 16777619 bitAnd: 16r7FFFFFFF "] ifFalse: [ 2166136261 " 32-bit FVN offset basis "]. 1 to: anInteger digitLength do: [ :index | + hash := 16rFFFFFFFF bitAnd: (hash bitXor: (anInteger digitAt: index)) * fnvPrime ]. + ^hash! - hash := (hash bitXor: (anInteger digitAt: index)) * fnvPrime bitAnd: 16r7FFFFFFF ]. - seed := hash asFloat! Item was changed: ----- Method: Random>>initialize (in category 'initialization') ----- initialize - " Set a reasonable Park-Miller starting seed " + self seed: seed! - | hash newSeed | - hash := self hash hashMultiply. - newSeed := Time primUTCMicrosecondClock. - newSeed isZero ifTrue: [ " microsecond clock not available " - newSeed := Time millisecondClockValue ]. - seed := ((newSeed bitAnd: 16r7FFFFFFF) bitXor: hash) asFloat! Item was added: + ----- Method: Random>>initializeStates (in category 'private') ----- + initializeStates + "Initialize the states array with the seed." + + states := Array new: MTn. + 1 to: MTn do: [ :i | + states at: i put: (MTwordMask bitAnd: seed). + seed := 16rFFFFFFFF bitAnd: (16r6C078965 * (seed bitXor: seed // 16r40000000 "bitShift: -30") + i) ]! Item was changed: ----- Method: Random>>next (in category 'accessing') ----- next + "Answer a random 53-bit Float from the [0, 1) interval. The implementation assumes that the MTw parameter is between 27 and 53." + + seed isFloat ifTrue: [ + "Answer a random Float in the interval [0 to 1)." + ^ (seed := self nextValue) - 1.0 / M ]. + ^self nextValue asFloat * MTwFloatMultiplier + (self nextValue bitAnd: MTwFloatMultiplier - 1) / 9.007199254740992e15 "(1 << 53) asFloat"! - "Answer a random Float in the interval [0 to 1)." - - ^ (seed := self nextValue) - 1.0 / M! Item was changed: ----- Method: Random>>nextInt: (in category 'accessing') ----- nextInt: anInteger + "Answer a random integer value from the interval [1, anInteger]" - " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " + | bucketSize retriesLeft | anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. + seed isFloat ifTrue: [ + " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " + "avoid Float arithmetic in #next to work with LargeInts" + ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1 ]. + (anInteger isLarge + or: [ anInteger > MTwordMask "In case SmallIntegers have more than MTw-bits, but the generator hasn't been updated accordingly." ]) + ifTrue: [ ^self nextLargeInt: anInteger ]. + + "Split the MTw-bit(currently 30-bit) integer range up to the equal sized buckets. Generate an MTw-bit random number, and see which bucket it's in. If it doesn't fit in any bucket, then try again." + bucketSize := MTwordMask // anInteger. "The optimal bucket size would be MTwordMask + 1 // anInteger, but calculating it would involve LargeInteger arithmetic. The MTwordMask // anInteger expression is suboptimal only when anInteger is a power of two. These cases are rare, and the effect is negligible for small values. We could handle these cases separately, but testing if anInteger is a power of two costs more in general." + retriesLeft := 10. "Based on measurements with various seeds, 10 retries is about optimal for the worst case, when anInteger = MTwordMask // 2 + 1." + [ (retriesLeft := retriesLeft - 1) >= 0 ] whileTrue: [ + | bucket | + bucket := self nextValue // bucketSize. + bucket < anInteger ifTrue: [ ^bucket + 1 ] ]. + "Fall back to the floating point method, which is slower, but when we get here, then we've already spent enough resources on trying to generate the number. Using this fallback also ensures that the method doesn't run for indefinitely long." + ^(self next * anInteger) truncated + 1! - "avoid Float arithmetic in #next to work with LargeInts" - ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1! Item was added: + ----- Method: Random>>nextLargeInt: (in category 'accessing') ----- + nextLargeInt: anInteger + "Answer a random integer value from the interval [1, anInteger]. This method works for arbitrarily large integers." + + | byteCount bigRandom remainder remainingBits i result firstDigit | + byteCount := anInteger digitLength + 4. "Extend the space with at least 32 bits for a fairer distribution." + bigRandom := LargePositiveInteger new: byteCount. + remainder := remainingBits := 0. + i := 1. + [ i <= byteCount ] whileTrue: [ + remainingBits >= 8 + ifTrue: [ + bigRandom digitAt: i put: (remainder bitAnd: 16rFF). + remainder := remainder bitShift: -8. + remainingBits := remainingBits - 8. + i := i + 1 ] + ifFalse: [ + remainingBits = 0 + ifTrue: [ remainder := self nextValue ] + ifFalse: [ + | newRandom | + newRandom := self nextValue. + bigRandom digitAt: i put: (remainder bitShift: 8 - remainingBits) + + (newRandom bitAnd: (1 bitShift: 8 - remainingBits) - 1). + i := i + 1. + remainder := newRandom bitShift: 0 - remainingBits ]. + remainingBits := MTw - remainingBits ] ]. + result := anInteger * bigRandom bitShift: -8 * byteCount. + "Avoid using LargeInteger arithmetic for +1 in most cases." + result isLarge ifFalse: [ ^result + 1 ]. + (firstDigit := result digitAt: 1) = 255 ifTrue: [ ^result + 1 ]. + result digitAt: 1 put: firstDigit + 1. + ^result + ! Item was changed: ----- Method: Random>>nextValue (in category 'private') ----- nextValue + "Answer an MTw-bit random integer between 0 and wordMask, and increment the index." - "This method generates random instances of Integer in the interval 1 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends answer the same value. - The algorithm is described in detail in 'Random Number Generators: - Good Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller - (Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988)." + | y | + seed isFloat ifTrue: [ + "This method generates random instances of Integer in the interval 1 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends answer the same value. + The algorithm is described in detail in 'Random Number Generators: + Good Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller + (Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988)." + | lo hi aLoRHi | + hi := seed quo: Q. + lo := seed - (Q * hi). " = seed rem: q" + aLoRHi := (A * lo) - (R * hi). + aLoRHi > 0.0 ifTrue: [ ^aLoRHi ]. + ^aLoRHi + M ]. + y := states at: index. + (index := index + 1) > MTn ifTrue: [ self generateStates ]. + y := y bitXor: (y bitShift: MTu). + y := ((y bitAnd: MTbShifted) bitShift: MTs) bitXor: y. + y := ((y bitAnd: MTcShifted) bitShift: MTt) bitXor: y. + y := (y bitShift: MTl) bitXor: y. + ^y! - | lo hi aLoRHi | - hi := seed quo: Q. - lo := seed - (Q * hi). " = seed rem: q" - aLoRHi := (A * lo) - (R * hi). - aLoRHi > 0.0 ifTrue: [ ^aLoRHi ]. - ^aLoRHi + M! Item was changed: ----- Method: Random>>seed: (in category 'initialization') ----- + seed: anIntegerOrNil + " Use the given integer as seed, or generate one if it's nil. " - seed: anInteger - " Use this 31-bit nonnegative integer as seed. Generate a valid seed using a hash function if it's out of range. " + | newSeed | + newSeed := anIntegerOrNil ifNil: [ + | now | + now := Time primUTCMicrosecondClock. + now = 0 ifTrue: [ now := Time millisecondClockValue ]. + (now bitShift: 28) bitXor: self hash hashMultiply ]. + seed isFloat ifTrue: [ + (newSeed between: 0 and: 16r7FFFFFFF) + ifTrue: [ seed := newSeed asFloat ] + ifFalse: [ seed := ((self hashSeed: newSeed) bitXor: 16r7FFFFFFF) asFloat ]. + ^self ]. + (newSeed between: 0 and: 16rFFFFFFFF) + ifTrue: [ seed := newSeed ] + ifFalse: [ seed := self hashSeed: newSeed ]. + self + initializeStates; + generateStates! - (anInteger between: 0 and: 16r7FFFFFFF) - ifTrue: [ seed := anInteger asFloat ] - ifFalse: [ self hashSeed: anInteger ]! From commits at source.squeak.org Thu Feb 26 21:05:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 21:05:55 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.907.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.907.mcz ==================== Summary ==================== Name: Kernel-ul.907 Author: ul Time: 26 February 2015, 9:26:09.288 pm UUID: a94084a6-3f89-4708-8e60-b7978f1b3501 Ancestors: Kernel-ul.906 Removed the old random number generator implementation from Random. =============== Diff against Kernel-ul.906 =============== Item was changed: ----- Method: LargePositiveInteger>>atRandom: (in category 'truncation and round off') ----- + atRandom: aRandom + "Answer a random integer from 1 to self picked from aRandom." - atRandom: aGenerator - "Answer a random integer from 1 to self picked from aGenerator." + ^aRandom nextLargeInt: self! - | chunkByteLength chunkBitLength chunkCount chunkMax bigRandomInteger | - chunkByteLength := 3. - chunkBitLength := chunkByteLength * 8. - chunkCount := - self highBitOfMagnitude + chunkBitLength - 1 // chunkBitLength "self would fit in that many chunks..." - + 2. "and two more chunks (48 bits) so as to have a pretty fair distribution" - chunkMax := 1<> (chunkCount * chunkBitLength) + 1! Item was changed: Object subclass: #Random + instanceVariableNames: 'states index seed' - instanceVariableNames: 'seed states index' classVariableNames: 'A M MTa MTbShifted MTcShifted MTl MTlowerMask MTm MTn MTs MTt MTu MTupperMask MTw MTwFloatMultiplier MTwordMask Q R' poolDictionaries: '' category: 'Kernel-Numbers'! + !Random commentStamp: 'ul 2/20/2015 09:44' prior: 0! + I implement the 32-bit version of the Mersenne Twister PRNG, using 30-bit arithmetic, based on http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf . The parameters of the generator are stored in class variables prefixed with MT. - !Random commentStamp: 'nice 3/24/2010 07:38' prior: 0! - This Random Number Generator graciously contributed by David N. Smith. It is an adaptation of the Park-Miller RNG which uses Floats to avoid the need for LargeInteger arithmetic. + Instance Variables + states: + index: + + index + - the index of the state, which should be used to generate the next random integer value + + states + - an Array holding the internal state of the generator + + --- + If you just want a quick random integer, use: 10 atRandom Every integer interval can give a random number: (6 to: 12) atRandom SequenceableCollections can give randomly selected elements: 'pick one of these letters randomly' atRandom SequenceableCollections also respond to shuffled, as in: ($A to: $Z) shuffled The correct way to use class Random is to store one in an instance or class variable: myGenerator := Random new. Then use it every time you need another number between 0.0 and 1.0 (excluding) myGenerator next You can also generate a positive integer myGenerator nextInt: 10! Item was changed: ----- Method: Random class>>initialize (in category 'class initialization') ----- initialize "30-bit MT521 parameters. generated with a modified version of dcmt with ID=1. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html" "Base parameters" "MTp := 521. Not used directly." MTw := 30. MTm := 9. MTa := 16r3235DEE2. "MTb := 16r39BB2B00. Not used directly." "MTc := 16r3EFD0000. Not used directly." MTl := -18. MTu := -12. MTs := 7. MTt := 15. "Calculated parameters" MTn := 18. "MTr := 19. Not used directly." MTupperMask := 16r3FF80000. MTlowerMask := 16r7FFFF. MTwordMask := 16r3FFFFFFF. MTbShifted := 7566934. MTcShifted := 32250. + MTwFloatMultiplier := 8388608! - MTwFloatMultiplier := 8388608. - self allInstancesDo: [ :each | each instVarNamed: #seed put: nil; seed: nil ]! Item was changed: ----- Method: Random>>initialize (in category 'initialization') ----- initialize + self seed: nil! - self seed: seed! Item was removed: - ----- Method: Random>>initializeStates (in category 'private') ----- - initializeStates - "Initialize the states array with the seed." - - states := Array new: MTn. - 1 to: MTn do: [ :i | - states at: i put: (MTwordMask bitAnd: seed). - seed := 16rFFFFFFFF bitAnd: (16r6C078965 * (seed bitXor: seed // 16r40000000 "bitShift: -30") + i) ]! Item was added: + ----- Method: Random>>initializeStatesWith: (in category 'private') ----- + initializeStatesWith: anInteger + "Initialize the states array with the seed." + + | seed | + states := Array new: MTn. + seed := anInteger. + 1 to: MTn do: [ :i | + states at: i put: (MTwordMask bitAnd: seed). + seed := 16rFFFFFFFF bitAnd: (16r6C078965 * (seed bitXor: seed // 16r40000000 "bitShift: -30") + i) ]! Item was changed: ----- Method: Random>>next (in category 'accessing') ----- next "Answer a random 53-bit Float from the [0, 1) interval. The implementation assumes that the MTw parameter is between 27 and 53." - seed isFloat ifTrue: [ - "Answer a random Float in the interval [0 to 1)." - ^ (seed := self nextValue) - 1.0 / M ]. ^self nextValue asFloat * MTwFloatMultiplier + (self nextValue bitAnd: MTwFloatMultiplier - 1) / 9.007199254740992e15 "(1 << 53) asFloat"! Item was changed: ----- Method: Random>>nextInt: (in category 'accessing') ----- nextInt: anInteger "Answer a random integer value from the interval [1, anInteger]" | bucketSize retriesLeft | anInteger strictlyPositive ifFalse: [ self error: 'Range must be positive' ]. - seed isFloat ifTrue: [ - " Answer a random integer in the interval [1, anInteger]. anInteger should be less than 16r80000000. " - "avoid Float arithmetic in #next to work with LargeInts" - ^ ((seed := self nextValue) asInteger * anInteger // M asInteger) + 1 ]. (anInteger isLarge or: [ anInteger > MTwordMask "In case SmallIntegers have more than MTw-bits, but the generator hasn't been updated accordingly." ]) ifTrue: [ ^self nextLargeInt: anInteger ]. - "Split the MTw-bit(currently 30-bit) integer range up to the equal sized buckets. Generate an MTw-bit random number, and see which bucket it's in. If it doesn't fit in any bucket, then try again." bucketSize := MTwordMask // anInteger. "The optimal bucket size would be MTwordMask + 1 // anInteger, but calculating it would involve LargeInteger arithmetic. The MTwordMask // anInteger expression is suboptimal only when anInteger is a power of two. These cases are rare, and the effect is negligible for small values. We could handle these cases separately, but testing if anInteger is a power of two costs more in general." retriesLeft := 10. "Based on measurements with various seeds, 10 retries is about optimal for the worst case, when anInteger = MTwordMask // 2 + 1." [ (retriesLeft := retriesLeft - 1) >= 0 ] whileTrue: [ | bucket | bucket := self nextValue // bucketSize. bucket < anInteger ifTrue: [ ^bucket + 1 ] ]. "Fall back to the floating point method, which is slower, but when we get here, then we've already spent enough resources on trying to generate the number. Using this fallback also ensures that the method doesn't run for indefinitely long." ^(self next * anInteger) truncated + 1! Item was changed: ----- Method: Random>>nextValue (in category 'private') ----- nextValue "Answer an MTw-bit random integer between 0 and wordMask, and increment the index." | y | - seed isFloat ifTrue: [ - "This method generates random instances of Integer in the interval 1 to 16r7FFFFFFF. This method does NOT update the seed; repeated sends answer the same value. - The algorithm is described in detail in 'Random Number Generators: - Good Ones Are Hard to Find' by Stephen K. Park and Keith W. Miller - (Comm. Asso. Comp. Mach., 31(10):1192--1201, 1988)." - | lo hi aLoRHi | - hi := seed quo: Q. - lo := seed - (Q * hi). " = seed rem: q" - aLoRHi := (A * lo) - (R * hi). - aLoRHi > 0.0 ifTrue: [ ^aLoRHi ]. - ^aLoRHi + M ]. y := states at: index. (index := index + 1) > MTn ifTrue: [ self generateStates ]. y := y bitXor: (y bitShift: MTu). y := ((y bitAnd: MTbShifted) bitShift: MTs) bitXor: y. y := ((y bitAnd: MTcShifted) bitShift: MTt) bitXor: y. y := (y bitShift: MTl) bitXor: y. ^y! Item was removed: - ----- Method: Random>>seed (in category 'private') ----- - seed - ^ seed! Item was changed: ----- Method: Random>>seed: (in category 'initialization') ----- seed: anIntegerOrNil " Use the given integer as seed, or generate one if it's nil. " | newSeed | newSeed := anIntegerOrNil ifNil: [ | now | now := Time primUTCMicrosecondClock. now = 0 ifTrue: [ now := Time millisecondClockValue ]. (now bitShift: 28) bitXor: self hash hashMultiply ]. + (newSeed between: 0 and: 16rFFFFFFFF) ifFalse: [ + newSeed := self hashSeed: newSeed ]. - seed isFloat ifTrue: [ - (newSeed between: 0 and: 16r7FFFFFFF) - ifTrue: [ seed := newSeed asFloat ] - ifFalse: [ seed := ((self hashSeed: newSeed) bitXor: 16r7FFFFFFF) asFloat ]. - ^self ]. - (newSeed between: 0 and: 16rFFFFFFFF) - ifTrue: [ seed := newSeed ] - ifFalse: [ seed := self hashSeed: newSeed ]. self + initializeStatesWith: newSeed; - initializeStates; generateStates! From commits at source.squeak.org Thu Feb 26 21:10:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 21:10:33 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.908.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.908.mcz ==================== Summary ==================== Name: Kernel-ul.908 Author: ul Time: 26 February 2015, 10:09:05.384 pm UUID: 89028aae-a08b-4320-9c55-53b1036a5192 Ancestors: Kernel-ul.907 Removed the unused variables from Random. =============== Diff against Kernel-ul.907 =============== Item was changed: Object subclass: #Random + instanceVariableNames: 'states index' + classVariableNames: 'MTa MTbShifted MTcShifted MTl MTlowerMask MTm MTn MTs MTt MTu MTupperMask MTw MTwFloatMultiplier MTwordMask' - instanceVariableNames: 'states index seed' - classVariableNames: 'A M MTa MTbShifted MTcShifted MTl MTlowerMask MTm MTn MTs MTt MTu MTupperMask MTw MTwFloatMultiplier MTwordMask Q R' poolDictionaries: '' category: 'Kernel-Numbers'! !Random commentStamp: 'ul 2/20/2015 09:44' prior: 0! I implement the 32-bit version of the Mersenne Twister PRNG, using 30-bit arithmetic, based on http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf . The parameters of the generator are stored in class variables prefixed with MT. Instance Variables states: index: index - the index of the state, which should be used to generate the next random integer value states - an Array holding the internal state of the generator --- If you just want a quick random integer, use: 10 atRandom Every integer interval can give a random number: (6 to: 12) atRandom SequenceableCollections can give randomly selected elements: 'pick one of these letters randomly' atRandom SequenceableCollections also respond to shuffled, as in: ($A to: $Z) shuffled The correct way to use class Random is to store one in an instance or class variable: myGenerator := Random new. Then use it every time you need another number between 0.0 and 1.0 (excluding) myGenerator next You can also generate a positive integer myGenerator nextInt: 10! From commits at source.squeak.org Thu Feb 26 21:19:09 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 21:19:11 2015 Subject: [squeak-dev] The Trunk: Morphic-ul.763.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.763.mcz ==================== Summary ==================== Name: Morphic-ul.763 Author: ul Time: 26 February 2015, 10:17:41.62 pm UUID: ca68fd92-ab68-403b-91ae-3adef769f32d Ancestors: Morphic-mt.762, Morphic-ul.754 Merged Morphic-ul.754: Simplified and improved WorldState >> #interCyclePause: - don't create a new Delay (along with a new Semaphore) every 20 (or 50) milliseconds - use #millisecondsSince: to avoid the effects of the clock rollover - separated the code of time calculation and actual waiting =============== Diff against Morphic-mt.762 =============== Item was changed: Object subclass: #WorldState + instanceVariableNames: 'hands activeHand viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas interCycleDelay' - instanceVariableNames: 'hands activeHand viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas' classVariableNames: 'CanSurrenderToOS DeferredUIMessages DisableDeferredUpdates LastCycleTime MinCycleLapse' poolDictionaries: '' category: 'Morphic-Worlds'! !WorldState commentStamp: 'ls 7/10/2003 19:30' prior: 0! The state of a Morphic world. (This needs some serious commenting!!!!) The MinCycleLapse variable holds the minimum amount of time that a morphic cycle is allowed to take. If a cycle takes less than this, then interCyclePause: will wait until the full time has been used up.! Item was changed: ----- Method: WorldState>>interCyclePause: (in category 'update cycle') ----- interCyclePause: milliSecs "delay enough that the previous cycle plus the amount of delay will equal milliSecs. If the cycle is already expensive, then no delay occurs. However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low. If the preference #serverMode is enabled, always do a complete delay of 50ms, independant of my argument. This prevents the freezing problem described in Mantis #6581" + | millisecondsToWait | + millisecondsToWait := Preferences serverMode + ifTrue: [ 50 ] - | currentTime wait | - Preferences serverMode ifFalse: [ + (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) + ifTrue: [ milliSecs - (Time millisecondsSince: lastCycleTime) ] + ifFalse: [ 0 ] ]. + millisecondsToWait > 0 ifTrue: [ + interCycleDelay + ifNil: [ interCycleDelay := Delay forMilliseconds: millisecondsToWait ] + ifNotNil: [ interCycleDelay delayDuration: millisecondsToWait ]. + interCycleDelay wait ]. - (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) ifTrue: [ - currentTime := Time millisecondClockValue. - wait := lastCycleTime + milliSecs - currentTime. - (wait > 0 and: [ wait <= milliSecs ] ) ifTrue: [ - (Delay forMilliseconds: wait) wait ] ] ] - ifTrue: [ (Delay forMilliseconds: 50) wait ]. - lastCycleTime := Time millisecondClockValue. CanSurrenderToOS := true.! From commits at source.squeak.org Thu Feb 26 21:19:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Feb 26 21:19:36 2015 Subject: [squeak-dev] The Trunk: Morphic-ul.754.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.754.mcz ==================== Summary ==================== Name: Morphic-ul.754 Author: ul Time: 18 January 2015, 8:33:51.264 pm UUID: 2e6f7fa2-e377-4374-99db-5be8fbad0013 Ancestors: Morphic-bf.753 Simplified and improved WorldState >> #interCyclePause: - don't create a new Delay (along with a new Semaphore) every 20 (or 50) milliseconds - use #millisecondsSince: to avoid the effects of the clock rollover - separated the code of time calculation and actual waiting Depends on Kernel-ul.893 =============== Diff against Morphic-bf.753 =============== Item was changed: Object subclass: #WorldState + instanceVariableNames: 'hands activeHand viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas interCycleDelay' - instanceVariableNames: 'hands activeHand viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas' classVariableNames: 'CanSurrenderToOS DeferredUIMessages DisableDeferredUpdates LastCycleTime MinCycleLapse' poolDictionaries: '' category: 'Morphic-Worlds'! !WorldState commentStamp: 'ls 7/10/2003 19:30' prior: 0! The state of a Morphic world. (This needs some serious commenting!!!!) The MinCycleLapse variable holds the minimum amount of time that a morphic cycle is allowed to take. If a cycle takes less than this, then interCyclePause: will wait until the full time has been used up.! Item was changed: ----- Method: WorldState>>interCyclePause: (in category 'update cycle') ----- interCyclePause: milliSecs "delay enough that the previous cycle plus the amount of delay will equal milliSecs. If the cycle is already expensive, then no delay occurs. However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low. If the preference #serverMode is enabled, always do a complete delay of 50ms, independant of my argument. This prevents the freezing problem described in Mantis #6581" + | millisecondsToWait | + millisecondsToWait := Preferences serverMode + ifTrue: [ 50 ] - | currentTime wait | - Preferences serverMode ifFalse: [ + (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) + ifTrue: [ milliSecs - (Time millisecondsSince: lastCycleTime) ] + ifFalse: [ 0 ] ]. + millisecondsToWait > 0 ifTrue: [ + interCycleDelay + ifNil: [ interCycleDelay := Delay forMilliseconds: millisecondsToWait ] + ifNotNil: [ interCycleDelay delayDuration: millisecondsToWait ]. + interCycleDelay wait ]. - (lastCycleTime notNil and: [CanSurrenderToOS ~~ false]) ifTrue: [ - currentTime := Time millisecondClockValue. - wait := lastCycleTime + milliSecs - currentTime. - (wait > 0 and: [ wait <= milliSecs ] ) ifTrue: [ - (Delay forMilliseconds: wait) wait ] ] ] - ifTrue: [ (Delay forMilliseconds: 50) wait ]. - lastCycleTime := Time millisecondClockValue. CanSurrenderToOS := true.! From nicolas.cellier.aka.nice at gmail.com Thu Feb 26 22:15:40 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Feb 26 22:15:43 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: References: <1424852638182-4807479.post@n4.nabble.com> <1424935560085-4807757.post@n4.nabble.com> <1424952316951-4807804.post@n4.nabble.com> Message-ID: 2015-02-26 19:54 GMT+01:00 Bert Freudenberg : > On 26.02.2015, at 04:05, Marcel Taeumel < > marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > > > > Okay. Tim just explained to me, what Bert's "stack" actually means, and > that > > it is not necessarily a stack from an implementation point of view but > > merely a smart counter. :) > > > > Sounds reasonable. And much cheaper than asking the Parser if there are > too > > few closing brackets. And similar (even better) from a usability > > perspective. > > What I was proposing (and what is *standard* behavior in about any code > editor) has nothing to do with the parser. It is not counting any parens > that are in the text already. It's not even aware of syntax. It merely > temporarily keeps track of what was auto-inserted, on a single line, not > globally, not forever. As soon as you move the cursor you're back to > regular, non-magic editing. > > Auto-inserted parens are magic. This magic lasts until the user is done > editing that single expression. It should be nothing fancy from a user's > point of view. Using it should not be any more complicated than using a > non-magic editor. But most importantly, the magic must not get in the way. > We should delight our users with magic, not make them wish for a dumb > editor because the magic is annoying. > > > I will look into it later this day. > > Awesome! > > - Bert - > > > What if we used a specific emphasis like maybe #autoInserted with a specific rendering (i.e. a fade gray background...) until there is a right arrow key, or a closing parenthesis, a delete key, or a left click positionning the cursor over the magically inserted characters? This is somehow a light way to stack the states... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150226/1db4628f/attachment.htm From jakob.reschke at student.hpi.de Thu Feb 26 23:09:20 2015 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Feb 26 23:09:44 2015 Subject: [squeak-dev] Re: Is there a preference setting to block automatic parentheses? In-Reply-To: <9d81a6cc43494669a61443676976d443@OWA-2012.hpi.uni-potsdam.de> References: <44FF4BCC-343B-4630-BD85-2A7D6EFA02D6@gmail.com> <1424852638182-4807479.post@n4.nabble.com> <7EB06A0B-A0F6-41D6-800B-74D8C40DBFF8@gmx.de> <9d81a6cc43494669a61443676976d443@OWA-2012.hpi.uni-potsdam.de> Message-ID: Hello, 2015-02-26 18:11 GMT+01:00 Chris Muller : >> and how should I type Command+(? like, Command-Shift-9? Ok. > > Yes. > >> Why not '(' at that point. > > Because that is used to /replace/ the currently selected expression > with a new expression. Selection replace is how all editors work, and > we agreed we wish to minimize surprises and violations of typing > behavior invariants. > > 8< > > I think the problem of 2nd line > above becomes understandable to the user, and, if it is happening > "constantly" that they will like to learn and use the better way; of > selecting the expression and pressing Command+(.. I doubt that Command+( is a widely known or sufficiently advertised feature. In fact, before you mentioned it in this discussion I believed only OCompletion would provide this desirable feature (without Command) and I have used Squeak for 2.5 years. The keyboard shortcut list does mention it (and some more which I will happily use from now on) but the list starts out rather unhelpfully sorted if you want to discover "power-user" features and currently also contains some errors (or some shortcuts do not function correctly), but that is a different problem. Therefore, I would prefer when ( with selected text would surround that text with brackets instead of replacing it or at least Command+( etc. be advertised somehow. Personally, I am also fine with skipping brackets in the |))) --> )|)) case because I am used to it from Eclipse and might want to reach a place in between those brackets to add further arguments... but I would, like Bert if I understood him correctly, also prefer this behavior to stop and an additional parenthesis be inserted if the cursor has been moved with the arrow keys, by mouse click etc. And for the statistics, I also dislike "|foo" --> "(|)foo" (like most of us) and generally reaching for the navigation keys to write new code. Pharo's behavior as described by Martin seems like a good compromise to me. I also wonder how many people actually write or edit text with expressions first in mind, like you do, Chris. I figure it is a good idea for writing formulas (e. g. using a workspace as a calculator), but at least it did not come to my mind as such for coding (in languages where you "write in words" and parentheses are mostly written for the machine). Best regards, Jakob From lewis at mail.msen.com Fri Feb 27 01:28:49 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Feb 27 01:28:51 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.906.mcz In-Reply-To: <201502262103.t1QL3SdO071768@shell.msen.com> References: <201502262103.t1QL3SdO071768@shell.msen.com> Message-ID: <20150227012849.GA16045@shell.msen.com> On Thu, Feb 26, 2015 at 09:03:07PM +0000, commits@source.squeak.org wrote: > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-ul.906.mcz > > ==================== Summary ==================== > > Name: Kernel-ul.906 > Author: ul > Time: 26 February 2015, 9:22:02.722 pm > UUID: 9fd0ffbc-c774-442a-baa5-5b0e13950856 > Ancestors: Kernel-topa.905 > > Added an implementation of a 30-bit Mersenne Twister (p=521) to Random. All existing Random instances are migrated to the new implementation. > I love seeing things like this entering the image. I remember someone long ago (maybe it was Andreas or Dan?) describing Squeak as a "computer science degree in a box". These updates to Random are a very nice example, with clear comments to explain the complicated bits, and a class comment to give an overview with references to the source of the algorithm. Cool. Some updates to RandomTest may be also needed to match the new implementation. Dave From commits at source.squeak.org Fri Feb 27 10:34:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 10:34:32 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.764.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.764.mcz ==================== Summary ==================== Name: Morphic-mt.764 Author: mt Time: 27 February 2015, 11:33:22.268 am UUID: 2ca4e315-b777-2847-830e-366884514d22 Ancestors: Morphic-ul.763 New pragma-preference for #gradientMenu to update SystemProgressbar instance accordingly. Postload-script will remove the old-style preference. =============== Diff against Morphic-ul.763 =============== Item was changed: ----- Method: DockingBarMorph>>initialize (in category 'initialize-release') ----- initialize "initialize the receiver" super initialize. selectedItem := nil. activeSubMenu := nil. fillsOwner := true. avoidVisibleBordersAtEdge := true. + autoGradient := MenuMorph gradientMenu. - autoGradient := Preferences gradientMenu. self setDefaultParameters ; beFloating ; beSticky ; layoutInset: 0 ; dropEnabled: true. Project current world activeHand addKeyboardListener: self! Item was changed: ----- Method: FillInTheBlankMorph>>updateColor:color:intensity: (in category 'initialization') ----- updateColor: aMorph color: aColor intensity: anInteger "update the apareance of aMorph" | fill | + MenuMorph gradientMenu - Preferences gradientMenu ifFalse: [^ self]. fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> aColor}. fill radial: false; origin: aMorph topLeft; direction: 0 @ aMorph height. aMorph fillStyle: fill! Item was changed: ----- Method: MenuItemMorph>>selectionFillStyle (in category 'private') ----- selectionFillStyle " Answer the fill style to use with the receiver is the selected element " | fill baseColor preferenced | Display depth <= 2 ifTrue: [ ^Color gray ]. preferenced := Preferences menuSelectionColor. preferenced notNil ifTrue: [ ^preferenced ]. baseColor := owner color negated. + MenuMorph gradientMenu ifFalse: [ ^baseColor ]. - Preferences gradientMenu ifFalse: [ ^baseColor ]. fill := GradientFillStyle ramp: { 0.0 -> baseColor twiceLighter. 1 -> baseColor twiceDarker }. fill origin: self topLeft. ^ fill! Item was changed: AlignmentMorph subclass: #MenuMorph instanceVariableNames: 'defaultTarget selectedItem stayUp popUpOwner activeSubMenu' + classVariableNames: 'CloseBoxImage GradientMenu PushPinImage' - classVariableNames: 'CloseBoxImage PushPinImage' poolDictionaries: '' category: 'Morphic-Menus'! !MenuMorph commentStamp: '' prior: 0! Instance variables: defaultTarget The default target for creating menu items selectedItem The currently selected item in the receiver stayUp True if the receiver should stay up after clicks popUpOwner The menu item that automatically invoked the receiver, if any. activeSubMenu The currently active submenu.! Item was added: + ----- Method: MenuMorph class>>gradientMenu (in category 'preferences') ----- + gradientMenu + + + ^ GradientMenu ifNil: [true]! Item was added: + ----- Method: MenuMorph class>>gradientMenu: (in category 'preferences') ----- + gradientMenu: aBoolean + + GradientMenu := aBoolean. + SystemProgressMorph reset.! Item was changed: ----- Method: MenuMorph>>updateColor (in category 'control') ----- updateColor | fill title | + self class gradientMenu - Preferences gradientMenu ifFalse: [^ self]. (self fillStyle == self color) not ifTrue: [^ self]. "Don't apply the gradient more than once" "" fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> self color}. "" fill radial: false; origin: self topLeft; direction: 0 @ self height. "" self fillStyle: fill. " update the title color" title := self allMorphs detect: [:each | each hasProperty: #titleString] ifNone: [^ self]. "" fill := GradientFillStyle ramp: {0.0 -> title color twiceLighter. 1 -> title color twiceDarker}. "" fill origin: title topLeft; direction: title width @ 0. "" title fillStyle: fill! Item was changed: ----- Method: SystemProgressMorph>>updateColor:color:intensity: (in category 'initialization') ----- updateColor: aMorph color: aColor intensity: anInteger "update the apareance of aMorph" | fill | + MenuMorph gradientMenu - Preferences gradientMenu ifFalse: [^ self]. fill := GradientFillStyle ramp: {0.0 -> Color white. 1 ->aColor}. fill radial: false; origin: aMorph topLeft; direction: 0 @ aMorph height. aMorph fillStyle: fill! Item was changed: (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. "Force SystemProgressMorph to be reset" SystemProgressMorph initialize; reset. "Initialize the key bindings and menus" Editor initialize. "Retain scrollBar look now that the pref actually does something" Preferences enable: #gradientScrollBars. "apply the new icons" MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. + + "Cleanup old-style preferences here. Remove before new release." + Preferences removePreference: #gradientMenu. "Now in MenuMorph."'! - '! From commits at source.squeak.org Fri Feb 27 10:37:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 10:37:23 2015 Subject: [squeak-dev] The Trunk: System-mt.705.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.705.mcz ==================== Summary ==================== Name: System-mt.705 Author: mt Time: 27 February 2015, 11:36:43.752 am UUID: faa11c89-248a-8348-a7be-2d40e6441ee2 Ancestors: System-topa.704 Auto-generated method for #gradientMenu removed because of postload-script in Morphic-mt.764. =============== Diff against System-topa.704 =============== Item was removed: - ----- Method: Preferences class>>gradientMenu (in category 'standard queries') ----- - gradientMenu - ^ self - valueOfFlag: #gradientMenu - ifAbsent: [ true ]! From commits at source.squeak.org Fri Feb 27 10:45:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 10:45:48 2015 Subject: [squeak-dev] The Trunk: System-mt.706.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.706.mcz ==================== Summary ==================== Name: System-mt.706 Author: mt Time: 27 February 2015, 11:45:09.18 am UUID: 3175d70c-e137-1b40-91aa-4df3c1228235 Ancestors: System-mt.705 Re-activated possibility to have multiple categories for a single preference. Worked for old-style preferences, now works again for pragma-style preferences. Use #categoryList: instead of #category: in the pragma and provide an array of strings (or symbols). =============== Diff against System-mt.705 =============== Item was changed: ----- Method: Preferences class>>prefEvent: (in category 'dynamic preferences') ----- prefEvent: anEvent "Check if this system event defines or removes a preference. TODO: Queue the event and handle in background process. There is zero reason to be so eager here." | aClass aSelector prefSymbol method | (anEvent itemKind = SystemChangeNotifier classKind and: [anEvent isRemoved]) ifTrue:[self removePreferencesFor: anEvent item]. anEvent itemKind = SystemChangeNotifier methodKind ifTrue:[ aClass := anEvent itemClass. aClass isMeta ifFalse:[^self]. "ignore instance methods" aClass := aClass theNonMetaClass. aSelector := anEvent itemSelector. (anEvent isRemoved or:[anEvent isModified]) ifTrue:[ prefSymbol := (aClass name,'>>', aSelector) asSymbol. self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences | dictionaryOfPreferences removeKey: prefSymbol ifAbsent:[] ] ]. (anEvent isAdded or:[anEvent isModified]) ifTrue:[ method := anEvent item. method pragmas do:[:pragma| | aPreference aPrefSymbol | + ((pragma keyword == #preference:category:description:type:) + or: [pragma keyword == #preference:categoryList:description:type:]) ifTrue:[ + aPrefSymbol := (aClass name,'>>', method selector) asSymbol. + aPreference := self + preference: pragma arguments first + category: pragma arguments second + description: pragma arguments third + type: pragma arguments fourth. + aPreference + provider: aClass + getter: method selector + setter: method selector asMutator. + self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences | + dictionaryOfPreferences at: aPrefSymbol put: aPreference ] ] ] ] ]. - pragma keyword == #preference:category:description:type: ifTrue:[ - aPrefSymbol := (aClass name,'>>', method selector) asSymbol. - aPreference := self - preference: pragma arguments first - category: pragma arguments second - description: pragma arguments third - type: pragma arguments fourth. - aPreference - provider: aClass - getter: method selector - setter: method selector asMutator. - self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences | - dictionaryOfPreferences at: aPrefSymbol put: aPreference ] ] ] ] ]. ! From commits at source.squeak.org Fri Feb 27 10:51:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 10:51:16 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.765.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.765.mcz ==================== Summary ==================== Name: Morphic-mt.765 Author: mt Time: 27 February 2015, 11:49:50.36 am UUID: 448910f8-5f74-3549-9403-acf6b6acd9a3 Ancestors: Morphic-mt.764 Recategorized #preferredCornerRadius into all affected preference categories. =============== Diff against Morphic-mt.764 =============== Item was changed: ----- Method: Morph class>>preferredCornerRadius (in category 'preferences') ----- preferredCornerRadius ^ PreferredCornerRadius ifNil: [6]! From commits at source.squeak.org Fri Feb 27 13:06:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 13:06:46 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.766.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.766.mcz ==================== Summary ==================== Name: Morphic-mt.766 Author: mt Time: 27 February 2015, 2:05:26.066 pm UUID: 1c861e43-3cbf-2649-bd3e-22d1d3d88803 Ancestors: Morphic-mt.765 Several cosmetic fixes considering dockingbar morphs and menu morphs. #roundedMenuCorners is now a pragma-style preference. Several magic numbers could be removed. =============== Diff against Morphic-mt.765 =============== Item was changed: ----- Method: DockingBarItemMorph>>adjacentTo (in category 'selecting') ----- adjacentTo + + | roundedCornersOffset | + roundedCornersOffset := MenuMorph roundedMenuCorners + ifTrue: [Morph preferredCornerRadius negated] + ifFalse: [0]. + - owner isFloating + ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ 4)}]. - ifTrue: [^ {self bounds bottomLeft + (4 @ 4)}]. owner isAdheringToTop + ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ 4)}]. - ifTrue: [^ {self bounds bottomLeft + (4 @ 4)}]. owner isAdheringToLeft + ifTrue: [^ {self bounds topRight + (roundedCornersOffset @ 4)}]. - ifTrue: [^ {self bounds topRight + (4 @ 4)}]. owner isAdheringToBottom + ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ 4)}]. - ifTrue: [^ {self bounds topLeft + (4 @ 4)}]. owner isAdheringToRight + ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ -4)}]. + ^ {self bounds bottomLeft + (roundedCornersOffset @ 5)}! - ifTrue: [^ {self bounds topLeft + (4 @ -4)}]. - ^ {self bounds bottomLeft + (3 @ 5)}! Item was changed: ----- Method: DockingBarMorph>>activeSubmenu: (in category 'control') ----- activeSubmenu: aSubmenu activeSubMenu isNil ifFalse: [activeSubMenu delete]. activeSubMenu := aSubmenu. aSubmenu isNil ifTrue: [^ self]. activeSubMenu updateMenu. activeSubMenu selectItem: nil event: nil. MenuIcons decorateMenu: activeSubMenu. activeSubMenu activatedFromDockingBar: self; - borderColor: self borderColor; beSticky; resistsRemoval: true; removeMatchString! Item was changed: ----- Method: DockingBarMorph>>updateColor (in category 'private - layout') ----- updateColor "private - update the receiver's color" | fill | + self autoGradient ifFalse: [ + self color ~= originalColor ifTrue: [self color: originalColor]. + ^ self]. - self autoGradient - ifFalse: [^ self]. "" fill := GradientFillStyle ramp: self gradientRamp. "" fill origin: self topLeft. self isVertical ifTrue: [fill direction: self width @ 0] ifFalse: [fill direction: 0 @ self height]. "" self fillStyle: fill! Item was changed: ----- Method: MenuItemMorph>>adjacentTo (in category 'selecting') ----- adjacentTo + ^{ self outerBounds topRight. self bounds topLeft }! - ^{ self bounds topRight + (10 @ 0). self bounds topLeft }! Item was changed: AlignmentMorph subclass: #MenuMorph instanceVariableNames: 'defaultTarget selectedItem stayUp popUpOwner activeSubMenu' + classVariableNames: 'CloseBoxImage GradientMenu PushPinImage RoundedMenuCorners' - classVariableNames: 'CloseBoxImage GradientMenu PushPinImage' poolDictionaries: '' category: 'Morphic-Menus'! !MenuMorph commentStamp: '' prior: 0! Instance variables: defaultTarget The default target for creating menu items selectedItem The currently selected item in the receiver stayUp True if the receiver should stay up after clicks popUpOwner The menu item that automatically invoked the receiver, if any. activeSubMenu The currently active submenu.! Item was changed: ----- Method: MenuMorph class>>gradientMenu: (in category 'preferences') ----- gradientMenu: aBoolean GradientMenu := aBoolean. + SystemProgressMorph reset. + + "Update docking bars and their sub-menus." + ActiveWorld mainDockingBars do: [:bar | + bar + autoGradient: aBoolean; + updateColor]. + TheWorldMainDockingBar updateInstances.! - SystemProgressMorph reset.! Item was added: + ----- Method: MenuMorph class>>roundedMenuCorners (in category 'preferences') ----- + roundedMenuCorners + + + ^ RoundedMenuCorners ifNil: [true]! Item was added: + ----- Method: MenuMorph class>>roundedMenuCorners: (in category 'preferences') ----- + roundedMenuCorners: aBoolean + + RoundedMenuCorners := aBoolean. + SystemProgressMorph reset. + TheWorldMainDockingBar updateInstances.! Item was changed: ----- Method: MenuMorph>>addStayUpIcons (in category 'construction') ----- addStayUpIcons | title closeBox pinBox titleBarArea titleString | title := submorphs detect: [:ea | ea hasProperty: #titleString] ifNone: [self setProperty: #needsTitlebarWidgets toValue: true. ^ self]. closeBox := SystemWindowButton new target: self; actionSelector: #delete; labelGraphic: self class closeBoxImage; color: Color transparent; extent: 14 @ 16; borderWidth: 0. pinBox := SystemWindowButton new target: self; actionSelector: #stayUp:; arguments: {true}; labelGraphic: self class pushPinImage; color: Color transparent; extent: 16 @ 16; borderWidth: 0. Preferences noviceMode ifTrue: [closeBox setBalloonText: 'close this menu'. pinBox setBalloonText: 'keep this menu up']. titleBarArea := AlignmentMorph newRow vResizing: #shrinkWrap; layoutInset: 3; color: Preferences menuTitleColor; addMorphBack: closeBox; addMorphBack: title; addMorphBack: pinBox. title color: Color transparent. titleString := title findDeepSubmorphThat: [:each | each respondsTo: #font: ] ifAbsent: [StringMorph contents: String empty]. titleString font: Preferences windowTitleFont. + self wantsRoundedCorners - Preferences roundedMenuCorners ifTrue: [titleBarArea useRoundedCorners]. self addMorphFront: titleBarArea. titleBarArea setProperty: #titleString toValue: (title valueOfProperty: #titleString). title removeProperty: #titleString. self setProperty: #hasTitlebarWidgets toValue: true. self removeProperty: #needsTitlebarWidgets. self removeStayUpItems! Item was changed: ----- Method: MenuMorph>>initialize (in category 'initialization') ----- initialize super initialize. bounds := 0 @ 0 corner: 40 @ 10. self setDefaultParameters. self listDirection: #topToBottom. self hResizing: #shrinkWrap. self vResizing: #shrinkWrap. defaultTarget := nil. selectedItem := nil. stayUp := false. + popUpOwner := nil.! - popUpOwner := nil. - - Preferences roundedMenuCorners - ifTrue: [self useRoundedCorners]. - ! Item was changed: ----- Method: MenuMorph>>popUpAdjacentTo:forHand:from: (in category 'control') ----- popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem + "Present this menu at the given point under control of the given hand." + + | tryToPlace selectedOffset rightPoint leftPoint | - "Present this menu at the given point under control of the given - hand." - | tryToPlace selectedOffset | hand world startSteppingSubmorphsOf: self. popUpOwner := sourceItem. + self fullBounds. + self updateColor. + - self updateColor. "ensure layout is current" selectedOffset := (selectedItem ifNil: [self items first]) position - self position. tryToPlace := [:where :mustFit | | delta | self position: where - selectedOffset. delta := self fullBoundsInWorld amountToTranslateWithin: sourceItem worldBounds. (delta x = 0 or: [mustFit]) ifTrue: [delta = (0 @ 0) ifFalse: [self position: self position + delta]. sourceItem owner owner addMorphFront: self. ^ self]]. + rightPoint := rightOrLeftPoint first + ((self layoutInset + self borderWidth) @ 0). + leftPoint := rightOrLeftPoint last - ((self layoutInset + self borderWidth + self width) @ 0). + tryToPlace + value: rightPoint value: false; + value: leftPoint value: false; + value: rightPoint value: true.! - tryToPlace value: rightOrLeftPoint first value: false; - value: rightOrLeftPoint last - (self width @ 0) value: false; - value: rightOrLeftPoint first value: true! Item was changed: ----- Method: MenuMorph>>setTitleParametersFor: (in category 'initialization') ----- setTitleParametersFor: aMenuTitle | menuTitleColor menuTitleBorderColor | + self wantsRoundedCorners - Preferences roundedMenuCorners ifTrue: [aMenuTitle useRoundedCorners]. menuTitleColor := Preferences menuColorFromWorld ifTrue: [self color darker] ifFalse: [Preferences menuTitleColor]. menuTitleBorderColor := Preferences menuAppearance3d ifTrue: [#inset] ifFalse: [Preferences menuColorFromWorld ifTrue: [self color darker muchDarker] ifFalse: [Preferences menuTitleBorderColor]]. aMenuTitle setColor: menuTitleColor borderWidth: Preferences menuTitleBorderWidth borderColor: menuTitleBorderColor; vResizing: #shrinkWrap; wrapCentering: #center; cellPositioning: #topCenter; layoutInset: 0. ! Item was added: + ----- Method: MenuMorph>>wantsRoundedCorners (in category 'rounding') ----- + wantsRoundedCorners + + ^ self class roundedMenuCorners or: [super wantsRoundedCorners]! Item was changed: ----- Method: SystemProgressMorph>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters "change the receiver's appareance parameters" | colorFromMenu worldColor menuColor | colorFromMenu := Preferences menuColorFromWorld and: [Display depth > 4 and: [(worldColor := self currentWorld color) isColor]]. menuColor := colorFromMenu ifTrue: [worldColor luminance > 0.7 ifTrue: [worldColor mixed: 0.85 with: Color black] ifFalse: [worldColor mixed: 0.4 with: Color white]] ifFalse: [Preferences menuColor]. self color: menuColor. + MenuMorph roundedMenuCorners - Preferences roundedMenuCorners ifTrue: [self useRoundedCorners]. self borderWidth: Preferences menuBorderWidth. Preferences menuAppearance3d ifTrue: [ self borderStyle: BorderStyle thinGray. self addDropShadow; shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); shadowOffset: 1 @ 1 ] ifFalse: [ | menuBorderColor | menuBorderColor := colorFromMenu ifTrue: [worldColor muchDarker] ifFalse: [Preferences menuBorderColor]. self borderColor: menuBorderColor. ]. self updateColor: self color: self color intensity: 1.! Item was changed: ----- Method: SystemWindow class>>updatePreferences (in category 'initializing') ----- updatePreferences "Temporary method to update system-wide preferences" Preferences setPreference: #defaultWindowColor toValue: (Color veryVeryLightGray muchLighter). (Preferences preferenceAt: #defaultWindowColor) defaultValue: (Color veryVeryLightGray muchLighter). Preferences setPreference: #menuAppearance3d toValue: true. (Preferences preferenceAt: #menuAppearance3d) defaultValue: true. Preferences setPreference: #menuColorFromWorld toValue: false. (Preferences preferenceAt: #menuColorFromWorld) defaultValue: false. + MenuMorph roundedMenuCorners: false. - Preferences setPreference: #roundedMenuCorners toValue: false. - (Preferences preferenceAt: #roundedMenuCorners) defaultValue: false. Preferences setParameter: #menuColor to: (Color gray: 0.9). Preferences setParameter: #menuTitleColor to: (Color transparent). Preferences setParameter: #menuTitleBorderWidth to: 0. Preferences setParameter: #defaultWorldColor to: (Color gray: 0.25). Preferences setPreference: #showSplitterHandles toValue: false. (Preferences preferenceAt: #showSplitterHandles) defaultValue: true. Preferences setPreference: #showSharedFlaps toValue: false. (Preferences preferenceAt: #showSharedFlaps) defaultValue: false. Preferences installBrightWindowColors. CornerGripMorph drawCornerResizeHandles: false. FillInTheBlankMorph roundedDialogCorners: true. LazyListMorph listSelectionColor: LazyListMorph listSelectionColor; listSelectionTextColor: Color black. PluggableButtonMorph roundedButtonCorners: true. SystemWindow clickOnLabelToEdit: false; doubleClickOnLabelToExpand: true; moveMenuButtonRight: true; hideExpandButton: false. ! Item was changed: ----- Method: TheWorldMainDockingBar>>createDockingBar (in category 'construction') ----- createDockingBar "Create a docking bar from the receiver's representation" | dockingBar | dockingBar := DockingBarMorph new adhereToTop; color: Preferences menuColor; gradientRamp: self gradientRamp; + autoGradient: MenuMorph gradientMenu; - autoGradient: ColorTheme current dockingBarAutoGradient; borderWidth: 0. self fillDockingBar: dockingBar. self labelIfNeeded: dockingBar. ^ dockingBar! Item was changed: (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. "Force SystemProgressMorph to be reset" SystemProgressMorph initialize; reset. "Initialize the key bindings and menus" Editor initialize. "Retain scrollBar look now that the pref actually does something" Preferences enable: #gradientScrollBars. "apply the new icons" MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. "Cleanup old-style preferences here. Remove before new release." + Preferences removePreference: #gradientMenu. "Now in MenuMorph." + Preferences removePreference: #roundedMenuCorners. "Now in MenuMorph."'! - Preferences removePreference: #gradientMenu. "Now in MenuMorph."'! From commits at source.squeak.org Fri Feb 27 13:07:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 13:07:59 2015 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.117.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.117.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.117 Author: mt Time: 27 February 2015, 2:07:56.803 pm UUID: 265cd4bc-1038-6149-8fb2-b7cb10991622 Ancestors: ReleaseBuilder-topa.116 Updated to use pragma-style preference for #roundedMenuCorners. =============== Diff against ReleaseBuilder-topa.116 =============== Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'private') ----- setPreferences Workspace shouldStyle: false. SystemWindow reuseWindows: true. TextEditor autoEnclose: true ; autoIndent: false ; destructiveBackWord: false ; blinkingCursor: false ; dumbbellCursor: false. BalloonMorph setBalloonColorTo: (TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.75). Preferences installBrightWindowColors ; insertionPointColor: Color red ; enable: #scrollBarsWithoutMenuButton ; enable: #gradientScrollBars ; enable: #swapMouseButtons ; enable: #annotationPanes ; disable: #showSplitterHandles ; enable: #showBoundsInHalo ; disable: #alternateHandlesLook ; - disable: #roundedMenuCorners ; disable: #roundedWindowCorners ; enable: #traceMessages ; enable: #thoroughSenders ; enable: #diffsWithPrettyPrint ; disable: #alwaysShowVScrollbar ; enable: #alternativeBrowseIt. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. Workspace shouldStyle: false. NetNameResolver enableIPv6: false. + Browser listClassesHierarchically: true. + MenuMorph roundedMenuCorners: false.! - Browser listClassesHierarchically: true! From commits at source.squeak.org Fri Feb 27 13:09:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 13:09:48 2015 Subject: [squeak-dev] The Trunk: System-mt.707.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.707.mcz ==================== Summary ==================== Name: System-mt.707 Author: mt Time: 27 February 2015, 2:09:13.348 pm UUID: 9d9412df-10ac-ec4d-b063-fd05ab91f576 Ancestors: System-mt.706 Old-style preference #roundedMenuCorners removed. See Morphic-mt.766 postload-script. =============== Diff against System-mt.706 =============== Item was removed: - ----- Method: Preferences class>>roundedMenuCorners (in category 'standard queries') ----- - roundedMenuCorners - ^ self - valueOfFlag: #roundedMenuCorners - ifAbsent: [ true ]! From commits at source.squeak.org Fri Feb 27 13:15:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 13:15:18 2015 Subject: [squeak-dev] The Trunk: KernelTests-ul.290.mcz Message-ID: Levente Uzonyi uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-ul.290.mcz ==================== Summary ==================== Name: KernelTests-ul.290 Author: ul Time: 27 February 2015, 2:14:11.716 pm UUID: ae915aaa-41be-44dc-98d0-0363cfcd2c13 Ancestors: KernelTests-eem.289 Updated RandomTest to match the new implementation of Random. =============== Diff against KernelTests-eem.289 =============== Item was changed: ClassTestCase subclass: #RandomTest + instanceVariableNames: '' - instanceVariableNames: 'gen' classVariableNames: '' poolDictionaries: '' category: 'KernelTests-Numbers'! + + !RandomTest commentStamp: 'ul 2/27/2015 12:36' prior: 0! + I test the random number generator implemented by Random. Whenever its implementation changes, I'll have to be updated to match the new implementation. + Instead of adding methods to Random to access the internal state, I use reflection (#instVarNamed:).! Item was added: + ----- Method: RandomTest>>assertFirstValuesAre:finalStatesAre:withSeed: (in category 'helpers') ----- + assertFirstValuesAre: expectedValues finalStatesAre: expectedFinalStates withSeed: seed + "Verify that the first generated numbers with the given seed are the same as in expectedValues. Also check that the state of the generator matches expectedFinalStates after the last number was generated." + + | random states | + random := Random seed: seed. + expectedValues do: [ :each | + self assert: each equals: random nextValue ]. + states := random instVarNamed: #states. + self + assert: expectedFinalStates + equals: states. + self + assert: expectedValues size \\ states size + 1 + equals: (random instVarNamed: #index) + ! Item was added: + ----- Method: RandomTest>>assertInitialStateIs:withSeed: (in category 'helpers') ----- + assertInitialStateIs: expectedInitialState withSeed: seed + "Verify that the initial values of the states variable match the given values for the given seed." + + | random | + random := Random basicNew. + random initializeStatesWith: seed. + self + assert: expectedInitialState + equals: (random instVarNamed: #states)! Item was removed: - ----- Method: RandomTest>>setUp (in category 'setup') ----- - setUp - gen := Random seed: 112629.! Item was added: + ----- Method: RandomTest>>testExpectedValuesAndFinalStates (in category 'tests') ----- + testExpectedValuesAndFinalStates + "The numbers here were generated with a modified version of dcmt. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html ." + + self + assertFirstValuesAre: #(791793822 321208675 533452018 916714539 223319369 1012473888 519521402 691227136 655932023 762631845 263546831 924338090 559722895 178321509 916222900 335844726 321863848 695515717 112692096 738657692 395570358 340088260 887167633 1009518587 243735024 275847384 769544812 100974653 906270421 342913954 97518663 1067659127 901766500 960849649 913009938 458031838 820147509 822604220 642364166 55274442 357680755 991571674 13914935 857799117 66453038 971120160 398083276 373288317 684827868 674731247) + finalStatesAre: #(635250399 668117719 848992573 251038832 98606638 713392708 276649431 1832634 607491210 416789795 914892960 325580685 799306927 249385527 318375379 748373901 904063250 170318087) + withSeed: 1. + self + assertFirstValuesAre: #(687305094 702568716 681618148 361497334 56139518 745675778 952599938 953942824 73974730 564274490 1060767469 886737457 1039805902 722013528 64171798 764123925 432128359 274234212 668956319 716744939 309797615 780783289 301460951 535739904 224961890 114117836 193753287 1031006106 336541050 154594855 533038119 881775175 158057306 77776036 493306911 605604566 1048063493 584525301 1022642202 864508130 413151089 57876224 191759976 1008496211 868455235 165567279 536395892 455845625 913969488 1031304391) + finalStatesAre: #(1042729719 217432604 1069856876 162320335 202162581 218490242 297015026 68487684 898813855 71972347 874350418 438504195 940031925 17654607 153301097 316080480 107798001 361001990) + withSeed: 16rFFFFFFFF. + self + assertFirstValuesAre: #(508754231 328289850 498391260 573176063 453719461 935895611 435707860 570185280 1062441194 1069509491 70217464 149146838 858549983 755358687 617299553 468867114 401402744 731268746 224918805 447062722 290392391 137004397 311801760 320322691 258212560 536704035 950550708 555923010 982471103 981495169 294632011 175884018 503667308 154136572 291636083 607893878 617073742 310910219 169050729 996306290 695080363 165230559 945376911 612064901 884146961 873827275 491094423 292583589 257673098 606271793) + finalStatesAre: #(650871495 911703262 863344052 176605894 655312644 446078144 11879373 102580040 573515471 123917283 104253098 1042658978 222575135 487008331 309368251 253108077 333913878 249510222) + withSeed: 36rSqueak! Item was added: + ----- Method: RandomTest>>testInitialStates (in category 'tests') ----- + testInitialStates + "The numbers here were generated with a modified version of dcmt. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/DC/dc.html ." + + self + assertInitialStateIs: #(1 738691430 491934885 961690497 64984499 171432612 446538473 482277108 305861910 321062125 1021787430 989754889 231135540 639897334 889001601 577497588 377121465 745575081) + withSeed: 1. + self + assertInitialStateIs: #(1073741823 266459757 720566430 20126452 56152695 937338158 159797905 1043117473 406704525 811309125 915542797 222137334 82370074 761921770 934153467 57368396 980436236 43660082) + withSeed: 16rFFFFFFFF. + self + assertInitialStateIs: #(664399324 1024531762 951500119 549828849 614037886 888424945 697907173 598650154 380912181 737669773 997432646 1017772356 307774789 986202438 417447953 558454367 229264988 682340290) + withSeed: 36rSqueak. + + ! Item was changed: ----- Method: RandomTest>>testNext (in category 'tests') ----- testNext + "Generate some float values, and see if they are in the [0,1) interval. Also check that the smallest and the largest values are small/large enough." + | random min max | + min := Float infinity. + max := Float negativeInfinity. + random := Random seed: 112629. + 100000 timesRepeat: [ + | next | + next := random next. + next < min ifTrue: [ min := next ]. + next > max ifTrue: [ max := next ]. + self assert: next >= 0.0 description: [ 'Generated value ', next asString, ' should be non-negative.' ]. + self assert: next < 1.0 description: [ 'Generated value ', next asString, ' should be less than 1.0.' ] ]. + self assert: max > 0.9999 description: 'The largest generated value should be greater than 0.9999.'. + self assert: min < 0.0001 description: 'The smallest generated value should be less than 0.0001.'! - 10000 timesRepeat: [ - | next | - next := gen next. - self assert: next >= 0.0. - self assert: next < 1.0 ].! Item was removed: - ----- Method: RandomTest>>testNextForEdgeCases (in category 'tests') ----- - testNextForEdgeCases - " Test #next for edge case input-output pairs " - - self assert: 0.0 equals: (Random seed: 1407677000) next. - self assert: (1 << 31 - 1) asFloat / (1 << 31) asFloat equals: (Random seed: 0) next! Item was added: + ----- Method: RandomTest>>testNextInt (in category 'tests') ----- + testNextInt + "Generate many integer values from a small range, and see if they are distributed equally on that range. This is not an exact test, but it's good enough to find obvious errors in the generator." + + | random | + random := Random seed: 1234567812345678. + #( + 2 100000 + 3 200000 + 10 300000 + 100 400000 + ) groupsDo: [ :bucketCount :runs | + | buckets | + buckets := Array new: bucketCount withAll: 0. + runs timesRepeat: [ + | next | + next := random nextInt: bucketCount. + buckets at: next put: (buckets at: next) + 1 ]. + buckets do: [ :each | + self assert: (each / (runs / bucketCount) between: 0.95 and: 1.05) ] ]! Item was added: + ----- Method: RandomTest>>testNextIntLarge (in category 'tests') ----- + testNextIntLarge + "Generate many 1281-bit integers and see if their bits are equally distributed. This is not an exact test, but it's good enough to find obvious errors in the generator." + + + | random bits bitCounts maxValue runs | + random := Random seed: 1234567812345678. + bits := 1281. + bitCounts := Array new: bits withAll: 0. + maxValue := 1 << bits. + runs := 20000. + runs timesRepeat: [ + | value | + value := (random nextInt: maxValue) - 1. + 1 to: bits do: [ :bitIndex | + bitCounts at: bitIndex put: (bitCounts at: bitIndex) + (value bitAt: bitIndex) ] ]. + bitCounts do: [ :each | + self assert: ((each / (runs / 2)) between: 0.95 and: 1.05) ] + ! Item was removed: - ----- Method: RandomTest>>testNextValueForEdgeCases (in category 'tests') ----- - testNextValueForEdgeCases - " Test #nextValue for edge case input-output pairs " - - self assert: 1.0 equals: (Random seed: 1407677000) nextValue. - self assert: (1 << 31 - 1) asFloat equals: (Random seed: 0) nextValue! Item was removed: - ----- Method: RandomTest>>testWellKnownSequence (in category 'tests') ----- - testWellKnownSequence - "This test assert the immutability of Random generation algorithm. - It uses Float equality tests, which is a very strict notion of immutability. - Anyone changing Random algorithm will have to adapt this test." - - | theSeedOfWellKnownSequence wellKnownSequence rng effectiveSequence | - theSeedOfWellKnownSequence := 2345678901. - wellKnownSequence := #(0.32506402597067136 0.3510923149767762 0.8085456405806102 0.22658906421930952 0.28241015983857687 0.46756423286514553 0.3520695904046621 0.23361375705972953 0.3464227287780599 0.32681039875690376). - rng := Random new. - rng seed: theSeedOfWellKnownSequence. - effectiveSequence := (1 to: 10) collect: [:i | rng next ]. - self assert: effectiveSequence equals: wellKnownSequence! From commits at source.squeak.org Fri Feb 27 13:20:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Feb 27 13:21:00 2015 Subject: [squeak-dev] The Trunk: Tools-mt.534.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.534.mcz ==================== Summary ==================== Name: Tools-mt.534 Author: mt Time: 27 February 2015, 2:20:38.006 pm UUID: 32d3e256-db49-0d41-93f1-a9fa25c8d623 Ancestors: Tools-topa.533 Auto-sort message category list in System Browser. Does not affect internal order of categories in class organization. Only a view thing. Makes 'alphabetize' in the menu somewhat obsolete for this column. Saves some mouse clicks. However, hides insertion order of message categories. Not that important, right? :-) =============== Diff against Tools-topa.533 =============== Item was changed: ----- Method: Browser>>messageCategoryList (in category 'message category list') ----- messageCategoryList "Answer the selected category of messages." self hasClassSelected + ifTrue: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories sorted] - ifTrue: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories] ifFalse: [^ Array new]! From leves at elte.hu Fri Feb 27 13:32:13 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Feb 27 13:32:17 2015 Subject: [squeak-dev] The Trunk: Tools-mt.534.mcz In-Reply-To: References: Message-ID: On Fri, 27 Feb 2015, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.534.mcz > > ==================== Summary ==================== > > Name: Tools-mt.534 > Author: mt > Time: 27 February 2015, 2:20:38.006 pm > UUID: 32d3e256-db49-0d41-93f1-a9fa25c8d623 > Ancestors: Tools-topa.533 > > Auto-sort message category list in System Browser. Does not affect internal order of categories in class organization. Only a view thing. Makes 'alphabetize' in the menu somewhat obsolete for this column. Saves some mouse clicks. > > However, hides insertion order of message categories. Not that important, right? :-) Some people prefer to see the order they defined. Levente > > =============== Diff against Tools-topa.533 =============== > > Item was changed: > ----- Method: Browser>>messageCategoryList (in category 'message category list') ----- > messageCategoryList > "Answer the selected category of messages." > > self hasClassSelected > + ifTrue: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories sorted] > - ifTrue: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories] > ifFalse: [^ Array new]! > > > From Das.Linux at gmx.de Fri Feb 27 16:03:19 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Feb 27 16:03:28 2015 Subject: [squeak-dev] The Trunk: Tools-mt.534.mcz Message-ID: On 27.02.2015, at 13:20, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.534.mcz > > ==================== Summary ==================== > > Name: Tools-mt.534 > Author: mt > Time: 27 February 2015, 2:20:38.006 pm > UUID: 32d3e256-db49-0d41-93f1-a9fa25c8d623 > Ancestors: Tools-topa.533 > > Auto-sort message category list in System Browser. Does not affect internal order of categories in class organization. Only a view thing. Makes 'alphabetize' in the menu somewhat obsolete for this column. Saves some mouse clicks. > > However, hides insertion order of message categories. Not that important, right? :-) I think there are people that care over the message category order? Why force alphabetic? Best -Tobias From marcel.taeumel at student.hpi.uni-potsdam.de Fri Feb 27 17:35:21 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Feb 27 17:43:13 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: References: Message-ID: <1425058521607-4808402.post@n4.nabble.com> I prefer to have common category such as "accessing" at the top. Particular orders are single-developer only. Team development gets difficult, I guess. Doing linear search in each and every class is hard and annoying. :-) We could make it a preference then, but I vote for enabling it by default. What would developers want to bother sorting method categories on their own? Encoding some secret path through the code? I suppose it is hardly discoverable by other developers. Sorting things alphabetically is a common thing and lets you as a user perform binary search quickly. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-534-mcz-tp4808262p4808402.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Fri Feb 27 18:02:24 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Feb 27 18:10:17 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425058521607-4808402.post@n4.nabble.com> References: <1425058521607-4808402.post@n4.nabble.com> Message-ID: <1425060144352-4808408.post@n4.nabble.com> At the moment, programmers can do three things with message categories: 1. Define their name. 2. Define their content. 3. Define their order. Naming is already difficult. Finding the right place for a message can be challenging, too. The thing is that order gets messed up pretty quickly. For example, extension categories just popup somewhere in between depending on the projects you have installed. My general impression is often that those categories just have *some* order and *want* to be alphabetized to make any sense out of it. I am not sure but w/o describing the intent of an order, it may just appear bogus to a programmer. Personally, I am really happy with anything that I do not have to organize or care for. Message category orders are such a thing. :-) But don't get me wrong: I don't want to push my personal expriences onto everybody. Let's discuss it here. ;-) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-534-mcz-tp4808262p4808408.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From edgardec2005 at gmail.com Sat Feb 28 05:50:44 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Sat Feb 28 05:50:57 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425060144352-4808408.post@n4.nabble.com> Message-ID: On 2/27/15, 3:02 PM, "Marcel Taeumel" wrote: > At the moment, programmers can do three things with message categories: > > 1. Define their name. > 2. Define their content. > 3. Define their order. > > Naming is already difficult. Finding the right place for a message can be > challenging, too. > > The thing is that order gets messed up pretty quickly. For example, > extension categories just popup somewhere in between depending on the > projects you have installed. > > My general impression is often that those categories just have *some* order > and *want* to be alphabetized to make any sense out of it. +1 >I am not sure but > w/o describing the intent of an order, it may just appear bogus to a > programmer. > > Personally, I am really happy with anything that I do not have to organize > or care for. Message category orders are such a thing. :-) > > But don't get me wrong: I don't want to push my personal expriences onto > everybody. Let's discuss it here. ;-) > > Best, > Marcel If the question is if we need some preference for this, why do not a quick vote ? Edgar From marcel.taeumel at student.hpi.uni-potsdam.de Sat Feb 28 16:50:33 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Feb 28 16:58:30 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: References: <1425058521607-4808402.post@n4.nabble.com> <1425060144352-4808408.post@n4.nabble.com> Message-ID: <1425142233131-4808545.post@n4.nabble.com> Let's try it then: http://vote.pollcode.com/82581991 Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-534-mcz-tp4808262p4808545.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Sat Feb 28 17:58:29 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Feb 28 17:58:33 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425058521607-4808402.post@n4.nabble.com> References: <1425058521607-4808402.post@n4.nabble.com> Message-ID: I didn't realize this was for method categories too because you said the "System Browser", which I almost never use.. This actually affects every browser with a message-category list. The type of ordering I like to do for message protocols is "usage order". For example: setup build summarize private In this object, you have to do a "setup" before you can "build". You have to "build" before you can "summarize". Alphabetical order blows that up and now puts private in the middle instead of at the bottom, where I prefer it to be.. Marcel, I hope you'll forgive me for saying, this type of thing which affect others' daily development are good to negotiate from the Inbox instead of trunk because going straight to trunk guarantees a lot more "trial" or "interim" versions in our trunk history instead of only "finished" versions (reducing the density of the historical record). > I prefer to have common category such as "accessing" at the top. That's what "alphabetize" is for. :) > Particular > orders are single-developer only. Team development gets difficult, > I guess. > Doing linear search in each and every class is hard and annoying. :-) No list in Squeak ever needs to be linearly-scanned by ones eyes if you simply type a few letters of the list entry you want right in the list. The Filter feature remember? That's what I use all the time regardless if a list is already alphabetized, because it also performs the navigation for me. Alphabetizing a list does very little to improve my access to it, thanks to the list-Filtering feature. > We could make it a preference then, but I vote for enabling it by default. I vote for disabled by default. Because not only would "alphabetize" be rendered obsolete I guess "reorganize" as well..? > What would developers want to bother sorting method categories on their own? > Encoding some secret path through the code? I suppose it is hardly > discoverable by other developers. My above example helps me with my *own* code which I wrote years ago. I come into a class I wrote years ago, I see the order of the message categories, and I have an immediate "summary" of how this kind of object is supposed to be used. The order conveys information about usage, I love it. > Sorting things alphabetically is a common thing and lets you as a user > perform binary search quickly. Which is still much slower and more laborious than simply using the Filter feature. Disabled by default please. :) From lewis at mail.msen.com Sat Feb 28 18:17:26 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Feb 28 18:17:27 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425142233131-4808545.post@n4.nabble.com> References: <1425058521607-4808402.post@n4.nabble.com> <1425060144352-4808408.post@n4.nabble.com> <1425142233131-4808545.post@n4.nabble.com> Message-ID: <20150228181726.GA96451@shell.msen.com> On Sat, Feb 28, 2015 at 08:50:33AM -0800, Marcel Taeumel wrote: > Let's try it then: http://vote.pollcode.com/82581991 > > Best, > Marcel > Ha! I just voted, and it looks like the number of different opinions exactly matches the number of people who have voted so far. If we could get one more person to vote, then stop the election, we would have a decision ;-) Joking aside, there is something to be said for taking of poll to find out what most people want, without regard for who has the loudest opinion. So folks - if you have an opinion on this topic, please follow the link above and click on your preference. Dave From asqueaker at gmail.com Sat Feb 28 18:48:14 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Feb 28 18:48:19 2015 Subject: [squeak-dev] community decision making (was: The Trunk: Tools-mt.534.mcz) Message-ID: > Ha! I just voted, and it looks like the number of different opinions > exactly matches the number of people who have voted so far. > > If we could get one more person to vote, then stop the election, we > would have a decision ;-) > > Joking aside, there is something to be said for taking of poll to find > out what most people want, without regard for who has the loudest opinion. It already is without regard to loudness, the loudest voters still only get one vote. > So folks - if you have an opinion on this topic, please follow the link > above and click on your preference. Voting has been a last resort, not a first resort, of decision-making by this community. When an issue comes up, the people who care enough about that issue to step up and present the reasons of their position to their peers, so that a community consensus is arrived at based on community-input from those with a vested interest. By contrast, some external, anonymous poll in which dozens folks who don't participate much, don't care that much because they started a Squeak image 3 times in their whole life, -- those folks having as much pull as everyone else who is more-vested. Besides, how can we know such an external poll is even fair? Could someone vote multiple times from different computers, for example? Right here, we know any votes are fair, and by the discussions we know the *reasons* for the outcome.. From edgardec2005 at gmail.com Sat Feb 28 18:53:47 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Sat Feb 28 18:53:59 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <20150228181726.GA96451@shell.msen.com> Message-ID: On 2/28/15, 3:17 PM, "David T. Lewis" wrote: > On Sat, Feb 28, 2015 at 08:50:33AM -0800, Marcel Taeumel wrote: >> Let's try it then: http://vote.pollcode.com/82581991 >> >> Best, >> Marcel >> > > Ha! I just voted, and it looks like the number of different opinions > exactly matches the number of people who have voted so far. > > If we could get one more person to vote, then stop the election, we > would have a decision ;-) > > Joking aside, there is something to be said for taking of poll to find > out what most people want, without regard for who has the loudest opinion. > > So folks - if you have an opinion on this topic, please follow the link > above and click on your preference. > > Dave Just voted. Maybe 8 members on this list are still alive... :) Edgar From lewis at mail.msen.com Sat Feb 28 19:00:42 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Feb 28 19:00:44 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: References: <20150228181726.GA96451@shell.msen.com> Message-ID: <20150228190042.GA5517@shell.msen.com> On Sat, Feb 28, 2015 at 03:53:47PM -0300, Edgar J. De Cleene wrote: > > On 2/28/15, 3:17 PM, "David T. Lewis" wrote: > > > On Sat, Feb 28, 2015 at 08:50:33AM -0800, Marcel Taeumel wrote: > >> Let's try it then: http://vote.pollcode.com/82581991 > >> > >> Best, > >> Marcel > >> > > > > Ha! I just voted, and it looks like the number of different opinions > > exactly matches the number of people who have voted so far. > > > > If we could get one more person to vote, then stop the election, we > > would have a decision ;-) > > > > Joking aside, there is something to be said for taking of poll to find > > out what most people want, without regard for who has the loudest opinion. > > > > So folks - if you have an opinion on this topic, please follow the link > > above and click on your preference. > > > > Dave > Just voted. Maybe 8 members on this list are still alive... :) > > Edgar > We old people have to vote early, just in case ;-) Dave From gettimothy at zoho.com Sat Feb 28 19:19:30 2015 From: gettimothy at zoho.com (gettimothy) Date: Sat Feb 28 19:19:35 2015 Subject: [squeak-dev] Pi compilation question for TIm R. Message-ID: <14bd1a118d9.1178d1a17170924.1173324436203804415@zoho.com> Hi Tim. When building for the Pi, do you compile directly on it? or (as I suspect) do you have to cross-compile to it? thx. tty. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150228/3d5e1342/attachment.htm From lewis at mail.msen.com Sat Feb 28 19:26:58 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Feb 28 19:27:00 2015 Subject: [squeak-dev] community decision making (was: The Trunk: Tools-mt.534.mcz) In-Reply-To: References: Message-ID: <20150228192658.GB5517@shell.msen.com> On Sat, Feb 28, 2015 at 12:48:14PM -0600, Chris Muller wrote: > > Ha! I just voted, and it looks like the number of different opinions > > exactly matches the number of people who have voted so far. > > > > If we could get one more person to vote, then stop the election, we > > would have a decision ;-) > > > > Joking aside, there is something to be said for taking of poll to find > > out what most people want, without regard for who has the loudest opinion. > > It already is without regard to loudness, the loudest voters still > only get one vote. > > > So folks - if you have an opinion on this topic, please follow the link > > above and click on your preference. > > Voting has been a last resort, not a first resort, of decision-making > by this community. When an issue comes up, the people who care enough > about that issue to step up and present the reasons of their position > to their peers, so that a community consensus is arrived at based on > community-input from those with a vested interest. > > By contrast, some external, anonymous poll in which dozens folks who > don't participate much, don't care that much because they started a > Squeak image 3 times in their whole life, -- those folks having as > much pull as everyone else who is more-vested. > > Besides, how can we know such an external poll is even fair? Could > someone vote multiple times from different computers, for example? > Right here, we know any votes are fair, and by the discussions we know > the *reasons* for the outcome.. Sure, no disagreement. Like most attempts at democratic processes, it probably will not work very well. But sometimes we don't actually know how people are using the system, and asking the broader community for input is one way to get information. Think of the poll as a way to ask for input that you can use to make an informed decision. I don't know if it will work, but it seems worth a try, so let's see what happens. Dave From djm1329 at san.rr.com Sat Feb 28 19:34:51 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Sat Feb 28 19:34:54 2015 Subject: [squeak-dev] Pi compilation question for TIm R. In-Reply-To: <14bd1a118d9.1178d1a17170924.1173324436203804415@zoho.com> References: <14bd1a118d9.1178d1a17170924.1173324436203804415@zoho.com> Message-ID: Speaking for myself, I compile directly on the Pi. I?m pretty sure Tim does the same. He recently told us how blazing fast the compilation on the new 4-core ARMv7 RPi 2 can be :) > On Feb 28, 2015, at 11:19, gettimothy wrote: > > Hi Tim. > > When building for the Pi, do you compile directly on it? or (as I suspect) do you have to cross-compile to it? > > thx. > > tty. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150228/e3ef997d/attachment.htm From tim at rowledge.org Sat Feb 28 19:39:09 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Feb 28 19:39:18 2015 Subject: [squeak-dev] Pi compilation question for TIm R. In-Reply-To: References: <14bd1a118d9.1178d1a17170924.1173324436203804415@zoho.com> Message-ID: <3FE48F5C-C525-4B03-B8C3-2DCCB65F7330@rowledge.org> On 28-02-2015, at 11:34 AM, Douglas McPherson wrote: > Speaking for myself, I compile directly on the Pi. I?m pretty sure Tim does the same. He recently told us how blazing fast the compilation on the new 4-core ARMv7 RPi 2 can be :) > >> On Feb 28, 2015, at 11:19, gettimothy wrote: >> >> Hi Tim. >> >> When building for the Pi, do you compile directly on it? or (as I suspect) do you have to cross-compile to it? I?ve always built directly on the Pi. I don?t have the patience to faff around with the setting up and surviving cross-compilers. Gcc etc annoys me enough as it is. A Pi2 compiles the stack vm in a few minutes anyway and with dependencies and other problems fixed it would hardly ever need to do clean build. I do of course have to kinda-sorta cross compile for the Cog work, but that?s more a case of building a (hopefully plausible) simulator and running hopeful-cog code on it. We just have to hope that the sim is near enough the real thing... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim 42.7 percent of all statistics are made up on the spot. From asqueaker at gmail.com Sat Feb 28 20:34:45 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Feb 28 20:34:50 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425058521607-4808402.post@n4.nabble.com> References: <1425058521607-4808402.post@n4.nabble.com> Message-ID: > What would developers want to bother sorting method categories on their own? The desire to auto-sort them is understandable when thinking about Squeak as an eclipse-style IDE for teams of Developers. But there is another way to think about Squeak: as a system for presenting naked-objects applications to Users. The goal of Maui is to expose as much of a Smalltalk code-model as possible, as an "application" to a User actor. It generates a default panel for any object suitable for a User actor to interact with its behaviors. The "tabs" of this default panel are simply the message categories in the order of their Organization in the system. So being able to see and customize that order affords the Developer actor another channel, right within her own IDE, for customizing the default panel UI. I hope you are convinced there are use-cases for both sorting and not sorting. I don't think we can get away without a preference. -------------- next part -------------- A non-text attachment was scrubbed... Name: maui-example.png Type: image/png Size: 22586 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150228/7fa79eb5/maui-example-0001.png From nicolas.cellier.aka.nice at gmail.com Sat Feb 28 22:37:36 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Feb 28 22:37:38 2015 Subject: [squeak-dev] last update 299 might be broken Message-ID: Hi, it seems that last update is loading Graphics first and thus removing CornerRounder before loading Morphic. Alas, the old Morphic might still be using CornerRounder. In some old images still using some rounded things it happened that the update process failed with unresponsive image (recursive error or something...). I disabled all the rounded* Preferences, but it does not seem to be enough (I think the progress dialog itself must be using rounded corners or some thing like that...). Can we fix that? (for example just delay inclusion of latest Graphics - that is exclude it from the latest update) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150228/fcb5ba83/attachment.htm