From brasspen at gmail.com Fri Oct 2 15:06:26 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Oct 2 15:06:29 2015 Subject: [squeak-dev] Thoughts on Xtreams Message-ID: I'm using the Altitude web framework. It is based on Xtreams. I've tied myself into knots and now I have had an epiphany about what the problem is. I don't think I have a working model in my head about what Xtreams is doing or why. I'm going to say a few things here for other people hopefully to have a comment on. My conception of Streams comes from Ch. 10 of "Squeak By Example". This is a very friendly chapter (Thank you Stephane Ducasse), because the examples are short, complete and fit into a Workspace. There are some examples on the Xtreams Google Code page that do fit into a Workspace, but I don't think they help understanding Xtreams, really. There is a bigger picture solution that Xtreams addresses. I can see where it's pointing, I just cannot see how to use it yet. The problem is I keep wanting to see a whole stream at once, to put it into a Workspace. Xtreams does not let you see a whole stream coming over a socket at once. Ever. It's maddening. I want to see what I'm dealing with and then deal with it. All I see are classes piled on top of each other. And then I remembered a conversation I had at an event where someone said," Xtreams are just like the infinite streams described in 'The Structure And Interpretation Of Computer Programs', isn't that cool. You can process an infinite stream." Yes, I nodded. It sure is cool. I made a mental note to look up streams in SICP at a future date. This is that date. And the SICP has some fascinating things to say about streams. From section 3.5: "Stream processing lets us model systems that have state without ever using assignment or mutable data. This has important implications, both theoretical and practical, because we can build models that avoid drawbacks inherent in introducing assignment. On the other hand, the stream framework raises difficulties of its own, and the question of which modelling technique leads to more modular and easily maintained systems remains open." "Unfortunately, if we represent sequences as lists, this elegance is bought at the price of sever inefficiency with respect to both time and space required by our computations. When we represent manipulations on sequences as transformations of lists, our programs must construct and copy data structures (which may be huge) at every step of the process." Our current streams implementation is inefficient because it copies everything whole, which consumes masses of unnecessary memory. With Xtreams we can manage an infinitely long stream, saving resources. But it leads to the problem I've been complaining about which is I cannot see the stream I'm working on. That is something I'm going to have to adapt to. It sounds worth the effort. But as the first passage makes clear, it's modelling the data in a different, dare I say non-object oriented way (functional?). Why do we want Xtreams? It saves resources and allows us to process infinitely. In comparison, our Streams classes are crude and inefficient. What price do we have to pay? We need to mentally conceptualize streams in a different -- perhaps, extremely different -- way. I do not have a mental model for what Xtreams is doing yet. How do other people conceptualize using Xtreams in contrast to the existing Streams implementation? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151002/6c03c3fb/attachment.htm From karlramberg at gmail.com Fri Oct 2 19:54:13 2015 From: karlramberg at gmail.com (karl ramberg) Date: Fri Oct 2 19:54:15 2015 Subject: =?UTF-8?B?UmU6IFtzcXVlYWstZGV2XSBUaGUgUGkgUG9kY2FzdCAjNCDigJMgVGltIFJvd2xlZGdlIA==?= =?UTF-8?B?KFNjcmF0Y2gpIHw=?= In-Reply-To: References: Message-ID: Cool Karl On Wed, Sep 30, 2015 at 6:57 PM, tim Rowledge wrote: > A bit of getting the word out - > > > http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/ < > http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/> > > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: AII: Add Insult to Injury > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151002/955c1b37/attachment.htm From lewis at mail.msen.com Fri Oct 2 20:55:50 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 2 20:55:51 2015 Subject: [squeak-dev] The Pi Podcast #4 =?iso-8859-1?Q?=E2=80=93_Tim_Rowledge_?=(Scratch) | In-Reply-To: References: Message-ID: <13399.136.2.1.105.1443819350.squirrel@webmail.msen.com> Cool indeed. And I liked the idea of coming up with an "Itch Framework". Dave > Cool > > Karl > > On Wed, Sep 30, 2015 at 6:57 PM, tim Rowledge wrote: > >> A bit of getting the word out - >> >> > http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/ < >> http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/> >> >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Strange OpCodes: AII: Add Insult to Injury >> >> >> >> > > From tim at rowledge.org Fri Oct 2 23:23:11 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Oct 2 23:23:17 2015 Subject: =?utf-8?Q?Re=3A_=5Bsqueak-dev=5D_The_Pi_Podcast_=234__=C3=A2?= =?utf-8?Q?=C2=80=C2=93_Tim_Rowledge_=28Scratch=29_=7C?= In-Reply-To: <13399.136.2.1.105.1443819350.squirrel@webmail.msen.com> References: <13399.136.2.1.105.1443819350.squirrel@webmail.msen.com> Message-ID: <70A126C6-3AC5-40FA-B2B6-3A08D9D8FF97@rowledge.org> > On 02-10-2015, at 1:55 PM, David T. Lewis wrote: > > Cool indeed. And I liked the idea of coming up with an "Itch Framework?. Me too; maybe that?s a good name for the device driver framework behind the Scratch gpio server... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim If the code and the comments disagree, then both are probably wrong From lewis at mail.msen.com Sat Oct 3 00:01:02 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Oct 3 00:01:04 2015 Subject: [squeak-dev] The Pi Podcast #4 ?????? Tim Rowledge (Scratch) | In-Reply-To: <70A126C6-3AC5-40FA-B2B6-3A08D9D8FF97@rowledge.org> References: <13399.136.2.1.105.1443819350.squirrel@webmail.msen.com> <70A126C6-3AC5-40FA-B2B6-3A08D9D8FF97@rowledge.org> Message-ID: <20151003000102.GA85410@shell.msen.com> On Fri, Oct 02, 2015 at 04:23:11PM -0700, tim Rowledge wrote: > > > On 02-10-2015, at 1:55 PM, David T. Lewis wrote: > > > > Cool indeed. And I liked the idea of coming up with an "Itch Framework?. > > Me too; maybe that?s a good name for the device driver framework behind the Scratch gpio server... > I should think that the "itch framework" concept was envisioned as a more grandiose concept. Surely it was meant to have positive connotations, such that "scratching an itch" would lead to constructive and happy outcomes. A device driver framework on the other hand seems much more specific, and certainly more likely to lead to annoyance and irritation rather than happiness. For naming that, you might better draw inspiration from one of the more specific categories of itchiness as enumerated here: http://www.healthline.com/health/itching Dave From colin at wiresong.com Sat Oct 3 05:45:00 2015 From: colin at wiresong.com (Colin Putney) Date: Sat Oct 3 05:45:02 2015 Subject: [squeak-dev] Thoughts on Xtreams In-Reply-To: References: Message-ID: On Fri, Oct 2, 2015 at 8:06 AM, Chris Cunnington wrote: > I do not have a mental model for what Xtreams is doing yet. How do other > people conceptualize using Xtreams in contrast to the existing Streams > implementation? > I think the elegance of Xtreams boils down to one thing: composition is better than inheritance. If you look at the Squeak stream hierarchy, it's a nightmare. Among the highlights: - There's a whole subhierarchy dedicated to compression. It successfully shares code for different types of compression but since DeflateStream inherits from PositionalStream, it can only write compressed data into memory. If you want to write compressed data to a file, you'll have to write to a compression stream, get its contents and write that to a file stream. - On the flip side, there's CrLfFileStream, which converts line endings when reading and writing to a file. Except wait, it's obsolete now and CrLfFileStream new actually returns an instance of MultiByteFileStream. This class has an annoying name, because it's camel-cased on syllable boundaries as well as word boundaries. Ugh. Worse, it combines line-end conversion with encoding conversion, but only when it text mode. Well, most of the time, when in text mode. You gotta be careful about those few methods that manipulate the file position in terms of bytes, because that can leave it in the middle of a multibyte character and then nothing works right. And if you want to do any of this conversion on data in memory, you're outta luck because MultiByteFileStream only works on data in files. - Luckily MultiByteBinaryOrTextStream is here to save the day. (Again with the capitals on syllable breaks.) It *does* work on data in memory. It has a whole separate implementation of the encoding and line-ending conversion code, plus no-nops implementations of the file-related stuff in MultiByteFileStream so the two are polymorphic. So convenient. - There's also ReadWriteStream, which subclasses WriteStream, and re-implements all of ReadStream's functionality. - There's also SocketStream, for convenience in doing network IO. Oh wait, it's not part of the Stream hierarchy at all. Never mind. There's more (lots more), but let's not get sidetracked. The point is that there is just no way to have a sane inheritance hierarchy for a whole bunch of orthogonal concerns: - the underlying data storage - memory, file, socket or something more exotic - data transformation - encoding, compression, buffering, chunking etc - reading vs writing Where Squeak streams try to do everything in one object, and combine different options via inheritance, Xtreams splits a stream into a pipeline of objects that each provide a separate bit of functionality. It's so much more flexible. In the specific case of Altitude, Xtreams provide two main advantages: First, the framework can build a custom pipeline of streams based on message headers. To handle a request, we just examine the headers, build the appropriate sequence of transformation streams and hand that off to the application for reading. When the response is ready, we again look at the headers, build a stream that performs all the transformations that the app has indicated it wants, and let the app write into it. We can use any of the features of HTTP, while still providing a simple and consistent interface to the app. Second, it really helps with perceived performance. Browsers have incredibly optimized strategies for processing data as it arrives from the network. They're really good at rendering a page incrementally, adding content and refining the appearance as more data arrives. Xtreams allows Altitude to take advantage of that by doing the same thing on the server side. As the app is rendering content, we push it through the transformation streams in small chunks, and get it on the network as quickly as possible. (ALStreamingExample is a good demo of this.) Of course, there's a lot of other little details to like about Xtreams, I think composition is what really makes it shine. Colin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151002/cd8b2439/attachment.htm From btc at openinworld.com Sat Oct 3 14:00:34 2015 From: btc at openinworld.com (Ben Coman) Date: Sat Oct 3 14:00:56 2015 Subject: =?UTF-8?B?UmU6IFtzcXVlYWstZGV2XSBUaGUgUGkgUG9kY2FzdCAjNCDigJMgVGltIFJvd2xlZGdlIA==?= =?UTF-8?B?KFNjcmF0Y2gpIHw=?= In-Reply-To: References: Message-ID: Interesting that the prelude chat indicates that with Debian Jessie Raspbian, GPIO can be used without root privilege. Search turns up some info only for Python. I presume this helps GPIO from Squeak also? cheers -ben On Thu, Oct 1, 2015 at 12:57 AM, tim Rowledge wrote: > A bit of getting the word out - > >> http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/ > > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: AII: Add Insult to Injury > > > From herbertkoenig at gmx.net Sat Oct 3 15:10:18 2015 From: herbertkoenig at gmx.net (=?ISO-8859-1?Q?Herbert_K=F6nig?=) Date: Sat Oct 3 15:10:23 2015 Subject: =?UTF-8?Q?AW:_Re:_[squeak-dev]_The_Pi_Pod?= =?UTF-8?Q?cast_#4_=E2=80=93_Tim_Rowledge_(Scratch)_|?= Message-ID: <3tr232v1ici4rdie0d591ssa.1443885018550@email.android.com> I use gpio via the file interface from Squeak without sudo. Just put Your user into the group gpio. Herbert phone.
-------- Urspr?ngliche Nachricht --------
Von: Ben Coman
Datum:03.10.2015 16:00 (GMT+01:00)
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] The Pi Podcast #4 ? Tim Rowledge (Scratch) |
Interesting that the prelude chat indicates that with Debian Jessie Raspbian, GPIO can be used without root privilege.? Search turns up some info only for Python.? I presume this helps GPIO from Squeak also? cheers -ben On Thu, Oct 1, 2015 at 12:57 AM, tim Rowledge wrote: > A bit of getting the word out - > >> http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/ > > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: AII: Add Insult to Injury > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151003/3d3bfd5a/attachment.htm From tim at rowledge.org Sat Oct 3 17:09:53 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 3 17:09:57 2015 Subject: =?utf-8?Q?Re=3A_=5Bsqueak-dev=5D_The_Pi_Podcast_=234_=E2=80=93_T?= =?utf-8?Q?im_Rowledge_=28Scratch=29_=7C?= In-Reply-To: References: Message-ID: <8BEA3D69-440F-4697-AA93-7B5509F03047@rowledge.org> > On 03-10-2015, at 7:00 AM, Ben Coman wrote: > > Interesting that the prelude chat indicates that with Debian Jessie > Raspbian, GPIO can be used without root privilege. Search turns up > some info only for Python. I presume this helps GPIO from Squeak > also? We don?t know yet since that facility was only put in at the very last minute and I heard nothing about it until the release notes. Right now it looks like it might not be useful, but we?ll see how it develops. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IPL: Invent Program Lines From brasspen at gmail.com Mon Oct 5 16:04:45 2015 From: brasspen at gmail.com (Chris Cunnington) Date: Mon Oct 5 16:04:49 2015 Subject: [squeak-dev] Thoughts on Xtreams In-Reply-To: References: Message-ID: <56129F9D.3040408@gmail.com> On 2015-10-03 1:45 AM, Colin Putney wrote: > > > On Fri, Oct 2, 2015 at 8:06 AM, Chris Cunnington > wrote: > > I do not have a mental model for what Xtreams is doing yet. How do > other people conceptualize using Xtreams in contrast to the > existing Streams implementation? > > > I think the elegance of Xtreams boils down to one thing: composition > is better than inheritance. > > If you look at the Squeak stream hierarchy, it's a nightmare. Among > the highlights: > > * There's a whole subhierarchy dedicated to compression. It > successfully shares code for different types of compression but > since DeflateStream inherits from PositionalStream, it can only > write compressed data into memory. If you want to write compressed > data to a file, you'll have to write to a compression stream, get > its contents and write that to a file stream. > * On the flip side, there's CrLfFileStream, which converts line > endings when reading and writing to a file. Except wait, it's > obsolete now and CrLfFileStream new actually returns an instance > of MultiByteFileStream. This class has an annoying name, because > it's camel-cased on syllable boundaries as well as word > boundaries. Ugh. Worse, it combines line-end conversion with > encoding conversion, but only when it text mode. Well, most of the > time, when in text mode. You gotta be careful about those few > methods that manipulate the file position in terms of bytes, > because that can leave it in the middle of a multibyte character > and then nothing works right. And if you want to do any of this > conversion on data in memory, you're outta luck because > MultiByteFileStream only works on data in files. > * Luckily MultiByteBinaryOrTextStream is here to save the day. > (Again with the capitals on syllable breaks.) It *does* work on > data in memory. It has a whole separate implementation of the > encoding and line-ending conversion code, plus no-nops > implementations of the file-related stuff in MultiByteFileStream > so the two are polymorphic. So convenient. > * There's also ReadWriteStream, which subclasses WriteStream, and > re-implements all of ReadStream's functionality. > * There's also SocketStream, for convenience in doing network IO. Oh > wait, it's not part of the Stream hierarchy at all. Never mind. > > There's more (lots more), but let's not get sidetracked. The point is > that there is just no way to have a sane inheritance hierarchy for a > whole bunch of orthogonal concerns: > > * the underlying data storage - memory, file, socket or something > more exotic > * data transformation - encoding, compression, buffering, chunking etc > * reading vs writing > > Where Squeak streams try to do everything in one object, and combine > different options via inheritance, Xtreams splits a stream into a > pipeline of objects that each provide a separate bit of functionality. > It's so much more flexible. I think I'm starting to see Xtreams like this. A block can be used as a filter for iterating over the elements of a stream. If you have different filter blocks, then you can wrap each of them in class and have a library of different filters. If you compose these classes, then you have a pipeline of blocks that does a variety of things at once. This has a functional feel because you cannot stop and examine things, because a filter has no state. It's just passing things on. Once it's composed, you need to wait until the end to see what happened. As such, it can handle infinite strings, as suggested in the SICP. > In the specific case of Altitude, Xtreams provide two main advantages: > > First, the framework can build a custom pipeline of streams based on > message headers. To handle a request, we just examine the headers, > build the appropriate sequence of transformation streams and hand that > off to the application for reading. > When the response is ready, we again look at the headers, build a > stream that performs all the transformations that the app has > indicated it wants, and let the app write into it. We can use any of > the features of HTTP, while still providing a simple and consistent > interface to the app request := ALAuthenticationRequest new. aRequest readEntityWith: [:in| ALJsonParser parse: in for: request ] This was doing my head in. I expected all the stream contents to be rallied in the aRequest location, the whole stream would be there, so I could see it. But the Relay/Transforms phase is not over at that point. There is no state. It's not until the data is all in the ALAuthenticationRequest that I can examine it. That block is like another Xtreams filter. Stateless. All it does is sort things as they go by. And that's why I was confused. Foiled expectations. > Second, it really helps with perceived performance. Browsers have > incredibly optimized strategies for processing data as it arrives from > the network. They're really good at rendering a page incrementally, > adding content and refining the appearance as more data arrives. > Xtreams allows Altitude to take advantage of that by doing the same > thing on the server side. As the app is rendering content, we push it > through the transformation streams in small chunks, and get it on the > network as quickly as possible. (ALStreamingExample is a good demo of > this.) I think the word here is chunking. Since HTTP/1.1 came out I imagine clients have been optimizing for this. Servers? Not so much. I imagine that servers have never worked very hard to send data with the fine level of granularity equivalent to what clients can receive. But I suppose this is really about buffer size and flushing frequency. I imagine Seaside could chunk its responses, but instead saves every response into one large buffer and then flushes once. With Altitude I can put 'self halt' in the middle of a page and watch half a a page render. The buffer size is set to 1K and flushes when the buffer is full, which doesn't take long. Chris > > Of course, there's a lot of other little details to like about > Xtreams, I think composition is what really makes it shine. > > Colin > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151005/b6a409b1/attachment.htm From colin at wiresong.com Mon Oct 5 18:32:02 2015 From: colin at wiresong.com (Colin Putney) Date: Mon Oct 5 18:32:06 2015 Subject: [squeak-dev] Thoughts on Xtreams In-Reply-To: <56129F9D.3040408@gmail.com> References: <56129F9D.3040408@gmail.com> Message-ID: On Mon, Oct 5, 2015 at 9:04 AM, Chris Cunnington wrote: > > But I suppose this is really about buffer size and flushing frequency. I > imagine Seaside could chunk its responses, but instead saves every response > into one large buffer and then flushes once. > With Altitude I can put 'self halt' in the middle of a page and watch half > a a page render. The buffer size is set to 1K and flushes when the buffer > is full, which doesn't take long. > Right. Seaside feels slower, even when the rendering time is the same. However, Seaside handles application errors more gracefully than Altitude. If there's an error halfway down the page, Seaside catches it and sends a nice error page page to the browser, with a walkback and a debug link. Altitude can't do that, since the headers and half the page have already been sent. Different tradeoffs. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151005/36c64595/attachment.htm From commits at source.squeak.org Mon Oct 5 18:39:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 5 18:39:56 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.634.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.634.mcz ==================== Summary ==================== Name: Tools-cmm.634 Author: cmm Time: 5 October 2015, 1:39:05.231 pm UUID: 1b9e0e4c-f728-48ff-9046-54b7f7c302d0 Ancestors: Tools-cmm.620, Tools-eem.633 - IDE, please stop forcing a message category selection just because I accepted a method. If I want that, I'll simply press the hot-key, Shift+Command+C. =============== Diff against Tools-eem.633 =============== Item was changed: ----- Method: Browser>>compileMessage:notifying: (in category 'code pane') ----- compileMessage: aText notifying: aController "Compile the code that was accepted by the user, placing the compiled method into an appropriate message category. Return true if the compilation succeeded, else false." - | fallBackCategoryName originalSelectorName result fallBackMethodName | + self selectedMessageCategoryName = ClassOrganizer allCategory - - self selectedMessageCategoryName ifNil: - [ self selectOriginalCategoryForCurrentMethod - ifFalse:["Select the '--all--' category" - self messageCategoryListIndex: 1]]. - - - self selectedMessageCategoryName asSymbol = ClassOrganizer allCategory ifTrue: [ "User tried to save a method while the ALL category was selected" fallBackCategoryName := selectedMessageCategoryName. fallBackMethodName := selectedMessageName. editSelection == #newMessage ifTrue: [ "Select the 'as yet unclassified' category" selectedMessageCategoryName := nil. (result := self defineMessageFrom: aText notifying: aController) ifNil: ["Compilation failure: reselect the original category & method" selectedMessageCategoryName := fallBackCategoryName. selectedMessageName := fallBackMethodName] ifNotNil: [self setSelector: result]] ifFalse: [originalSelectorName := self selectedMessageName. self setOriginalCategoryIndexForCurrentMethod. selectedMessageName := fallBackMethodName := originalSelectorName. (result := self defineMessageFrom: aText notifying: aController) ifNotNil: [self setSelector: result] ifNil: [ "Compilation failure: reselect the original category & method" selectedMessageCategoryName := fallBackCategoryName. selectedMessageName := fallBackMethodName. ^ result notNil]]. self changed: #messageCategoryList. ^ result notNil] ifFalse: [ "User tried to save a method while the ALL category was NOT selected" ^ (self defineMessageFrom: aText notifying: aController) notNil]! From commits at source.squeak.org Mon Oct 5 18:57:41 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 5 18:57:44 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1009.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1009.mcz ==================== Summary ==================== Name: Morphic-cmm.1009 Author: cmm Time: 5 October 2015, 1:56:52.458 pm UUID: f0ce65ed-cf24-44b5-9ae5-17c5cb319b9c Ancestors: Morphic-cmm.1008, Morphic-mt.1007 Merged. =============== Diff against Morphic-mt.1007 =============== Item was changed: ----- Method: CornerGripMorph>>mouseMove: (in category 'as yet unclassified') ----- mouseMove: anEvent | delta | target ifNil: [^ self]. target fastFramingOn ifTrue: [delta := target doFastWindowReframe: self ptName] ifFalse: [ + delta := lastMouse ifNil: [0@0] ifNotNil: [anEvent cursorPoint - lastMouse]. - delta := anEvent cursorPoint - lastMouse. lastMouse := anEvent cursorPoint. self apply: delta. self bounds: (self bounds origin + delta extent: self bounds extent)].! Item was changed: ----- Method: HandMorph>>handleEvent: (in category 'events-processing') ----- handleEvent: anEvent | evt ofs | owner ifNil:[^self]. evt := anEvent. EventStats ifNil:[EventStats := IdentityDictionary new]. EventStats at: #count put: (EventStats at: #count ifAbsent:[0]) + 1. EventStats at: evt type put: (EventStats at: evt type ifAbsent:[0]) + 1. evt isMouseOver ifTrue:[^self sendMouseEvent: evt]. ShowEvents == true ifTrue:[ + Display fill: (0@0 extent: 300@120) rule: Form over fillColor: Color white. - Display fill: (0@0 extent: 250@120) rule: Form over fillColor: Color white. ofs := (owner hands indexOf: self) - 1 * 60. + evt isKeyboard + ifTrue: [ 'key: ', evt printString displayAt: (0@ofs) + (0@30) ] + ifFalse: [ 'evt: ', evt printString displayAt: (0@ofs) + (0@0) ]. + 'kf: ', self keyboardFocus printString displayAt: (0@ofs)+(0@45). - evt printString displayAt: (0@ofs) + (evt isKeyboard ifTrue:[0@30] ifFalse:[0@0]). - self keyboardFocus printString displayAt: (0@ofs)+(0@45). ]. "Notify listeners" self sendListenEvent: evt to: self eventListeners. evt isWindowEvent ifTrue: [ self sendEvent: evt focus: nil. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isKeyboard ifTrue:[ self sendListenEvent: evt to: self keyboardListeners. self sendKeyboardEvent: evt. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isDropEvent ifTrue:[ self sendEvent: evt focus: nil. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isMouse ifTrue:[ self sendListenEvent: evt to: self mouseListeners. lastMouseEvent := evt]. "Check for pending drag or double click operations." mouseClickState ifNotNil:[ (mouseClickState handleEvent: evt from: self) ifFalse:[ "Possibly dispatched #click: or something and will not re-establish otherwise" ^self mouseOverHandler processMouseOver: lastMouseEvent]]. evt isMove ifTrue:[ self position: evt position. self sendMouseEvent: evt. ] ifFalse:[ "Issue a synthetic move event if we're not at the position of the event" (evt position = self position) ifFalse:[self moveToEvent: evt]. "Drop submorphs on button events" (self hasSubmorphs) ifTrue:[self dropMorphs: evt] ifFalse:[self sendMouseEvent: evt]. ]. + ShowEvents == true ifTrue:['mf: ', self mouseFocus printString displayAt: (0@ofs) + (0@15)]. - ShowEvents == true ifTrue:[self mouseFocus printString displayAt: (0@ofs) + (0@15)]. self mouseOverHandler processMouseOver: lastMouseEvent. "self handleDragOutside: anEvent." ! Item was added: + ----- Method: HandMorph>>windowUnderneath (in category 'accessing') ----- + windowUnderneath + ActiveWorld submorphsDo: + [ : each | (each isSystemWindow and: [ each containsPoint: self position ]) ifTrue: [ ^ each ] ]. + ^ nil! Item was changed: ----- Method: Morph>>handleMouseDown: (in category 'events-processing') ----- handleMouseDown: anEvent "System level event handling." anEvent wasHandled ifTrue:[^self]. "not interested" anEvent hand removePendingBalloonFor: self. anEvent hand removePendingHaloFor: self. anEvent wasHandled: true. (anEvent controlKeyPressed and: [anEvent blueButtonChanged not and: [Preferences cmdGesturesEnabled]]) ifTrue: [^ self invokeMetaMenu: anEvent]. "Make me modal during mouse transitions" anEvent hand newMouseFocus: self event: anEvent. anEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent]. "this mouse down could be the start of a gesture, or the end of a gesture focus" (self isGestureStart: anEvent) ifTrue: [^ self gestureStart: anEvent]. + "Filter events sent to the subwidgets of non-MorphicModels in inactive windows, if they are not supposed to receive them due to windowActiveOnFirstClick being set to false. I don't like having this check for owningWindow here, is there another way?" + SystemWindow allWindowsAcceptInput + ifTrue: + [ self owningWindow + ifNil: [ self mouseDown: anEvent ] + ifNotNil: + [ : owningWindow | + (owningWindow canProcessMouseDown: anEvent) + ifTrue: [ self mouseDown: anEvent ] + ifFalse: [ owningWindow activate ] ] ] + ifFalse: [ self mouseDown: anEvent ]. - self mouseDown: anEvent. Preferences maintainHalos ifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ]. (self handlesMouseStillDown: anEvent) ifTrue:[ self startStepping: #handleMouseStillDown: at: Time millisecondClockValue + self mouseStillDownThreshold arguments: {anEvent copy resetHandlerFields} stepTime: self mouseStillDownStepRate ]. ! Item was changed: ----- Method: Morph>>keyboardFocusChange: (in category 'event handling') ----- + keyboardFocusChange: aBoolean - keyboardFocusChange: aBoolean "The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus." + self eventHandler ifNotNil: + [ : h | h + keyboardFocusChange: aBoolean + fromMorph: self ]. + "Support for 'Focus Follows Mouse'. Want the window to maintain focus even after the pointer moves into its title bar." + self owningWindow ifNotNil: [ : window | window lookFocused: (aBoolean or: [ window containsPoint: ActiveHand position]) ]. + self indicateKeyboardFocus ifTrue: [ self changed ]! - - self eventHandler - ifNotNil: [:h | h keyboardFocusChange: aBoolean fromMorph: self]. - - self indicateKeyboardFocus - ifTrue: [self changed].! Item was added: + ----- Method: Morph>>owningWindow (in category 'private') ----- + owningWindow + self withAllOwnersDo: [ : each | each isSystemWindow ifTrue: [ ^ each ] ]. + ^ nil! Item was added: + ----- Method: MorphicModel>>handleMouseDown: (in category 'events-processing') ----- + handleMouseDown: aMouseEvent + SystemWindow allWindowsAcceptInput ifTrue: + [ "This override is needed so that, when 'Window Active On First Click' is false, clicking on a PluggableListMorph of an inactive window will, correctly, NOT update the selection in the list; it will only activate the window." + aMouseEvent blueButtonChanged ifFalse: + [ self owningWindow ifNotNil: + [ : window | (window canProcessMouseDown: aMouseEvent) ifFalse: [ ^ window activate ]. + Model windowActiveOnFirstClick ifTrue: [ window activate ] ] ] ]. + super handleMouseDown: aMouseEvent! Item was changed: ----- Method: PluggableListMorph>>mouseEnter: (in category 'events') ----- + mouseEnter: event - mouseEnter: event - super mouseEnter: event. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand newKeyboardFocus: self ]! - - Preferences mouseOverForKeyboardFocus ifTrue:[ - event hand newKeyboardFocus: self. ]! Item was changed: ----- Method: PluggableListMorph>>mouseLeave: (in category 'events') ----- + mouseLeave: event + "The mouse has left the bounds of the receiver" - mouseLeave: event - "The mouse has left the area of the receiver" - super mouseLeave: event. - self hoverRow: nil. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand releaseKeyboardFocus: self ]! - - Preferences mouseOverForKeyboardFocus ifTrue:[ - event hand releaseKeyboardFocus: self].! Item was changed: ----- Method: PluggableTextMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: event super mouseEnter: event. selectionInterval ifNotNil: [textMorph editor selectInterval: selectionInterval; setEmphasisHere]. textMorph selectionChanged. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[ - Preferences mouseOverForKeyboardFocus ifTrue:[ event hand newKeyboardFocus: self]! Item was changed: ----- Method: PluggableTextMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + "The mouse has left the bounds of the receiver" - "The mouse has left the area of the receiver" - textMorph ifNotNil: [selectionInterval := textMorph editor selectionInterval]. super mouseLeave: event. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: - Preferences mouseOverForKeyboardFocus ifTrue: [event hand releaseKeyboardFocus: self]! Item was changed: ----- Method: ProportionalSplitterMorph>>proposedCorrectionWouldCauseFocusChange: (in category 'layout') ----- proposedCorrectionWouldCauseFocusChange: correction + ^ (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) and: - ^ Preferences mouseOverForKeyboardFocus and: [ | edge | splitsTopAndBottom ifTrue: [ edge := correction positive ifTrue: [ self bottom + 3 ] ifFalse: [ self top - 3 ]. ActiveHand position y inRangeOf: edge and: edge + correction ] ifFalse: [ edge := correction positive ifTrue: [ self right ] ifFalse: [ self left ]. ActiveHand position x inRangeOf: edge and: edge + correction ] ]! Item was changed: ----- Method: ScrollPane>>mouseEnter: (in category 'event handling') ----- mouseEnter: event + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := true]. - Preferences mouseOverForKeyboardFocus ifTrue:[hasFocus := true]. (owner isSystemWindow) ifTrue: [owner paneTransition: event]. retractableScrollBar ifTrue:[ self hideOrShowScrollBars ]. ! Item was changed: ----- Method: ScrollPane>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := false]. - Preferences mouseOverForKeyboardFocus ifTrue:[hasFocus := false]. retractableScrollBar ifTrue: [self hideScrollBars]. (owner isSystemWindow) ifTrue: [owner paneTransition: event] ! Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: aMouseEvent super mouseLeave: aMouseEvent. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]! - Preferences mouseOverForKeyboardFocus ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]! 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 CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowsRaiseOnClick' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient 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>>allWindowsAcceptInput (in category 'private') ----- + allWindowsAcceptInput + "With either of these two preferences settings, inactive windows will not have their widgets locked. All windows accept input as if they were active." + ^ self focusFollowsMouse or: [ self windowsRaiseOnClick not ]! Item was added: + ----- Method: SystemWindow class>>focusFollowsMouse (in category 'preferences') ----- + focusFollowsMouse + + ^ FocusFollowsMouse ifNil: [ false ]! Item was added: + ----- Method: SystemWindow class>>focusFollowsMouse: (in category 'preferences') ----- + focusFollowsMouse: aBoolean + (FocusFollowsMouse := aBoolean) == true. + self reconfigureWindowsForFocus! Item was added: + ----- Method: SystemWindow class>>reconfigureWindowsForFocus (in category 'private') ----- + reconfigureWindowsForFocus + self withAllSubclasses do: + [ : eachSubclass | eachSubclass allInstances do: + [ : eachInstance | eachInstance configureFocus ] ]! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick (in category 'preferences') ----- + windowsRaiseOnClick + + ^ WindowsRaiseOnClick ifNil: [ true ]! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick: (in category 'preferences') ----- + windowsRaiseOnClick: aBoolean + (WindowsRaiseOnClick := aBoolean == true). + self reconfigureWindowsForFocus! Item was changed: ----- Method: SystemWindow>>activate (in category 'top window') ----- activate "Activate the owner too." |mo mc| mo := self modalOwner. mc := self modalChild. mc isNil ifFalse: [mc owner notNil ifTrue: [ mc activate. ^mc modalChild isNil ifTrue: [mc flash]]]. (isCollapsed not and: [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. self activateWindow. self rememberedKeyboardFocus ifNil: [(self respondsTo: #navigateFocusForward) ifTrue: [self navigateFocusForward]] ifNotNil: [:m | m world ifNil: [self rememberKeyboardFocus: nil] "deleted" ifNotNil: [:w | m wantsKeyboardFocus ifTrue: [m takeKeyboardFocus] ifFalse: [(self respondsTo: #navigateFocusForward) ifTrue: [self navigateFocusForward]]]]. + (mo notNil and: [mo isSystemWindow]) - (mo notNil and: [mo isKindOf: SystemWindow]) ifTrue: [mo bringBehind: self]! Item was changed: ----- Method: SystemWindow>>activateWindow (in category 'top window') ----- activateWindow "Bring me to the front and make me able to respond to mouse and keyboard. Was #activate (sw 5/18/2001 23:20)" + | oldTop outerMorph sketchEditor pal windowUnderneath | - - | oldTop outerMorph sketchEditor pal | - self hasDropShadow: Preferences menuAppearance3d. - outerMorph := self topRendererOrSelf. outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"]. + self hasDropShadow: Preferences menuAppearance3d. oldTop := TopWindow. oldTop = self ifTrue: [^self]. TopWindow := self. oldTop ifNotNil: [oldTop passivate]. outerMorph owner firstSubmorph == outerMorph ifFalse: ["Bring me (with any flex) to the top if not already" outerMorph owner addMorphFront: outerMorph]. + self configureFocus. - self submorphsDo: [:m | m unlock]. - - label ifNotNil: [label color: Color black]. - - self undimWindowButtons. - labelArea ifNotNil: [labelArea submorphsDo: [:m | m unlock; show]]. - self - setStripeColorsFrom: self paneColorToUse; - adoptPaneColor: self paneColorToUse. - self isCollapsed ifFalse: [model modelWakeUpIn: self. self positionSubmorphs. labelArea ifNil: [self adjustBorderUponActivationWhenLabeless]]. - (sketchEditor := self extantSketchEditor) ifNotNil: [sketchEditor comeToFront. (pal := self world findA: PaintBoxMorph) ifNotNil: [pal comeToFront]]. + self updatePaneColors. + "Newly spawned windows are normally active, but if focusFollowsMouse is set, then the focused window can only be the one under the hand." + (self class allWindowsAcceptInput not or: [ (windowUnderneath := ActiveHand windowUnderneath) isNil or: [ windowUnderneath == self ] ]) + ifTrue: [ self lookFocused ] + ifFalse: [ self lookUnfocused ]! - - self updatePaneColors.! Item was added: + ----- Method: SystemWindow>>canProcessMouseDown: (in category 'top window') ----- + canProcessMouseDown: anEvent + "In case 'Focus Follows Mouse' is set, then there are two possibilities for mouse input on a background window: if 'Window Active On First Click' is set, it must be honored and the window must be activated. If it is not set, then the behavior depends on 'Windows Raise On Click' setting. If its true, then just activate the window and DON'T process aMouseEvent. If false, then process the event in any case." + ^ self isActive or: [ Model windowActiveOnFirstClick or: [ SystemWindow windowsRaiseOnClick not ] ]! Item was added: + ----- Method: SystemWindow>>configureFocus (in category 'top window') ----- + configureFocus + "Make me unable to respond to mouse and keyboard unless allWindowsAcceptInput is set or 'Window Active On First Click' is unset. Otherwise, the classic Squeak behavior of Control boxes remaining active, except in novice mode." + self submorphsDo: + [ : each | each lock: + (self isActive not and: + [ each == labelArea + ifTrue: [ self class windowsRaiseOnClick not ] + ifFalse: [ self class allWindowsAcceptInput not ] ]) ]. + labelArea + ifNil: [ "i.e. label area is nil, so we're titleless" + self adjustBorderUponDeactivationWhenLabeless ] + ifNotNil: + [ labelArea submorphsDo: + [ : each | | classicSqueakBehavior | + classicSqueakBehavior := self class allWindowsAcceptInput not. + each lock: + (classicSqueakBehavior + ifTrue: + [ self isActive not and: + [ Preferences noviceMode or: + [ each ~~ closeBox and: [ each ~~ collapseBox ] ] ] ] + ifFalse: + [ self isActive not and: [ Model windowActiveOnFirstClick not ] ]) ] ]! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- handleListenEvent: evt "Make sure we lock our contents after DnD has finished" evt isMouse ifFalse:[^self]. evt hand hasSubmorphs ifTrue:[^self]. "still dragging" + (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [self configureFocus]. - self == TopWindow ifFalse:[self lockInactivePortions]. evt hand removeMouseListener: self.! Item was added: + ----- Method: SystemWindow>>handlesMouseOver: (in category 'events') ----- + handlesMouseOver: anEvent + ^ true! Item was removed: - ----- Method: SystemWindow>>lockInactivePortions (in category 'top window') ----- - lockInactivePortions - "Make me unable to respond to mouse and keyboard. Control boxes remain active, except in novice mode" - - self submorphsDo: [:m | m == labelArea ifFalse: [m lock]]. - self dimWindowButtons. - labelArea ifNotNil: - [labelArea submorphsDo: - [:m | - (Preferences noviceMode or: [m ~~ closeBox and: [m ~~ collapseBox]]) - ifTrue: [m lock]]] - ifNil: "i.e. label area is nil, so we're titleless" - [self adjustBorderUponDeactivationWhenLabeless].! Item was added: + ----- Method: SystemWindow>>lookFocused (in category 'top window') ----- + lookFocused + label ifNotNil: [ label color: Color black ]. + (self isActive or: [Model windowActiveOnFirstClick]) ifTrue: [ self undimWindowButtons ]. + self + updatePaneColors ; + adoptPaneColor: self paneColorToUse! Item was added: + ----- Method: SystemWindow>>lookFocused: (in category 'top window') ----- + lookFocused: aBoolean + aBoolean + ifTrue: [ self lookFocused ] + ifFalse: [ self lookUnfocused ]! Item was added: + ----- Method: SystemWindow>>lookUnfocused (in category 'top window') ----- + lookUnfocused + label ifNotNil: [ label color: Color darkGray ]. + self dimWindowButtons. + self paneColorToUseWhenNotActive in: + [ : col | self + setStripeColorsFrom: col ; + adoptPaneColor: col ]! Item was added: + ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- + mouseEnter: anEvent + "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." + super mouseEnter: anEvent. + self class allWindowsAcceptInput ifTrue: [ self lookFocused ]! Item was added: + ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- + mouseLeave: anEvent + "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." + super mouseLeave: anEvent. + self class allWindowsAcceptInput ifTrue: [ self lookUnfocused ]! Item was changed: ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: evt "lock children after drop operations" + (self isActive and:[evt hand hasSubmorphs and: [self class allWindowsAcceptInput not]]) ifTrue:[ + self configureFocus. - (self ~~ TopWindow and:[evt hand hasSubmorphs]) ifTrue:[ - self lockInactivePortions. evt hand removeMouseListener: self. ].! Item was changed: ----- Method: SystemWindow>>passivate (in category 'top window') ----- passivate + "Lose my drop shadlow and reconfigure my focus according to preferences." + self + hasDropShadow: false ; + configureFocus ; + lookUnfocused. + model modelSleep! - "Make me unable to respond to mouse and keyboard" - - label ifNotNil: [label color: Color darkGray]. - - self hasDropShadow: false. - self paneColorToUseWhenNotActive in: [:c | - self - setStripeColorsFrom: c; - adoptPaneColor: c]. - - model modelSleep. - - self lockInactivePortions - ! Item was changed: ----- Method: SystemWindowButton>>mouseEnter: (in category 'visual properties') ----- + mouseEnter: evt + | classicSqueakBehavior | + classicSqueakBehavior := SystemWindow allWindowsAcceptInput not. + classicSqueakBehavior + ifTrue: [ self highlight ] + ifFalse: + [ self owningWindow ifNotNil: + [ : window | (window isActive or: [ Model windowActiveOnFirstClick ]) ifTrue: [ self highlight ] ] ]! - mouseEnter: evt - - self highlight. - ! Item was changed: ----- Method: TextMorphForEditView>>mouseUp: (in category 'event handling') ----- mouseUp: evt super mouseUp: evt. self stopSteppingSelector: #autoScrollView:. + SystemWindow allWindowsAcceptInput ifFalse: [editView scrollSelectionIntoView: evt]. - editView scrollSelectionIntoView: evt. - self setCompositionWindow. ! From commits at source.squeak.org Mon Oct 5 18:58:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 5 18:58:34 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1008.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1008.mcz ==================== Summary ==================== Name: Morphic-cmm.1008 Author: cmm Time: 14 September 2015, 2:27:11.585 pm UUID: 056757ae-538d-4a80-b9d2-0bd93c2b24c9 Ancestors: Morphic-mt.1005 Integrate 'Focus Follows Mouse' and 'Windows Raise On Click' features from X and Gnome. =============== Diff against Morphic-mt.1005 =============== Item was changed: ----- Method: CornerGripMorph>>mouseMove: (in category 'as yet unclassified') ----- mouseMove: anEvent | delta | target ifNil: [^ self]. target fastFramingOn ifTrue: [delta := target doFastWindowReframe: self ptName] ifFalse: [ + delta := lastMouse ifNil: [0@0] ifNotNil: [anEvent cursorPoint - lastMouse]. - delta := anEvent cursorPoint - lastMouse. lastMouse := anEvent cursorPoint. self apply: delta. self bounds: (self bounds origin + delta extent: self bounds extent)].! Item was changed: ----- Method: HandMorph>>handleEvent: (in category 'events-processing') ----- handleEvent: anEvent | evt ofs | owner ifNil:[^self]. evt := anEvent. EventStats ifNil:[EventStats := IdentityDictionary new]. EventStats at: #count put: (EventStats at: #count ifAbsent:[0]) + 1. EventStats at: evt type put: (EventStats at: evt type ifAbsent:[0]) + 1. evt isMouseOver ifTrue:[^self sendMouseEvent: evt]. ShowEvents == true ifTrue:[ + Display fill: (0@0 extent: 300@120) rule: Form over fillColor: Color white. - Display fill: (0@0 extent: 250@120) rule: Form over fillColor: Color white. ofs := (owner hands indexOf: self) - 1 * 60. + evt isKeyboard + ifTrue: [ 'key: ', evt printString displayAt: (0@ofs) + (0@30) ] + ifFalse: [ 'evt: ', evt printString displayAt: (0@ofs) + (0@0) ]. + 'kf: ', self keyboardFocus printString displayAt: (0@ofs)+(0@45). - evt printString displayAt: (0@ofs) + (evt isKeyboard ifTrue:[0@30] ifFalse:[0@0]). - self keyboardFocus printString displayAt: (0@ofs)+(0@45). ]. "Notify listeners" self sendListenEvent: evt to: self eventListeners. evt isWindowEvent ifTrue: [ self sendEvent: evt focus: nil. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isKeyboard ifTrue:[ self sendListenEvent: evt to: self keyboardListeners. self sendKeyboardEvent: evt. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isDropEvent ifTrue:[ self sendEvent: evt focus: nil. ^self mouseOverHandler processMouseOver: lastMouseEvent]. evt isMouse ifTrue:[ self sendListenEvent: evt to: self mouseListeners. lastMouseEvent := evt]. "Check for pending drag or double click operations." mouseClickState ifNotNil:[ (mouseClickState handleEvent: evt from: self) ifFalse:[ "Possibly dispatched #click: or something and will not re-establish otherwise" ^self mouseOverHandler processMouseOver: lastMouseEvent]]. evt isMove ifTrue:[ self position: evt position. self sendMouseEvent: evt. ] ifFalse:[ "Issue a synthetic move event if we're not at the position of the event" (evt position = self position) ifFalse:[self moveToEvent: evt]. "Drop submorphs on button events" (self hasSubmorphs) ifTrue:[self dropMorphs: evt] ifFalse:[self sendMouseEvent: evt]. ]. + ShowEvents == true ifTrue:['mf: ', self mouseFocus printString displayAt: (0@ofs) + (0@15)]. - ShowEvents == true ifTrue:[self mouseFocus printString displayAt: (0@ofs) + (0@15)]. self mouseOverHandler processMouseOver: lastMouseEvent. "self handleDragOutside: anEvent." ! Item was added: + ----- Method: HandMorph>>windowUnderneath (in category 'accessing') ----- + windowUnderneath + ActiveWorld submorphsDo: + [ : each | (each isSystemWindow and: [ each containsPoint: self position ]) ifTrue: [ ^ each ] ]. + ^ nil! Item was changed: ----- Method: Morph>>handleMouseDown: (in category 'events-processing') ----- handleMouseDown: anEvent "System level event handling." anEvent wasHandled ifTrue:[^self]. "not interested" anEvent hand removePendingBalloonFor: self. anEvent hand removePendingHaloFor: self. anEvent wasHandled: true. (anEvent controlKeyPressed and: [anEvent blueButtonChanged not and: [Preferences cmdGesturesEnabled]]) ifTrue: [^ self invokeMetaMenu: anEvent]. "Make me modal during mouse transitions" anEvent hand newMouseFocus: self event: anEvent. anEvent blueButtonChanged ifTrue:[^self blueButtonDown: anEvent]. "this mouse down could be the start of a gesture, or the end of a gesture focus" (self isGestureStart: anEvent) ifTrue: [^ self gestureStart: anEvent]. + "Filter events sent to the subwidgets of non-MorphicModels in inactive windows, if they are not supposed to receive them due to windowActiveOnFirstClick being set to false. I don't like having this check for owningWindow here, is there another way?" + SystemWindow allWindowsAcceptInput + ifTrue: + [ self owningWindow + ifNil: [ self mouseDown: anEvent ] + ifNotNil: + [ : owningWindow | + (owningWindow canProcessMouseDown: anEvent) + ifTrue: [ self mouseDown: anEvent ] + ifFalse: [ owningWindow activate ] ] ] + ifFalse: [ self mouseDown: anEvent ]. - self mouseDown: anEvent. Preferences maintainHalos ifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ]. (self handlesMouseStillDown: anEvent) ifTrue:[ self startStepping: #handleMouseStillDown: at: Time millisecondClockValue + self mouseStillDownThreshold arguments: {anEvent copy resetHandlerFields} stepTime: self mouseStillDownStepRate ]. ! Item was changed: ----- Method: Morph>>keyboardFocusChange: (in category 'event handling') ----- + keyboardFocusChange: aBoolean - keyboardFocusChange: aBoolean "The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus." + self eventHandler ifNotNil: + [ : h | h + keyboardFocusChange: aBoolean + fromMorph: self ]. + "Support for 'Focus Follows Mouse'. Want the window to maintain focus even after the pointer moves into its title bar." + self owningWindow ifNotNil: [ : window | window lookFocused: (aBoolean or: [ window containsPoint: ActiveHand position]) ]. + self indicateKeyboardFocus ifTrue: [ self changed ]! - - self eventHandler - ifNotNil: [:h | h keyboardFocusChange: aBoolean fromMorph: self]. - - self indicateKeyboardFocus - ifTrue: [self changed].! Item was added: + ----- Method: Morph>>owningWindow (in category 'private') ----- + owningWindow + self withAllOwnersDo: [ : each | each isSystemWindow ifTrue: [ ^ each ] ]. + ^ nil! Item was added: + ----- Method: MorphicModel>>handleMouseDown: (in category 'events-processing') ----- + handleMouseDown: aMouseEvent + SystemWindow allWindowsAcceptInput ifTrue: + [ "This override is needed so that, when 'Window Active On First Click' is false, clicking on a PluggableListMorph of an inactive window will, correctly, NOT update the selection in the list; it will only activate the window." + aMouseEvent blueButtonChanged ifFalse: + [ self owningWindow ifNotNil: + [ : window | (window canProcessMouseDown: aMouseEvent) ifFalse: [ ^ window activate ]. + Model windowActiveOnFirstClick ifTrue: [ window activate ] ] ] ]. + super handleMouseDown: aMouseEvent! Item was changed: ----- Method: PluggableListMorph>>mouseEnter: (in category 'events') ----- + mouseEnter: event - mouseEnter: event - super mouseEnter: event. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand newKeyboardFocus: self ]! - - Preferences mouseOverForKeyboardFocus ifTrue:[ - event hand newKeyboardFocus: self. ]! Item was changed: ----- Method: PluggableListMorph>>mouseLeave: (in category 'events') ----- + mouseLeave: event + "The mouse has left the bounds of the receiver" - mouseLeave: event - "The mouse has left the area of the receiver" - super mouseLeave: event. - self hoverRow: nil. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand releaseKeyboardFocus: self ]! - - Preferences mouseOverForKeyboardFocus ifTrue:[ - event hand releaseKeyboardFocus: self].! Item was changed: ----- Method: PluggableTextMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: event super mouseEnter: event. selectionInterval ifNotNil: [textMorph editor selectInterval: selectionInterval; setEmphasisHere]. textMorph selectionChanged. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[ - Preferences mouseOverForKeyboardFocus ifTrue:[ event hand newKeyboardFocus: self]! Item was changed: ----- Method: PluggableTextMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + "The mouse has left the bounds of the receiver" - "The mouse has left the area of the receiver" - textMorph ifNotNil: [selectionInterval := textMorph editor selectionInterval]. super mouseLeave: event. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: - Preferences mouseOverForKeyboardFocus ifTrue: [event hand releaseKeyboardFocus: self]! Item was changed: ----- Method: ProportionalSplitterMorph>>proposedCorrectionWouldCauseFocusChange: (in category 'layout') ----- proposedCorrectionWouldCauseFocusChange: correction + ^ (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) and: - ^ Preferences mouseOverForKeyboardFocus and: [ | edge | splitsTopAndBottom ifTrue: [ edge := correction positive ifTrue: [ self bottom + 3 ] ifFalse: [ self top - 3 ]. ActiveHand position y inRangeOf: edge and: edge + correction ] ifFalse: [ edge := correction positive ifTrue: [ self right ] ifFalse: [ self left ]. ActiveHand position x inRangeOf: edge and: edge + correction ] ]! Item was changed: ----- Method: ScrollPane>>mouseEnter: (in category 'event handling') ----- mouseEnter: event + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := true]. - Preferences mouseOverForKeyboardFocus ifTrue:[hasFocus := true]. (owner isSystemWindow) ifTrue: [owner paneTransition: event]. retractableScrollBar ifTrue:[ self hideOrShowScrollBars ]. ! Item was changed: ----- Method: ScrollPane>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := false]. - Preferences mouseOverForKeyboardFocus ifTrue:[hasFocus := false]. retractableScrollBar ifTrue: [self hideScrollBars]. (owner isSystemWindow) ifTrue: [owner paneTransition: event] ! Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: aMouseEvent super mouseLeave: aMouseEvent. + (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]! - Preferences mouseOverForKeyboardFocus ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]! 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 CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowsRaiseOnClick' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient 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>>allWindowsAcceptInput (in category 'private') ----- + allWindowsAcceptInput + "With either of these two preferences settings, inactive windows will not have their widgets locked. All windows accept input as if they were active." + ^ self focusFollowsMouse or: [ self windowsRaiseOnClick not ]! Item was added: + ----- Method: SystemWindow class>>focusFollowsMouse (in category 'preferences') ----- + focusFollowsMouse + + ^ FocusFollowsMouse ifNil: [ false ]! Item was added: + ----- Method: SystemWindow class>>focusFollowsMouse: (in category 'preferences') ----- + focusFollowsMouse: aBoolean + (FocusFollowsMouse := aBoolean) == true. + self reconfigureWindowsForFocus! Item was added: + ----- Method: SystemWindow class>>reconfigureWindowsForFocus (in category 'private') ----- + reconfigureWindowsForFocus + self withAllSubclasses do: + [ : eachSubclass | eachSubclass allInstances do: + [ : eachInstance | eachInstance configureFocus ] ]! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick (in category 'preferences') ----- + windowsRaiseOnClick + + ^ WindowsRaiseOnClick ifNil: [ true ]! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick: (in category 'preferences') ----- + windowsRaiseOnClick: aBoolean + (WindowsRaiseOnClick := aBoolean == true). + self reconfigureWindowsForFocus! Item was changed: ----- Method: SystemWindow>>activate (in category 'top window') ----- activate "Activate the owner too." |mo mc| mo := self modalOwner. mc := self modalChild. mc isNil ifFalse: [mc owner notNil ifTrue: [ mc activate. ^mc modalChild isNil ifTrue: [mc flash]]]. (isCollapsed not and: [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. self activateWindow. self rememberedKeyboardFocus ifNil: [(self respondsTo: #navigateFocusForward) ifTrue: [self navigateFocusForward]] ifNotNil: [:m | m world ifNil: [self rememberKeyboardFocus: nil] "deleted" ifNotNil: [:w | m wantsKeyboardFocus ifTrue: [m takeKeyboardFocus] ifFalse: [(self respondsTo: #navigateFocusForward) ifTrue: [self navigateFocusForward]]]]. + (mo notNil and: [mo isSystemWindow]) - (mo notNil and: [mo isKindOf: SystemWindow]) ifTrue: [mo bringBehind: self]! Item was changed: ----- Method: SystemWindow>>activateWindow (in category 'top window') ----- activateWindow "Bring me to the front and make me able to respond to mouse and keyboard. Was #activate (sw 5/18/2001 23:20)" + | oldTop outerMorph sketchEditor pal windowUnderneath | - - | oldTop outerMorph sketchEditor pal | - self hasDropShadow: Preferences menuAppearance3d. - outerMorph := self topRendererOrSelf. outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"]. + self hasDropShadow: Preferences menuAppearance3d. oldTop := TopWindow. oldTop = self ifTrue: [^self]. TopWindow := self. oldTop ifNotNil: [oldTop passivate]. outerMorph owner firstSubmorph == outerMorph ifFalse: ["Bring me (with any flex) to the top if not already" outerMorph owner addMorphFront: outerMorph]. + self configureFocus. - self submorphsDo: [:m | m unlock]. - - label ifNotNil: [label color: Color black]. - - self undimWindowButtons. - labelArea ifNotNil: [labelArea submorphsDo: [:m | m unlock; show]]. - self - setStripeColorsFrom: self paneColorToUse; - adoptPaneColor: self paneColorToUse. - self isCollapsed ifFalse: [model modelWakeUpIn: self. self positionSubmorphs. labelArea ifNil: [self adjustBorderUponActivationWhenLabeless]]. - (sketchEditor := self extantSketchEditor) ifNotNil: [sketchEditor comeToFront. (pal := self world findA: PaintBoxMorph) ifNotNil: [pal comeToFront]]. + self updatePaneColors. + "Newly spawned windows are normally active, but if focusFollowsMouse is set, then the focused window can only be the one under the hand." + (self class allWindowsAcceptInput not or: [ (windowUnderneath := ActiveHand windowUnderneath) isNil or: [ windowUnderneath == self ] ]) + ifTrue: [ self lookFocused ] + ifFalse: [ self lookUnfocused ]! - - self updatePaneColors.! Item was added: + ----- Method: SystemWindow>>canProcessMouseDown: (in category 'top window') ----- + canProcessMouseDown: anEvent + "In case 'Focus Follows Mouse' is set, then there are two possibilities for mouse input on a background window: if 'Window Active On First Click' is set, it must be honored and the window must be activated. If it is not set, then the behavior depends on 'Windows Raise On Click' setting. If its true, then just activate the window and DON'T process aMouseEvent. If false, then process the event in any case." + ^ self isActive or: [ Model windowActiveOnFirstClick or: [ SystemWindow windowsRaiseOnClick not ] ]! Item was added: + ----- Method: SystemWindow>>configureFocus (in category 'top window') ----- + configureFocus + "Make me unable to respond to mouse and keyboard unless allWindowsAcceptInput is set or 'Window Active On First Click' is unset. Otherwise, the classic Squeak behavior of Control boxes remaining active, except in novice mode." + self submorphsDo: + [ : each | each lock: + (self isActive not and: + [ each == labelArea + ifTrue: [ self class windowsRaiseOnClick not ] + ifFalse: [ self class allWindowsAcceptInput not ] ]) ]. + labelArea + ifNil: [ "i.e. label area is nil, so we're titleless" + self adjustBorderUponDeactivationWhenLabeless ] + ifNotNil: + [ labelArea submorphsDo: + [ : each | | classicSqueakBehavior | + classicSqueakBehavior := self class allWindowsAcceptInput not. + each lock: + (classicSqueakBehavior + ifTrue: + [ self isActive not and: + [ Preferences noviceMode or: + [ each ~~ closeBox and: [ each ~~ collapseBox ] ] ] ] + ifFalse: + [ self isActive not and: [ Model windowActiveOnFirstClick not ] ]) ] ]! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- handleListenEvent: evt "Make sure we lock our contents after DnD has finished" evt isMouse ifFalse:[^self]. evt hand hasSubmorphs ifTrue:[^self]. "still dragging" + (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [self configureFocus]. - self == TopWindow ifFalse:[self lockInactivePortions]. evt hand removeMouseListener: self.! Item was added: + ----- Method: SystemWindow>>handlesMouseOver: (in category 'events') ----- + handlesMouseOver: anEvent + ^ true! Item was removed: - ----- Method: SystemWindow>>lockInactivePortions (in category 'top window') ----- - lockInactivePortions - "Make me unable to respond to mouse and keyboard. Control boxes remain active, except in novice mode" - - self submorphsDo: [:m | m == labelArea ifFalse: [m lock]]. - self dimWindowButtons. - labelArea ifNotNil: - [labelArea submorphsDo: - [:m | - (Preferences noviceMode or: [m ~~ closeBox and: [m ~~ collapseBox]]) - ifTrue: [m lock]]] - ifNil: "i.e. label area is nil, so we're titleless" - [self adjustBorderUponDeactivationWhenLabeless].! Item was added: + ----- Method: SystemWindow>>lookFocused (in category 'top window') ----- + lookFocused + label ifNotNil: [ label color: Color black ]. + (self isActive or: [Model windowActiveOnFirstClick]) ifTrue: [ self undimWindowButtons ]. + self + updatePaneColors ; + adoptPaneColor: self paneColorToUse! Item was added: + ----- Method: SystemWindow>>lookFocused: (in category 'top window') ----- + lookFocused: aBoolean + aBoolean + ifTrue: [ self lookFocused ] + ifFalse: [ self lookUnfocused ]! Item was added: + ----- Method: SystemWindow>>lookUnfocused (in category 'top window') ----- + lookUnfocused + label ifNotNil: [ label color: Color darkGray ]. + self dimWindowButtons. + self paneColorToUseWhenNotActive in: + [ : color | self + setStripeColorsFrom: color ; + adoptPaneColor: color ]! Item was added: + ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- + mouseEnter: anEvent + "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." + super mouseEnter: anEvent. + self class allWindowsAcceptInput ifTrue: [ self lookFocused ]! Item was added: + ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- + mouseLeave: anEvent + "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." + super mouseLeave: anEvent. + self class allWindowsAcceptInput ifTrue: [ self lookUnfocused ]! Item was changed: ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: evt "lock children after drop operations" + (self isActive and:[evt hand hasSubmorphs and: [self class allWindowsAcceptInput not]]) ifTrue:[ + self configureFocus. - (self ~~ TopWindow and:[evt hand hasSubmorphs]) ifTrue:[ - self lockInactivePortions. evt hand removeMouseListener: self. ].! Item was changed: ----- Method: SystemWindow>>passivate (in category 'top window') ----- passivate + "Lose my drop shadlow and reconfigure my focus according to preferences." + self + hasDropShadow: false ; + configureFocus ; + lookUnfocused. + model modelSleep! - "Make me unable to respond to mouse and keyboard" - - label ifNotNil: [label color: Color darkGray]. - - self hasDropShadow: false. - self paneColorToUseWhenNotActive in: [:c | - self - setStripeColorsFrom: c; - adoptPaneColor: c]. - - model modelSleep. - - self lockInactivePortions - ! Item was changed: ----- Method: SystemWindowButton>>mouseEnter: (in category 'visual properties') ----- + mouseEnter: evt + | classicSqueakBehavior | + classicSqueakBehavior := SystemWindow allWindowsAcceptInput not. + classicSqueakBehavior + ifTrue: [ self highlight ] + ifFalse: + [ self owningWindow ifNotNil: + [ : window | (window isActive or: [ Model windowActiveOnFirstClick ]) ifTrue: [ self highlight ] ] ]! - mouseEnter: evt - - self highlight. - ! Item was changed: ----- Method: TextMorphForEditView>>mouseUp: (in category 'event handling') ----- mouseUp: evt super mouseUp: evt. self stopSteppingSelector: #autoScrollView:. + SystemWindow allWindowsAcceptInput ifFalse: [editView scrollSelectionIntoView: evt]. - editView scrollSelectionIntoView: evt. - self setCompositionWindow. ! From commits at source.squeak.org Mon Oct 5 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 5 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151005215502.8974.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-October/008980.html Name: Tools-cmm.634 Ancestors: Tools-cmm.620, Tools-eem.633 - IDE, please stop forcing a message category selection just because I accepted a method. If I want that, I'll simply press the hot-key, Shift+Command+C. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008981.html Name: Morphic-cmm.1009 Ancestors: Morphic-cmm.1008, Morphic-mt.1007 Merged. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008982.html Name: Morphic-cmm.1008 Ancestors: Morphic-mt.1005 Integrate 'Focus Follows Mouse' and 'Windows Raise On Click' features from X and Gnome. ============================================= From craig at netjam.org Mon Oct 5 22:38:38 2015 From: craig at netjam.org (Craig Latta) Date: Mon Oct 5 22:38:46 2015 Subject: [squeak-dev] "callback failed to own the VM" Message-ID: Hi-- What does it mean when I get "callback failed to own the VM" on stderr from cogspur? thanks again, -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From mkobetic at gmail.com Tue Oct 6 00:31:01 2015 From: mkobetic at gmail.com (mkobetic@gmail.com) Date: Tue Oct 6 00:31:06 2015 Subject: [squeak-dev] Thoughts on Xtreams Message-ID: <56131646.9fa96b0a.71cbc.4a8a@mx.google.com> "Chris Cunnington" wrote: > This has a functional feel because you cannot stop and examine things, > because a filter has no state. It's just passing things on. Once it's > composed, you need to wait until the end to see what happened. As such, > it can handle infinite strings, as suggested in the SICP. Debugging streams is definitely an issue that could use attention. To be fair I don't think it's any worse with Xtreams, than it is with the classic streams. Sure if you have an in-memory stream you just dive into the underlying collection, but that's the same with Xtreams. Frameworks like Altitude have very good reasons for not doing that however. Admittedly that doesn't change the fact that it's still challenging to debug those kinds of streams. There are some basic tools that could be used in some circumstances. There's DuplicateRead/WriteStream that can be injected at any point of the stream stack/pipeline to copy whatever flows through it into another destination (Transcript, Stdout, file etc). Problem is, you're usually handed a ready made stack of streams and you shouldn't be making assumptions about its composition. That however is exactly what a competent stream inspector needs to do. Ultimately it needs to break open the encapsulation, carefully step around the internals of whatever stream layer it's digging into without triggering a state change, and excavate whatever relevant bit of info there is. There is a poor man's skeleton of something like that in the printOn:/streamingPrintOn: methods, but it's too bare bones to be useful in many cases. TBH, I'm not convinced that's the right way to go about it either. > I think the word here is chunking. Since HTTP/1.1 came out I imagine > clients have been optimizing for this. Servers? Not so much. I imagine > that servers have never worked very hard to send data with the fine > level of granularity equivalent to what clients can receive. > But I suppose this is really about buffer size and flushing frequency. I > imagine Seaside could chunk its responses, but instead saves every > response into one large buffer and then flushes once. > With Altitude I can put 'self halt' in the middle of a page and watch > half a a page render. The buffer size is set to 1K and flushes when the > buffer is full, which doesn't take long. I'd say it's actually the other way around, it's the servers that care about chunking. The protocol requires that the server either specifies the size of the response in bytes, or it chunks (I'm deliberately ignoring HTTP1.0 zombie). So for any dynamically computed response the server will want to chunk. Otherwise it can't send any bytes until the full response is generated. Note that you may have to actually generate several copies of the content in various stages of transfer encoding in order to get correct final byte size. Stream processing + chunking is really the only sane way to handle that IMO. Browsers actually don't really care whether the response is chunked or not, they will partially render whatever fragment of the page they have as soon as they get it. Granted I'm handwaving over the much more complex reality of today's web pages. Regardless it's the server side where chunking enables sending incomplete response fragments. Martin From frank.shearar at gmail.com Tue Oct 6 09:16:35 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Oct 6 09:16:38 2015 Subject: [squeak-dev] Thoughts on Xtreams In-Reply-To: <56129F9D.3040408@gmail.com> References: <56129F9D.3040408@gmail.com> Message-ID: On 5 October 2015 at 17:04, Chris Cunnington wrote: > > > On 2015-10-03 1:45 AM, Colin Putney wrote: > > > > On Fri, Oct 2, 2015 at 8:06 AM, Chris Cunnington wrote: > >> >> I do not have a mental model for what Xtreams is doing yet. How do other >> people conceptualize using Xtreams in contrast to the existing Streams >> implementation? > > > I think the elegance of Xtreams boils down to one thing: composition is > better than inheritance. > > If you look at the Squeak stream hierarchy, it's a nightmare. Among the > highlights: > > There's a whole subhierarchy dedicated to compression. It successfully > shares code for different types of compression but since DeflateStream > inherits from PositionalStream, it can only write compressed data into > memory. If you want to write compressed data to a file, you'll have to write > to a compression stream, get its contents and write that to a file stream. > On the flip side, there's CrLfFileStream, which converts line endings when > reading and writing to a file. Except wait, it's obsolete now and > CrLfFileStream new actually returns an instance of MultiByteFileStream. This > class has an annoying name, because it's camel-cased on syllable boundaries > as well as word boundaries. Ugh. Worse, it combines line-end conversion with > encoding conversion, but only when it text mode. Well, most of the time, > when in text mode. You gotta be careful about those few methods that > manipulate the file position in terms of bytes, because that can leave it in > the middle of a multibyte character and then nothing works right. And if you > want to do any of this conversion on data in memory, you're outta luck > because MultiByteFileStream only works on data in files. > Luckily MultiByteBinaryOrTextStream is here to save the day. (Again with the > capitals on syllable breaks.) It *does* work on data in memory. It has a > whole separate implementation of the encoding and line-ending conversion > code, plus no-nops implementations of the file-related stuff in > MultiByteFileStream so the two are polymorphic. So convenient. > There's also ReadWriteStream, which subclasses WriteStream, and > re-implements all of ReadStream's functionality. > There's also SocketStream, for convenience in doing network IO. Oh wait, > it's not part of the Stream hierarchy at all. Never mind. > > There's more (lots more), but let's not get sidetracked. The point is that > there is just no way to have a sane inheritance hierarchy for a whole bunch > of orthogonal concerns: > > the underlying data storage - memory, file, socket or something more exotic > data transformation - encoding, compression, buffering, chunking etc > reading vs writing > > Where Squeak streams try to do everything in one object, and combine > different options via inheritance, Xtreams splits a stream into a pipeline > of objects that each provide a separate bit of functionality. It's so much > more flexible. > > I think I'm starting to see Xtreams like this. > > A block can be used as a filter for iterating over the elements of a stream. > If you have different filter blocks, then you can wrap each of them in > class and have a library of different filters. If you compose these > classes, then you have a pipeline of blocks that does a variety of things at > once. > > This has a functional feel because you cannot stop and examine things, > because a filter has no state. It's just passing things on. Once it's > composed, you need to wait until the end to see what happened. As such, it > can handle infinite strings, as suggested in the SICP. > > In the specific case of Altitude, Xtreams provide two main advantages: > > First, the framework can build a custom pipeline of streams based on message > headers. To handle a request, we just examine the headers, build the > appropriate sequence of transformation streams and hand that off to the > application for reading. > > When the response is ready, we again look at the headers, build a stream > that performs all the transformations that the app has indicated it wants, > and let the app write into it. We can use any of the features of HTTP, while > still providing a simple and consistent interface to the app > > > request := ALAuthenticationRequest new. > aRequest readEntityWith: [:in| ALJsonParser parse: in for: request ] > > This was doing my head in. I expected all the stream contents to be rallied > in the aRequest location, the whole stream would be there, so I could see > it. But the Relay/Transforms phase is not over at that point. There is no > state. It's not until the data is all in the ALAuthenticationRequest that I > can examine it. That block is like another Xtreams filter. Stateless. All it > does is sort things as they go by. And that's why I was confused. Foiled > expectations. I have a minor quibble with "stateless" in that sentence. An Xtreams object can be as stateful as you like - stream that count, or groups, or deduplicate, must all keep some kind of state. But I think what you're talking about is that when you compose this pipeline of processors, you have assembled a _computation_, you have not yet _computed_ anything. So the state of the stream itself isn't visible. Bear in mind too that Xtreams is _lazy_: you only get to see the transformed output of a stream upon request. Exactly like a nested pipeline of blocks, in fact. It would super cool if there was an inspector that could _show_ you how the composed stream will manipulate the data... frank From commits at source.squeak.org Tue Oct 6 11:50:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 6 11:50:34 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.1010.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1010.mcz ==================== Summary ==================== Name: Morphic-mt.1010 Author: mt Time: 6 October 2015, 1:49:59.363 pm UUID: 5584d8ee-d8e6-1041-8d6f-076e24462426 Ancestors: Morphic-cmm.1009 Allow morphs to have custom corner radiuses when using the rounded corner style. =============== Diff against Morphic-cmm.1009 =============== 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 cornerRadius] - ifTrue: [self bounds insetBy: 0@self class preferredCornerRadius] ifFalse: [self bounds] ! Item was added: + ----- Method: Morph>>cornerRadius (in category 'rounding') ----- + cornerRadius + + ^ self + valueOfProperty: #cornerRadius + ifAbsent: [self class preferredCornerRadius]! Item was added: + ----- Method: Morph>>cornerRadius: (in category 'rounding') ----- + cornerRadius: radius + + self + setProperty: #cornerRadius + toValue: radius. + + self changed.! Item was changed: + ----- Method: Morph>>cornerStyle (in category 'rounding') ----- - ----- Method: Morph>>cornerStyle (in category 'visual properties') ----- cornerStyle "Returns one of the following symbols: #square #rounded according to the current corner style." ^ self valueOfProperty: #cornerStyle ifAbsent: [#square]! Item was changed: ----- Method: Morph>>drawDropHighlightOn: (in category 'drawing') ----- drawDropHighlightOn: aCanvas self highlightedForDrop ifTrue: [ self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self fullBounds radius: self cornerRadius width: 1 color: self dropHighlightColor] - ifTrue: [aCanvas frameRoundRect: self fullBounds radius: self class preferredCornerRadius width: 1 color: self dropHighlightColor] ifFalse: [aCanvas frameRectangle: self fullBounds color: self dropHighlightColor]].! Item was changed: ----- Method: Morph>>drawDropShadowOn: (in category 'drawing') ----- drawDropShadowOn: aCanvas "Rectangular shadow with support for rounded corners." | shadowBounds | shadowBounds := self shadowOffset isRectangle ifTrue: [self bounds outsetBy: self shadowOffset] ifFalse: [self bounds translateBy: (self shadowOffset negated max: 0@0)]. "Only redraw the shadow if the shadow area is affected." + ((aCanvas clipRect intersects: shadowBounds) and: [((self bounds insetBy: (self wantsRoundedCorners ifFalse: [0] ifTrue: [self cornerRadius])) containsRect: aCanvas clipRect) not]) - ((aCanvas clipRect intersects: shadowBounds) and: [((self bounds insetBy: (self wantsRoundedCorners ifFalse: [0] ifTrue: [self class preferredCornerRadius])) containsRect: aCanvas clipRect) not]) ifTrue: [ (self hasProperty: #dropShadow) ifFalse: [self updateDropShadowCache]. aCanvas translucentImage: (self valueOfProperty: #dropShadow) at: shadowBounds topLeft].! Item was changed: ----- Method: Morph>>drawKeyboardFocusIndicationOn: (in category 'drawing') ----- drawKeyboardFocusIndicationOn: aCanvas self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self bounds radius: self cornerRadius width: 3 "self borderStyle width" color: self keyboardFocusColor] - ifTrue: [aCanvas frameRoundRect: self bounds radius: self class preferredCornerRadius width: 3 "self borderStyle width" color: self keyboardFocusColor] ifFalse: [aCanvas frameRectangle: self bounds width: 3 "self borderStyle width" color: self keyboardFocusColor].! Item was changed: ----- Method: Morph>>drawMouseDownHighlightOn: (in category 'drawing') ----- drawMouseDownHighlightOn: aCanvas self highlightedForMouseDown ifTrue: [ self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self fullBounds radius: self cornerRadius width: 1 color: self color darker darker] - 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]].! Item was changed: ----- Method: Morph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas self wantsRoundedCorners + ifTrue: [aCanvas frameAndFillRoundRect: self bounds radius: self cornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] - 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]. ! Item was changed: ----- Method: Morph>>updateDropShadowCache (in category 'drawing') ----- updateDropShadowCache | shadowBounds offset form canvas drawBlock localBounds mask maskCanvas | shadowBounds := self shadowOffset isRectangle ifTrue: [0@0 corner: (self bounds outsetBy: self shadowOffset) extent] ifFalse: [0@0 corner: self extent + self shadowOffset abs]. offset := self shadowOffset isRectangle ifTrue: [0@0] ifFalse: [self shadowOffset max: 0@0]. localBounds := self shadowOffset isRectangle ifTrue: [self shadowOffset topLeft extent: self extent] ifFalse: [(self shadowOffset negated max: 0@0) extent: self extent]. form := Form extent: shadowBounds extent depth: Display depth. canvas := form getCanvas. drawBlock := self useSoftDropShadow ifFalse: [ [:c | self wantsRoundedCorners + ifTrue: [c fillRoundRect: localBounds radius: self cornerRadius fillStyle: self shadowColor] - ifTrue: [c fillRoundRect: localBounds radius: self class preferredCornerRadius fillStyle: self shadowColor] ifFalse: [c fillRectangle: localBounds fillStyle: self shadowColor]]] ifTrue: [ [:c | self wantsRoundedCorners ifTrue: [0 to: 9 do: [:i | c fillRoundRect: (shadowBounds insetBy: i) + radius: (self cornerRadius max: 20) -i - radius: (self class preferredCornerRadius max: 20) -i fillStyle: (self shadowColor alpha: self shadowColor alpha * (i+1))]] ifFalse: [0 to: 9 do: [:i | c fillRoundRect: (shadowBounds insetBy: i) radius: 20-i fillStyle: (self shadowColor alpha: self shadowColor alpha * (i+1))]]]]. canvas translateBy: offset during: [ :shadowCanvas | drawBlock value: shadowCanvas]. "Support transparent morph colors without having the shadow to shine through.." mask := Form extent: shadowBounds extent depth: Display depth. maskCanvas := mask getCanvas. self wantsRoundedCorners + ifTrue: [maskCanvas fillRoundRect: (localBounds insetBy: self borderWidth) radius: self cornerRadius fillStyle: Color black] - ifTrue: [maskCanvas fillRoundRect: (localBounds insetBy: self borderWidth) radius: self class preferredCornerRadius fillStyle: Color black] ifFalse: [maskCanvas fillRectangle: (localBounds insetBy: self borderWidth) fillStyle: Color black]. mask displayOn: form at: 0@0 rule: Form erase. self setProperty: #dropShadow toValue: form.! Item was changed: ----- Method: NewBalloonMorph>>drawDropShadowOn: (in category 'drawing') ----- drawDropShadowOn: aCanvas aCanvas translateBy: self shadowOffset during: [ :shadowCanvas | (shadowCanvas isVisible: self bubbleBounds) ifTrue: [ self wantsRoundedCorners + ifTrue: [shadowCanvas fillRoundRect: self bubbleBounds radius: self cornerRadius fillStyle: self shadowColor] - ifTrue: [shadowCanvas fillRoundRect: self bubbleBounds radius: self class preferredCornerRadius fillStyle: self shadowColor] ifFalse: [shadowCanvas fillRectangle: self bubbleBounds fillStyle: self shadowColor]]. self hasTail ifTrue: [ shadowCanvas drawPolygon: self verticesForTail fillStyle: self shadowColor]]. ! Item was changed: ----- Method: NewBalloonMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Bubble." self wantsRoundedCorners ifTrue: [aCanvas frameAndFillRoundRect: self bubbleBounds + radius: self cornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] - radius: self class preferredCornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] ifFalse: [aCanvas fillRectangle: self bubbleBounds fillStyle: self fillStyle borderStyle: self borderStyle]. "Tail." self hasTail ifTrue: [ self verticesForTail in: [:points | | pixelOffset | pixelOffset := points first y < points second y ifFalse: [points first x < points second x ifTrue: [self borderStyle width negated @ self borderStyle width] "bottomLeft" ifFalse: [self borderStyle width @ self borderStyle width]] "bottomRight" ifTrue: [points first x < points second x ifTrue: [self borderStyle width negated @ self borderStyle width negated] "topLeft" ifFalse: [self borderStyle width @ self borderStyle width negated]]. "topRight" aCanvas drawPolygon: points fillStyle: self fillStyle. aCanvas line: points first to: points second + pixelOffset width: self borderStyle width color: self borderStyle color. aCanvas line: points first to: points third + pixelOffset width: self borderStyle width color: self borderStyle color]]! Item was changed: ----- Method: NewBalloonMorph>>verticesForTail (in category 'drawing') ----- verticesForTail | offset factorX factorY tpos bpos | offset := 5 + (self wantsRoundedCorners + ifTrue: [self cornerRadius] - ifTrue: [self class preferredCornerRadius] ifFalse: [0]). tpos := self tailPosition. factorX := tpos x < self center x ifTrue: [1] ifFalse: [-1]. factorY := tpos y > self center y ifTrue: [1] ifFalse: [-1]. bpos := self bubbleBounds perform: self orientation. ^ { tpos. bpos + (((offset + self tailWidth) * factorX) @ (self borderStyle width negated * factorY)). bpos + ((offset * factorX) @ (self borderStyle width negated * factorY)).}! Item was changed: ----- Method: PluggableButtonMorph>>drawBackgroundOn: (in category 'drawing') ----- drawBackgroundOn: 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 ifTrue: [aCanvas frameAndFillRoundRect: self bounds + radius: self cornerRadius - radius: self class preferredCornerRadius fillStyle: fill borderWidth: 1 borderColor: borderColor] ifFalse: [aCanvas frameAndFillRectangle: self bounds fillColor: fill asColor borderWidth: 1 borderColor: borderColor darker; fillRectangle: self innerBounds fillStyle: fill]! Item was changed: ----- Method: UserDialogBoxMorph>>drawSubmorphsOn: (in category 'drawing') ----- drawSubmorphsOn: aCanvas super drawSubmorphsOn: aCanvas. self wantsRoundedCorners ifTrue: [ "Overdraw lower part of title bar to hide bottom corners." aCanvas + fillRectangle: (self submorphs first "titleRow" bottomLeft - (-1 @ self submorphs first cornerRadius) - fillRectangle: (self submorphs first "titleRow" bottomLeft - (-1 @ Morph preferredCornerRadius) corner: self submorphs first "titleRow" bottomRight - (1@0)) color: self color].! Item was changed: ----- Method: UserDialogBoxMorph>>initialize (in category 'initialization') ----- initialize | titleRow cc | super initialize. self color: Color white. self listDirection: #topToBottom; wrapCentering: #center; hResizing: #shrinkWrap; vResizing: #shrinkWrap. self layoutInset: -1 @ -1; cellInset: 5@5. self borderStyle: BorderStyle thinGray. self setProperty: #indicateKeyboardFocus: toValue: #never. FillInTheBlankMorph roundedDialogCorners ifTrue: [self useRoundedCorners]. self hasDropShadow: Preferences menuAppearance3d. self useSoftDropShadow ifFalse: [ self shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); shadowOffset: 1 @ 1] ifTrue: [ self shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); shadowOffset: (10@8 corner: 10@12)]. cc := Color gray: 0.8. titleRow := AlignmentMorph newRow. titleRow hResizing: #spaceFill; vResizing: #shrinkWrap. self cornerStyle == #rounded ifTrue: [titleRow useRoundedCorners]. titleRow borderStyle: BorderStyle thinGray. + titleRow layoutInset: (5@5 corner: (2@ (5 + (titleRow cornerStyle == #rounded ifTrue: [titleRow cornerRadius] ifFalse: [0])))). - titleRow layoutInset: (5@5 corner: (2@ (5 + (titleRow cornerStyle == #rounded ifTrue: [Morph preferredCornerRadius] ifFalse: [0])))). titleRow color: cc. titleRow fillStyle: self titleGradient. titleMorph := StringMorph new. titleMorph emphasis: 1. titleRow addMorph: titleMorph. labelMorph := TextMorph new. labelMorph margins: (Preferences standardButtonFont widthOf: $x) * 2 @ 0. labelMorph lock. buttonRow := AlignmentMorph newRow vResizing: #rigid; height: (Preferences standardButtonFont height + 20); hResizing: #spaceFill; layoutInset: (((Preferences standardButtonFont widthOf: $x) * 2 @ 0) corner: ((Preferences standardButtonFont widthOf: $x) * 2 @ 10)); cellInset: (Preferences standardButtonFont widthOf: $x) * 2. buttonRow color: Color transparent. self addMorphBack: titleRow ; addMorphBack: labelMorph ; addMorphBack: buttonRow. keyMap := Dictionary new! From craig at netjam.org Tue Oct 6 13:52:58 2015 From: craig at netjam.org (Craig Latta) Date: Tue Oct 6 13:53:17 2015 Subject: [squeak-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: After reading [1], I figured I should be using a multi-threaded Cog VM (cogmtlinuxht). When I start it with the 4.6 final image, I get: *** warning, processHasThreadId flag is unset; cannot function as a threaded VM if so. warning: VM parameter 48 indicates Process doesn't have threadId; VM will not thread *** What does this mean and what should I do? thanks, -C [1] http://forum.world.st/callback-explanation-td4792105.html -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at netjam.org Tue Oct 6 14:23:48 2015 From: craig at netjam.org (Craig Latta) Date: Tue Oct 6 14:24:37 2015 Subject: [squeak-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hm, I still get the "failed to own the VM" message with the multithreaded VM. I thought it would wait until it could run the callback from a VM thread? What now? thanks again, -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From eliot.miranda at gmail.com Tue Oct 6 17:31:30 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 6 17:31:33 2015 Subject: [squeak-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hi Craig, first, the message from the non-MT VM, "Warning; callback failed to own the VM", indicates that a callback is coming in on other than the VM thread. Here's the non-MT implementation from sqVirtualMachine.c: sqInt ownVM(sqInt threadIdAndFlags) { extern sqInt amInVMThread(void); return amInVMThread() ? 0 : -1; } So with the normal VM any callbacks must come in on the thread that made a callout. On Tue, Oct 6, 2015 at 7:23 AM, Craig Latta wrote: > > Hm, I still get the "failed to own the VM" message with the > multithreaded VM. I thought it would wait until it could run the > callback from a VM thread? What now? > Second, the MT VM /is/ only a prototype. But second, what's the platform, etc? Do you have a reproducible case? Are you willing to use gdb et al to debug ownVM? The issue here is when a callback comes in from some unknown thread, what do we do with it? By default it is rejected. But if there is a process in the foreignCallbackProcessSlot of the specialObjectsArray, it will be cloned to handle each "foreign" callback. Likely you don't have such a process installed, hence the callbacks getting rejected. If you read CogInterpreterMT>>ownVM: you'll see CogInterpreterMT>>ownVM: threadIndexAndFlags "This is the entry-point for plugins and primitives that wish to reacquire the VM after having released it via disownVM or callbacks that want to acquire it without knowing their ownership status. This call will block until the VM is owned by the current thread or an error occurs. The argument should be the value answered by disownVM, or 0 for callbacks that don't know if they have disowned or not. This is both an optimization to avoid having to query thread- local storage for the current thread's index (since it can easily keep it in some local variable), and a record of when an unbound process becomes affined to a thread for the dynamic extent of some operation. Answer 0 if the current thread is known to the VM. Answer 1 if the current thread is unknown to the VM and takes ownership. Answer -1 if the current thread is unknown to the VM and fails to take ownership." | threadIndex flags vmThread myProc activeProc sched | threadIndexAndFlags = 0 ifTrue: [^self ownVMFromUnidentifiedThread]. ... and CogInterpreterMT>>ownVMFromUnidentifiedThread "Attempt to take ownership from a thread that as yet doesn't know its index. This supports callbacks where the callback could originate from any thread. Answer 0 if the owning thread is known to the VM. Answer 1 if the owning thread is unknown to the VM and now owns the VM. Answer -1 if the owning thread is unknown to the VM and fails to own the VM. Answer -2 if the owning thread is unknown to the VM and there is no foreign callback process installed." | count threadIndex vmThread | (threadIndex := cogThreadManager ioGetThreadLocalThreadIndex) ~= 0 ifTrue: [ "this is a callback from a known thread" threadIndex = cogThreadManager getVMOwner ifTrue: "the VM has not been disowned" [self assert: (disowningVMThread isNil or: [disowningVMThread = self currentVMThread]). disowningVMThread := nil. self currentVMThread state: CTMAssignableOrInVM. ^VMAlreadyOwnedHenceDoNotDisown]. ^self ownVM: threadIndex]. foreignCallbackPriority = 0 ifTrue: [^-2]. ... i.e. that to accept a callback from an unknown thread the system has to have the priority at which to run callbacks from unknown threads (foreignCallbackPriority) determined, and that's set by the priority of the process filling the foreignCallbackProcessSlot in the specialObjectsArray, as set by disownVM:. CogInterpreterMT>>disownVM: flags "Release the VM to other threads and answer the current thread's index. Currently valid flags: DisownVMLockOutFullGC - prevent fullGCs while this thread disowns the VM. OwnVMForeignThreadFlag - indicates lowest-level entry from a foreign thread - not to be used explicitly by clients - only set by ownVMFromUnidentifiedThread VMAlreadyOwnedHenceDoNotDisown - indicates an ownVM from a callback was made when the vm was still owned. - not to be used explicitly by clients - only set by ownVMFromUnidentifiedThread This is the entry-point for plugins and primitives that wish to release the VM while performing some operation that may potentially block, and for callbacks returning back to some blocking operation. If this thread does not reclaim the VM before- hand then when the next heartbeat occurs the thread manager will schedule a thread to acquire the VM which may start running the VM in place of this thread. N.B. Most of the state needed to resume after preemption is set in preemptDisowningThread." | vmThread result | ... (flags anyMask: DisownVMForProcessorRelinquish) ifTrue: [| proc | (proc := objectMemory splObj: foreignCallbackProcessSlot) ~= objectMemory nilObject ifTrue: [foreignCallbackPriority := self quickFetchInteger: PriorityIndex ofObject: proc]. relinquishing := true. self sqLowLevelMFence]. So how to install a process in the foreignCallbackProcessSlot? See SmalltalkImage>>recreateSpecialObjectsArray. SmalltalkImage>>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. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. ... "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." newArray at: 56 put: nil. "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 So chose a priority to run foreign callbacks at, write a pair of accessors to set and get the foreign callback process in the specialObjectsArray. Set the slot to a new process ([] newProcess priority: N; yourself), save and restart the image (to allow the system to initialize correctly), and then see how you get on. I expect you'll see crashes soon enough because...the MT VM is a prototype. But you may just get lucky. I certainly hope so! Ah yes, you also have to arrange that when that process runs it replaces itself in the foreignCallbackSlot, so you'll have to work out a scheme to handle multiple foreign callbacks. I wrote a scheme for VW, but haven't got this far with the Cog MT VM. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151006/05da8512/attachment.htm From eliot.miranda at gmail.com Tue Oct 6 21:49:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 6 21:49:48 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder Message-ID: Hi All, can whoever broke menus in the PointerFinder please fix them? To reproduce, e.g. inspect some element in a tool, say a morph in the browser, use 'chase pointers' to bring up the path back to the roots, then chose an element form the list and menu click. Boom, MessageNotUnderstood: PointerFinder>>menu:for:shifted: _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151006/1a9f59a6/attachment.htm From commits at source.squeak.org Tue Oct 6 21:55:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 6 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151006215501.18305.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-October/008983.html Name: Morphic-mt.1010 Ancestors: Morphic-cmm.1009 Allow morphs to have custom corner radiuses when using the rounded corner style. ============================================= From leves at elte.hu Wed Oct 7 00:05:15 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Oct 7 00:05:18 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder In-Reply-To: References: Message-ID: I know it's slightly off-topic, but the PointerExplorer is broken as well. It only shows WeakArrays used by the PointerExplorer itself. To reproduce evaluate [true explorePointers]. Levente On Tue, 6 Oct 2015, Eliot Miranda wrote: > Hi All, > ? ? can whoever broke menus in the PointerFinder please fix them?? To reproduce, e.g. inspect some element in a tool, say a morph in the browser, > use 'chase pointers' to bring up the path back to the roots, then chose an element form the list and menu click.? Boom, MessageNotUnderstood: > PointerFinder>>menu:for:shifted: > ? > _,,,^..^,,,_ > best,?Eliot > > From commits at source.squeak.org Wed Oct 7 08:16:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 08:16:36 2015 Subject: [squeak-dev] The Trunk: Files-mt.145.mcz Message-ID: Marcel Taeumel uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-mt.145.mcz ==================== Summary ==================== Name: Files-mt.145 Author: mt Time: 7 October 2015, 10:16:24.866 am UUID: f726696f-12e1-0146-a181-ad701c233a62 Ancestors: Files-cmm.144 Updates service descriptions in FileStream to be extensible by message name pattern. Note: We should discuss this way of extensibility and apply it to other service descriptions in the system if okay. =============== Diff against Files-cmm.144 =============== Item was changed: ----- Method: FileStream class>>fileReaderServicesForFile:suffix: (in category 'file reader services') ----- fileReaderServicesForFile: fullName suffix: suffix "Answer services for the given file" + ^ self servicesWithSuffixes + select: [:spec | spec key anySatisfy: [:pattern | suffix = '*' or: [pattern match: suffix]]] + thenCollect: [:spec | spec value]! - ^ ((self isSourceFileSuffix: suffix) or: [ suffix = '*' ]) - ifTrue: - [{self serviceRemoveLineFeeds. - self serviceFileIn}] - ifFalse: - [#()]! Item was added: + ----- Method: FileStream class>>serviceFileInSuffixes (in category 'file reader services') ----- + serviceFileInSuffixes + + ^ self sourceFileSuffixes! Item was added: + ----- Method: FileStream class>>serviceRemoveLineFeedsSuffixes (in category 'file reader services') ----- + serviceRemoveLineFeedsSuffixes + + ^ self sourceFileSuffixes! Item was changed: ----- Method: FileStream class>>services (in category 'file reader services') ----- services + ^ (((self class selectors copyWithout: #services) + select: [:symbol | symbol beginsWith: #service]) + reject: [:symbol | symbol endsWith: #Suffixes]) + collect: [:selector | self perform: selector]! - ^ Array - with: self serviceRemoveLineFeeds - with: self serviceFileIn - ! Item was added: + ----- Method: FileStream class>>servicesWithSuffixes (in category 'file reader services') ----- + servicesWithSuffixes + + ^ (((self class selectors copyWithout: #services) + select: [:symbol | symbol beginsWith: #service]) + reject: [:symbol | symbol endsWith: #Suffixes]) + collect: [:selector | + (self perform: (selector, #Suffixes) asSymbol) -> (self perform: selector)]! From commits at source.squeak.org Wed Oct 7 08:19:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 08:19:29 2015 Subject: [squeak-dev] The Trunk: Tools-mt.635.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.635.mcz ==================== Summary ==================== Name: Tools-mt.635 Author: mt Time: 7 October 2015, 10:19:10.116 am UUID: c85a7669-d4dd-394f-be02-a82c75c011e8 Ancestors: Tools-cmm.634 Restores possibility to edit dropped text files. This feature got lost in Squeak 4.0 with the introduction of services and the use of UIManager as fall-back. =============== Diff against Tools-cmm.634 =============== Item was added: + ----- Method: FileStream class>>edit: (in category '*Tools-Changes') ----- + edit: fullNameOrStream + + ^ (fullNameOrStream isString + ifTrue: [self fileNamed: fullNameOrStream] + ifFalse: [fullNameOrStream]) edit! Item was added: + ----- Method: FileStream class>>serviceEditFile (in category '*Tools-Changes') ----- + serviceEditFile + + ^ SimpleServiceEntry + provider: self + label: 'edit as text file' + selector: #edit: + description: 'edit as text file' + buttonLabel: 'edit'! Item was added: + ----- Method: FileStream class>>serviceEditFileSuffixes (in category '*Tools-Changes') ----- + serviceEditFileSuffixes + + ^ #('*')! From commits at source.squeak.org Wed Oct 7 11:47:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 11:47:39 2015 Subject: [squeak-dev] The Trunk: Collections-mt.657.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.657.mcz ==================== Summary ==================== Name: Collections-mt.657 Author: mt Time: 7 October 2015, 1:47:21.191 pm UUID: 48404c29-18ed-9749-93c2-4481deec4180 Ancestors: Collections-eem.656 Removes method that has been deprecated since 3.10 into custom package for consistency. =============== Diff against Collections-eem.656 =============== Item was removed: - ----- Method: String>>findLastOccuranceOfString:startingAt: (in category 'deprecated-3.10') ----- - findLastOccuranceOfString: subString startingAt: start - self deprecated: 'Use instead #findLastOccurrenceOfString:startingAt:'. - ^ self findLastOccurrenceOfString: subString startingAt: start ! From commits at source.squeak.org Wed Oct 7 11:48:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 11:48:44 2015 Subject: [squeak-dev] The Trunk: 310Deprecated-mt.1.mcz Message-ID: Marcel Taeumel uploaded a new version of 310Deprecated to project The Trunk: http://source.squeak.org/trunk/310Deprecated-mt.1.mcz ==================== Summary ==================== Name: 310Deprecated-mt.1 Author: mt Time: 7 October 2015, 1:48:41.408 pm UUID: 3b6e0961-3bed-8e4b-91aa-8a356c4dbb72 Ancestors: Capture deprecated methods back from 3.10 release in a custom package for consistency with other deprecated code. ==================== Snapshot ==================== ----- Method: String>>findLastOccuranceOfString:startingAt: (in category '*310Deprecated') ----- findLastOccuranceOfString: subString startingAt: start self deprecated: 'Use instead #findLastOccurrenceOfString:startingAt:'. ^ self findLastOccurrenceOfString: subString startingAt: start ! From Das.Linux at gmx.de Wed Oct 7 12:24:42 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 12:24:39 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder In-Reply-To: References: Message-ID: On 06.10.2015, at 23:49, Eliot Miranda wrote: > Hi All, > > can whoever broke menus in the PointerFinder please fix them? To reproduce, e.g. inspect some element in a tool, say a morph in the browser, use 'chase pointers' to bring up the path back to the roots, then chose an element form the list and menu click. Boom, MessageNotUnderstood: PointerFinder>>menu:for:shifted: > Thats probably me then? I'll have a look at it. I cannot promise anything before Saturday or so, no internet at home and some private things. Best regards -Tobias From asqueaker at gmail.com Wed Oct 7 14:41:43 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 7 14:41:47 2015 Subject: [squeak-dev] The Trunk: Tools-mt.635.mcz In-Reply-To: <5614d593.32658c0a.43c01.6e7dSMTPIN_ADDED_MISSING@mx.google.com> References: <5614d593.32658c0a.43c01.6e7dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Nice, I actually like to use Squeak as a text-editor sometimes (although not having Undo sucks). On Wed, Oct 7, 2015 at 3:19 AM, wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.635.mcz > > ==================== Summary ==================== > > Name: Tools-mt.635 > Author: mt > Time: 7 October 2015, 10:19:10.116 am > UUID: c85a7669-d4dd-394f-be02-a82c75c011e8 > Ancestors: Tools-cmm.634 > > Restores possibility to edit dropped text files. This feature got lost in Squeak 4.0 with the introduction of services and the use of UIManager as fall-back. > > =============== Diff against Tools-cmm.634 =============== > > Item was added: > + ----- Method: FileStream class>>edit: (in category '*Tools-Changes') ----- > + edit: fullNameOrStream > + > + ^ (fullNameOrStream isString > + ifTrue: [self fileNamed: fullNameOrStream] > + ifFalse: [fullNameOrStream]) edit! > > Item was added: > + ----- Method: FileStream class>>serviceEditFile (in category '*Tools-Changes') ----- > + serviceEditFile > + > + ^ SimpleServiceEntry > + provider: self > + label: 'edit as text file' > + selector: #edit: > + description: 'edit as text file' > + buttonLabel: 'edit'! > > Item was added: > + ----- Method: FileStream class>>serviceEditFileSuffixes (in category '*Tools-Changes') ----- > + serviceEditFileSuffixes > + > + ^ #('*')! > > From casey.obrien.r at gmail.com Wed Oct 7 14:54:20 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Wed Oct 7 14:54:28 2015 Subject: [squeak-dev] [OT] Doctors Message-ID: <802691B4-22C2-4D16-9CAA-9DD9D99C8F9E@gmail.com> I am distraught. What Doctors Without Borders is trying to do ain't that different from what Falconer has been trying to do with Etoys. Education is probably the most important thing in the universe, but it can't happen if kids can't get access to doctors when doctors are needed. I've been in this internal emotional hell for what feels like a week even if it's really only been a couple of days. This is what I'm coming out of it with: now would be a very good time to make a small charitable donation to Doctors Without Borders. Sorry to canvass the list, but I really believe that this organization is absolutely essential to the accomplishment of the highest-minded goals that the educators in our community *created* us for. I don't really know what else to say. Thanks for listening, and I'm sorry about the nebulously off-topic post. I promise that I will not rant about this again. With all the love in my heart, --C From eliot.miranda at gmail.com Wed Oct 7 15:54:55 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 7 15:54:58 2015 Subject: [squeak-dev] Autonomous Shark-Monitoring Drone Message-ID: Dear Friends and Colleagues, as you may know, Sharks, as apex predators, are vital to maintaining healthy marine ecosystems, and at the same time, their populations are plummeting due to human actions. It is estimated for example that the population of pelagic oceanic white tip sharks is reducing by 17% per year [1] and I've heard (can't find a reference) that populations in the eastern indian/western pacific are at 1% of normal levels. Such reductions in populations create "trophic cascades" that produce wide-ranging changes in populations of different species all the way down the food chain [2]. And the marine ecosystem is a key source of human nutrition; it comprises between 13% and 17% of global human protein intake [3]. As you may also know, there is currently a shark attack crisis in New South Wales [4]. While most people in the region oppose killing sharks in response to the crisis, existing solutions, netting and culling reduce those same threatened populations of sharks upon which the sustainability of marine food supply d ecosystems depend [5], and are arguably ineffective [6]. Apparently the most successful approach at avoiding attacks is the use of human spotters, as used in Cape Town, where people in tall towers scan the sea close to shore [6]. But please watch this Youtube video [7] from Pismo Beach, California. The shark is spotted at about 1:20 into the video. This drone, a phantom 3, is sending live video back to the operators, who are using remote control. What we can see from this video is that the point of view of drones is far superior to that of spotters. My first thought is that autonomous drones could provide a cheap and scalable solution to patrolling beaches to prevent shark attacks. I expect that processors like the Pi 2 have easily enough processing power to both plan and execute search patterns along beaches, and perform the image recognition necessary to reliably detect potentially dangerous sharks. A drone might also be able autonomously to visit surfers and swimmers near to the shark and warn them, either by some signal such as flashing red LEDs or an audible message (language issues notwithstanding). The drone would have to be able to identify swimmers and surfers in the water (not easy; sharks confuse seals and surfers all the time), but computing an optimal route to visit suspected swimmers should be relatively easy :-). I imagine that sooner or later it will be possible to construct cheap rugged solar powered docking/charging shelters that drones could depart from and return to, to charge and shelter from the elements after patrols. Satellite communications could provide status reports for maintenance. My second thought is that as a community, we probably have all the necessary expertise to construct a working prototype that at least demonstrates feasibility. Such a prototype would have to be able to fly above the ocean along a beach under its own control for a useful period of time, at least 15 minutes, and demonstrate that it can identify a shark in the water (we could use a rubber shark for testing ;-) ). Our community includes people doing image recognition with the Pi, radio control experts, users of 3D printers, and some exceptional programmers. If a small, strong group could be formed with the relevant expertise we may be able to develop a prototype in a short enough time frame to be relevant. Of course, availability of time is a big issue. I couldn't contribute more than a few hours a week. But nothing ventured, nothing gained. So I'm writing this message to the Squeak and Pharo communities, and bcc'ing a few friends I know that have relevant expertise to ask for two things; first, for good information on scoping out the project, possible technologies, power budgets, costs, what is available off-the-shelf (both in hardware and known algorithms) and what we would need to construct ourselves, and second, for volunteers. Who among us are really excited by this project, have relevant expertise and are motivated to make a contribution? [1] www.sharkadvocates.org/cites_4sharks_owt_fact_sheet.pdf [2] http://www.globalshark.ca/pressmaterial/cascading/fig1_web.pdf [3] http://www.who.int/nutrition/topics/3_foodconsumption/en/index5.html [4] http://www.bbc.com/news/world-australia-34398516 [5] http://www.theguardian.com/environment/2015/sep/29/shark-hit-australian-community-opposes-cull-research-finds [6] http://www.nonswsharkcull.net/latestnews/tag/shark_spotting/ [7] https://www.youtube.com/watch?v=q2U3gjwJfS4 crazier ideas: Infra red cameras are becoming cheap and easily available. Species like Great White and Bull Shark have elevated metabolisms, effectively they are warm blooded, so these two facts may allow spotting at night. Sharks are extremely sensitive to electrical fields; maybe some kind of transmitter could be fitted to a drone, e.g. via a wire suspended in the water, that could generate a field that could direct the shark away from swimmers _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151007/d4fc08ea/attachment.htm From eliot.miranda at gmail.com Wed Oct 7 16:24:37 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 7 16:24:39 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Backtrace plus register contents please On Wed, Oct 7, 2015 at 8:16 AM, Craig Latta wrote: > > > Things seem to be going south on assertCStackWellAligned() near the > beginning of sendInvokeCallbackContext(). > > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151007/49107a8c/attachment.htm From commits at source.squeak.org Wed Oct 7 18:03:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:03:26 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.310.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.310.mcz ==================== Summary ==================== Name: Compiler-topa.310 Author: topa Time: 7 October 2015, 8:03:18.668 pm UUID: 007ba87c-085b-44bf-bea2-f096dae30601 Ancestors: Compiler-eem.309 Be consistent with error messages =============== Diff against Compiler-eem.309 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:03:24.738 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'An AmbiguousSelector is a notification produced by the Scanner/Parser/Compiler...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'An AmbiguousSelector is a notification produced by the Scanner/Parser/...etc... runs: a RunArray runs: #(378) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'An AmbiguousSelector is a notification produced by the Sca...etc... i: 0 remainder: a Text for 'An AmbiguousSelector is a notification produced by the S...etc... terminator: $! Receiver's instance variables: collection: 'ParserNotification subclass: #AmbiguousSelector instanceVariableN...etc... position: 608 readLimit: 0 writeLimit: 1012 MCDiffyTextWriter(MCStWriter)>>writeClassComment: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(AmbiguousSelector) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(AmbiguousSelector) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeClassComment: 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 Wed Oct 7 18:11:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:11:03 2015 Subject: [squeak-dev] The Trunk: Collections-topa.658.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.658.mcz ==================== Summary ==================== Name: Collections-topa.658 Author: topa Time: 7 October 2015, 8:10:49.578 pm UUID: 83dfd8ec-adbe-431e-b4eb-9f1585dfe83d Ancestors: Collections-mt.657 Make Text more polymorphic with String =============== Diff against Collections-mt.657 =============== Item was added: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:11:01.076 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'hashWithInitialHash: initialHash "Implemented to be polymorphic with String" ...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'hashWithInitialHash: initialHash "Implemented to be polymorphic with ...etc... runs: a RunArray runs: #(121) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'hashWithInitialHash: initialHash "Implemented to be polym...etc... i: 0 remainder: a Text for 'hashWithInitialHash: initialHash "Implemented to be pol...etc... terminator: $! Receiver's instance variables: collection: '----- Method: Text>>hashWithInitialHash: (in category ''comparing'...etc... position: 194 readLimit: 0 writeLimit: 200 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Text>>hashWithInitialHash:) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Text>>hashWithInitialHash:) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeAddition: [] 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 Wed Oct 7 18:29:19 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:29:21 2015 Subject: [squeak-dev] The Trunk: Collections-topa.659.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.659.mcz ==================== Summary ==================== Name: Collections-topa.659 Author: topa Time: 7 October 2015, 8:29:04.654 pm UUID: 6dd2011e-0412-4c05-9871-0887472958ed Ancestors: Collections-topa.658 re-save =============== Diff against Collections-topa.658 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:29:19.194 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'I present an ArrayedCollection whose elements are objects.' Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'I present an ArrayedCollection whose elements are objects.' runs: a RunArray runs: #(58) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'I present an ArrayedCollection whose elements are objects....etc... i: 0 remainder: a Text for 'I present an ArrayedCollection whose elements are object...etc... terminator: $! Receiver's instance variables: collection: 'ArrayedCollection variableSubclass: #Array instanceVariableNames:...etc... position: 255 readLimit: 0 writeLimit: 296 MCDiffyTextWriter(MCStWriter)>>writeClassComment: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(Array) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(Array) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeClassComment: 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 Wed Oct 7 18:31:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:31:21 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.311.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.311.mcz ==================== Summary ==================== Name: Compiler-topa.311 Author: topa Time: 7 October 2015, 8:31:11.299 pm UUID: 7eb59319-81a7-4130-aa99-e0ee35f4517d Ancestors: Compiler-topa.310 re-save =============== Diff against Compiler-topa.310 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:31:17.53 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'bindTemp: name in: methodSelector "Declare a temporary; error not if a field ...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'bindTemp: name in: methodSelector "Declare a temporary; error not if ...etc... runs: a RunArray runs: #(466) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'bindTemp: name in: methodSelector "Declare a temporary; e...etc... i: 0 remainder: a Text for 'bindTemp: name in: methodSelector "Declare a temporary;...etc... terminator: $! Receiver's instance variables: collection: '----- Method: Encoder>>bindTemp:in: (in category ''temps'') ----- ...etc... position: 530 readLimit: 0 writeLimit: 800 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Encoder>>bindTemp:in:) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Encoder>>bindTemp:in:) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>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 Wed Oct 7 18:32:09 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:32:11 2015 Subject: [squeak-dev] The Trunk: Collections-topa.660.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.660.mcz ==================== Summary ==================== Name: Collections-topa.660 Author: topa Time: 7 October 2015, 8:31:57.916 pm UUID: 5422d6e5-e4e9-4238-aca9-3a805b1c9e98 Ancestors: Collections-topa.659 re-save 2 =============== Diff against Collections-topa.659 =============== From commits at source.squeak.org Wed Oct 7 18:34:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:34:08 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.312.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.312.mcz ==================== Summary ==================== Name: Compiler-topa.312 Author: topa Time: 7 October 2015, 8:34:03.276 pm UUID: c3e13f9f-c8e4-4cdb-a63e-302936c13961 Ancestors: Compiler-topa.311 re-save 2 =============== Diff against Compiler-topa.311 =============== From commits at source.squeak.org Wed Oct 7 18:39:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:39:11 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.953.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.953.mcz ==================== Summary ==================== Name: Kernel-topa.953 Author: topa Time: 7 October 2015, 8:38:47.428 pm UUID: 611547b2-50dd-411d-be9d-0b707568425b Ancestors: Kernel-eem.952 Spur VMs report #'bad argument' instead of #'insufficient object memory' when too much memory is requested. We have to support that. =============== Diff against Kernel-eem.952 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:39:09.473 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'I am class holding state for compiled methods. All my instance variables shoul...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'I am class holding state for compiled methods. All my instance variabl...etc... runs: a RunArray runs: #(565) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'I am class holding state for compiled methods. All my inst...etc... i: 0 remainder: a Text for 'I am class holding state for compiled methods. All my in...etc... terminator: $! Receiver's instance variables: collection: 'Object variableSubclass: #AdditionalMethodState instanceVariableN...etc... position: 793 readLimit: 0 writeLimit: 1044 MCDiffyTextWriter(MCStWriter)>>writeClassComment: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(AdditionalMethodState) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCClassDefinition(AdditionalMethodState) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeClassComment: 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 Wed Oct 7 18:44:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:44:53 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.954.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.954.mcz ==================== Summary ==================== Name: Kernel-topa.954 Author: topa Time: 7 October 2015, 8:44:28.579 pm UUID: 4c44e8a1-1076-4c9d-8645-31bcdc73c33d Ancestors: Kernel-topa.953 re-save =============== Diff against Kernel-topa.953 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 6:44:51.419 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'basicNew: sizeRequested "Primitive. Answer an instance of this class with the...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'basicNew: sizeRequested "Primitive. Answer an instance of this class ...etc... runs: a RunArray runs: #(786) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'basicNew: sizeRequested "Primitive. Answer an instance of...etc... i: 0 remainder: a Text for 'basicNew: sizeRequested "Primitive. Answer an instance ...etc... terminator: $! Receiver's instance variables: collection: '----- Method: Behavior>>basicNew: (in category ''instance creation...etc... position: 860 readLimit: 0 writeLimit: 1600 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Behavior>>basicNew:) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Behavior>>basicNew:) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>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 Wed Oct 7 18:51:29 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 18:51:30 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.955.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.955.mcz ==================== Summary ==================== Name: Kernel-topa.955 Author: topa Time: 7 October 2015, 8:51:10.466 pm UUID: 1aaaf84c-9307-4d7f-a800-b5a8086e086e Ancestors: Kernel-topa.954 re-save 2 =============== Diff against Kernel-topa.954 =============== From commits at source.squeak.org Wed Oct 7 19:00:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 19:00:30 2015 Subject: [squeak-dev] The Trunk: System-topa.767.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.767.mcz ==================== Summary ==================== Name: System-topa.767 Author: topa Time: 7 October 2015, 9:00:05.666 pm UUID: 2a220b8c-0076-434d-bb9e-d70b57cd1e39 Ancestors: System-eem.766 simplify (aSymbol copyWith: $:) asSymbol to asMutator =============== Diff against System-eem.766 =============== Item was changed: ----- Method: FilePackage>>fileInFrom: (in category 'reading') ----- fileInFrom: aStream | changes | changes := ChangeSet scanFile: aStream from: 0 to: aStream size. aStream close. ('Processing ', self packageName) displayProgressFrom: 1 to: changes size during:[:bar| | chgRec | 1 to: changes size do:[:i| bar value: i. chgRec := changes at: i. + self perform: chgRec type asMutator with: chgRec. - self perform: (chgRec type copyWith: $:) asSymbol - with: chgRec. ]. ].! Item was changed: ----- Method: FilePackage>>fromStream:named: (in category 'reading') ----- fromStream: aStream named: aName | changes | changes := ChangeSet scanFile: aStream from: 0 to: aStream size. aStream close. ('Processing ', aName) displayProgressFrom: 1 to: changes size during:[:bar| | chgRec | 1 to: changes size do:[:i| bar value: i. chgRec := changes at: i. + self perform: chgRec type asMutator with: chgRec. - self perform: (chgRec type copyWith: $:) asSymbol - with: chgRec. ]. ].! From commits at source.squeak.org Wed Oct 7 19:02:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 19:02:50 2015 Subject: [squeak-dev] The Trunk: Tests-topa.332.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.332.mcz ==================== Summary ==================== Name: Tests-topa.332 Author: topa Time: 7 October 2015, 9:02:42.601 pm UUID: 75cf0229-128c-460e-b11c-1d38ae413fd9 Ancestors: Tests-topa.331 The error message for shadowed variables changed. =============== Diff against Tests-topa.331 =============== Item was changed: ----- Method: CompilerNotifyingTest>>testATempShadowingAnotherTemp (in category 'testing') ----- testATempShadowingAnotherTemp + self setUpForErrorsIn: '| x | x := 1. ^[ | ` Name already used in this method ->`x | x ]'. - self setUpForErrorsIn: '| x | x := 1. ^[ | ` Name is already defined ->`x | x ]'. self enumerateAllSelections! Item was changed: ----- Method: CompilerNotifyingTest>>testTempDoubledDefined (in category 'testing') ----- testTempDoubledDefined + self setUpForErrorsIn: '| x ` Name already used in this method ->`x | x := 1. ^x'. - self setUpForErrorsIn: '| x ` Name is already defined ->`x | x := 1. ^x'. self enumerateAllSelections! From commits at source.squeak.org Wed Oct 7 19:04:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 19:04:14 2015 Subject: [squeak-dev] The Trunk: Tests-topa.333.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.333.mcz ==================== Summary ==================== Name: Tests-topa.333 Author: topa Time: 7 October 2015, 9:04:07.581 pm UUID: 1224d066-f1f6-4e54-b2d8-235915d04ba4 Ancestors: Tests-topa.332 Expect MessageNotUnderstood for unknown prefs on Preferences, also, make the selector even more unlikely... =============== Diff against Tests-topa.332 =============== Item was changed: ----- Method: PreferencesTest>>test08DNUFallback (in category 'tests') ----- test08DNUFallback sut setPreference: #foo toValue: 123. sut class removeSelectorSilently: #foo. self assert: (sut perform: #foo) = 123. + self should: [sut perform: #_unlikelyAndUnknownSelector] raise: MessageNotUnderstood.! - self assert: (sut perform: #unknownSelector) isNil.! From commits at source.squeak.org Wed Oct 7 21:12:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:12:02 2015 Subject: [squeak-dev] The Trunk: Collections-topa.661.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.661.mcz ==================== Summary ==================== Name: Collections-topa.661 Author: topa Time: 7 October 2015, 11:11:41.143 pm UUID: 9557550c-a7b8-4b22-aa48-bfba7444d905 Ancestors: Collections-topa.660 re-save 3 =============== Diff against Collections-topa.660 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 9:12:00.098 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'braceStream: nElements "This method is used in compilation of brace construct...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'braceStream: nElements "This method is used in compilation of brace c...etc... runs: a RunArray runs: #(177) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'braceStream: nElements "This method is used in compilatio...etc... i: 0 remainder: a Text for 'braceStream: nElements "This method is used in compilat...etc... terminator: $! Receiver's instance variables: collection: '----- Method: Array class>>braceStream: (in category ''brace suppo...etc... position: 253 readLimit: 0 writeLimit: 400 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Array class>>braceStream:) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(Array class>>braceStream:) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>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 Wed Oct 7 21:13:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:13:41 2015 Subject: [squeak-dev] The Trunk: Collections-topa.662.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.662.mcz ==================== Summary ==================== Name: Collections-topa.662 Author: topa Time: 7 October 2015, 11:13:28.941 pm UUID: 6d4a71bf-33fb-4f9e-826e-e8703447be63 Ancestors: Collections-topa.661 Make Text more polymorphic with String (again) =============== Diff against Collections-topa.661 =============== Item was added: + ----- Method: Text>>hashWithInitialHash: (in category 'comparing') ----- + hashWithInitialHash: initialHash + "Implemented to be polymorphic with String" + ^ self string hashWithInitialHash: initialHash + ! From commits at source.squeak.org Wed Oct 7 21:21:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:21:28 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.313.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.313.mcz ==================== Summary ==================== Name: Compiler-topa.313 Author: topa Time: 7 October 2015, 11:21:20.61 pm UUID: 7f8cf759-2e8b-46e4-bbf8-2d34abf942b1 Ancestors: Compiler-topa.312 re-save 3 =============== Diff against Compiler-topa.312 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 9:21:26.44 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'signalName: aString inRange: anInterval ^ (self new setName: aString range: ...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'signalName: aString inRange: anInterval ^ (self new setName: aString...etc... runs: a RunArray runs: #(96) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'signalName: aString inRange: anInterval ^ (self new setN...etc... i: 0 remainder: a Text for 'signalName: aString inRange: anInterval ^ (self new se...etc... terminator: $! Receiver's instance variables: collection: '----- Method: AmbiguousSelector class>>signalName:inRange: (in cat...etc... position: 195 readLimit: 0 writeLimit: 200 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(AmbiguousSelector class>>signalName:inRange:) Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(AmbiguousSelector class>>signalName:inRange:) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>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 Wed Oct 7 21:22:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:22:59 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.956.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.956.mcz ==================== Summary ==================== Name: Kernel-topa.956 Author: topa Time: 7 October 2015, 11:22:36.695 pm UUID: b93840f1-990d-4d70-9dd6-4cddcfdde370 Ancestors: Kernel-topa.955 re-save 3 =============== Diff against Kernel-topa.955 =============== Item was changed: ==== ERROR === MessageNotUnderstood: Text>>includesUnifiedCharacter 7 October 2015 9:22:57.827 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 Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter Receiver: a Text for 'forMethod: aMethod selector: aSelector ^(self new: 0) selector: aSelector; ...etc... Arguments and temporary variables: aMessage: includesUnifiedCharacter exception: MessageNotUnderstood: Text>>includesUnifiedCharacter resumeValue: nil Receiver's instance variables: string: 'forMethod: aMethod selector: aSelector ^(self new: 0) selector: aSe...etc... runs: a RunArray runs: #(110) values: #(#()) WriteStream>>nextChunkPut: Receiver: a WriteStream Arguments and temporary variables: aString: a Text for 'forMethod: aMethod selector: aSelector ^(self new: 0) s...etc... i: 0 remainder: a Text for 'forMethod: aMethod selector: aSelector ^(self new: 0) ...etc... terminator: $! Receiver's instance variables: collection: '----- Method: AdditionalMethodState class>>forMethod:selector: (in...etc... position: 213 readLimit: 0 writeLimit: 274 MCDiffyTextWriter(MCStWriter)>>writeMethodSource: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(AdditionalMethodState class>>forMethod:selecto...etc... Receiver's instance variables: stream: a WriteStream initStream: nil MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a MCMethodDefinition(AdditionalMethodState class>>forMethod:selecto...etc... Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter WriteStream>>nextChunkPut: MCDiffyTextWriter(MCStWriter)>>writeMethodSource: MCDiffyTextWriter(MCTextWriter)>>visitMethodDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MCMethodDefinition>>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 leves at elte.hu Wed Oct 7 21:27:20 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Oct 7 21:27:25 2015 Subject: [squeak-dev] The Trunk: Tests-topa.333.mcz In-Reply-To: References: Message-ID: On Wed, 7 Oct 2015, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-topa.333.mcz > > ==================== Summary ==================== > > Name: Tests-topa.333 > Author: topa > Time: 7 October 2015, 9:04:07.581 pm > UUID: 1224d066-f1f6-4e54-b2d8-235915d04ba4 > Ancestors: Tests-topa.332 > > Expect MessageNotUnderstood for unknown prefs on Preferences, also, make the selector even more unlikely... > > =============== Diff against Tests-topa.332 =============== > > Item was changed: > ----- Method: PreferencesTest>>test08DNUFallback (in category 'tests') ----- > test08DNUFallback > > sut setPreference: #foo toValue: 123. > sut class removeSelectorSilently: #foo. > > self assert: (sut perform: #foo) = 123. > + self should: [sut perform: #_unlikelyAndUnknownSelector] raise: MessageNotUnderstood.! I think this symbol should be quoted, so that it can compile in images where such selectors are not allowed. Levente > - self assert: (sut perform: #unknownSelector) isNil.! > > > From commits at source.squeak.org Wed Oct 7 21:27:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:27:51 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.314.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.314.mcz ==================== Summary ==================== Name: Compiler-topa.314 Author: topa Time: 7 October 2015, 11:27:45.032 pm UUID: b330fbe8-6b2f-4904-941c-c9ace5ad920e Ancestors: Compiler-topa.313 re-save 4 =============== Diff against Compiler-topa.313 =============== From commits at source.squeak.org Wed Oct 7 21:30:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:30:24 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.957.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.957.mcz ==================== Summary ==================== Name: Kernel-topa.957 Author: topa Time: 7 October 2015, 11:30:02.233 pm UUID: 00b936da-2d5a-4245-86e0-d074c09cfbe4 Ancestors: Kernel-topa.956 re-save 4 =============== Diff against Kernel-topa.956 =============== From leves at elte.hu Wed Oct 7 21:31:05 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Oct 7 21:31:11 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.310.mcz In-Reply-To: References: Message-ID: On Wed, 7 Oct 2015, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Compiler to project The Trunk: > http://source.squeak.org/trunk/Compiler-topa.310.mcz > > ==================== Summary ==================== > > Name: Compiler-topa.310 > Author: topa > Time: 7 October 2015, 8:03:18.668 pm > UUID: 007ba87c-085b-44bf-bea2-f096dae30601 > Ancestors: Compiler-eem.309 > > Be consistent with error messages > > =============== Diff against Compiler-eem.309 =============== > > Item was changed: > ==== ERROR === > > MessageNotUnderstood: Text>>includesUnifiedCharacter Why do these Texts appear where Strings are expected in MC definitions? Levente > > 7 October 2015 6:03:24.738 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 > > Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter > Receiver: a Text for 'An AmbiguousSelector is a notification produced by the Scanner/Parser/Compiler...etc... > Arguments and temporary variables: > aMessage: includesUnifiedCharacter > exception: MessageNotUnderstood: Text>>includesUnifiedCharacter > resumeValue: nil > Receiver's instance variables: > string: 'An AmbiguousSelector is a notification produced by the Scanner/Parser/...etc... > runs: a RunArray runs: #(378) values: #(#()) > > WriteStream>>nextChunkPut: > Receiver: a WriteStream > Arguments and temporary variables: > aString: a Text for 'An AmbiguousSelector is a notification produced by the Sca...etc... > i: 0 > remainder: a Text for 'An AmbiguousSelector is a notification produced by the S...etc... > terminator: $! > Receiver's instance variables: > collection: 'ParserNotification subclass: #AmbiguousSelector > instanceVariableN...etc... > position: 608 > readLimit: 0 > writeLimit: 1012 > > MCDiffyTextWriter(MCStWriter)>>writeClassComment: > Receiver: a MCDiffyTextWriter > Arguments and temporary variables: > definition: a MCClassDefinition(AmbiguousSelector) > Receiver's instance variables: > stream: a WriteStream > initStream: nil > > MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: > Receiver: a MCDiffyTextWriter > Arguments and temporary variables: > definition: a MCClassDefinition(AmbiguousSelector) > Receiver's instance variables: > stream: a WriteStream > initStream: nil > > > --- The full stack --- > Text(Object)>>doesNotUnderstand: #includesUnifiedCharacter > WriteStream>>nextChunkPut: > MCDiffyTextWriter(MCStWriter)>>writeClassComment: > 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 Das.Linux at gmx.de Wed Oct 7 21:31:55 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 21:31:51 2015 Subject: [squeak-dev] re-saves Message-ID: <135CA8E3-9004-46A7-8D94-A72BA6DFD02D@gmx.de> Hi all sorry for the re-saves, but there was a Monticello experiment in my image that made the differ at source.squeak.org choke :( too bad. Best regards -Tobias From Das.Linux at gmx.de Wed Oct 7 21:35:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 21:34:59 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.310.mcz In-Reply-To: References: Message-ID: On 07.10.2015, at 23:31, Levente Uzonyi wrote: > On Wed, 7 Oct 2015, commits@source.squeak.org wrote: > >> Tobias Pape uploaded a new version of Compiler to project The Trunk: >> http://source.squeak.org/trunk/Compiler-topa.310.mcz >> >> ==================== Summary ==================== >> >> Name: Compiler-topa.310 >> Author: topa >> Time: 7 October 2015, 8:03:18.668 pm >> UUID: 007ba87c-085b-44bf-bea2-f096dae30601 >> Ancestors: Compiler-eem.309 >> >> Be consistent with error messages >> >> =============== Diff against Compiler-eem.309 =============== >> >> Item was changed: >> ==== ERROR === >> >> MessageNotUnderstood: Text>>includesUnifiedCharacter > > Why do these Texts appear where Strings are expected in MC definitions? MC experiment leaked ;) I actually wanted to see how far I can get with texts in the definitions. See, there are some Classes with comments that actually use highlighting and cross-refs: Object allSubclasses count: [:c | c comment isText and: [c comment unembellished not]] " 36" I somehow wanted to retain that. Best regards -Tobias From Das.Linux at gmx.de Wed Oct 7 21:35:25 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 21:35:20 2015 Subject: [squeak-dev] The Trunk: Tests-topa.333.mcz In-Reply-To: References: Message-ID: <869836C5-A874-4820-9329-B7F18143C7AD@gmx.de> On 07.10.2015, at 23:27, Levente Uzonyi wrote: > On Wed, 7 Oct 2015, commits@source.squeak.org wrote: > >> Tobias Pape uploaded a new version of Tests to project The Trunk: >> http://source.squeak.org/trunk/Tests-topa.333.mcz >> >> ==================== Summary ==================== >> >> Name: Tests-topa.333 >> Author: topa >> Time: 7 October 2015, 9:04:07.581 pm >> UUID: 1224d066-f1f6-4e54-b2d8-235915d04ba4 >> Ancestors: Tests-topa.332 >> >> Expect MessageNotUnderstood for unknown prefs on Preferences, also, make the selector even more unlikely... >> >> =============== Diff against Tests-topa.332 =============== >> >> Item was changed: >> ----- Method: PreferencesTest>>test08DNUFallback (in category 'tests') ----- >> test08DNUFallback >> >> sut setPreference: #foo toValue: 123. >> sut class removeSelectorSilently: #foo. >> >> self assert: (sut perform: #foo) = 123. >> + self should: [sut perform: #_unlikelyAndUnknownSelector] raise: MessageNotUnderstood.! > > I think this symbol should be quoted, so that it can compile in images where such selectors are not allowed. > > Levente > >> - self assert: (sut perform: #unknownSelector) isNil.! ok :) From commits at source.squeak.org Wed Oct 7 21:36:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:36:56 2015 Subject: [squeak-dev] The Trunk: Tests-topa.334.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.334.mcz ==================== Summary ==================== Name: Tests-topa.334 Author: topa Time: 7 October 2015, 11:36:48.921 pm UUID: 541d6f38-d7e7-4550-91d9-59c549105848 Ancestors: Tests-topa.333 still unlikely but more safe =============== Diff against Tests-topa.333 =============== Item was changed: ----- Method: PreferencesTest>>test08DNUFallback (in category 'tests') ----- test08DNUFallback sut setPreference: #foo toValue: 123. sut class removeSelectorSilently: #foo. self assert: (sut perform: #foo) = 123. + self should: [sut perform: #'_unlikelyAndUnknownSelector'] raise: MessageNotUnderstood.! - self should: [sut perform: #_unlikelyAndUnknownSelector] raise: MessageNotUnderstood.! From bert at freudenbergs.de Wed Oct 7 21:48:48 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 7 21:48:53 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.310.mcz In-Reply-To: References: Message-ID: > On 07.10.2015, at 14:35, Tobias Pape wrote: > > > On 07.10.2015, at 23:31, Levente Uzonyi wrote: >>> >>> Item was changed: >>> ==== ERROR === >>> >>> MessageNotUnderstood: Text>>includesUnifiedCharacter >> >> Why do these Texts appear where Strings are expected in MC definitions? > > MC experiment leaked ;) > I actually wanted to see how far I can get with texts in the definitions. > > See, there are some Classes with comments that actually use highlighting and cross-refs: > > Object allSubclasses count: [:c | c comment isText and: [c comment unembellished not]] " 36" > > I somehow wanted to retain that. +1 But maybe do it with a separate style definition, just like the file-out format does? - 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/20151007/d78d21b2/smime.bin From commits at source.squeak.org Wed Oct 7 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151007215503.31046.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-October/008984.html Name: Files-mt.145 Ancestors: Files-cmm.144 Updates service descriptions in FileStream to be extensible by message name pattern. Note: We should discuss this way of extensibility and apply it to other service descriptions in the system if okay. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008985.html Name: Tools-mt.635 Ancestors: Tools-cmm.634 Restores possibility to edit dropped text files. This feature got lost in Squeak 4.0 with the introduction of services and the use of UIManager as fall-back. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008986.html Name: Collections-mt.657 Ancestors: Collections-eem.656 Removes method that has been deprecated since 3.10 into custom package for consistency. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008987.html Name: 310Deprecated-mt.1 Ancestors: Capture deprecated methods back from 3.10 release in a custom package for consistency with other deprecated code. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008988.html Name: Compiler-topa.310 Ancestors: Compiler-eem.309 Be consistent with error messages ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008989.html Name: Collections-topa.658 Ancestors: Collections-mt.657 Make Text more polymorphic with String ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008990.html Name: Collections-topa.659 Ancestors: Collections-topa.658 re-save ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008991.html Name: Compiler-topa.311 Ancestors: Compiler-topa.310 re-save ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008992.html Name: Collections-topa.660 Ancestors: Collections-topa.659 re-save 2 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008993.html Name: Compiler-topa.312 Ancestors: Compiler-topa.311 re-save 2 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008994.html Name: Kernel-topa.953 Ancestors: Kernel-eem.952 Spur VMs report #'bad argument' instead of #'insufficient object memory' when too much memory is requested. We have to support that. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008995.html Name: Kernel-topa.954 Ancestors: Kernel-topa.953 re-save ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008996.html Name: Kernel-topa.955 Ancestors: Kernel-topa.954 re-save 2 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008997.html Name: System-topa.767 Ancestors: System-eem.766 simplify (aSymbol copyWith: $:) asSymbol to asMutator ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008998.html Name: Tests-topa.332 Ancestors: Tests-topa.331 The error message for shadowed variables changed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/008999.html Name: Tests-topa.333 Ancestors: Tests-topa.332 Expect MessageNotUnderstood for unknown prefs on Preferences, also, make the selector even more unlikely... ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009000.html Name: Collections-topa.661 Ancestors: Collections-topa.660 re-save 3 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009001.html Name: Collections-topa.662 Ancestors: Collections-topa.661 Make Text more polymorphic with String (again) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009002.html Name: Compiler-topa.313 Ancestors: Compiler-topa.312 re-save 3 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009003.html Name: Kernel-topa.956 Ancestors: Kernel-topa.955 re-save 3 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009004.html Name: Compiler-topa.314 Ancestors: Compiler-topa.313 re-save 4 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009005.html Name: Kernel-topa.957 Ancestors: Kernel-topa.956 re-save 4 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009006.html Name: Tests-topa.334 Ancestors: Tests-topa.333 still unlikely but more safe ============================================= From Das.Linux at gmx.de Wed Oct 7 21:55:49 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 21:55:58 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.310.mcz In-Reply-To: References: Message-ID: <612A4265-271D-49A2-8E1F-487BB165D90D@gmx.de> On 07.10.2015, at 23:48, Bert Freudenberg wrote: > >> On 07.10.2015, at 14:35, Tobias Pape wrote: >> >> >> On 07.10.2015, at 23:31, Levente Uzonyi wrote: >>>> >>>> Item was changed: >>>> ==== ERROR === >>>> >>>> MessageNotUnderstood: Text>>includesUnifiedCharacter >>> >>> Why do these Texts appear where Strings are expected in MC definitions? >> >> MC experiment leaked ;) >> I actually wanted to see how far I can get with texts in the definitions. >> >> See, there are some Classes with comments that actually use highlighting and cross-refs: >> >> Object allSubclasses count: [:c | c comment isText and: [c comment unembellished not]] " 36" >> >> I somehow wanted to retain that. > > +1 > > But maybe do it with a separate style definition, just like the file-out format does? Yea, I wanted at least the snapshot.st (which is in file-out format) to retain those. We'll see ;) best -tobias -------------- 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/20151007/ee61050f/signature.pgp From commits at source.squeak.org Wed Oct 7 22:14:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 22:14:58 2015 Subject: [squeak-dev] The Trunk: Tools-topa.636.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.636.mcz ==================== Summary ==================== Name: Tools-topa.636 Author: topa Time: 8 October 2015, 12:14:44.631 am UUID: 50636bc8-21a6-44f1-8c0e-000dd2fc029c Ancestors: Tools-mt.635 Pull up menu building to Model so that also non-StringHolder-Tools can benefit =============== Diff against Tools-mt.635 =============== Item was added: + ----- Method: Model>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- + buildMenu: aMenu withBuilders: builders shifted: aBoolean + " We let every builder modify the menu. + The builder should indicate whether to abort by returning nil." + | menu | + menu := aMenu. + builders do: [:builder | + menu := self perform: builder method selector withEnoughArguments: { menu . aBoolean }. + menu ifNil: [^ aMenu]]. + ^ menu + ! Item was added: + ----- Method: Model>>menu:for: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection + + ^ self menu: aMenu for: aMenuSymbolOrCollection shifted: false! Item was added: + ----- Method: Model>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean + + | builders | + builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class shifted: aBoolean. + builders := self sortMenuBuilders: builders. + ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean + ! Item was added: + ----- Method: Model>>menuBuildersFor:in:shifted: (in category '*Tools-pluggable menus') ----- + menuBuildersFor: someMenus in: aClass shifted: aBoolean + "Find all builders but reject the ones not matching the shift state " + | pragmas | + pragmas := (self menuPragmasFor: someMenus in: aClass) . + ^ aBoolean + ifTrue: [pragmas reject: [:builder | builder arguments = #(false)]] + ifFalse: [pragmas reject: [:builder | builder arguments = #(true)]]. + ! Item was added: + ----- Method: Model>>menuPragmasFor:in: (in category '*Tools-pluggable menus') ----- + menuPragmasFor: aMenuSymbolOrCollection in: aClass + + ^ aMenuSymbolOrCollection isCollection + ifTrue: [aMenuSymbolOrCollection gather: [:aMenuSymbol | + Pragma allNamed: aMenuSymbol from: aClass to: Object]] + ifFalse: [Pragma allNamed: aMenuSymbolOrCollection from: aClass to: Object]! Item was added: + ----- Method: Model>>methodMenuPriority: (in category '*Tools-pluggable menus') ----- + methodMenuPriority: aMethod + "The pirority of a menu method indicated by a pragma. + Defaults to 500" + ^ (aMethod pragmas detect: [:p | p keyword == #menuPriority: ] ifNone: [^ 500]) + argumentAt: 1 + ! Item was added: + ----- Method: Model>>sortMenuBuilders: (in category '*Tools-pluggable menus') ----- + sortMenuBuilders: builders + " Sort them by + 1. Priority (default 500) + 2. selector name + " + ^ builders sorted: [:a :b | + | ma mb pa pb | + ma := a method. + mb := b method. + pa := self methodMenuPriority: ma. + pb := self methodMenuPriority: mb. + pa < pb or: [pa = pb and: [ma selector <= mb selector]]] + ! Item was removed: - ----- Method: StringHolder>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- - buildMenu: aMenu withBuilders: builders shifted: aBoolean - " We let every builder modify the menu. - The builder should indicate whether to abort by returning nil." - | menu | - menu := aMenu. - builders do: [:builder | - menu := self perform: builder method selector withEnoughArguments: { menu . aBoolean }. - menu ifNil: [^ aMenu]]. - ^ menu - ! Item was removed: - ----- Method: StringHolder>>menu:for: (in category '*Tools-pluggable menus') ----- - menu: aMenu for: aMenuSymbolOrCollection - - ^ self menu: aMenu for: aMenuSymbolOrCollection shifted: false! Item was removed: - ----- Method: StringHolder>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- - menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean - - | builders | - builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class shifted: aBoolean. - builders := self sortMenuBuilders: builders. - ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean - ! Item was removed: - ----- Method: StringHolder>>menuBuildersFor:in:shifted: (in category '*Tools-pluggable menus') ----- - menuBuildersFor: someMenus in: aClass shifted: aBoolean - "Find all builders but reject the ones not matching the shift state " - | pragmas | - pragmas := (self menuPragmasFor: someMenus in: aClass) . - ^ aBoolean - ifTrue: [pragmas reject: [:builder | builder arguments = #(false)]] - ifFalse: [pragmas reject: [:builder | builder arguments = #(true)]]. - ! Item was removed: - ----- Method: StringHolder>>menuPragmasFor:in: (in category '*Tools-pluggable menus') ----- - menuPragmasFor: aMenuSymbolOrCollection in: aClass - - ^ aMenuSymbolOrCollection isCollection - ifTrue: [aMenuSymbolOrCollection gather: [:aMenuSymbol | - Pragma allNamed: aMenuSymbol from: aClass to: Object]] - ifFalse: [Pragma allNamed: aMenuSymbolOrCollection from: aClass to: Object]! Item was removed: - ----- Method: StringHolder>>methodMenuPriority: (in category '*Tools-pluggable menus') ----- - methodMenuPriority: aMethod - "The pirority of a menu method indicated by a pragma. - Defaults to 500" - ^ (aMethod pragmas detect: [:p | p keyword == #menuPriority: ] ifNone: [^ 500]) - argumentAt: 1 - ! Item was removed: - ----- Method: StringHolder>>sortMenuBuilders: (in category '*Tools-pluggable menus') ----- - sortMenuBuilders: builders - " Sort them by - 1. Priority (default 500) - 2. selector name - " - ^ builders sorted: [:a :b | - | ma mb pa pb | - ma := a method. - mb := b method. - pa := self methodMenuPriority: ma. - pb := self methodMenuPriority: mb. - pa < pb or: [pa = pb and: [ma selector <= mb selector]]] - ! From Das.Linux at gmx.de Wed Oct 7 22:16:06 2015 From: Das.Linux at gmx.de (Das.Linux@gmx.de) Date: Wed Oct 7 22:16:02 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder In-Reply-To: References: Message-ID: <291B16E4-D028-46FC-992D-3524DC29D997@gmx.de> Hi All On 07.10.2015, at 14:24, Tobias Pape wrote: > > On 06.10.2015, at 23:49, Eliot Miranda wrote: > >> Hi All, >> >> can whoever broke menus in the PointerFinder please fix them? To reproduce, e.g. inspect some element in a tool, say a morph in the browser, use 'chase pointers' to bring up the path back to the roots, then chose an element form the list and menu click. Boom, MessageNotUnderstood: PointerFinder>>menu:for:shifted: >> > > Thats probably me then? > I'll have a look at it. > I cannot promise anything before Saturday or so, > no internet at home and some private things. > > Best regards > -Tobias So, Tools-topa.636 should fix it. My apologies. Best regards -Tobias PS: When is a Model not a Tool, btw? From eliot.miranda at gmail.com Wed Oct 7 22:23:36 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 7 22:23:40 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder In-Reply-To: <291B16E4-D028-46FC-992D-3524DC29D997@gmx.de> References: <291B16E4-D028-46FC-992D-3524DC29D997@gmx.de> Message-ID: Tobias, no need to apologise. When we have a 100% test coverage, though, then you'll be in trouble ;-) Or rather, you won't because you'll know :-) Thanks!! On Wed, Oct 7, 2015 at 3:16 PM, wrote: > Hi All > On 07.10.2015, at 14:24, Tobias Pape wrote: > > > > > On 06.10.2015, at 23:49, Eliot Miranda wrote: > > > >> Hi All, > >> > >> can whoever broke menus in the PointerFinder please fix them? To > reproduce, e.g. inspect some element in a tool, say a morph in the browser, > use 'chase pointers' to bring up the path back to the roots, then chose an > element form the list and menu click. Boom, MessageNotUnderstood: > PointerFinder>>menu:for:shifted: > >> > > > > Thats probably me then? > > I'll have a look at it. > > I cannot promise anything before Saturday or so, > > no internet at home and some private things. > > > > Best regards > > -Tobias > > > So, Tools-topa.636 should fix it. My apologies. > > Best regards > -Tobias > > PS: When is a Model not a Tool, btw? > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151007/7657cdfb/attachment.htm From Das.Linux at gmx.de Wed Oct 7 22:59:09 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 22:59:06 2015 Subject: [squeak-dev] Tracing context switches Message-ID: Hey all what do you think is the best way to trace all context switches during start up to the stdout? Best regards -Tobias From Das.Linux at gmx.de Wed Oct 7 23:06:05 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 7 23:06:02 2015 Subject: [squeak-dev] Please fix menus in the PointerFinder In-Reply-To: References: <291B16E4-D028-46FC-992D-3524DC29D997@gmx.de> Message-ID: <9116F609-DC39-401C-8358-54266C6D2D0E@gmx.de> On 08.10.2015, at 00:23, Eliot Miranda wrote: > Tobias, > > no need to apologise. When we have a 100% test coverage, though, then you'll be in trouble ;-) Or rather, you won't because you'll know :-) Because you touched the topic... ;D The changes to the shadowing code broke the decompiler and makes the DecompilerTest unhappy. Here's the before [1], here after [2]. Note how the o variable gets hoisted for the #ifNotNil: but then is being shadowed by the :o of the block tempVar. Where can we fix this? Best regards -Tobias [1]: >>> ProtoObjectTest>>#testIfNotNilIfNil | object returnValue block | object := ProtoObject new. returnValue := Object new. self should: [ object ifNotNil: [ self halt ] ifNil: [ self error ] ] raise: Halt. self should: [ object ifNotNil: [ :o | self halt ] ifNil: [ self error ] ] raise: Halt. self assert: (object ifNotNil: [ :o | o == object ] ifNil: [ false ]). self assert: (object ifNotNil: [ returnValue ] ifNil: [ false ]) == returnValue. self assert: (object ifNotNil: [ :o | returnValue ] ifNil: [ false ]) == returnValue. "Now the same without inlining." block := [ self halt ]. self should: [ object ifNotNil: block ifNil: [ self error ] ] raise: Halt. block := [ :o | self halt ]. self should: [ object ifNotNil: block ifNil: [ self error ] ] raise: Halt. block := [ :o | o == object ]. self assert: (object ifNotNil: block ifNil: [ false ]). block := [ returnValue ]. self assert: (object ifNotNil: block ifNil: [ false ]) == returnValue. block := [ :o | returnValue ]. self assert: (object ifNotNil: block ifNil: [ false ]) == returnValue [2]: >>> ProtoObjectTest>>#testIfNotNilIfNil | object returnValue o block | object := ProtoObject new. returnValue := Object new. self should: [object ifNil: [self error] ifNotNil: [self halt]] raise: Halt. self should: [object ifNil: [self error] ifNotNil: [:o | self halt]] raise: Halt. self assert: ((o := object) ifNil: [false] ifNotNil: [o == object]). self assert: (object ifNil: [false] ifNotNil: [returnValue]) == returnValue. self assert: ((o := object) ifNil: [false] ifNotNil: [returnValue]) == returnValue. block := [self halt]. self should: [object ifNotNil: block ifNil: [self error]] raise: Halt. block := [:o | self halt]. self should: [object ifNotNil: block ifNil: [self error]] raise: Halt. block := [:o | o == object]. self assert: (object ifNotNil: block ifNil: [false]). block := [returnValue]. self assert: (object ifNotNil: block ifNil: [false]) == returnValue. block := [:o | returnValue]. self assert: (object ifNotNil: block ifNil: [false]) == returnValue From commits at source.squeak.org Wed Oct 7 23:21:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 7 23:21:51 2015 Subject: [squeak-dev] The Trunk: Tests-topa.335.mcz Message-ID: Tobias Pape uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-topa.335.mcz ==================== Summary ==================== Name: Tests-topa.335 Author: topa Time: 8 October 2015, 1:21:46.118 am UUID: d605e5ac-697b-46ff-9484-19f06ac86a86 Ancestors: Tests-topa.334 I tricked myself To ensure the IST isn't run on spur, I modified testSelectors to exclude it. BUT when testSelectors is empty, shouldInheritSelectors by default returns true and hence allTestSelectors is used, wich circumvents our little trick. So, we pin it to false for now. =============== Diff against Tests-topa.334 =============== Item was added: + ----- Method: ImageSegmentTest class>>shouldInheritSelectors (in category 'testing') ----- + shouldInheritSelectors + ^ false! From lewis at mail.msen.com Thu Oct 8 01:58:51 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 8 01:58:54 2015 Subject: [squeak-dev] Autonomous Shark-Monitoring Drone In-Reply-To: References: Message-ID: <20151008015851.GA44967@shell.msen.com> Sounds like an interesting and worthwhile thing to do. I'm not sure how much I can contribute, but if it turns out that there is a need for any VM plugins and/or OSProcess glue to make the thing work, I will happily volunteer for that. I don't mind buying some hardware (Rasperry Pi?) to work with, although that rubber shark may be a bit beyond my budget. Seriously, this is a good idea and it would be a lot of fun if we could make it work. Dave On Wed, Oct 07, 2015 at 08:54:55AM -0700, Eliot Miranda wrote: > Dear Friends and Colleagues, > > as you may know, Sharks, as apex predators, are vital to maintaining > healthy marine ecosystems, and at the same time, their populations are > plummeting due to human actions. It is estimated for example that the > population of pelagic oceanic white tip sharks is reducing by 17% per year > [1] and I've heard (can't find a reference) that populations in the eastern > indian/western pacific are at 1% of normal levels. Such reductions in > populations create "trophic cascades" that produce wide-ranging changes in > populations of different species all the way down the food chain [2]. And > the marine ecosystem is a key source of human nutrition; it comprises > between 13% and 17% of global human protein intake [3]. > > As you may also know, there is currently a shark attack crisis in New > South Wales [4]. While most people in the region oppose killing sharks in > response to the crisis, existing solutions, netting and culling reduce > those same threatened populations of sharks upon which the sustainability > of marine food supply d ecosystems depend [5], and are arguably ineffective > [6]. Apparently the most successful approach at avoiding attacks is the > use of human spotters, as used in Cape Town, where people in tall towers > scan the sea close to shore [6]. > > But please watch this Youtube video > [7] from Pismo Beach, > California. The shark is spotted at about 1:20 into the video. This > drone, a phantom 3, is sending live video back to the operators, who are > using remote control. What we can see from this video is that the point of > view of drones is far superior to that of spotters. > > My first thought is that autonomous drones could provide a cheap and > scalable solution to patrolling beaches to prevent shark attacks. I expect > that processors like the Pi 2 have easily enough processing power to both > plan and execute search patterns along beaches, and perform the image > recognition necessary to reliably detect potentially dangerous sharks. A > drone might also be able autonomously to visit surfers and swimmers near to > the shark and warn them, either by some signal such as flashing red LEDs or > an audible message (language issues notwithstanding). The drone would have > to be able to identify swimmers and surfers in the water (not easy; sharks > confuse seals and surfers all the time), but computing an optimal route to > visit suspected swimmers should be relatively easy :-). > > I imagine that sooner or later it will be possible to construct cheap > rugged solar powered docking/charging shelters that drones could depart > from and return to, to charge and shelter from the elements after patrols. > Satellite communications could provide status reports for maintenance. > > My second thought is that as a community, we probably have all the > necessary expertise to construct a working prototype that at least > demonstrates feasibility. Such a prototype would have to be able to fly > above the ocean along a beach under its own control for a useful period of > time, at least 15 minutes, and demonstrate that it can identify a shark in > the water (we could use a rubber shark > for testing ;-) ). > > Our community includes people doing image recognition with the Pi, radio > control experts, users of 3D printers, and some exceptional programmers. > If a small, strong group could be formed with the relevant expertise we may > be able to develop a prototype in a short enough time frame to be > relevant. Of course, availability of time is a big issue. I couldn't > contribute more than a few hours a week. But nothing ventured, nothing > gained. So I'm writing this message to the Squeak and Pharo communities, > and bcc'ing a few friends I know that have relevant expertise to ask for > two things; first, for good information on scoping out the project, > possible technologies, power budgets, costs, what is available > off-the-shelf (both in hardware and known algorithms) and what we would > need to construct ourselves, and second, for volunteers. Who among us are > really excited by this project, have relevant expertise and are motivated > to make a contribution? > > > [1] www.sharkadvocates.org/cites_4sharks_owt_fact_sheet.pdf > [2] http://www.globalshark.ca/pressmaterial/cascading/fig1_web.pdf > [3] http://www.who.int/nutrition/topics/3_foodconsumption/en/index5.html > [4] http://www.bbc.com/news/world-australia-34398516 > [5] > http://www.theguardian.com/environment/2015/sep/29/shark-hit-australian-community-opposes-cull-research-finds > [6] http://www.nonswsharkcull.net/latestnews/tag/shark_spotting/ > [7] https://www.youtube.com/watch?v=q2U3gjwJfS4 > > > > crazier ideas: > > Infra red cameras are becoming cheap and easily available. Species like > Great White and Bull Shark have elevated metabolisms, effectively they are > warm blooded, so these two facts may allow spotting at night. > > Sharks are extremely sensitive to electrical fields; maybe some kind of > transmitter could be fitted to a drone, e.g. via a wire suspended in the > water, that could generate a field that could direct the shark away from > swimmers > > _,,,^..^,,,_ > best, Eliot > From asqueaker at gmail.com Thu Oct 8 02:18:43 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Oct 8 02:18:45 2015 Subject: [squeak-dev] The Trunk: Collections-topa.660.mcz In-Reply-To: <5615652d.47968c0a.471ef.ffff8792SMTPIN_ADDED_MISSING@mx.google.com> References: <5615652d.47968c0a.471ef.ffff8792SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Say, what happened with the first two saves? You're creating filler anestry here, is there a problem? On Wed, Oct 7, 2015 at 1:31 PM, wrote: > Tobias Pape uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-topa.660.mcz > > ==================== Summary ==================== > > Name: Collections-topa.660 > Author: topa > Time: 7 October 2015, 8:31:57.916 pm > UUID: 5422d6e5-e4e9-4238-aca9-3a805b1c9e98 > Ancestors: Collections-topa.659 > > re-save 2 > > =============== Diff against Collections-topa.659 =============== > > From Das.Linux at gmx.de Thu Oct 8 05:07:01 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 8 05:07:06 2015 Subject: [squeak-dev] The Trunk: Collections-topa.660.mcz In-Reply-To: References: <5615652d.47968c0a.471ef.ffff8792SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <038CB522-D993-4A4C-A4B0-7364578165FA@gmx.de> On 08.10.2015, at 04:18, Chris Muller wrote: > Say, what happened with the first two saves? You're creating filler > anestry here, is there a problem? As I said, a MC experiment leaked. And I wanted avoid the backtraces when other commit. Best regards -Tobias From eliot.miranda at gmail.com Thu Oct 8 08:21:22 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 8 08:21:27 2015 Subject: [squeak-dev] Tracing context switches In-Reply-To: References: Message-ID: Hi Tobias, IMO the best way would be to create a special VM that added printing to the transferTi:from: method (IIRC). It can't be done reliably at the image level given the current implementation. For example, you could add tracing to suspend, resume, signal and wait by renaming the primutives and invoking them from methods with the old name that add tracing, e.g. Process>>resume self logResume. ^self primResume but this a) isn't thread safe and b) misses context switches initiated by the VM, eg when a delay fires. But doing it in the VM is safe and will catch all switches. We can discuss further tomorrow. It's a simple change and generating eg a new Stack VM should be straightforward. We could think of adding this facility to the standard VM. BTW, I'm glad you're looking at this. I'm sure we can simplify start up a lot and hence speed up start up, which is really important eg for cloud computing on containers like docker. _,,,^..^,,,_ (phone) > On Oct 7, 2015, at 3:59 PM, Tobias Pape wrote: > > Hey all > > what do you think is the best way to trace all context switches > during start up to the stdout? > > Best regards > -Tobias > > From Das.Linux at gmx.de Thu Oct 8 08:44:36 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 8 08:44:39 2015 Subject: [squeak-dev] Tracing context switches In-Reply-To: References: Message-ID: <372C5AD4-C180-4AF3-B9DC-0F54A572D723@gmx.de> Hi, On 08.10.2015, at 10:21, Eliot Miranda wrote: > Hi Tobias, > > IMO the best way would be to create a special VM that added printing to the transferTi:from: method (IIRC). It can't be done reliably at the image level given the current implementation. For example, you could add tracing to suspend, resume, signal and wait by renaming the primutives and invoking them from methods with the old name that add tracing, e.g. > > Process>>resume > self logResume. > ^self primResume > > but this a) isn't thread safe and b) misses context switches initiated by the VM, eg when a delay fires. Yep, that's what I encountered, as in, the image didn't come up after such changes ;) > > But doing it in the VM is safe and will catch all switches. We can discuss further tomorrow. It's a simple change and generating eg a new Stack VM should be straightforward. We could think of adding this facility to the standard VM. > > BTW, I'm glad you're looking at this. I'm sure we can simplify start up a lot and hence speed up start up, which is really important eg for cloud computing on containers like docker. Probably ;) Currently I'm looking into this as we have problems with the networking code on RSqueak VM and I suspect that there's just context switching gone wrong? Best regards -Tobias > > _,,,^..^,,,_ (phone) > >> On Oct 7, 2015, at 3:59 PM, Tobias Pape wrote: >> >> Hey all >> >> what do you think is the best way to trace all context switches >> during start up to the stdout? >> >> Best regards >> -Tobias From edgardec2005 at gmail.com Thu Oct 8 10:05:03 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Thu Oct 8 10:05:19 2015 Subject: [squeak-dev] Autonomous Shark-Monitoring Drone In-Reply-To: Message-ID: Elliot , here my 2 cents He is the man to contact Jon Hylands http://www.huv.com/jon Sure he have something to share Edgar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151008/7d5588d5/attachment.htm From commits at source.squeak.org Thu Oct 8 15:16:29 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 15:16:31 2015 Subject: [squeak-dev] The Trunk: Compiler-cmm.315.mcz Message-ID: Chris Muller uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-cmm.315.mcz ==================== Summary ==================== Name: Compiler-cmm.315 Author: cmm Time: 8 October 2015, 10:16:18.018 am UUID: 381c9206-c555-4633-a1ec-499bb3bd747a Ancestors: Compiler-eem.309 Resave change from Tobias with cleaned-up ancestry.. =============== Diff against Compiler-eem.309 =============== Item was changed: ----- Method: Encoder>>bindTemp:in: (in category 'temps') ----- bindTemp: name in: methodSelector "Declare a temporary; error not if a field or class variable." scopeTable at: name ifPresent:[:node| "When non-interactive raise the error only if its a duplicate" (node isTemp or:[requestor interactive]) + ifTrue:[^self notify:'Name already used in this method'] - ifTrue:[^self notify:'Name is already defined'] ifFalse:[Transcript show: '(', name, ' is shadowed in "' , cue getClass printString , '>>' , methodSelector printString , '")']]. ^self reallyBind: name! From commits at source.squeak.org Thu Oct 8 15:19:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 15:19:34 2015 Subject: [squeak-dev] The Trunk: Collections-cmm.663.mcz Message-ID: Chris Muller uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-cmm.663.mcz ==================== Summary ==================== Name: Collections-cmm.663 Author: cmm Time: 8 October 2015, 10:19:13.283 am UUID: 8e6500e4-15d6-43a8-8b85-0c8cb36f5a82 Ancestors: Collections-mt.657 >From Tobias: Make Text more polymorphic with String. =============== Diff against Collections-mt.657 =============== Item was added: + ----- Method: Text>>hashWithInitialHash: (in category 'comparing') ----- + hashWithInitialHash: initialHash + "Implemented to be polymorphic with String" + ^ self string hashWithInitialHash: initialHash + ! From commits at source.squeak.org Thu Oct 8 18:18:09 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:18:11 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.1.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.1.mcz ==================== Summary ==================== Name: 51Deprecated-topa.1 Author: topa Time: 8 October 2015, 8:18:03.841 pm UUID: 91f96200-85cc-4a4e-bd2c-86fba655eb6d Ancestors: 50Deprecated-eem.1 Start 5.1 deprecation process =============== Diff against 50Deprecated-eem.1 =============== Item was changed: + ----- Method: Dictionary>>fasterKeys (in category '*51deprecated-accessing') ----- - ----- Method: Dictionary>>fasterKeys (in category '*50Deprecated-accessing') ----- fasterKeys "Contrary to old version of #keys, this method returned an Array rather than a Set. This was faster because no lookup: was performed. But now, #keys also return an Array, so don't use #fasterKeys anymore." self deprecated: 'use #keys'. ^self keys. ! Item was changed: + ----- Method: Dictionary>>keyForIdentity: (in category '*51deprecated-accessing') ----- - ----- Method: Dictionary>>keyForIdentity: (in category '*50Deprecated-accessing') ----- keyForIdentity: anObject "If anObject is one of the values of the receive, return its key, else return nil. Contrast #keyAtValue: in which there is only an equality check, here there is an identity check" self deprecated: 'Use #keyAtIdentityValue:ifAbsent:'. ^self keyAtIdentityValue: anObject ifAbsent: nil! From commits at source.squeak.org Thu Oct 8 18:25:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:25:05 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.2.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.2.mcz ==================== Summary ==================== Name: 51Deprecated-topa.2 Author: topa Time: 8 October 2015, 8:24:57.392 pm UUID: 39a6dda9-4053-4241-81d8-0b49f0791385 Ancestors: 51Deprecated-topa.1 Deprecate #nextPutKeyword:withArg: as alternate syntax is unsupported since at least 4.0 =============== Diff against 51Deprecated-topa.1 =============== Item was added: + ----- Method: WriteStream>>nextPutKeyword:withArg: (in category '*51Deprecated-character writing') ----- + nextPutKeyword: keyword withArg: argValue + "Emit a keyword/value pair in the alternate syntax" + + self nextPutAll: (keyword copyWithout: $:); + nextPut: $(; + store: argValue; + nextPut: $)! From commits at source.squeak.org Thu Oct 8 18:25:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:25:49 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.3.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.3.mcz ==================== Summary ==================== Name: 51Deprecated-topa.3 Author: topa Time: 8 October 2015, 8:25:42.498 pm UUID: 1fdef080-96b5-4db2-bf16-bef5d910bec1 Ancestors: 51Deprecated-topa.2 Deprecate oldBack =============== Diff against 51Deprecated-topa.2 =============== Item was added: + ----- Method: PositionableStream>>oldBack (in category '*51Deprecated-accessing') ----- + oldBack + "Go back one element and return it. Use indirect messages in case I am a StandardFileStream" + "The method is a misconception about what a stream is. A stream contains a pointer *between* elements with past and future elements. This method considers that the pointer is *on* an element. Please consider unit tests which verifies #back and #oldBack behavior. (Damien Cassou - 1 August 2007)" + self position = 0 ifTrue: [self errorCantGoBack]. + self position = 1 ifTrue: [self position: 0. ^ nil]. + self skip: -2. + ^ self next + ! From commits at source.squeak.org Thu Oct 8 18:27:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:27:13 2015 Subject: [squeak-dev] The Trunk: Collections-topa.664.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.664.mcz ==================== Summary ==================== Name: Collections-topa.664 Author: topa Time: 8 October 2015, 8:26:53.881 pm UUID: 4a54b921-445f-4539-81df-137d1f575110 Ancestors: Collections-topa.662, Collections-cmm.663 Deprecated nextPutKeyword:withArg: and oldBack =============== Diff against Collections-cmm.663 =============== Item was removed: - ----- Method: PositionableStream>>oldBack (in category 'accessing') ----- - oldBack - "Go back one element and return it. Use indirect messages in case I am a StandardFileStream" - "The method is a misconception about what a stream is. A stream contains a pointer *between* elements with past and future elements. This method considers that the pointer is *on* an element. Please consider unit tests which verifies #back and #oldBack behavior. (Damien Cassou - 1 August 2007)" - self position = 0 ifTrue: [self errorCantGoBack]. - self position = 1 ifTrue: [self position: 0. ^ nil]. - self skip: -2. - ^ self next - ! Item was removed: - ----- Method: WriteStream>>nextPutKeyword:withArg: (in category 'character writing') ----- - nextPutKeyword: keyword withArg: argValue - "Emit a keyword/value pair in the alternate syntax" - - self nextPutAll: (keyword copyWithout: $:); - nextPut: $(; - store: argValue; - nextPut: $)! From commits at source.squeak.org Thu Oct 8 18:27:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:27:57 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-topa.252.mcz Message-ID: Tobias Pape uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-topa.252.mcz ==================== Summary ==================== Name: CollectionsTests-topa.252 Author: topa Time: 8 October 2015, 8:27:42.482 pm UUID: ee8b552d-d0f2-4d95-898f-e74dc84aab3f Ancestors: CollectionsTests-eem.251 oldBack is deprecated, remove tests =============== Diff against CollectionsTests-eem.251 =============== Item was removed: - ----- Method: ReadStreamTest>>testOldBack (in category 'tests - back') ----- - testOldBack - "Test the old behavior of the method back. The method #oldBack is a misconception about what a stream is. A stream contains a pointer *between* elements with past and future elements. The method #oldBack considers that the pointer is *on* an element. (Damien Cassou - 1 August 2007)" - |stream| - stream := self streamOn: 'abc'. - stream next: 2. - self assert: stream oldBack = $a.! Item was removed: - ----- Method: ReadStreamTest>>testOldBackOnPosition1 (in category 'tests - back') ----- - testOldBackOnPosition1 - "Test the old behavior of the method back. The method #oldBack is a misconception about what a stream is. A stream contains a pointer *between* elements with past and future elements. The method #oldBack considers that the pointer is *on* an element. (Damien Cassou - 1 August 2007)" - |stream| - stream := self streamOn: 'abc'. - stream next. - self assert: stream oldBack = nil.! From commits at source.squeak.org Thu Oct 8 18:33:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:34:00 2015 Subject: [squeak-dev] The Trunk: Collections-topa.665.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.665.mcz ==================== Summary ==================== Name: Collections-topa.665 Author: topa Time: 8 October 2015, 8:33:41.622 pm UUID: 4ec6165c-480c-483d-bce3-ca38e3a71e10 Ancestors: Collections-topa.664 #oldBack is deprecated, inline it into its sole sender. =============== Diff against Collections-topa.664 =============== Item was changed: ----- Method: PositionableStream>>peekBack (in category 'accessing') ----- peekBack "Return the element at the previous position, without changing position. Use indirect messages in case self is a StandardFileStream." | element | + self position = 0 ifTrue: [self errorCantGoBack]. + self position = 1 ifTrue: [self position: 0. ^ nil]. + self skip: -2. + element := self next. - element := self oldBack. self skip: 1. ^ element! From commits at source.squeak.org Thu Oct 8 18:46:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:46:08 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.958.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.958.mcz ==================== Summary ==================== Name: Kernel-topa.958 Author: topa Time: 8 October 2015, 8:45:43 pm UUID: b5dcf2e4-db27-445f-8d24-aafbedcf1177 Ancestors: Kernel-topa.957 Allow simple, message-less deprecations =============== Diff against Kernel-topa.957 =============== Item was changed: ----- Method: Deprecation class>>maybeSignalDeprecationFor:message:explanation: (in category 'utilities') ----- maybeSignalDeprecationFor: context message: messageString explanation: explanationString + self showDeprecationWarnings ifTrue: + [ | message | + message := context method reference, ' has been deprecated', messageString, '.'. + explanationString ifNotEmpty: [message := message, ' ', explanationString]. + self signal: message].! - ShowDeprecationWarnings == true ifTrue: - [self signal: context method reference, ' has been deprecated', messageString, '. ', explanationString]! Item was added: + ----- Method: Object>>deprecated (in category 'error handling') ----- + deprecated + "Warn that the sending method has been deprecated." + + Deprecation + maybeSignalDeprecationFor: thisContext sender + message: '' + explanation: ''! From commits at source.squeak.org Thu Oct 8 18:47:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:47:59 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.4.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.4.mcz ==================== Summary ==================== Name: 51Deprecated-topa.4 Author: topa Time: 8 October 2015, 8:47:52.375 pm UUID: b425da42-7d61-4376-abd3-dc4be651bacc Ancestors: 51Deprecated-topa.3 Mark deprecated messages as such =============== Diff against 51Deprecated-topa.3 =============== Item was changed: ----- Method: PositionableStream>>oldBack (in category '*51Deprecated-accessing') ----- oldBack "Go back one element and return it. Use indirect messages in case I am a StandardFileStream" "The method is a misconception about what a stream is. A stream contains a pointer *between* elements with past and future elements. This method considers that the pointer is *on* an element. Please consider unit tests which verifies #back and #oldBack behavior. (Damien Cassou - 1 August 2007)" + self deprecated: 'Use #back'. self position = 0 ifTrue: [self errorCantGoBack]. self position = 1 ifTrue: [self position: 0. ^ nil]. self skip: -2. ^ self next ! Item was changed: ----- Method: WriteStream>>nextPutKeyword:withArg: (in category '*51Deprecated-character writing') ----- nextPutKeyword: keyword withArg: argValue "Emit a keyword/value pair in the alternate syntax" + self deprecated. - self nextPutAll: (keyword copyWithout: $:); nextPut: $(; store: argValue; nextPut: $)! From commits at source.squeak.org Thu Oct 8 18:53:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:53:05 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.5.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.5.mcz ==================== Summary ==================== Name: 51Deprecated-topa.5 Author: topa Time: 8 October 2015, 8:52:58.154 pm UUID: 568871f9-a278-4917-9499-41dd92bdf907 Ancestors: 51Deprecated-topa.4 Move already deprecated messages to their penultimate place =============== Diff against 51Deprecated-topa.4 =============== Item was added: + ----- Method: Preferences class>>allPreferenceObjects (in category '*51Deprecated-accessing') ----- + allPreferenceObjects + "Answer a list of all the Preference objects registered in the system" + + self deprecated: 'Use #allPreferences since all preferences are objects.'. + ^ self allPreferences! Item was added: + ----- Method: Preferences class>>togglePreference: (in category '*51Deprecated-get/set - flags') ----- + togglePreference: flagName + + self deprecated: 'Use #toggle:'. + ^ self toggle: flagName.! From commits at source.squeak.org Thu Oct 8 18:54:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:54:33 2015 Subject: [squeak-dev] The Trunk: System-topa.768.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.768.mcz ==================== Summary ==================== Name: System-topa.768 Author: topa Time: 8 October 2015, 8:54:09.526 pm UUID: c497170d-2814-4515-9d7d-53f4c4dbe4bf Ancestors: System-topa.767 Move already deprecated messages to their penultimate place (Preferences) =============== Diff against System-topa.767 =============== Item was removed: - ----- Method: Preferences class>>allPreferenceObjects (in category 'accessing') ----- - allPreferenceObjects - "Answer a list of all the Preference objects registered in the system" - - self flag: #deprecated. "mt: Use #allPreferences since all preferences are objects." - ^ self allPreferences! Item was removed: - ----- Method: Preferences class>>togglePreference: (in category 'get/set - flags') ----- - togglePreference: flagName - - self flag: #deprecated. - ^ self toggle: flagName.! From commits at source.squeak.org Thu Oct 8 18:58:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 18:58:24 2015 Subject: [squeak-dev] The Trunk: 46Deprecated-topa.5.mcz Message-ID: Tobias Pape uploaded a new version of 46Deprecated to project The Trunk: http://source.squeak.org/trunk/46Deprecated-topa.5.mcz ==================== Summary ==================== Name: 46Deprecated-topa.5 Author: topa Time: 8 October 2015, 8:58:18.593 pm UUID: a5f4bd53-cb71-4500-9605-60c6fa9d7002 Ancestors: 46Deprecated-dtl.4 Use Object>>#deprecated to singal a warning if desired. =============== Diff against 46Deprecated-dtl.4 =============== Item was changed: ----- Method: ScrollPane>>alwaysShowHScrollBar: (in category '*46Deprecated') ----- alwaysShowHScrollBar: bool + self deprecated. - self flag: #deprecated. self setProperty: #hScrollBarAlways toValue: bool. bool ifTrue: [self hScrollBarPolicy: #always] ifFalse: [self hScrollBarPolicy: #whenNeeded]. self hHideOrShowScrollBar. ! Item was changed: ----- Method: ScrollPane>>alwaysShowScrollBars: (in category '*46Deprecated') ----- alwaysShowScrollBars: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self alwaysShowHScrollBar: bool; alwaysShowVScrollBar: bool. ! Item was changed: ----- Method: ScrollPane>>alwaysShowVScrollBar: (in category '*46Deprecated') ----- alwaysShowVScrollBar: bool + self deprecated. - self flag: #deprecated. self setProperty: #vScrollBarAlways toValue: bool. bool ifTrue: [self vScrollBarPolicy: #always] ifFalse: [self vScrollBarPolicy: #whenNeeded]. self vHideOrShowScrollBar. ! Item was changed: ----- Method: ScrollPane>>hideHScrollBarIndefinitely: (in category '*46Deprecated') ----- hideHScrollBarIndefinitely: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self setProperty: #noHScrollBarPlease toValue: bool. bool ifTrue: [self hScrollBarPolicy: #never] ifFalse: [self hScrollBarPolicy: #whenNeeded]. self hHideOrShowScrollBar. ! Item was changed: ----- Method: ScrollPane>>hideScrollBarsIndefinitely: (in category '*46Deprecated') ----- hideScrollBarsIndefinitely: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self hideVScrollBarIndefinitely: bool. self hideHScrollBarIndefinitely: bool. ! Item was changed: ----- Method: ScrollPane>>hideVScrollBarIndefinitely: (in category '*46Deprecated') ----- hideVScrollBarIndefinitely: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self setProperty: #noVScrollBarPlease toValue: bool. bool ifTrue: [self vScrollBarPolicy: #never] ifFalse: [self vScrollBarPolicy: #whenNeeded]. self vHideOrShowScrollBar. ! Item was changed: ----- Method: ScrollPane>>showHScrollBarOnlyWhenNeeded: (in category '*46Deprecated') ----- showHScrollBarOnlyWhenNeeded: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self setProperty: #noHScrollBarPlease toValue: bool not. self setProperty: #hScrollBarAlways toValue: bool not. bool ifTrue: [self hScrollBarPolicy: #whenNeeded] ifFalse: [self hScrollBarPolicy: #never]. self hHideOrShowScrollBar. ! Item was changed: ----- Method: ScrollPane>>showScrollBarsOnlyWhenNeeded: (in category '*46Deprecated') ----- showScrollBarsOnlyWhenNeeded: bool + self deprecated. - self flag: #deprecated. self showHScrollBarOnlyWhenNeeded: bool. self showVScrollBarOnlyWhenNeeded: bool. ! Item was changed: ----- Method: ScrollPane>>showVScrollBarOnlyWhenNeeded: (in category '*46Deprecated') ----- showVScrollBarOnlyWhenNeeded: bool "Get rid of scroll bar for short panes that don't want it shown." + self deprecated. - self flag: #deprecated. self setProperty: #noVScrollBarPlease toValue: bool not. self setProperty: #vScrollBarAlways toValue: bool not. bool ifTrue: [self vScrollBarPolicy: #whenNeeded] ifFalse: [self vScrollBarPolicy: #never]. self vHideOrShowScrollBar. ! From commits at source.squeak.org Thu Oct 8 19:00:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:00:52 2015 Subject: [squeak-dev] The Trunk: Collections-topa.666.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.666.mcz ==================== Summary ==================== Name: Collections-topa.666 Author: topa Time: 8 October 2015, 9:00:08.857 pm UUID: 44cc0ebe-d308-40f6-80eb-c98ad30ab6b6 Ancestors: Collections-topa.665 Move already deprecated messages to their penultimate place (KeyedSet) =============== Diff against Collections-topa.665 =============== Item was removed: - ----- Method: KeyedSet>>noCheckAdd: (in category 'private') ----- - noCheckAdd: anObject - - self deprecated: 'This method should not be used anymore.'. - array at: (self scanFor: (keyBlock value: anObject)) put: anObject asSetElement. - tally := tally + 1! From commits at source.squeak.org Thu Oct 8 19:01:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:01:32 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.6.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.6.mcz ==================== Summary ==================== Name: 51Deprecated-topa.6 Author: topa Time: 8 October 2015, 9:01:20.654 pm UUID: 5a4c6b5f-7b3d-4b8b-899a-ec32acaf46e1 Ancestors: 51Deprecated-topa.5 Move already deprecated messages to their penultimate place =============== Diff against 51Deprecated-topa.5 =============== Item was added: + ----- Method: KeyedSet>>noCheckAdd: (in category '*51Deprecated-private') ----- + noCheckAdd: anObject + + self deprecated: 'This method should not be used anymore.'. + array at: (self scanFor: (keyBlock value: anObject)) put: anObject asSetElement. + tally := tally + 1! From commits at source.squeak.org Thu Oct 8 19:03:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:03:45 2015 Subject: [squeak-dev] The Trunk: Tools-topa.637.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.637.mcz ==================== Summary ==================== Name: Tools-topa.637 Author: topa Time: 8 October 2015, 9:03:22.934 pm UUID: 993853cb-d0d2-4676-902c-365536c950da Ancestors: Tools-topa.636 Marcel is curious whether ObjectExplorer>>#selector is ever called. Let's find out. =============== Diff against Tools-topa.636 =============== Item was changed: ----- Method: ObjectExplorer>>selector (in category 'accessing - other') ----- selector + self isThisEverCalled. self flag: #deprecated. "mt: Who uses this? And why?" self parentObject ifNil: [^ nil]. (self parentObject class allInstVarNames includes: self currentSelection key) ifTrue: [^ self currentSelection key asSymbol]. ^ nil! From Das.Linux at gmx.de Thu Oct 8 19:06:14 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 8 19:06:18 2015 Subject: [squeak-dev] Let's do it: deprecation Message-ID: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> Hi all so, there are now 5 Deprecation packages in the image, for 3.9, 3.11, 4.5, 4.6, and 5.1. I'd say, lets a) get rid of the 3.9 and 3.11 ones now, and b) get rid of the 4.5 one after releasing 5.1 and c) get rid of the 4.6 one after releasing 5.2 and d) get rid of the 5.1 one after releasing 5.3 and so on. So, how would we achieve a)? a Script to the Squeak-Version package? Best regards -Tobias From commits at source.squeak.org Thu Oct 8 19:08:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:08:45 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.7.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.7.mcz ==================== Summary ==================== Name: 51Deprecated-topa.7 Author: topa Time: 8 October 2015, 9:08:38.419 pm UUID: 5fc62021-4fc8-4765-b5ac-c6b1c4829ab6 Ancestors: 51Deprecated-topa.6 Deprecate CrLfFileStream (see CrLfFileStream class>>#new) =============== Diff against 51Deprecated-topa.6 =============== Item was added: + SystemOrganization addCategory: #'51Deprecated'! Item was added: + StandardFileStream subclass: #CrLfFileStream + instanceVariableNames: 'lineEndConvention' + classVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount' + poolDictionaries: '' + category: '51Deprecated'! + + !CrLfFileStream commentStamp: 'ul 12/26/2010 03:13' prior: 0! + This class is now obsolete, use MultiByteFileStream instead. + + I am the same as a regular file stream, except that when I am in text mode, I will automatically convert line endings between the underlying platform's convention, and Squeak's convention of carriage-return only. The goal is that Squeak text files can be treated as OS text files, and vice versa. + + In binary mode, I behave identically to a StandardFileStream. + + To enable CrLfFileStream as the default file stream class for an entire image, modify FileStream class concreteStream . + + + There are two caveats on programming with CrLfFileStream. + + First, the choice of text mode versus binary mode affects which characters are visible in Squeak, and no longer just affects whether those characters are returned as Character's or as Integer's. Thus the choice of mode needs to be made very carefully, and must be based on intent instead of convenience of representation. The methods asString, asByteArray, asCharacter, and asInteger can be used to convert between character and integer representations. (Arguably, file streams should accept either strings or characters in nextPut: and nextPutAll:, but that is not the case right now.) + + Second, arithmetic on positions no longer works, because one character that Squeak sees (carriage return) could map to two characters in the underlying file (carriage return plus line feed, on MS Windows and MS DOS). Comparison between positions still works. (This caveat could perhaps be fixed by maintaining a map between Squeak positions and positions in the underlying file, but it is complicated. Consider, for example, updates to the middle of the file. Also, consider that text files are rarely updated in the middle of the file, and that general random access to a text file is rarely very useful. If general random access with specific file counts is desired, then the file is starting to sound like a binary file instead of a text file.) + + ! Item was added: + ----- Method: CrLfFileStream class>>defaultToCR (in category 'class initialization') ----- + defaultToCR + "CrLfFileStream defaultToCR" + LineEndDefault := #cr.! Item was added: + ----- Method: CrLfFileStream class>>defaultToCRLF (in category 'class initialization') ----- + defaultToCRLF + "CrLfFileStream defaultToCRLF" + LineEndDefault := #crlf.! Item was added: + ----- Method: CrLfFileStream class>>defaultToLF (in category 'class initialization') ----- + defaultToLF + "CrLfFileStream defaultToLF" + LineEndDefault := #lf.! Item was added: + ----- Method: CrLfFileStream class>>guessDefaultLineEndConvention (in category 'class initialization') ----- + guessDefaultLineEndConvention + "Lets try to guess the line end convention from what we know about the + path name delimiter from FileDirectory." + FileDirectory pathNameDelimiter = $: + ifTrue: [^ self defaultToCR]. + FileDirectory pathNameDelimiter = $/ + ifTrue: [((Smalltalk osVersion) beginsWith: 'darwin') + ifTrue: [^ self defaultToCR] + ifFalse: [^ self defaultToLF]]. + FileDirectory pathNameDelimiter = $\ + ifTrue: [^ self defaultToCRLF]. + "in case we don't know" + ^ self defaultToCR! Item was added: + ----- Method: CrLfFileStream class>>initialize (in category 'class initialization') ----- + initialize + "CrLfFileStream initialize" + Cr := Character cr. + Lf := Character lf. + CrLf := String with: Cr with: Lf. + LineEndStrings := Dictionary new. + LineEndStrings at: #cr put: (String with: Character cr). + LineEndStrings at: #lf put: (String with: Character lf). + LineEndStrings at: #crlf put: (String with: Character cr with: Character lf). + LookAheadCount := 2048. + Smalltalk addToStartUpList: self. + self startUp.! Item was added: + ----- Method: CrLfFileStream class>>new (in category 'class initialization') ----- + new + + self deprecated: 'This class is now obsolete, use MultiByteFileStream instead.'. + ^ (MultiByteFileStream new ascii) wantsLineEndConversion: true; yourself. + + ! Item was added: + ----- Method: CrLfFileStream class>>startUp (in category 'class initialization') ----- + startUp + self guessDefaultLineEndConvention! Item was added: + ----- Method: CrLfFileStream>>ascii (in category 'access') ----- + ascii + super ascii. + self detectLineEndConvention! Item was added: + ----- Method: CrLfFileStream>>binary (in category 'access') ----- + binary + super binary. + lineEndConvention := nil! Item was added: + ----- Method: CrLfFileStream>>convertStringFromCr: (in category 'private') ----- + convertStringFromCr: aString + | inStream outStream | + lineEndConvention ifNil: [^ aString]. + lineEndConvention == #cr ifTrue: [^ aString]. + lineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Cr with: Lf]. + "lineEndConvention == #crlf" + inStream := ReadStream on: aString. + outStream := WriteStream on: (String new: aString size). + [inStream atEnd] + whileFalse: + [outStream nextPutAll: (inStream upTo: Cr). + (inStream atEnd not or: [aString last = Cr]) + ifTrue: [outStream nextPutAll: CrLf]]. + ^ outStream contents! Item was added: + ----- Method: CrLfFileStream>>convertStringToCr: (in category 'private') ----- + convertStringToCr: aString + | inStream outStream | + lineEndConvention ifNil: [^ aString]. + lineEndConvention == #cr ifTrue: [^ aString]. + lineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Lf with: Cr]. + "lineEndConvention == #crlf" + inStream := ReadStream on: aString. + outStream := WriteStream on: (String new: aString size). + [inStream atEnd] + whileFalse: + [outStream nextPutAll: (inStream upTo: Cr). + (inStream atEnd not or: [aString last = Cr]) + ifTrue: + [outStream nextPut: Cr. + inStream peek = Lf ifTrue: [inStream next]]]. + ^ outStream contents! Item was added: + ----- Method: CrLfFileStream>>detectLineEndConvention (in category 'access') ----- + detectLineEndConvention + "Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf." + | char numRead pos | + self isBinary ifTrue: [^ self error: 'Line end conventions are not used on binary streams']. + lineEndConvention := LineEndDefault. + "Default if nothing else found" + numRead := 0. + pos := super position. + [super atEnd not and: [numRead < LookAheadCount]] + whileTrue: + [char := super next. + char = Lf + ifTrue: + [super position: pos. + ^ lineEndConvention := #lf]. + char = Cr + ifTrue: + [super peek = Lf + ifTrue: [lineEndConvention := #crlf] + ifFalse: [lineEndConvention := #cr]. + super position: pos. + ^ lineEndConvention]. + numRead := numRead + 1]. + super position: pos. + ^ lineEndConvention! Item was added: + ----- Method: CrLfFileStream>>lineEndConvention (in category 'access') ----- + lineEndConvention + + ^lineEndConvention! Item was added: + ----- Method: CrLfFileStream>>next (in category 'access') ----- + next + | char secondChar | + char := super next. + self isBinary ifTrue: [^char]. + char == Cr ifTrue: + [secondChar := super next. + secondChar ifNotNil: [secondChar == Lf ifFalse: [self skip: -1]]. + ^Cr]. + char == Lf ifTrue: [^Cr]. + ^char! Item was added: + ----- Method: CrLfFileStream>>next: (in category 'access') ----- + next: n + + | string peekChar | + string := super next: n. + string size = 0 ifTrue: [ ^string ]. + self isBinary ifTrue: [ ^string ]. + + "if we just read a CR, and the next character is an LF, then skip the LF" + ( string last = Character cr ) ifTrue: [ + peekChar := super next. "super peek doesn't work because it relies on #next" + peekChar ~= Character lf ifTrue: [ + super position: (super position - 1) ]. ]. + + string := string withSqueakLineEndings. + + string size = n ifTrue: [ ^string ]. + + "string shrunk due to embedded crlfs; make up the difference" + ^string, (self next: n - string size)! Item was added: + ----- Method: CrLfFileStream>>nextPut: (in category 'access') ----- + nextPut: char + (lineEndConvention notNil and: [char = Cr]) + ifTrue: [super nextPutAll: (LineEndStrings at: lineEndConvention)] + ifFalse: [super nextPut: char]. + ^ char! Item was added: + ----- Method: CrLfFileStream>>nextPutAll: (in category 'access') ----- + nextPutAll: aString + super nextPutAll: (self convertStringFromCr: aString). + ^ aString + ! Item was added: + ----- Method: CrLfFileStream>>open:forWrite: (in category 'open/close') ----- + open: aFileName forWrite: writeMode + "Open the receiver. If writeMode is true, allow write, else access will be + read-only. " + | result | + result := super open: aFileName forWrite: writeMode. + result ifNotNil: [self detectLineEndConvention]. + ^ result! Item was added: + ----- Method: CrLfFileStream>>peek (in category 'access') ----- + peek + "Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil. " + | next pos | + self atEnd ifTrue: [^ nil]. + pos := self position. + next := self next. + self position: pos. + ^ next! Item was added: + ----- Method: CrLfFileStream>>upTo: (in category 'access') ----- + upTo: aCharacter + | newStream char | + newStream := WriteStream on: (String new: 100). + [(char := self next) isNil or: [char == aCharacter]] + whileFalse: [newStream nextPut: char]. + ^ newStream contents + ! Item was added: + ----- Method: CrLfFileStream>>upToAnyOf:do: (in category 'access') ----- + upToAnyOf: delimiters do: aBlock + + ^String new: 1000 streamContents: [ :stream | + | ch | + [ (ch := self next) == nil or: [ (delimiters includes: ch) and: [aBlock value: ch. true] ] ] + whileFalse: [ stream nextPut: ch ] ]! Item was added: + ----- Method: CrLfFileStream>>verbatim: (in category 'access') ----- + verbatim: aString + super verbatim: (self convertStringFromCr: aString). + ^ aString! From commits at source.squeak.org Thu Oct 8 19:10:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:10:12 2015 Subject: [squeak-dev] The Trunk: Files-topa.146.mcz Message-ID: Tobias Pape uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-topa.146.mcz ==================== Summary ==================== Name: Files-topa.146 Author: topa Time: 8 October 2015, 9:10:00.604 pm UUID: c0933530-a77b-4266-9c56-3d984ede0bad Ancestors: Files-mt.145 Deprecate CrLfFileStream (see CrLfFileStream class>>#new) =============== Diff against Files-mt.145 =============== Item was removed: - StandardFileStream subclass: #CrLfFileStream - instanceVariableNames: 'lineEndConvention' - classVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount' - poolDictionaries: '' - category: 'Files-Kernel'! - - !CrLfFileStream commentStamp: 'ul 12/26/2010 03:13' prior: 0! - This class is now obsolete, use MultiByteFileStream instead. - - I am the same as a regular file stream, except that when I am in text mode, I will automatically convert line endings between the underlying platform's convention, and Squeak's convention of carriage-return only. The goal is that Squeak text files can be treated as OS text files, and vice versa. - - In binary mode, I behave identically to a StandardFileStream. - - To enable CrLfFileStream as the default file stream class for an entire image, modify FileStream class concreteStream . - - - There are two caveats on programming with CrLfFileStream. - - First, the choice of text mode versus binary mode affects which characters are visible in Squeak, and no longer just affects whether those characters are returned as Character's or as Integer's. Thus the choice of mode needs to be made very carefully, and must be based on intent instead of convenience of representation. The methods asString, asByteArray, asCharacter, and asInteger can be used to convert between character and integer representations. (Arguably, file streams should accept either strings or characters in nextPut: and nextPutAll:, but that is not the case right now.) - - Second, arithmetic on positions no longer works, because one character that Squeak sees (carriage return) could map to two characters in the underlying file (carriage return plus line feed, on MS Windows and MS DOS). Comparison between positions still works. (This caveat could perhaps be fixed by maintaining a map between Squeak positions and positions in the underlying file, but it is complicated. Consider, for example, updates to the middle of the file. Also, consider that text files are rarely updated in the middle of the file, and that general random access to a text file is rarely very useful. If general random access with specific file counts is desired, then the file is starting to sound like a binary file instead of a text file.) - - ! Item was removed: - ----- Method: CrLfFileStream class>>defaultToCR (in category 'class initialization') ----- - defaultToCR - "CrLfFileStream defaultToCR" - LineEndDefault := #cr.! Item was removed: - ----- Method: CrLfFileStream class>>defaultToCRLF (in category 'class initialization') ----- - defaultToCRLF - "CrLfFileStream defaultToCRLF" - LineEndDefault := #crlf.! Item was removed: - ----- Method: CrLfFileStream class>>defaultToLF (in category 'class initialization') ----- - defaultToLF - "CrLfFileStream defaultToLF" - LineEndDefault := #lf.! Item was removed: - ----- Method: CrLfFileStream class>>guessDefaultLineEndConvention (in category 'class initialization') ----- - guessDefaultLineEndConvention - "Lets try to guess the line end convention from what we know about the - path name delimiter from FileDirectory." - FileDirectory pathNameDelimiter = $: - ifTrue: [^ self defaultToCR]. - FileDirectory pathNameDelimiter = $/ - ifTrue: [((Smalltalk osVersion) beginsWith: 'darwin') - ifTrue: [^ self defaultToCR] - ifFalse: [^ self defaultToLF]]. - FileDirectory pathNameDelimiter = $\ - ifTrue: [^ self defaultToCRLF]. - "in case we don't know" - ^ self defaultToCR! Item was removed: - ----- Method: CrLfFileStream class>>initialize (in category 'class initialization') ----- - initialize - "CrLfFileStream initialize" - Cr := Character cr. - Lf := Character lf. - CrLf := String with: Cr with: Lf. - LineEndStrings := Dictionary new. - LineEndStrings at: #cr put: (String with: Character cr). - LineEndStrings at: #lf put: (String with: Character lf). - LineEndStrings at: #crlf put: (String with: Character cr with: Character lf). - LookAheadCount := 2048. - Smalltalk addToStartUpList: self. - self startUp.! Item was removed: - ----- Method: CrLfFileStream class>>new (in category 'class initialization') ----- - new - - self deprecated: 'This class is now obsolete, use MultiByteFileStream instead.'. - ^ (MultiByteFileStream new ascii) wantsLineEndConversion: true; yourself. - - ! Item was removed: - ----- Method: CrLfFileStream class>>startUp (in category 'class initialization') ----- - startUp - self guessDefaultLineEndConvention! Item was removed: - ----- Method: CrLfFileStream>>ascii (in category 'access') ----- - ascii - super ascii. - self detectLineEndConvention! Item was removed: - ----- Method: CrLfFileStream>>binary (in category 'access') ----- - binary - super binary. - lineEndConvention := nil! Item was removed: - ----- Method: CrLfFileStream>>convertStringFromCr: (in category 'private') ----- - convertStringFromCr: aString - | inStream outStream | - lineEndConvention ifNil: [^ aString]. - lineEndConvention == #cr ifTrue: [^ aString]. - lineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Cr with: Lf]. - "lineEndConvention == #crlf" - inStream := ReadStream on: aString. - outStream := WriteStream on: (String new: aString size). - [inStream atEnd] - whileFalse: - [outStream nextPutAll: (inStream upTo: Cr). - (inStream atEnd not or: [aString last = Cr]) - ifTrue: [outStream nextPutAll: CrLf]]. - ^ outStream contents! Item was removed: - ----- Method: CrLfFileStream>>convertStringToCr: (in category 'private') ----- - convertStringToCr: aString - | inStream outStream | - lineEndConvention ifNil: [^ aString]. - lineEndConvention == #cr ifTrue: [^ aString]. - lineEndConvention == #lf ifTrue: [^ aString copy replaceAll: Lf with: Cr]. - "lineEndConvention == #crlf" - inStream := ReadStream on: aString. - outStream := WriteStream on: (String new: aString size). - [inStream atEnd] - whileFalse: - [outStream nextPutAll: (inStream upTo: Cr). - (inStream atEnd not or: [aString last = Cr]) - ifTrue: - [outStream nextPut: Cr. - inStream peek = Lf ifTrue: [inStream next]]]. - ^ outStream contents! Item was removed: - ----- Method: CrLfFileStream>>detectLineEndConvention (in category 'access') ----- - detectLineEndConvention - "Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf." - | char numRead pos | - self isBinary ifTrue: [^ self error: 'Line end conventions are not used on binary streams']. - lineEndConvention := LineEndDefault. - "Default if nothing else found" - numRead := 0. - pos := super position. - [super atEnd not and: [numRead < LookAheadCount]] - whileTrue: - [char := super next. - char = Lf - ifTrue: - [super position: pos. - ^ lineEndConvention := #lf]. - char = Cr - ifTrue: - [super peek = Lf - ifTrue: [lineEndConvention := #crlf] - ifFalse: [lineEndConvention := #cr]. - super position: pos. - ^ lineEndConvention]. - numRead := numRead + 1]. - super position: pos. - ^ lineEndConvention! Item was removed: - ----- Method: CrLfFileStream>>lineEndConvention (in category 'access') ----- - lineEndConvention - - ^lineEndConvention! Item was removed: - ----- Method: CrLfFileStream>>next (in category 'access') ----- - next - | char secondChar | - char := super next. - self isBinary ifTrue: [^char]. - char == Cr ifTrue: - [secondChar := super next. - secondChar ifNotNil: [secondChar == Lf ifFalse: [self skip: -1]]. - ^Cr]. - char == Lf ifTrue: [^Cr]. - ^char! Item was removed: - ----- Method: CrLfFileStream>>next: (in category 'access') ----- - next: n - - | string peekChar | - string := super next: n. - string size = 0 ifTrue: [ ^string ]. - self isBinary ifTrue: [ ^string ]. - - "if we just read a CR, and the next character is an LF, then skip the LF" - ( string last = Character cr ) ifTrue: [ - peekChar := super next. "super peek doesn't work because it relies on #next" - peekChar ~= Character lf ifTrue: [ - super position: (super position - 1) ]. ]. - - string := string withSqueakLineEndings. - - string size = n ifTrue: [ ^string ]. - - "string shrunk due to embedded crlfs; make up the difference" - ^string, (self next: n - string size)! Item was removed: - ----- Method: CrLfFileStream>>nextPut: (in category 'access') ----- - nextPut: char - (lineEndConvention notNil and: [char = Cr]) - ifTrue: [super nextPutAll: (LineEndStrings at: lineEndConvention)] - ifFalse: [super nextPut: char]. - ^ char! Item was removed: - ----- Method: CrLfFileStream>>nextPutAll: (in category 'access') ----- - nextPutAll: aString - super nextPutAll: (self convertStringFromCr: aString). - ^ aString - ! Item was removed: - ----- Method: CrLfFileStream>>open:forWrite: (in category 'open/close') ----- - open: aFileName forWrite: writeMode - "Open the receiver. If writeMode is true, allow write, else access will be - read-only. " - | result | - result := super open: aFileName forWrite: writeMode. - result ifNotNil: [self detectLineEndConvention]. - ^ result! Item was removed: - ----- Method: CrLfFileStream>>peek (in category 'access') ----- - peek - "Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil. " - | next pos | - self atEnd ifTrue: [^ nil]. - pos := self position. - next := self next. - self position: pos. - ^ next! Item was removed: - ----- Method: CrLfFileStream>>upTo: (in category 'access') ----- - upTo: aCharacter - | newStream char | - newStream := WriteStream on: (String new: 100). - [(char := self next) isNil or: [char == aCharacter]] - whileFalse: [newStream nextPut: char]. - ^ newStream contents - ! Item was removed: - ----- Method: CrLfFileStream>>upToAnyOf:do: (in category 'access') ----- - upToAnyOf: delimiters do: aBlock - - ^String new: 1000 streamContents: [ :stream | - | ch | - [ (ch := self next) == nil or: [ (delimiters includes: ch) and: [aBlock value: ch. true] ] ] - whileFalse: [ stream nextPut: ch ] ]! Item was removed: - ----- Method: CrLfFileStream>>verbatim: (in category 'access') ----- - verbatim: aString - super verbatim: (self convertStringFromCr: aString). - ^ aString! From commits at source.squeak.org Thu Oct 8 19:11:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:11:13 2015 Subject: [squeak-dev] The Trunk: 51Deprecated-topa.8.mcz Message-ID: Tobias Pape uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-topa.8.mcz ==================== Summary ==================== Name: 51Deprecated-topa.8 Author: topa Time: 8 October 2015, 9:11:07.323 pm UUID: f038f092-9136-4d33-b8d7-474efe928e4d Ancestors: 51Deprecated-topa.7 Retain some meta information to see where that came from =============== Diff against 51Deprecated-topa.7 =============== Item was changed: + SystemOrganization addCategory: #'51Deprecated-Files-Kernel'! - SystemOrganization addCategory: #'51Deprecated'! Item was changed: StandardFileStream subclass: #CrLfFileStream instanceVariableNames: 'lineEndConvention' classVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings LookAheadCount' poolDictionaries: '' + category: '51Deprecated-Files-Kernel'! - category: '51Deprecated'! !CrLfFileStream commentStamp: 'ul 12/26/2010 03:13' prior: 0! This class is now obsolete, use MultiByteFileStream instead. I am the same as a regular file stream, except that when I am in text mode, I will automatically convert line endings between the underlying platform's convention, and Squeak's convention of carriage-return only. The goal is that Squeak text files can be treated as OS text files, and vice versa. In binary mode, I behave identically to a StandardFileStream. To enable CrLfFileStream as the default file stream class for an entire image, modify FileStream class concreteStream . There are two caveats on programming with CrLfFileStream. First, the choice of text mode versus binary mode affects which characters are visible in Squeak, and no longer just affects whether those characters are returned as Character's or as Integer's. Thus the choice of mode needs to be made very carefully, and must be based on intent instead of convenience of representation. The methods asString, asByteArray, asCharacter, and asInteger can be used to convert between character and integer representations. (Arguably, file streams should accept either strings or characters in nextPut: and nextPutAll:, but that is not the case right now.) Second, arithmetic on positions no longer works, because one character that Squeak sees (carriage return) could map to two characters in the underlying file (carriage return plus line feed, on MS Windows and MS DOS). Comparison between positions still works. (This caveat could perhaps be fixed by maintaining a map between Squeak positions and positions in the underlying file, but it is complicated. Consider, for example, updates to the middle of the file. Also, consider that text files are rarely updated in the middle of the file, and that general random access to a text file is rarely very useful. If general random access with specific file counts is desired, then the file is starting to sound like a binary file instead of a text file.) ! From commits at source.squeak.org Thu Oct 8 19:14:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 19:15:00 2015 Subject: [squeak-dev] The Trunk: System-topa.769.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.769.mcz ==================== Summary ==================== Name: System-topa.769 Author: topa Time: 8 October 2015, 9:14:34.222 pm UUID: d3a735df-f3e3-4c1b-8398-b0dd65da8a7b Ancestors: System-topa.768 Remind future me to remove CrLfFileStream from the #initializeStartUpList =============== Diff against System-topa.768 =============== Item was changed: ----- Method: SmalltalkImage class>>initializeStartUpList (in category 'class initialization') ----- initializeStartUpList "SmalltalkImage initialize" + - | oldList | oldList := StartUpList. StartUpList := OrderedCollection new. "These get processed from the top down..." + self flag: #'revisit in Squeak 5.3'. #( SmallInteger Delay DisplayScreen Cursor InputSensor ProcessorScheduler "Starts low space watcher and bkground." FileDirectory "Enables file stack dump and opens sources." ShortIntegerArray ShortRunArray + CrLfFileStream "Remove this in Squeak 5.3" - CrLfFileStream ) do:[:clsName| Smalltalk at: clsName ifPresent:[:cls| Smalltalk addToStartUpList: cls]. ]. oldList ifNotNil: [oldList do: [:className | Smalltalk at: className ifPresent: [:theClass | Smalltalk addToStartUpList: theClass]]]. #( ImageSegment PasteUpMorph ControlManager ) do:[:clsName| Smalltalk at: clsName ifPresent:[:cls| Smalltalk addToStartUpList: cls]. ]. ! From bert at freudenbergs.de Thu Oct 8 19:29:06 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Oct 8 19:29:11 2015 Subject: [squeak-dev] Let's do it: deprecation In-Reply-To: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> References: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> Message-ID: <0D94A6D5-EF66-4606-8AE8-438CBCED0DAB@freudenbergs.de> > On 08.10.2015, at 12:06, Tobias Pape wrote: > > Hi all > > so, there are now 5 Deprecation packages in the image, > for 3.9, 3.11, 4.5, 4.6, and 5.1. I'd say, lets > > a) get rid of the 3.9 and 3.11 ones now, and > b) get rid of the 4.5 one after releasing 5.1 and > c) get rid of the 4.6 one after releasing 5.2 and > d) get rid of the 5.1 one after releasing 5.3 and so on. > > So, how would we achieve a)? a Script to the Squeak-Version package? Squeak-Version seems to be the right place, yes. - 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/20151008/b30580fd/smime.bin From leves at elte.hu Thu Oct 8 19:54:26 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Oct 8 19:54:30 2015 Subject: [squeak-dev] Let's do it: deprecation In-Reply-To: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> References: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> Message-ID: Hi Tobias, We should decide whether we want to replace SharedQueue with SharedQueue2 before removing the latter's deprecated methods, because those are intended to be present in the image during the migration in order to make it easier. Without those methods one would have to reintroduce them, or find another way to migrate. Levente On Thu, 8 Oct 2015, Tobias Pape wrote: > Hi all > > so, there are now 5 Deprecation packages in the image, > for 3.9, 3.11, 4.5, 4.6, and 5.1. I'd say, lets > > a) get rid of the 3.9 and 3.11 ones now, and > b) get rid of the 4.5 one after releasing 5.1 and > c) get rid of the 4.6 one after releasing 5.2 and > d) get rid of the 5.1 one after releasing 5.3 and so on. > > So, how would we achieve a)? a Script to the Squeak-Version package? > > Best regards > -Tobias > > From Das.Linux at gmx.de Thu Oct 8 20:02:46 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 8 20:02:50 2015 Subject: [squeak-dev] Let's do it: deprecation In-Reply-To: References: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> Message-ID: <5AEA7542-4302-4452-AEC4-7AB691643881@gmx.de> On 08.10.2015, at 21:54, Levente Uzonyi wrote: > Hi Tobias, > > We should decide whether we want to replace SharedQueue with SharedQueue2 before removing the latter's deprecated methods, because those are intended to be present in the image during the migration in order to make it easier. Without those methods one would have to reintroduce them, or find another way to migrate. Where are those? From leves at elte.hu Thu Oct 8 20:10:39 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Oct 8 20:10:45 2015 Subject: [squeak-dev] Let's do it: deprecation In-Reply-To: <5AEA7542-4302-4452-AEC4-7AB691643881@gmx.de> References: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> <5AEA7542-4302-4452-AEC4-7AB691643881@gmx.de> Message-ID: They are in 39Deprecated: #flush and #flushAllSuchThat:. Levente On Thu, 8 Oct 2015, Tobias Pape wrote: > > On 08.10.2015, at 21:54, Levente Uzonyi wrote: > >> Hi Tobias, >> >> We should decide whether we want to replace SharedQueue with SharedQueue2 before removing the latter's deprecated methods, because those are intended to be present in the image during the migration in order to make it easier. Without those methods one would have to reintroduce them, or find another way to migrate. > > Where are those? > > > From Das.Linux at gmx.de Thu Oct 8 20:23:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 8 20:23:32 2015 Subject: [squeak-dev] Let's do it: deprecation In-Reply-To: References: <64E0ABB3-3F50-442D-8057-494905A86737@gmx.de> <5AEA7542-4302-4452-AEC4-7AB691643881@gmx.de> Message-ID: <5F4E29B8-6169-4BC7-9016-03087DE6E02D@gmx.de> On 08.10.2015, at 22:10, Levente Uzonyi wrote: > They are in 39Deprecated: #flush and #flushAllSuchThat:. Well, if we cannot actually deprecate them, lest de-deprecate (precate???) them again? Nobody's going to say 'I depended on them being removed' ;) Best regards -Tobias > > Levente > > On Thu, 8 Oct 2015, Tobias Pape wrote: > >> >> On 08.10.2015, at 21:54, Levente Uzonyi wrote: >> >>> Hi Tobias, >>> >>> We should decide whether we want to replace SharedQueue with SharedQueue2 before removing the latter's deprecated methods, because those are intended to be present in the image during the migration in order to make it easier. Without those methods one would have to reintroduce them, or find another way to migrate. >> >> Where are those? From commits at source.squeak.org Thu Oct 8 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151008215502.23932.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-October/009007.html Name: Tools-topa.636 Ancestors: Tools-mt.635 Pull up menu building to Model so that also non-StringHolder-Tools can benefit ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009008.html Name: Tests-topa.335 Ancestors: Tests-topa.334 I tricked myself To ensure the IST isn't run on spur, I modified testSelectors to exclude it. BUT when testSelectors is empty, shouldInheritSelectors by default returns true and hence allTestSelectors is used, wich circumvents our little trick. So, we pin it to false for now. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009009.html Name: Compiler-cmm.315 Ancestors: Compiler-eem.309 Resave change from Tobias with cleaned-up ancestry.. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009010.html Name: Collections-cmm.663 Ancestors: Collections-mt.657 >From Tobias: Make Text more polymorphic with String. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009011.html Name: 51Deprecated-topa.1 Ancestors: 50Deprecated-eem.1 Start 5.1 deprecation process ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009012.html Name: 51Deprecated-topa.2 Ancestors: 51Deprecated-topa.1 Deprecate #nextPutKeyword:withArg: as alternate syntax is unsupported since at least 4.0 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009013.html Name: 51Deprecated-topa.3 Ancestors: 51Deprecated-topa.2 Deprecate oldBack ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009014.html Name: Collections-topa.664 Ancestors: Collections-topa.662, Collections-cmm.663 Deprecated nextPutKeyword:withArg: and oldBack ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009015.html Name: CollectionsTests-topa.252 Ancestors: CollectionsTests-eem.251 oldBack is deprecated, remove tests ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009016.html Name: Collections-topa.665 Ancestors: Collections-topa.664 #oldBack is deprecated, inline it into its sole sender. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009017.html Name: Kernel-topa.958 Ancestors: Kernel-topa.957 Allow simple, message-less deprecations ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009018.html Name: 51Deprecated-topa.4 Ancestors: 51Deprecated-topa.3 Mark deprecated messages as such ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009019.html Name: 51Deprecated-topa.5 Ancestors: 51Deprecated-topa.4 Move already deprecated messages to their penultimate place ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009020.html Name: System-topa.768 Ancestors: System-topa.767 Move already deprecated messages to their penultimate place (Preferences) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009021.html Name: 46Deprecated-topa.5 Ancestors: 46Deprecated-dtl.4 Use Object>>#deprecated to singal a warning if desired. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009022.html Name: Collections-topa.666 Ancestors: Collections-topa.665 Move already deprecated messages to their penultimate place (KeyedSet) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009023.html Name: 51Deprecated-topa.6 Ancestors: 51Deprecated-topa.5 Move already deprecated messages to their penultimate place ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009024.html Name: Tools-topa.637 Ancestors: Tools-topa.636 Marcel is curious whether ObjectExplorer>>#selector is ever called. Let's find out. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009025.html Name: 51Deprecated-topa.7 Ancestors: 51Deprecated-topa.6 Deprecate CrLfFileStream (see CrLfFileStream class>>#new) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009026.html Name: Files-topa.146 Ancestors: Files-mt.145 Deprecate CrLfFileStream (see CrLfFileStream class>>#new) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009027.html Name: 51Deprecated-topa.8 Ancestors: 51Deprecated-topa.7 Retain some meta information to see where that came from ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009028.html Name: System-topa.769 Ancestors: System-topa.768 Remind future me to remove CrLfFileStream from the #initializeStartUpList ============================================= From eliot.miranda at gmail.com Thu Oct 8 22:20:27 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 8 22:20:32 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hi Craig, so the code in tryLockVMOwner is mov $1, %eax mfence xchg %eax, vmOwnerLock sfence sub $1, %eax "Since we only ever set the lock to 1 or 0, subtracting 1 sets EAX to 0 if the lock was already locked and non-zero if it wasn't." ret i.e. it attempts to set vmOwnerLock and answers if the attempt succeeded, where it will only succeed if vmOwnerLock was zero. So I guess the system is never arranging to unlock the Vm so there is never any opportunity for the foreign callback to get entry. Try adding an occasional "Processor relinquishProcessorForMicroseconds: 100" and see if that gives your call-back a window. Ideally you'd only do such a thing when the system is ready to accept callbacks. I expect the foreign callback logic is wrong in only allowing callbacks when the VM is unlocked. Instead, the system should probably see if the foreign callback priority is greater than the current process's priority, and then somehow preempt the current process (e.g. by setting stackLimit appropriately). But I have no cycles to think about this right now. On Thu, Oct 8, 2015 at 6:10 AM, Craig Latta wrote: > > > Hi Eliot-- > > Well, I have a callback that gets as far as > ownVMFromUnidentifiedThread() now, but I just keep spinning on > tryLockVMOwner(). Help? > > > thanks again, > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151008/64ddd020/attachment-0001.htm From eliot.miranda at gmail.com Thu Oct 8 23:04:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 8 23:04:13 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 3:43 PM, Craig Latta wrote: > > > > I guess the system is never arranging to unlock the Vm so there is > > never any opportunity for the foreign callback to get entry. Try > > adding an occasional "Processor relinquishProcessorForMicroseconds: > > 100" and see if that gives your call-back a window. > > Well, my system is deadlocked in the foreign thread, forever trying > and failing to own the VM when the library I'm using attempts to invoke > my callback. I guess I have to do something more drastic, like kludge > the unlock logic. > > How should the system be arranging to unlock the VM? > Hmmm, the code is better than I thought. So here's what it does: ownVMFromUnidentifiedThread ... count := 0. "If the current thread doesn't have an index it's new to the vm and we need to allocate a new threadInfo, failing if we can't. We also need a process in the foreignCallbackProcessSlot upon which to run the thread's eventual callback." [[cogThreadManager tryLockVMToIndex: -1] whileFalse: [self waitingPriorityIsAtLeast: foreignCallbackPriority. cogThreadManager ioTransferTimeslice]. (objectMemory splObj: foreignCallbackProcessSlot) ~= objectMemory nilObject] whileFalse: [cogThreadManager releaseVM. (count := count + 1) > 1000 ifTrue: [^-2]. cogThreadManager ioMilliSleep: 1]. and waitingPriorityIsAtLeast: minPriority "Set the maxWaitingPriority to at least minPriority on behalf of a thread wanting to acquire the VM. If maxWaitingPriority is increased, schedule a thread activation check asap." maxWaitingPriority < minPriority ifTrue: [maxWaitingPriority := minPriority. checkThreadActivation := true. self forceInterruptCheck] So forceInterruptCheck will force the VM to break out of machine code, if it is in machine code (this we need to check; for example it might be doing relinquishProcessorForMicroseconds:). Once in checkForEventsMayContextSwitch (the code that gets called to process events) there is an attempt to attend to checkThreadActivation: checkForEventsMayContextSwitch: mayContextSwitch "Check for possible interrupts and handle one if necessary. Answer if a context switch has occurred." ... switched := false. self assert: deferThreadSwitch not. deferThreadSwitch := true. ... "inIOProcessEvents prevents reentrancy into ioProcessEvents and allows disabling ioProcessEvents e.g. for native GUIs. We would like to manage that here but can't since the platform code may choose to call ioProcessEvents itself in various places." (now := self ioUTCMicroseconds) >= nextPollUsecs ifTrue: [statIOProcessEvents := statIOProcessEvents + 1. self ioProcessEvents. "sets interruptPending if interrupt key pressed; may callback" nextPollUsecs := now + 20000 "msecs to wait before next call to ioProcessEvents. Note that strictly speaking we might need to update 'now' at this point since ioProcessEvents could take a very long time on some platforms"]. interruptPending ifTrue: [interruptPending := false. "reset interrupt flag" sema := objectMemory splObj: TheInterruptSemaphore. (sema ~= objectMemory nilObject and: [self synchronousSignal: sema]) ifTrue: [switched := true]]. nextWakeupUsecs ~= 0 ifTrue: [now >= nextWakeupUsecs ifTrue: [nextWakeupUsecs := 0. "set timer interrupt to 0 for 'no timer'" sema := objectMemory splObj: TheTimerSemaphore. (sema ~= objectMemory nilObject and: [self synchronousSignal: sema]) ifTrue: [switched := true]]]. ... deferThreadSwitch := false. checkThreadActivation ifTrue: [checkThreadActivation := false. self cedeToHigherPriorityThreads]. "N.B. This may not return if we do switch." self threadSwitchIfNecessary: self activeProcess from: CSCheckEvents. ^switched So cedeToHigherPriorityThreads should do what it says. What does it do? Well it does lots of clever things, but AFAICT it *doesn't* unlock the VM if a higher-priority foreign callback is trying to own the VM. So that would be the bug. If you want to make progress on this you'll need to a) build a simulator image (instructions on the blog) b) set-up a test case in the simulator to exercise the cedeToHigherPriorityThreads logic and replicate the bug c) have a go at rewriting cedeToHigherPriorityThreads and/or threadSwitchIfNecessary:from: to do the right thing. Looks like the issue is at the bottom of threadSwitchIfNecessary:from: : threadSwitchIfNecessary: newProc from: sourceCode "Invoked from transferTo:from: to switch threads if the new process is bound or affined to some other thread." .... (self quickFetchInteger: PriorityIndex ofObject: newProc) < maxWaitingPriority ifTrue: [checkThreadActivation := true. self forceInterruptCheck] This will just spin causing the VM to do checkForEventsMayContextSwitch:. Instead it probably needs to do something like (self quickFetchInteger: PriorityIndex ofObject: newProc) < maxWaitingPriority ifTrue: [checkThreadActivation := true. self returnToSchedulingLoopAndReleaseVMOrWakeThread: vmThread source: source] But this really needs to be thought through carefully. It's a while since I thought about this and I'm in no position to do so now. Anyway, HTH _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151008/154eca77/attachment.htm From commits at source.squeak.org Thu Oct 8 23:48:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 8 23:48:08 2015 Subject: [squeak-dev] Squeak 4.6: System-dtl.754.mcz Message-ID: David T. Lewis uploaded a new version of System to project Squeak 4.6: http://source.squeak.org/squeak46/System-dtl.754.mcz ==================== Summary ==================== Name: System-dtl.754 Author: dtl Time: 8 October 2015, 7:47:37.644 pm UUID: 7875a786-e95b-47c8-ba8d-10ec0bcf5f63 Ancestors: System-topa.753 Fix ancient typo in recreateSpecialObjectsArray. Bug introduced April 2013 in System-eem.521, present in trunk through July 2015 System-topa.753, resolved in (Spur) trunk System-cmm.754. =============== Diff against System-topa.753 =============== 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: 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: 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). "(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." 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" newArray at: 29 put: self compactClassesArray. 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 (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:. "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. "(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). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" 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: (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'). "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: []). "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. "Now replace the interpreter's reference in one atomic operation" self specialObjectsArray becomeForward: newArray ! From lewis at mail.msen.com Thu Oct 8 23:55:51 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 8 23:55:54 2015 Subject: [squeak-dev] Squeak 4.6: System-dtl.754.mcz In-Reply-To: <201510082348.t98NmA9n096113@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> Message-ID: <20151008235551.GA96085@shell.msen.com> For squeak4.6, this fixes the bug that Craig reported on vm-dev http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html I also see at least one mcz in the squeak46 repository that is empty, apparently originally loaded from trunk for the release image, but somehow copied with errors from trunk to squeak46. I fixed System-topa.753 by copying the good one in trunk into squeak46. There may be a few more bad mcz files in squeak46. I'll fix them as I spot them. Dave On Thu, Oct 08, 2015 at 11:47:52PM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of System to project Squeak 4.6: > http://source.squeak.org/squeak46/System-dtl.754.mcz > > ==================== Summary ==================== > > Name: System-dtl.754 > Author: dtl > Time: 8 October 2015, 7:47:37.644 pm > UUID: 7875a786-e95b-47c8-ba8d-10ec0bcf5f63 > Ancestors: System-topa.753 > > Fix ancient typo in recreateSpecialObjectsArray. Bug introduced April 2013 in System-eem.521, present in trunk through July 2015 System-topa.753, resolved in (Spur) trunk System-cmm.754. > > =============== Diff against System-topa.753 =============== > > 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: 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: 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). > "(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." > 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" > newArray at: 29 put: self compactClassesArray. > 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 (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:. > "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. > "(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). "preserve external semaphores" > newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" > 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: (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'). > "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: []). > > "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. > > "Now replace the interpreter's reference in one atomic operation" > self specialObjectsArray becomeForward: newArray > ! > From commits at source.squeak.org Fri Oct 9 00:02:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 9 00:02:41 2015 Subject: [squeak-dev] Squeak 4.6: Collections-topa.638.mcz Message-ID: David T. Lewis uploaded a new version of Collections to project Squeak 4.6: http://source.squeak.org/squeak46/Collections-topa.638.mcz ==================== Summary ==================== Name: Collections-topa.638 Author: topa Time: 8 July 2015, 4:17:26.216 pm UUID: aa218acf-c29b-4df1-ab0a-285f1f71c6a7 Ancestors: Collections-topa.637 Let's say PluggableTextAttributes are not serializable. =============== Diff against Collections-topa.637 =============== Item was added: + ----- Method: PluggableTextAttribute>>writeScanOn: (in category 'as yet unclassified') ----- + writeScanOn: aStream + "Impossible for this kind of attribute" + ^ self shouldNotImplement + ! From lewis at mail.msen.com Fri Oct 9 00:05:39 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 9 00:05:42 2015 Subject: [squeak-dev] Squeak 4.6: System-dtl.754.mcz In-Reply-To: <20151008235551.GA96085@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> Message-ID: <20151009000539.GA99353@shell.msen.com> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: > For squeak4.6, this fixes the bug that Craig reported on vm-dev > http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html > > I also see at least one mcz in the squeak46 repository that is empty, apparently > originally loaded from trunk for the release image, but somehow copied with > errors from trunk to squeak46. > > I fixed System-topa.753 by copying the good one in trunk into squeak46. There > may be a few more bad mcz files in squeak46. I'll fix them as I spot them. > Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, so I copied the good ones from trunk to squeak46. Dave From eliot.miranda at gmail.com Fri Oct 9 00:23:33 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 9 00:23:36 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 4:33 PM, Craig Latta wrote: > > > Well, I threw in a (ProcessorScheduler > relinquishProcessorForMicroseconds: 100) into one of the successful > vm-thread callbacks, and now the foreign-thread callback hangs waiting > for the ioWaitOnOSSemaphore() in ownVM(). So I'm not too confident that > fixing the bug in threadSwitchIfNecessary:from: will get me moving > again. But I'll bang on it anyway, I guess. > > I am now in hell... > Welcome to my world ;-) -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151008/286e9115/attachment.htm From eliot.miranda at gmail.com Fri Oct 9 00:28:47 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 9 00:28:51 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hi Craig, On Thu, Oct 8, 2015 at 4:59 PM, Craig Latta wrote: > > > > If you want to make progress on this you'll need to > > > > a) build a simulator image (instructions on the blog) > > b) set-up a test case in the simulator to exercise the > > cedeToHigherPriorityThreads logic and replicate the bug > > c) have a go at rewriting cedeToHigherPriorityThreads and/or > > threadSwitchIfNecessary:from: to do the right thing. > > Hm, I have no idea how to set up such a test case meaningfully. > This seems like one of those situations where you'd use a "plugin > simulator" (like the one for BitBlt) that relies on the behavior you're > debugging already working properly as simulation support in the > simulation host. > All you'd do is simulate a callback occurring while the VM is doing something. So... a) write a scratch primitive called e.g. primitiveFakeAForeignCallback which forks (at a higher priority?, or at least does a yield?), and calls the relevant machinery with faked up callback data (so you can avoid all the stuff in thinkProcess which is written in C) b) use the reader image to run this primitive via a doit containing the primitiveFakeAForeignCallback followed by some time consuming computation like 0 tinyBenchmarks. So you start up the reader image, and type in the DoIt (followed by a !) into the dialog that stands in for reading from stdin. From your DoIt the foreign callback will start its processing in primitiveFakeAForeignCallback, and get blocked trying to take ownership of the vm. primitiveFakeAForeignCallback will return and the time-consuming computation will start and soon enough get interrupted, so the VM will enter checkForEventsMayContextSwitch: and you can step through the system to see the foreign callback attempt to get control of the VM. BTW, this is /monstrously/ cool of you! -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151008/ab7cf4e1/attachment.htm From lewis at mail.msen.com Fri Oct 9 00:31:09 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 9 00:31:11 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <20151009000539.GA99353@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> Message-ID: <20151009003109.GA2442@shell.msen.com> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: > On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: > > For squeak4.6, this fixes the bug that Craig reported on vm-dev > > http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html > > > > I also see at least one mcz in the squeak46 repository that is empty, apparently > > originally loaded from trunk for the release image, but somehow copied with > > errors from trunk to squeak46. > > > > I fixed System-topa.753 by copying the good one in trunk into squeak46. There > > may be a few more bad mcz files in squeak46. I'll fix them as I spot them. > > > > Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, > so I copied the good ones from trunk to squeak46. > I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ packages in that repo. I presume that this is an error, some artifact of copying them from trunk during the 4.6/5.0 release process. So I fixed (?) this by copying the good (not empty) MCZ files from trunk to squeak46. All is well, except that I now have a dirty package in Kernel after doing an updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which is one that was moved around and refactored in the later trunk development. Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint will hang the system if it goes missing), can someone (Chris?) please confirm that those packages were *not* supposed to be empty, and that the good copies from trunk would be the right thing to have in squeak46? Thanks, Dave From lewis at mail.msen.com Fri Oct 9 01:01:24 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 9 01:01:27 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <20151009003109.GA2442@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> Message-ID: <20151009010124.GA8136@shell.msen.com> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: > On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: > > On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: > > > For squeak4.6, this fixes the bug that Craig reported on vm-dev > > > http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html > > > > > > I also see at least one mcz in the squeak46 repository that is empty, apparently > > > originally loaded from trunk for the release image, but somehow copied with > > > errors from trunk to squeak46. > > > > > > I fixed System-topa.753 by copying the good one in trunk into squeak46. There > > > may be a few more bad mcz files in squeak46. I'll fix them as I spot them. > > > > > > > Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, > > so I copied the good ones from trunk to squeak46. > > > > I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray > bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ > packages in that repo. I presume that this is an error, some artifact of copying > them from trunk during the 4.6/5.0 release process. So I fixed (?) this by > copying the good (not empty) MCZ files from trunk to squeak46. > > All is well, except that I now have a dirty package in Kernel after doing an > updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which > is one that was moved around and refactored in the later trunk development. > > Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint > will hang the system if it goes missing), can someone (Chris?) please confirm > that those packages were *not* supposed to be empty, and that the good copies > from trunk would be the right thing to have in squeak46? > And I guess that the related question would be - for a fully updated Squeak 4.6 image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? Is it this: CompiledMethod>>hasBreakpoint ^ false Or this: CompiledMethod>>hasBreakpoint ^BreakpointManager methodHasBreakpoint: self I think that the former version is the pre-Spur implementation, and the latter came from the Spur transition in trunk Kernel-cmm.936. I note also that WrappedBreakpoint>>hasBreakpoint just answers true in squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint would just answer false. Is that right? Thanks, Dave From Das.Linux at gmx.de Fri Oct 9 05:25:31 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Oct 9 05:25:35 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <20151009010124.GA8136@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> Message-ID: <944300FE-A875-44FE-8C2B-7FE3E0EA53F2@gmx.de> On 09.10.2015, at 03:01, David T. Lewis wrote: > On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >>>> >>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >>>> originally loaded from trunk for the release image, but somehow copied with >>>> errors from trunk to squeak46. >>>> >>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >>>> >>> >>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >>> so I copied the good ones from trunk to squeak46. >>> >> >> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >> packages in that repo. I presume that this is an error, some artifact of copying >> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >> copying the good (not empty) MCZ files from trunk to squeak46. >> >> All is well, except that I now have a dirty package in Kernel after doing an >> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >> is one that was moved around and refactored in the later trunk development. >> >> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >> will hang the system if it goes missing), can someone (Chris?) please confirm >> that those packages were *not* supposed to be empty, and that the good copies >> from trunk would be the right thing to have in squeak46? >> > > And I guess that the related question would be - for a fully updated Squeak 4.6 > image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? > > Is it this: > > CompiledMethod>>hasBreakpoint > ^ false > > > Or this: > > CompiledMethod>>hasBreakpoint > ^BreakpointManager methodHasBreakpoint: self > > I think that the former version is the pre-Spur implementation, and the > latter came from the Spur transition in trunk Kernel-cmm.936. > > I note also that WrappedBreakpoint>>hasBreakpoint just answers true in > squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint > would just answer false. No, these are two coexisting mechanisms of breakpointing a) breakpoint manager has an external list of breakpointed messages and does the breakpointing. Hence the second version is correct. b) wrapped breakpoint is a method wrapper that wraps a compiled method in the method dict and thus can, imposing the CM, just answer true. Best regards -Tobias From nicolas.cellier.aka.nice at gmail.com Fri Oct 9 06:40:13 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Oct 9 06:40:16 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <944300FE-A875-44FE-8C2B-7FE3E0EA53F2@gmx.de> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <944300FE-A875-44FE-8C2B-7FE3E0EA53F2@gmx.de> Message-ID: This has to do with overrides... The Kernel version was overriden or something like that. 2015-10-09 7:25 GMT+02:00 Tobias Pape : > > On 09.10.2015, at 03:01, David T. Lewis wrote: > > > On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: > >> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: > >>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: > >>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev > >>>> > http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html > >>>> > >>>> I also see at least one mcz in the squeak46 repository that is empty, > apparently > >>>> originally loaded from trunk for the release image, but somehow > copied with > >>>> errors from trunk to squeak46. > >>>> > >>>> I fixed System-topa.753 by copying the good one in trunk into > squeak46. There > >>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot > them. > >>>> > >>> > >>> Compiler-eem.304 and Collections-topa.638 were also empty in the > squeak46 repo, > >>> so I copied the good ones from trunk to squeak46. > >>> > >> > >> I hope I am not doing something stupid here. I wanted to fix the > recreateSpecialObjectsArray > >> bug that remained in the squeak46 repo, and in doing so noticed some > empty MCZ > >> packages in that repo. I presume that this is an error, some artifact > of copying > >> them from trunk during the 4.6/5.0 release process. So I fixed (?) this > by > >> copying the good (not empty) MCZ files from trunk to squeak46. > >> > >> All is well, except that I now have a dirty package in Kernel after > doing an > >> updateFromServer. The conflicting method is > CompiledMethod>>hasBreakpoint, which > >> is one that was moved around and refactored in the later trunk > development. > >> > >> Before I do anything dangerous to try to "fix" this (after all, > hasBreakpoint > >> will hang the system if it goes missing), can someone (Chris?) please > confirm > >> that those packages were *not* supposed to be empty, and that the good > copies > >> from trunk would be the right thing to have in squeak46? > >> > > > > And I guess that the related question would be - for a fully updated > Squeak 4.6 > > image, what is the correct implementation of > CompiledMethod>>hasBreakpoint ? > > > > Is it this: > > > > CompiledMethod>>hasBreakpoint > > ^ false > > > > > > Or this: > > > > CompiledMethod>>hasBreakpoint > > ^BreakpointManager methodHasBreakpoint: self > > > > I think that the former version is the pre-Spur implementation, and the > > latter came from the Spur transition in trunk Kernel-cmm.936. > > > > I note also that WrappedBreakpoint>>hasBreakpoint just answers true in > > squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint > > would just answer false. > > No, these are two coexisting mechanisms of breakpointing > > a) breakpoint manager has an external list of breakpointed messages and > does the > breakpointing. Hence the second version is correct. > b) wrapped breakpoint is a method wrapper that wraps a compiled method in > the > method dict and thus can, imposing the CM, just answer true. > > Best regards > -Tobias > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151009/5d230f11/attachment.htm From eliot.miranda at gmail.com Fri Oct 9 06:43:04 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 9 06:43:08 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <20151009010124.GA8136@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> Message-ID: <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> Hi David, Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. _,,,^..^,,,_ (phone) > On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: > >> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >>>> >>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >>>> originally loaded from trunk for the release image, but somehow copied with >>>> errors from trunk to squeak46. >>>> >>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >>> >>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >>> so I copied the good ones from trunk to squeak46. >> >> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >> packages in that repo. I presume that this is an error, some artifact of copying >> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >> copying the good (not empty) MCZ files from trunk to squeak46. >> >> All is well, except that I now have a dirty package in Kernel after doing an >> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >> is one that was moved around and refactored in the later trunk development. >> >> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >> will hang the system if it goes missing), can someone (Chris?) please confirm >> that those packages were *not* supposed to be empty, and that the good copies >> from trunk would be the right thing to have in squeak46? > > And I guess that the related question would be - for a fully updated Squeak 4.6 > image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? > > Is it this: > > CompiledMethod>>hasBreakpoint > ^ false > > > Or this: > > CompiledMethod>>hasBreakpoint > ^BreakpointManager methodHasBreakpoint: self > > I think that the former version is the pre-Spur implementation, and the > latter came from the Spur transition in trunk Kernel-cmm.936. > > I note also that WrappedBreakpoint>>hasBreakpoint just answers true in > squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint > would just answer false. > > Is that right? > > Thanks, > Dave > > From Das.Linux at gmx.de Fri Oct 9 07:16:05 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Oct 9 07:16:07 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> Message-ID: <7DB7A3F2-C898-49D2-9B4F-90D8D05CB844@gmx.de> Hi, On 09.10.2015, at 08:43, Eliot Miranda wrote: > Hi David, > > Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. Ah, that happens when I reply without actually look. Yes, Eliot is right. Best regards -Tobias > > _,,,^..^,,,_ (phone) > >> On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: >> >>> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >>>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >>>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >>>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >>>>> >>>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >>>>> originally loaded from trunk for the release image, but somehow copied with >>>>> errors from trunk to squeak46. >>>>> >>>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >>>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >>>> >>>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >>>> so I copied the good ones from trunk to squeak46. >>> >>> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >>> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >>> packages in that repo. I presume that this is an error, some artifact of copying >>> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >>> copying the good (not empty) MCZ files from trunk to squeak46. >>> >>> All is well, except that I now have a dirty package in Kernel after doing an >>> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >>> is one that was moved around and refactored in the later trunk development. >>> >>> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >>> will hang the system if it goes missing), can someone (Chris?) please confirm >>> that those packages were *not* supposed to be empty, and that the good copies >>> from trunk would be the right thing to have in squeak46? >> >> And I guess that the related question would be - for a fully updated Squeak 4.6 >> image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? >> >> Is it this: >> >> CompiledMethod>>hasBreakpoint >> ^ false >> >> >> Or this: >> >> CompiledMethod>>hasBreakpoint >> ^BreakpointManager methodHasBreakpoint: self >> >> I think that the former version is the pre-Spur implementation, and the >> latter came from the Spur transition in trunk Kernel-cmm.936. >> >> I note also that WrappedBreakpoint>>hasBreakpoint just answers true in >> squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint >> would just answer false. >> >> Is that right? >> >> Thanks, >> Dave >> >> > From Das.Linux at gmx.de Fri Oct 9 07:16:58 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Oct 9 07:17:09 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> Message-ID: Hi, On 09.10.2015, at 08:43, Eliot Miranda wrote: > Hi David, > > Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. Ah, that happens when I reply without actually look. Yes, Eliot is right. Best regards -Tobias > > _,,,^..^,,,_ (phone) > >> On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: >> >>> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >>>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >>>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >>>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >>>>> >>>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >>>>> originally loaded from trunk for the release image, but somehow copied with >>>>> errors from trunk to squeak46. >>>>> >>>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >>>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >>>> >>>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >>>> so I copied the good ones from trunk to squeak46. >>> >>> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >>> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >>> packages in that repo. I presume that this is an error, some artifact of copying >>> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >>> copying the good (not empty) MCZ files from trunk to squeak46. >>> >>> All is well, except that I now have a dirty package in Kernel after doing an >>> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >>> is one that was moved around and refactored in the later trunk development. >>> >>> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >>> will hang the system if it goes missing), can someone (Chris?) please confirm >>> that those packages were *not* supposed to be empty, and that the good copies >>> from trunk would be the right thing to have in squeak46? >> >> And I guess that the related question would be - for a fully updated Squeak 4.6 >> image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? >> >> Is it this: >> >> CompiledMethod>>hasBreakpoint >> ^ false >> >> >> Or this: >> >> CompiledMethod>>hasBreakpoint >> ^BreakpointManager methodHasBreakpoint: self >> >> I think that the former version is the pre-Spur implementation, and the >> latter came from the Spur transition in trunk Kernel-cmm.936. >> >> I note also that WrappedBreakpoint>>hasBreakpoint just answers true in >> squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint >> would just answer false. >> >> Is that right? >> >> Thanks, >> Dave >> >> > From craig at netjam.org Fri Oct 9 10:36:05 2015 From: craig at netjam.org (Craig Latta) Date: Fri Oct 9 10:36:19 2015 Subject: [squeak-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: > a) write a scratch primitive called e.g. primitiveFakeAForeignCallback > which forks (at a higher priority?, or at least does a yield?), and > calls the relevant machinery with faked up callback data (so you can > avoid all the stuff in thinkProcess which is written in C) Which machinery is that? callbackEnter:? I have the simulator and reader image going. > BTW, this is /monstrously/ cool of you! Sure thing! -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From henrylavado at gmx.com Fri Oct 9 10:49:52 2015 From: henrylavado at gmx.com (henry) Date: Fri Oct 9 10:49:54 2015 Subject: [squeak-dev] vm build environment on windows Message-ID: <56179BD0.2040607@gmx.com> I was unable to successfully compile gcc.exe 3.4.4 under current Cygwin. It compiled some target binaries but lots of warnings and ultimate failure. Does anyone happen to have gcc 3.4.4 built for i386-64-cygwin? If so and installed to /usr/local, could you zip up the following and send to me, please? - bin/gcc.exe - lib/gcc/**/*.* - libexec/gcc/**/*.* If not, any ideas where I could come by this? regards, Henry From henrylavado at gmx.com Fri Oct 9 12:22:22 2015 From: henrylavado at gmx.com (henry) Date: Fri Oct 9 12:22:25 2015 Subject: [squeak-dev] vm build environment on windows In-Reply-To: <56179BD0.2040607@gmx.com> References: <56179BD0.2040607@gmx.com> Message-ID: <5617B17E.2080402@gmx.com> Hello, I was not able to find gcc 3.4.4 for the latest Cygwin nor could I find Cygwin 5.1, so I switched to trying the MingW route. They have a gcc 3.4.5 compiler which I chose. Ultimate I ran into undeclared symbols, when running mwm. Here's what I did: 1) MingW installer: http://sourceforge.net/projects/mingw/files/latest/download and installed 1.a) added gcc 2.4.5 2) CMake 2.8.8 installer: http://www.cmake.org/files/v2.8/cmake-2.8.8-win32-x86.exe and installed 3) Follow vm build instructions: http://www.mirandabanda.org/cogblog/compiling-the-vm 3.a) checkout Cog sources 3.b) Change directory to build.win32x86 3.c) edit plugins.ext to remove Bochs plugin 3.d) run mvm I received errors, listed below. I am not sure what the next step should be. regards, Henry gcc -o build/vm/sqWin32Main.o -isystem/usr/include/mingw -I/usr/include/w32api - msse2 -ggdb2 -mwindows -mthreads -mno-cygwin -mwin32 -mno-rtd -mms-bitfields -mn o-accumulate-outgoing-args -D_MT -O2 -march=pentium4 -momit-leaf-frame-pointer - funroll-loops -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprint f -I. -I../../spursrc/vm -I../../platforms/win32/vm -I../../platforms/Cross/vm - I../../platforms/win32/third-party/dx9sdk/Include -DCOGMTVM=0 -DDEBUGVM=0 -D_WI N32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SE RVICE -DNO_STD_FILE_SUPPORT -D'TZ="EDT"' -DNDEBUG -D'VM_LABEL(foo)=0' -DLSB_FIR ST -D'VM_NAME="Squeak"' -DX86 -DCROQUET -c ../../platforms/win32/vm/sqWin32Main .c ../../platforms/win32/vm/sqWin32Main.c: In function `squeakExceptionHandler': ../../platforms/win32/vm/sqWin32Main.c:133: error: `_RC_NEAR' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: (Each undeclared identifier i s reported only once ../../platforms/win32/vm/sqWin32Main.c:133: error: for each function it appears in.) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_PC_53' undeclared (first us e in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_INVALID' undeclared (fir st use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_ZERODIVIDE' undeclared ( first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_OVERFLOW' undeclared (fi rst use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_UNDERFLOW' undeclared (f irst use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_INEXACT' undeclared (fir st use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_EM_DENORMAL' undeclared (fi rst use in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_MCW_EM' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_MCW_RC' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_MCW_PC' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c:133: error: `_MCW_IC' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c: In function `gatherSystemInfo': ../../platforms/win32/vm/sqWin32Main.c:468: warning: assignment makes pointer fr om integer without a cast ../../platforms/win32/vm/sqWin32Main.c:565: warning: assignment makes pointer fr om integer without a cast ../../platforms/win32/vm/sqWin32Main.c:609: warning: assignment makes pointer fr om integer without a cast ../../platforms/win32/vm/sqWin32Main.c:760: warning: assignment makes pointer fr om integer without a cast ../../platforms/win32/vm/sqWin32Main.c: In function `sqMain': ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_RC_NEAR' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_PC_53' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_INVALID' undeclared (fi rst use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_ZERODIVIDE' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_OVERFLOW' undeclared (f irst use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_UNDERFLOW' undeclared ( first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_INEXACT' undeclared (fi rst use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_EM_DENORMAL' undeclared (f irst use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_MCW_EM' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_MCW_RC' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_MCW_PC' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306: error: `_MCW_IC' undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c: In function `WinMain': ../../platforms/win32/vm/sqWin32Main.c:1535: warning: assignment makes pointer f rom integer without a cast ../../platforms/win32/vm/sqWin32Main.c:1567: error: `_fmode' undeclared (first u se in this function) ../../platforms/win32/vm/sqWin32Main.c: In function `getRedzoneSize': ../../platforms/win32/vm/sqWin32Main.c:2013: error: structure has no member name d `sa_sigaction' ../../platforms/win32/vm/sqWin32Main.c:2014: error: `SA_SIGINFO' undeclared (fir st use in this function) make: *** [build/vm/sqWin32Main.o] Error 1 ls: build*/vm/Squeak*.exe: No such file or directory From Marcel.Taeumel at hpi.de Fri Oct 9 12:30:46 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Oct 9 12:40:55 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <5617B17E.2080402@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> Message-ID: <1444393846744-4854700.post@n4.nabble.com> Hi Henry, here is how it works with GCC 4.9.2 using only the SVN C sources (i.e. w/o having to run VM-Maker): 1. Install latest Cygwin. 2. Load all requried mingw64-i686-* packages (binutils, gcc-g++, runtime should be enough) 3. Check-out latest cog sources. 4. Adapt the particular Makefile (e.g. C:\Tools\cogvm_cygwin\build.win32x86\squeak.cog.spur\Markfile) to find the tools with the "mingw64-i686*" prefix. Do it also with the "Makefile.plugin" file. 5. Fix some build-in bee-5.patch flags that do not work with GCC 4 anymore. (see attached patch file). 6. Open Cygwin and run "./mvm" Please find attached a patch to update the Windows build files. We will integrate it into the SVN soon. Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854700.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From henrylavado at gmx.com Fri Oct 9 12:45:01 2015 From: henrylavado at gmx.com (henry) Date: Fri Oct 9 12:45:03 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444393846744-4854700.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> Message-ID: <5617B6CD.9050104@gmx.com> This is gold. Thank you very much, Marcel, I will attempt later today when I can set a time commitment. Best regards, Henry On 10/9/2015 8:30 AM, marcel.taeumel wrote: > Hi Henry, > > here is how it works with GCC 4.9.2 using only the SVN C sources (i.e. w/o > having to run VM-Maker): > > 1. Install latest Cygwin. > 2. Load all requried mingw64-i686-* packages (binutils, gcc-g++, runtime > should be enough) > 3. Check-out latest cog sources. > 4. Adapt the particular Makefile (e.g. > C:\Tools\cogvm_cygwin\build.win32x86\squeak.cog.spur\Markfile) to find the > tools with the "mingw64-i686*" prefix. Do it also with the "Makefile.plugin" > file. > 5. Fix some build-in bee-5.patch > flags that do not work > with GCC 4 anymore. (see attached patch file). > 6. Open Cygwin and run "./mvm" > > Please find attached a patch to update the Windows build files. We will > integrate it into the SVN soon. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854700.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Fri Oct 9 15:07:17 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 9 15:07:19 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> Message-ID: Introducing MC overrides into the standard package structure created a giant PITA for the already-delayed release. Frankly, I think Breakpoints should be moved an external package at this point. It introduces package dependency hackings, compiled method hackings, and file-out hackings. All just so I can put an IMPLICIT "self halt" at the TOP of a method ONLY. I'm sorry Eliot, maybe I'm just not seeing it, but it seems like an insanely bad trade-off.. On Fri, Oct 9, 2015 at 1:43 AM, Eliot Miranda wrote: > Hi David, > > Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. > > _,,,^..^,,,_ (phone) > >> On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: >> >>> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >>>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >>>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >>>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >>>>> >>>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >>>>> originally loaded from trunk for the release image, but somehow copied with >>>>> errors from trunk to squeak46. >>>>> >>>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >>>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >>>> >>>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >>>> so I copied the good ones from trunk to squeak46. >>> >>> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >>> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >>> packages in that repo. I presume that this is an error, some artifact of copying >>> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >>> copying the good (not empty) MCZ files from trunk to squeak46. >>> >>> All is well, except that I now have a dirty package in Kernel after doing an >>> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >>> is one that was moved around and refactored in the later trunk development. >>> >>> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >>> will hang the system if it goes missing), can someone (Chris?) please confirm >>> that those packages were *not* supposed to be empty, and that the good copies >>> from trunk would be the right thing to have in squeak46? >> >> And I guess that the related question would be - for a fully updated Squeak 4.6 >> image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? >> >> Is it this: >> >> CompiledMethod>>hasBreakpoint >> ^ false >> >> >> Or this: >> >> CompiledMethod>>hasBreakpoint >> ^BreakpointManager methodHasBreakpoint: self >> >> I think that the former version is the pre-Spur implementation, and the >> latter came from the Spur transition in trunk Kernel-cmm.936. >> >> I note also that WrappedBreakpoint>>hasBreakpoint just answers true in >> squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint >> would just answer false. >> >> Is that right? >> >> Thanks, >> Dave >> >> > From eliot.miranda at gmail.com Fri Oct 9 16:39:12 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 9 16:39:15 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 6:27 PM, Craig Latta wrote: > > > > Well, I threw a (ProcessorScheduler > > relinquishProcessorForMicroseconds: 100) into one of the successful > > vm-thread callbacks, and now the foreign-thread callback hangs waiting > > for the ioWaitOnOSSemaphore() in ownVM(). So I'm not too confident > > that fixing the bug in cedeToHigherPriorityThreads and/or > > threadSwitchIfNecessary:from: will get me moving again. But I'll bang > > on it anyway, I guess. > > I also notice that, at the point where things just start spinning, > I've got four threads, three of which (interpreter loop, thread > scheduling loop, foreign callback thread) are waiting on VM thread > semaphores. How is the other thread, the heartbeat thread, supposed to > get things moving? > The only r?le the heartbeat thread has in multithreading is spotting when the VM is unowned and starting off a thread to take ownership. e.g. some long-running callout occurs, which first disowns the VM. It is the heartbeat which spots that the VM is unowned and it might be sensible to start another thread to try and run the VM, hence not slowing down the callout by having it start a thread on each callout. What's supposed to stop the threads spinning is proper interaction between them. that this isn't happening is a bug. As I said, this is a prototype work in progress. > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151009/7e077314/attachment.htm From eliot.miranda at gmail.com Fri Oct 9 16:48:17 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 9 16:48:21 2015 Subject: [squeak-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hi Craig, On Fri, Oct 9, 2015 at 3:36 AM, Craig Latta wrote: > > > a) write a scratch primitive called e.g. primitiveFakeAForeignCallback > > which forks (at a higher priority?, or at least does a yield?), and > > calls the relevant machinery with faked up callback data (so you can > > avoid all the stuff in thinkProcess which is written in C) > > Which machinery is that? callbackEnter:? I have the simulator and > reader image going. > here's the edited-down guts of thunkEntry, which is what you wasn't to simulate: long thunkEntry(void *thunkp, long *stackp) { ... if ((flags = interpreterProxy->ownVM(0)) < 0) { fprintf(stderr,"Warning; callback failed to own the VM\n"); return -1; } if (!(returnType = setjmp(vmcc.trampoline))) { ... interpreterProxy->sendInvokeCallbackContext(&vmcc); fprintf(stderr,"Warning; callback failed to invoke\n"); ... interpreterProxy->disownVM(flags); return -1; } ... interpreterProxy->disownVM(flags); switch (returnType) { case retword: return vmcc.rvs.valword; ... So I expect you want to do something like [self ownVM: 0. self sendInvokeCallbackContext: fakeVMCallbackContextAddress] forkAt: Processor activePriority + 1 You could even create a CArray or some such to hold onto the data for the callback (fakeVMCallbackContextAddress above). > > > BTW, this is /monstrously/ cool of you! > > Sure thing! > > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151009/27d55c6a/attachment.htm From leves at elte.hu Fri Oct 9 19:33:56 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Oct 9 19:34:00 2015 Subject: [squeak-dev] The Trunk: Collections-cmm.663.mcz In-Reply-To: References: Message-ID: There's one remaining thing to do here. The update map update-topa.337 references Collections-topa.662, but that's not in the Trunk repository anymore, so an error occurs during update. Levente On Thu, 8 Oct 2015, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-cmm.663.mcz > > ==================== Summary ==================== > > Name: Collections-cmm.663 > Author: cmm > Time: 8 October 2015, 10:19:13.283 am > UUID: 8e6500e4-15d6-43a8-8b85-0c8cb36f5a82 > Ancestors: Collections-mt.657 > >> From Tobias: Make Text more polymorphic with String. > > =============== Diff against Collections-mt.657 =============== > > Item was added: > + ----- Method: Text>>hashWithInitialHash: (in category 'comparing') ----- > + hashWithInitialHash: initialHash > + "Implemented to be polymorphic with String" > + ^ self string hashWithInitialHash: initialHash > + ! > > > From asqueaker at gmail.com Fri Oct 9 23:38:52 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 9 23:38:54 2015 Subject: [squeak-dev] The Trunk: Collections-cmm.663.mcz In-Reply-To: References: Message-ID: It looks like someone fixed it. On Fri, Oct 9, 2015 at 2:33 PM, Levente Uzonyi wrote: > There's one remaining thing to do here. The update map update-topa.337 > references Collections-topa.662, but that's not in the Trunk repository > anymore, so an error occurs during update. > > Levente > > > On Thu, 8 Oct 2015, commits@source.squeak.org wrote: > > Chris Muller uploaded a new version of Collections to project The Trunk: >> http://source.squeak.org/trunk/Collections-cmm.663.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-cmm.663 >> Author: cmm >> Time: 8 October 2015, 10:19:13.283 am >> UUID: 8e6500e4-15d6-43a8-8b85-0c8cb36f5a82 >> Ancestors: Collections-mt.657 >> >> From Tobias: Make Text more polymorphic with String. >>> >> >> =============== Diff against Collections-mt.657 =============== >> >> Item was added: >> + ----- Method: Text>>hashWithInitialHash: (in category 'comparing') ----- >> + hashWithInitialHash: initialHash >> + "Implemented to be polymorphic with String" >> + ^ self string hashWithInitialHash: initialHash >> + ! >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151009/f983de15/attachment.htm From lewis at mail.msen.com Sat Oct 10 01:47:21 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Oct 10 01:47:25 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> Message-ID: <20151010014721.GA58023@shell.msen.com> Chris, When you get a chance, can you please try updating a 4.6 image and see if the result looks good to you? I get one dirty package, which maybe just means we need to add another update map (or fix an existing one). I was basically just trying to make sure that my attempt to fix the empty MCZ files was the right thing to do, and that the resulting updated image was in fact correct. I was not trying to provide any additional updates to the 4.6 stream unless they are really necessary. Thanks, Dave On Fri, Oct 09, 2015 at 10:07:17AM -0500, Chris Muller wrote: > Introducing MC overrides into the standard package structure created a > giant PITA for the already-delayed release. Frankly, I think > Breakpoints should be moved an external package at this point. It > introduces package dependency hackings, compiled method hackings, and > file-out hackings. All just so I can put an IMPLICIT "self halt" at > the TOP of a method ONLY. I'm sorry Eliot, maybe I'm just not seeing > it, but it seems like an insanely bad trade-off.. > > On Fri, Oct 9, 2015 at 1:43 AM, Eliot Miranda wrote: > > Hi David, > > > > Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. > > > > _,,,^..^,,,_ (phone) > > > >> On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: > >> > >>> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: > >>>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: > >>>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: > >>>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev > >>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html > >>>>> > >>>>> I also see at least one mcz in the squeak46 repository that is empty, apparently > >>>>> originally loaded from trunk for the release image, but somehow copied with > >>>>> errors from trunk to squeak46. > >>>>> > >>>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There > >>>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. > >>>> > >>>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, > >>>> so I copied the good ones from trunk to squeak46. > >>> > >>> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray > >>> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ > >>> packages in that repo. I presume that this is an error, some artifact of copying > >>> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by > >>> copying the good (not empty) MCZ files from trunk to squeak46. > >>> > >>> All is well, except that I now have a dirty package in Kernel after doing an > >>> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which > >>> is one that was moved around and refactored in the later trunk development. > >>> > >>> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint > >>> will hang the system if it goes missing), can someone (Chris?) please confirm > >>> that those packages were *not* supposed to be empty, and that the good copies > >>> from trunk would be the right thing to have in squeak46? > >> > >> And I guess that the related question would be - for a fully updated Squeak 4.6 > >> image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? > >> > >> Is it this: > >> > >> CompiledMethod>>hasBreakpoint > >> ^ false > >> > >> > >> Or this: > >> > >> CompiledMethod>>hasBreakpoint > >> ^BreakpointManager methodHasBreakpoint: self > >> > >> I think that the former version is the pre-Spur implementation, and the > >> latter came from the Spur transition in trunk Kernel-cmm.936. > >> > >> I note also that WrappedBreakpoint>>hasBreakpoint just answers true in > >> squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint > >> would just answer false. > >> > >> Is that right? > >> > >> Thanks, > >> Dave > >> > >> > > From henrylavado at gmx.com Sat Oct 10 02:11:52 2015 From: henrylavado at gmx.com (Henry Lavado) Date: Sat Oct 10 02:11:54 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444393846744-4854700.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> Message-ID: <561873E8.1040505@gmx.com> Hi Marcel, I got quite far with your suggestion. I had to remove -mno-cygwin flags in many places, when I switched to i686-w64-mingw32-gcc and so. mvm managed to compile and link many libs. However, I have hit an error and I wonder if you've any ideas. Trace is below. Regards, Henry make -C ./build/FilePlugin BUILD=build \ -f../../Makefile.plugin \ PLATDIR=../../../../platforms BASEDIR=../../. \ PLUGINSRCDIR=../../../../src VMSRCDIR=../../../../spursrc \ LIBNAME=FilePlugin COGDEFS="-DCOGMTVM=0 -DDEBUGVM=0" XDEFS=-DSQUEAK_BUILTIN_PLUGIN \ ../.././build/vm/FilePlugin.lib make[1]: Entering directory '/home/rabbit/Cog/build.win32x86/squeak.cog.spur/build/FilePlugin' i686-w64-mingw32-gcc -isystem/usr/include/mingw -I/usr/include/w32api -msse2 -ggdb2 -mwindows -mdll -mwin32 -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -I. -I../../../../platforms/win32/third-party/dx9sdk/Include -I../../../../spursrc/vm -I../../../../platforms/win32/vm -I../../../../platforms/Cross/vm -I../../../../src/plugins/FilePlugin -I../../../../platforms/win32/plugins/FilePlugin -I../../../../platforms/Cross/plugins/FilePlugin -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SERVICE -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DVM_NAME=\"\" -DX86 -DSQUEAK_BUILTIN_PLUGIN -c ../../../../src/plugins/FilePlugin/FilePlugin.c ../../../../src/plugins/FilePlugin/FilePlugin.c:1:0: warning: stack probing requires -maccumulate-outgoing-args for correctness /* Automatically generated by ^ i686-w64-mingw32-gcc -isystem/usr/include/mingw -I/usr/include/w32api -msse2 -ggdb2 -mwindows -mdll -mwin32 -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -I. -I../../../../platforms/win32/third-party/dx9sdk/Include -I../../../../spursrc/vm -I../../../../platforms/win32/vm -I../../../../platforms/Cross/vm -I../../../../src/plugins/FilePlugin -I../../../../platforms/win32/plugins/FilePlugin -I../../../../platforms/Cross/plugins/FilePlugin -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SERVICE -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DVM_NAME=\"\" -DX86 -DSQUEAK_BUILTIN_PLUGIN -c ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c:1:0: warning: stack probing requires -maccumulate-outgoing-args for correctness /**************************************************************************** ^ In file included from /usr/include/w32api/windows.h:72:0, from ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c:22: /usr/include/w32api/winuser.h:2168:3: warning: ?dllimport? attribute ignored [-Wattributes] WINUSERAPI WINBOOL WINAPI UpdateLayeredWindowIndirect (HWND hWnd, const UPDATELAYEREDWINDOWINFO *pULWInfo); ^ ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c: In function ?sqFileSync?: ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c:305:22: error: expected expression before ?SQFile? return sqFileFlush(SQFile *f); ^ ../../Makefile.plugin:164: recipe for target 'sqWin32FilePrims.o' failed make[1]: *** [sqWin32FilePrims.o] Error 1 On 10/9/2015 8:30 AM, marcel.taeumel wrote: > Hi Henry, > > here is how it works with GCC 4.9.2 using only the SVN C sources (i.e. w/o > having to run VM-Maker): > > 1. Install latest Cygwin. > 2. Load all requried mingw64-i686-* packages (binutils, gcc-g++, runtime > should be enough) > 3. Check-out latest cog sources. > 4. Adapt the particular Makefile (e.g. > C:\Tools\cogvm_cygwin\build.win32x86\squeak.cog.spur\Markfile) to find the > tools with the "mingw64-i686*" prefix. Do it also with the "Makefile.plugin" > file. > 5. Fix some build-in bee-5.patch > flags that do not work > with GCC 4 anymore. (see attached patch file). > 6. Open Cygwin and run "./mvm" > > Please find attached a patch to update the Windows build files. We will > integrate it into the SVN soon. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854700.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Marcel.Taeumel at hpi.de Sat Oct 10 08:14:41 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 10 08:24:55 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <561873E8.1040505@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> Message-ID: <1444464881103-4854856.post@n4.nabble.com> Hi Henry, please install the patch directly after checkout: bee-5.patch Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854856.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Sat Oct 10 09:10:20 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Oct 10 09:10:23 2015 Subject: [squeak-dev] In the hacker news Message-ID: Hackaday post: http://hackaday.com/2015/10/08/latest-raspberry-pi-images-have-improved-scratch/ Hacker News post: https://news.ycombinator.com/item?id=10363088 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151010/34a10fdf/attachment.htm From henrylavado at gmx.com Sat Oct 10 12:58:38 2015 From: henrylavado at gmx.com (Henry Lavado) Date: Sat Oct 10 12:58:40 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444464881103-4854856.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> Message-ID: <56190B7E.9010204@gmx.com> Marcel, here is a list of issues I ran into, and my attempts at solving them. The result is more compilation errors. 1) using Cygwin 64bit I had a problem with cygwin1.dll causing a seg fault. There is literature about the problem mentioning fixing some source and recompiling. I bailed on this effort. 2) switched to 32bit Cygwin 3) The patch file is for 64bit so I am translating by hand and attaching the results. NOTE #1 4) 32-bit patch couldn't find files to modify, so I modified by hand. 5) running mvm, I got another set of errors for undeclared, late in the build, listed below NOTES #1 - I think there are 2 spots with -mno-cygwin that are not covered by the script but I didn't want to figure out how to encode it correctly. It would be better with a new patch generated. #2 - since 32 and 64 -bit windows are different, having 2 different build targets may make sense. Regards, Henry i686-pc-mingw32-gcc -o build/vm/sqWin32Main.o -I/usr/i686-pc-mingw32/sys-root/mingw/include -msse2 -ggdb2 -mwindows -mthreads -mwin32 -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args -mstack-arg-probe -D_MT -O2 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero -I. -I../../spursrc/vm -I../../platforms/win32/vm -I../../platforms/Cross/vm -I../../platforms/win32/third-party/dx9sdk/Include -DCOGMTVM=0 -DDEBUGVM=0 -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SERVICE -DNO_STD_FILE_SUPPORT -D'TZ="EDT"' -DNDEBUG -D'VM_LABEL(foo)=0' -DLSB_FIRST -D'VM_NAME="Squeak"' -DX86 -DCROQUET -c ../../platforms/win32/vm/sqWin32Main.c ../../platforms/win32/vm/sqWin32Main.c:1:0: warning: unwind tables currently require either a frame pointer or -maccumulate-outgoing-args for correctness [enabled by default] ../../platforms/win32/vm/sqWin32Main.c: In function ?squeakExceptionHandler?: ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_RC_NEAR? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: note: each undeclared identifier is reported only once for each function it appears in ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_PC_53? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_INVALID? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_ZERODIVIDE? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_OVERFLOW? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_UNDERFLOW? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_INEXACT? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:18: error: ?_EM_DENORMAL? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:31: error: ?_MCW_EM? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:41: error: ?_MCW_RC? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:51: error: ?_MCW_PC? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:133:61: error: ?_MCW_IC? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c: In function ?sqMain?: ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_RC_NEAR? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_PC_53? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_INVALID? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_ZERODIVIDE? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_OVERFLOW? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_UNDERFLOW? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_INEXACT? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:14: error: ?_EM_DENORMAL? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:27: error: ?_MCW_EM? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:37: error: ?_MCW_RC? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:47: error: ?_MCW_PC? undeclared (first use in this function) ../../platforms/win32/vm/sqWin32Main.c:1306:57: error: ?_MCW_IC? undeclared (first use in this function) Makefile:324: recipe for target 'build/vm/sqWin32Main.o' failed make: *** [build/vm/sqWin32Main.o] Error 1 -------------- next part -------------- Index: build.win32x86/squeak.cog.spur/Makefile =================================================================== --- build.win32x86/squeak.cog.spur/Makefile (revision 3440) +++ build.win32x86/squeak.cog.spur/Makefile (working copy) @@ -102,9 +102,9 @@ DXDIR:= $(PLATDIR)/win32/third-party/dx9sdk/Include ############################################################################# -# C compiler settings (gcc-3.4.4 cygwin 19.24) +# C compiler settings (gcc-4.9.2 cygwin) # -CC:=gcc +CC:=i686-pc-mingw32-gcc # VM config flags. ifeq ("$(CONFIGURATION)","product") @@ -126,11 +126,12 @@ # Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h) WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api +INCLUDEPATH:= -I/usr/i686-pc-mingw32/sys-root/mingw/include # define _MT to eliminate the inline versions of printf et al in mingw/stdio.h -NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mno-cygwin -mwin32 \ - -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) $(NOBUILTIN) +NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero +CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mwin32 \ + -mno-rtd -mms-bitfields -maccumulate-outgoing-args -mstack-arg-probe \ + $(OFLAGS) $(NOBUILTIN) TZ:=$(shell date +%Z) DEFS:= $(COGDEFS) $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \ -DNO_SERVICE -DNO_STD_FILE_SUPPORT -D'TZ="$(TZ)"' \ @@ -145,26 +146,28 @@ # The switch '-mwindows' gives us a GUI app instead of a console app. # Newer cygwins want --export-all-symbols in place of --export-dynamic. # -LD:= gcc -EXPORT:=--export-dynamic -#EXPORT:=--export-all-symbols -BASELDFLAGS:=-mno-cygwin -mthreads -Wl,--large-address-aware,$(EXPORT) -L/usr/lib/mingw +LD:=i686-w64-mingw32-gcc +#EXPORT:=--export-dynamic +EXPORT:=--export-all-symbols +BASELDFLAGS:=-mthreads -Wl,--large-address-aware,$(EXPORT) \ + -L/usr/i686-pc-mingw32/sys-root/mingw/lib LDFLAGS:= -mwindows $(BASELDFLAGS) CONSOLELDFLAGS:= -mconsole $(BASELDFLAGS) STDLIBS:= -lddraw -ldinput -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm \ - -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lcrtdll \ - -ldsound -lsecur32 + -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lmsvcrt \ + -ldsound -lsecur32 -lws2_32 ############################################################################# # Tools to use # -AR:= ar rc +AR:= i686-pc-mingw32-ar rc CP:= cp RM:= rm -DLLTOOL:= dlltool -DLLWRAP:= dllwrap -STRIP:= strip -OBJCOPY:= objcopy +DLLTOOL:= i686-pc-mingw32-dlltool +DLLWRAP:= i686-pc-mingw32-dllwrap +STRIP:= i686-pc-mingw32-strip +OBJCOPY:= i686-pc-mingw32-objcopy +NM:= i686-pc-mingw32-nm ############################################################################# # RC settings @@ -171,7 +174,7 @@ # # Note: RC compiles the .rc files into linkable .o files # -RC:= windres +RC:= i686-pc-mingw32-windres SVNREV:= $(shell sed -e "s/^static.*SvnRawRevisionString.*Rev: \([0-9][0-9]*\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h) RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32 -DFILEVERSIONVALUES=4,0,$(SVNREV),0 '-DFILEVERSIONSTRING=\"5.0.$(SVNREV)\\0\"' @@ -230,13 +233,13 @@ @echo ----------------------------------------------------- eitheror.exe: $(WIN32UTILDIR)/eitheror.c - $(CC) -o $@ -O1 -mconsole -mno-cygwin $< + $(CC) -o $@ -O1 -mconsole $< mingw32ver.exe: $(WIN32UTILDIR)/mingw32ver.c - $(CC) -o $@ -O1 -mconsole -mno-cygwin $< + $(CC) -o $@ -O1 -mconsole $< mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c - $(CC) -o $@ -mconsole -mno-cygwin $< + $(CC) -o $@ -mconsole $< $(BTOBJ): $(WIN32MISCDIR)/btext.c $(CC) -c -o $@ -fomit-frame-pointer -O2 $< @@ -250,13 +253,13 @@ $(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c $(LD) $(LDFLAGS) -o $(VMEXE) \ $(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ) - nm --numeric-sort --defined-only -f bsd $(VMEXE) >$(VMMAP) + $(NM) --numeric-sort --defined-only -f bsd $(VMEXE) >$(VMMAP) $(CONSOLEVMEXE): $(VMOBJ) $(LIBS) $(VMEXP) resource.o $(BTOBJ) $(ETOBJ) $(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c $(LD) $(CONSOLELDFLAGS) -o $(CONSOLEVMEXE) \ $(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ) - nm --numeric-sort --defined-only -f bsd $(CONSOLEVMEXE) >$(CONSOLEVMMAP) + $(NM) --numeric-sort --defined-only -f bsd $(CONSOLEVMEXE) >$(CONSOLEVMMAP) ifneq ($STRIPEXE,) $(STRIPEXE): $(VMEXE) Index: build.win32x86/squeak.cog.spur/Makefile.plugin =================================================================== --- build.win32x86/squeak.cog.spur/Makefile.plugin (revision 3440) +++ build.win32x86/squeak.cog.spur/Makefile.plugin (working copy) @@ -1,7 +1,7 @@ ############################################################################# # Generic Makefile for plugins ############################################################################# -AR:= ar rc +AR:= i686-pc-mingw32-ar rc CP:= cp RM:= rm @@ -46,18 +46,19 @@ LIBSRC:= $(notdir $(MAKERSRC) $(WIN32SRC) $(CROSSSRC)) ############################################################################# -# C compiler settings (gcc-3.4.4 cygwin 19.24) +# C compiler settings (gcc-4.9.2 cygwin 19.24) # NDEBUG:=-DNDEBUG # Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h) WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -CC:= gcc +CC:=i686-pc-mingw32-gcc # define _MT to eliminate the inline versions of printf et al in mingw/stdio.h OFLAGS:= -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops \ - -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api -CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mdll -mno-cygwin -mwin32 \ - -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) + -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero +INCLUDEPATH:= -I/usr/i686-pc-mingw32/sys-root/mingw/include +CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mdll -mwin32 \ + -mno-rtd -mms-bitfields -maccumulate-outgoing-args \ + -mstack-arg-probe $(OFLAGS) DEFS:= $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \ -DNO_SERVICE -DNO_STD_FILE_SUPPORT \ $(NDEBUG) -DLSB_FIRST -DVM_NAME=\"$(VM)\" -DX86 $(XDEFS) @@ -68,9 +69,9 @@ # Note: By default DLLTOOL/DLLWRAP do the work for everything related to plugins # but if LINK_WITH_GCC we use gcc and if LINK_WITH_GPP we use g++. # -DLLTOOL:= dlltool -DLLWRAP:= dllwrap -mno-cygwin -#OPTSTRIP:= strip # for production +DLLTOOL:= i686-pc-mingw32-dlltool +DLLWRAP:= i686-pc-mingw32-dllwrap +#OPTSTRIP:= i686-pc-mingw32-strip # for production OPTSTRIP:= echo not doing strip .SUFFIXES: .c .cpp .o .s .rc .res .dep Index: build.win32x86/squeak.cog.spur/mvm =================================================================== --- build.win32x86/squeak.cog.spur/mvm (revision 3440) +++ build.win32x86/squeak.cog.spur/mvm (working copy) @@ -4,10 +4,10 @@ make assert 2>&1 | tee LOGA make 2>&1 | tee LOGF ls -rlt build*/vm/Squeak*.exe -if test -f ../../sources/SqueakV41.sources; then +if test -f ../../sources/SqueakV50.sources; then for d in build buildast builddbg; do - if [ -d $d/vm -a ! -f $d/vm/SqueakV41.sources ]; then - ln ../../sources/SqueakV41.sources $d/vm + if [ -d $d/vm -a ! -f $d/vm/SqueakV50.sources ]; then + ln ../../sources/SqueakV50.sources $d/vm fi done fi Index: build.win32x86/squeak.cog.spur/plugins.ext =================================================================== --- build.win32x86/squeak.cog.spur/plugins.ext (revision 3440) +++ build.win32x86/squeak.cog.spur/plugins.ext (working copy) @@ -2,7 +2,5 @@ # N.B. SqueakSSL is not ready for prime time. Compiles but does not link fully. # See platforms/win32/plugins/SqueakSSL/Makefile EXTERNAL_PLUGINS = \ -BochsIA32Plugin \ SqueakFFIPrims \ Win32OSProcessPlugin - Index: build.win32x86/squeak.cog.v3/Makefile =================================================================== --- build.win32x86/squeak.cog.v3/Makefile (revision 3440) +++ build.win32x86/squeak.cog.v3/Makefile (working copy) @@ -118,9 +118,9 @@ DXDIR:= $(PLATDIR)/win32/third-party/dx9sdk/Include ############################################################################# -# C compiler settings (gcc-3.4.4 cygwin 19.24) +# C compiler settings (gcc-4.9.2 cygwin) # -CC:=gcc +CC:=i686-pc-mingw32-gcc # VM config flags. ifeq ("$(CONFIGURATION)","product") @@ -142,15 +142,15 @@ else COGDEFS:=-DCOGMTVM=0 -DDEBUGVM=$(DEBUGVM) endif - # Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h) WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api +# INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api +INCLUDEPATH:= -I/usr/i686-pc-mingw32/sys-root/mingw/include # define _MT to eliminate the inline versions of printf et al in mingw/stdio.h -NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mno-cygwin -mwin32 \ - -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) $(NOBUILTIN) +NOBUILTIN:= -D_MT -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero +CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mthreads -mwin32 \ + -mno-rtd -mms-bitfields -maccumulate-outgoing-args -mstack-arg-probe $(OFLAGS) $(NOBUILTIN) TZ:=$(shell date +%Z) DEFS:= $(COGDEFS) $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \ -DNO_SERVICE -DNO_STD_FILE_SUPPORT -D'TZ="$(TZ)"' \ @@ -165,26 +165,28 @@ # The switch '-mwindows' gives us a GUI app instead of a console app. # Newer cygwins want --export-all-symbols in place of --export-dynamic. # -LD:= gcc -EXPORT:=--export-dynamic -#EXPORT:=--export-all-symbols -BASELDFLAGS:=-mno-cygwin -mthreads -Wl,--large-address-aware,$(EXPORT) -L/usr/lib/mingw + +LD:=i686-w64-mingw32-gcc +#EXPORT:=--export-dynamic +EXPORT:=--export-all-symbols +BASELDFLAGS:=-mthreads -Wl,--large-address-aware,$(EXPORT) -L/usr/i686-pc-mingw32/sys-root/mingw/lib LDFLAGS:= -mwindows $(BASELDFLAGS) CONSOLELDFLAGS:= -mconsole $(BASELDFLAGS) STDLIBS:= -lddraw -ldinput -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm \ - -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lcrtdll \ - -ldsound -lsecur32 + -lversion -lwininet -luser32 -lgdi32 -lpsapi -lkernel32 -lmsvcrt \ + -ldsound -lsecur32 -lws2_32 ############################################################################# # Tools to use # -AR:= ar rc +AR:= i686-pc-mingw32-ar rc CP:= cp RM:= rm -DLLTOOL:= dlltool -DLLWRAP:= dllwrap -STRIP:= strip -OBJCOPY:= objcopy +DLLTOOL:= i686-pc-mingw32-dlltool +DLLWRAP:= i686-pc-mingw32-dllwrap +STRIP:= i686-pc-mingw32-strip +OBJCOPY:= i686-pc-mingw32-objcopy +NM:=i686-pc-mingw32-nm ############################################################################# # RC settings @@ -191,7 +193,7 @@ # # Note: RC compiles the .rc files into linkable .o files # -RC:= windres +RC:= i686-pc-mingw32-windres SVNREV:= $(shell sed -e "s/^static.*SvnRawRevisionString.*Rev: \([0-9][0-9]*\).*/\\1/p" -e d $(PLATDIR)/Cross/vm/sqSCCSVersion.h) RCFLAGS:= --include-dir $(PLATDIR)/win32/misc -D_WIN32 -DFILEVERSIONVALUES=4,0,$(SVNREV),0 '-DFILEVERSIONSTRING=\"4.0.$(SVNREV)\\0\"' @@ -269,13 +271,13 @@ @echo ----------------------------------------------------- eitheror.exe: $(WIN32UTILDIR)/eitheror.c - $(CC) -o $@ -O1 -mconsole -mno-cygwin $< + $(CC) -o $@ -O1 -mconsole $< mingw32ver.exe: $(WIN32UTILDIR)/mingw32ver.c - $(CC) -o $@ -O1 -mconsole -mno-cygwin $< + $(CC) -o $@ -O1 -mconsole $< mkNamedPrims.exe: $(WIN32UTILDIR)/mkNamedPrims.c - $(CC) -o $@ -mconsole -mno-cygwin $< + $(CC) -o $@ -mconsole $< $(BTOBJ): $(WIN32MISCDIR)/btext.c $(CC) -c -o $@ -fomit-frame-pointer -O2 $< @@ -289,13 +291,13 @@ $(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c $(LD) $(LDFLAGS) -o $(VMEXE) \ $(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ) - nm --numeric-sort --defined-only -f bsd $(VMEXE) >$(VMMAP) + $(NM) --numeric-sort --defined-only -f bsd $(VMEXE) >$(VMMAP) $(CONSOLEVMEXE): $(VMOBJ) $(LIBS) $(VMEXP) resource.o $(BTOBJ) $(ETOBJ) $(CC) -o $(OBJDIR)/version.o $(CFLAGS) $(INCLUDES) $(DEFS) -c $(WIN32DIR)/version.c $(LD) $(CONSOLELDFLAGS) -o $(CONSOLEVMEXE) \ $(BTOBJ) $(VMOBJ) $(VMEXP) $(OBJDIR)/resource.o $(LIBS) $(STDLIBS) $(ETOBJ) - nm --numeric-sort --defined-only -f bsd $(CONSOLEVMEXE) >$(CONSOLEVMMAP) + $(NM) --numeric-sort --defined-only -f bsd $(CONSOLEVMEXE) >$(CONSOLEVMMAP) ifneq ($STRIPEXE,) $(STRIPEXE): $(VMEXE) Index: build.win32x86/squeak.cog.v3/Makefile.plugin =================================================================== --- build.win32x86/squeak.cog.v3/Makefile.plugin (revision 3440) +++ build.win32x86/squeak.cog.v3/Makefile.plugin (working copy) @@ -1,7 +1,7 @@ ############################################################################# # Generic Makefile for plugins ############################################################################# -AR:= ar rc +AR:= i686-pc-mingw32-ar rc CP:= cp RM:= rm @@ -46,18 +46,19 @@ LIBSRC:= $(notdir $(MAKERSRC) $(WIN32SRC) $(CROSSSRC)) ############################################################################# -# C compiler settings (gcc-3.4.4 cygwin 19.24) +# C compiler settings (gcc-4.9.2 cygwin) # NDEBUG:=-DNDEBUG # Set minimum version to WindowsXP (see /cygwin/usr/include//w32api/w32api.h) WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -CC:= gcc +CC:= i686-pc-mingw32-gcc # define _MT to eliminate the inline versions of printf et al in mingw/stdio.h OFLAGS:= -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops \ - -fno-builtin-printf -fno-builtin-putchar -fno-builtin-fprintf -INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api -CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mdll -mno-cygwin -mwin32 \ - -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args $(OFLAGS) + -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero +# INCLUDEPATH:= -isystem/usr/include/mingw -I/usr/include/w32api +INCLUDEPATH:= -I/usr/i686-pc-mingw32/sys-root/mingw/include +CFLAGS:= $(INCLUDEPATH) -msse2 -ggdb2 -mwindows -mdll -mwin32 \ + -mno-rtd -mms-bitfields -maccumulate-outgoing-args -mstack-arg-probe $(OFLAGS) DEFS:= $(WINVER) -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN \ -DNO_SERVICE -DNO_STD_FILE_SUPPORT \ $(NDEBUG) -DLSB_FIRST -DVM_NAME=\"$(VM)\" -DX86 $(XDEFS) @@ -68,9 +69,9 @@ # Note: By default DLLTOOL/DLLWRAP do the work for everything related to plugins # but if LINK_WITH_GCC we use gcc and if LINK_WITH_GPP we use g++. # -DLLTOOL:= dlltool -DLLWRAP:= dllwrap -mno-cygwin -#OPTSTRIP:= strip # for production +DLLTOOL:=i686-pc-mingw32-dlltool +DLLWRAP:=i686-pc-mingw32-dllwrap +#OPTSTRIP:= i686-pc-mingw32-strip # for production OPTSTRIP:= echo not doing strip .SUFFIXES: .c .cpp .o .s .rc .res .dep Index: build.win32x86/squeak.cog.v3/mvm =================================================================== --- build.win32x86/squeak.cog.v3/mvm (revision 3440) +++ build.win32x86/squeak.cog.v3/mvm (working copy) @@ -1,16 +1,16 @@ #!/bin/sh rm -rf build*/vm/Croquet*.exe build*/vm/Squeak*.exe -make debug 2>&1 | tee LOGD -make assert 2>&1 | tee LOGA -make 2>&1 | tee LOGF -make THREADING=multi CONFIGURATION=debug 2>&1 | tee LOGTD -make THREADING=multi CONFIGURATION=assert 2>&1 | tee LOGTA -make THREADING=multi 2>&1 | tee LOGTF +make debug 2>LOGD_E | tee LOGD +make assert 2>LOGA_E | tee LOGA +make 2>LOGF_E | tee LOGF +#make THREADING=multi CONFIGURATION=debug 2>&1 | tee LOGTD +#make THREADING=multi CONFIGURATION=assert 2>&1 | tee LOGTA +#make THREADING=multi 2>&1 | tee LOGTF ls -rlt build*/vm/Squeak*.exe -if test -f ../../sources/SqueakV41.sources; then +if test -f ../../sources/SqueakV46.sources; then for d in build buildast builddbg; do - if [ -d $d/vm -a ! -f $d/vm/SqueakV41.sources ]; then - ln ../../sources/SqueakV41.sources $d/vm + if [ -d $d/vm -a ! -f $d/vm/SqueakV46.sources ]; then + ln ../../sources/SqueakV46.sources $d/vm fi done fi Index: build.win32x86/squeak.cog.v3/plugins.ext =================================================================== --- build.win32x86/squeak.cog.v3/plugins.ext (revision 3440) +++ build.win32x86/squeak.cog.v3/plugins.ext (working copy) @@ -2,7 +2,5 @@ # N.B. SqueakSSL is not ready for prime time. Compiles but does not link fully. # See platforms/win32/plugins/SqueakSSL/Makefile EXTERNAL_PLUGINS = \ -BochsIA32Plugin \ SqueakFFIPrims \ Win32OSProcessPlugin - Index: platforms/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c =================================================================== --- platforms/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c (revision 3440) +++ platforms/Cross/plugins/Mpeg3Plugin/libmpeg/changesForSqueak.c (working copy) @@ -128,7 +128,7 @@ #endif #ifdef WIN32 -int bzero(char* block, long size) { +void bzero(void* block, size_t size) { ZeroMemory(block,size); } #endif Index: platforms/win32/Makefile.mingw32 =================================================================== --- platforms/win32/Makefile.mingw32 (revision 3440) +++ platforms/win32/Makefile.mingw32 (working copy) @@ -1,5 +1,5 @@ ############################################################################# -# Makefile for Win32 Squeak using gcc-2.95.2 and MingW32 +# Makefile for Win32 Squeak using gcc-4.9.2 and cygwin ############################################################################# ifndef SRCDIR include plugins/plugins.ext @@ -10,7 +10,7 @@ endif -AR = ar rc +AR = i686-pc-mingw32-ar rc CP = cp RM = rm @@ -92,7 +92,7 @@ ############################################################################# # C compiler settings (for egcs-1.1.2) # -CC= gcc +CC= i686-pc-mingw32-gcc OFLAGS= -O2 CFLAGS= -g -mpentium -mwindows -Werror-implicit-function-declaration -fomit-frame-pointer -funroll-loops -fschedule-insns2 $(OFLAGS) DEFS= -DWIN32_FILE_SUPPORT -DNO_SERVICE -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DVM_NAME=\"$(VM)\" -DX86 $(XDEFS) @@ -110,7 +110,7 @@ # Note: I had to use 'gcc' instead of 'ld' to prevent unresolved symbols # The switch '-mwindows' gives us a GUI app instead of a console app. # -LD= gcc +LD= i686-pc-mingw32-ld LDFLAGS= -mwindows STDLIBS= -lddraw -ldinput -lopengl32 -lwsock32 -lcomdlg32 -lole32 -lwinmm -luser32 -lgdi32 -lkernel32 CRTLIB = -lcrtdll @@ -128,8 +128,8 @@ # # Note: DLLTOOL/DLLWRAP does the work for everything related to plugins # -DLLTOOL= dlltool -DLLWRAP= dllwrap +DLLTOOL=i686-pc-mingw32-dlltool +DLLWRAP=i686-pc-mingw32-dllwrap ############################################################################# # RC settings @@ -137,7 +137,7 @@ # Note: RC compiles the .rc files into linkable .o files # !!!WARNING!!! windres can break if you have MacAfee VShield running!!! # -RC= windres +RC=i686-pc-mingw32-windres RCFLAGS= --include-dir $(SRCDIR)/misc .SUFFIXES: Index: platforms/win32/plugins/DropPlugin/sqWin32Drop.c =================================================================== --- platforms/win32/plugins/DropPlugin/sqWin32Drop.c (revision 3440) +++ platforms/win32/plugins/DropPlugin/sqWin32Drop.c (working copy) @@ -22,13 +22,6 @@ #endif int sqSecFileAccessCallback(void *function) { -#ifndef _MSC_VER -#warning "REMOVE THIS NONSENSE" -#warning "REMOVE THIS NONSENSE" -#warning "REMOVE THIS NONSENSE" -#warning "REMOVE THIS NONSENSE" -#warning "REMOVE THIS NONSENSE" -#endif return 0; } Index: platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c =================================================================== --- platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c (revision 3440) +++ platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c (working copy) @@ -289,7 +289,7 @@ bmi->bmiHeader.biWidth = nPix; bmi->bmiHeader.biHeight = 1; bmi->bmiHeader.biSizeImage = 0; - bitsPtr = dispBits + start + (updateRect.top * pitch); + bitsPtr = (int)dispBits + start + (updateRect.top * pitch); for(line = updateRect.top; line < updateRect.bottom; line++) { lines = SetDIBitsToDevice(dc, left, line, nPix, 1, 0, 0, 0, 1, (void*) bitsPtr, bmi, DIB_RGB_COLORS); Index: platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c =================================================================== --- platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c (revision 3440) +++ platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c (working copy) @@ -1363,7 +1363,7 @@ of windows get this done without failing. */ if(runningVista && socketType == TCPSocketType) { unsigned int val = 65536; - setsockopt(newSocket, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)); + setsockopt(newSocket, SOL_SOCKET, SO_RCVBUF, (char*)&val, sizeof(val)); } /* initialize private socket structure */ Index: platforms/win32/plugins/SocketPlugin/winsock2.h =================================================================== --- platforms/win32/plugins/SocketPlugin/winsock2.h (revision 3440) +++ platforms/win32/plugins/SocketPlugin/winsock2.h (working copy) @@ -825,8 +825,8 @@ SOCKET_ADDRESS Address[1]; } SOCKET_ADDRESS_LIST, * LPSOCKET_ADDRESS_LIST; -#ifndef __BLOB_T_DEFINED /* also in wtypes.h and nspapi.h */ -#define __BLOB_T_DEFINED +#ifndef _BLOB_DEFINED /* also in wtypes.h and nspapi.h */ +#define _BLOB_DEFINED typedef struct _BLOB { ULONG cbSize; BYTE *pBlobData; Index: platforms/win32/vm/sqGnu.h =================================================================== --- platforms/win32/vm/sqGnu.h (revision 3440) +++ platforms/win32/vm/sqGnu.h (working copy) @@ -164,7 +164,7 @@ #define PROFILE_BYTECODE(x) __asm__("movl %0, _bcProfileCurrent" : : "i" (x)) -#define PROFILE_BYTECODE_END __asm__(" +#define PROFILE_BYTECODE_END __asm__(" \ cmpl $0, _profilerActive;\ je 0f;\ pushl %ebx;\ Index: platforms/win32/vm/sqWin32GUID.c =================================================================== --- platforms/win32/vm/sqWin32GUID.c (revision 3440) +++ platforms/win32/vm/sqWin32GUID.c (working copy) @@ -11,7 +11,10 @@ #include #include #include + +#define DIRECTINPUT_VERSION 0x0800 #include + #include Index: platforms/win32/vm/sqWin32Threads.c =================================================================== --- platforms/win32/vm/sqWin32Threads.c (revision 3440) +++ platforms/win32/vm/sqWin32Threads.c (working copy) @@ -13,7 +13,6 @@ #include #include #ifdef __MINGW32__ -# define _STRUCT_NAME(foo) foo # include #endif #include Index: src/plugins/HostWindowPlugin/HostWindowPlugin.c =================================================================== --- src/plugins/HostWindowPlugin/HostWindowPlugin.c (revision 3440) +++ src/plugins/HostWindowPlugin/HostWindowPlugin.c (working copy) @@ -370,7 +370,7 @@ { sqInt bottom; sqInt d; - unsigned *dispBits; + unsigned char *dispBits; sqInt h; sqInt left; sqInt ok; @@ -381,7 +381,7 @@ windowIndex = stackIntegerValue(8); success(isWords(stackValue(7))); - dispBits = ((unsigned *) (firstIndexableField(stackValue(7)))); + dispBits = ((unsigned char *) (firstIndexableField(stackValue(7)))); w = stackIntegerValue(6); h = stackIntegerValue(5); d = stackIntegerValue(4); Index: src/plugins/MIDIPlugin/MIDIPlugin.c =================================================================== --- src/plugins/MIDIPlugin/MIDIPlugin.c (revision 3440) +++ src/plugins/MIDIPlugin/MIDIPlugin.c (working copy) @@ -212,7 +212,7 @@ if (failed()) { return null; } - sz = sqMIDIGetPortName(portNum, portName, 0xFF); + sz = sqMIDIGetPortName(portNum, (int)portName, 0xFF); nameObj = instantiateClassindexableSize(classString(), sz); if (failed()) { return null; Index: src/plugins/SerialPlugin/SerialPlugin.c =================================================================== --- src/plugins/SerialPlugin/SerialPlugin.c (revision 3440) +++ src/plugins/SerialPlugin/SerialPlugin.c (working copy) @@ -185,7 +185,7 @@ success((startIndex >= 1) && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); arrayPtr = ((((sqInt)array)) + startIndex) - 1; - bytesRead = serialPortReadInto( portNum, count, arrayPtr); + bytesRead = serialPortReadInto( portNum, count, (void*)arrayPtr); _return_value = integerObjectOf(bytesRead); if (failed()) { return null; @@ -219,7 +219,7 @@ && (((startIndex + count) - 1) <= (byteSizeOf(((sqInt)(long)(array) - BaseHeaderSize))))); if (!(failed())) { arrayPtr = ((((sqInt)array)) + startIndex) - 1; - bytesWritten = serialPortWriteFrom(portNum, count, arrayPtr); + bytesWritten = serialPortWriteFrom(portNum, count, (void*)arrayPtr); } _return_value = integerObjectOf(bytesWritten); if (failed()) { Index: src/plugins/SoundCodecPrims/SoundCodecPrims.c =================================================================== --- src/plugins/SoundCodecPrims/SoundCodecPrims.c (revision 3440) +++ src/plugins/SoundCodecPrims/SoundCodecPrims.c (working copy) @@ -131,7 +131,7 @@ } srcSize = slotSizeOf(src); dstSize = (slotSizeOf(dst)) * 2; - gsmDecode(state + BaseHeaderSize, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, &srcDelta, &dstDelta); + gsmDecode(state + BaseHeaderSize, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, (long int*)&srcDelta, (long int*)&dstDelta); if (failed()) { return null; } @@ -174,7 +174,7 @@ } srcSize = (slotSizeOf(src)) * 2; dstSize = slotSizeOf(dst); - gsmEncode(state + BaseHeaderSize, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, &srcDelta, &dstDelta); + gsmEncode(state + BaseHeaderSize, frameCount, src, srcIndex, srcSize, dst, dstIndex, dstSize, (long int*)&srcDelta, (long int*)&dstDelta); if (failed()) { return null; } From Marcel.Taeumel at hpi.de Sat Oct 10 13:14:20 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 10 13:24:36 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <56190B7E.9010204@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> Message-ID: <1444482860654-4854868.post@n4.nabble.com> Huh? I did a 32-bit build only. I used Cygwin 32-bit. There is currently no 64-bit build folder for Window builds in the CogVM sources. Using "i686-pc-mingw32-gcc" is wrong. You should use "i686-w64-mingw32-*" as I described above. These are *not* for 64-bit builds but for 32-bit builds. The 64-bit tool chain include an "x86_64" and not the "i686". ;-) Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854868.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat Oct 10 13:18:05 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 10 13:28:21 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444482860654-4854868.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> Message-ID: <1444483085900-4854869.post@n4.nabble.com> Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854869.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From henrylavado at gmx.com Sat Oct 10 13:30:31 2015 From: henrylavado at gmx.com (Henry Lavado) Date: Sat Oct 10 13:30:32 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444482860654-4854868.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> Message-ID: <561912F7.9000601@gmx.com> Oh, I see. Then #1 from my list applies. I was getting a segfault because of some issue with cygwin1.dll. I believe it is an issue specific for Windows 7, which is what I am running. I suppose I need to recompile cygwin's dll. I just got your other mail and I will try those packages first. Thanks, Henry On 10/10/2015 9:14 AM, marcel.taeumel wrote: > Huh? I did a 32-bit build only. I used Cygwin 32-bit. There is currently no > 64-bit build folder for Window builds in the CogVM sources. > > Using "i686-pc-mingw32-gcc" is wrong. You should use "i686-w64-mingw32-*" as > I described above. These are *not* for 64-bit builds but for 32-bit builds. > The 64-bit tool chain include an "x86_64" and not the "i686". > > ;-) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854868.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Sat Oct 10 14:08:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:08:44 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.959.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.959.mcz ==================== Summary ==================== Name: Kernel-ul.959 Author: ul Time: 10 October 2015, 3:44:26.604 pm UUID: 0b44d9be-d30e-4daf-8dfc-411b2000d574 Ancestors: Kernel-topa.958 Use #== instead of #= for symbol comparison and compare the floating point value directly to zero in Float >> #adaptTo*andCompare: methods. Also removed the branch for NaN, because the remaining branches yield the same result. Duration changes: - avoid LargeInteger operations in #days:hours:minutes:seconds:nanoSeconds: ad #asMilliSeconds as much as possible =============== Diff against Kernel-topa.958 =============== Item was changed: ----- Method: Duration class>>days:hours:minutes:seconds:nanoSeconds: (in category 'squeak protocol') ----- days: days hours: hours minutes: minutes seconds: seconds nanoSeconds: nanos + ^self + seconds: seconds + + (minutes * SecondsInMinute) + + (hours * SecondsInHour) + + (days * SecondsInDay) + nanoseconds: nanos - ^ self seconds: ((days * SecondsInDay) - + (hours * SecondsInHour) - + (minutes * SecondsInMinute) - + seconds) - nanoSeconds: nanos ! Item was changed: ----- Method: Duration>>asMilliSeconds (in category 'squeak protocol') ----- asMilliSeconds + nanos = 0 ifTrue: [ ^seconds * 1000 ]. + ^nanos // 1000000 + (seconds * 1000)! - - ^ ((seconds * NanosInSecond) + nanos) // (10 raisedToInteger: 6)! Item was changed: ----- Method: Duration>>asNanoSeconds (in category 'squeak protocol') ----- asNanoSeconds + ^seconds * NanosInSecond + nanos! - ^ (seconds * NanosInSecond) + nanos! Item was changed: ----- Method: Float>>adaptToFraction:andCompare: (in category 'converting') ----- adaptToFraction: rcvr andCompare: selector "If I am involved in comparison with a Fraction, convert myself to a Fraction. This way, no bit is lost and comparison is exact." + self isFinite ifFalse: [ + selector == #= ifTrue: [ ^false ]. + selector == #~= ifTrue: [ ^true ]. + (selector == #< or: [ selector == #'<=' ]) + ifTrue: [ ^self >= 0.0]. + (selector == #> or: [ selector == #'>=' ]) + ifTrue: [ ^0.0 >= self ]. + ^self error: 'unknow comparison selector' ]. - self isFinite - ifFalse: [ - selector == #= ifTrue: [^false]. - selector == #~= ifTrue: [^true]. - self isNaN ifTrue: [^ false]. - (selector = #< or: [selector = #'<=']) - ifTrue: [^ self positive]. - (selector = #> or: [selector = #'>=']) - ifTrue: [^ self positive not]. - ^self error: 'unknow comparison selector']. "Try to avoid asTrueFraction because it can cost" rcvr isAnExactFloat ifTrue: [^rcvr asExactFloat perform: selector with: self]. selector == #= ifTrue: [^false]. selector == #~= ifTrue: [^true]. ^ rcvr perform: selector with: self asTrueFraction! Item was changed: ----- Method: Float>>adaptToInteger:andCompare: (in category 'converting') ----- adaptToInteger: rcvr andCompare: selector "If I am involved in comparison with an Integer, convert myself to a Fraction. This way, no bit is lost and comparison is exact." + self isFinite ifFalse: [ + selector == #= ifTrue: [ ^false ]. + selector == #~= ifTrue: [ ^true ]. + (selector == #< or: [ selector == #'<=' ]) + ifTrue: [ ^self >= 0.0 ]. + (selector == #> or: [ selector == #'>=' ]) + ifTrue: [ ^0.0 >= self ]. + ^self error: 'unknow comparison selector']. - self isFinite - ifFalse: [ - selector == #= ifTrue: [^false]. - selector == #~= ifTrue: [^true]. - self isNaN ifTrue: [^ false]. - (selector = #< or: [selector = #'<=']) - ifTrue: [^ self positive]. - (selector = #> or: [selector = #'>=']) - ifTrue: [^ self positive not]. - ^self error: 'unknow comparison selector']. "Try to avoid asTrueFraction because it can cost" selector == #= ifTrue: [ self fractionPart = 0.0 ifFalse: [^false]]. selector == #~= ifTrue: [ self fractionPart = 0.0 ifFalse: [^true]]. rcvr isAnExactFloat ifTrue: [^rcvr asExactFloat perform: selector with: self]. selector == #= ifTrue: [^false]. selector == #~= ifTrue: [^true]. ^ rcvr perform: selector with: self asTrueFraction! Item was changed: ----- Method: Float>>adaptToScaledDecimal:andCompare: (in category 'converting') ----- adaptToScaledDecimal: rcvr andCompare: selector "If I am involved in comparison with a scaled Decimal, convert myself to a Fraction. This way, no bit is lost and comparison is exact." + self isFinite ifFalse: [ + selector == #= ifTrue: [^false]. + selector == #~= ifTrue: [^true]. + (selector == #< or: [ selector == #'<=' ]) + ifTrue: [ ^self >= 0.0 ]. + (selector == #> or: [ selector == #'>=' ]) + ifTrue: [ ^0.0 >= self ]. + ^self error: 'unknow comparison selector' ]. - self isFinite - ifFalse: [ - selector == #= ifTrue: [^false]. - selector == #~= ifTrue: [^true]. - self isNaN ifTrue: [^ false]. - (selector = #< or: [selector = #'<=']) - ifTrue: [^ self positive]. - (selector = #> or: [selector = #'>=']) - ifTrue: [^ self positive not]. - ^self error: 'unknow comparison selector']. "Try to avoid asTrueFraction because it can cost" rcvr isAnExactFloat ifTrue: [^rcvr asExactFloat perform: selector with: self]. selector == #= ifTrue: [^false]. selector == #~= ifTrue: [^true]. ^ rcvr perform: selector with: self asTrueFraction! From commits at source.squeak.org Sat Oct 10 14:08:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:08:54 2015 Subject: [squeak-dev] The Trunk: Network-ul.163.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-ul.163.mcz ==================== Summary ==================== Name: Network-ul.163 Author: ul Time: 9 October 2015, 10:28:22.138 pm UUID: 31998b51-bd36-4363-a48f-f9ba31617935 Ancestors: Network-mt.162 NetNameResolver changes: - do not raise an error from within the critical section of #addressForName:timeout:, because a debugger in the image would block NetNameResolver - define the deadline using an absolute clock in all name lookup operations instead of Time >> #millisecondClockValue, because the latter will lock up NetNameResolver when its value would roll over before the lookup deadline ends and the resolver is busy - added #nameForAddress: with the same default timeout value as #addressForName: =============== Diff against Network-mt.162 =============== Item was changed: ----- Method: NetNameResolver class>>addressForName:timeout: (in category 'lookups') ----- addressForName: hostName timeout: secs "Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds." "NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30" "NetNameResolver addressForName: '100000jobs.de' timeout: 30" "NetNameResolver addressForName: '1.7.6.4' timeout: 30" "NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)" | deadline result | self initializeNetwork. self useOldNetwork ifFalse: [^self addressForName: hostName]. "check if this is a valid numeric host address (e.g. 1.2.3.4)" + (self addressFromString: hostName) ifNotNil: [ :numericHostAddress | + ^numericHostAddress ]. - result := self addressFromString: hostName. - result isNil ifFalse: [^result]. "Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)" + deadline := Time primUTCMicrosecondClock + (secs * 1000000). - deadline := Time millisecondClockValue + (secs * 1000). "Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction." + (self resolverMutex critical: [ + (self waitForResolverReadyUntil: deadline) + ifFalse: [ 'Could not resolve the server named: ', hostName ] + ifTrue: [ + self primStartLookupOfName: hostName. + (self waitForCompletionUntil: deadline) + ifFalse: [ 'Could not resolve the server named: ', hostName ] + ifTrue: [ + result := self primNameLookupResult. + nil "No error" ] ] ]) + ifNotNil: [ :message | (NameLookupFailure hostName: hostName) signal: message ]. - self resolverMutex - critical: [ - (self waitForResolverReadyUntil: deadline) - ifTrue: [ - self primStartLookupOfName: hostName. - (self waitForCompletionUntil: deadline) - ifTrue: [result := self primNameLookupResult] - ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]] - ifFalse: [(NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName]]. ^result! Item was added: + ----- Method: NetNameResolver class>>nameForAddress: (in category 'lookups') ----- + nameForAddress: hostAddress + + ^self nameForAddress: hostAddress timeout: 60! Item was changed: ----- Method: NetNameResolver class>>nameForAddress:timeout: (in category 'lookups') ----- nameForAddress: hostAddress timeout: secs "Look up the given host address and return its name. Return nil if the lookup fails or is not completed in the given number of seconds. Depends on the given host address being known to the gateway, which may not be the case for dynamically allocated addresses." "NetNameResolver nameForAddress: (NetNameResolver addressFromString: '128.111.92.2') timeout: 30" | deadline | self initializeNetwork. + deadline := DateAndTime now + secs seconds. - deadline := Time millisecondClockValue + (secs * 1000). "Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction." ^self resolverMutex critical: [ (self waitForResolverReadyUntil: deadline) ifTrue: [ self primStartLookupOfAddress: hostAddress. (self waitForCompletionUntil: deadline) ifTrue: [self primAddressLookupResult] ifFalse: [nil]] ifFalse: [nil]].! Item was changed: ----- Method: NetNameResolver class>>waitForCompletionUntil: (in category 'private') ----- waitForCompletionUntil: deadline + "Wait until deadlien for the resolver to be ready to accept a new request. Return true if the resolver is ready, false if the network is not initialized or the resolver has not become free within the given time period." - "Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is ready, false if the network is not initialized or the resolver does not become free within the given time period." + | status millisecondsLeft | - | status | status := self resolverStatus. + [ status = ResolverBusy and: [ + millisecondsLeft := deadline isLarge + ifTrue: [ (deadline - Time primUTCMicrosecondClock) // 1000 ] + ifFalse: [ deadline - Time millisecondClockValue ]. + millisecondsLeft > 0 ] ] - [(status = ResolverBusy) and: - [Time millisecondClockValue < deadline]] whileTrue: [ "wait for resolver to be available" + ResolverSemaphore waitTimeoutMSecs: millisecondsLeft. + status := self resolverStatus ]. + status = ResolverReady ifTrue: [ ^true ]. + status = ResolverBusy ifTrue: [ self primAbortLookup ]. + ^false - ResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue). - status := self resolverStatus]. - - status = ResolverReady - ifTrue: [^ true] - ifFalse: [ - status = ResolverBusy ifTrue: [self primAbortLookup]. - ^ false]. ! Item was changed: ----- Method: NetNameResolver class>>waitForResolverReadyUntil: (in category 'private') ----- waitForResolverReadyUntil: deadline + "Wait until deadline for the resolver to be ready to accept a new request. Return true if the resolver is not busy, false if the network is not initialized or the resolver has not become free within the given time period." - "Wait up to the given number of seconds for the resolver to be ready to accept a new request. Return true if the resolver is not busy, false if the network is not initialized or the resolver does not become free within the given time period." + | status millisecondsLeft | + (status := self resolverStatus) = ResolverUninitialized ifTrue: [ ^false ]. + [ status = ResolverBusy and: [ + millisecondsLeft := deadline isLarge + ifTrue: [ (deadline - Time primUTCMicrosecondClock) // 1000 ] + ifFalse: [ deadline - Time millisecondClockValue ]. + millisecondsLeft > 0 ] ] - | status | - status := self resolverStatus. - status = ResolverUninitialized ifTrue: [^ false]. - - [(status = ResolverBusy) and: - [Time millisecondClockValue < deadline]] whileTrue: [ "wait for resolver to be available" + ResolverSemaphore waitTimeoutMSecs: millisecondsLeft. + status := self resolverStatus ]. + ^status ~= ResolverBusy! - ResolverSemaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue). - status := self resolverStatus]. - - ^ status ~= ResolverBusy - ! From commits at source.squeak.org Sat Oct 10 14:08:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:08:56 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.960.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.960.mcz ==================== Summary ==================== Name: Kernel-ul.960 Author: ul Time: 10 October 2015, 4:04:01.102 pm UUID: fc40b663-cd1f-453e-bd76-2dd015be9582 Ancestors: Kernel-ul.959 - fix #seconds:nanoseconds: -> #seconds:nanoSeconds: =============== Diff against Kernel-ul.959 =============== Item was changed: ----- Method: Duration class>>days:hours:minutes:seconds:nanoSeconds: (in category 'squeak protocol') ----- days: days hours: hours minutes: minutes seconds: seconds nanoSeconds: nanos ^self seconds: seconds + (minutes * SecondsInMinute) + (hours * SecondsInHour) + (days * SecondsInDay) + nanoSeconds: nanos - nanoseconds: nanos ! From commits at source.squeak.org Sat Oct 10 14:09:35 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:09:37 2015 Subject: [squeak-dev] The Trunk: Collections-ul.667.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.667.mcz ==================== Summary ==================== Name: Collections-ul.667 Author: ul Time: 10 October 2015, 3:40:46.732 pm UUID: 7cd785ff-1839-4075-ac56-4b71054529d8 Ancestors: Collections-topa.666 Added the missing methods of ByteArray's platform independent access category: #signedByteAt: #signedByteAt:put: #long64At:put:bigEndian: and #long64At:bigEndian:. The 64-bit methods are not optimized. Added #associationClass to Dictionary and its subclasses, which returns the class of the associations the Dictionary holds. This allows us to simplify the implementations of #at:put: and friends in the subclasses. String changes: - introduced #asIntegerSigned: which converts the receiver to an Integer. - #asSignedInteger should return nil for empty string. - optimized #asUnsignedInteger as well =============== Diff against Collections-topa.666 =============== Item was added: + ----- Method: ByteArray>>long64At:bigEndian: (in category 'platform independent access') ----- + long64At: index bigEndian: bigEndian + "Return a 64-bit signed integer quantity starting from the given byte index." + + | value | + value := self unsignedLong64At: index bigEndian: bigEndian. + value digitLength < 8 ifTrue: [ ^value ]. + (value digitAt: 8) < 16r80 ifTrue: [ ^value ]. + ^value - 16r10000000000000000! Item was added: + ----- Method: ByteArray>>long64At:put:bigEndian: (in category 'platform independent access') ----- + long64At: index put: value bigEndian: bigEndian + "Store a 64-bit signed integer quantity starting from the given byte index." + + ^self + unsignedLong64At: index + put: (value negative + ifFalse: [ value ] + ifTrue: [ value + 16r10000000000000000 ]) + bigEndian: bigEndian! Item was added: + ----- Method: ByteArray>>signedByteAt: (in category 'platform independent access') ----- + signedByteAt: index + "Return an 8-bit signed integer quantity from the given byte index." + + | byte | + (byte := self at: index) <= 16r7F ifTrue: [ ^byte ]. + ^byte - 16r100! Item was added: + ----- Method: ByteArray>>signedByteAt:put: (in category 'platform independent access') ----- + signedByteAt: index put: anInteger + "Store an 8-bit signed integer quantity at the given byte index." + + anInteger >= 0 ifTrue: [ ^self at: index put: anInteger ]. + self at: index put: anInteger + 16r100. + ^anInteger! Item was added: + ----- Method: ByteString>>asIntegerSigned: (in category 'converting') ----- + asIntegerSigned: signed + "Return the first decimal integer I can find or nil." + + | index integerValue result size negative | + (size := self size) <= 16 ifFalse: [ ^super asIntegerSigned: signed ]. + "Find the first character between $0 and $9." + index := 0. + [ (index := index + 1) <= size and: [ + (integerValue := (self at: index) asInteger) <= 47 "$0 asInteger - 1" or: [ + 58 "$9 asInteger + 1" <= integerValue ] ] ] whileTrue. + index <= size ifFalse: [ ^nil ]. + negative := signed and: [ 2 <= index and: [ (self at: index - 1) == $- ] ]. + "Parse the number." + result := integerValue - 48 "$0 asInteger". + [ (index := index + 1) <= size + and: [ (integerValue := (self at: index) asInteger) <= 57 "$9 asInteger" + and: [ 48 "$0 asInteger" <= integerValue ] ] ] whileTrue: [ + result := result * 10 + integerValue - 48 ]. + negative ifTrue: [ ^result negated ]. + ^result! Item was added: + ----- Method: Dictionary>>associationClass (in category 'accessing') ----- + associationClass + + ^Association! Item was changed: ----- Method: Dictionary>>at:ifPresent:ifAbsentPut: (in category 'accessing') ----- at: key ifPresent: oneArgBlock ifAbsentPut: absentBlock "Lookup the given key in the receiver. If it is present, answer the value of evaluating oneArgBlock with the value associated with the key. Otherwise add the value of absentBlock under the key, and answer that value." | index value | index := self scanFor: key. (array at: index) ifNotNil: [:element| ^oneArgBlock value: element value]. value := absentBlock value. + self atNewIndex: index put: (self associationClass key: key value: value). - self atNewIndex: index put: (Association key: key value: value). ^value! Item was changed: ----- Method: Dictionary>>at:put: (in category 'accessing') ----- at: key put: anObject "Set the value at key to be anObject. If key is not found, create a new entry for key and set is value to anObject. Answer anObject." | index | index := self scanFor: key. (array at: index) + ifNil: [ self atNewIndex: index put: (self associationClass key: key value: anObject) ] - ifNil: [ self atNewIndex: index put: (Association key: key value: anObject) ] ifNotNil: [ :association | association value: anObject ]. ^anObject! Item was changed: ----- Method: Dictionary>>valueAtNewKey:put:atIndex:declareFrom: (in category 'private') ----- valueAtNewKey: aKey put: anObject atIndex: index declareFrom: aDictionary "Support for coordinating class variable and global declarations with variables that have been put in Undeclared so as to redirect all references to the undeclared variable." (aDictionary includesKey: aKey) ifTrue: [self atNewIndex: index put: ((aDictionary associationAt: aKey) value: anObject). aDictionary removeKey: aKey] ifFalse: + [self atNewIndex: index put: (self associationClass key: aKey value: anObject)]! - [self atNewIndex: index put: (Association key: aKey value: anObject)]! Item was changed: ----- Method: String>>asInteger (in category 'converting') ----- asInteger + + ^self asIntegerSigned: true - ^self asSignedInteger ! Item was added: + ----- Method: String>>asIntegerSigned: (in category 'converting') ----- + asIntegerSigned: signed + "Return the first decimal integer I can find or nil." + + | index character size result negative | + index := 0. + size := self size. + "Find the first character between $0 and $9." + [ (index := index + 1) > size or: [ (self at: index) isDigit ] ] whileFalse. + index > size ifTrue: [ ^nil ]. + negative := signed and: [ index > 1 and: [ (self at: index - 1) == $- ] ]. + "Parse the number." + size - index > 15 ifTrue: [ + negative ifTrue: [ index := index - 1 ]. + ^Integer readFrom: ( + ReadStream + on: self + from: index + to: size) ]. + result := (self at: index) digitValue. + [ (index := index + 1) <= size + and: [ (character := self at: index) isDigit ] ] whileTrue: [ + result := result * 10 + character digitValue ]. + negative ifTrue: [ ^result negated ]. + ^result! Item was changed: ----- Method: String>>asSignedInteger (in category 'converting') ----- asSignedInteger + "Return the first signed integer I can find or nil." + + ^self asIntegerSigned: true! - "Returns the first signed integer it can find or nil." - - | result character index negative | - (self at: 1) isDigit - ifTrue: [ index := 1 ] - ifFalse: [ - index := self findFirst: [ :char | char isDigit ]. - index = 0 ifTrue: [ ^nil ] ]. - negative := index > 1 and: [ (self at: index - 1) == $- ]. - result := 0. - [ index <= self size and: [ (character := self at: index) isDigit ] ] whileTrue: [ - result := result * 10 + character asciiValue - 48 "$0 asciiValue". - index := index + 1 ]. - negative ifTrue: [ ^0 - result ]. - ^result - ! Item was changed: ----- Method: String>>asUnsignedInteger (in category 'converting') ----- asUnsignedInteger + "Returns the first unsigned integer I can find or nil." - "Returns the first integer it can find or nil." + ^self asIntegerSigned: false! - | start stream | - start := self findFirst: [:char | char isDigit]. - start isZero ifTrue: [^nil]. - stream := (ReadStream on: self) position: start - 1. - ^Integer readFrom: stream! Item was added: + ----- Method: WeakKeyDictionary>>associationClass (in category 'accessing') ----- + associationClass + + ^WeakKeyAssociation! Item was changed: ----- Method: WeakKeyDictionary>>at:put: (in category 'accessing') ----- at: key put: anObject "Set the value at key to be anObject. If key is not found, create a new entry for key and set is value to anObject. Answer anObject." - | index | key ifNil: [ ^anObject ]. + ^super at: key put: anObject! - index := self scanFor: key. - (array at: index) - ifNil: [ self atNewIndex: index put: (WeakKeyAssociation key: key value: anObject) ] - ifNotNil: [ :association | association value: anObject ]. - ^anObject! Item was added: + ----- Method: WeakValueDictionary>>associationClass (in category 'accessing') ----- + associationClass + + ^WeakValueAssociation! Item was removed: - ----- Method: WeakValueDictionary>>at:put: (in category 'accessing') ----- - at: key put: anObject - "Set the value at key to be anObject. If key is not found, create a new - entry for key and set is value to anObject. Answer anObject." - | index element | - index := self scanFor: key. - element := array at: index. - element == nil - ifTrue: [self atNewIndex: index put: (WeakValueAssociation key: key value: anObject)] - ifFalse: [element value: anObject]. - ^ anObject! From commits at source.squeak.org Sat Oct 10 14:09:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:09:57 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.252.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.252.mcz ==================== Summary ==================== Name: CollectionsTests-ul.252 Author: ul Time: 27 September 2015, 11:33:56.078 pm UUID: db54c1d0-dab4-42b5-9c99-5384a18fec96 Ancestors: CollectionsTests-eem.251 Added tests for ByteArray's #long64At:* methods. =============== Diff against CollectionsTests-eem.251 =============== Item was changed: ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsAtBitBorders (in category 'testing - platform independent access') ----- testPlatformIndepentendIntegerAccessorsAtBitBorders #( shortAt:put:bigEndian: shortAt:bigEndian: false 16 longAt:put:bigEndian: longAt:bigEndian: false 32 + long64At:put:bigEndian: long64At:bigEndian: false 64 unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16 unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32 unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64 ) groupsDo: [ :setter :getter :unsigned :storageBits | self verifyPlatformIndepentendIntegerAccessorsAtBitBordersSetter: setter getter: getter unsigned: unsigned storageBits: storageBits ]! Item was changed: ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsWithRandomValues (in category 'testing - platform independent access') ----- testPlatformIndepentendIntegerAccessorsWithRandomValues | random | random := Random seed: 36rSqueak. #( shortAt:put:bigEndian: shortAt:bigEndian: false 16 longAt:put:bigEndian: longAt:bigEndian: false 32 + long64At:put:bigEndian: long64At:bigEndian: false 64 unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16 unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32 unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64 ) groupsDo: [ :setter :getter :unsigned :storageBits | self verifyPlatformIndepentendIntegerAccessorsWithRandomValuesSetter: setter getter: getter unsigned: unsigned storageBits: storageBits random: random ]! From commits at source.squeak.org Sat Oct 10 14:10:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:10:08 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.253.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.253.mcz ==================== Summary ==================== Name: CollectionsTests-ul.253 Author: ul Time: 28 September 2015, 5:43:59.308 pm UUID: edd02960-9cf1-4ec2-9b1e-5febe2777e6d Ancestors: CollectionsTests-ul.252 #testAsInteger - same tests in StringTest and WideStringTest - added empty string - uses #groupsDo: =============== Diff against CollectionsTests-ul.252 =============== Item was changed: ----- Method: StringTest>>testAsInteger (in category 'tests - converting') ----- testAsInteger + #( + '' nil nil nil + '1796exportFixes-tkMX' 1796 1796 1796 + 'donald' nil nil nil + 'abc234def567' 234 234 234 + '-94' -94 -94 94 + 'foo-bar-92' -92 -92 92 + ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue | + self + assert: asIntegerExpectedValue equals: inputString asInteger; + assert: asSignedIntegerExpectedValue equals: inputString asSignedInteger; + assert: asUnsignedIntegerExpectedValue equals: inputString asUnsignedInteger ]! - self assert: '1796exportFixes-tkMX' asInteger = 1796. - self assert: 'donald' asInteger isNil. - self assert: 'abc234def567' asInteger = 234. - self assert: '-94' asInteger = -94. - self assert: 'foo-bar-92' asInteger = -92! Item was changed: ----- Method: WideStringTest>>testAsInteger (in category 'tests - converting') ----- testAsInteger - self assert: '1796exportFixes-tkMX' asWideString asInteger = 1796. - self assert: 'donald' asWideString asInteger isNil. - self assert: 'abc234def567' asWideString asInteger = 234. - self assert: '-94' asWideString asInteger = -94. - self assert: 'foo-bar-92' asWideString asInteger = -92. + #( + '' nil nil nil + '1796exportFixes-tkMX' 1796 1796 1796 + 'donald' nil nil nil + 'abc234def567' 234 234 234 + '-94' -94 -94 94 + 'foo-bar-92' -92 -92 92 + ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue | + | wideString | + wideString := inputString asWideString. + self + assert: asIntegerExpectedValue equals: wideString asInteger; + assert: asSignedIntegerExpectedValue equals: wideString asSignedInteger; + assert: asUnsignedIntegerExpectedValue equals: wideString asUnsignedInteger ]! - self assert: '1796exportFixes-tkMX' asWideString asSignedInteger = 1796. - self assert: 'donald' asWideString asSignedInteger isNil. - self assert: 'abc234def567' asWideString asSignedInteger = 234. - self assert: '-94' asWideString asSignedInteger = -94. - self assert: 'foo-bar-92' asWideString asSignedInteger = -92. - - self assert: '1796exportFixes-tkMX' asWideString asUnsignedInteger = 1796. - self assert: 'donald' asWideString asUnsignedInteger isNil. - self assert: 'abc234def567' asWideString asUnsignedInteger = 234. - self assert: '-94' asWideString asUnsignedInteger = 94. - self assert: 'foo-bar-92' asWideString asUnsignedInteger = 92! From commits at source.squeak.org Sat Oct 10 14:10:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 14:10:18 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.254.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.254.mcz ==================== Summary ==================== Name: CollectionsTests-ul.254 Author: ul Time: 10 October 2015, 3:38:59.878 pm UUID: 2c18cac6-27e3-48cd-94ce-e2cc617d71c5 Ancestors: CollectionsTests-topa.252, CollectionsTests-ul.253 Added thorough tests for #asIntegerSigned:. =============== Diff against CollectionsTests-topa.252 =============== Item was changed: ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsAtBitBorders (in category 'testing - platform independent access') ----- testPlatformIndepentendIntegerAccessorsAtBitBorders #( shortAt:put:bigEndian: shortAt:bigEndian: false 16 longAt:put:bigEndian: longAt:bigEndian: false 32 + long64At:put:bigEndian: long64At:bigEndian: false 64 unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16 unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32 unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64 ) groupsDo: [ :setter :getter :unsigned :storageBits | self verifyPlatformIndepentendIntegerAccessorsAtBitBordersSetter: setter getter: getter unsigned: unsigned storageBits: storageBits ]! Item was changed: ----- Method: ByteArrayTest>>testPlatformIndepentendIntegerAccessorsWithRandomValues (in category 'testing - platform independent access') ----- testPlatformIndepentendIntegerAccessorsWithRandomValues | random | random := Random seed: 36rSqueak. #( shortAt:put:bigEndian: shortAt:bigEndian: false 16 longAt:put:bigEndian: longAt:bigEndian: false 32 + long64At:put:bigEndian: long64At:bigEndian: false 64 unsignedShortAt:put:bigEndian: unsignedShortAt:bigEndian: true 16 unsignedLongAt:put:bigEndian: unsignedLongAt:bigEndian: true 32 unsignedLong64At:put:bigEndian: unsignedLong64At:bigEndian: true 64 ) groupsDo: [ :setter :getter :unsigned :storageBits | self verifyPlatformIndepentendIntegerAccessorsWithRandomValuesSetter: setter getter: getter unsigned: unsigned storageBits: storageBits random: random ]! Item was changed: ----- Method: StringTest>>testAsInteger (in category 'tests - converting') ----- testAsInteger + #( + '' nil nil nil + '1796exportFixes-tkMX' 1796 1796 1796 + 'donald' nil nil nil + 'abc234def567' 234 234 234 + '-94' -94 -94 94 + 'foo-bar-92' -92 -92 92 + ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue | + self + assert: asIntegerExpectedValue equals: inputString asInteger; + assert: asSignedIntegerExpectedValue equals: inputString asSignedInteger; + assert: asUnsignedIntegerExpectedValue equals: inputString asUnsignedInteger ]! - self assert: '1796exportFixes-tkMX' asInteger = 1796. - self assert: 'donald' asInteger isNil. - self assert: 'abc234def567' asInteger = 234. - self assert: '-94' asInteger = -94. - self assert: 'foo-bar-92' asInteger = -92! Item was added: + ----- Method: StringTest>>testAsIntegerSigned (in category 'tests - converting') ----- + testAsIntegerSigned + + #( + '' nil nil + '1796exportFixes-tkMX' 1796 1796 + 'donald' nil nil + 'abc234def567' 234 234 + '-94' -94 94 + 'foo-bar-92' -92 92 + '1234567890' 1234567890 1234567890 + '--1234567890--' -1234567890 1234567890 + '--1234567890123456789012345678901234567890--' -1234567890123456789012345678901234567890 1234567890123456789012345678901234567890 + ) groupsDo: [ :inputString :expectedSignedValue :expectedUnsignedValue | + self + assert: expectedSignedValue equals: (inputString asIntegerSigned: true); + assert: expectedUnsignedValue equals: (inputString asIntegerSigned: false) ]! Item was added: + ----- Method: StringTest>>testAsIntegerSignedUsingRandomNumbers (in category 'tests - converting') ----- + testAsIntegerSignedUsingRandomNumbers + + | random | + random := Random seed: 36rSqueak. + 1 to: 100 do: [ :digitLength | + 50 timesRepeat: [ + | number inputString | + number := ((2 atRandom: random) = 1 + ifTrue: [ LargePositiveInteger ] + ifFalse: [ LargeNegativeInteger ]) + new: digitLength. + 1 to: digitLength do: [ :index | number at: index put: (256 atRandom: random) - 1 ]. + number := number normalize. + inputString := number asString. + self + assert: number equals: (inputString asIntegerSigned: true); + assert: number abs equals: (inputString asIntegerSigned: false) ] ]! Item was changed: ----- Method: WideStringTest>>testAsInteger (in category 'tests - converting') ----- testAsInteger - self assert: '1796exportFixes-tkMX' asWideString asInteger = 1796. - self assert: 'donald' asWideString asInteger isNil. - self assert: 'abc234def567' asWideString asInteger = 234. - self assert: '-94' asWideString asInteger = -94. - self assert: 'foo-bar-92' asWideString asInteger = -92. + #( + '' nil nil nil + '1796exportFixes-tkMX' 1796 1796 1796 + 'donald' nil nil nil + 'abc234def567' 234 234 234 + '-94' -94 -94 94 + 'foo-bar-92' -92 -92 92 + ) groupsDo: [ :inputString :asIntegerExpectedValue :asSignedIntegerExpectedValue :asUnsignedIntegerExpectedValue | + | wideString | + wideString := inputString asWideString. + self + assert: asIntegerExpectedValue equals: wideString asInteger; + assert: asSignedIntegerExpectedValue equals: wideString asSignedInteger; + assert: asUnsignedIntegerExpectedValue equals: wideString asUnsignedInteger ]! - self assert: '1796exportFixes-tkMX' asWideString asSignedInteger = 1796. - self assert: 'donald' asWideString asSignedInteger isNil. - self assert: 'abc234def567' asWideString asSignedInteger = 234. - self assert: '-94' asWideString asSignedInteger = -94. - self assert: 'foo-bar-92' asWideString asSignedInteger = -92. - - self assert: '1796exportFixes-tkMX' asWideString asUnsignedInteger = 1796. - self assert: 'donald' asWideString asUnsignedInteger isNil. - self assert: 'abc234def567' asWideString asUnsignedInteger = 234. - self assert: '-94' asWideString asUnsignedInteger = 94. - self assert: 'foo-bar-92' asWideString asUnsignedInteger = 92! Item was added: + ----- Method: WideStringTest>>testAsIntegerSigned (in category 'tests - converting') ----- + testAsIntegerSigned + + #( + '' nil nil + '1796exportFixes-tkMX' 1796 1796 + 'donald' nil nil + 'abc234def567' 234 234 + '-94' -94 94 + 'foo-bar-92' -92 92 + '1234567890' 1234567890 1234567890 + '--1234567890--' -1234567890 1234567890 + '--1234567890123456789012345678901234567890--' -1234567890123456789012345678901234567890 1234567890123456789012345678901234567890 + ) groupsDo: [ :inputString :expectedSignedValue :expectedUnsignedValue | + self + assert: expectedSignedValue equals: (inputString asIntegerSigned: true); + assert: expectedUnsignedValue equals: (inputString asIntegerSigned: false) ]! Item was added: + ----- Method: WideStringTest>>testAsIntegerSignedUsingRandomNumbers (in category 'tests - converting') ----- + testAsIntegerSignedUsingRandomNumbers + + | random digitCharactersByValue | + random := Random seed: 36rSqueak. + digitCharactersByValue := (((0 to: 65535) collect: #asCharacter as: String) select: #isDigit) + groupBy: #digitValue. + 1 to: 100 do: [ :digitLength | + 50 timesRepeat: [ + | number inputString | + number := ((2 atRandom: random) = 1 + ifTrue: [ LargePositiveInteger ] + ifFalse: [ LargeNegativeInteger ]) + new: digitLength. + 1 to: digitLength do: [ :index | number at: index put: (256 atRandom: random) - 1 ]. + number := number normalize. + inputString := number asString asWideString. + inputString replace: [ :each | + each == $- + ifTrue: [ each ] + ifFalse: [ (digitCharactersByValue at: each digitValue) atRandom: random ] ]. + self + assert: number equals: (inputString asIntegerSigned: true); + assert: number abs equals: (inputString asIntegerSigned: false) ] ]! From commits at source.squeak.org Sat Oct 10 15:12:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 15:12:24 2015 Subject: [squeak-dev] The Trunk: Network-ul.164.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-ul.164.mcz ==================== Summary ==================== Name: Network-ul.164 Author: ul Time: 10 October 2015, 5:11:50.792 pm UUID: fd3fe5d1-838c-4dfe-869f-c780662b45b8 Ancestors: Network-ul.163 - fixed NetNameResolver class >> #nameForAddress:timeout: - simplified NetNameResolver class >> #addressForName:timeout: =============== Diff against Network-ul.163 =============== Item was changed: ----- Method: NetNameResolver class>>addressForName:timeout: (in category 'lookups') ----- addressForName: hostName timeout: secs "Look up the given host name and return its address. Return nil if the address is not found in the given number of seconds." "NetNameResolver addressForName: 'create.ucsb.edu' timeout: 30" "NetNameResolver addressForName: '100000jobs.de' timeout: 30" "NetNameResolver addressForName: '1.7.6.4' timeout: 30" "NetNameResolver addressForName: '' timeout: 30 (This seems to return nil?)" + | deadline | - | deadline result | self initializeNetwork. self useOldNetwork ifFalse: [^self addressForName: hostName]. "check if this is a valid numeric host address (e.g. 1.2.3.4)" (self addressFromString: hostName) ifNotNil: [ :numericHostAddress | ^numericHostAddress ]. "Look up a host name, including ones that start with a digit (e.g. 100000jobs.de or squeak.org)" deadline := Time primUTCMicrosecondClock + (secs * 1000000). "Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction." + ^(self resolverMutex critical: [ + (self waitForResolverReadyUntil: deadline) ifTrue: [ + self primStartLookupOfName: hostName. + (self waitForCompletionUntil: deadline) ifTrue: [ + self primNameLookupResult. ] ] ]) + ifNil: [ (NameLookupFailure hostName: hostName) signal: 'Could not resolve the server named: ', hostName ] ! - (self resolverMutex critical: [ - (self waitForResolverReadyUntil: deadline) - ifFalse: [ 'Could not resolve the server named: ', hostName ] - ifTrue: [ - self primStartLookupOfName: hostName. - (self waitForCompletionUntil: deadline) - ifFalse: [ 'Could not resolve the server named: ', hostName ] - ifTrue: [ - result := self primNameLookupResult. - nil "No error" ] ] ]) - ifNotNil: [ :message | (NameLookupFailure hostName: hostName) signal: message ]. - ^result! Item was changed: ----- Method: NetNameResolver class>>nameForAddress:timeout: (in category 'lookups') ----- nameForAddress: hostAddress timeout: secs "Look up the given host address and return its name. Return nil if the lookup fails or is not completed in the given number of seconds. Depends on the given host address being known to the gateway, which may not be the case for dynamically allocated addresses." "NetNameResolver nameForAddress: (NetNameResolver addressFromString: '128.111.92.2') timeout: 30" | deadline | self initializeNetwork. + deadline := Time primUTCMicrosecondClock + (secs * 1000000). - deadline := DateAndTime now + secs seconds. "Protect the execution of this block, as the ResolverSemaphore is used for both parts of the transaction." + ^self resolverMutex critical: [ + (self waitForResolverReadyUntil: deadline) ifTrue: [ + self primStartLookupOfAddress: hostAddress. + (self waitForCompletionUntil: deadline) ifTrue: [ + self primAddressLookupResult ] ] ]! - ^self resolverMutex - critical: [ - (self waitForResolverReadyUntil: deadline) - ifTrue: [ - self primStartLookupOfAddress: hostAddress. - (self waitForCompletionUntil: deadline) - ifTrue: [self primAddressLookupResult] - ifFalse: [nil]] - ifFalse: [nil]].! From tim at rowledge.org Sat Oct 10 17:20:28 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 10 17:20:33 2015 Subject: [squeak-dev] In the hacker news In-Reply-To: References: Message-ID: <0633C397-0728-4B0E-9D5F-3B0E003FBE13@rowledge.org> > On 10-10-2015, at 2:10 AM, karl ramberg wrote: > > Hackaday post: > http://hackaday.com/2015/10/08/latest-raspberry-pi-images-have-improved-scratch/ > > Hacker News post: > https://news.ycombinator.com/item?id=10363088 > On the one hand publicity is good, on the other... just read the comments. Sigh. So many idiots. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: CPE: Create Parity Error From tim at rowledge.org Sat Oct 10 17:52:58 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 10 17:53:02 2015 Subject: [squeak-dev] there must be something amusing that can be done with this... Message-ID: <326C7178-FB0A-49C7-AB2D-C681DBF4FA20@rowledge.org> https://www.parallax.com/downloads/hackable-electronic-badge I doubt it could run anything squeakish, being a bit short in the memory arena, but as a $50 programmable board with some interesting sensors it must be good for something? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Magister Mundi sum! = I am the Master of the Universe! From Marcel.Taeumel at hpi.de Sat Oct 10 17:56:59 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 10 18:07:16 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <561912F7.9000601@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> Message-ID: <1444499819871-4854889.post@n4.nabble.com> The, I guess, you should install 32-bit Cygwin. :) Anyway, there should be no need for the cygwin1.dll to run the compiled CogVM. Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854889.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Sat Oct 10 21:49:50 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Oct 10 21:49:52 2015 Subject: [squeak-dev] In the hacker news In-Reply-To: <0633C397-0728-4B0E-9D5F-3B0E003FBE13@rowledge.org> References: <0633C397-0728-4B0E-9D5F-3B0E003FBE13@rowledge.org> Message-ID: On Sat, Oct 10, 2015 at 7:20 PM, tim Rowledge wrote: > > > On 10-10-2015, at 2:10 AM, karl ramberg wrote: > > > > Hackaday post: > > > http://hackaday.com/2015/10/08/latest-raspberry-pi-images-have-improved-scratch/ > > > > Hacker News post: > > https://news.ycombinator.com/item?id=10363088 > > > > On the one hand publicity is good, on the other... just read the comments. > Sigh. So many idiots. > I'll cut them some slack :-) There is only so much attention span around. Once it runs out, the result is quite random. And the rabbit hole runs very deep on projects like Scratch, with several implementations etc. Karl > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: CPE: Create Parity Error > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151010/afc92b74/attachment.htm From commits at source.squeak.org Sat Oct 10 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 10 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151010215502.32601.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-October/009029.html Name: Kernel-ul.959 Ancestors: Kernel-topa.958 Use #== instead of #= for symbol comparison and compare the floating point value directly to zero in Float >> #adaptTo*andCompare: methods. Also removed the branch for NaN, because the remaining branches yield the same result. Duration changes: - avoid LargeInteger operations in #days:hours:minutes:seconds:nanoSeconds: ad #asMilliSeconds as much as possible ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009030.html Name: Network-ul.163 Ancestors: Network-mt.162 NetNameResolver changes: - do not raise an error from within the critical section of #addressForName:timeout:, because a debugger in the image would block NetNameResolver - define the deadline using an absolute clock in all name lookup operations instead of Time >> #millisecondClockValue, because the latter will lock up NetNameResolver when its value would roll over before the lookup deadline ends and the resolver is busy - added #nameForAddress: with the same default timeout value as #addressForName: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009031.html Name: Kernel-ul.960 Ancestors: Kernel-ul.959 - fix #seconds:nanoseconds: -> #seconds:nanoSeconds: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009032.html Name: Collections-ul.667 Ancestors: Collections-topa.666 Added the missing methods of ByteArray's platform independent access category: #signedByteAt: #signedByteAt:put: #long64At:put:bigEndian: and #long64At:bigEndian:. The 64-bit methods are not optimized. Added #associationClass to Dictionary and its subclasses, which returns the class of the associations the Dictionary holds. This allows us to simplify the implementations of #at:put: and friends in the subclasses. String changes: - introduced #asIntegerSigned: which converts the receiver to an Integer. - #asSignedInteger should return nil for empty string. - optimized #asUnsignedInteger as well ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009033.html Name: CollectionsTests-ul.252 Ancestors: CollectionsTests-eem.251 Added tests for ByteArray's #long64At:* methods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009034.html Name: CollectionsTests-ul.253 Ancestors: CollectionsTests-ul.252 #testAsInteger - same tests in StringTest and WideStringTest - added empty string - uses #groupsDo: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009035.html Name: CollectionsTests-ul.254 Ancestors: CollectionsTests-topa.252, CollectionsTests-ul.253 Added thorough tests for #asIntegerSigned:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009036.html Name: Network-ul.164 Ancestors: Network-ul.163 - fixed NetNameResolver class >> #nameForAddress:timeout: - simplified NetNameResolver class >> #addressForName:timeout: ============================================= From karlramberg at gmail.com Sat Oct 10 22:06:07 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Oct 10 22:06:08 2015 Subject: [squeak-dev] there must be something amusing that can be done with this... In-Reply-To: <326C7178-FB0A-49C7-AB2D-C681DBF4FA20@rowledge.org> References: <326C7178-FB0A-49C7-AB2D-C681DBF4FA20@rowledge.org> Message-ID: Propeller has their own multi core chip. Maybe something like the RoarVM could be used ? The badge linked is 64 kB so Squeak is probably overkill. "The Propeller chip features eight 32-bit processors and a shared memory and system clock, making true independent and cooperative simultaneous multi-tasking possible." Karl On Sat, Oct 10, 2015 at 7:52 PM, tim Rowledge wrote: > https://www.parallax.com/downloads/hackable-electronic-badge > > I doubt it could run anything squeakish, being a bit short in the memory > arena, but as a $50 programmable board with some interesting sensors it > must be good for something? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Magister Mundi sum! = I am the Master of the > Universe! > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151011/2329d27d/attachment.htm From hannes.hirzel at gmail.com Sat Oct 10 22:59:28 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Oct 10 22:59:31 2015 Subject: [squeak-dev] In the hacker news // Squeak on Raspberry Pi Message-ID: Karl, Thank you for the links. Main improvements of the new Squeak version on Raspberry Pi are - a significant increase in speed, Scratch up to 10 times faster (thanks to Cog by Eliot Miranda) - the addition of a built-in GPIO server. https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/ Is there a page with more details? --Hannes On 10/10/15, karl ramberg wrote: > On Sat, Oct 10, 2015 at 7:20 PM, tim Rowledge wrote: > >> >> > On 10-10-2015, at 2:10 AM, karl ramberg wrote: >> > >> > Hackaday post: >> > >> http://hackaday.com/2015/10/08/latest-raspberry-pi-images-have-improved-scratch/ >> > >> > Hacker News post: >> > https://news.ycombinator.com/item?id=10363088 >> > >> >> On the one hand publicity is good, on the other... just read the >> comments. >> Sigh. So many idiots. >> > I'll cut them some slack :-) > There is only so much attention span around. Once it runs out, the result > is quite random. > And the rabbit hole runs very deep on projects like Scratch, with several > implementations etc. > > Karl > >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Strange OpCodes: CPE: Create Parity Error >> >> >> >> > From henrylavado at gmx.com Sat Oct 10 23:28:10 2015 From: henrylavado at gmx.com (Henry Lavado) Date: Sat Oct 10 23:28:10 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444499819871-4854889.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> <1444499819871-4854889.post@n4.nabble.com> Message-ID: <56199F0A.9090400@gmx.com> Hi Marcel, I rebuilt my environment and am trying to apply the patch file, without success. It isn't finding the files to patch. I am running 'patch --dry-run < bee-5.patch' from the root svn directory I checked out, where the patch file resides. Perhaps that's wrong. I suppose I need to manually change the files, but I'd rather not, you know? Would you have any suggestions? Regards, Henry On 10/10/2015 1:56 PM, marcel.taeumel wrote: > The, I guess, you should install 32-bit Cygwin. :) Anyway, there should be no > need for the cygwin1.dll to run the compiled CogVM. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854889.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Sun Oct 11 00:22:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 11 00:22:01 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.137.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.137.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.137 Author: dtl Time: 28 August 2015, 10:22:42.408 pm UUID: 420cae25-4016-48ba-8101-1881773d5098 Ancestors: MonticelloConfigurations-dtl.136 Fix updating the default update map name from preferences. Change constructor to avoid conflict with setter used by the preference. When the preference for default update map changes, initialize with a new default updater. The previous updater for the default update URL is replaced because its remembered position in the update stream will not be valid for a different update map sequence. Therefore ask confirmation from the user before accepting the preference change. Class var UpdateMapName is no longer needed, remove it. The LastUpdateMap class var was retained to support transition to instance based updaters. Remove it now. =============== Diff against MonticelloConfigurations-dtl.136 =============== Item was changed: Object subclass: #MCMcmUpdater instanceVariableNames: 'updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - classVariableNames: 'DefaultUpdateURL LastUpdateMap SkipPackages UpdateFromServerAtStartup UpdateMapName UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 5/4/2015 16:03' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL + ifAbsentPut: [self updateMapNamed: self updateMapName]! - ifAbsentPut: [self updateMapName: self updateMapName]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" - LastUpdateMap ifNil:[ - LastUpdateMap := Dictionary new. - ]. DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. ]. Updaters := nil. - self flag: #FIXME. - "The next line is to faciliate updating from class-side methods to instance based. - Building a new default update map is very time consuming, so do not do it. - Delete this after the transition is complete. Also delete class var LastUpdateMap - and its initialization above. -dtl May 2015" - LastUpdateMap ifNotNil: [ self default lastUpdateMap: LastUpdateMap ] ! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" + ^ (self updateMapNamed: baseName repository: updaterUrlKey) - ^ (self updateMapName: baseName repository: updaterUrlKey) updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" + ^ (self updateMapNamed: baseName repository: updaterUrlKey) - ^ (self updateMapName: baseName repository: updaterUrlKey) updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName + "The default update map name" - "Name for update map, without version info" + ^ 'update'! - ^UpdateMapName ifNil: ['update']! Item was changed: + ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- + updateMapName: mapName + "The default update map name for the default updater. If this is changed, + then the default updater must be replaced because its remembered position + in the update map sequence will not be valid for the new update map." - ----- Method: MCMcmUpdater class>>updateMapName: (in category 'instance creation') ----- - updateMapName: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " + self default updateMapName = mapName + ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) + ifTrue: [self updaters + at: self defaultUpdateURL + put: (self updateMapNamed: mapName)]]! - ^ self new updateMapName: baseName! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapName:repository: (in category 'instance creation') ----- - updateMapName: baseName repository: url - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." - - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapName: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapName: baseName )]. - ^ updater - ! Item was added: + ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- + updateMapNamed: baseName + "Answer a new instance with a base update name baseName such as + 'update' or 'update.oscog' " + + ^ self new + updateMapName: baseName; + lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- + updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name + baseName. The instance will be updated in the Updaters dictionary if baseName + has changed." + + | updater | + updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. + updater updateMapName = baseName + ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. + ^ updater + ! From tim at rowledge.org Sun Oct 11 01:12:20 2015 From: tim at rowledge.org (tim Rowledge) Date: Sun Oct 11 01:12:24 2015 Subject: [squeak-dev] In the hacker news // Squeak on Raspberry Pi In-Reply-To: References: Message-ID: <6BBE2B4C-83ED-4C9E-A5E5-F43EA9CF6B98@rowledge.org> > On 10-10-2015, at 3:59 PM, H. Hirzel wrote: > Main improvements of the new Squeak version on Raspberry Pi are > > - a significant increase in speed, Scratch up to 10 times faster > (thanks to Cog by Eliot Miranda) Having a Cog VM is responsible for ~ 3x of that, probably. There?s a *lot* of other stuff that has gone into speeding up Scratch on the Pi. > - the addition of a built-in GPIO server. There?s a first pass at a technical manual/ tutorial for that at https://www.raspberrypi.org/documentation/usage/scratch/gpio/README.md > > https://www.raspberrypi.org/blog/a-new-version-of-scratch-for-raspberry-pi-now-with-added-gpio/ > > Is there a page with more details? There isn?t a lot more to say for general consumption. Eliot has some discussions of Cog on his blog, the gpio stuff is documented as above and all the other stuff is just better written Smalltalk. Oh, and the faster ARM bitBLT that Ben Avison wrote for me. That?s been in the vm sources for a couple of years I think. There are also a couple of podcasts done recently on the subject of Pi/Squeak/Scratch - http://thepipodcast.com/the-pi-podcast-4-tim-rowledge-scratch/ http://smalltalkinspect.podspot.de/post/028-en-current-situation-smaltalk-under-piarm/ tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim EBCDIC: Erase, Back up, Chew Disk, Ignite Card From commits at source.squeak.org Sun Oct 11 01:50:41 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 11 01:50:42 2015 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-dtl.139.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-dtl.139.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.139 Author: dtl Time: 10 October 2015, 9:49:50.558 pm UUID: 2f42a23f-99ef-48d0-a0eb-9ec51dd31cde Ancestors: MonticelloConfigurations-topa.138 Fix default update map name access so preference is displayed correctly =============== Diff against MonticelloConfigurations-topa.138 =============== Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL + ifAbsentPut: [self updateMapNamed: 'update' ]! - ifAbsentPut: [self updateMapNamed: self updateMapName]! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^ self default updateMapName + ! - ^ 'update'! From commits at source.squeak.org Sun Oct 11 01:51:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 11 01:51:17 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.139.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.139.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.139 Author: dtl Time: 10 October 2015, 9:49:50.558 pm UUID: 2f42a23f-99ef-48d0-a0eb-9ec51dd31cde Ancestors: MonticelloConfigurations-topa.138 Fix default update map name access so preference is displayed correctly =============== Diff against MonticelloConfigurations-dtl.137 =============== Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default "The default instance for system updates. Uses a default update map name that may be set as a preference to enable a specific update stream for a repository." ^ self updaters at: self defaultUpdateURL + ifAbsentPut: [self updateMapNamed: 'update' ]! - ifAbsentPut: [self updateMapNamed: self updateMapName]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. ]. + "Call + MCMcmUpdater resetUpdaters + manually if necessary"! - Updaters := nil. - ! Item was added: + ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- + resetUpdaters + + Updaters := nil.! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^ self default updateMapName + ! - ^ 'update'! From lewis at mail.msen.com Sun Oct 11 05:47:50 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Oct 11 05:47:52 2015 Subject: [squeak-dev] Trunk update stream for pre-Spur images Message-ID: <20151011054750.GA65739@shell.msen.com> An experimental update stream to track trunk development for Squeak 4.6 is at http://www.squeaksource.com/TrunkUpdateStreamV3 Project description: As of the release of Squeak 5.0, trunk development proceeds in the Spur image format. Squeak 4.6, which was released immediately prior to 5.0, is the last released image in the V3 image format. Because of basic changes in the image format and associated VMs, it is not possible to update a Squeak 4.6 image directly from the trunk update stream. This project provides an update stream with V3 versions of the four packages that diverge for Spur. The V3 versions of the Collections, Kernel, System, and Compiler packages are maintained here. Update maps are named update.V3. To adopt this update stream beginning with a fully updated Squeak 4.6 image, use the preferences browser to set the update URL to http://www.squeaksource.com/TrunkUpdateStreamV3 and set the update map name to update.V3 This is an experimental project, and probably will not be maintained on an extended basis. Dave From Das.Linux at gmx.de Sun Oct 11 06:14:43 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Oct 11 06:14:45 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.137.mcz Message-ID: Hi, On 11.10.2015, at 00:21, commits@source.squeak.org wrote: > ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- > initialize > "MCMcmUpdater initialize" > - LastUpdateMap ifNil:[ > - LastUpdateMap := Dictionary new. > - ]. > DefaultUpdateURL ifNil:[ > DefaultUpdateURL := MCHttpRepository trunkUrlString. > ]. > Updaters := nil. > - self flag: #FIXME. > - "The next line is to faciliate updating from class-side methods to instance based. > - Building a new default update map is very time consuming, so do not do it. > - Delete this after the transition is complete. Also delete class var LastUpdateMap > - and its initialization above. -dtl May 2015" > - LastUpdateMap ifNotNil: [ self default lastUpdateMap: LastUpdateMap ] > ! Attention, this again kills all updates when this package is loaded! So, 4.6 won't update correctly after this package (that is, it will restart from map 0?) See MonticelloConfigurations-topa.138 ==================== Summary ==================== Name: MonticelloConfigurations-topa.138 Author: topa Time: 24 September 2015, 2:48:24.846 pm UUID: 153b9666-3723-4eb0-b230-7bc75450b892 Ancestors: MonticelloConfigurations-dtl.137 Do not nil out Updaters on initialize, beacuse this can screw the whole update process. =============== Diff against MonticelloConfigurations-dtl.137 =============== Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. ]. + "Call + MCMcmUpdater resetUpdaters + manually if necessary"! - Updaters := nil. - ! Item was added: + ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- + resetUpdaters + + Updaters := nil.! Best regards -Tobias From Das.Linux at gmx.de Sun Oct 11 06:15:13 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Oct 11 06:15:13 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.139.mcz Message-ID: Nevermind :D On 11.10.2015, at 01:51, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: > http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.139.mcz > > ==================== Summary ==================== > > Name: MonticelloConfigurations-dtl.139 > Author: dtl > Time: 10 October 2015, 9:49:50.558 pm > UUID: 2f42a23f-99ef-48d0-a0eb-9ec51dd31cde > Ancestors: MonticelloConfigurations-topa.138 > > Fix default update map name access so preference is displayed correctly > > =============== Diff against MonticelloConfigurations-dtl.137 =============== > > Item was changed: From henrylavado at gmx.com Sun Oct 11 08:22:17 2015 From: henrylavado at gmx.com (Henry Lavado) Date: Sun Oct 11 08:22:22 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1444499819871-4854889.post@n4.nabble.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> <1444499819871-4854889.post@n4.nabble.com> Message-ID: <561A1C39.2040806@gmx.com> Yes, Marcel! I just tried TortoiseUDiff and Apply Path... and this worked all Good. It is grinding through the compile right now. Uh oh, ok, I got an error on FilePrims again: i686-w64-mingw32-gcc -I/usr/i686-w64-mingw32/sys-root/mingw/include -msse2 -ggdb2 -mwindows -mdll -mwin32 -mno-rtd -mms-bitfields -maccumulate-outgoing-args -mstack-arg-probe -D_MT -O1 -march=pentium4 -momit-leaf-frame-pointer -funroll-loops -fno-builtin-printf -fno-builtin-putchar -fno-builtin-bzero -I. -I../../../../platforms/win32/third-party/dx9sdk/Include -I../../../../spursrc/vm -I../../../../platforms/win32/vm -I../../../../platforms/Cross/vm -I../../../../src/plugins/FilePlugin -I../../../../platforms/win32/plugins/FilePlugin -I../../../../platforms/Cross/plugins/FilePlugin -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DWIN32 -DWIN32_FILE_SUPPORT -DNO_ISNAN -DNO_SERVICE -DNO_STD_FILE_SUPPORT -DNDEBUG -DLSB_FIRST -DVM_NAME=\"\" -DX86 -DSQUEAK_BUILTIN_PLUGIN -c ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c: In function ?sqFileSync?: ../../../../platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c:305:22: error: expected expression before ?SQFile? return sqFileFlush(SQFile *f); ^ ../../Makefile.plugin:165: recipe for target 'sqWin32FilePrims.o' failed make[1]: *** [sqWin32FilePrims.o] Error 1 make[1]: Leaving directory '/cygdrive/c/rabbit-hole/mutter/Spur-vm/build.win32x86/squeak.cog.spur/build/FilePlugin' Makefile:299: recipe for target 'build/vm/FilePlugin.lib' failed make: *** [build/vm/FilePlugin.lib] Error 2 Regards, Henry On 10/10/2015 1:56 PM, marcel.taeumel wrote: > The, I guess, you should install 32-bit Cygwin. :) Anyway, there should be no > need for the cygwin1.dll to run the compiled CogVM. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854889.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > -- --- Regards, Henry From lewis at mail.msen.com Sun Oct 11 15:34:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Oct 11 15:34:34 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.139.mcz In-Reply-To: References: Message-ID: <20151011153431.GA78871@shell.msen.com> On Sun, Oct 11, 2015 at 08:15:13AM +0200, Tobias Pape wrote: > Nevermind :D > Actually it is still not right. It does not properly handle the case of changing update maps e.g. from 'update' to 'update.V3'. Currently the dictionary of updaters is indexed only by repository URL. It probably should be done by URL + update map name. Dave > On 11.10.2015, at 01:51, commits@source.squeak.org wrote: > > > David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: > > http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.139.mcz > > > > ==================== Summary ==================== > > > > Name: MonticelloConfigurations-dtl.139 > > Author: dtl > > Time: 10 October 2015, 9:49:50.558 pm > > UUID: 2f42a23f-99ef-48d0-a0eb-9ec51dd31cde > > Ancestors: MonticelloConfigurations-topa.138 > > > > Fix default update map name access so preference is displayed correctly > > > > =============== Diff against MonticelloConfigurations-dtl.137 =============== > > > > Item was changed: > > > From jon at huv.com Sun Oct 11 16:28:50 2015 From: jon at huv.com (Jon Hylands) Date: Sun Oct 11 16:28:53 2015 Subject: [squeak-dev] Autonomous Shark-Monitoring Drone In-Reply-To: References: Message-ID: I don't actually have any experience with UAV (unmanned aerial vehicle) technology. The robots that I build a long time ago were AUVs (Autonomous Underwater Vehicles), which are completely different. That being said, there are a lot of people doing image analysis from drone footage for various purposes, mostly having to do with monitoring crops of one type or another. - Jon On Thu, Oct 8, 2015 at 6:05 AM, Edgar J. De Cleene wrote: > Elliot , here my 2 cents > > He is the man to contact > > Jon Hylands > > http://www.huv.com/jon > > Sure he have something to share > > Edgar > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151011/0e22173f/attachment.htm From Marcel.Taeumel at hpi.de Sun Oct 11 17:52:50 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Oct 11 18:03:15 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <56199F0A.9090400@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> <1444499819871-4854889.post@n4.nabble.com> <56199F0A.9090400@gmx.com> Message-ID: <1444585970783-4854969.post@n4.nabble.com> The patch files applies to squeak/branches/Cog :) -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4854969.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Sun Oct 11 19:18:23 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Oct 11 19:18:27 2015 Subject: [squeak-dev] Empty packages in squeak46 repo (was: Re: Squeak 4.6: System-dtl.754.mcz) In-Reply-To: <20151010014721.GA58023@shell.msen.com> References: <201510082348.t98NmA9n096113@shell.msen.com> <20151008235551.GA96085@shell.msen.com> <20151009000539.GA99353@shell.msen.com> <20151009003109.GA2442@shell.msen.com> <20151009010124.GA8136@shell.msen.com> <89E9E406-8188-4558-B3E6-4B9A3DE86CB9@gmail.com> <20151010014721.GA58023@shell.msen.com> Message-ID: It seems to work fine. On Fri, Oct 9, 2015 at 8:47 PM, David T. Lewis wrote: > Chris, > > When you get a chance, can you please try updating a 4.6 image and see > if the result looks good to you? I get one dirty package, which maybe just > means we need to add another update map (or fix an existing one). > > I was basically just trying to make sure that my attempt to fix the empty > MCZ files was the right thing to do, and that the resulting updated image > was in fact correct. I was not trying to provide any additional updates to > the 4.6 stream unless they are really necessary. > > Thanks, > Dave > > > On Fri, Oct 09, 2015 at 10:07:17AM -0500, Chris Muller wrote: >> Introducing MC overrides into the standard package structure created a >> giant PITA for the already-delayed release. Frankly, I think >> Breakpoints should be moved an external package at this point. It >> introduces package dependency hackings, compiled method hackings, and >> file-out hackings. All just so I can put an IMPLICIT "self halt" at >> the TOP of a method ONLY. I'm sorry Eliot, maybe I'm just not seeing >> it, but it seems like an insanely bad trade-off.. >> >> On Fri, Oct 9, 2015 at 1:43 AM, Eliot Miranda wrote: >> > Hi David, >> > >> > Re hasBreakpoint, IIRC BreakpointManager is in System, so the right thing is that the ^false version is in the Kernel package but that it is overridden by the ^BreakpointManager methodHasBreakpoint: self version in System. I think I failed in achieving this in 5.0. >> > >> > _,,,^..^,,,_ (phone) >> > >> >> On Oct 8, 2015, at 6:01 PM, David T. Lewis wrote: >> >> >> >>> On Thu, Oct 08, 2015 at 08:31:09PM -0400, David T. Lewis wrote: >> >>>> On Thu, Oct 08, 2015 at 08:05:39PM -0400, David T. Lewis wrote: >> >>>>> On Thu, Oct 08, 2015 at 07:55:51PM -0400, David T. Lewis wrote: >> >>>>> For squeak4.6, this fixes the bug that Craig reported on vm-dev >> >>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2015-October/019562.html >> >>>>> >> >>>>> I also see at least one mcz in the squeak46 repository that is empty, apparently >> >>>>> originally loaded from trunk for the release image, but somehow copied with >> >>>>> errors from trunk to squeak46. >> >>>>> >> >>>>> I fixed System-topa.753 by copying the good one in trunk into squeak46. There >> >>>>> may be a few more bad mcz files in squeak46. I'll fix them as I spot them. >> >>>> >> >>>> Compiler-eem.304 and Collections-topa.638 were also empty in the squeak46 repo, >> >>>> so I copied the good ones from trunk to squeak46. >> >>> >> >>> I hope I am not doing something stupid here. I wanted to fix the recreateSpecialObjectsArray >> >>> bug that remained in the squeak46 repo, and in doing so noticed some empty MCZ >> >>> packages in that repo. I presume that this is an error, some artifact of copying >> >>> them from trunk during the 4.6/5.0 release process. So I fixed (?) this by >> >>> copying the good (not empty) MCZ files from trunk to squeak46. >> >>> >> >>> All is well, except that I now have a dirty package in Kernel after doing an >> >>> updateFromServer. The conflicting method is CompiledMethod>>hasBreakpoint, which >> >>> is one that was moved around and refactored in the later trunk development. >> >>> >> >>> Before I do anything dangerous to try to "fix" this (after all, hasBreakpoint >> >>> will hang the system if it goes missing), can someone (Chris?) please confirm >> >>> that those packages were *not* supposed to be empty, and that the good copies >> >>> from trunk would be the right thing to have in squeak46? >> >> >> >> And I guess that the related question would be - for a fully updated Squeak 4.6 >> >> image, what is the correct implementation of CompiledMethod>>hasBreakpoint ? >> >> >> >> Is it this: >> >> >> >> CompiledMethod>>hasBreakpoint >> >> ^ false >> >> >> >> >> >> Or this: >> >> >> >> CompiledMethod>>hasBreakpoint >> >> ^BreakpointManager methodHasBreakpoint: self >> >> >> >> I think that the former version is the pre-Spur implementation, and the >> >> latter came from the Spur transition in trunk Kernel-cmm.936. >> >> >> >> I note also that WrappedBreakpoint>>hasBreakpoint just answers true in >> >> squeak46 so I am guessing the corresponding CompiledMethod>>hasBreakpoint >> >> would just answer false. >> >> >> >> Is that right? >> >> >> >> Thanks, >> >> Dave >> >> >> >> >> > > From commits at source.squeak.org Sun Oct 11 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 11 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151011215502.7479.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-October/009037.html Name: MonticelloConfigurations-dtl.139 Ancestors: MonticelloConfigurations-topa.138 Fix default update map name access so preference is displayed correctly ============================================= From eliot.miranda at gmail.com Mon Oct 12 00:45:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Oct 12 00:45:48 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: On Sat, Oct 10, 2015 at 11:11 AM, Craig Latta wrote: > > > Any advice about how the trace log could be useful here? I notice > ownVM etc. write to it. > For example, you can use it to generate a log of important thread-switching events, to get an idea of what's going on. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151011/1f264b1b/attachment.htm From Das.Linux at gmx.de Mon Oct 12 21:51:15 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Oct 12 21:51:26 2015 Subject: [squeak-dev] [ANN] New SqueakSSL binaries (v0.2.0b) for Linux Message-ID: <476F1279-9FBF-4786-9780-C9B4EB8B3D7D@gmx.de> Hi all, I've created a new version of the SqueakSSL binaries: https://github.com/itsmeront/squeakssl/releases/tag/v0.2.0b Only changes: ? Linked the Linux binary statically against LibreSSL 2.2.3 (was 2.2.1) ? Produce SqueakSSL and so.SqueakSSL with the correct sonames ? Explicitly link the Linux binaries with librt (was omitted by default) The OSX and Windows versions stayed. The actual C code did not change. Best regards -Tobias From eliot.miranda at gmail.com Mon Oct 12 23:33:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Oct 12 23:33:55 2015 Subject: [squeak-dev] Re: [Vm-dev] re: "callback failed to own the VM" In-Reply-To: References: Message-ID: Hi Craig, no time soon. My priorities this year are to finish the x64 JIT and do contracted-for work. I hope the Threaded VM will become a priority some time next year, but it will have to wait until one of my sponsors requires it. On Mon, Oct 12, 2015 at 4:07 PM, Craig Latta wrote: > > > > ...I have no cycles to think about this right now. > > When do you think you might? I'm getting nowhere and should drop it. > > > thanks, > > -C > > -- > Craig Latta > netjam.org > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151012/98ea09e2/attachment.htm From commits at source.squeak.org Tue Oct 13 00:02:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 13 00:02:42 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.668.mcz ==================== Summary ==================== Name: Collections-ul.668 Author: ul Time: 13 October 2015, 1:07:48.216 am UUID: 8abfa05a-70c6-4e38-bc00-7d665183106c Ancestors: Collections-ul.667 In Dictionary >> #=, make sure that the dictionaries agree on what the common keys are. This way the behaviour of #= will be symmetric when the two dictionaries implement key equality differently. =============== Diff against Collections-ul.667 =============== Item was changed: ----- Method: Dictionary>>= (in category 'comparing') ----- + = anObject - = 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 == anObject ifTrue: [ ^true ]. + anObject isDictionary ifFalse: [ ^false ]. + self size = anObject size ifFalse: [ ^false ]. + self associationsDo: [ :association | + (anObject at: association key ifAbsent: [ ^false ]) = association value + ifFalse: [ ^false ] ]. + "The two dictionaries may have different ideas about equal keys, so check both ways to avoid any inconsistency." + anObject associationsDo: [ :association | + (self at: association key ifAbsent: [ ^false ]) = association value + ifFalse: [ ^false ] ]. + ^true! - self == aDictionary ifTrue: [ ^ true ]. - aDictionary isDictionary ifFalse: [^false]. - self size = aDictionary size ifFalse: [^false]. - self associationsDo: [:assoc| - (aDictionary at: assoc key ifAbsent: [^false]) = assoc value - ifFalse: [^false]]. - ^true - - ! From commits at source.squeak.org Tue Oct 13 00:07:14 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 13 00:07:15 2015 Subject: [squeak-dev] The Inbox: MonticelloConfigurations-dtl.140.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Inbox: http://source.squeak.org/inbox/MonticelloConfigurations-dtl.140.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.140 Author: dtl Time: 12 October 2015, 7:46:53.2 pm UUID: f0c437d3-fe3c-439e-a59c-632bf1a8eab2 Ancestors: MonticelloConfigurations-dtl.139 Allow mutliple update streams per repository. Register a different updater for each repository / update map name, such that each instance can keep track of its own lastUpdateMap. An updater knows how to register and unregister itself. The default updater for the system is specified by preferences, and new updaters are created as needed by a preference change. =============== Diff against MonticelloConfigurations-dtl.139 =============== Item was changed: Object subclass: #MCMcmUpdater + instanceVariableNames: 'repository updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateMap DefaultUpdateURL Registry SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - instanceVariableNames: 'updateMapName lastUpdateMap' - classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 10/12/2015 19:45' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. + Repository - A registry of known MCMcmUpdater instances identified by repository URL and update map name. - Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. + repository - URL of the repository in which the update maps are located. + lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was added: + ----- Method: MCMcmUpdater class>>clearRegistry (in category 'class initialization') ----- + clearRegistry + "Save the current default updater, clear the registry, and re-register the current updater. + This is intended for cleaning up an image prior to public release. Assumes that the + current updater is the one intended for ongoing use in this image." + + "MCMcmUpdater clearRegistry" + + | current | + current := self default. + Registry := nil. + current register. + ^Registry! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default + "The default instance for system updates. Uses a default repository and update map + name that may be set as preferences." - "The default instance for system updates. Uses a default update map - name that may be set as a preference to enable a specific update stream - for a repository." + ^self updateMapNamed: self updateMapName repository: self defaultUpdateURL + ! - ^ self updaters - at: self defaultUpdateURL - ifAbsentPut: [self updateMapNamed: 'update' ]! Item was added: + ----- Method: MCMcmUpdater class>>forRepository:updateMap: (in category 'registry') ----- + forRepository: repository updateMap: basename + "Answer the requested updater from the repository, or nil of not found" + + "MCMcmUpdater forRepository: 'http://source.squeak.org/trunk' updateMap: 'update'" + "MCMcmUpdater forRepository: 'foo' updateMap: 'bar'" + + ^ ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsent: [^nil]) + at: basename + ifAbsent: [^nil]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" + + self flag: #TODO. "remove Updaters class var after transition to Registry" + DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. + DefaultUpdateMap := self defaultBaseName. ]. + + Registry ifNil: [ "Migrate from Updaters class var to Registry" + "Set new repository ivar in all existing instances" + Updaters keysAndValuesDo: [ :k :v | v repository: k]. + "Populate the new registry" + Updaters do: [:e | e register]. + "Set the default update map name to its prior value" + self updateMapName: + ((Updaters at: MCMcmUpdater defaultUpdateURL) updateMapName) ]. + ! - "Call - MCMcmUpdater resetUpdaters - manually if necessary"! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName + "Answer a new instance with empty last update map, not yet registered" + + ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName lastUpdateMap: dictionary + "Answer a new instance, not yet registered" + + ^ self new + repository: url; + updateMapName: baseName; + lastUpdateMap: dictionary! Item was removed: - ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- - resetUpdaters - - Updaters := nil.! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - - ^ self default updateFromDefaultRepository - ! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- - updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName - "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and - using update map baseName" - - ^ (self updateMapNamed: baseName repository: updaterUrlKey) - updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" ^ (self updateMapNamed: baseName repository: updaterUrlKey) + doUpdate! - updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') ----- updateFromServer "Update the image by loading all pending updates from the server." + ^self default doUpdate - ^self default updateFrom: self defaultUpdateURL ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^DefaultUpdateMap ifNil:['']! - ^ self default updateMapName - ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- updateMapName: mapName + "The default update map name for the default updater." - "The default update map name for the default updater. If this is changed, - then the default updater must be replaced because its remembered position - in the update map sequence will not be valid for the new update map." + DefaultUpdateMap := mapName! - self default updateMapName = mapName - ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) - ifTrue: [self updaters - at: self defaultUpdateURL - put: (self updateMapNamed: mapName)]]! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- - updateMapNamed: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " - - ^ self new - updateMapName: baseName; - lastUpdateMap: Dictionary new! Item was changed: ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name baseName, + Register a new instance if not present in the registry." - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." + " | updater1 updater2 | + updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. + updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. + updater1 unregister. + updater2 unregister. + Registry" + + ^(self forRepository: url updateMap: baseName) + ifNil: [ "register a new updater" + (self repository: url updateMap: baseName) register]. + - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. - ^ updater ! Item was removed: - ----- Method: MCMcmUpdater class>>updaters (in category 'accessing') ----- - updaters - "A dictionary of updaters, including the system default, indexed by repository URL" - - ^ Updaters ifNil: [ Updaters := Dictionary new ]! Item was added: + ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- + doUpdate + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete." + | config | + "Flush all caches. If a previous download failed this is often helpful" + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate).] + ifFalse: [self inform: 'Update completed.'] + ! Item was added: + ----- Method: MCMcmUpdater>>isRegistered (in category 'registry') ----- + isRegistered + "True if this instance is registered. False if another instance with the same + repository and updateNameName is registered." + + ^self == ((Registry + at: repository + ifAbsent: [^false]) + at: updateMapName + ifAbsent: [^false]). + + ! Item was added: + ----- Method: MCMcmUpdater>>printOn: (in category 'printing') ----- + printOn: aStream + + super printOn: aStream. + aStream nextPutAll: ' on '''; + nextPutAll: updateMapName asString; + nextPutAll: ''' at '; + nextPutAll: repository asString! Item was added: + ----- Method: MCMcmUpdater>>register (in category 'registry') ----- + register + "Register this instance, keyed by repository and update map name. Each update + maintains its own lastUpdateMap. The registry permits multilple updaters to be + maintained, with each updater keeping track of its own last update map." + + repository ifNil: [self error: 'repository is ', repository asString]. + updateMapName ifNil: [self error: 'updateMapName is ', updateMapName asString]. + updateMapName isEmpty ifTrue: [self error: 'updateMapName must be specified']. + ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsentPut: [Dictionary new]) + at: updateMapName put: self + + ! Item was added: + ----- Method: MCMcmUpdater>>repository (in category 'accessing') ----- + repository + "URL string of the repository for the update maps" + + ^ repository! Item was added: + ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- + repository: repositoryURLString + + repository := repositoryURLString! Item was added: + ----- Method: MCMcmUpdater>>unregister (in category 'registry') ----- + unregister + "If this instance is registered, remove it frorm the registry." + + self isRegistered + ifTrue: [(Registry at: repository) removeKey: updateMapName. + (Registry at: repository) isEmpty + ifTrue: [Registry removeKey: repository]] + ! Item was removed: - ----- Method: MCMcmUpdater>>updateFrom: (in category 'updating') ----- - updateFrom: url - "Update the image by loading all pending updates from the server. If this is - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { url }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was removed: - ----- Method: MCMcmUpdater>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - ^self updateFromRepositories: {self class defaultUpdateURL}! From asqueaker at gmail.com Tue Oct 13 00:14:15 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 13 00:14:17 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This extra check halves the speed of Dictionary>>= when they are equal, for all cases which consider equivalence symmetrical. If a=b, then it should be able to be assumed that b=a. What case is it not? On Mon, Oct 12, 2015 at 7:02 PM, wrote: > Levente Uzonyi uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-ul.668.mcz > > ==================== Summary ==================== > > Name: Collections-ul.668 > Author: ul > Time: 13 October 2015, 1:07:48.216 am > UUID: 8abfa05a-70c6-4e38-bc00-7d665183106c > Ancestors: Collections-ul.667 > > In Dictionary >> #=, make sure that the dictionaries agree on what the > common keys are. This way the behaviour of #= will be symmetric when the > two dictionaries implement key equality differently. > > =============== Diff against Collections-ul.667 =============== > > Item was changed: > ----- Method: Dictionary>>= (in category 'comparing') ----- > + = anObject > - = 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 == anObject ifTrue: [ ^true ]. > + anObject isDictionary ifFalse: [ ^false ]. > + self size = anObject size ifFalse: [ ^false ]. > + self associationsDo: [ :association | > + (anObject at: association key ifAbsent: [ ^false ]) = > association value > + ifFalse: [ ^false ] ]. > + "The two dictionaries may have different ideas about equal keys, > so check both ways to avoid any inconsistency." > + anObject associationsDo: [ :association | > + (self at: association key ifAbsent: [ ^false ]) = > association value > + ifFalse: [ ^false ] ]. > + ^true! > - self == aDictionary ifTrue: [ ^ true ]. > - aDictionary isDictionary ifFalse: [^false]. > - self size = aDictionary size ifFalse: [^false]. > - self associationsDo: [:assoc| > - (aDictionary at: assoc key ifAbsent: [^false]) = assoc > value > - ifFalse: [^false]]. > - ^true > - > - ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151012/e9ad2123/attachment.htm From eliot.miranda at gmail.com Tue Oct 13 01:24:26 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 13 01:24:34 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> I'm guessing | ed id | ed := Dictionary with: 'a' -> $a. id := IdentityDictionary with: 'a' copy -> $a. { ed = id. id = ed } _,,,^..^,,,_ (phone) > On Oct 12, 2015, at 5:14 PM, Chris Muller wrote: > > This extra check halves the speed of Dictionary>>= when they are equal, for all cases which consider equivalence symmetrical. If a=b, then it should be able to be assumed that b=a. What case is it not? > >> On Mon, Oct 12, 2015 at 7:02 PM, wrote: >> Levente Uzonyi uploaded a new version of Collections to project The Trunk: >> http://source.squeak.org/trunk/Collections-ul.668.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-ul.668 >> Author: ul >> Time: 13 October 2015, 1:07:48.216 am >> UUID: 8abfa05a-70c6-4e38-bc00-7d665183106c >> Ancestors: Collections-ul.667 >> >> In Dictionary >> #=, make sure that the dictionaries agree on what the common keys are. This way the behaviour of #= will be symmetric when the two dictionaries implement key equality differently. >> >> =============== Diff against Collections-ul.667 =============== >> >> Item was changed: >> ----- Method: Dictionary>>= (in category 'comparing') ----- >> + = anObject >> - = 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 == anObject ifTrue: [ ^true ]. >> + anObject isDictionary ifFalse: [ ^false ]. >> + self size = anObject size ifFalse: [ ^false ]. >> + self associationsDo: [ :association | >> + (anObject at: association key ifAbsent: [ ^false ]) = association value >> + ifFalse: [ ^false ] ]. >> + "The two dictionaries may have different ideas about equal keys, so check both ways to avoid any inconsistency." >> + anObject associationsDo: [ :association | >> + (self at: association key ifAbsent: [ ^false ]) = association value >> + ifFalse: [ ^false ] ]. >> + ^true! >> - self == aDictionary ifTrue: [ ^ true ]. >> - aDictionary isDictionary ifFalse: [^false]. >> - self size = aDictionary size ifFalse: [^false]. >> - self associationsDo: [:assoc| >> - (aDictionary at: assoc key ifAbsent: [^false]) = assoc value >> - ifFalse: [^false]]. >> - ^true >> - >> - ! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151012/5462e143/attachment.htm From leves at elte.hu Tue Oct 13 01:37:17 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 13 01:37:22 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: Exactly. It can happen with other kind of dictionaries as well. And class checks would not enough: d1 := PluggableDictionary new. d2 := PluggableDictionary new equalBlock: #==. d1 at: 'test' copy put: 4. d2 at: 'test' put: 4. {d1 = d2. d2 = d1} So, performance goes down in some cases, but I guess we agree on #= has to be symmetric. We can speed up some cases if the dictionaries can tell if #= is guaranteed to be symmetric when they have the same class. Levente On Mon, 12 Oct 2015, Eliot Miranda wrote: > I'm guessing > > | ed id | > ed := Dictionary with: 'a' -> $a. > id?:= IdentityDictionary with: 'a' copy -> $a. > { ed = id. id = ed } > > _,,,^..^,,,_ (phone) > > On Oct 12, 2015, at 5:14 PM, Chris Muller wrote: > > This extra check halves the speed of Dictionary>>= when they are equal, for all cases which consider equivalence symmetrical.? If a=b, > then it should be able to be assumed that b=a.? What case is it not? > > On Mon, Oct 12, 2015 at 7:02 PM, wrote: > Levente Uzonyi uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-ul.668.mcz > > ==================== Summary ==================== > > Name: Collections-ul.668 > Author: ul > Time: 13 October 2015, 1:07:48.216 am > UUID: 8abfa05a-70c6-4e38-bc00-7d665183106c > Ancestors: Collections-ul.667 > > In Dictionary >> #=, make sure that the dictionaries agree on what the common keys are. This way the behaviour of #= will be > symmetric when the two dictionaries implement key equality differently. > > =============== Diff against Collections-ul.667 =============== > > Item was changed: > ? ----- Method: Dictionary>>= (in category 'comparing') ----- > + = anObject > - = 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 == anObject ifTrue: [ ^true ]. > +? ? ? ?anObject isDictionary ifFalse: [ ^false ]. > +? ? ? ?self size = anObject size ifFalse: [ ^false ]. > +? ? ? ?self associationsDo: [ :association | > +? ? ? ? ? ? ? ?(anObject at: association key ifAbsent: [ ^false ]) = association value > +? ? ? ? ? ? ? ? ? ? ? ?ifFalse: [ ^false ] ]. > +? ? ? ?"The two dictionaries may have different ideas about equal keys, so check both ways to avoid any inconsistency." > +? ? ? ?anObject associationsDo: [ :association | > +? ? ? ? ? ? ? ?(self at: association key ifAbsent: [ ^false ]) = association value > +? ? ? ? ? ? ? ? ? ? ? ?ifFalse:? [ ^false ] ]. > +? ? ? ?^true! > -? ? ? ?self == aDictionary ifTrue: [ ^ true ]. > -? ? ? ?aDictionary isDictionary ifFalse: [^false]. > -? ? ? ?self size = aDictionary size ifFalse: [^false]. > -? ? ? ?self associationsDo: [:assoc| > -? ? ? ? ? ? ? ?(aDictionary at: assoc key ifAbsent: [^false]) = assoc value > -? ? ? ? ? ? ? ? ? ? ? ?ifFalse: [^false]]. > -? ? ? ?^true > - > - ! > > > > > > From lecteur at zogotounga.net Tue Oct 13 08:28:11 2015 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Oct 13 08:28:07 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: <561CC09B.7070103@zogotounga.net> > d1 := PluggableDictionary new. > d2 := PluggableDictionary new equalBlock: #==. > d1 at: 'test' copy put: 4. > d2 at: 'test' put: 4. > {d1 = d2. > d2 = d1} But does it always make sense to say that two dictionaries are equal even though they do not have the same equalBlock ? It seems to me there are different semantics for dictionary equality here: one testing if the associations are equal, one testing if the expected behavior (at large) of the dictionaries are equal. The single #= test is overload at the moment. Stef From nicolaihess at web.de Tue Oct 13 08:41:08 2015 From: nicolaihess at web.de (Nicolai Hess) Date: Tue Oct 13 08:41:11 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: 2015-10-13 3:37 GMT+02:00 Levente Uzonyi : > Exactly. It can happen with other kind of dictionaries as well. And class > checks would not enough: > > d1 := PluggableDictionary new. > d2 := PluggableDictionary new equalBlock: #==. > d1 at: 'test' copy put: 4. > d2 at: 'test' put: 4. > {d1 = d2. > d2 = d1} > > So, performance goes down in some cases, but I guess we agree on #= has to > be symmetric. We can speed up some cases if the dictionaries can tell if #= > is guaranteed to be symmetric when they have the same class. > But #hash still uses species, that means, we can have a Dictionary and an IdentityDictionary to be equal, but with different hash. s := 'a' ed := Dictionary with: s -> $a. id := IdentityDictionary with: s -> $a. { ed = id. id = ed. ed hash = id hash } "-> #(true true false)" > > Levente > > > On Mon, 12 Oct 2015, Eliot Miranda wrote: > > I'm guessing >> >> | ed id | >> ed := Dictionary with: 'a' -> $a. >> id := IdentityDictionary with: 'a' copy -> $a. >> { ed = id. id = ed } >> >> _,,,^..^,,,_ (phone) >> >> On Oct 12, 2015, at 5:14 PM, Chris Muller wrote: >> >> This extra check halves the speed of Dictionary>>= when they are >> equal, for all cases which consider equivalence symmetrical. If a=b, >> then it should be able to be assumed that b=a. What case is it not? >> >> On Mon, Oct 12, 2015 at 7:02 PM, wrote: >> Levente Uzonyi uploaded a new version of Collections to project The >> Trunk: >> http://source.squeak.org/trunk/Collections-ul.668.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-ul.668 >> Author: ul >> Time: 13 October 2015, 1:07:48.216 am >> UUID: 8abfa05a-70c6-4e38-bc00-7d665183106c >> Ancestors: Collections-ul.667 >> >> In Dictionary >> #=, make sure that the dictionaries agree on what >> the common keys are. This way the behaviour of #= will be >> symmetric when the two dictionaries implement key equality >> differently. >> >> =============== Diff against Collections-ul.667 =============== >> >> Item was changed: >> ----- Method: Dictionary>>= (in category 'comparing') ----- >> + = anObject >> - = 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 == anObject ifTrue: [ ^true ]. >> + anObject isDictionary ifFalse: [ ^false ]. >> + self size = anObject size ifFalse: [ ^false ]. >> + self associationsDo: [ :association | >> + (anObject at: association key ifAbsent: [ ^false ]) >> = association value >> + ifFalse: [ ^false ] ]. >> + "The two dictionaries may have different ideas about equal >> keys, so check both ways to avoid any inconsistency." >> + anObject associationsDo: [ :association | >> + (self at: association key ifAbsent: [ ^false ]) = >> association value >> + ifFalse: [ ^false ] ]. >> + ^true! >> - self == aDictionary ifTrue: [ ^ true ]. >> - aDictionary isDictionary ifFalse: [^false]. >> - self size = aDictionary size ifFalse: [^false]. >> - self associationsDo: [:assoc| >> - (aDictionary at: assoc key ifAbsent: [^false]) = >> assoc value >> - ifFalse: [^false]]. >> - ^true >> - >> - ! >> >> >> >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151013/b8dc6d0a/attachment.htm From ma.chris.m at gmail.com Tue Oct 13 15:51:49 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Oct 13 15:52:31 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: >> Exactly. It can happen with other kind of dictionaries as well. And class checks would not enough: >> >> d1 := PluggableDictionary new. >> d2 := PluggableDictionary new equalBlock: #==. >> d1 at: 'test' copy put: 4. >> d2 at: 'test' put: 4. >> {d1 = d2. >> d2 = d1} >> >> So, performance goes down in some cases, but I guess we agree on #= has to be symmetric. For simple value types, yes, we should be able to make that assumption, but symmetry of equivalence starts to break down for objects as complex as a Dictionary.. > We can speed up some cases if the dictionaries can tell if #= is guaranteed to be symmetric > when they have the same class. > > But #hash still uses species, that means, we can have a Dictionary and an IdentityDictionary to be equal, but with different hash. > > s := 'a' > ed := Dictionary with: s -> $a. > id := IdentityDictionary with: s -> $a. > { ed = id. id = ed. ed hash = id hash } "-> #(true true false)" Equivalence of complex objects is always a "loose" definition, of which there can be several. Additional API like #hasEqualElements: (of SequenceableCollection) could be added as needed to accomodate other application needs, but we only get ONE particular implementation which can also be suitable for use in HashedCollections, because they send #=. Changing it should be really scrutinized. I'm wondering if Levente could get by with an app-specific equivalence check without needing it for use in HashedCllections? Seems like a lot of the #= in the system require class or species equivalence, a few allow isKindOf:, but only one or two allow #is message response. I'm wondering now if those last kind are ill-advised... BTW, with this change, I guess we're now somewhat inconsistent with Set, | ed id | ed := Set with: 'a' copy. id := IdentitySet with: 'a'. { ed = id. id = ed } " #(false true)" My production app is going to be punished by Levente's change, unnecessarily. I think we should consider an alternative like adding #hasEqualElements: for your app... From leves at elte.hu Tue Oct 13 18:05:37 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 13 18:05:41 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: What we can do is to use class (or species) checks. That way we can be consistent with the current hash implementation, and ensure symmetry, but different dictionaries holding the same pairs will not be equivalent. PluggableDictionary needs its own implementation of course. And Sets can use the same kind of check as well. Levente On Tue, 13 Oct 2015, Chris Muller wrote: >>> Exactly. It can happen with other kind of dictionaries as well. And class checks would not enough: >>> >>> d1 := PluggableDictionary new. >>> d2 := PluggableDictionary new equalBlock: #==. >>> d1 at: 'test' copy put: 4. >>> d2 at: 'test' put: 4. >>> {d1 = d2. >>> d2 = d1} >>> >>> So, performance goes down in some cases, but I guess we agree on #= has to be symmetric. > > For simple value types, yes, we should be able to make that > assumption, but symmetry of equivalence starts to break down for > objects as complex as a Dictionary.. > >> We can speed up some cases if the dictionaries can tell if #= is guaranteed to be symmetric >> when they have the same class. >> >> But #hash still uses species, that means, we can have a Dictionary and an IdentityDictionary to be equal, but with different hash. >> >> s := 'a' >> ed := Dictionary with: s -> $a. >> id := IdentityDictionary with: s -> $a. >> { ed = id. id = ed. ed hash = id hash } "-> #(true true false)" > > Equivalence of complex objects is always a "loose" definition, of > which there can be several. Additional API like #hasEqualElements: > (of SequenceableCollection) could be added as needed to accomodate > other application needs, but we only get ONE particular implementation > which can also be suitable for use in HashedCollections, because they > send #=. Changing it should be really scrutinized. > > I'm wondering if Levente could get by with an app-specific equivalence > check without needing it for use in HashedCllections? Seems like a > lot of the #= in the system require class or species equivalence, a > few allow isKindOf:, but only one or two allow #is message response. > I'm wondering now if those last kind are ill-advised... > > BTW, with this change, I guess we're now somewhat inconsistent with Set, > > | ed id | > ed := Set with: 'a' copy. > id := IdentitySet with: 'a'. > { ed = id. id = ed } " #(false true)" > > My production app is going to be punished by Levente's change, > unnecessarily. I think we should consider an alternative like adding > #hasEqualElements: for your app... > From ma.chris.m at gmail.com Tue Oct 13 19:19:00 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Oct 13 19:19:42 2015 Subject: [squeak-dev] The Trunk: Collections-ul.668.mcz In-Reply-To: References: <561c4a26.4718c20a.a3770.ffffcde3SMTPIN_ADDED_MISSING@mx.google.com> <15973E56-59B9-44BC-A351-345CDC89D225@gmail.com> Message-ID: Okay if you do would you please use a species rather than class check? #class checks create problems for Magma or any systems which use proxies, because such tests produce a different result depending on whether the proxy is materialized or not because #class is a inlined message which cannot be detected by the proxy. Thanks. On Tue, Oct 13, 2015 at 1:05 PM, Levente Uzonyi wrote: > What we can do is to use class (or species) checks. That way we can be > consistent with the current hash implementation, and ensure symmetry, but > different dictionaries holding the same pairs will not be equivalent. > PluggableDictionary needs its own implementation of course. > And Sets can use the same kind of check as well. > > Levente > > > On Tue, 13 Oct 2015, Chris Muller wrote: > >>>> Exactly. It can happen with other kind of dictionaries as well. And >>>> class checks would not enough: >>>> >>>> d1 := PluggableDictionary new. >>>> d2 := PluggableDictionary new equalBlock: #==. >>>> d1 at: 'test' copy put: 4. >>>> d2 at: 'test' put: 4. >>>> {d1 = d2. >>>> d2 = d1} >>>> >>>> So, performance goes down in some cases, but I guess we agree on #= has >>>> to be symmetric. >> >> >> For simple value types, yes, we should be able to make that >> assumption, but symmetry of equivalence starts to break down for >> objects as complex as a Dictionary.. >> >>> We can speed up some cases if the dictionaries can tell if #= is >>> guaranteed to be symmetric >>> when they have the same class. >>> >>> But #hash still uses species, that means, we can have a Dictionary and an >>> IdentityDictionary to be equal, but with different hash. >>> >>> s := 'a' >>> ed := Dictionary with: s -> $a. >>> id := IdentityDictionary with: s -> $a. >>> { ed = id. id = ed. ed hash = id hash } "-> #(true true false)" >> >> >> Equivalence of complex objects is always a "loose" definition, of >> which there can be several. Additional API like #hasEqualElements: >> (of SequenceableCollection) could be added as needed to accomodate >> other application needs, but we only get ONE particular implementation >> which can also be suitable for use in HashedCollections, because they >> send #=. Changing it should be really scrutinized. >> >> I'm wondering if Levente could get by with an app-specific equivalence >> check without needing it for use in HashedCllections? Seems like a >> lot of the #= in the system require class or species equivalence, a >> few allow isKindOf:, but only one or two allow #is message response. >> I'm wondering now if those last kind are ill-advised... >> >> BTW, with this change, I guess we're now somewhat inconsistent with Set, >> >> | ed id | >> ed := Set with: 'a' copy. >> id := IdentitySet with: 'a'. >> { ed = id. id = ed } " #(false true)" >> >> My production app is going to be punished by Levente's change, >> unnecessarily. I think we should consider an alternative like adding >> #hasEqualElements: for your app... >> > From javier_diaz_r at mac.com Tue Oct 13 19:32:21 2015 From: javier_diaz_r at mac.com (Javier Diaz-Reinoso) Date: Tue Oct 13 19:32:57 2015 Subject: [squeak-dev] Update Squeak on iOS Message-ID: <6B9404C7-3652-4235-AD85-49E42429087F@mac.com> I continued testing the VM, I find this problems: - the allocation of memory using mmap works in a iPad2 but have problems in a iPad mini, I changed the allocation to malloc - the VM loss the mouseUp events, I trace this to the use of TouchCmdMorph who was calling Sensor touchCmdPressed who eventually call flushEvents, I changed to a new ToggleModifiersMorph who works like in Pyonkee, touch and changes the modifier, the after a delay restore the modifier. Now is possible to shift, crtl, alt, cmd-click. - also a button to show the keyboard, is less intrusive that the auto show call in TextMorphForEditView>>keyboardFocusChange: But I find now a bug when dragging a morph, in the mouseDown the morph disappears, only when you release the finger (or the mouse in Simulator) the morph is visible again, I try using the preference debugShowDamage but that also is not working, at the end I find that PasteUpMorph>>flashRects:color: also don?t work, this is a method who call Display directly, so I think this is a bug (incomplete implementation?) in the VM, unfortunately I don?t have any knowledge of the CALayer who I think are used to display, or the time to continue this testing. So to don?t waste the work already done I put a zip file in: https://copy.com/7T9DPaUxDjQSc2Kf this is a self contained directory, so if you have an Xcode 7 from Apple and create an account with your Apple ID, you can double click the alias to the xcodeproj, fix the account and then (hopefully) run the application in your iPad, only remember this is alpha quality. Happy Ada Lovelace day! osou???-z??p ?????? From commits at source.squeak.org Tue Oct 13 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 13 21:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151013215502.4795.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-October/009038.html Name: Collections-ul.668 Ancestors: Collections-ul.667 In Dictionary >> #=, make sure that the dictionaries agree on what the common keys are. This way the behaviour of #= will be symmetric when the two dictionaries implement key equality differently. ============================================= From lewis at mail.msen.com Tue Oct 13 23:11:20 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 13 23:11:22 2015 Subject: [squeak-dev] The Inbox: MonticelloConfigurations-dtl.140.mcz In-Reply-To: <201510130007.t9D07Gww024864@shell.msen.com> References: <201510130007.t9D07Gww024864@shell.msen.com> Message-ID: <20151013231120.GA58634@shell.msen.com> This update fixes some issues related to maintaining two or more update streams within a repository, such as the 'update.spur' versus 'update' streams that were maintained during the Squeak 5.0 transition. I think it is safe to move to trunk, but since it impacts our update stream I will leave it in inbox for a few days in case anyone wants to have a look. Dave On Tue, Oct 13, 2015 at 12:07:13AM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of MonticelloConfigurations to project The Inbox: > http://source.squeak.org/inbox/MonticelloConfigurations-dtl.140.mcz > > ==================== Summary ==================== > > Name: MonticelloConfigurations-dtl.140 > Author: dtl > Time: 12 October 2015, 7:46:53.2 pm > UUID: f0c437d3-fe3c-439e-a59c-632bf1a8eab2 > Ancestors: MonticelloConfigurations-dtl.139 > > Allow mutliple update streams per repository. Register a different updater for each repository / update map name, such that each instance can keep track of its own lastUpdateMap. An updater knows how to register and unregister itself. The default updater for the system is specified by preferences, and new updaters are created as needed by a preference change. > > =============== Diff against MonticelloConfigurations-dtl.139 =============== > > Item was changed: > Object subclass: #MCMcmUpdater > + instanceVariableNames: 'repository updateMapName lastUpdateMap' > + classVariableNames: 'DefaultUpdateMap DefaultUpdateURL Registry SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' > - instanceVariableNames: 'updateMapName lastUpdateMap' > - classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' > poolDictionaries: '' > category: 'MonticelloConfigurations'! > > + !MCMcmUpdater commentStamp: 'dtl 10/12/2015 19:45' prior: 0! > - !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! > MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. > > When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. > > Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. > > If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: > > 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: > MCMcmUpdater updateMissingPackages: false > Note that any new packages added to the repositories will not be picked up when this is turned off. > 2) To have MCMcmUpdater not update a specific package, evaluate > MCMcmUpdater disableUpdatesOfPackage: > > Class Variables definitions: > > DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. > > + Repository - A registry of known MCMcmUpdater instances identified by repository URL and update map name. > - Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. > > SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). > > UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). > > Instance Variables: > > updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. > > + repository - URL of the repository in which the update maps are located. > + > lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. > ! > > Item was added: > + ----- Method: MCMcmUpdater class>>clearRegistry (in category 'class initialization') ----- > + clearRegistry > + "Save the current default updater, clear the registry, and re-register the current updater. > + This is intended for cleaning up an image prior to public release. Assumes that the > + current updater is the one intended for ongoing use in this image." > + > + "MCMcmUpdater clearRegistry" > + > + | current | > + current := self default. > + Registry := nil. > + current register. > + ^Registry! > > Item was changed: > ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- > default > + "The default instance for system updates. Uses a default repository and update map > + name that may be set as preferences." > - "The default instance for system updates. Uses a default update map > - name that may be set as a preference to enable a specific update stream > - for a repository." > > + ^self updateMapNamed: self updateMapName repository: self defaultUpdateURL > + ! > - ^ self updaters > - at: self defaultUpdateURL > - ifAbsentPut: [self updateMapNamed: 'update' ]! > > Item was added: > + ----- Method: MCMcmUpdater class>>forRepository:updateMap: (in category 'registry') ----- > + forRepository: repository updateMap: basename > + "Answer the requested updater from the repository, or nil of not found" > + > + "MCMcmUpdater forRepository: 'http://source.squeak.org/trunk' updateMap: 'update'" > + "MCMcmUpdater forRepository: 'foo' updateMap: 'bar'" > + > + ^ ((Registry ifNil: [Registry := Dictionary new]) > + at: repository > + ifAbsent: [^nil]) > + at: basename > + ifAbsent: [^nil]! > > Item was changed: > ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- > initialize > "MCMcmUpdater initialize" > + > + self flag: #TODO. "remove Updaters class var after transition to Registry" > + > DefaultUpdateURL ifNil:[ > DefaultUpdateURL := MCHttpRepository trunkUrlString. > + DefaultUpdateMap := self defaultBaseName. > ]. > + > + Registry ifNil: [ "Migrate from Updaters class var to Registry" > + "Set new repository ivar in all existing instances" > + Updaters keysAndValuesDo: [ :k :v | v repository: k]. > + "Populate the new registry" > + Updaters do: [:e | e register]. > + "Set the default update map name to its prior value" > + self updateMapName: > + ((Updaters at: MCMcmUpdater defaultUpdateURL) updateMapName) ]. > + ! > - "Call > - MCMcmUpdater resetUpdaters > - manually if necessary"! > > Item was added: > + ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- > + repository: url updateMap: baseName > + "Answer a new instance with empty last update map, not yet registered" > + > + ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! > > Item was added: > + ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- > + repository: url updateMap: baseName lastUpdateMap: dictionary > + "Answer a new instance, not yet registered" > + > + ^ self new > + repository: url; > + updateMapName: baseName; > + lastUpdateMap: dictionary! > > Item was removed: > - ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- > - resetUpdaters > - > - Updaters := nil.! > > Item was removed: > - ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') ----- > - updateFromDefaultRepository > - "Update from the default repository only" > - > - ^ self default updateFromDefaultRepository > - ! > > Item was removed: > - ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- > - updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName > - "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and > - using update map baseName" > - > - ^ (self updateMapNamed: baseName repository: updaterUrlKey) > - updateFromRepositories: repositoryUrls! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- > updateFromRepository: updaterUrlKey baseName: baseName > "Update using an MCMcmUpdater identified by updaterUrlKey, and using > update map baseName" > > ^ (self updateMapNamed: baseName repository: updaterUrlKey) > + doUpdate! > - updateFrom: updaterUrlKey! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') ----- > updateFromServer > "Update the image by loading all pending updates from the server." > > + ^self default doUpdate > - ^self default updateFrom: self defaultUpdateURL > ! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- > updateMapName > "The default update map name" > > category: 'updates' > description: 'Base name for the update maps' > type: #String> > > + ^DefaultUpdateMap ifNil:['']! > - ^ self default updateMapName > - ! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- > updateMapName: mapName > + "The default update map name for the default updater." > - "The default update map name for the default updater. If this is changed, > - then the default updater must be replaced because its remembered position > - in the update map sequence will not be valid for the new update map." > > + DefaultUpdateMap := mapName! > - self default updateMapName = mapName > - ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) > - ifTrue: [self updaters > - at: self defaultUpdateURL > - put: (self updateMapNamed: mapName)]]! > > Item was removed: > - ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- > - updateMapNamed: baseName > - "Answer a new instance with a base update name baseName such as > - 'update' or 'update.oscog' " > - > - ^ self new > - updateMapName: baseName; > - lastUpdateMap: Dictionary new! > > Item was changed: > ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- > updateMapNamed: baseName repository: url > + "Answer an instance for the given repository URL with a base update name baseName, > + Register a new instance if not present in the registry." > - "Answer an instance for the given repository URL with a base update name > - baseName. The instance will be updated in the Updaters dictionary if baseName > - has changed." > > + " | updater1 updater2 | > + updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. > + updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. > + updater1 unregister. > + updater2 unregister. > + Registry" > + > + ^(self forRepository: url updateMap: baseName) > + ifNil: [ "register a new updater" > + (self repository: url updateMap: baseName) register]. > + > - | updater | > - updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. > - updater updateMapName = baseName > - ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. > - ^ updater > ! > > Item was removed: > - ----- Method: MCMcmUpdater class>>updaters (in category 'accessing') ----- > - updaters > - "A dictionary of updaters, including the system default, indexed by repository URL" > - > - ^ Updaters ifNil: [ Updaters := Dictionary new ]! > > Item was added: > + ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- > + doUpdate > + "Update the image by loading all pending updates from the server. If this is > + the default updater for the system, update the system version when complete." > + | config | > + "Flush all caches. If a previous download failed this is often helpful" > + MCFileBasedRepository flushAllCaches. > + config := self updateFromRepositories: { self repository }. > + config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. > + MCMcmUpdater default == self > + ifTrue: [ config setSystemVersion. > + self inform: ('Update completed. > + Current update number: ' translated, SystemVersion current highestUpdate).] > + ifFalse: [self inform: 'Update completed.'] > + ! > > Item was added: > + ----- Method: MCMcmUpdater>>isRegistered (in category 'registry') ----- > + isRegistered > + "True if this instance is registered. False if another instance with the same > + repository and updateNameName is registered." > + > + ^self == ((Registry > + at: repository > + ifAbsent: [^false]) > + at: updateMapName > + ifAbsent: [^false]). > + > + ! > > Item was added: > + ----- Method: MCMcmUpdater>>printOn: (in category 'printing') ----- > + printOn: aStream > + > + super printOn: aStream. > + aStream nextPutAll: ' on '''; > + nextPutAll: updateMapName asString; > + nextPutAll: ''' at '; > + nextPutAll: repository asString! > > Item was added: > + ----- Method: MCMcmUpdater>>register (in category 'registry') ----- > + register > + "Register this instance, keyed by repository and update map name. Each update > + maintains its own lastUpdateMap. The registry permits multilple updaters to be > + maintained, with each updater keeping track of its own last update map." > + > + repository ifNil: [self error: 'repository is ', repository asString]. > + updateMapName ifNil: [self error: 'updateMapName is ', updateMapName asString]. > + updateMapName isEmpty ifTrue: [self error: 'updateMapName must be specified']. > + ((Registry ifNil: [Registry := Dictionary new]) > + at: repository > + ifAbsentPut: [Dictionary new]) > + at: updateMapName put: self > + > + ! > > Item was added: > + ----- Method: MCMcmUpdater>>repository (in category 'accessing') ----- > + repository > + "URL string of the repository for the update maps" > + > + ^ repository! > > Item was added: > + ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- > + repository: repositoryURLString > + > + repository := repositoryURLString! > > Item was added: > + ----- Method: MCMcmUpdater>>unregister (in category 'registry') ----- > + unregister > + "If this instance is registered, remove it frorm the registry." > + > + self isRegistered > + ifTrue: [(Registry at: repository) removeKey: updateMapName. > + (Registry at: repository) isEmpty > + ifTrue: [Registry removeKey: repository]] > + ! > > Item was removed: > - ----- Method: MCMcmUpdater>>updateFrom: (in category 'updating') ----- > - updateFrom: url > - "Update the image by loading all pending updates from the server. If this is > - the default updater for the system, update the system version when complete." > - | config | > - "Flush all caches. If a previous download failed this is often helpful" > - MCFileBasedRepository flushAllCaches. > - config := self updateFromRepositories: { url }. > - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. > - MCMcmUpdater default == self > - ifTrue: [ config setSystemVersion. > - self inform: ('Update completed. > - Current update number: ' translated, SystemVersion current highestUpdate).] > - ifFalse: [self inform: 'Update completed.'] > - ! > > Item was removed: > - ----- Method: MCMcmUpdater>>updateFromDefaultRepository (in category 'updating') ----- > - updateFromDefaultRepository > - "Update from the default repository only" > - ^self updateFromRepositories: {self class defaultUpdateURL}! > From commits at source.squeak.org Wed Oct 14 00:52:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 14 00:52:07 2015 Subject: [squeak-dev] The Inbox: Tests-dtl.336.mcz Message-ID: David T. Lewis uploaded a new version of Tests to project The Inbox: http://source.squeak.org/inbox/Tests-dtl.336.mcz ==================== Summary ==================== Name: Tests-dtl.336 Author: dtl Time: 13 October 2015, 8:52:00.256 pm UUID: a4368bc6-9473-484b-b4e1-44d62d1a7a85 Ancestors: Tests-topa.335 MCMcmUpdaterTest verifies registry of Monticello based updaters used for update streams, including the Squeak trunk update stream. The default update stream for the image is specified by preferences, and new updaters are created as needed. Existing updaters remain in a registry such that their individual update status is preserved. =============== Diff against Tests-topa.335 =============== Item was added: + TestCase subclass: #MCMcmUpdaterTest + instanceVariableNames: '' + classVariableNames: 'SaveRegistry' + poolDictionaries: '' + category: 'Tests-Monticello'! + + !MCMcmUpdaterTest commentStamp: 'dtl 10/13/2015 20:45' prior: 0! + MCMcmUpdaterTest verifies registry of Monticello based updaters used for update streams, including the Squeak trunk update stream. The default update stream for the image is specified by preferences, and new updaters are created as needed. Existing updaters remain in a registry such that their individual update status is preserved. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>setUp (in category 'running') ----- + setUp + "Registry will be modified by tests. Safe it here and restore it in tearDown" + SaveRegistry := MCMcmUpdater registry. + MCMcmUpdater registry: nil! Item was added: + ----- Method: MCMcmUpdaterTest>>tearDown (in category 'running') ----- + tearDown + + MCMcmUpdater registry: SaveRegistry + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testDefault (in category 'testing') ----- + testDefault + + | defaultMapFromPreference defaultURLFromPreference defaultUpdater | + defaultMapFromPreference := MCMcmUpdater updateMapName. + defaultURLFromPreference := MCMcmUpdater defaultUpdateURL. + defaultUpdater := MCMcmUpdater default. "create and register" + self assert: defaultMapFromPreference equals: defaultUpdater updateMapName. + self assert: defaultURLFromPreference equals: defaultUpdater repository. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1 + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testRegistryIsBeingSaved (in category 'testing') ----- + testRegistryIsBeingSaved + "setUp and tearDown save and restore the current state" + + self assert: MCMcmUpdater registry isNil! Item was added: + ----- Method: MCMcmUpdaterTest>>testTwoUpdatersForOneRepository (in category 'testing') ----- + testTwoUpdatersForOneRepository + + | reg updater1 updater2 | + reg := MCMcmUpdater registry. + updater1 := MCMcmUpdater updateMapNamed: 'BAR' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 := MCMcmUpdater updateMapNamed: 'BAZ' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 2. + updater1 unregister. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 unregister. + self assert: MCMcmUpdater registry isEmpty. + self should: [MCMcmUpdater registry at: 'FOO'] raise: Error. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testTwoUpdatersInDifferentRepositories (in category 'testing') ----- + testTwoUpdatersInDifferentRepositories + + | reg updater1 updater2 | + reg := MCMcmUpdater registry. + updater1 := MCMcmUpdater updateMapNamed: 'BAR' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 := MCMcmUpdater updateMapNamed: 'BAZ' repository: 'FOO2'. + self assert: MCMcmUpdater registry size = 2. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + self assert: (MCMcmUpdater registry at: 'FOO2') size = 1. + updater1 unregister. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO2') size = 1. + updater2 unregister. + self assert: MCMcmUpdater registry isEmpty. + self should: [MCMcmUpdater registry at: 'FOO'] raise: Error. + self should: [MCMcmUpdater registry at: 'FOO2'] raise: Error. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testUpdatePreferences (in category 'testing') ----- + testUpdatePreferences + + | defaultMapFromPreference defaultURLFromPreference defaultUpdater | + defaultMapFromPreference := MCMcmUpdater updateMapName. + defaultURLFromPreference := MCMcmUpdater defaultUpdateURL. + defaultUpdater := MCMcmUpdater default. "create and register" + self assert: defaultMapFromPreference equals: defaultUpdater updateMapName. + self assert: defaultURLFromPreference equals: defaultUpdater repository. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1. + [ | newDefault | + MCMcmUpdater updateMapName: 'NEWMAP'. + "new instance not yet registered" + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1. + self shouldnt: [MCMcmUpdater registry at: defaultURLFromPreference] raise: Error. + self should: [(MCMcmUpdater registry at: defaultURLFromPreference) at: 'NEWMAP'] raise: Error. + newDefault := MCMcmUpdater default. "create and register new default updater" + self shouldnt: [(MCMcmUpdater registry at: defaultURLFromPreference) at: 'NEWMAP'] raise: Error. + self assert: 'NEWMAP' equals: newDefault updateMapName. + + MCMcmUpdater defaultUpdateURL: 'NEWURL'. + self assert: MCMcmUpdater registry size = 1. + newDefault := MCMcmUpdater default. "create and register new default updater" + self assert: MCMcmUpdater registry size = 2. + self shouldnt: [(MCMcmUpdater registry at: 'NEWURL') at: 'NEWMAP'] raise: Error. + self assert: 'NEWURL' equals: newDefault repository. + self assert: 'NEWMAP' equals: newDefault updateMapName. + ] ensure: [ "restore preferences" + MCMcmUpdater updateMapName: defaultMapFromPreference. + MCMcmUpdater defaultUpdateURL: defaultURLFromPreference + ] + + + ! From commits at source.squeak.org Wed Oct 14 00:52:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 14 00:52:51 2015 Subject: [squeak-dev] The Inbox: MonticelloConfigurations-dtl.141.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Inbox: http://source.squeak.org/inbox/MonticelloConfigurations-dtl.141.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.141 Author: dtl Time: 13 October 2015, 8:52:45.694 pm UUID: 87cfef53-0a66-4b4e-80d4-b014b5f99f68 Ancestors: MonticelloConfigurations-dtl.140 Add accessors for unit test support =============== Diff against MonticelloConfigurations-dtl.140 =============== Item was added: + ----- Method: MCMcmUpdater class>>registry (in category 'registry') ----- + registry + "Private - unit test support" + ^Registry! Item was added: + ----- Method: MCMcmUpdater class>>registry: (in category 'registry') ----- + registry: registry + "Private - unit test support" + Registry := registry! From serge.stinckwich at gmail.com Thu Oct 15 08:06:21 2015 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Thu Oct 15 08:07:02 2015 Subject: [squeak-dev] Re: [Pharo-dev] Autonomous Shark-Monitoring Drone In-Reply-To: References: Message-ID: On Wed, Oct 7, 2015 at 5:54 PM, Eliot Miranda wrote: > Dear Friends and Colleagues, Hi Eliot, > as you may know, Sharks, as apex predators, are vital to maintaining > healthy marine ecosystems, and at the same time, their populations are > plummeting due to human actions. It is estimated for example that the > population of pelagic oceanic white tip sharks is reducing by 17% per year > [1] and I've heard (can't find a reference) that populations in the eastern > indian/western pacific are at 1% of normal levels. Such reductions in > populations create "trophic cascades" that produce wide-ranging changes in > populations of different species all the way down the food chain [2]. And > the marine ecosystem is a key source of human nutrition; it comprises > between 13% and 17% of global human protein intake [3]. Recently, I talk with some people from my research institute who are working on Shark behavior modeling in the CHARC program : http://www.la-reunion.ird.fr/le-programme-charc Sorry this is in French only They use acoustic marks on sharks in order to locate them thanks to a surveillance network. The idea is not only to manage the risks regarding sharks but also to use them to have information about ocean's environment parameters. I start to discuss a little bit with them in order to model sharks behavior. > As you may also know, there is currently a shark attack crisis in New > South Wales [4]. While most people in the region oppose killing sharks in > response to the crisis, existing solutions, netting and culling reduce those > same threatened populations of sharks upon which the sustainability of > marine food supply d ecosystems depend [5], and are arguably ineffective > [6]. Apparently the most successful approach at avoiding attacks is the use > of human spotters, as used in Cape Town, where people in tall towers scan > the sea close to shore [6]. > > But please watch this Youtube video [7] from Pismo Beach, California. The > shark is spotted at about 1:20 into the video. This drone, a phantom 3, is > sending live video back to the operators, who are using remote control. > What we can see from this video is that the point of view of drones is far > superior to that of spotters. > > My first thought is that autonomous drones could provide a cheap and > scalable solution to patrolling beaches to prevent shark attacks. I expect > that processors like the Pi 2 have easily enough processing power to both > plan and execute search patterns along beaches, and perform the image > recognition necessary to reliably detect potentially dangerous sharks. A > drone might also be able autonomously to visit surfers and swimmers near to > the shark and warn them, either by some signal such as flashing red LEDs or > an audible message (language issues notwithstanding). The drone would have > to be able to identify swimmers and surfers in the water (not easy; sharks > confuse seals and surfers all the time), but computing an optimal route to > visit suspected swimmers should be relatively easy :-). > > I imagine that sooner or later it will be possible to construct cheap > rugged solar powered docking/charging shelters that drones could depart from > and return to, to charge and shelter from the elements after patrols. > Satellite communications could provide status reports for maintenance. This is a really interesting project. My lab is also interested by using drones for environmental surveillance. I can talk with my colleagues working on sharks if this is something that they envision for the future. Another idea is to use marine drones. Regards -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/ From hannes.hirzel at gmail.com Fri Oct 16 12:10:07 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Oct 16 12:10:09 2015 Subject: [squeak-dev] In the hacker news In-Reply-To: References: <0633C397-0728-4B0E-9D5F-3B0E003FBE13@rowledge.org> Message-ID: On 10/10/15, karl ramberg wrote: > On Sat, Oct 10, 2015 at 7:20 PM, tim Rowledge wrote: > >> >> > On 10-10-2015, at 2:10 AM, karl ramberg wrote: >> > >> > Hackaday post: >> > >> http://hackaday.com/2015/10/08/latest-raspberry-pi-images-have-improved-scratch/ >> > >> > Hacker News post: >> > https://news.ycombinator.com/item?id=10363088 >> > >> >> On the one hand publicity is good, on the other... just read the >> comments. >> Sigh. So many idiots. >> > I'll cut them some slack :-) > There is only so much attention span around. Once it runs out, the result > is quite random. > And the rabbit hole runs very deep on projects like Scratch, with several > implementations etc. One of the more useful comments is Mark Morgan Lloyd says: October 9, 2015 at 5:26 am I think that the most important part of this news is that at least part of the Scratch community thinks it?s worth sticking with Squeak/Smalltalk, rather than using Javascript as an implementation language. .... And a link to a book for children using Scratch (in Italian) http://deagostiniscuola.deascuola.it/primaria?layout=book&ref=41&book=11847 I wonder if there are similar books in English. > Karl > >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Strange OpCodes: CPE: Create Parity Error >> >> >> >> > From lists at dcorking.com Fri Oct 16 12:24:26 2015 From: lists at dcorking.com (David Corking) Date: Fri Oct 16 12:24:47 2015 Subject: Scratch books, was Re: [squeak-dev] In the hacker news Message-ID: Hannes wrote: > And a link to a book for children using Scratch (in Italian) ... > I wonder if there are similar books in English. In the last year or two there was a small bookshelf published in English, and some cover Scratch 1.4 (the Squeak version on the Raspberry Pi) rather than Scratch 2, the Javascript rewrite. I like this one: https://www.raspberrypi.org/blog/carrie-anne-philbins-adventures-in-raspberry-pi/ It came out in 2013 and has already run to a second edition. It only has one chapter on Scratch. But there are several other books I haven't looked at, as this search at a well known bookseller shows: http://www.amazon.co.uk/s/ref=nb_sb_noss_1?url=search-alias%3Dstripbooks&field-keywords=scratch+coding -- David Corking From commits at source.squeak.org Fri Oct 16 16:34:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 16:34:22 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1011.mcz ==================== Summary ==================== Name: Morphic-cmm.1011 Author: cmm Time: 16 October 2015, 11:33:30.083 am UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 Ancestors: Morphic-mt.1010 - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). The following commands are now available globally: Command+Shift+O -> access a Monticello browser. Command+Shift+P -> access a Preferences browser. Command+Shift+Z -> browse the recent change log. Command+] -> save the image. Command+\ -> send the active window to the back. Command+Escape -> Close the active window (formerly Command+w). Control+Escape -> (new!) access the window list. - Encountered a gaggle of debuggers when dragging a Splitter with the mouse. It happened more than once, not sure why. Fixed with a guard. - HelpBrowsers now honor the Reuse Windows preference. =============== Diff against Morphic-mt.1010 =============== Item was changed: ----- Method: HandMorph>>sendListenEvent:to: (in category 'private events') ----- sendListenEvent: anEvent to: listenerGroup "Send the event to the given group of listeners" listenerGroup ifNil:[^self]. listenerGroup do:[:listener| + listener ifNotNil:[listener handleListenEvent: anEvent]].! - listener ifNotNil:[listener handleListenEvent: anEvent copy]].! Item was added: + ----- Method: HelpBrowser>>representsSameBrowseeAs: (in category '*morphic') ----- + representsSameBrowseeAs: anotherModel + ^ self hasUnacceptedEdits not and: + [ (toplevelTopics collect: + [ : e | e title ]) = + (anotherModel toplevelTopics collect: + [ : e | e title ]) ]! Item was changed: ----- Method: PasteUpMorph>>becomeActiveDuring: (in category 'initialization') ----- becomeActiveDuring: aBlock "Make the receiver the ActiveWorld during the evaluation of aBlock. Note that this method does deliberately *not* use #ensure: to prevent re-installation of the world on project switches." | priorWorld priorHand priorEvent | priorWorld := ActiveWorld. priorHand := ActiveHand. priorEvent := ActiveEvent. + priorHand removeEventListener: priorWorld. ActiveWorld := self. ActiveHand := self hands first. "default" ActiveEvent := nil. "not in event cycle" + ActiveHand addEventListener: self. aBlock on: Error do: [:ex | ActiveWorld := priorWorld. ActiveEvent := priorEvent. ActiveHand := priorHand. ex pass]! Item was added: + ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') ----- + handleListenEvent: aUserInputEvent + "Handlers for *global* keys, regardless of which widget has keyboard focus." + aUserInputEvent type = #keystroke ifTrue: + [ aUserInputEvent commandKeyPressed ifTrue: + [ aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. + aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ]. + aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ]. + aUserInputEvent keyValue = $] asciiValue ifTrue: + [ Smalltalk + snapshot: true + andQuit: false ] ] ]! Item was changed: ----- Method: ProportionalSplitterMorph>>updateFromEvent: (in category 'events') ----- updateFromEvent: anEvent | delta | + lastMouse ifNil: [ lastMouse := anEvent position ]. delta := splitsTopAndBottom ifTrue: [ 0 @ ((self normalizedY: anEvent cursorPoint y) - lastMouse y) ] ifFalse: [ (self normalizedX: anEvent cursorPoint x) - lastMouse x @ 0 ]. lastMouse := splitsTopAndBottom ifTrue: [ lastMouse x @ (self normalizedY: anEvent cursorPoint y) ] ifFalse: [ (self normalizedX: anEvent cursorPoint x) @ lastMouse y ]. self repositionBy: delta! Item was changed: ----- Method: SystemWindow>>activate (in category 'top window') ----- activate + "Bring the receiver to the top. If I am modal, bring along my owning window as well." + | modalOwner | + self modalChild ifNotNil: + [ : modalChild | modalChild owner ifNotNil: + [ modalChild activate. + ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. + (isCollapsed not and: + [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. - "Activate the owner too." - - |mo mc| - mo := self modalOwner. - mc := self modalChild. - mc isNil - ifFalse: [mc owner notNil ifTrue: [ - mc activate. - ^mc modalChild isNil ifTrue: [mc flash]]]. - (isCollapsed not and: [ - self paneMorphs size > 1 and: [ - self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. self activateWindow. + ActiveHand addKeyboardListener: self. + modalOwner := self modalOwner. + (modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]! - self rememberedKeyboardFocus - ifNil: [(self respondsTo: #navigateFocusForward) - ifTrue: [self navigateFocusForward]] - ifNotNil: [:m | m world - ifNil: [self rememberKeyboardFocus: nil] "deleted" - ifNotNil: [:w | - m wantsKeyboardFocus - ifTrue: [m takeKeyboardFocus] - ifFalse: [(self respondsTo: #navigateFocusForward) - ifTrue: [self navigateFocusForward]]]]. - (mo notNil and: [mo isSystemWindow]) - ifTrue: [mo bringBehind: self]! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- + handleListenEvent: aUserInputEvent + aUserInputEvent type = #keystroke ifTrue: + [ aUserInputEvent commandKeyPressed ifTrue: + [ aUserInputEvent keyValue = $\ asciiValue ifTrue: [ self class sendTopWindowToBack ]. + "Command+Escape" + aUserInputEvent keyValue = 27 ifTrue: + [ aUserInputEvent wasHandled: true. + ActiveHand removeKeyboardListener: self. + self delete ] ]. + aUserInputEvent controlKeyPressed ifTrue: + [ aUserInputEvent keyValue = 27 ifTrue: [ World findWindow: aUserInputEvent ] ] ]. + aUserInputEvent isMouse ifFalse: [ ^ self ]. + "Still dragging?" + aUserInputEvent hand hasSubmorphs ifTrue: [ ^ self ]. + "Make sure we lock our contents after drag-and-drop has finished." + (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [ self configureFocus ]. + aUserInputEvent hand removeMouseListener: self! - handleListenEvent: evt - "Make sure we lock our contents after DnD has finished" - evt isMouse ifFalse:[^self]. - evt hand hasSubmorphs ifTrue:[^self]. "still dragging" - (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [self configureFocus]. - evt hand removeMouseListener: self.! Item was changed: ----- Method: SystemWindow>>passivate (in category 'top window') ----- passivate "Lose my drop shadlow and reconfigure my focus according to preferences." self hasDropShadow: false ; configureFocus ; lookUnfocused. + ActiveHand removeKeyboardListener: self. model modelSleep! From commits at source.squeak.org Fri Oct 16 16:43:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 16:43:32 2015 Subject: [squeak-dev] The Trunk: HelpSystem-Core-cmm.79.mcz Message-ID: Chris Muller uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-cmm.79.mcz ==================== Summary ==================== Name: HelpSystem-Core-cmm.79 Author: cmm Time: 16 October 2015, 11:43:24.324 am UUID: f5505d86-1b5b-488c-9819-42e9142d64a9 Ancestors: HelpSystem-Core-mt.78 Allow HelpBrowsers to honor the Reuse Windows preference. =============== Diff against HelpSystem-Core-mt.78 =============== Item was changed: ----- Method: HelpBrowser class>>openOn: (in category 'instance creation') ----- openOn: aHelpTopic "Open the receiver on the given help topic or any other object that can be transformed into a help topic by sending #asHelpTopic." ^(self defaultHelpBrowser new) + rootTopic: aHelpTopic; + open; + yourself! - open; - rootTopic: aHelpTopic; - yourself! From commits at source.squeak.org Fri Oct 16 16:46:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 16:46:34 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.638.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.638.mcz ==================== Summary ==================== Name: Tools-cmm.638 Author: cmm Time: 16 October 2015, 11:46:12.07 am UUID: 2ad2176d-bb99-4dd6-a7f3-8482d964c285 Ancestors: Tools-topa.637 Some desktop command keys are now available globally instead. =============== Diff against Tools-topa.637 =============== Item was changed: ----- Method: PasteUpMorph>>defaultDesktopCommandKeyTriplets (in category '*Tools') ----- defaultDesktopCommandKeyTriplets "Answer a list of triplets of the form [+ optional fourth element, a for use in desktop-command-key-help] that will provide the default desktop command key handlers. If the selector takes an argument, that argument will be the command-key event" | noviceKeys expertKeys | noviceKeys := { { $o. ActiveWorld. #activateObjectsTool. 'Activate the "Objects Tool"'}. { $r. ActiveWorld. #restoreMorphicDisplay. 'Redraw the screen'}. { $z. self. #undoOrRedoCommand. 'Undo or redo the last undoable command'}. { $F. Project current. #toggleFlapsSuppressed. 'Toggle the display of flaps'}. { $N. self. #toggleClassicNavigatorIfAppropriate. 'Show/Hide the classic Navigator, if appropriate'}. { $M. self. #toggleShowWorldMainDockingBar. 'Show/Hide the Main Docking Bar'}. - { $]. Smalltalk. #saveSession. 'Save the image.'}. }. Preferences noviceMode ifTrue:[^ noviceKeys]. expertKeys := { { $b. SystemBrowser. #defaultOpenBrowser. 'Open a new System Browser'}. { $k. StringHolder. #open. 'Open a new, blank Workspace'}. { $m. self. #putUpNewMorphMenu. 'Put up the "New Morph" menu'}. - { $O. self. #findAMonticelloBrowser. 'Bring a Monticello window into focus.'}. { $t. self. #findATranscript:. 'Make a System Transcript visible'}. - { $w. SystemWindow. #closeTopWindow. 'Close the topmost window'}. - { $C. self. #findAChangeSorter:. 'Make a Change Sorter visible'}. - { $L. self. #findAFileList:. 'Make a File List visible'}. { $P. self. #findAPreferencesPanel:. 'Activate the Preferences tool'}. { $R. Utilities. #browseRecentSubmissions. 'Make a Recent Submissions browser visible'}. { $W. self. #findAMessageNamesWindow:. 'Make a MessageNames tool visible'}. { $Z. ChangeList. #browseRecentLog. 'Browse recently-logged changes'}. - { $\. SystemWindow. #sendTopWindowToBack. 'Send the top window to the back'}. { $_. Smalltalk. #quitPrimitive. 'Quit the image immediately.'}. }. ^ noviceKeys, expertKeys ! From commits at source.squeak.org Fri Oct 16 16:47:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 16:47:49 2015 Subject: [squeak-dev] The Trunk: Help-Squeak-Project-cmm.30.mcz Message-ID: Chris Muller uploaded a new version of Help-Squeak-Project to project The Trunk: http://source.squeak.org/trunk/Help-Squeak-Project-cmm.30.mcz ==================== Summary ==================== Name: Help-Squeak-Project-cmm.30 Author: cmm Time: 16 October 2015, 11:47:38.625 am UUID: bd2cde8d-f668-483c-b95d-8e005f8a98c1 Ancestors: Help-Squeak-Project-mt.29 Command-key help updated for new global keys. =============== Diff against Help-Squeak-Project-mt.29 =============== Item was changed: ----- Method: SqueakTutorialsCommandKey class>>commandKeyMappings (in category 'as yet unclassified') ----- commandKeyMappings "This method was automatically generated. Edit it using:" "SqueakTutorialsCommandKey edit: #commandKeyMappings" ^HelpTopic title: 'Command Key Mappings' contents: 'Lower-case command keys (use with Cmd key on Mac and Alt key on other platforms) a Select all b Browse it (selection is a class name or cursor is over a class-list or message-list) c Copy selection d Do it (selection is a valid expression) e Exchange selection with prior selection f Find g Find again h Set selection as search string for find again i Inspect it (selection is a valid expression, or selection is over an inspect-ilst) j Again once (do the last text-related operation again) k Set font l Cancel m Implementors of it (selection is a message selector or cursor is over a class-list or message-list) n Senders of it (selection is a message selector or cursor is over a class-list or message-list) o Spawn current method p Print it (selection is a valid expression) q Query symbol (toggle all possible completion for a given prefix) r Recognizer s Save (i.e. accept) t Finds a Transcript (when cursor is over the desktop) u Toggle alignment v Paste w Delete preceding word (over text); Close-window (over morphic desktop) x Cut selection y Swap characters z Undo Note: for Do it, Senders of it, etc., a null selection will be expanded to a word or to the current line in an attempt to do what you want. Also note that Senders/Implementors of it will find the outermost keyword selector in a large selection, as when you have selected a bracketed expression or an entire line. Finally note that the same cmd-m and cmd-n (and cmd-v for versions) work in the message pane of most browsers. Upper-case command keys (use with Shift-Cmd, or Ctrl on Mac or Shift-Alt on other platforms; sometimes Ctrl works too) A Advance argument B Browse it in this same browser (in System browsers only) C Compare the selected text to the clipboard contents D Duplicate E Method strings containing it F Insert ''ifFalse:'' G fileIn from it (a file name) H cursor TopHome: I Inspect via Object Explorer J Again many (apply the previous text command repeatedly until the end of the text) K Set style L Outdent (move selection one tab-stop left) M Select current type-in N References to it (selection is a class name, or cursor is over a class-list or message-list) O Open single-message browser (in message lists) P Make project link R Indent (move selection one tab-stap right) S Search T Insert ''ifTrue:'' U Convert linefeeds to carriage returns in selection V Paste author''s initials W Selectors containing it (in text); show-world-menu (when issued with cursor over desktop) X Force selection to lowercase Y Force selection to uppercase Z Capitalize all words in selection Other special keys + Backspace Backward delete character + Del Forward delete character + Shift-Bksp Backward delete word + Shift-Del Forward delete word + Esc Pop up the context menu + Shift+Esc Pop up the World Menu + Command+Esc Close the active window + \ Send top window to back + Control+Esc Present a list of open windows - Backspace Backward delete character - Del Forward delete character - Shift-Bksp Backward delete word - Shift-Del Forward delete word - Esc Pop up the Desktop Menu - \ Send top window to back Cursor keys left, right, + up, down Move cursor left, right, up or down + Ctrl-left Move cursor left one word + Ctrl-right Move cursor right one word + Home Move cursor to begin of line or begin of text + End Move cursor to end of line or end of text + PgUp, Ctrl-up Move cursor up one page - up, down Move cursor left, right, up or down - Ctrl-left Move cursor left one word - Ctrl-right Move cursor right one word - Home Move cursor to begin of line or begin of text - End Move cursor to end of line or end of text - PgUp, Ctrl-up Move cursor up one page PgDown, Ctrl-Dn Move cursor down one page Note all these keys can be used together with Shift to define or enlarge the selection. You cannot however shrink that selection again, as in some other systems. Other Cmd-key combinations (not available on all platforms) Return Insert return followed by as many tabs as the previous line (with a further adjustment for additional brackets in that line) Space Select the current word as with double clicking Enclose the selection in a kind of bracket. Each is a toggle. (not available on all platforms) Ctrl-( Enclose within ( and ), or remove enclosing ( and ) Ctrl-[ Enclose within [ and ], or remove enclosing [ and ] Crtl-{ Enclose within { and }, or remove enclosing { and } Ctrl-< Enclose within < and >, or remove enclosing < and > Ctrl-'' Enclose within '' and '', or remove enclosing '' and '' Ctrl-" Enclose within " and ", or remove enclosing " and " Note also that you can double-click just inside any of the above delimiters, or at the beginning or end of a line, to select the text enclosed. Text Emphasis (not available on all platforms) Cmd-1 type the first method argument Cmd-2 type the second method argument Cmd-3 type the third method argument Cmd-4 type the fourth method argument Cmd-5 for future use Cmd-6 color, action-on-click, link to class comment, link to method, url Brings up a menu. To remove these properties, select more than the active part and then use command-0. Cmd-7 bold Cmd-8 italic Cmd-9 narrow (same as negative kern) Cmd-0 plain text (resets all emphasis) Cmd-- underlined (toggles it) Cmd-= struck out (toggles it) Shift-Cmd-- (aka :=) negative kern (letters 1 pixel closer) Shift-Cmd-+ positive kern (letters 1 pixel larger spread) Docking Bar Ctrl- opens the n-th (where n is between 0 and 7) menu if such exists, otherwise it moves the keyboard focus to the Search Bar. Currently this means: Ctrl-0 Activates Search Bar Ctrl-1 Squeak menu Ctrl-2 Projects menu Ctrl-3 Tools menu Ctrl-4 Apps menu Ctrl-5 Extras menu Ctrl-6 Windows menu Ctrl-7 Help menu !!' readStream nextChunkText! From tim at rowledge.org Fri Oct 16 16:54:00 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Oct 16 16:54:05 2015 Subject: Scratch books, was Re: [squeak-dev] In the hacker news In-Reply-To: References: Message-ID: > On 16-10-2015, at 5:24 AM, David Corking wrote: > > [snip] Scratch 2, the Javascript rewrite. Ah, actually Flash, not javascript. Which makes it actively awful as a concept. See recent Flash critical errors. I was going to add a date but honestly, they?re so common you might as well use a date interval starting many years ago and having an open end. And that is why Pi is keeping to the Squeak version. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IPL: Invent Program Lines From commits at source.squeak.org Fri Oct 16 19:36:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 19:36:59 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.639.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.639.mcz ==================== Summary ==================== Name: Tools-cmm.639 Author: cmm Time: 16 October 2015, 2:36:34.893 pm UUID: b778b9de-f4c8-4bc4-a120-c9ac3e2cfaed Ancestors: Tools-cmm.638 Now that the inheritance (i) function can take over for "open single message browser (O)", recover the (O) hot-key for global availability (opens a Monticello browser). Although probably not necessary, the original "single method" functionality can now be accessed with Command+iId. =============== Diff against Tools-cmm.638 =============== Item was changed: ----- Method: Browser>>mainMessageListMenu: (in category 'message functions') ----- mainMessageListMenu: aMenu ^ aMenu addList: #( ('what to show...' offerWhatToShowMenu) ('toggle break on entry' toggleBreakOnEntry) - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) ('copy selector (c)' copySelector) ('copy reference (C)' copyReference) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('versions (v)' browseVersions) - ('references... (r)' browseVariableReferences) ('assignments... (a)' browseVariableAssignments) ('class refs (N)' browseClassRefs) - ('remove method (x)' removeMessage) ('explore method' exploreMethod) ('inspect method' inspectMethod)); yourself ! Item was changed: ----- Method: ChangeSorter>>unshiftedMessageMenu: (in category 'message list') ----- unshiftedMessageMenu: aMenu "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" aMenu title: 'message list'. aMenu addStayUpItemSpecial. parent ifNotNil: [aMenu addList: #( ('copy method to other side' copyMethodToOther) ('move method to other side' moveMethodToOther))]. aMenu addList: #( ('delete method from changeSet (d)' forget) - ('remove method from system (x)' removeMessage) - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' spawnHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('versions (v)' browseVersions)). ^ aMenu ! Item was removed: - ----- Method: ClassCommentVersionsBrowser>>openSingleMessageBrowser (in category 'menu') ----- - openSingleMessageBrowser - | mr | - "Create and schedule a message list browser populated only by the currently selected message" - - mr := MethodReference - class: self selectedClass - selector: #Comment. - - self systemNavigation - browseMessageList: (Array with: mr) - name: mr asStringOrText - autoSelect: nil! Item was changed: ----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') ----- messageListKey: aChar from: view "Respond to a Command key. I am a model with a code pane, and I also have a listView that has a list of methods. The view knows how to get the list and selection." | sel class | aChar == $D ifTrue: [^ self toggleDiffing]. sel := self selectedMessageName. aChar == $m ifTrue: "These next two put up a type in if no message selected" [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ]. aChar == $n ifTrue: [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ]. aChar == $d ifTrue: [^ self removeMessageFromBrowser]. "The following require a class selection" (class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view]. aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel]. aChar == $N ifTrue: [^ self browseClassRefs]. aChar == $i ifTrue: [^ self methodHierarchy]. aChar == $h ifTrue: [^ self classHierarchy]. aChar == $p ifTrue: [^ self browseFullProtocol]. aChar == $r ifTrue: [^ self browseVariableReferences]. aChar == $a ifTrue: [^ self browseVariableAssignments]. "The following require a method selection" sel ifNotNil: [aChar == $o ifTrue: [^ self fileOutMessage]. aChar == $c ifTrue: [^ self copySelector]. aChar == $v ifTrue: [^ self browseVersions]. - aChar == $O ifTrue: [^ self openSingleMessageBrowser]. aChar == $x ifTrue: [^ self removeMessage]. (aChar == $C and: [self canShowMultipleMessageCategories]) ifTrue: [^ self showHomeCategory]]. ^ self arrowKey: aChar from: view! Item was changed: ----- Method: Debugger>>shiftedContextStackMenu: (in category 'context stack menu') ----- shiftedContextStackMenu: aMenu "Set up the menu appropriately for the context-stack-list, shifted" ^ aMenu addList: #( ('browse class hierarchy' classHierarchy) ('browse class' browseClass) - ('browse method (O)' openSingleMessageBrowser) ('implementors of sent messages' browseAllMessages) ('change sets with this method' findMethodInChangeSets) - ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances) - ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget)); yourself ! Item was added: + ----- Method: MessageSet>>deselectAll (in category 'private') ----- + deselectAll + self messageListIndex: 0! Item was changed: ----- Method: MessageSet>>mainMessageListMenu: (in category 'message functions') ----- mainMessageListMenu: aMenu "Answer the message-list menu" aMenu addList: #( ('what to show...' offerWhatToShowMenu) ('toggle break on entry' toggleBreakOnEntry) - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) ('copy selector (c)' copySelector) ('copy reference (C)' copyReference) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('versions (v)' browseVersions) - ('references... (r)' browseVariableReferences) ('assignments... (a)' browseVariableAssignments) ('class refs (N)' browseClassRefs) - ('remove method (x)' removeMessage) ('explore method' exploreMethod) ('inspect method' inspectMethod)). ^ aMenu! Item was changed: ----- Method: MessageTrace>>deselectAll (in category 'actions') ----- deselectAll + super deselectAll. - self messageListIndex: 0. 1 to: messageSelections size do: [ :index | messageSelections at: index put: false ] ! Item was changed: ----- Method: StringHolder>>messageListKey:from: (in category '*Tools') ----- messageListKey: aChar from: view "Respond to a Command key. I am a model with a code pane, and I also have a listView that has a list of methods. The view knows how to get the list and selection." | sel class | aChar == $D ifTrue: [^ self toggleDiffing]. sel := self selectedMessageName. aChar == $m ifTrue: "These next two put up a type in if no message selected" [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation]. aChar == $n ifTrue: [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation]. "The following require a class selection" (class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view]. aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel]. aChar == $N ifTrue: [^ self browseClassRefs]. aChar == $i ifTrue: [^ self methodHierarchy]. aChar == $h ifTrue: [^ self classHierarchy]. aChar == $p ifTrue: [^ self browseFullProtocol]. "The following require a method selection" sel ifNotNil: [aChar == $o ifTrue: [^ self fileOutMessage]. aChar == $c ifTrue: [^ self copySelector]. aChar == $v ifTrue: [^ self browseVersions]. - aChar == $O ifTrue: [^ self openSingleMessageBrowser]. aChar == $x ifTrue: [^ self removeMessage]]. ^ self arrowKey: aChar from: view! Item was removed: - ----- Method: StringHolder>>openSingleMessageBrowser (in category '*Tools') ----- - openSingleMessageBrowser - | msgName mr | - "Create and schedule a message list browser populated only by the currently selected message" - - (msgName := self selectedMessageName) ifNil: [^ self]. - - mr := MethodReference - class: self selectedClassOrMetaClass - selector: msgName. - - self systemNavigation - browseMessageList: (Array with: mr) - name: mr asStringOrText - autoSelect: nil! Item was changed: ----- Method: VersionsBrowser>>mainVersionsMenu: (in category 'menu') ----- mainVersionsMenu: aMenu "Fill aMenu with menu items appropriate to the receiver" aMenu addTranslatedList: #( ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - ('senders (n)' browseSenders 'browse all senders of this selector') ('implementors (m)' browseImplementors 'browse all implementors of this selector') + ('inheritance (i)' methodHierarchy 'browse method inheritance') - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). ^aMenu! From commits at source.squeak.org Fri Oct 16 19:37:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 19:37:34 2015 Subject: [squeak-dev] The Trunk: System-cmm.770.mcz Message-ID: Chris Muller uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-cmm.770.mcz ==================== Summary ==================== Name: System-cmm.770 Author: cmm Time: 16 October 2015, 2:36:57.194 pm UUID: 207f82b0-5028-4424-9dbe-0b25a9b2e841 Ancestors: System-topa.769 - When using the inheritance (i) command, make sure the initial selection within the opened MessageSet is the method on which it was invoked. =============== Diff against System-topa.769 =============== Item was changed: ----- Method: SystemNavigation>>browseMessageList:name:autoSelect: (in category 'browse') ----- browseMessageList: messageListOrBlock name: labelString autoSelect: autoSelectString "Create and schedule a MessageSet browser on the message list. If messageListOrBlock is a block, then evaluate it to get the message list." | messageList title | messageList := messageListOrBlock isBlock ifTrue: [ Cursor wait showWhile: messageListOrBlock ] ifFalse: [ messageListOrBlock ]. messageList size = 0 ifTrue: [ ^self inform: 'There are no', String cr, labelString ]. title := messageList size > 1 ifFalse: [ labelString ] ifTrue: [ labelString, ' [', messageList size printString, ']' ]. + ^ ToolSet - ToolSet browseMessageSet: messageList name: title autoSelect: autoSelectString! Item was changed: ----- Method: SystemNavigation>>methodHierarchyBrowserForClass:selector: (in category 'browse') ----- + methodHierarchyBrowserForClass: aClass selector: selectorSymbol - methodHierarchyBrowserForClass: aClass selector: sel "Create and schedule a message set browser on all implementors of the currently selected message selector. Do nothing if no message is selected." "SystemNavigation default methodHierarchyBrowserForClass: ParagraphEditor selector: #isControlActive" - | list aClassNonMeta isMeta tab | aClass ifNil: [^ self]. aClass isTrait ifTrue: [^ self]. + selectorSymbol ifNil: [^ self]. - sel ifNil: [^ self]. aClassNonMeta := aClass theNonMetaClass. isMeta := aClassNonMeta ~~ aClass. list := OrderedCollection new. tab := ''. aClass allSuperclasses reverseDo: [:cl | + (cl includesSelector: selectorSymbol) ifTrue: + [list addLast: tab , cl name, ' ', selectorSymbol]. - (cl includesSelector: sel) ifTrue: - [list addLast: tab , cl name, ' ', sel]. tab := tab , ' ']. aClassNonMeta allSubclassesWithLevelDo: [:cl :level | | theClassOrMeta stab | theClassOrMeta := isMeta ifTrue: [cl class] ifFalse: [cl]. + (theClassOrMeta includesSelector: selectorSymbol) ifTrue: - (theClassOrMeta includesSelector: sel) ifTrue: [stab := ''. 1 to: level do: [:i | stab := stab , ' ']. + list addLast: tab , stab , theClassOrMeta name, ' ', selectorSymbol]] - list addLast: tab , stab , theClassOrMeta name, ' ', sel]] startingLevel: 0. + (self browseMessageList: list name: 'Inheritance of ' , selectorSymbol + ) model + deselectAll ; + selectReference: (aClass>>selectorSymbol) methodReference! - self browseMessageList: list name: 'Inheritance of ' , sel - - ! From commits at source.squeak.org Fri Oct 16 19:39:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 19:39:23 2015 Subject: [squeak-dev] The Trunk: Monticello-cmm.618.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.618.mcz ==================== Summary ==================== Name: Monticello-cmm.618 Author: cmm Time: 16 October 2015, 2:39:05.3 pm UUID: d1d36117-e8d3-4403-a16d-db1e9167a713 Ancestors: Monticello-eem.617 Recover hot-key $O from MCCodeTool because it is now redundant with $i. $O is a global key for accessing a Monticello browser. =============== Diff against Monticello-eem.617 =============== Item was changed: ----- Method: MCCodeTool>>methodListKey:from: (in category 'menus') ----- methodListKey: aKeystroke from: aListMorph aKeystroke caseOf: { [$b] -> [self browseMethodFull]. [$h] -> [self classHierarchy]. - [$O] -> [self openSingleMessageBrowser]. [$p] -> [self browseFullProtocol]. [$o] -> [self fileOutMessage]. [$c] -> [self copySelector]. [$n] -> [self browseSendersOfMessages]. [$m] -> [self browseMessages]. [$i] -> [self methodHierarchy]. [$v] -> [self browseVersions]} otherwise: []! Item was changed: ----- Method: MCCodeTool>>methodListMenu: (in category 'menus') ----- methodListMenu: aMenu "Build the menu for the selected method, if any." self selectedMessageName ifNil: [items notEmpty ifTrue: [aMenu addList:#(('fileOut (o)' fileOutMessage))]] ifNotNil: [ aMenu addList:#( ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut (o)' fileOutMessage) ('printOut' printOutMessage) ('copy selector (c)' copySelector) ('copy reference (C)' copyReference)). aMenu addList: #( - ('browse senders (n)' browseSendersOfMessages) ('browse implementors (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('versions (v)' browseVersions) ('change sets with this method' findMethodInChangeSets) " ('x revert to previous version' revertToPreviousVersion)" ('remove from current change set' removeFromCurrentChanges) " ('x revert & remove from changes' revertAndForget)" ('add to current change set' adoptMessageInCurrentChangeset) " ('x copy up or copy down...' copyUpOrCopyDown)" " ('x remove method (x)' removeMessage)" "-" ). ]. " aMenu addList: #( ('x inst var refs...' browseInstVarRefs) ('x inst var defs...' browseInstVarDefs) ('x class var refs...' browseClassVarRefs) ('x class variables' browseClassVariables) ('x class refs (N)' browseClassRefs) ). " ^ aMenu ! Item was removed: - ----- Method: MCCodeTool>>openSingleMessageBrowser (in category 'menus') ----- - openSingleMessageBrowser - | msgName mr | - "Create and schedule a message list browser populated only by the currently selected message" - - (msgName := self selectedMessageName) ifNil: [^ self]. - - mr := MethodReference - class: self selectedClassOrMetaClass - selector: msgName. - - self systemNavigation - browseMessageList: (Array with: mr) - name: mr asStringOrText - autoSelect: nil! From commits at source.squeak.org Fri Oct 16 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 16 21:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151016215503.23547.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-October/009039.html Name: Morphic-cmm.1011 Ancestors: Morphic-mt.1010 - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). The following commands are now available globally: Command+Shift+O -> access a Monticello browser. Command+Shift+P -> access a Preferences browser. Command+Shift+Z -> browse the recent change log. Command+] -> save the image. Command+\ -> send the active window to the back. Command+Escape -> Close the active window (formerly Command+w). Control+Escape -> (new!) access the window list. - Encountered a gaggle of debuggers when dragging a Splitter with the mouse. It happened more than once, not sure why. Fixed with a guard. - HelpBrowsers now honor the Reuse Windows preference. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009040.html Name: HelpSystem-Core-cmm.79 Ancestors: HelpSystem-Core-mt.78 Allow HelpBrowsers to honor the Reuse Windows preference. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009041.html Name: Tools-cmm.638 Ancestors: Tools-topa.637 Some desktop command keys are now available globally instead. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009042.html Name: Help-Squeak-Project-cmm.30 Ancestors: Help-Squeak-Project-mt.29 Command-key help updated for new global keys. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009043.html Name: Tools-cmm.639 Ancestors: Tools-cmm.638 Now that the inheritance (i) function can take over for "open single message browser (O)", recover the (O) hot-key for global availability (opens a Monticello browser). Although probably not necessary, the original "single method" functionality can now be accessed with Command+iId. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009044.html Name: System-cmm.770 Ancestors: System-topa.769 - When using the inheritance (i) command, make sure the initial selection within the opened MessageSet is the method on which it was invoked. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009045.html Name: Monticello-cmm.618 Ancestors: Monticello-eem.617 Recover hot-key $O from MCCodeTool because it is now redundant with $i. $O is a global key for accessing a Monticello browser. ============================================= From hannes.hirzel at gmail.com Sat Oct 17 04:05:09 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Oct 17 04:05:11 2015 Subject: [squeak-dev] SqueakMap --> Chess Game entry for 5.0? Message-ID: Hello The Chess Game loads fine in Squeak 5.0 through the SqueakMap package loader. But it is not listed as a 5.0 compatible package. The entry was done by the late Andreas Raab. Could it be added to the 5.0 compatible packages list? --Hannes P.S. There is also a 'Games' package from 2009 which includes 'Chess'. It does not load but not because of the Chess game. I wonder which is the newer version. From Das.Linux at gmx.de Sat Oct 17 13:14:56 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Oct 17 13:15:02 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz Message-ID: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> On 16.10.2015, at 16:33, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1011.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1011 > Author: cmm > Time: 16 October 2015, 11:33:30.083 am > UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 > Ancestors: Morphic-mt.1010 > > - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). > The following commands are now available globally: > Command+Shift+O -> access a Monticello browser. > Command+Shift+P -> access a Preferences browser. > Command+Shift+Z -> browse the recent change log. > Command+] -> save the image. > Command+\ -> send the active window to the back. > Command+Escape -> Close the active window (formerly Command+w). Why? It's CMD-W on osx and Alt-W on windows and Ctrl-W on Linux. Why change it _away_ form cmd-w? > Control+Escape -> (new!) access the window list. > - Encountered a gaggle of debuggers when dragging a Splitter with the mouse. It happened more than once, not sure why. Fixed with a guard. > - HelpBrowsers now honor the Reuse Windows preference. > > =============== Diff against Morphic-mt.1010 =============== > > Item was changed: From Marcel.Taeumel at hpi.de Sat Oct 17 13:31:47 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 17 13:42:52 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.1011.mcz In-Reply-To: References: Message-ID: <1445088707055-4856180.post@n4.nabble.com> Please allow the user to turn-off those global shortcuts via preferences. I need some of those in Vivide. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-cmm-1011-mcz-tp4856054p4856180.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat Oct 17 13:32:41 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 17 13:43:45 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.1011.mcz In-Reply-To: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> References: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> Message-ID: <1445088761741-4856182.post@n4.nabble.com> +1 Please do not change CMD+W. It has been "wipe current window" for so long on so many platforms... Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-cmm-1011-mcz-tp4856054p4856182.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From javier_diaz_r at mac.com Sat Oct 17 15:25:08 2015 From: javier_diaz_r at mac.com (Javier Diaz-Reinoso) Date: Sat Oct 17 15:25:49 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz In-Reply-To: <0NWB01A7RNDI7090@st11p00im-smtpin035.me.com> References: <0NWB01A7RNDI7090@st11p00im-smtpin035.me.com> Message-ID: <3076AC2D-FACB-41DF-BB50-F07A00AE775E@mac.com> I also don?t like this changes, not only the Cmd-W but the proliferetation of shortcuts, what is this, emacs? > On Oct 16, 2015, at 11:34, commits@source.squeak.org wrote: > > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1011.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1011 > Author: cmm > Time: 16 October 2015, 11:33:30.083 am > UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 > Ancestors: Morphic-mt.1010 > > - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). > The following commands are now available globally: > Command+Shift+O -> access a Monticello browser. > Command+Shift+P -> access a Preferences browser. > Command+Shift+Z -> browse the recent change log. > Command+] -> save the image. > Command+\ -> send the active window to the back. > Command+Escape -> Close the active window (formerly Command+w). > Control+Escape -> (new!) access the window list. > - Encountered a gaggle of debuggers when dragging a Splitter with the mouse. It happened more than once, not sure why. Fixed with a guard. > - HelpBrowsers now honor the Reuse Windows preference. > > =============== Diff against Morphic-mt.1010 =============== > > Item was changed: > ----- Method: HandMorph>>sendListenEvent:to: (in category 'private events') ----- > sendListenEvent: anEvent to: listenerGroup > "Send the event to the given group of listeners" > listenerGroup ifNil:[^self]. > listenerGroup do:[:listener| > + listener ifNotNil:[listener handleListenEvent: anEvent]].! > - listener ifNotNil:[listener handleListenEvent: anEvent copy]].! > > Item was added: > + ----- Method: HelpBrowser>>representsSameBrowseeAs: (in category '*morphic') ----- > + representsSameBrowseeAs: anotherModel > + ^ self hasUnacceptedEdits not and: > + [ (toplevelTopics collect: > + [ : e | e title ]) = > + (anotherModel toplevelTopics collect: > + [ : e | e title ]) ]! > > Item was changed: > ----- Method: PasteUpMorph>>becomeActiveDuring: (in category 'initialization') ----- > becomeActiveDuring: aBlock > "Make the receiver the ActiveWorld during the evaluation of aBlock. > Note that this method does deliberately *not* use #ensure: to prevent > re-installation of the world on project switches." > | priorWorld priorHand priorEvent | > priorWorld := ActiveWorld. > priorHand := ActiveHand. > priorEvent := ActiveEvent. > + priorHand removeEventListener: priorWorld. > ActiveWorld := self. > ActiveHand := self hands first. "default" > ActiveEvent := nil. "not in event cycle" > + ActiveHand addEventListener: self. > aBlock > on: Error > do: [:ex | > ActiveWorld := priorWorld. > ActiveEvent := priorEvent. > ActiveHand := priorHand. > ex pass]! > > Item was added: > + ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') ----- > + handleListenEvent: aUserInputEvent > + "Handlers for *global* keys, regardless of which widget has keyboard focus." > + aUserInputEvent type = #keystroke ifTrue: > + [ aUserInputEvent commandKeyPressed ifTrue: > + [ aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. > + aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ]. > + aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ]. > + aUserInputEvent keyValue = $] asciiValue ifTrue: > + [ Smalltalk > + snapshot: true > + andQuit: false ] ] ]! > > Item was changed: > ----- Method: ProportionalSplitterMorph>>updateFromEvent: (in category 'events') ----- > updateFromEvent: anEvent > | delta | > + lastMouse ifNil: [ lastMouse := anEvent position ]. > delta := splitsTopAndBottom > ifTrue: [ 0 @ ((self normalizedY: anEvent cursorPoint y) - lastMouse y) ] > ifFalse: [ (self normalizedX: anEvent cursorPoint x) - lastMouse x @ 0 ]. > lastMouse := splitsTopAndBottom > ifTrue: [ lastMouse x @ (self normalizedY: anEvent cursorPoint y) ] > ifFalse: [ (self normalizedX: anEvent cursorPoint x) @ lastMouse y ]. > self repositionBy: delta! > > Item was changed: > ----- Method: SystemWindow>>activate (in category 'top window') ----- > activate > + "Bring the receiver to the top. If I am modal, bring along my owning window as well." > + | modalOwner | > + self modalChild ifNotNil: > + [ : modalChild | modalChild owner ifNotNil: > + [ modalChild activate. > + ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. > + (isCollapsed not and: > + [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. > - "Activate the owner too." > - > - |mo mc| > - mo := self modalOwner. > - mc := self modalChild. > - mc isNil > - ifFalse: [mc owner notNil ifTrue: [ > - mc activate. > - ^mc modalChild isNil ifTrue: [mc flash]]]. > - (isCollapsed not and: [ > - self paneMorphs size > 1 and: [ > - self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. > self activateWindow. > + ActiveHand addKeyboardListener: self. > + modalOwner := self modalOwner. > + (modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]! > - self rememberedKeyboardFocus > - ifNil: [(self respondsTo: #navigateFocusForward) > - ifTrue: [self navigateFocusForward]] > - ifNotNil: [:m | m world > - ifNil: [self rememberKeyboardFocus: nil] "deleted" > - ifNotNil: [:w | > - m wantsKeyboardFocus > - ifTrue: [m takeKeyboardFocus] > - ifFalse: [(self respondsTo: #navigateFocusForward) > - ifTrue: [self navigateFocusForward]]]]. > - (mo notNil and: [mo isSystemWindow]) > - ifTrue: [mo bringBehind: self]! > > Item was changed: > ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- > + handleListenEvent: aUserInputEvent > + aUserInputEvent type = #keystroke ifTrue: > + [ aUserInputEvent commandKeyPressed ifTrue: > + [ aUserInputEvent keyValue = $\ asciiValue ifTrue: [ self class sendTopWindowToBack ]. > + "Command+Escape" > + aUserInputEvent keyValue = 27 ifTrue: > + [ aUserInputEvent wasHandled: true. > + ActiveHand removeKeyboardListener: self. > + self delete ] ]. > + aUserInputEvent controlKeyPressed ifTrue: > + [ aUserInputEvent keyValue = 27 ifTrue: [ World findWindow: aUserInputEvent ] ] ]. > + aUserInputEvent isMouse ifFalse: [ ^ self ]. > + "Still dragging?" > + aUserInputEvent hand hasSubmorphs ifTrue: [ ^ self ]. > + "Make sure we lock our contents after drag-and-drop has finished." > + (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [ self configureFocus ]. > + aUserInputEvent hand removeMouseListener: self! > - handleListenEvent: evt > - "Make sure we lock our contents after DnD has finished" > - evt isMouse ifFalse:[^self]. > - evt hand hasSubmorphs ifTrue:[^self]. "still dragging" > - (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [self configureFocus]. > - evt hand removeMouseListener: self.! > > Item was changed: > ----- Method: SystemWindow>>passivate (in category 'top window') ----- > passivate > "Lose my drop shadlow and reconfigure my focus according to preferences." > self > hasDropShadow: false ; > configureFocus ; > lookUnfocused. > + ActiveHand removeKeyboardListener: self. > model modelSleep! > > From commits at source.squeak.org Sat Oct 17 16:34:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 16:34:07 2015 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-dtl.141.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-dtl.141.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.141 Author: dtl Time: 13 October 2015, 8:52:45.694 pm UUID: 87cfef53-0a66-4b4e-80d4-b014b5f99f68 Ancestors: MonticelloConfigurations-dtl.140 Add accessors for unit test support =============== Diff against MonticelloConfigurations-dtl.139 =============== Item was changed: Object subclass: #MCMcmUpdater + instanceVariableNames: 'repository updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateMap DefaultUpdateURL Registry SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - instanceVariableNames: 'updateMapName lastUpdateMap' - classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 10/12/2015 19:45' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. + Repository - A registry of known MCMcmUpdater instances identified by repository URL and update map name. - Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. + repository - URL of the repository in which the update maps are located. + lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was added: + ----- Method: MCMcmUpdater class>>clearRegistry (in category 'class initialization') ----- + clearRegistry + "Save the current default updater, clear the registry, and re-register the current updater. + This is intended for cleaning up an image prior to public release. Assumes that the + current updater is the one intended for ongoing use in this image." + + "MCMcmUpdater clearRegistry" + + | current | + current := self default. + Registry := nil. + current register. + ^Registry! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default + "The default instance for system updates. Uses a default repository and update map + name that may be set as preferences." - "The default instance for system updates. Uses a default update map - name that may be set as a preference to enable a specific update stream - for a repository." + ^self updateMapNamed: self updateMapName repository: self defaultUpdateURL + ! - ^ self updaters - at: self defaultUpdateURL - ifAbsentPut: [self updateMapNamed: 'update' ]! Item was added: + ----- Method: MCMcmUpdater class>>forRepository:updateMap: (in category 'registry') ----- + forRepository: repository updateMap: basename + "Answer the requested updater from the repository, or nil of not found" + + "MCMcmUpdater forRepository: 'http://source.squeak.org/trunk' updateMap: 'update'" + "MCMcmUpdater forRepository: 'foo' updateMap: 'bar'" + + ^ ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsent: [^nil]) + at: basename + ifAbsent: [^nil]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" + + self flag: #TODO. "remove Updaters class var after transition to Registry" + DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. + DefaultUpdateMap := self defaultBaseName. ]. + + Registry ifNil: [ "Migrate from Updaters class var to Registry" + "Set new repository ivar in all existing instances" + Updaters keysAndValuesDo: [ :k :v | v repository: k]. + "Populate the new registry" + Updaters do: [:e | e register]. + "Set the default update map name to its prior value" + self updateMapName: + ((Updaters at: MCMcmUpdater defaultUpdateURL) updateMapName) ]. + ! - "Call - MCMcmUpdater resetUpdaters - manually if necessary"! Item was added: + ----- Method: MCMcmUpdater class>>registry (in category 'registry') ----- + registry + "Private - unit test support" + ^Registry! Item was added: + ----- Method: MCMcmUpdater class>>registry: (in category 'registry') ----- + registry: registry + "Private - unit test support" + Registry := registry! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName + "Answer a new instance with empty last update map, not yet registered" + + ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName lastUpdateMap: dictionary + "Answer a new instance, not yet registered" + + ^ self new + repository: url; + updateMapName: baseName; + lastUpdateMap: dictionary! Item was removed: - ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- - resetUpdaters - - Updaters := nil.! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - - ^ self default updateFromDefaultRepository - ! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- - updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName - "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and - using update map baseName" - - ^ (self updateMapNamed: baseName repository: updaterUrlKey) - updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" ^ (self updateMapNamed: baseName repository: updaterUrlKey) + doUpdate! - updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') ----- updateFromServer "Update the image by loading all pending updates from the server." + ^self default doUpdate - ^self default updateFrom: self defaultUpdateURL ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^DefaultUpdateMap ifNil:['']! - ^ self default updateMapName - ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- updateMapName: mapName + "The default update map name for the default updater." - "The default update map name for the default updater. If this is changed, - then the default updater must be replaced because its remembered position - in the update map sequence will not be valid for the new update map." + DefaultUpdateMap := mapName! - self default updateMapName = mapName - ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) - ifTrue: [self updaters - at: self defaultUpdateURL - put: (self updateMapNamed: mapName)]]! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- - updateMapNamed: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " - - ^ self new - updateMapName: baseName; - lastUpdateMap: Dictionary new! Item was changed: ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name baseName, + Register a new instance if not present in the registry." - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." + " | updater1 updater2 | + updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. + updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. + updater1 unregister. + updater2 unregister. + Registry" + + ^(self forRepository: url updateMap: baseName) + ifNil: [ "register a new updater" + (self repository: url updateMap: baseName) register]. + - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. - ^ updater ! Item was removed: - ----- Method: MCMcmUpdater class>>updaters (in category 'accessing') ----- - updaters - "A dictionary of updaters, including the system default, indexed by repository URL" - - ^ Updaters ifNil: [ Updaters := Dictionary new ]! Item was added: + ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- + doUpdate + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete." + | config | + "Flush all caches. If a previous download failed this is often helpful" + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate).] + ifFalse: [self inform: 'Update completed.'] + ! Item was added: + ----- Method: MCMcmUpdater>>isRegistered (in category 'registry') ----- + isRegistered + "True if this instance is registered. False if another instance with the same + repository and updateNameName is registered." + + ^self == ((Registry + at: repository + ifAbsent: [^false]) + at: updateMapName + ifAbsent: [^false]). + + ! Item was added: + ----- Method: MCMcmUpdater>>printOn: (in category 'printing') ----- + printOn: aStream + + super printOn: aStream. + aStream nextPutAll: ' on '''; + nextPutAll: updateMapName asString; + nextPutAll: ''' at '; + nextPutAll: repository asString! Item was added: + ----- Method: MCMcmUpdater>>register (in category 'registry') ----- + register + "Register this instance, keyed by repository and update map name. Each update + maintains its own lastUpdateMap. The registry permits multilple updaters to be + maintained, with each updater keeping track of its own last update map." + + repository ifNil: [self error: 'repository is ', repository asString]. + updateMapName ifNil: [self error: 'updateMapName is ', updateMapName asString]. + updateMapName isEmpty ifTrue: [self error: 'updateMapName must be specified']. + ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsentPut: [Dictionary new]) + at: updateMapName put: self + + ! Item was added: + ----- Method: MCMcmUpdater>>repository (in category 'accessing') ----- + repository + "URL string of the repository for the update maps" + + ^ repository! Item was added: + ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- + repository: repositoryURLString + + repository := repositoryURLString! Item was added: + ----- Method: MCMcmUpdater>>unregister (in category 'registry') ----- + unregister + "If this instance is registered, remove it frorm the registry." + + self isRegistered + ifTrue: [(Registry at: repository) removeKey: updateMapName. + (Registry at: repository) isEmpty + ifTrue: [Registry removeKey: repository]] + ! Item was removed: - ----- Method: MCMcmUpdater>>updateFrom: (in category 'updating') ----- - updateFrom: url - "Update the image by loading all pending updates from the server. If this is - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { url }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was removed: - ----- Method: MCMcmUpdater>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - ^self updateFromRepositories: {self class defaultUpdateURL}! From commits at source.squeak.org Sat Oct 17 16:35:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 16:35:04 2015 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-dtl.140.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-dtl.140.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.140 Author: dtl Time: 12 October 2015, 7:46:53.2 pm UUID: f0c437d3-fe3c-439e-a59c-632bf1a8eab2 Ancestors: MonticelloConfigurations-dtl.139 Allow mutliple update streams per repository. Register a different updater for each repository / update map name, such that each instance can keep track of its own lastUpdateMap. An updater knows how to register and unregister itself. The default updater for the system is specified by preferences, and new updaters are created as needed by a preference change. =============== Diff against MonticelloConfigurations-dtl.139 =============== Item was changed: Object subclass: #MCMcmUpdater + instanceVariableNames: 'repository updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateMap DefaultUpdateURL Registry SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - instanceVariableNames: 'updateMapName lastUpdateMap' - classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 10/12/2015 19:45' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. + Repository - A registry of known MCMcmUpdater instances identified by repository URL and update map name. - Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. + repository - URL of the repository in which the update maps are located. + lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was added: + ----- Method: MCMcmUpdater class>>clearRegistry (in category 'class initialization') ----- + clearRegistry + "Save the current default updater, clear the registry, and re-register the current updater. + This is intended for cleaning up an image prior to public release. Assumes that the + current updater is the one intended for ongoing use in this image." + + "MCMcmUpdater clearRegistry" + + | current | + current := self default. + Registry := nil. + current register. + ^Registry! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default + "The default instance for system updates. Uses a default repository and update map + name that may be set as preferences." - "The default instance for system updates. Uses a default update map - name that may be set as a preference to enable a specific update stream - for a repository." + ^self updateMapNamed: self updateMapName repository: self defaultUpdateURL + ! - ^ self updaters - at: self defaultUpdateURL - ifAbsentPut: [self updateMapNamed: 'update' ]! Item was added: + ----- Method: MCMcmUpdater class>>forRepository:updateMap: (in category 'registry') ----- + forRepository: repository updateMap: basename + "Answer the requested updater from the repository, or nil of not found" + + "MCMcmUpdater forRepository: 'http://source.squeak.org/trunk' updateMap: 'update'" + "MCMcmUpdater forRepository: 'foo' updateMap: 'bar'" + + ^ ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsent: [^nil]) + at: basename + ifAbsent: [^nil]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" + + self flag: #TODO. "remove Updaters class var after transition to Registry" + DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. + DefaultUpdateMap := self defaultBaseName. ]. + + Registry ifNil: [ "Migrate from Updaters class var to Registry" + "Set new repository ivar in all existing instances" + Updaters keysAndValuesDo: [ :k :v | v repository: k]. + "Populate the new registry" + Updaters do: [:e | e register]. + "Set the default update map name to its prior value" + self updateMapName: + ((Updaters at: MCMcmUpdater defaultUpdateURL) updateMapName) ]. + ! - "Call - MCMcmUpdater resetUpdaters - manually if necessary"! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName + "Answer a new instance with empty last update map, not yet registered" + + ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName lastUpdateMap: dictionary + "Answer a new instance, not yet registered" + + ^ self new + repository: url; + updateMapName: baseName; + lastUpdateMap: dictionary! Item was removed: - ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- - resetUpdaters - - Updaters := nil.! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - - ^ self default updateFromDefaultRepository - ! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- - updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName - "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and - using update map baseName" - - ^ (self updateMapNamed: baseName repository: updaterUrlKey) - updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" ^ (self updateMapNamed: baseName repository: updaterUrlKey) + doUpdate! - updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') ----- updateFromServer "Update the image by loading all pending updates from the server." + ^self default doUpdate - ^self default updateFrom: self defaultUpdateURL ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^DefaultUpdateMap ifNil:['']! - ^ self default updateMapName - ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- updateMapName: mapName + "The default update map name for the default updater." - "The default update map name for the default updater. If this is changed, - then the default updater must be replaced because its remembered position - in the update map sequence will not be valid for the new update map." + DefaultUpdateMap := mapName! - self default updateMapName = mapName - ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) - ifTrue: [self updaters - at: self defaultUpdateURL - put: (self updateMapNamed: mapName)]]! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- - updateMapNamed: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " - - ^ self new - updateMapName: baseName; - lastUpdateMap: Dictionary new! Item was changed: ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name baseName, + Register a new instance if not present in the registry." - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." + " | updater1 updater2 | + updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. + updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. + updater1 unregister. + updater2 unregister. + Registry" + + ^(self forRepository: url updateMap: baseName) + ifNil: [ "register a new updater" + (self repository: url updateMap: baseName) register]. + - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. - ^ updater ! Item was removed: - ----- Method: MCMcmUpdater class>>updaters (in category 'accessing') ----- - updaters - "A dictionary of updaters, including the system default, indexed by repository URL" - - ^ Updaters ifNil: [ Updaters := Dictionary new ]! Item was added: + ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- + doUpdate + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete." + | config | + "Flush all caches. If a previous download failed this is often helpful" + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate).] + ifFalse: [self inform: 'Update completed.'] + ! Item was added: + ----- Method: MCMcmUpdater>>isRegistered (in category 'registry') ----- + isRegistered + "True if this instance is registered. False if another instance with the same + repository and updateNameName is registered." + + ^self == ((Registry + at: repository + ifAbsent: [^false]) + at: updateMapName + ifAbsent: [^false]). + + ! Item was added: + ----- Method: MCMcmUpdater>>printOn: (in category 'printing') ----- + printOn: aStream + + super printOn: aStream. + aStream nextPutAll: ' on '''; + nextPutAll: updateMapName asString; + nextPutAll: ''' at '; + nextPutAll: repository asString! Item was added: + ----- Method: MCMcmUpdater>>register (in category 'registry') ----- + register + "Register this instance, keyed by repository and update map name. Each update + maintains its own lastUpdateMap. The registry permits multilple updaters to be + maintained, with each updater keeping track of its own last update map." + + repository ifNil: [self error: 'repository is ', repository asString]. + updateMapName ifNil: [self error: 'updateMapName is ', updateMapName asString]. + updateMapName isEmpty ifTrue: [self error: 'updateMapName must be specified']. + ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsentPut: [Dictionary new]) + at: updateMapName put: self + + ! Item was added: + ----- Method: MCMcmUpdater>>repository (in category 'accessing') ----- + repository + "URL string of the repository for the update maps" + + ^ repository! Item was added: + ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- + repository: repositoryURLString + + repository := repositoryURLString! Item was added: + ----- Method: MCMcmUpdater>>unregister (in category 'registry') ----- + unregister + "If this instance is registered, remove it frorm the registry." + + self isRegistered + ifTrue: [(Registry at: repository) removeKey: updateMapName. + (Registry at: repository) isEmpty + ifTrue: [Registry removeKey: repository]] + ! Item was removed: - ----- Method: MCMcmUpdater>>updateFrom: (in category 'updating') ----- - updateFrom: url - "Update the image by loading all pending updates from the server. If this is - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { url }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was removed: - ----- Method: MCMcmUpdater>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - ^self updateFromRepositories: {self class defaultUpdateURL}! From commits at source.squeak.org Sat Oct 17 16:39:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 16:39:18 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.771.mcz ==================== Summary ==================== Name: System-mt.771 Author: mt Time: 17 October 2015, 6:38:55.72 pm UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 Ancestors: System-cmm.770 Log change stamps at the granularity of seconds not only minutes. Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. =============== Diff against System-cmm.770 =============== Item was changed: ----- Method: Utilities class>>changeStamp (in category 'identification') ----- changeStamp "Answer a string to be pasted into source code to mark who changed it and when." ^ self authorInitials , ' ' , Date today mmddyyyy, ' ', + ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)! - ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! From commits at source.squeak.org Sat Oct 17 16:42:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 16:42:46 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.140.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.140.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.140 Author: dtl Time: 12 October 2015, 7:46:53.2 pm UUID: f0c437d3-fe3c-439e-a59c-632bf1a8eab2 Ancestors: MonticelloConfigurations-dtl.139 Allow mutliple update streams per repository. Register a different updater for each repository / update map name, such that each instance can keep track of its own lastUpdateMap. An updater knows how to register and unregister itself. The default updater for the system is specified by preferences, and new updaters are created as needed by a preference change. =============== Diff against MonticelloConfigurations-dtl.139 =============== Item was changed: Object subclass: #MCMcmUpdater + instanceVariableNames: 'repository updateMapName lastUpdateMap' + classVariableNames: 'DefaultUpdateMap DefaultUpdateURL Registry SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' - instanceVariableNames: 'updateMapName lastUpdateMap' - classVariableNames: 'DefaultUpdateURL SkipPackages UpdateFromServerAtStartup UpdateMissingPackages Updaters' poolDictionaries: '' category: 'MonticelloConfigurations'! + !MCMcmUpdater commentStamp: 'dtl 10/12/2015 19:45' prior: 0! - !MCMcmUpdater commentStamp: 'dtl 8/28/2015 22:07' prior: 0! MCMcmUpdater provides utility methods for updating Monticello packages from Monticello configurations. When Monticello configurations are stored in a repository (or repositories), MCMcmUpdater acts as an update stream. It first ensures that each configuration map has been loaded in sequence, then updates the last configuration map to the most recent version for each specified package, and finally loads these versions to produce a fully updated configuration. Currently if a set of packages are unloaded from the image, using this class to reload them may cause problems, depending on what dependencies those classes have. Success is not assured. Removing packages via SmalltalkImage>>unloadAllKnownPackages will be successful, it flags the packages removed so that they are not loaded by this utility. If you wish to not have MCMcmUpdater update packages, there are two ways to handle this: 1) To have MCMcmUpdater not update any packages not currently in the image set the UpdateMissingPackages preference to false: MCMcmUpdater updateMissingPackages: false Note that any new packages added to the repositories will not be picked up when this is turned off. 2) To have MCMcmUpdater not update a specific package, evaluate MCMcmUpdater disableUpdatesOfPackage: Class Variables definitions: DefaultUpdateURL - String: the URL that will be checked by default for updates. This would be set for a common standard location to check. + Repository - A registry of known MCMcmUpdater instances identified by repository URL and update map name. - Updaters - A dictionary of MCMcmUpdater instances keyed by repository URL. SkipPackages - Set of Strings: names of packages to not update in MCMcmUpdater (empty by default). UpdateMissingPackages - Boolean: if true (default), new packages in the update config map will be loaded unless they are in SkipPackages. If false, packages not currently loaded in the image will not be loaded by MCMcmUpdater. (This can be dangerous if packages are split - use at your own risk). Instance Variables: updateMapName - Base name of the files used for this updater, typically a name such as 'update' or 'update.spur'. + repository - URL of the repository in which the update maps are located. + lastUpdateMap - Dictionary of Integer: version number of the last loaded update map per repository. Keeps track of the last configuration map, so that the utility will not have to run through the full history in the repositories each time you ask to update. ! Item was added: + ----- Method: MCMcmUpdater class>>clearRegistry (in category 'class initialization') ----- + clearRegistry + "Save the current default updater, clear the registry, and re-register the current updater. + This is intended for cleaning up an image prior to public release. Assumes that the + current updater is the one intended for ongoing use in this image." + + "MCMcmUpdater clearRegistry" + + | current | + current := self default. + Registry := nil. + current register. + ^Registry! Item was changed: ----- Method: MCMcmUpdater class>>default (in category 'instance creation') ----- default + "The default instance for system updates. Uses a default repository and update map + name that may be set as preferences." - "The default instance for system updates. Uses a default update map - name that may be set as a preference to enable a specific update stream - for a repository." + ^self updateMapNamed: self updateMapName repository: self defaultUpdateURL + ! - ^ self updaters - at: self defaultUpdateURL - ifAbsentPut: [self updateMapNamed: 'update' ]! Item was added: + ----- Method: MCMcmUpdater class>>forRepository:updateMap: (in category 'registry') ----- + forRepository: repository updateMap: basename + "Answer the requested updater from the repository, or nil of not found" + + "MCMcmUpdater forRepository: 'http://source.squeak.org/trunk' updateMap: 'update'" + "MCMcmUpdater forRepository: 'foo' updateMap: 'bar'" + + ^ ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsent: [^nil]) + at: basename + ifAbsent: [^nil]! Item was changed: ----- Method: MCMcmUpdater class>>initialize (in category 'class initialization') ----- initialize "MCMcmUpdater initialize" + + self flag: #TODO. "remove Updaters class var after transition to Registry" + DefaultUpdateURL ifNil:[ DefaultUpdateURL := MCHttpRepository trunkUrlString. + DefaultUpdateMap := self defaultBaseName. ]. + + Registry ifNil: [ "Migrate from Updaters class var to Registry" + "Set new repository ivar in all existing instances" + Updaters keysAndValuesDo: [ :k :v | v repository: k]. + "Populate the new registry" + Updaters do: [:e | e register]. + "Set the default update map name to its prior value" + self updateMapName: + ((Updaters at: MCMcmUpdater defaultUpdateURL) updateMapName) ]. + ! - "Call - MCMcmUpdater resetUpdaters - manually if necessary"! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName + "Answer a new instance with empty last update map, not yet registered" + + ^ self repository: url updateMap: baseName lastUpdateMap: Dictionary new! Item was added: + ----- Method: MCMcmUpdater class>>repository:updateMap:lastUpdateMap: (in category 'instance creation') ----- + repository: url updateMap: baseName lastUpdateMap: dictionary + "Answer a new instance, not yet registered" + + ^ self new + repository: url; + updateMapName: baseName; + lastUpdateMap: dictionary! Item was removed: - ----- Method: MCMcmUpdater class>>resetUpdaters (in category 'class initialization') ----- - resetUpdaters - - Updaters := nil.! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - - ^ self default updateFromDefaultRepository - ! Item was removed: - ----- Method: MCMcmUpdater class>>updateFromRepositories:using:baseName: (in category 'updating') ----- - updateFromRepositories: repositoryUrls using: updaterUrlKey baseName: baseName - "Update all repositoryUrls using an MCMcmUpdater identified by updaterUrlKey, and - using update map baseName" - - ^ (self updateMapNamed: baseName repository: updaterUrlKey) - updateFromRepositories: repositoryUrls! Item was changed: ----- Method: MCMcmUpdater class>>updateFromRepository:baseName: (in category 'updating') ----- updateFromRepository: updaterUrlKey baseName: baseName "Update using an MCMcmUpdater identified by updaterUrlKey, and using update map baseName" ^ (self updateMapNamed: baseName repository: updaterUrlKey) + doUpdate! - updateFrom: updaterUrlKey! Item was changed: ----- Method: MCMcmUpdater class>>updateFromServer (in category 'updating') ----- updateFromServer "Update the image by loading all pending updates from the server." + ^self default doUpdate - ^self default updateFrom: self defaultUpdateURL ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName (in category 'preferences') ----- updateMapName "The default update map name" + ^DefaultUpdateMap ifNil:['']! - ^ self default updateMapName - ! Item was changed: ----- Method: MCMcmUpdater class>>updateMapName: (in category 'preferences') ----- updateMapName: mapName + "The default update map name for the default updater." - "The default update map name for the default updater. If this is changed, - then the default updater must be replaced because its remembered position - in the update map sequence will not be valid for the new update map." + DefaultUpdateMap := mapName! - self default updateMapName = mapName - ifFalse: [(self confirm: 'Initializing updater for ' , DefaultUpdateURL , ' to use new update stream ' , mapName) - ifTrue: [self updaters - at: self defaultUpdateURL - put: (self updateMapNamed: mapName)]]! Item was removed: - ----- Method: MCMcmUpdater class>>updateMapNamed: (in category 'instance creation') ----- - updateMapNamed: baseName - "Answer a new instance with a base update name baseName such as - 'update' or 'update.oscog' " - - ^ self new - updateMapName: baseName; - lastUpdateMap: Dictionary new! Item was changed: ----- Method: MCMcmUpdater class>>updateMapNamed:repository: (in category 'instance creation') ----- updateMapNamed: baseName repository: url + "Answer an instance for the given repository URL with a base update name baseName, + Register a new instance if not present in the registry." - "Answer an instance for the given repository URL with a base update name - baseName. The instance will be updated in the Updaters dictionary if baseName - has changed." + " | updater1 updater2 | + updater1 := self updateMapNamed: 'BAR' repository: 'FOO'. + updater2 := self updateMapNamed: 'BAZ' repository: 'FOO'. + updater1 unregister. + updater2 unregister. + Registry" + + ^(self forRepository: url updateMap: baseName) + ifNil: [ "register a new updater" + (self repository: url updateMap: baseName) register]. + - | updater | - updater := self updaters at: url ifAbsentPut: [ self updateMapNamed: baseName ]. - updater updateMapName = baseName - ifFalse: [ ^ self updaters at: url put: (self updateMapNamed: baseName )]. - ^ updater ! Item was removed: - ----- Method: MCMcmUpdater class>>updaters (in category 'accessing') ----- - updaters - "A dictionary of updaters, including the system default, indexed by repository URL" - - ^ Updaters ifNil: [ Updaters := Dictionary new ]! Item was added: + ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- + doUpdate + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete." + | config | + "Flush all caches. If a previous download failed this is often helpful" + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate).] + ifFalse: [self inform: 'Update completed.'] + ! Item was added: + ----- Method: MCMcmUpdater>>isRegistered (in category 'registry') ----- + isRegistered + "True if this instance is registered. False if another instance with the same + repository and updateNameName is registered." + + ^self == ((Registry + at: repository + ifAbsent: [^false]) + at: updateMapName + ifAbsent: [^false]). + + ! Item was added: + ----- Method: MCMcmUpdater>>printOn: (in category 'printing') ----- + printOn: aStream + + super printOn: aStream. + aStream nextPutAll: ' on '''; + nextPutAll: updateMapName asString; + nextPutAll: ''' at '; + nextPutAll: repository asString! Item was added: + ----- Method: MCMcmUpdater>>register (in category 'registry') ----- + register + "Register this instance, keyed by repository and update map name. Each update + maintains its own lastUpdateMap. The registry permits multilple updaters to be + maintained, with each updater keeping track of its own last update map." + + repository ifNil: [self error: 'repository is ', repository asString]. + updateMapName ifNil: [self error: 'updateMapName is ', updateMapName asString]. + updateMapName isEmpty ifTrue: [self error: 'updateMapName must be specified']. + ((Registry ifNil: [Registry := Dictionary new]) + at: repository + ifAbsentPut: [Dictionary new]) + at: updateMapName put: self + + ! Item was added: + ----- Method: MCMcmUpdater>>repository (in category 'accessing') ----- + repository + "URL string of the repository for the update maps" + + ^ repository! Item was added: + ----- Method: MCMcmUpdater>>repository: (in category 'accessing') ----- + repository: repositoryURLString + + repository := repositoryURLString! Item was added: + ----- Method: MCMcmUpdater>>unregister (in category 'registry') ----- + unregister + "If this instance is registered, remove it frorm the registry." + + self isRegistered + ifTrue: [(Registry at: repository) removeKey: updateMapName. + (Registry at: repository) isEmpty + ifTrue: [Registry removeKey: repository]] + ! Item was removed: - ----- Method: MCMcmUpdater>>updateFrom: (in category 'updating') ----- - updateFrom: url - "Update the image by loading all pending updates from the server. If this is - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { url }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was removed: - ----- Method: MCMcmUpdater>>updateFromDefaultRepository (in category 'updating') ----- - updateFromDefaultRepository - "Update from the default repository only" - ^self updateFromRepositories: {self class defaultUpdateURL}! From commits at source.squeak.org Sat Oct 17 16:43:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 16:43:08 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.141.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.141.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.141 Author: dtl Time: 13 October 2015, 8:52:45.694 pm UUID: 87cfef53-0a66-4b4e-80d4-b014b5f99f68 Ancestors: MonticelloConfigurations-dtl.140 Add accessors for unit test support =============== Diff against MonticelloConfigurations-dtl.140 =============== Item was added: + ----- Method: MCMcmUpdater class>>registry (in category 'registry') ----- + registry + "Private - unit test support" + ^Registry! Item was added: + ----- Method: MCMcmUpdater class>>registry: (in category 'registry') ----- + registry: registry + "Private - unit test support" + Registry := registry! From commits at source.squeak.org Sat Oct 17 19:53:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 19:54:00 2015 Subject: [squeak-dev] The Trunk: Tests-dtl.336.mcz Message-ID: David T. Lewis uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-dtl.336.mcz ==================== Summary ==================== Name: Tests-dtl.336 Author: dtl Time: 13 October 2015, 8:52:00.256 pm UUID: a4368bc6-9473-484b-b4e1-44d62d1a7a85 Ancestors: Tests-topa.335 MCMcmUpdaterTest verifies registry of Monticello based updaters used for update streams, including the Squeak trunk update stream. The default update stream for the image is specified by preferences, and new updaters are created as needed. Existing updaters remain in a registry such that their individual update status is preserved. =============== Diff against Tests-topa.335 =============== Item was added: + TestCase subclass: #MCMcmUpdaterTest + instanceVariableNames: '' + classVariableNames: 'SaveRegistry' + poolDictionaries: '' + category: 'Tests-Monticello'! + + !MCMcmUpdaterTest commentStamp: 'dtl 10/13/2015 20:45' prior: 0! + MCMcmUpdaterTest verifies registry of Monticello based updaters used for update streams, including the Squeak trunk update stream. The default update stream for the image is specified by preferences, and new updaters are created as needed. Existing updaters remain in a registry such that their individual update status is preserved. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>setUp (in category 'running') ----- + setUp + "Registry will be modified by tests. Safe it here and restore it in tearDown" + SaveRegistry := MCMcmUpdater registry. + MCMcmUpdater registry: nil! Item was added: + ----- Method: MCMcmUpdaterTest>>tearDown (in category 'running') ----- + tearDown + + MCMcmUpdater registry: SaveRegistry + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testDefault (in category 'testing') ----- + testDefault + + | defaultMapFromPreference defaultURLFromPreference defaultUpdater | + defaultMapFromPreference := MCMcmUpdater updateMapName. + defaultURLFromPreference := MCMcmUpdater defaultUpdateURL. + defaultUpdater := MCMcmUpdater default. "create and register" + self assert: defaultMapFromPreference equals: defaultUpdater updateMapName. + self assert: defaultURLFromPreference equals: defaultUpdater repository. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1 + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testRegistryIsBeingSaved (in category 'testing') ----- + testRegistryIsBeingSaved + "setUp and tearDown save and restore the current state" + + self assert: MCMcmUpdater registry isNil! Item was added: + ----- Method: MCMcmUpdaterTest>>testTwoUpdatersForOneRepository (in category 'testing') ----- + testTwoUpdatersForOneRepository + + | reg updater1 updater2 | + reg := MCMcmUpdater registry. + updater1 := MCMcmUpdater updateMapNamed: 'BAR' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 := MCMcmUpdater updateMapNamed: 'BAZ' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 2. + updater1 unregister. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 unregister. + self assert: MCMcmUpdater registry isEmpty. + self should: [MCMcmUpdater registry at: 'FOO'] raise: Error. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testTwoUpdatersInDifferentRepositories (in category 'testing') ----- + testTwoUpdatersInDifferentRepositories + + | reg updater1 updater2 | + reg := MCMcmUpdater registry. + updater1 := MCMcmUpdater updateMapNamed: 'BAR' repository: 'FOO'. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + updater2 := MCMcmUpdater updateMapNamed: 'BAZ' repository: 'FOO2'. + self assert: MCMcmUpdater registry size = 2. + self assert: (MCMcmUpdater registry at: 'FOO') size = 1. + self assert: (MCMcmUpdater registry at: 'FOO2') size = 1. + updater1 unregister. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: 'FOO2') size = 1. + updater2 unregister. + self assert: MCMcmUpdater registry isEmpty. + self should: [MCMcmUpdater registry at: 'FOO'] raise: Error. + self should: [MCMcmUpdater registry at: 'FOO2'] raise: Error. + ! Item was added: + ----- Method: MCMcmUpdaterTest>>testUpdatePreferences (in category 'testing') ----- + testUpdatePreferences + + | defaultMapFromPreference defaultURLFromPreference defaultUpdater | + defaultMapFromPreference := MCMcmUpdater updateMapName. + defaultURLFromPreference := MCMcmUpdater defaultUpdateURL. + defaultUpdater := MCMcmUpdater default. "create and register" + self assert: defaultMapFromPreference equals: defaultUpdater updateMapName. + self assert: defaultURLFromPreference equals: defaultUpdater repository. + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1. + [ | newDefault | + MCMcmUpdater updateMapName: 'NEWMAP'. + "new instance not yet registered" + self assert: MCMcmUpdater registry size = 1. + self assert: (MCMcmUpdater registry at: defaultURLFromPreference) size = 1. + self shouldnt: [MCMcmUpdater registry at: defaultURLFromPreference] raise: Error. + self should: [(MCMcmUpdater registry at: defaultURLFromPreference) at: 'NEWMAP'] raise: Error. + newDefault := MCMcmUpdater default. "create and register new default updater" + self shouldnt: [(MCMcmUpdater registry at: defaultURLFromPreference) at: 'NEWMAP'] raise: Error. + self assert: 'NEWMAP' equals: newDefault updateMapName. + + MCMcmUpdater defaultUpdateURL: 'NEWURL'. + self assert: MCMcmUpdater registry size = 1. + newDefault := MCMcmUpdater default. "create and register new default updater" + self assert: MCMcmUpdater registry size = 2. + self shouldnt: [(MCMcmUpdater registry at: 'NEWURL') at: 'NEWMAP'] raise: Error. + self assert: 'NEWURL' equals: newDefault repository. + self assert: 'NEWMAP' equals: newDefault updateMapName. + ] ensure: [ "restore preferences" + MCMcmUpdater updateMapName: defaultMapFromPreference. + MCMcmUpdater defaultUpdateURL: defaultURLFromPreference + ] + + + ! From commits at source.squeak.org Sat Oct 17 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 21:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151017215503.20857.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-October/009046.html Name: MonticelloConfigurations-dtl.141 Ancestors: MonticelloConfigurations-dtl.140 Add accessors for unit test support ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009047.html Name: MonticelloConfigurations-dtl.140 Ancestors: MonticelloConfigurations-dtl.139 Allow mutliple update streams per repository. Register a different updater for each repository / update map name, such that each instance can keep track of its own lastUpdateMap. An updater knows how to register and unregister itself. The default updater for the system is specified by preferences, and new updaters are created as needed by a preference change. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009048.html Name: System-mt.771 Ancestors: System-cmm.770 Log change stamps at the granularity of seconds not only minutes. Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009049.html Name: Tests-dtl.336 Ancestors: Tests-topa.335 MCMcmUpdaterTest verifies registry of Monticello based updaters used for update streams, including the Squeak trunk update stream. The default update stream for the image is specified by preferences, and new updaters are created as needed. Existing updaters remain in a registry such that their individual update status is preserved. ============================================= From asqueaker at gmail.com Sat Oct 17 22:17:00 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 17 22:17:03 2015 Subject: [squeak-dev] SqueakMap --> Chess Game entry for 5.0? In-Reply-To: References: Message-ID: Done. On Fri, Oct 16, 2015 at 11:05 PM, H. Hirzel wrote: > Hello > > The Chess Game loads fine in Squeak 5.0 through the SqueakMap package > loader. > > But it is not listed as a 5.0 compatible package. > > The entry was done by the late Andreas Raab. > > Could it be added to the 5.0 compatible packages list? > > --Hannes > > P.S. There is also a 'Games' package from 2009 which includes 'Chess'. > It does not load but not because of the Chess game. I wonder which is > the newer version. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151017/f4b018fc/attachment.htm From commits at source.squeak.org Sat Oct 17 22:22:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 17 22:23:00 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.640.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.640.mcz ==================== Summary ==================== Name: Tools-cmm.640 Author: cmm Time: 17 October 2015, 5:22:34.882 pm UUID: 8f6cfc95-dcdb-4491-a28e-593662d4ae6f Ancestors: Tools-cmm.639 Recover the desktop command key, Cmd-w, for closing topmost window. =============== Diff against Tools-cmm.639 =============== Item was changed: ----- Method: PasteUpMorph>>defaultDesktopCommandKeyTriplets (in category '*Tools') ----- defaultDesktopCommandKeyTriplets "Answer a list of triplets of the form [+ optional fourth element, a for use in desktop-command-key-help] that will provide the default desktop command key handlers. If the selector takes an argument, that argument will be the command-key event" | noviceKeys expertKeys | noviceKeys := { { $o. ActiveWorld. #activateObjectsTool. 'Activate the "Objects Tool"'}. { $r. ActiveWorld. #restoreMorphicDisplay. 'Redraw the screen'}. { $z. self. #undoOrRedoCommand. 'Undo or redo the last undoable command'}. { $F. Project current. #toggleFlapsSuppressed. 'Toggle the display of flaps'}. { $N. self. #toggleClassicNavigatorIfAppropriate. 'Show/Hide the classic Navigator, if appropriate'}. { $M. self. #toggleShowWorldMainDockingBar. 'Show/Hide the Main Docking Bar'}. }. Preferences noviceMode ifTrue:[^ noviceKeys]. expertKeys := { { $b. SystemBrowser. #defaultOpenBrowser. 'Open a new System Browser'}. { $k. StringHolder. #open. 'Open a new, blank Workspace'}. { $m. self. #putUpNewMorphMenu. 'Put up the "New Morph" menu'}. { $t. self. #findATranscript:. 'Make a System Transcript visible'}. + { $w. SystemWindow. #closeTopWindow. 'Close the topmost window'}. { $C. self. #findAChangeSorter:. 'Make a Change Sorter visible'}. { $L. self. #findAFileList:. 'Make a File List visible'}. { $P. self. #findAPreferencesPanel:. 'Activate the Preferences tool'}. { $R. Utilities. #browseRecentSubmissions. 'Make a Recent Submissions browser visible'}. { $W. self. #findAMessageNamesWindow:. 'Make a MessageNames tool visible'}. { $Z. ChangeList. #browseRecentLog. 'Browse recently-logged changes'}. { $_. Smalltalk. #quitPrimitive. 'Quit the image immediately.'}. }. ^ noviceKeys, expertKeys ! Item was changed: + (PackageInfo named: 'Tools') postscript: 'ActiveWorld initializeDesktopCommandKeySelectors'! - (PackageInfo named: 'Tools') postscript: 'CPUWatcher cpuWatcherEnabled: Preferences cpuWatcherEnabled. - Preferences removePreference: #cpuWatcherEnabled.'! From asqueaker at gmail.com Sat Oct 17 22:56:54 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 17 22:56:57 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz In-Reply-To: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> References: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> Message-ID: On Sat, Oct 17, 2015 at 8:14 AM, Tobias Pape wrote: > > On 16.10.2015, at 16:33, commits@source.squeak.org wrote: > > > Chris Muller uploaded a new version of Morphic to project The Trunk: > > http://source.squeak.org/trunk/Morphic-cmm.1011.mcz > > > > ==================== Summary ==================== > > > > Name: Morphic-cmm.1011 > > Author: cmm > > Time: 16 October 2015, 11:33:30.083 am > > UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 > > Ancestors: Morphic-mt.1010 > > > > - Improved keyboard support. "Desktop" command keys which are not > overloaded by browsers are now available globally, so they can be accessed > at any time (without needing to first give focus to the desktop). > > The following commands are now available globally: > > Command+Shift+O -> access a Monticello browser. > > Command+Shift+P -> access a Preferences browser. > > Command+Shift+Z -> browse the recent change log. > > Command+] -> save the image. > > Command+\ -> send the active window to the back. > > Command+Escape -> Close the active window (formerly > Command+w). > > Why? It's CMD-W on osx and Alt-W on windows and Ctrl-W on Linux. Why > change it _away_ form cmd-w? > > Command+w has been to the desktop keys. I wanted Cmd+w for the global key too, but it is already overloaded by the editor for back-word. Back-word is overloaded with Shift+Control+[Left Arrow], but Cmd+w is nice for maintainig hand position while typing. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151017/bd34ebc1/attachment.htm From asqueaker at gmail.com Sat Oct 17 23:00:39 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 17 23:00:41 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-cmm.1011.mcz In-Reply-To: <1445088707055-4856180.post@n4.nabble.com> References: <1445088707055-4856180.post@n4.nabble.com> Message-ID: Okay, can do. However I think we need to include the DockingBar shrtcuts together in that preference too, is that fair? That way, apps can have all the keys and register some of the shortcuts back, themselves if they want. On Sat, Oct 17, 2015 at 8:31 AM, marcel.taeumel wrote: > Please allow the user to turn-off those global shortcuts via preferences. I > need some of those in Vivide. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-Morphic-cmm-1011-mcz-tp4856054p4856180.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151017/7cafd5d5/attachment.htm From Das.Linux at gmx.de Sun Oct 18 05:53:39 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Oct 18 05:53:43 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz In-Reply-To: References: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> Message-ID: <01CC603E-7C95-4EC6-B13C-A655292D11C4@gmx.de> On 18.10.2015, at 00:56, Chris Muller wrote: > On Sat, Oct 17, 2015 at 8:14 AM, Tobias Pape wrote: > > On 16.10.2015, at 16:33, commits@source.squeak.org wrote: > > > Chris Muller uploaded a new version of Morphic to project The Trunk: > > http://source.squeak.org/trunk/Morphic-cmm.1011.mcz > > > > ==================== Summary ==================== > > > > Name: Morphic-cmm.1011 > > Author: cmm > > Time: 16 October 2015, 11:33:30.083 am > > UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 > > Ancestors: Morphic-mt.1010 > > > > - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). > > The following commands are now available globally: > > Command+Shift+O -> access a Monticello browser. > > Command+Shift+P -> access a Preferences browser. > > Command+Shift+Z -> browse the recent change log. > > Command+] -> save the image. > > Command+\ -> send the active window to the back. > > Command+Escape -> Close the active window (formerly Command+w). > > Why? It's CMD-W on osx and Alt-W on windows and Ctrl-W on Linux. Why change it _away_ form cmd-w? > > > Command+w has been to the desktop keys. > > I wanted Cmd+w for the global key too, but it is already overloaded by the editor for back-word. Back-word is overloaded with Shift+Control+[Left Arrow], but Cmd+w is nice for maintainig hand position while typing. Thanks. I never understood why it is back-word? I just found it is back-word for readline (and hence most osx UI) but with ctrl-w. We really should rethink the meaning of CMD/ctrl/alt? Best regards -tobias F From robert.w.withers at gmail.com Sun Oct 18 08:23:53 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Sun Oct 18 08:23:57 2015 Subject: [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: Message-ID: <56235719.50403@gmail.com> This is a message intended for anyone who was on the Cryptography team. I recently ported it to Pharo and had to make changes to RandomGenerator class>>unpredictableStringsDo:. This certainly removed some uncertainty from the results of this message. My question is what should I do about that? This method seems to require non-headless, as it is checking the mouse point and such. This being a crypto cornerstone, what the best answer here. Thank you, Robert From robert.w.withers at gmail.com Sun Oct 18 08:59:45 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Sun Oct 18 08:59:49 2015 Subject: [squeak-dev] Re: [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <56235719.50403@gmail.com> References: <56235719.50403@gmail.com> Message-ID: <56235F81.40808@gmail.com> I'm sorry, I forgot the code. I list the existing method, followed by my modified Pharo method below. I welcome any feedback. Regards, Robert --- Existing: unpredictableStringsDo: aBlock "Enumerate sources of information from my environment that should be generally hard to guess." | time | time := Time millisecondsToRun: [ aBlock value: World imageForm bits compressToByteArray ; value: Sensor mousePoint x asString ; value: Sensor mousePoint y asString ; value: Time millisecondClockValue asByteArray ; value: Date today asString ; value: Time now asString ; value: Display extent asString. 100 timesRepeat: [ aBlock value: UUID new ]. #(vmVersion platformName primVmPath imageName platformSubtype datedVersion lastQuitLogPosition vmStatisticsReportString imageName) collect: [ : each | aBlock value: (SmalltalkImage current perform: each) asByteArray ] ]. aBlock value: time asByteArray; "maybe the pointer has moved, hit it again." value: Sensor mousePoint asString ; value: Time millisecondClockValue asByteArray --- Pharo port: unpredictableStringsDo: aBlock "Enumerate sources of information from my environment that should be generally hard to guess." | time | time := Time millisecondsToRun: [ aBlock value: Time millisecondClockValue asByteArray ; value: Date today asString ; value: Time now asString. 100 timesRepeat: [ aBlock value: UUID new ]. #(version primImagePath imagePath datedVersion lastQuitLogPosition) collect: [ : each | aBlock value: (SmalltalkImage current perform: each) asByteArray ] ]. aBlock value: time asByteArray; value: Time millisecondClockValue asByteArray On 10/18/2015 04:23 AM, Robert Withers wrote: > This is a message intended for anyone who was on the Cryptography team. > I recently ported it to Pharo and had to make changes to RandomGenerator > class>>unpredictableStringsDo:. This certainly removed some uncertainty > from the results of this message. My question is what should I do about > that? This method seems to require non-headless, as it is checking the > mouse point and such. This being a crypto cornerstone, what the best > answer here. > > Thank you, > Robert From ron at usmedrec.com Sun Oct 18 18:38:42 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sun Oct 18 18:38:47 2015 Subject: [squeak-dev] RE: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <56235F81.40808@gmail.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> Message-ID: <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> Hi Robert, Nice to see you! Looks interesting I know that Chris did something gathering sources of entropy. Seems like the more the better. Could you just make the entropy sources optional such that if they exist we use them? I would have to go back and see what Chris did but he was following suggestions from Schneider in his secureRandom. All the best, Ron Teitelbaum > -----Original Message----- > From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of > Robert Withers > Sent: Sunday, October 18, 2015 5:00 AM > To: The general-purpose Squeak developers list; Pharo Development List > Subject: Re: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator > class>>unpredictableStringsDo: > > I'm sorry, I forgot the code. I list the existing method, followed by my > modified Pharo method below. I welcome any feedback. > > Regards, > Robert > > --- > Existing: > unpredictableStringsDo: aBlock > "Enumerate sources of information from my environment that > should be generally hard to guess." > | time | > time := Time millisecondsToRun: > [ aBlock > value: World imageForm bits compressToByteArray ; > value: Sensor mousePoint x asString ; > value: Sensor mousePoint y asString ; > value: Time millisecondClockValue asByteArray ; > value: Date today asString ; > value: Time now asString ; > value: Display extent asString. > 100 timesRepeat: [ aBlock value: UUID new ]. > #(vmVersion platformName primVmPath imageName > platformSubtype datedVersion lastQuitLogPosition vmStatisticsReportString > imageName) > collect: > [ : each | > aBlock value: (SmalltalkImage current perform: each) > asByteArray ] ]. > aBlock > value: time asByteArray; > "maybe the pointer has moved, hit it again." > value: Sensor mousePoint asString ; > value: Time millisecondClockValue asByteArray > > --- > Pharo port: > unpredictableStringsDo: aBlock > "Enumerate sources of information from my environment that > should be generally hard to guess." > > | time | > time := Time millisecondsToRun: > [ aBlock > value: Time millisecondClockValue asByteArray ; > value: Date today asString ; > value: Time now asString. > 100 timesRepeat: [ aBlock value: UUID new ]. > #(version primImagePath imagePath datedVersion > lastQuitLogPosition) > collect: > [ : each | > aBlock value: (SmalltalkImage current perform: each) > asByteArray ] ]. > aBlock > value: time asByteArray; > value: Time millisecondClockValue asByteArray > > > On 10/18/2015 04:23 AM, Robert Withers wrote: > > This is a message intended for anyone who was on the Cryptography team. > > I recently ported it to Pharo and had to make changes to > RandomGenerator > > class>>unpredictableStringsDo:. This certainly removed some uncertainty > > from the results of this message. My question is what should I do about > > that? This method seems to require non-headless, as it is checking the > > mouse point and such. This being a crypto cornerstone, what the best > > answer here. > > > > Thank you, > > Robert From commits at source.squeak.org Sun Oct 18 21:27:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 18 21:27:09 2015 Subject: [squeak-dev] Squeak 4.6: Tools-cmm.629.mcz Message-ID: David T. Lewis uploaded a new version of Tools to project Squeak 4.6: http://source.squeak.org/squeak46/Tools-cmm.629.mcz ==================== Summary ==================== Name: Tools-cmm.629 Author: cmm Time: 2 July 2015, 11:23:44.144 am UUID: 3123de24-8e6a-4ac2-957c-a599484fbfc6 Ancestors: Tools-eem.628 Restore the classic Warning window because it supports application-formatted messages which can wrap and scroll as needed. =============== Diff against Tools-eem.628 =============== Item was changed: ----- Method: Debugger>>openNotifierContents:label: (in category 'initialize') ----- openNotifierContents: msgString label: label "Create, schedule and answer a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired." "NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active process has not been suspended. The sender will do this." | msg builder spec | Sensor flushKeyboard. savedCursor := Cursor currentCursor. Cursor currentCursor: Cursor normal. + msg := (label beginsWith: 'Space is low') + ifTrue: [self lowSpaceChoices, (msgString ifNil: [String empty])] + ifFalse: [msgString]. - (label beginsWith: 'Space is low') - ifTrue: [msg := self lowSpaceChoices, (msgString ifNil: [''])] - ifFalse: [msg := msgString]. builder := ToolBuilder default. + spec := self buildNotifierWith: builder label: label message: (msg ifNil: [label]). - spec := self buildNotifierWith: builder label: label message: msg. self expandStack. ^[builder openDebugger: spec] ensure: [errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: interruptedProcess] ! From lewis at mail.msen.com Sun Oct 18 21:28:37 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Oct 18 21:28:39 2015 Subject: [squeak-dev] Squeak 4.6: Tools-cmm.629.mcz In-Reply-To: <201510182127.t9ILRA3r056365@shell.msen.com> References: <201510182127.t9ILRA3r056365@shell.msen.com> Message-ID: <20151018212837.GA56388@shell.msen.com> This Fixes another empty MCZ in the squeak46 repository by copying the good one from trunk. Dave On Sun, Oct 18, 2015 at 09:26:53PM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of Tools to project Squeak 4.6: > http://source.squeak.org/squeak46/Tools-cmm.629.mcz > > ==================== Summary ==================== > > Name: Tools-cmm.629 > Author: cmm > Time: 2 July 2015, 11:23:44.144 am > UUID: 3123de24-8e6a-4ac2-957c-a599484fbfc6 > Ancestors: Tools-eem.628 > > Restore the classic Warning window because it supports application-formatted messages which can wrap and scroll as needed. > > =============== Diff against Tools-eem.628 =============== > > Item was changed: > ----- Method: Debugger>>openNotifierContents:label: (in category 'initialize') ----- > openNotifierContents: msgString label: label > "Create, schedule and answer a notifier view with the given label and message. A notifier view shows just the message or the first several lines of the stack, with a menu that allows the user to open a full debugger if so desired." > "NOTE: When this method returns, a new process has been scheduled to run the windows, and thus this notifier, but the previous active process has not been suspended. The sender will do this." > | msg builder spec | > > Sensor flushKeyboard. > savedCursor := Cursor currentCursor. > Cursor currentCursor: Cursor normal. > + msg := (label beginsWith: 'Space is low') > + ifTrue: [self lowSpaceChoices, (msgString ifNil: [String empty])] > + ifFalse: [msgString]. > - (label beginsWith: 'Space is low') > - ifTrue: [msg := self lowSpaceChoices, (msgString ifNil: [''])] > - ifFalse: [msg := msgString]. > builder := ToolBuilder default. > + spec := self buildNotifierWith: builder label: label message: (msg ifNil: [label]). > - spec := self buildNotifierWith: builder label: label message: msg. > self expandStack. > ^[builder openDebugger: spec] ensure: > [errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: interruptedProcess] > ! > From commits at source.squeak.org Sun Oct 18 21:36:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 18 21:36:45 2015 Subject: [squeak-dev] Squeak 4.6: Network-cmm.161.mcz Message-ID: David T. Lewis uploaded a new version of Network to project Squeak 4.6: http://source.squeak.org/squeak46/Network-cmm.161.mcz ==================== Summary ==================== Name: Network-cmm.161 Author: cmm Time: 1 July 2015, 3:26:03.655 pm UUID: af917aa1-ce76-460b-ba1a-7fb49700f44a Ancestors: Network-ul.160 Remove the methods overridden by WebClient, since that has now been folded into base Squeak. =============== Diff against Network-ul.160 =============== Item was removed: - ----- Method: HTTPSocket class>>httpGet:args:user:passwd: (in category 'get the page') ----- - httpGet: url args: args user: user passwd: passwd - "Upload the contents of the stream to a file on the server. - - WARNING: This method will send a basic auth header proactively. - This is necessary to avoid breaking MC and SqueakSource since SS does not - return a 401 when accessing a private (global no access) repository." - - | authorization result | - authorization := (user , ':' , passwd) base64Encoded. - result := self - httpGet: url args: args accept: '*/*' - request: 'Authorization: Basic ' , authorization , String crlf. - ^result - ! Item was removed: - ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category 'get the page') ----- - httpGetDocument: url args: args accept: mimeType request: requestString - "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" - - "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." - - | urlString | - "Normalize the url" - urlString := (Url absoluteFromText: url) asString. - - args ifNotNil: [ - urlString := urlString, (self argString: args) - ]. - - ^(self httpRequestHandler) - httpRequest: 'GET' url: urlString headers:( - (mimeType ifNil:[''] ifNotNil:['Accept: ', mimeType, String crlf]), - 'Accept: text/html', String crlf, - HTTPProxyCredentials, - HTTPBlabEmail, - requestString - ) content: nil response: nil.! Item was removed: - ----- Method: HTTPSocket class>>httpPost:args:user:passwd: (in category 'get the page') ----- - httpPost: url args: args user: user passwd: passwd - - "WARNING: This method will send a basic auth header proactively. - This is necessary to avoid breaking MC and SqueakSource since SS does not - return a 401 when accessing a private (global no access) repository." - - | authorization | - authorization := (user , ':' , passwd) base64Encoded. - ^self - httpPostDocument: url args: args accept: '*/*' - request: 'Authorization: Basic ' , authorization , String crlf - ! Item was removed: - ----- Method: HTTPSocket class>>httpPost:content:type:accept:request: (in category 'get the page') ----- - httpPost: url content: postData type: contentType accept: mimeType request: requestString - "like httpGET, except it does a POST instead of a GET. POST allows data to be uploaded" - - | urlString | - "Normalize the url" - urlString := (Url absoluteFromText: url) asString. - - ^(self httpRequestHandler) - httpRequest: 'POST' url: urlString headers:( - 'Accept: ', mimeType, String crlf, - 'Accept: text/html', String crlf, - 'Content-Type: ', contentType, String crlf, - 'Content-Length: ', (postData ifNil:['']) size, String crlf, - HTTPProxyCredentials, - HTTPBlabEmail, - requestString "extra user request. Authorization" - ) content: (postData ifNil:['']) response: nil! Item was removed: - ----- Method: HTTPSocket class>>httpPostDocument:args:accept:request: (in category 'get the page') ----- - httpPostDocument: url args: args accept: mimeType request: requestString - "like httpGET, except it does a POST instead of a GET. POST allows data to be uploaded" - - | argString | - args ifNotNil: [ - argString := self argString: args. - argString first = $? ifTrue: [argString := argString allButFirst]. - ]. - - ^self httpPost: url - content: argString - type: 'application/x-www-form-urlencoded' - accept: mimeType - request: requestString! Item was removed: - ----- Method: HTTPSocket class>>httpPostMultipart:args:accept:request: (in category 'get the page') ----- - httpPostMultipart: url args: argsDict accept: mimeType request: requestString - " do multipart/form-data encoding rather than x-www-urlencoded " - - | mimeBorder argsStream | - mimeBorder := '----squeak-georgia-tech-', Time millisecondClockValue printString, '-csl-cool-stuff-----'. - "encode the arguments dictionary" - argsStream := WriteStream on: String new. - argsDict associationsDo: [:assoc | - assoc value do: [ :value | | fieldValue | - "print the boundary" - argsStream nextPutAll: '--', mimeBorder, String crlf. - " check if it's a non-text field " - argsStream nextPutAll: 'Content-disposition: multipart/form-data; name="', assoc key, '"'. - (value isKindOf: MIMEDocument) - ifFalse: [fieldValue := value] - ifTrue: [argsStream nextPutAll: ' filename="', value url pathForFile, '"', String crlf, 'Content-Type: ', value contentType. - fieldValue := (value content - ifNil: [(FileStream fileNamed: value url pathForFile) contentsOfEntireFile] - ifNotNil: [value content]) asString]. - " Transcript show: 'field=', key, '; value=', fieldValue; cr. " - argsStream nextPutAll: String crlf, String crlf, fieldValue, String crlf. - ]]. - argsStream nextPutAll: '--', mimeBorder, '--'. - - ^self httpPost: url - content: argsStream contents - type: 'multipart/form-data; boundary=', mimeBorder - accept: mimeType - request: requestString - ! Item was removed: - ----- Method: HTTPSocket class>>httpPostToSuperSwiki:args:accept:request: (in category 'get the page') ----- - httpPostToSuperSwiki: url args: argsDict accept: mimeType request: requestString - - | mimeBorder argString | - mimeBorder := '---------SuperSwiki',Time millisecondClockValue printString,'-----'. - argString := String streamContents: [ :strm | - strm nextPutAll: mimeBorder, String crlf. - argsDict associationsDo: [:assoc | - assoc value do: [ :value | - strm - nextPutAll: 'Content-disposition: form-data; name="', assoc key, '"'; - nextPutAll: String crlf; - nextPutAll: String crlf; - nextPutAll: value; - nextPutAll: String crlf; - nextPutAll: String crlf; - nextPutAll: mimeBorder; - nextPutAll: String crlf. - ] - ]. - ]. - - ^self httpPost: url - content: argString - type: 'multipart/form-data; boundary=', mimeBorder - accept: mimeType - request: requestString - ! Item was removed: - ----- Method: HTTPSocket class>>httpPut:to:user:passwd: (in category 'get the page') ----- - httpPut: contents to: url user: user passwd: passwd - "Upload the contents of the stream to a file on the server - - WARNING: This method will send a basic auth header proactively. - This is necessary to avoid breaking MC and SqueakSource since SS does not - return a 401 when accessing a private (global no access) repository." - - | urlString resp header | - - "Normalize the url" - urlString := (Url absoluteFromText: url) asString. - - resp := (self httpRequestHandler) - httpRequest: 'PUT' url: urlString headers:( - 'Authorization: Basic ', (user, ':', passwd) base64Encoded, String crlf, - 'Accept: */*', String crlf, - 'Content-Type: application/octet-stream', String crlf, - 'Content-Length: ', (contents ifNil:['']) size, String crlf, - HTTPProxyCredentials, - HTTPBlabEmail - ) content: contents response:[:rr| header := rr]. - ^resp isString ifTrue:[header, resp] ifFalse:[header, resp content]! From commits at source.squeak.org Sun Oct 18 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 18 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151018215503.26541.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-October/009050.html Name: Tools-cmm.640 Ancestors: Tools-cmm.639 Recover the desktop command key, Cmd-w, for closing topmost window. ============================================= From commits at source.squeak.org Mon Oct 19 01:20:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 01:20:18 2015 Subject: [squeak-dev] The Trunk: Protocols-cmm.51.mcz Message-ID: Chris Muller uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-cmm.51.mcz ==================== Summary ==================== Name: Protocols-cmm.51 Author: cmm Time: 18 October 2015, 8:20:09.29 pm UUID: cf2acae6-fcc0-4a25-91de-a14d1f9bd66c Ancestors: Protocols-cmm.50 Open single-message browser is now activated by Command+iId. =============== Diff against Protocols-cmm.50 =============== Item was changed: ----- Method: InstanceBrowser>>offerMenu (in category 'menu commands') ----- offerMenu "Offer a menu to the user, in response to the hitting of the menu button on the tool pane" | aMenu | aMenu := MenuMorph new defaultTarget: self. aMenu title: 'Messages of ', objectViewed nameForViewer. aMenu addStayUpItem. aMenu addList: #( ('vocabulary...' chooseVocabulary) ('what to show...' offerWhatToShowMenu) - ('inst var refs (here)' setLocalInstVarRefs) ('inst var defs (here)' setLocalInstVarDefs) ('class var refs (here)' setLocalClassVarRefs) - ('navigate to a sender...' navigateToASender) ('recent...' navigateToRecentMethod) ('show methods in current change set' showMethodsInCurrentChangeSet) ('show methods with initials...' showMethodsWithInitials) - "('toggle search pane' toggleSearch)" - - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('versions (v)' browseVersions) ('inheritance (i)' methodHierarchy) - ('references... (r)' browseVariableReferences) ('assignments... (a)' browseVariableAssignments) - ('viewer on me' viewViewee) ('inspector on me' inspectViewee) - ('more...' shiftedYellowButtonActivity)). aMenu popUpInWorld: ActiveWorld! Item was changed: ----- Method: Lexicon>>offerMenu (in category 'menu commands') ----- offerMenu "Offer a menu to the user, in response to the hitting of the menu button on the tool pane" | aMenu | aMenu := MenuMorph new defaultTarget: self. aMenu addTitle: 'Lexicon'. aMenu addStayUpItem. aMenu addList: #( ('vocabulary...' chooseVocabulary) ('what to show...' offerWhatToShowMenu) - ('inst var refs (here)' setLocalInstVarRefs) ('inst var assignments (here)' setLocalInstVarDefs) ('class var refs (here)' setLocalClassVarRefs) - ('navigate to a sender...' navigateToASender) ('recent...' navigateToRecentMethod) ('show methods in current change set' showMethodsInCurrentChangeSet) ('show methods with initials...' showMethodsWithInitials) - "('toggle search pane' toggleSearch)" - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('versions (v)' browseVersions) ('inheritance (i)' methodHierarchy) - ('references... (r)' browseVariableReferences) ('assignments... (a)' browseVariableAssignments) - ('more...' shiftedYellowButtonActivity)). aMenu popUpInWorld: ActiveWorld! From robert.w.withers at gmail.com Mon Oct 19 11:39:19 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 11:39:25 2015 Subject: [squeak-dev] RE: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> Message-ID: <5624D667.7040708@gmail.com> Hi Ron , nice to see you too! It has been a number of years, hasn't it? Crypto is timestamped back in 2010, so there is is. I hope these have been kind years to you, as they have for me. I love the idea of optional sources of entropy, depending on the deployed capabilities. So there are our mouse points and such, because they ought to be optional. What are some reliably present sources in the most minimal situation? If we could define minimal as an image with no image level I/O beyond file I/O, I would think we'd have: Kernel, System, Collections, Compiler and FFI. Some intransitives in that scope for entropy would be grand. I was thinking to take 5 millisecondClockValues, separated by 4 non-secure random intervals: take the low order byte of the 4 intervals and reverse & concat them, as a entropic source. I can coordinate these changes. Ron, could you add me to the Cryptography team so I can upload the Pharo Cryptography #bleedingEdge? Thanks and I look forward to more, :) Robert On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > Hi Robert, > > Nice to see you! > > Looks interesting I know that Chris did something gathering sources of entropy. Seems like the more the better. Could you just make the entropy sources optional such that if they exist we use them? I would have to go back and see what Chris did but he was following suggestions from Schneider in his secureRandom. > > All the best, > > Ron Teitelbaum > >> -----Original Message----- >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Robert Withers >> Sent: Sunday, October 18, 2015 5:00 AM >> To: The general-purpose Squeak developers list; Pharo Development List >> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator >> class>>unpredictableStringsDo: >> >> I'm sorry, I forgot the code. I list the existing method, followed by my >> modified Pharo method below. I welcome any feedback. >> >> Regards, >> Robert >> >> --- >> Existing: >> unpredictableStringsDo: aBlock >> "Enumerate sources of information from my environment that >> should be generally hard to guess." >> | time | >> time := Time millisecondsToRun: >> [ aBlock >> value: World imageForm bits compressToByteArray ; >> value: Sensor mousePoint x asString ; >> value: Sensor mousePoint y asString ; >> value: Time millisecondClockValue asByteArray ; >> value: Date today asString ; >> value: Time now asString ; >> value: Display extent asString. >> 100 timesRepeat: [ aBlock value: UUID new ]. >> #(vmVersion platformName primVmPath imageName >> platformSubtype datedVersion lastQuitLogPosition vmStatisticsReportString >> imageName) >> collect: >> [ : each | >> aBlock value: (SmalltalkImage current perform: each) >> asByteArray ] ]. >> aBlock >> value: time asByteArray; >> "maybe the pointer has moved, hit it again." >> value: Sensor mousePoint asString ; >> value: Time millisecondClockValue asByteArray >> >> --- >> Pharo port: >> unpredictableStringsDo: aBlock >> "Enumerate sources of information from my environment that >> should be generally hard to guess." >> >> | time | >> time := Time millisecondsToRun: >> [ aBlock >> value: Time millisecondClockValue asByteArray ; >> value: Date today asString ; >> value: Time now asString. >> 100 timesRepeat: [ aBlock value: UUID new ]. >> #(version primImagePath imagePath datedVersion >> lastQuitLogPosition) >> collect: >> [ : each | >> aBlock value: (SmalltalkImage current perform: each) >> asByteArray ] ]. >> aBlock >> value: time asByteArray; >> value: Time millisecondClockValue asByteArray >> >> >> On 10/18/2015 04:23 AM, Robert Withers wrote: >>> This is a message intended for anyone who was on the Cryptography team. >>> I recently ported it to Pharo and had to make changes to >> RandomGenerator >>> class>>unpredictableStringsDo:. This certainly removed some uncertainty >>> from the results of this message. My question is what should I do about >>> that? This method seems to require non-headless, as it is checking the >>> mouse point and such. This being a crypto cornerstone, what the best >>> answer here. >>> >>> Thank you, >>> Robert > > > From Lou at Keystone-Software.com Mon Oct 19 12:58:06 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Mon Oct 19 12:58:16 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> Message-ID: <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> Hi Guys, How about getting the CPU temperature. I think most CPUs support "Digital Thermal Sensor" (I'm not sure about ARM). I think it is seven bits. The real range should be less than that but it may be enough to help add some entropy. Lou On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers wrote: >Hi Ron , nice to see you too! It has been a number of years, hasn't it? >Crypto is timestamped back in 2010, so there is is. I hope these have >been kind years to you, as they have for me. > >I love the idea of optional sources of entropy, depending on the >deployed capabilities. So there are our mouse points and such, because >they ought to be optional. > >What are some reliably present sources in the most minimal situation? If >we could define minimal as an image with no image level I/O beyond file >I/O, I would think we'd have: Kernel, System, Collections, Compiler and >FFI. Some intransitives in that scope for entropy would be grand. > >I was thinking to take 5 millisecondClockValues, separated by 4 >non-secure random intervals: take the low order byte of the 4 intervals >and reverse & concat them, as a entropic source. > >I can coordinate these changes. Ron, could you add me to the >Cryptography team so I can upload the Pharo Cryptography #bleedingEdge? > >Thanks and I look forward to more, :) > >Robert > >On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >> Hi Robert, >> >> Nice to see you! >> >> Looks interesting I know that Chris did something gathering sources of entropy. Seems like the more the better. Could you just make the entropy sources optional such that if they exist we use them? I would have to go back and see what Chris did but he was following suggestions from Schneider in his secureRandom. >> >> All the best, >> >> Ron Teitelbaum >> >>> -----Original Message----- >>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >>> Robert Withers >>> Sent: Sunday, October 18, 2015 5:00 AM >>> To: The general-purpose Squeak developers list; Pharo Development List >>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator >>> class>>unpredictableStringsDo: >>> >>> I'm sorry, I forgot the code. I list the existing method, followed by my >>> modified Pharo method below. I welcome any feedback. >>> >>> Regards, >>> Robert >>> >>> --- >>> Existing: >>> unpredictableStringsDo: aBlock >>> "Enumerate sources of information from my environment that >>> should be generally hard to guess." >>> | time | >>> time := Time millisecondsToRun: >>> [ aBlock >>> value: World imageForm bits compressToByteArray ; >>> value: Sensor mousePoint x asString ; >>> value: Sensor mousePoint y asString ; >>> value: Time millisecondClockValue asByteArray ; >>> value: Date today asString ; >>> value: Time now asString ; >>> value: Display extent asString. >>> 100 timesRepeat: [ aBlock value: UUID new ]. >>> #(vmVersion platformName primVmPath imageName >>> platformSubtype datedVersion lastQuitLogPosition vmStatisticsReportString >>> imageName) >>> collect: >>> [ : each | >>> aBlock value: (SmalltalkImage current perform: each) >>> asByteArray ] ]. >>> aBlock >>> value: time asByteArray; >>> "maybe the pointer has moved, hit it again." >>> value: Sensor mousePoint asString ; >>> value: Time millisecondClockValue asByteArray >>> >>> --- >>> Pharo port: >>> unpredictableStringsDo: aBlock >>> "Enumerate sources of information from my environment that >>> should be generally hard to guess." >>> >>> | time | >>> time := Time millisecondsToRun: >>> [ aBlock >>> value: Time millisecondClockValue asByteArray ; >>> value: Date today asString ; >>> value: Time now asString. >>> 100 timesRepeat: [ aBlock value: UUID new ]. >>> #(version primImagePath imagePath datedVersion >>> lastQuitLogPosition) >>> collect: >>> [ : each | >>> aBlock value: (SmalltalkImage current perform: each) >>> asByteArray ] ]. >>> aBlock >>> value: time asByteArray; >>> value: Time millisecondClockValue asByteArray >>> >>> >>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>> This is a message intended for anyone who was on the Cryptography team. >>>> I recently ported it to Pharo and had to make changes to >>> RandomGenerator >>>> class>>unpredictableStringsDo:. This certainly removed some uncertainty >>>> from the results of this message. My question is what should I do about >>>> that? This method seems to require non-headless, as it is checking the >>>> mouse point and such. This being a crypto cornerstone, what the best >>>> answer here. >>>> >>>> Thank you, >>>> Robert >> >> >> > ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From eliot.miranda at gmail.com Mon Oct 19 13:07:25 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Oct 19 13:07:29 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: <562279bb.a976c20a.f2371.6d0eSMTPIN_ADDED_MISSING@mx.google.com> References: <562279bb.a976c20a.f2371.6d0eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Marcel, > On Oct 17, 2015, at 10:47 AM, commits@source.squeak.org wrote: > > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.771.mcz > > ==================== Summary ==================== > > Name: System-mt.771 > Author: mt > Time: 17 October 2015, 6:38:55.72 pm > UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 > Ancestors: System-cmm.770 > > Log change stamps at the granularity of seconds not only minutes. > > Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. I think we should discuss this a bit further. This is all a soft touchy freely gut kind of thing for me: I don't like this change. I think the granularity for time stamps needs to differentiate versions in different package commits. Within an image versions can be distinguished by their order in the changes file (the previous source position, can't remember what that's called and I'm on my phone). So there's no real need for fine granularity. One could also say that a second is a long time if one is auto generating methods. I quite like being able to make several changes within the same minute because I can tell that they were related changes. With second granularity I have no chance. Do you have a programmatic reason for wanting second granularity? What to others think? Are there workflow implications to the granularity of time stamps? This is all very anal but, well, the changes file is all very anal anyway :-) I _,,,^..^,,,_ (phone) From Marcel.Taeumel at hpi.de Mon Oct 19 15:16:39 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Oct 19 15:28:00 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: Message-ID: <1445267799954-4856499.post@n4.nabble.com> Hi Eliot, actually, I would like to store the timestamp in all its details. ;-) Just like Monticello does. In my case, I wanted to quickly find out, which version is actually loaded in the image. In my environment, I filter-out all those duplicate entries in the changes file that occur when loading an older version: And show them like this: Yes, you don't see seconds there, but at least the comparison is accurate now. Milliseconds would be welcome, too. :-D So, comparing hashes of CompiledMethods provides too many false positives (samples only ~20 bytes). Comparing the full source strings is too slow... :-) ...and not necessary because the timestamps are there anyway. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856499.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ma.chris.m at gmail.com Mon Oct 19 16:09:45 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Oct 19 16:10:28 2015 Subject: [squeak-dev] why cannot the Shift+Tab key be detected? Message-ID: I would like to map outdent to Shift+Tab when there is a selection. I can detect the Tab key, but Shift+Tab never makes it to the event handler. In fact, even Sensor kbdTest seems to be able to detect Shift+Tab. Any ideas why? From asqueaker at gmail.com Mon Oct 19 16:57:46 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Oct 19 16:57:51 2015 Subject: [squeak-dev] why cannot the Shift+Tab key be detected? In-Reply-To: References: Message-ID: > > > In fact, even > Oops, I meant NOT even... > > Sensor kbdTest > > seems to be able to detect Shift+Tab. > > Any ideas why? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151019/b88f7043/attachment-0001.htm From Marcel.Taeumel at hpi.de Mon Oct 19 16:48:25 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Oct 19 16:59:45 2015 Subject: [squeak-dev] Re: why cannot the Shift+Tab key be detected? In-Reply-To: References: Message-ID: <1445273305812-4856519.post@n4.nabble.com> Hi Chris, putting this into TextEditor >> #dispatchKeyboardEvent: brings the expected effect: (aKeyboardEvent shiftPressed and: [aKeyboardEvent keyCharacter = Character tab]) ifTrue: [self halt]. So, everything works fine. Maybe it is because those text editors handle those events and the Morphic event handler does refuse to handle them? Where do you try to handle it? You have to use TextMorphForEditView, because the PluggableTextMorph(Plus) gets keyboard events only in rare occasions... Best, Marcel -- View this message in context: http://forum.world.st/why-cannot-the-Shift-Tab-key-be-detected-tp4856508p4856519.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Mon Oct 19 17:02:25 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 19 17:02:32 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> Message-ID: <57515E8D-D019-4E76-9AEE-D352296FE7E6@rowledge.org> > On 19-10-2015, at 5:58 AM, Louis LaBrunda wrote: > > I think most CPUs support "Digital > Thermal Sensor" (I'm not sure about ARM). ARM *is* most cpus. I think we long ago passed the point where more than 50% of all >32bit cpus were ARM. Typically the temperature of each core is monitored by stuff added around the ARM cores in an SoC, not the ARM itself. For example on a Pi, `vcgencmd measure_temp` works, though strictly speaking that measures the general temp of the SoC - which like many devices that are ARM powered is a large thing to do stuff and just happens to have a few Gips of processor hidden in a small corner. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Airline Food From nicolas.cellier.aka.nice at gmail.com Mon Oct 19 17:27:11 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Oct 19 17:27:14 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: <1445267799954-4856499.post@n4.nabble.com> References: <1445267799954-4856499.post@n4.nabble.com> Message-ID: Personnally, I'm with Eliot, accuracy of timestamp doesn't really matter for me... If it's from my own computer, I'll use the change log for chronology, and my immediate memory. If it's to retrieve versions, I'll check the source code, and I do not see why the price of comparing source would be so high... Marcel do you compare thousands of versions ? If it's from another computer, well, the chances that the clock are synchronized... Nicolas 2015-10-19 17:16 GMT+02:00 marcel.taeumel : > Hi Eliot, > > actually, I would like to store the timestamp in all its details. ;-) Just > like Monticello does. > > In my case, I wanted to quickly find out, which version is actually loaded > in the image. In my environment, I filter-out all those duplicate entries > in > the changes file that occur when loading an older version: > > > > And show them like this: > > > > Yes, you don't see seconds there, but at least the comparison is accurate > now. Milliseconds would be welcome, too. :-D > > So, comparing hashes of CompiledMethods provides too many false positives > (samples only ~20 bytes). Comparing the full source strings is too slow... > :-) ...and not necessary because the timestamps are there anyway. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856499.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151019/a3c6e1be/attachment.htm From tim at rowledge.org Mon Oct 19 17:34:45 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 19 17:34:50 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445267799954-4856499.post@n4.nabble.com> Message-ID: > On 19-10-2015, at 10:27 AM, Nicolas Cellier wrote: > > Personnally, I'm with Eliot, accuracy of timestamp doesn't really matter for me? I kind of agree but then I also can?t see what the actual cost of having more detailed timestamps is; just a few more characters in the method description chunk. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IBLU: Ignore Basic Laws of Universe From robert.w.withers at gmail.com Mon Oct 19 17:52:49 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 17:52:59 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> Message-ID: <56252DF1.3050607@gmail.com> This is great guys. Is there a way to get this from the image? Good to get it with an FFI/OSProcess call or something. Thank you, Robert On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > Hi Guys, > > How about getting the CPU temperature. I think most CPUs support "Digital > Thermal Sensor" (I'm not sure about ARM). I think it is seven bits. The > real range should be less than that but it may be enough to help add some > entropy. > > Lou > > On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > wrote: > >> Hi Ron , nice to see you too! It has been a number of years, hasn't it? >> Crypto is timestamped back in 2010, so there is is. I hope these have >> been kind years to you, as they have for me. >> >> I love the idea of optional sources of entropy, depending on the >> deployed capabilities. So there are our mouse points and such, because >> they ought to be optional. >> >> What are some reliably present sources in the most minimal situation? If >> we could define minimal as an image with no image level I/O beyond file >> I/O, I would think we'd have: Kernel, System, Collections, Compiler and >> FFI. Some intransitives in that scope for entropy would be grand. >> >> I was thinking to take 5 millisecondClockValues, separated by 4 >> non-secure random intervals: take the low order byte of the 4 intervals >> and reverse & concat them, as a entropic source. >> >> I can coordinate these changes. Ron, could you add me to the >> Cryptography team so I can upload the Pharo Cryptography #bleedingEdge? >> >> Thanks and I look forward to more, :) >> >> Robert >> >> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>> Hi Robert, >>> >>> Nice to see you! >>> >>> Looks interesting I know that Chris did something gathering sources of entropy. Seems like the more the better. Could you just make the entropy sources optional such that if they exist we use them? I would have to go back and see what Chris did but he was following suggestions from Schneider in his secureRandom. >>> >>> All the best, >>> >>> Ron Teitelbaum >>> >>>> -----Original Message----- >>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >>>> Robert Withers >>>> Sent: Sunday, October 18, 2015 5:00 AM >>>> To: The general-purpose Squeak developers list; Pharo Development List >>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] RandomGenerator >>>> class>>unpredictableStringsDo: >>>> >>>> I'm sorry, I forgot the code. I list the existing method, followed by my >>>> modified Pharo method below. I welcome any feedback. >>>> >>>> Regards, >>>> Robert >>>> >>>> --- >>>> Existing: >>>> unpredictableStringsDo: aBlock >>>> "Enumerate sources of information from my environment that >>>> should be generally hard to guess." >>>> | time | >>>> time := Time millisecondsToRun: >>>> [ aBlock >>>> value: World imageForm bits compressToByteArray ; >>>> value: Sensor mousePoint x asString ; >>>> value: Sensor mousePoint y asString ; >>>> value: Time millisecondClockValue asByteArray ; >>>> value: Date today asString ; >>>> value: Time now asString ; >>>> value: Display extent asString. >>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>> #(vmVersion platformName primVmPath imageName >>>> platformSubtype datedVersion lastQuitLogPosition vmStatisticsReportString >>>> imageName) >>>> collect: >>>> [ : each | >>>> aBlock value: (SmalltalkImage current perform: each) >>>> asByteArray ] ]. >>>> aBlock >>>> value: time asByteArray; >>>> "maybe the pointer has moved, hit it again." >>>> value: Sensor mousePoint asString ; >>>> value: Time millisecondClockValue asByteArray >>>> >>>> --- >>>> Pharo port: >>>> unpredictableStringsDo: aBlock >>>> "Enumerate sources of information from my environment that >>>> should be generally hard to guess." >>>> >>>> | time | >>>> time := Time millisecondsToRun: >>>> [ aBlock >>>> value: Time millisecondClockValue asByteArray ; >>>> value: Date today asString ; >>>> value: Time now asString. >>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>> #(version primImagePath imagePath datedVersion >>>> lastQuitLogPosition) >>>> collect: >>>> [ : each | >>>> aBlock value: (SmalltalkImage current perform: each) >>>> asByteArray ] ]. >>>> aBlock >>>> value: time asByteArray; >>>> value: Time millisecondClockValue asByteArray >>>> >>>> >>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>> This is a message intended for anyone who was on the Cryptography team. >>>>> I recently ported it to Pharo and had to make changes to >>>> RandomGenerator >>>>> class>>unpredictableStringsDo:. This certainly removed some uncertainty >>>>> from the results of this message. My question is what should I do about >>>>> that? This method seems to require non-headless, as it is checking the >>>>> mouse point and such. This being a crypto cornerstone, what the best >>>>> answer here. >>>>> >>>>> Thank you, >>>>> Robert >>> >>> >>> >> > ----------------------------------------------------------- > Louis LaBrunda > Keystone Software Corp. > SkypeMe callto://PhotonDemon > mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com > > From commits at source.squeak.org Mon Oct 19 17:57:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 17:57:52 2015 Subject: [squeak-dev] The Trunk: ST80-topa.188.mcz Message-ID: Tobias Pape uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-topa.188.mcz ==================== Summary ==================== Name: ST80-topa.188 Author: topa Time: 19 October 2015, 7:57:41.249 pm UUID: 750a1cfe-085a-4a0e-87a7-aa2a7f9000c7 Ancestors: ST80-eem.187 Exchange #duplicate for #debugIt on CMD-D =============== Diff against ST80-eem.187 =============== Item was changed: ----- Method: ParagraphEditor class>>initializeShiftCmdKeyShortcuts (in category 'keyboard shortcut tables') ----- initializeShiftCmdKeyShortcuts "Initialize the shift-command-key (or control-key) shortcut table." "NOTE: if you don't know what your keyboard generates, use Sensor kbdTest" "wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the capitalized versions of the letters. TPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values." | cmdMap | "shift-command and control shortcuts" cmdMap := Array new: 256 withAll: #noop:. "use temp in case of a crash" cmdMap at: ( 1 + 1) put: #cursorHome:. "home key" cmdMap at: ( 4 + 1) put: #cursorEnd:. "end key" cmdMap at: ( 8 + 1) put: #forwardDelete:. "ctrl-H or delete key" cmdMap at: (11 + 1) put: #cursorPageUp:. "page up key" cmdMap at: (12 + 1) put: #cursorPageDown:. "page down key" cmdMap at: (13 + 1) put: #crWithIndent:. "ctrl-Return" cmdMap at: (27 + 1) put: #offerMenuFromEsc:. "escape key" cmdMap at: (28 + 1) put: #cursorLeft:. "left arrow key" cmdMap at: (29 + 1) put: #cursorRight:. "right arrow key" cmdMap at: (30 + 1) put: #cursorUp:. "up arrow key" cmdMap at: (31 + 1) put: #cursorDown:. "down arrow key" cmdMap at: (32 + 1) put: #selectWord:. "space bar key" cmdMap at: (45 + 1) put: #changeEmphasis:. "cmd-sh-minus" cmdMap at: (61 + 1) put: #changeEmphasis:. "cmd-sh-plus" cmdMap at: (127 + 1) put: #forwardDelete:. "del key" "On some keyboards, these characters require a shift" '([<{|"''' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:]. "NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu." "cmdMap at: (27 + 1) put: #shiftEnclose:." "ctrl-[" "'""''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:]." "triplet = {character. comment selector. novice appropiated}" #( ($a argAdvance: false) ($b browseItHere: false) ($c compareToClipboard: false) + ($d debugIt: false) - ($d duplicate: true) ($e methodStringsContainingIt: false) ($f displayIfFalse: false) ($g fileItIn: false) ($h cursorTopHome: true) ($i exploreIt: false) ($j doAgainMany: true) ($k changeStyle: true) ($l outdent: true) ($m selectCurrentTypeIn: true) ($n referencesToIt: false) ($p makeProjectLink: true) ($r indent: true) ($s search: true) ($t displayIfTrue: false) ($u changeLfToCr: false) ($v pasteInitials: false) ($w methodNamesContainingIt: false) ($x makeLowercase: true) ($y makeUppercase: true) ($z makeCapitalized: true) ) select:[:triplet | Preferences noviceMode not or:[triplet third]] thenDo:[:triplet | cmdMap at: (triplet first asciiValue + 1) put: triplet second. "plain keys" cmdMap at: (triplet first asciiValue - 32 + 1) put: triplet second. "shifted keys" cmdMap at: (triplet first asciiValue - 96 + 1) put: triplet second. "ctrl keys" ]. ShiftCmdActions := cmdMap! Item was added: + ----- Method: ParagraphEditor>>debugIt: (in category 'editing keys') ----- + debugIt: characterStream + sensor keyboard. + self terminateAndInitializeAround: [self debugIt]. + ^ true! Item was changed: (PackageInfo named: 'ST80') postscript: '"below, add code to be run after the loading of this package" + ParagraphEditor initialize. "again"'! - ParagraphEditor initialize.'! From commits at source.squeak.org Mon Oct 19 18:05:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 18:05:46 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.1012.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1012.mcz ==================== Summary ==================== Name: Morphic-topa.1012 Author: topa Time: 19 October 2015, 8:04:58.41 pm UUID: a7d3cb1c-06ac-4e63-9b29-71258d7b53f3 Ancestors: Morphic-cmm.1011 Exchange #duplicate for #debugIt on CMD-D =============== Diff against Morphic-cmm.1011 =============== Item was changed: ----- Method: SmalltalkEditor class>>initializeShiftCmdKeyShortcuts (in category 'keyboard shortcut tables') ----- initializeShiftCmdKeyShortcuts "Initialize the shift-command-key (or control-key) shortcut table." "NOTE: if you don't know what your keyboard generates, use Sensor kbdTest" "wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the capitalized versions of the letters. TPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values." "SmalltalkEditor initialize" | cmds | super initializeShiftCmdKeyShortcuts. cmds := #( $a argAdvance: $b browseItHere: + $d debugIt: $e methodStringsContainingIt: $f displayIfFalse: $g fileItIn: $i exploreIt: $n referencesToIt: $s invokePrettyPrint: $t displayIfTrue: $v pasteInitials: $w methodNamesContainingIt: ). 1 to: cmds size by: 2 do: [ :i | shiftCmdActions at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1). "plain keys" shiftCmdActions at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1). "shifted keys" shiftCmdActions at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1). "ctrl keys" ].! Item was changed: ----- Method: TextEditor class>>initializeShiftCmdKeyShortcuts (in category 'keyboard shortcut tables') ----- initializeShiftCmdKeyShortcuts "Initialize the shift-command-key (or control-key) shortcut table." "NOTE: if you don't know what your keyboard generates, use Sensor kbdTest" "wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the capitalized versions of the letters. TPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values." "TextEditor initialize" | cmdMap cmds | "shift-command and control shortcuts" cmdMap := Array new: 256 withAll: #noop:. "use temp in case of a crash" cmdMap at: ( 1 + 1) put: #cursorHome:. "home key" cmdMap at: ( 4 + 1) put: #cursorEnd:. "end key" cmdMap at: ( 8 + 1) put: #forwardDelete:. "ctrl-H or delete key" cmdMap at: (11 + 1) put: #cursorPageUp:. "page up key" cmdMap at: (12 + 1) put: #cursorPageDown:. "page down key" cmdMap at: (13 + 1) put: #crWithIndent:. "ctrl-Return" cmdMap at: (27 + 1) put: #offerMenuFromEsc:. "escape key" cmdMap at: (28 + 1) put: #cursorLeft:. "left arrow key" cmdMap at: (29 + 1) put: #cursorRight:. "right arrow key" cmdMap at: (30 + 1) put: #cursorUp:. "up arrow key" cmdMap at: (31 + 1) put: #cursorDown:. "down arrow key" cmdMap at: (32 + 1) put: #selectWord:. "space bar key" cmdMap at: (45 + 1) put: #changeEmphasis:. "cmd-sh-minus" cmdMap at: (61 + 1) put: #changeEmphasis:. "cmd-sh-plus" cmdMap at: (127 + 1) put: #forwardDelete:. "del key" "On some keyboards, these characters require a shift" '([<{|"''9' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:]. "NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu." "cmdMap at: (27 + 1) put: #shiftEnclose:." "ctrl-[" "'""''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:]." cmds := #( $c compareToClipboard: + "$d duplicate:" - $d duplicate: $h cursorTopHome: $j doAgainMany: $k changeStyle: $l outdent: $m selectCurrentTypeIn: $r indent: $s search: $u changeLfToCr: $x makeLowercase: $y makeUppercase: $z makeCapitalized: ). 1 to: cmds size by: 2 do: [ :i | cmdMap at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1). "plain keys" cmdMap at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1). "shifted keys" cmdMap at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1). "ctrl keys" ]. shiftCmdActions := cmdMap! Item was added: + ----- Method: TextEditor>>debugIt: (in category 'editing keys') ----- + debugIt: aKeyboardEvent + + self debugIt. + ^ true! From commits at source.squeak.org Mon Oct 19 18:07:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 18:07:45 2015 Subject: [squeak-dev] The Trunk: Tools-topa.641.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.641.mcz ==================== Summary ==================== Name: Tools-topa.641 Author: topa Time: 19 October 2015, 8:07:23.224 pm UUID: 814fa3cb-c5f1-4b07-bf05-16154c316de6 Ancestors: Tools-cmm.640 Exchange #duplicate for #debugIt on CMD-D (menu) =============== Diff against Tools-cmm.640 =============== Item was changed: ----- Method: StringHolder class>>yellowButtonMenuItems (in category '*Tools-yellow button menu') ----- yellowButtonMenuItems "Returns the standard yellow button menu items" ^{ #-. {'set font... (k)' translated. #offerFontMenu}. {'set style... (K)' translated. #changeStyle}. {'set alignment... (u)' translated. #chooseAlignment}. #-. {'make project link (P)' translated. #makeProjectLink}. #-. {'find...(f)' translated. #find}. {'find again (g)' translated. #findAgain}. {'set search string (h)' translated. #setSearchString}. #-. {'do again (j)' translated. #again}. {'undo (z)' translated. #undo}. #-. {'copy (c)' translated. #copySelection}. {'cut (x)' translated. #cut}. {'paste (v)' translated. #paste}. {'paste...' translated. #pasteRecent}. #-. {'do it (d)' translated. #doIt}. + {'debug it (D)' translated. #debugIt}. {'print it (p)' translated. #printIt}. {'inspect it (i)' translated. #inspectIt}. {'explore it (I)' translated. #exploreIt}. - {'debug it' translated. #debugIt}. {'button for it' translated. #buttonForIt}. {'tally it' translated. #tallyIt}. {'spy on it' translated. #spyOnIt}. #-. {'accept (s)' translated. #accept}. {'cancel (l)' translated. #cancel}. #-. {'show bytecodes' translated. #showBytecodes}. #-. {'copy html' translated. #copyHtml}. #-. {'more...' translated. #shiftedTextPaneMenuRequest}. }! From commits at source.squeak.org Mon Oct 19 18:11:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 18:11:40 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.1013.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1013.mcz ==================== Summary ==================== Name: Morphic-topa.1013 Author: topa Time: 19 October 2015, 8:11:08.908 pm UUID: 9c5d0bcd-c56c-4d4b-92dc-e8976696a433 Ancestors: Morphic-topa.1012 Exchange #duplicate for #debugIt on CMD-D (menu icon, postscript) =============== Diff against Morphic-topa.1012 =============== Item was changed: ----- Method: MenuIcons class>>itemsIcons (in category 'menu decoration') ----- itemsIcons "answer a collection of associations wordings -> icon to decorate the menus all over the image" | icons | icons := OrderedCollection new. "icons add: #('Test Runner' ) -> self smallTrafficIcon." " world menu" "icons add: #('previous project' 'go to previous project') -> self smallProjectBackIcon." icons add: #('go to next project') -> self smallProjectNextIcon. icons add: #('select' ) -> self smallSelectIcon. icons add: #('jump to project...' ) -> self smallProjectJumpIcon. icons add: #('open...' ) -> self smallOpenIcon. icons add: #('appearance...' ) -> self smallConfigurationIcon. icons add: #('help...' ) -> self smallHelpIcon. "icons add: #('windows...' ) -> self smallWindowIcon." icons add: #('changes...' ) -> self smallDocumentClockIcon. icons add: #('print PS to file...' ) -> self smallPrintIcon. icons add: #('debug...' ) -> self smallDebugIcon. icons add: #('export...' ) -> self smallExportIcon. icons add: #('save' ) -> self smallSaveIcon. "icons add: #('save project on file...' ) -> self smallProjectSaveIcon." "icons add: #('save as...') -> self smallSaveAsIcon. icons add: #('save as new version') -> self smallSaveNewIcon. icons add: #('save and quit' ) -> self smallQuitIcon." icons add: #('quit') -> self smallQuitNoSaveIcon. "icons add: #('load project from file...' ) -> self smallProjectLoadIcon." "" icons add: #('do it (d)' ) -> self smallDoItIcon. icons add: #('inspect it (i)' 'inspect world' 'explore world' 'inspect model' 'inspect morph' 'explore morph' 'inspect owner chain' 'explore' 'inspect' 'explore (I)' 'inspect (i)' 'basic inspect' ) -> self smallInspectItIcon. icons add: #('print it (p)' ) -> self smallPrintIcon. + icons add: #('debug it (D)' ) -> self smallDebugIcon. - icons add: #('debug it' ) -> self smallDebugIcon. icons add: #('tally it' ) -> self smallTimerIcon. "" icons add: #('copy (c)' 'copy to paste buffer' 'copy text' ) -> self smallCopyIcon. icons add: #('paste (v)') -> self smallPasteIcon. icons add: #('cut (x)' ) -> self smallCutIcon. "" icons add: #('accept (s)' 'yes' 'Yes' ) -> self smallOkIcon. icons add: #('cancel (l)' 'no' 'No' ) -> self smallCancelIcon. "" icons add: #('do again (j)' ) -> self smallRedoIcon. icons add: #('undo (z)' ) -> self smallUndoIcon. "" icons add: #( 'find class... (f)' 'find method...' ) -> self smallSearchIcon. icons add: #('find...(f)') -> self smallFindIcon. "" icons add: #('remove' 'remove class (x)' 'delete method from changeset (d)' 'remove method from system (x)' 'delete class from change set (d)' 'remove class from system (x)' 'destroy change set (X)' ) -> self smallDeleteIcon. icons add: #('add item...' 'new category...' 'new change set... (n)' ) -> self smallNewIcon. "" icons add: #('objects (o)' ) -> self smallObjectCatalogIcon. icons add: #('authoring tools...') -> self smallAuthoringToolsIcon. icons add: #('projects...') -> self smallProjectIcon. "" icons add: #('make screenshot') -> self smallScreenshotIcon. "" icons add: #('leftFlush' ) -> self smallLeftFlushIcon. icons add: #('rightFlush' ) -> self smallRightFlushIcon. icons add: #('centered' 'set alignment... (u)' ) -> self smallCenteredIcon. icons add: #('justified' ) -> self smallJustifiedIcon. "" icons add: #('set font... (k)' 'list font...' 'set subtitles font' 'change font' 'system fonts...' 'change font...' 'default text font...' 'flaps font...' 'eToys font...' 'eToys title font...' 'halo label font...' 'menu font...' 'window-title font...' 'balloon-help font...' 'code font...' 'button font...') -> self smallFontsIcon. icons add: #('full screen on') -> self smallFullscreenOnIcon. icons add: #('full screen off' ) -> self smallFullscreenOffIcon. "" ^ icons! Item was changed: (PackageInfo named: 'Morphic') postscript: '"Initialize the key bindings and menus" + Editor initialize. "again" - Editor initialize. "apply the new icons" + MenuIcons initializeIcons. "again" - MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. "Fix missing inset of old-style windows." SystemWindow allSubInstancesDo: [:ea | (ea paneMorphs detect: [:m | m layoutFrame leftFraction = 0] ifNone: []) ifNotNil: [:m | m layoutFrame leftOffset > 0 ifTrue: [ea layoutInset: 0]]]. "Remove non-functional tools from world menu." LanguageEditor unload. UUniverseBrowser unload. UUniverseEditor unload.'! From asqueaker at gmail.com Mon Oct 19 18:23:18 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Oct 19 18:23:20 2015 Subject: [squeak-dev] Re: why cannot the Shift+Tab key be detected? In-Reply-To: <1445273305812-4856519.post@n4.nabble.com> References: <1445273305812-4856519.post@n4.nabble.com> Message-ID: Well, we may have a VM bug then. I just booted my laptop into in Windows and that Squeak VM was able to detect Shift+Tab. However, back in Linux VM (both Cog and Spur 3427), Shift+Tab is not even detected by Sensor. I went into GEdit of Ubuntu and Shift+Tab works there... Eliot, could this be a bug in the Linux VM? Thanks. On Mon, Oct 19, 2015 at 11:48 AM, marcel.taeumel wrote: > Hi Chris, > > putting this into TextEditor >> #dispatchKeyboardEvent: brings the expected > effect: > > (aKeyboardEvent shiftPressed and: [aKeyboardEvent keyCharacter = Character > tab]) > ifTrue: [self halt]. > > So, everything works fine. Maybe it is because those text editors handle > those events and the Morphic event handler does refuse to handle them? > Where > do you try to handle it? You have to use TextMorphForEditView, because the > PluggableTextMorph(Plus) gets keyboard events only in rare occasions... > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/why-cannot-the-Shift-Tab-key-be-detected-tp4856508p4856519.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151019/d3b54095/attachment.htm From ron at usmedrec.com Mon Oct 19 18:28:42 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Oct 19 18:28:49 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <56252DF1.3050607@gmail.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> Message-ID: <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> Hi Robert, You are already on the Cryptograph repo on SqueakSource.com as an admin. Please feel free to reorg if you like. Let me know if you have trouble resurrecting your account. All the best, Ron > -----Original Message----- > From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- > bounces@lists.squeakfoundation.org] On Behalf Of Robert Withers > Sent: Monday, October 19, 2015 1:53 PM > To: squeak-dev@lists.squeakfoundation.org > Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] > RandomGenerator class>>unpredictableStringsDo: > > This is great guys. Is there a way to get this from the image? Good to get it > with an FFI/OSProcess call or something. > > Thank you, > Robert > > On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > > Hi Guys, > > > > How about getting the CPU temperature. I think most CPUs support > > "Digital Thermal Sensor" (I'm not sure about ARM). I think it is > > seven bits. The real range should be less than that but it may be > > enough to help add some entropy. > > > > Lou > > > > On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > > wrote: > > > >> Hi Ron , nice to see you too! It has been a number of years, hasn't it? > >> Crypto is timestamped back in 2010, so there is is. I hope these have > >> been kind years to you, as they have for me. > >> > >> I love the idea of optional sources of entropy, depending on the > >> deployed capabilities. So there are our mouse points and such, > >> because they ought to be optional. > >> > >> What are some reliably present sources in the most minimal situation? > >> If we could define minimal as an image with no image level I/O beyond > >> file I/O, I would think we'd have: Kernel, System, Collections, > >> Compiler and FFI. Some intransitives in that scope for entropy would be > grand. > >> > >> I was thinking to take 5 millisecondClockValues, separated by 4 > >> non-secure random intervals: take the low order byte of the 4 > >> intervals and reverse & concat them, as a entropic source. > >> > >> I can coordinate these changes. Ron, could you add me to the > >> Cryptography team so I can upload the Pharo Cryptography > #bleedingEdge? > >> > >> Thanks and I look forward to more, :) > >> > >> Robert > >> > >> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > >>> Hi Robert, > >>> > >>> Nice to see you! > >>> > >>> Looks interesting I know that Chris did something gathering sources of > entropy. Seems like the more the better. Could you just make the entropy > sources optional such that if they exist we use them? I would have to go > back and see what Chris did but he was following suggestions from > Schneider in his secureRandom. > >>> > >>> All the best, > >>> > >>> Ron Teitelbaum > >>> > >>>> -----Original Message----- > >>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On > >>>> Behalf Of Robert Withers > >>>> Sent: Sunday, October 18, 2015 5:00 AM > >>>> To: The general-purpose Squeak developers list; Pharo Development > >>>> List > >>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] > >>>> RandomGenerator > >>>> class>>unpredictableStringsDo: > >>>> > >>>> I'm sorry, I forgot the code. I list the existing method, followed > >>>> by my modified Pharo method below. I welcome any feedback. > >>>> > >>>> Regards, > >>>> Robert > >>>> > >>>> --- > >>>> Existing: > >>>> unpredictableStringsDo: aBlock > >>>> "Enumerate sources of information from my environment that > should > >>>> be generally hard to guess." > >>>> | time | > >>>> time := Time millisecondsToRun: > >>>> [ aBlock > >>>> value: World imageForm bits compressToByteArray ; > >>>> value: Sensor mousePoint x asString ; > >>>> value: Sensor mousePoint y asString ; > >>>> value: Time millisecondClockValue asByteArray ; > >>>> value: Date today asString ; > >>>> value: Time now asString ; > >>>> value: Display extent asString. > >>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>> #(vmVersion platformName primVmPath imageName > platformSubtype > >>>> datedVersion lastQuitLogPosition vmStatisticsReportString > >>>> imageName) > >>>> collect: > >>>> [ : each | > >>>> aBlock value: (SmalltalkImage current perform: each) > asByteArray > >>>> ] ]. > >>>> aBlock > >>>> value: time asByteArray; > >>>> "maybe the pointer has moved, hit it again." > >>>> value: Sensor mousePoint asString ; > >>>> value: Time millisecondClockValue asByteArray > >>>> > >>>> --- > >>>> Pharo port: > >>>> unpredictableStringsDo: aBlock > >>>> "Enumerate sources of information from my environment that > should > >>>> be generally hard to guess." > >>>> > >>>> | time | > >>>> time := Time millisecondsToRun: > >>>> [ aBlock > >>>> value: Time millisecondClockValue asByteArray ; > >>>> value: Date today asString ; > >>>> value: Time now asString. > >>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>> #(version primImagePath imagePath datedVersion > >>>> lastQuitLogPosition) > >>>> collect: > >>>> [ : each | > >>>> aBlock value: (SmalltalkImage current perform: each) > asByteArray > >>>> ] ]. > >>>> aBlock > >>>> value: time asByteArray; > >>>> value: Time millisecondClockValue asByteArray > >>>> > >>>> > >>>> On 10/18/2015 04:23 AM, Robert Withers wrote: > >>>>> This is a message intended for anyone who was on the Cryptography > team. > >>>>> I recently ported it to Pharo and had to make changes to > >>>> RandomGenerator > >>>>> class>>unpredictableStringsDo:. This certainly removed some > >>>>> class>>uncertainty > >>>>> from the results of this message. My question is what should I do > >>>>> about that? This method seems to require non-headless, as it is > >>>>> checking the mouse point and such. This being a crypto > >>>>> cornerstone, what the best answer here. > >>>>> > >>>>> Thank you, > >>>>> Robert > >>> > >>> > >>> > >> > > ----------------------------------------------------------- > > Louis LaBrunda > > Keystone Software Corp. > > SkypeMe callto://PhotonDemon > > mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com > > > > From tim at rowledge.org Mon Oct 19 18:32:02 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 19 18:32:08 2015 Subject: [squeak-dev] Re: why cannot the Shift+Tab key be detected? In-Reply-To: References: <1445273305812-4856519.post@n4.nabble.com> Message-ID: <97FB8FD7-B56E-47C0-B629-0AD3143CD5F8@rowledge.org> > On 19-10-2015, at 11:23 AM, Chris Muller wrote: > > Well, we may have a VM bug then. I just booted my laptop into in Windows and that Squeak VM was able to detect Shift+Tab. However, back in Linux VM (both Cog and Spur 3427), Shift+Tab is not even detected by Sensor. > > I went into GEdit of Ubuntu and Shift+Tab works there... > > Eliot, could this be a bug in the Linux VM? The most likely place for a problem would be the platforms/unix/sqWindows.c (or maybe sqEvents.c ?) since the interpreter and cog trees are not currently in sync. If a change to make tab get handled was put into the interpreter tree it may very well have not made it to cog yet. It?s even possible that the combination simply doesn?t get handled by the OS keyboard handler; I?ve seen siilar problems before now. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Ignoranus (n): A person who's both stupid and an asshole. From asqueaker at gmail.com Mon Oct 19 18:34:46 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Oct 19 18:34:49 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: References: <562279bb.a976c20a.f2371.6d0eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > I quite like being able to make several changes within the same minute because I can tell that they were related > changes. With second granularity I have no chance. Just truncate the timeStamps to whatever granularity you want to group by.. DateAndTime now asDuration truncateTo: 1 minute > Do you have a programmatic reason for wanting second granularity? I thought his case sounds compelling. Is there any harm to have finer granularity? > What to others think? Are there workflow implications to the granularity of time stamps? From asqueaker at gmail.com Mon Oct 19 18:38:30 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Oct 19 18:38:32 2015 Subject: [squeak-dev] Re: why cannot the Shift+Tab key be detected? In-Reply-To: <97FB8FD7-B56E-47C0-B629-0AD3143CD5F8@rowledge.org> References: <1445273305812-4856519.post@n4.nabble.com> <97FB8FD7-B56E-47C0-B629-0AD3143CD5F8@rowledge.org> Message-ID: > It?s even possible that the combination simply doesn?t get handled by the OS keyboard handler; I?ve seen siilar > problems before now. I wondered that too, which is why I verified it working in GEdit... From robert.w.withers at gmail.com Mon Oct 19 18:42:27 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 18:42:31 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> Message-ID: <56253993.3000706@gmail.com> hey Ron, It was actually the Pharo Cryptography team I was thinking of. Perhaps we can get the same package to work in both squeak and Pharo, with use of installable entropy sources or the like. In order to get SqueakElib running in Pharo I need crypto and we may as well do it right. Cheers, Robert On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: > Hi Robert, > > You are already on the Cryptograph repo on SqueakSource.com as an admin. > Please feel free to reorg if you like. > > Let me know if you have trouble resurrecting your account. > > All the best, > > Ron > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of Robert Withers >> Sent: Monday, October 19, 2015 1:53 PM >> To: squeak-dev@lists.squeakfoundation.org >> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> This is great guys. Is there a way to get this from the image? Good to get > it >> with an FFI/OSProcess call or something. >> >> Thank you, >> Robert >> >> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>> Hi Guys, >>> >>> How about getting the CPU temperature. I think most CPUs support >>> "Digital Thermal Sensor" (I'm not sure about ARM). I think it is >>> seven bits. The real range should be less than that but it may be >>> enough to help add some entropy. >>> >>> Lou >>> >>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>> wrote: >>> >>>> Hi Ron , nice to see you too! It has been a number of years, hasn't it? >>>> Crypto is timestamped back in 2010, so there is is. I hope these have >>>> been kind years to you, as they have for me. >>>> >>>> I love the idea of optional sources of entropy, depending on the >>>> deployed capabilities. So there are our mouse points and such, >>>> because they ought to be optional. >>>> >>>> What are some reliably present sources in the most minimal situation? >>>> If we could define minimal as an image with no image level I/O beyond >>>> file I/O, I would think we'd have: Kernel, System, Collections, >>>> Compiler and FFI. Some intransitives in that scope for entropy would be >> grand. >>>> >>>> I was thinking to take 5 millisecondClockValues, separated by 4 >>>> non-secure random intervals: take the low order byte of the 4 >>>> intervals and reverse & concat them, as a entropic source. >>>> >>>> I can coordinate these changes. Ron, could you add me to the >>>> Cryptography team so I can upload the Pharo Cryptography >> #bleedingEdge? >>>> >>>> Thanks and I look forward to more, :) >>>> >>>> Robert >>>> >>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>> Hi Robert, >>>>> >>>>> Nice to see you! >>>>> >>>>> Looks interesting I know that Chris did something gathering sources of >> entropy. Seems like the more the better. Could you just make the entropy >> sources optional such that if they exist we use them? I would have to go >> back and see what Chris did but he was following suggestions from >> Schneider in his secureRandom. >>>>> >>>>> All the best, >>>>> >>>>> Ron Teitelbaum >>>>> >>>>>> -----Original Message----- >>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>> Behalf Of Robert Withers >>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>> To: The general-purpose Squeak developers list; Pharo Development >>>>>> List >>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>> RandomGenerator >>>>>> class>>unpredictableStringsDo: >>>>>> >>>>>> I'm sorry, I forgot the code. I list the existing method, followed >>>>>> by my modified Pharo method below. I welcome any feedback. >>>>>> >>>>>> Regards, >>>>>> Robert >>>>>> >>>>>> --- >>>>>> Existing: >>>>>> unpredictableStringsDo: aBlock >>>>>> "Enumerate sources of information from my environment that >> should >>>>>> be generally hard to guess." >>>>>> | time | >>>>>> time := Time millisecondsToRun: >>>>>> [ aBlock >>>>>> value: World imageForm bits compressToByteArray ; >>>>>> value: Sensor mousePoint x asString ; >>>>>> value: Sensor mousePoint y asString ; >>>>>> value: Time millisecondClockValue asByteArray ; >>>>>> value: Date today asString ; >>>>>> value: Time now asString ; >>>>>> value: Display extent asString. >>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>> #(vmVersion platformName primVmPath imageName >> platformSubtype >>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>> imageName) >>>>>> collect: >>>>>> [ : each | >>>>>> aBlock value: (SmalltalkImage current perform: each) >> asByteArray >>>>>> ] ]. >>>>>> aBlock >>>>>> value: time asByteArray; >>>>>> "maybe the pointer has moved, hit it again." >>>>>> value: Sensor mousePoint asString ; >>>>>> value: Time millisecondClockValue asByteArray >>>>>> >>>>>> --- >>>>>> Pharo port: >>>>>> unpredictableStringsDo: aBlock >>>>>> "Enumerate sources of information from my environment that >> should >>>>>> be generally hard to guess." >>>>>> >>>>>> | time | >>>>>> time := Time millisecondsToRun: >>>>>> [ aBlock >>>>>> value: Time millisecondClockValue asByteArray ; >>>>>> value: Date today asString ; >>>>>> value: Time now asString. >>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>> #(version primImagePath imagePath datedVersion >>>>>> lastQuitLogPosition) >>>>>> collect: >>>>>> [ : each | >>>>>> aBlock value: (SmalltalkImage current perform: each) >> asByteArray >>>>>> ] ]. >>>>>> aBlock >>>>>> value: time asByteArray; >>>>>> value: Time millisecondClockValue asByteArray >>>>>> >>>>>> >>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>> This is a message intended for anyone who was on the Cryptography >> team. >>>>>>> I recently ported it to Pharo and had to make changes to >>>>>> RandomGenerator >>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>> class>>uncertainty >>>>>>> from the results of this message. My question is what should I do >>>>>>> about that? This method seems to require non-headless, as it is >>>>>>> checking the mouse point and such. This being a crypto >>>>>>> cornerstone, what the best answer here. >>>>>>> >>>>>>> Thank you, >>>>>>> Robert >>>>> >>>>> >>>>> >>>> >>> ----------------------------------------------------------- >>> Louis LaBrunda >>> Keystone Software Corp. >>> SkypeMe callto://PhotonDemon >>> mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com >>> >>> > > > From asqueaker at gmail.com Mon Oct 19 18:46:55 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Oct 19 18:46:58 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <56253993.3000706@gmail.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> Message-ID: Yes, if a common package for both Squeak and Pharo is possible, that'd be great. Otherwise, the Squeak and Pharo versions should reside in separate repositories. Squeak users are still using squeaksource.com, Pharo moved to smalltalkhub and beyond.. On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers wrote: > hey Ron, > > It was actually the Pharo Cryptography team I was thinking of. Perhaps we > can get the same package to work in both squeak and Pharo, with use of > installable entropy sources or the like. In order to get SqueakElib running > in Pharo I need crypto and we may as well do it right. > > Cheers, > Robert > > > On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >> >> Hi Robert, >> >> You are already on the Cryptograph repo on SqueakSource.com as an admin. >> Please feel free to reorg if you like. >> >> Let me know if you have trouble resurrecting your account. >> >> All the best, >> >> Ron >> >>> -----Original Message----- >>> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >>> bounces@lists.squeakfoundation.org] On Behalf Of Robert Withers >>> Sent: Monday, October 19, 2015 1:53 PM >>> To: squeak-dev@lists.squeakfoundation.org >>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] >>> RandomGenerator class>>unpredictableStringsDo: >>> >>> This is great guys. Is there a way to get this from the image? Good to >>> get >> >> it >>> >>> with an FFI/OSProcess call or something. >>> >>> Thank you, >>> Robert >>> >>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>> >>>> Hi Guys, >>>> >>>> How about getting the CPU temperature. I think most CPUs support >>>> "Digital Thermal Sensor" (I'm not sure about ARM). I think it is >>>> seven bits. The real range should be less than that but it may be >>>> enough to help add some entropy. >>>> >>>> Lou >>>> >>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>> wrote: >>>> >>>>> Hi Ron , nice to see you too! It has been a number of years, hasn't it? >>>>> Crypto is timestamped back in 2010, so there is is. I hope these have >>>>> been kind years to you, as they have for me. >>>>> >>>>> I love the idea of optional sources of entropy, depending on the >>>>> deployed capabilities. So there are our mouse points and such, >>>>> because they ought to be optional. >>>>> >>>>> What are some reliably present sources in the most minimal situation? >>>>> If we could define minimal as an image with no image level I/O beyond >>>>> file I/O, I would think we'd have: Kernel, System, Collections, >>>>> Compiler and FFI. Some intransitives in that scope for entropy would be >>> >>> grand. >>>>> >>>>> >>>>> I was thinking to take 5 millisecondClockValues, separated by 4 >>>>> non-secure random intervals: take the low order byte of the 4 >>>>> intervals and reverse & concat them, as a entropic source. >>>>> >>>>> I can coordinate these changes. Ron, could you add me to the >>>>> Cryptography team so I can upload the Pharo Cryptography >>> >>> #bleedingEdge? >>>>> >>>>> >>>>> Thanks and I look forward to more, :) >>>>> >>>>> Robert >>>>> >>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>> >>>>>> Hi Robert, >>>>>> >>>>>> Nice to see you! >>>>>> >>>>>> Looks interesting I know that Chris did something gathering sources of >>> >>> entropy. Seems like the more the better. Could you just make the >>> entropy >>> sources optional such that if they exist we use them? I would have to go >>> back and see what Chris did but he was following suggestions from >>> Schneider in his secureRandom. >>>>>> >>>>>> >>>>>> All the best, >>>>>> >>>>>> Ron Teitelbaum >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>>> Behalf Of Robert Withers >>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>> To: The general-purpose Squeak developers list; Pharo Development >>>>>>> List >>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>> RandomGenerator >>>>>>> class>>unpredictableStringsDo: >>>>>>> >>>>>>> I'm sorry, I forgot the code. I list the existing method, followed >>>>>>> by my modified Pharo method below. I welcome any feedback. >>>>>>> >>>>>>> Regards, >>>>>>> Robert >>>>>>> >>>>>>> --- >>>>>>> Existing: >>>>>>> unpredictableStringsDo: aBlock >>>>>>> "Enumerate sources of information from my environment that >>> >>> should >>>>>>> >>>>>>> be generally hard to guess." >>>>>>> | time | >>>>>>> time := Time millisecondsToRun: >>>>>>> [ aBlock >>>>>>> value: World imageForm bits >>>>>>> compressToByteArray ; >>>>>>> value: Sensor mousePoint x asString ; >>>>>>> value: Sensor mousePoint y asString ; >>>>>>> value: Time millisecondClockValue asByteArray >>>>>>> ; >>>>>>> value: Date today asString ; >>>>>>> value: Time now asString ; >>>>>>> value: Display extent asString. >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>> #(vmVersion platformName primVmPath imageName >>> >>> platformSubtype >>>>>>> >>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>> imageName) >>>>>>> collect: >>>>>>> [ : each | >>>>>>> aBlock value: (SmalltalkImage current >>>>>>> perform: each) >>> >>> asByteArray >>>>>>> >>>>>>> ] ]. >>>>>>> aBlock >>>>>>> value: time asByteArray; >>>>>>> "maybe the pointer has moved, hit it again." >>>>>>> value: Sensor mousePoint asString ; >>>>>>> value: Time millisecondClockValue asByteArray >>>>>>> >>>>>>> --- >>>>>>> Pharo port: >>>>>>> unpredictableStringsDo: aBlock >>>>>>> "Enumerate sources of information from my environment that >>> >>> should >>>>>>> >>>>>>> be generally hard to guess." >>>>>>> >>>>>>> | time | >>>>>>> time := Time millisecondsToRun: >>>>>>> [ aBlock >>>>>>> value: Time millisecondClockValue asByteArray >>>>>>> ; >>>>>>> value: Date today asString ; >>>>>>> value: Time now asString. >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>> #(version primImagePath imagePath datedVersion >>>>>>> lastQuitLogPosition) >>>>>>> collect: >>>>>>> [ : each | >>>>>>> aBlock value: (SmalltalkImage current >>>>>>> perform: each) >>> >>> asByteArray >>>>>>> >>>>>>> ] ]. >>>>>>> aBlock >>>>>>> value: time asByteArray; >>>>>>> value: Time millisecondClockValue asByteArray >>>>>>> >>>>>>> >>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>> >>>>>>>> This is a message intended for anyone who was on the Cryptography >>> >>> team. >>>>>>>> >>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>> >>>>>>> RandomGenerator >>>>>>>> >>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>>> class>>uncertainty >>>>>>>> from the results of this message. My question is what should I do >>>>>>>> about that? This method seems to require non-headless, as it is >>>>>>>> checking the mouse point and such. This being a crypto >>>>>>>> cornerstone, what the best answer here. >>>>>>>> >>>>>>>> Thank you, >>>>>>>> Robert >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> ----------------------------------------------------------- >>>> Louis LaBrunda >>>> Keystone Software Corp. >>>> SkypeMe callto://PhotonDemon >>>> mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com >>>> >>>> >> >> >> > From ma.chris.m at gmail.com Mon Oct 19 19:32:37 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Oct 19 19:33:18 2015 Subject: [squeak-dev] MVC in trunk --> emergency evaluator Message-ID: One of our recent changes must've broken something in MVC, because attempting to open a browser in there results in a EE with the top of the stack showing: DNU: Preferences class>>uniformWindowColors From ron at usmedrec.com Mon Oct 19 19:39:57 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Oct 19 19:40:03 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> Message-ID: <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> Hi All, Unless someone filed the proper paperwork I would suggest NOT moving the cryptography code anywhere except for SqueakSource. When we started the project we spent time ensuring that we had a proper exemption from the U.S. regulations on exporting cryptographic code. If someone copied and forked the code that exemption may not still apply to that new repository. I'm not personally involved with the code on Pharo, not sure who is doing crypto there. All the best, Ron > -----Original Message----- > From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of > Chris Muller > Sent: Monday, October 19, 2015 2:47 PM > To: The general-purpose Squeak developers list > Cc: Pharo Development List > Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > RandomGenerator class>>unpredictableStringsDo: > > Yes, if a common package for both Squeak and Pharo is possible, that'd be > great. Otherwise, the Squeak and Pharo versions should reside in separate > repositories. Squeak users are still using squeaksource.com, Pharo moved to > smalltalkhub and beyond.. > > On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers > wrote: > > hey Ron, > > > > It was actually the Pharo Cryptography team I was thinking of. Perhaps > > we can get the same package to work in both squeak and Pharo, with use > > of installable entropy sources or the like. In order to get SqueakElib > > running in Pharo I need crypto and we may as well do it right. > > > > Cheers, > > Robert > > > > > > On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: > >> > >> Hi Robert, > >> > >> You are already on the Cryptograph repo on SqueakSource.com as an > admin. > >> Please feel free to reorg if you like. > >> > >> Let me know if you have trouble resurrecting your account. > >> > >> All the best, > >> > >> Ron > >> > >>> -----Original Message----- > >>> From: squeak-dev-bounces@lists.squeakfoundation.org > >>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of > >>> Robert Withers > >>> Sent: Monday, October 19, 2015 1:53 PM > >>> To: squeak-dev@lists.squeakfoundation.org > >>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] > >>> RandomGenerator class>>unpredictableStringsDo: > >>> > >>> This is great guys. Is there a way to get this from the image? Good > >>> to get > >> > >> it > >>> > >>> with an FFI/OSProcess call or something. > >>> > >>> Thank you, > >>> Robert > >>> > >>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > >>>> > >>>> Hi Guys, > >>>> > >>>> How about getting the CPU temperature. I think most CPUs support > >>>> "Digital Thermal Sensor" (I'm not sure about ARM). I think it is > >>>> seven bits. The real range should be less than that but it may be > >>>> enough to help add some entropy. > >>>> > >>>> Lou > >>>> > >>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > >>>> wrote: > >>>> > >>>>> Hi Ron , nice to see you too! It has been a number of years, hasn't it? > >>>>> Crypto is timestamped back in 2010, so there is is. I hope these > >>>>> have been kind years to you, as they have for me. > >>>>> > >>>>> I love the idea of optional sources of entropy, depending on the > >>>>> deployed capabilities. So there are our mouse points and such, > >>>>> because they ought to be optional. > >>>>> > >>>>> What are some reliably present sources in the most minimal > situation? > >>>>> If we could define minimal as an image with no image level I/O > >>>>> beyond file I/O, I would think we'd have: Kernel, System, > >>>>> Collections, Compiler and FFI. Some intransitives in that scope > >>>>> for entropy would be > >>> > >>> grand. > >>>>> > >>>>> > >>>>> I was thinking to take 5 millisecondClockValues, separated by 4 > >>>>> non-secure random intervals: take the low order byte of the 4 > >>>>> intervals and reverse & concat them, as a entropic source. > >>>>> > >>>>> I can coordinate these changes. Ron, could you add me to the > >>>>> Cryptography team so I can upload the Pharo Cryptography > >>> > >>> #bleedingEdge? > >>>>> > >>>>> > >>>>> Thanks and I look forward to more, :) > >>>>> > >>>>> Robert > >>>>> > >>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > >>>>>> > >>>>>> Hi Robert, > >>>>>> > >>>>>> Nice to see you! > >>>>>> > >>>>>> Looks interesting I know that Chris did something gathering > >>>>>> sources of > >>> > >>> entropy. Seems like the more the better. Could you just make the > >>> entropy sources optional such that if they exist we use them? I > >>> would have to go back and see what Chris did but he was following > >>> suggestions from Schneider in his secureRandom. > >>>>>> > >>>>>> > >>>>>> All the best, > >>>>>> > >>>>>> Ron Teitelbaum > >>>>>> > >>>>>>> -----Original Message----- > >>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On > >>>>>>> Behalf Of Robert Withers > >>>>>>> Sent: Sunday, October 18, 2015 5:00 AM > >>>>>>> To: The general-purpose Squeak developers list; Pharo > >>>>>>> Development List > >>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] > >>>>>>> RandomGenerator > >>>>>>> class>>unpredictableStringsDo: > >>>>>>> > >>>>>>> I'm sorry, I forgot the code. I list the existing method, > >>>>>>> followed by my modified Pharo method below. I welcome any > feedback. > >>>>>>> > >>>>>>> Regards, > >>>>>>> Robert > >>>>>>> > >>>>>>> --- > >>>>>>> Existing: > >>>>>>> unpredictableStringsDo: aBlock > >>>>>>> "Enumerate sources of information from my environment > >>>>>>> that > >>> > >>> should > >>>>>>> > >>>>>>> be generally hard to guess." > >>>>>>> | time | > >>>>>>> time := Time millisecondsToRun: > >>>>>>> [ aBlock > >>>>>>> value: World imageForm bits > >>>>>>> compressToByteArray ; > >>>>>>> value: Sensor mousePoint x asString ; > >>>>>>> value: Sensor mousePoint y asString ; > >>>>>>> value: Time millisecondClockValue > >>>>>>> asByteArray ; > >>>>>>> value: Date today asString ; > >>>>>>> value: Time now asString ; > >>>>>>> value: Display extent asString. > >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>> #(vmVersion platformName primVmPath imageName > >>> > >>> platformSubtype > >>>>>>> > >>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString > >>>>>>> imageName) > >>>>>>> collect: > >>>>>>> [ : each | > >>>>>>> aBlock value: (SmalltalkImage current > >>>>>>> perform: each) > >>> > >>> asByteArray > >>>>>>> > >>>>>>> ] ]. > >>>>>>> aBlock > >>>>>>> value: time asByteArray; > >>>>>>> "maybe the pointer has moved, hit it again." > >>>>>>> value: Sensor mousePoint asString ; > >>>>>>> value: Time millisecondClockValue asByteArray > >>>>>>> > >>>>>>> --- > >>>>>>> Pharo port: > >>>>>>> unpredictableStringsDo: aBlock > >>>>>>> "Enumerate sources of information from my environment > >>>>>>> that > >>> > >>> should > >>>>>>> > >>>>>>> be generally hard to guess." > >>>>>>> > >>>>>>> | time | > >>>>>>> time := Time millisecondsToRun: > >>>>>>> [ aBlock > >>>>>>> value: Time millisecondClockValue > >>>>>>> asByteArray ; > >>>>>>> value: Date today asString ; > >>>>>>> value: Time now asString. > >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>> #(version primImagePath imagePath datedVersion > >>>>>>> lastQuitLogPosition) > >>>>>>> collect: > >>>>>>> [ : each | > >>>>>>> aBlock value: (SmalltalkImage current > >>>>>>> perform: each) > >>> > >>> asByteArray > >>>>>>> > >>>>>>> ] ]. > >>>>>>> aBlock > >>>>>>> value: time asByteArray; > >>>>>>> value: Time millisecondClockValue asByteArray > >>>>>>> > >>>>>>> > >>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: > >>>>>>>> > >>>>>>>> This is a message intended for anyone who was on the > >>>>>>>> Cryptography > >>> > >>> team. > >>>>>>>> > >>>>>>>> I recently ported it to Pharo and had to make changes to > >>>>>>> > >>>>>>> RandomGenerator > >>>>>>>> > >>>>>>>> class>>unpredictableStringsDo:. This certainly removed some > >>>>>>>> class>>uncertainty > >>>>>>>> from the results of this message. My question is what should I > >>>>>>>> do about that? This method seems to require non-headless, as it > >>>>>>>> is checking the mouse point and such. This being a crypto > >>>>>>>> cornerstone, what the best answer here. > >>>>>>>> > >>>>>>>> Thank you, > >>>>>>>> Robert > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>>> ----------------------------------------------------------- > >>>> Louis LaBrunda > >>>> Keystone Software Corp. > >>>> SkypeMe callto://PhotonDemon > >>>> mailto:Lou@Keystone-Software.com http://www.Keystone- > Software.com > >>>> > >>>> > >> > >> > >> > > From ma.chris.m at gmail.com Mon Oct 19 19:59:21 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Oct 19 20:00:04 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> Message-ID: Heh, well, since then SqueakSource itself was moved to a different server in a different country. I guess there was also a mirror of SqueakSource hosted in Chile under a different URL for many years. I'm doubtful any of it matters, but we wouldn't want anyone to end up in Gitmo over it. If you're uncomfortable about hosting a copy elsewhere, then please at least namespace-prefix the Pharo-specific packages, to at least help keep it from becoming a tangled mess. On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum wrote: > Hi All, > > Unless someone filed the proper paperwork I would suggest NOT moving the cryptography code anywhere except for SqueakSource. When we started the project we spent time ensuring that we had a proper exemption from the U.S. regulations on exporting cryptographic code. If someone copied and forked the code that exemption may not still apply to that new repository. > > I'm not personally involved with the code on Pharo, not sure who is doing crypto there. > > All the best, > > Ron > >> -----Original Message----- >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Chris Muller >> Sent: Monday, October 19, 2015 2:47 PM >> To: The general-purpose Squeak developers list >> Cc: Pharo Development List >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> Yes, if a common package for both Squeak and Pharo is possible, that'd be >> great. Otherwise, the Squeak and Pharo versions should reside in separate >> repositories. Squeak users are still using squeaksource.com, Pharo moved to >> smalltalkhub and beyond.. >> >> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >> wrote: >> > hey Ron, >> > >> > It was actually the Pharo Cryptography team I was thinking of. Perhaps >> > we can get the same package to work in both squeak and Pharo, with use >> > of installable entropy sources or the like. In order to get SqueakElib >> > running in Pharo I need crypto and we may as well do it right. >> > >> > Cheers, >> > Robert >> > >> > >> > On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >> >> >> >> Hi Robert, >> >> >> >> You are already on the Cryptograph repo on SqueakSource.com as an >> admin. >> >> Please feel free to reorg if you like. >> >> >> >> Let me know if you have trouble resurrecting your account. >> >> >> >> All the best, >> >> >> >> Ron >> >> >> >>> -----Original Message----- >> >>> From: squeak-dev-bounces@lists.squeakfoundation.org >> >>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of >> >>> Robert Withers >> >>> Sent: Monday, October 19, 2015 1:53 PM >> >>> To: squeak-dev@lists.squeakfoundation.org >> >>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] >> >>> RandomGenerator class>>unpredictableStringsDo: >> >>> >> >>> This is great guys. Is there a way to get this from the image? Good >> >>> to get >> >> >> >> it >> >>> >> >>> with an FFI/OSProcess call or something. >> >>> >> >>> Thank you, >> >>> Robert >> >>> >> >>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >> >>>> >> >>>> Hi Guys, >> >>>> >> >>>> How about getting the CPU temperature. I think most CPUs support >> >>>> "Digital Thermal Sensor" (I'm not sure about ARM). I think it is >> >>>> seven bits. The real range should be less than that but it may be >> >>>> enough to help add some entropy. >> >>>> >> >>>> Lou >> >>>> >> >>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >> >>>> wrote: >> >>>> >> >>>>> Hi Ron , nice to see you too! It has been a number of years, hasn't it? >> >>>>> Crypto is timestamped back in 2010, so there is is. I hope these >> >>>>> have been kind years to you, as they have for me. >> >>>>> >> >>>>> I love the idea of optional sources of entropy, depending on the >> >>>>> deployed capabilities. So there are our mouse points and such, >> >>>>> because they ought to be optional. >> >>>>> >> >>>>> What are some reliably present sources in the most minimal >> situation? >> >>>>> If we could define minimal as an image with no image level I/O >> >>>>> beyond file I/O, I would think we'd have: Kernel, System, >> >>>>> Collections, Compiler and FFI. Some intransitives in that scope >> >>>>> for entropy would be >> >>> >> >>> grand. >> >>>>> >> >>>>> >> >>>>> I was thinking to take 5 millisecondClockValues, separated by 4 >> >>>>> non-secure random intervals: take the low order byte of the 4 >> >>>>> intervals and reverse & concat them, as a entropic source. >> >>>>> >> >>>>> I can coordinate these changes. Ron, could you add me to the >> >>>>> Cryptography team so I can upload the Pharo Cryptography >> >>> >> >>> #bleedingEdge? >> >>>>> >> >>>>> >> >>>>> Thanks and I look forward to more, :) >> >>>>> >> >>>>> Robert >> >>>>> >> >>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >> >>>>>> >> >>>>>> Hi Robert, >> >>>>>> >> >>>>>> Nice to see you! >> >>>>>> >> >>>>>> Looks interesting I know that Chris did something gathering >> >>>>>> sources of >> >>> >> >>> entropy. Seems like the more the better. Could you just make the >> >>> entropy sources optional such that if they exist we use them? I >> >>> would have to go back and see what Chris did but he was following >> >>> suggestions from Schneider in his secureRandom. >> >>>>>> >> >>>>>> >> >>>>>> All the best, >> >>>>>> >> >>>>>> Ron Teitelbaum >> >>>>>> >> >>>>>>> -----Original Message----- >> >>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >> >>>>>>> Behalf Of Robert Withers >> >>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >> >>>>>>> To: The general-purpose Squeak developers list; Pharo >> >>>>>>> Development List >> >>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >> >>>>>>> RandomGenerator >> >>>>>>> class>>unpredictableStringsDo: >> >>>>>>> >> >>>>>>> I'm sorry, I forgot the code. I list the existing method, >> >>>>>>> followed by my modified Pharo method below. I welcome any >> feedback. >> >>>>>>> >> >>>>>>> Regards, >> >>>>>>> Robert >> >>>>>>> >> >>>>>>> --- >> >>>>>>> Existing: >> >>>>>>> unpredictableStringsDo: aBlock >> >>>>>>> "Enumerate sources of information from my environment >> >>>>>>> that >> >>> >> >>> should >> >>>>>>> >> >>>>>>> be generally hard to guess." >> >>>>>>> | time | >> >>>>>>> time := Time millisecondsToRun: >> >>>>>>> [ aBlock >> >>>>>>> value: World imageForm bits >> >>>>>>> compressToByteArray ; >> >>>>>>> value: Sensor mousePoint x asString ; >> >>>>>>> value: Sensor mousePoint y asString ; >> >>>>>>> value: Time millisecondClockValue >> >>>>>>> asByteArray ; >> >>>>>>> value: Date today asString ; >> >>>>>>> value: Time now asString ; >> >>>>>>> value: Display extent asString. >> >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >> >>>>>>> #(vmVersion platformName primVmPath imageName >> >>> >> >>> platformSubtype >> >>>>>>> >> >>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >> >>>>>>> imageName) >> >>>>>>> collect: >> >>>>>>> [ : each | >> >>>>>>> aBlock value: (SmalltalkImage current >> >>>>>>> perform: each) >> >>> >> >>> asByteArray >> >>>>>>> >> >>>>>>> ] ]. >> >>>>>>> aBlock >> >>>>>>> value: time asByteArray; >> >>>>>>> "maybe the pointer has moved, hit it again." >> >>>>>>> value: Sensor mousePoint asString ; >> >>>>>>> value: Time millisecondClockValue asByteArray >> >>>>>>> >> >>>>>>> --- >> >>>>>>> Pharo port: >> >>>>>>> unpredictableStringsDo: aBlock >> >>>>>>> "Enumerate sources of information from my environment >> >>>>>>> that >> >>> >> >>> should >> >>>>>>> >> >>>>>>> be generally hard to guess." >> >>>>>>> >> >>>>>>> | time | >> >>>>>>> time := Time millisecondsToRun: >> >>>>>>> [ aBlock >> >>>>>>> value: Time millisecondClockValue >> >>>>>>> asByteArray ; >> >>>>>>> value: Date today asString ; >> >>>>>>> value: Time now asString. >> >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >> >>>>>>> #(version primImagePath imagePath datedVersion >> >>>>>>> lastQuitLogPosition) >> >>>>>>> collect: >> >>>>>>> [ : each | >> >>>>>>> aBlock value: (SmalltalkImage current >> >>>>>>> perform: each) >> >>> >> >>> asByteArray >> >>>>>>> >> >>>>>>> ] ]. >> >>>>>>> aBlock >> >>>>>>> value: time asByteArray; >> >>>>>>> value: Time millisecondClockValue asByteArray >> >>>>>>> >> >>>>>>> >> >>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >> >>>>>>>> >> >>>>>>>> This is a message intended for anyone who was on the >> >>>>>>>> Cryptography >> >>> >> >>> team. >> >>>>>>>> >> >>>>>>>> I recently ported it to Pharo and had to make changes to >> >>>>>>> >> >>>>>>> RandomGenerator >> >>>>>>>> >> >>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >> >>>>>>>> class>>uncertainty >> >>>>>>>> from the results of this message. My question is what should I >> >>>>>>>> do about that? This method seems to require non-headless, as it >> >>>>>>>> is checking the mouse point and such. This being a crypto >> >>>>>>>> cornerstone, what the best answer here. >> >>>>>>>> >> >>>>>>>> Thank you, >> >>>>>>>> Robert >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>> >> >>>> ----------------------------------------------------------- >> >>>> Louis LaBrunda >> >>>> Keystone Software Corp. >> >>>> SkypeMe callto://PhotonDemon >> >>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >> Software.com >> >>>> >> >>>> >> >> >> >> >> >> >> > > > From commits at source.squeak.org Mon Oct 19 21:07:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:07:34 2015 Subject: [squeak-dev] The Trunk: Protocols-topa.52.mcz Message-ID: Tobias Pape uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-topa.52.mcz ==================== Summary ==================== Name: Protocols-topa.52 Author: topa Time: 19 October 2015, 11:07:26.755 pm UUID: 70a20162-a6a1-4af7-96a1-a5e420abb5d5 Ancestors: Protocols-cmm.51 Remove a deprecated #upTo: on a String =============== Diff against Protocols-cmm.51 =============== Item was changed: ----- Method: Lexicon>>selectWithinCurrentCategoryIfPossible: (in category 'category list') ----- selectWithinCurrentCategoryIfPossible: aSelector "If the receiver's message list contains aSelector, navigate right to it without changing categories" | detectedItem messageIndex | aSelector ifNil: [^ self]. detectedItem := messageList detect: + [:anItem | (anItem asString copyUpTo: $ ) asSymbol == aSelector] ifNone: [^ self]. - [:anItem | (anItem asString upTo: $ ) asSymbol == aSelector] ifNone: [^ self]. messageIndex := messageList indexOf: detectedItem. self messageListIndex: messageIndex ! From ron at usmedrec.com Mon Oct 19 21:17:45 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Oct 19 21:17:54 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> Message-ID: <00e601d10ab3$9a100560$ce301020$@usmedrec.com> Hi Chris, The exemption is not for the location of the server but the URL where it is hosted. I'm happy to help in any way I can but I don't have access to the Pharo Repos. I have no issue with having Pharo packages on SqueakSource if that is what everyone agrees too. We have multiple packages hosted there. It's ok with me if we host some pharo code there too. All the best, Ron > -----Original Message----- > From: Chris Muller [mailto:ma.chris.m@gmail.com] > Sent: Monday, October 19, 2015 3:59 PM > To: Ron Teitelbaum > Cc: Pharo Development List; The general-purpose Squeak developers list > Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > RandomGenerator class>>unpredictableStringsDo: > > Heh, well, since then SqueakSource itself was moved to a different server in > a different country. I guess there was also a mirror of SqueakSource hosted > in Chile under a different URL for many years. > > I'm doubtful any of it matters, but we wouldn't want anyone to end up in > Gitmo over it. If you're uncomfortable about hosting a copy elsewhere, then > please at least namespace-prefix the Pharo-specific packages, to at least help > keep it from becoming a tangled mess. > > On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum > wrote: > > Hi All, > > > > Unless someone filed the proper paperwork I would suggest NOT moving > the cryptography code anywhere except for SqueakSource. When we started > the project we spent time ensuring that we had a proper exemption from > the U.S. regulations on exporting cryptographic code. If someone copied > and forked the code that exemption may not still apply to that new > repository. > > > > I'm not personally involved with the code on Pharo, not sure who is doing > crypto there. > > > > All the best, > > > > Ron > > > >> -----Original Message----- > >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf > >> Of Chris Muller > >> Sent: Monday, October 19, 2015 2:47 PM > >> To: The general-purpose Squeak developers list > >> Cc: Pharo Development List > >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > >> RandomGenerator class>>unpredictableStringsDo: > >> > >> Yes, if a common package for both Squeak and Pharo is possible, > >> that'd be great. Otherwise, the Squeak and Pharo versions should > >> reside in separate repositories. Squeak users are still using > >> squeaksource.com, Pharo moved to smalltalkhub and beyond.. > >> > >> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers > >> wrote: > >> > hey Ron, > >> > > >> > It was actually the Pharo Cryptography team I was thinking of. > >> > Perhaps we can get the same package to work in both squeak and > >> > Pharo, with use of installable entropy sources or the like. In > >> > order to get SqueakElib running in Pharo I need crypto and we may as > well do it right. > >> > > >> > Cheers, > >> > Robert > >> > > >> > > >> > On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: > >> >> > >> >> Hi Robert, > >> >> > >> >> You are already on the Cryptograph repo on SqueakSource.com as an > >> admin. > >> >> Please feel free to reorg if you like. > >> >> > >> >> Let me know if you have trouble resurrecting your account. > >> >> > >> >> All the best, > >> >> > >> >> Ron > >> >> > >> >>> -----Original Message----- > >> >>> From: squeak-dev-bounces@lists.squeakfoundation.org > >> >>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf > >> >>> Of Robert Withers > >> >>> Sent: Monday, October 19, 2015 1:53 PM > >> >>> To: squeak-dev@lists.squeakfoundation.org > >> >>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to > >> >>> Pharo] RandomGenerator class>>unpredictableStringsDo: > >> >>> > >> >>> This is great guys. Is there a way to get this from the image? > >> >>> Good to get > >> >> > >> >> it > >> >>> > >> >>> with an FFI/OSProcess call or something. > >> >>> > >> >>> Thank you, > >> >>> Robert > >> >>> > >> >>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > >> >>>> > >> >>>> Hi Guys, > >> >>>> > >> >>>> How about getting the CPU temperature. I think most CPUs > >> >>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I > >> >>>> think it is seven bits. The real range should be less than that > >> >>>> but it may be enough to help add some entropy. > >> >>>> > >> >>>> Lou > >> >>>> > >> >>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > >> >>>> wrote: > >> >>>> > >> >>>>> Hi Ron , nice to see you too! It has been a number of years, hasn't > it? > >> >>>>> Crypto is timestamped back in 2010, so there is is. I hope > >> >>>>> these have been kind years to you, as they have for me. > >> >>>>> > >> >>>>> I love the idea of optional sources of entropy, depending on > >> >>>>> the deployed capabilities. So there are our mouse points and > >> >>>>> such, because they ought to be optional. > >> >>>>> > >> >>>>> What are some reliably present sources in the most minimal > >> situation? > >> >>>>> If we could define minimal as an image with no image level I/O > >> >>>>> beyond file I/O, I would think we'd have: Kernel, System, > >> >>>>> Collections, Compiler and FFI. Some intransitives in that scope > >> >>>>> for entropy would be > >> >>> > >> >>> grand. > >> >>>>> > >> >>>>> > >> >>>>> I was thinking to take 5 millisecondClockValues, separated by 4 > >> >>>>> non-secure random intervals: take the low order byte of the 4 > >> >>>>> intervals and reverse & concat them, as a entropic source. > >> >>>>> > >> >>>>> I can coordinate these changes. Ron, could you add me to the > >> >>>>> Cryptography team so I can upload the Pharo Cryptography > >> >>> > >> >>> #bleedingEdge? > >> >>>>> > >> >>>>> > >> >>>>> Thanks and I look forward to more, :) > >> >>>>> > >> >>>>> Robert > >> >>>>> > >> >>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > >> >>>>>> > >> >>>>>> Hi Robert, > >> >>>>>> > >> >>>>>> Nice to see you! > >> >>>>>> > >> >>>>>> Looks interesting I know that Chris did something gathering > >> >>>>>> sources of > >> >>> > >> >>> entropy. Seems like the more the better. Could you just make > >> >>> the entropy sources optional such that if they exist we use them? > >> >>> I would have to go back and see what Chris did but he was > >> >>> following suggestions from Schneider in his secureRandom. > >> >>>>>> > >> >>>>>> > >> >>>>>> All the best, > >> >>>>>> > >> >>>>>> Ron Teitelbaum > >> >>>>>> > >> >>>>>>> -----Original Message----- > >> >>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On > >> >>>>>>> Behalf Of Robert Withers > >> >>>>>>> Sent: Sunday, October 18, 2015 5:00 AM > >> >>>>>>> To: The general-purpose Squeak developers list; Pharo > >> >>>>>>> Development List > >> >>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] > >> >>>>>>> RandomGenerator > >> >>>>>>> class>>unpredictableStringsDo: > >> >>>>>>> > >> >>>>>>> I'm sorry, I forgot the code. I list the existing method, > >> >>>>>>> followed by my modified Pharo method below. I welcome any > >> feedback. > >> >>>>>>> > >> >>>>>>> Regards, > >> >>>>>>> Robert > >> >>>>>>> > >> >>>>>>> --- > >> >>>>>>> Existing: > >> >>>>>>> unpredictableStringsDo: aBlock > >> >>>>>>> "Enumerate sources of information from my environment > >> >>>>>>> that > >> >>> > >> >>> should > >> >>>>>>> > >> >>>>>>> be generally hard to guess." > >> >>>>>>> | time | > >> >>>>>>> time := Time millisecondsToRun: > >> >>>>>>> [ aBlock > >> >>>>>>> value: World imageForm bits > >> >>>>>>> compressToByteArray ; > >> >>>>>>> value: Sensor mousePoint x asString ; > >> >>>>>>> value: Sensor mousePoint y asString ; > >> >>>>>>> value: Time millisecondClockValue > >> >>>>>>> asByteArray ; > >> >>>>>>> value: Date today asString ; > >> >>>>>>> value: Time now asString ; > >> >>>>>>> value: Display extent asString. > >> >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >> >>>>>>> #(vmVersion platformName primVmPath imageName > >> >>> > >> >>> platformSubtype > >> >>>>>>> > >> >>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString > >> >>>>>>> imageName) > >> >>>>>>> collect: > >> >>>>>>> [ : each | > >> >>>>>>> aBlock value: (SmalltalkImage current > >> >>>>>>> perform: each) > >> >>> > >> >>> asByteArray > >> >>>>>>> > >> >>>>>>> ] ]. > >> >>>>>>> aBlock > >> >>>>>>> value: time asByteArray; > >> >>>>>>> "maybe the pointer has moved, hit it again." > >> >>>>>>> value: Sensor mousePoint asString ; > >> >>>>>>> value: Time millisecondClockValue asByteArray > >> >>>>>>> > >> >>>>>>> --- > >> >>>>>>> Pharo port: > >> >>>>>>> unpredictableStringsDo: aBlock > >> >>>>>>> "Enumerate sources of information from my environment > >> >>>>>>> that > >> >>> > >> >>> should > >> >>>>>>> > >> >>>>>>> be generally hard to guess." > >> >>>>>>> > >> >>>>>>> | time | > >> >>>>>>> time := Time millisecondsToRun: > >> >>>>>>> [ aBlock > >> >>>>>>> value: Time millisecondClockValue > >> >>>>>>> asByteArray ; > >> >>>>>>> value: Date today asString ; > >> >>>>>>> value: Time now asString. > >> >>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >> >>>>>>> #(version primImagePath imagePath > >> >>>>>>> datedVersion > >> >>>>>>> lastQuitLogPosition) > >> >>>>>>> collect: > >> >>>>>>> [ : each | > >> >>>>>>> aBlock value: (SmalltalkImage current > >> >>>>>>> perform: each) > >> >>> > >> >>> asByteArray > >> >>>>>>> > >> >>>>>>> ] ]. > >> >>>>>>> aBlock > >> >>>>>>> value: time asByteArray; > >> >>>>>>> value: Time millisecondClockValue asByteArray > >> >>>>>>> > >> >>>>>>> > >> >>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: > >> >>>>>>>> > >> >>>>>>>> This is a message intended for anyone who was on the > >> >>>>>>>> Cryptography > >> >>> > >> >>> team. > >> >>>>>>>> > >> >>>>>>>> I recently ported it to Pharo and had to make changes to > >> >>>>>>> > >> >>>>>>> RandomGenerator > >> >>>>>>>> > >> >>>>>>>> class>>unpredictableStringsDo:. This certainly removed some > >> >>>>>>>> class>>uncertainty > >> >>>>>>>> from the results of this message. My question is what should > >> >>>>>>>> I do about that? This method seems to require non-headless, > >> >>>>>>>> as it is checking the mouse point and such. This being a > >> >>>>>>>> crypto cornerstone, what the best answer here. > >> >>>>>>>> > >> >>>>>>>> Thank you, > >> >>>>>>>> Robert > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>>> > >> >>>>> > >> >>>> ----------------------------------------------------------- > >> >>>> Louis LaBrunda > >> >>>> Keystone Software Corp. > >> >>>> SkypeMe callto://PhotonDemon > >> >>>> mailto:Lou@Keystone-Software.com http://www.Keystone- > >> Software.com > >> >>>> > >> >>>> > >> >> > >> >> > >> >> > >> > > > > > From robert.w.withers at gmail.com Mon Oct 19 21:27:05 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 21:27:11 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <00e601d10ab3$9a100560$ce301020$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> Message-ID: <56256029.6030905@gmail.com> Ron, would it be an easy process to add a second URL to the exception paperwork. Pharo does have new ideas about code storage and distribution that we would want to take advantage of. This would help a lot! Then again, screw their paperwork requirements of us. Put my name as responsible on the Pharo code and I'll take a trip to Cuba, if they need a scape goat for their 20th century thinking. Crypto is already out of the bag and everyone uses it freely. Just do it and ask permission later. In thinking about consolidating crypto code between squeak and pharo, I would guess there would be a thin capatibility layer for each system, then the Crypto code in the main. My goal is to have compatibility, crypto and plugins on both virtual platforms. Thanks so much ^^ Robert On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: > Hi Chris, > > The exemption is not for the location of the server but the URL where > it is hosted. I'm happy to help in any way I can but I don't have > access to the Pharo Repos. I have no issue with having Pharo > packages on SqueakSource if that is what everyone agrees too. We > have multiple packages hosted there. It's ok with me if we host some > pharo code there too. > > All the best, > > Ron > >> -----Original Message----- From: Chris Muller >> [mailto:ma.chris.m@gmail.com] Sent: Monday, October 19, 2015 3:59 >> PM To: Ron Teitelbaum Cc: Pharo Development List; The >> general-purpose Squeak developers list Subject: Re: [Pharo-dev] >> [squeak-dev] [Cryptography port to Pharo] RandomGenerator >> class>>unpredictableStringsDo: >> >> Heh, well, since then SqueakSource itself was moved to a different >> server in a different country. I guess there was also a mirror of >> SqueakSource hosted in Chile under a different URL for many years. >> >> I'm doubtful any of it matters, but we wouldn't want anyone to end >> up in Gitmo over it. If you're uncomfortable about hosting a copy >> elsewhere, then please at least namespace-prefix the Pharo-specific >> packages, to at least help keep it from becoming a tangled mess. >> >> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >> wrote: >>> Hi All, >>> >>> Unless someone filed the proper paperwork I would suggest NOT >>> moving >> the cryptography code anywhere except for SqueakSource. When we >> started the project we spent time ensuring that we had a proper >> exemption from the U.S. regulations on exporting cryptographic >> code. If someone copied and forked the code that exemption may not >> still apply to that new repository. >>> >>> I'm not personally involved with the code on Pharo, not sure who >>> is doing >> crypto there. >>> >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- From: Pharo-dev >>>> [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Chris >>>> Muller Sent: Monday, October 19, 2015 2:47 PM To: The >>>> general-purpose Squeak developers list Cc: Pharo Development >>>> List Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port >>>> to Pharo] RandomGenerator class>>unpredictableStringsDo: >>>> >>>> Yes, if a common package for both Squeak and Pharo is >>>> possible, that'd be great. Otherwise, the Squeak and Pharo >>>> versions should reside in separate repositories. Squeak users >>>> are still using squeaksource.com, Pharo moved to smalltalkhub >>>> and beyond.. >>>> >>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>> wrote: >>>>> hey Ron, >>>>> >>>>> It was actually the Pharo Cryptography team I was thinking >>>>> of. Perhaps we can get the same package to work in both >>>>> squeak and Pharo, with use of installable entropy sources or >>>>> the like. In order to get SqueakElib running in Pharo I need >>>>> crypto and we may as >> well do it right. >>>>> >>>>> Cheers, Robert >>>>> >>>>> >>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>> >>>>>> Hi Robert, >>>>>> >>>>>> You are already on the Cryptograph repo on SqueakSource.com >>>>>> as an >>>> admin. >>>>>> Please feel free to reorg if you like. >>>>>> >>>>>> Let me know if you have trouble resurrecting your account. >>>>>> >>>>>> All the best, >>>>>> >>>>>> Ron >>>>>> >>>>>>> -----Original Message----- From: >>>>>>> squeak-dev-bounces@lists.squeakfoundation.org >>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] >>>>>>> On Behalf Of Robert Withers Sent: Monday, October 19, >>>>>>> 2015 1:53 PM To: squeak-dev@lists.squeakfoundation.org >>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port >>>>>>> to Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>> >>>>>>> This is great guys. Is there a way to get this from the >>>>>>> image? Good to get >>>>>> >>>>>> it >>>>>>> >>>>>>> with an FFI/OSProcess call or something. >>>>>>> >>>>>>> Thank you, Robert >>>>>>> >>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>> >>>>>>>> Hi Guys, >>>>>>>> >>>>>>>> How about getting the CPU temperature. I think most >>>>>>>> CPUs support "Digital Thermal Sensor" (I'm not sure >>>>>>>> about ARM). I think it is seven bits. The real range >>>>>>>> should be less than that but it may be enough to help >>>>>>>> add some entropy. >>>>>>>> >>>>>>>> Lou >>>>>>>> >>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Ron , nice to see you too! It has been a number of >>>>>>>>> years, hasn't >> it? >>>>>>>>> Crypto is timestamped back in 2010, so there is is. I >>>>>>>>> hope these have been kind years to you, as they have >>>>>>>>> for me. >>>>>>>>> >>>>>>>>> I love the idea of optional sources of entropy, >>>>>>>>> depending on the deployed capabilities. So there are >>>>>>>>> our mouse points and such, because they ought to be >>>>>>>>> optional. >>>>>>>>> >>>>>>>>> What are some reliably present sources in the most >>>>>>>>> minimal >>>> situation? >>>>>>>>> If we could define minimal as an image with no image >>>>>>>>> level I/O beyond file I/O, I would think we'd have: >>>>>>>>> Kernel, System, Collections, Compiler and FFI. Some >>>>>>>>> intransitives in that scope for entropy would be >>>>>>> >>>>>>> grand. >>>>>>>>> >>>>>>>>> >>>>>>>>> I was thinking to take 5 millisecondClockValues, >>>>>>>>> separated by 4 non-secure random intervals: take the >>>>>>>>> low order byte of the 4 intervals and reverse & >>>>>>>>> concat them, as a entropic source. >>>>>>>>> >>>>>>>>> I can coordinate these changes. Ron, could you add me >>>>>>>>> to the Cryptography team so I can upload the Pharo >>>>>>>>> Cryptography >>>>>>> >>>>>>> #bleedingEdge? >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>> >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>> >>>>>>>>>> Hi Robert, >>>>>>>>>> >>>>>>>>>> Nice to see you! >>>>>>>>>> >>>>>>>>>> Looks interesting I know that Chris did something >>>>>>>>>> gathering sources of >>>>>>> >>>>>>> entropy. Seems like the more the better. Could you just >>>>>>> make the entropy sources optional such that if they exist >>>>>>> we use them? I would have to go back and see what Chris >>>>>>> did but he was following suggestions from Schneider in >>>>>>> his secureRandom. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> All the best, >>>>>>>>>> >>>>>>>>>> Ron Teitelbaum >>>>>>>>>> >>>>>>>>>>> -----Original Message----- From: Pharo-dev >>>>>>>>>>> [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>>>>>>> Behalf Of Robert Withers Sent: Sunday, October >>>>>>>>>>> 18, 2015 5:00 AM To: The general-purpose Squeak >>>>>>>>>>> developers list; Pharo Development List Subject: >>>>>>>>>>> Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>> RandomGenerator class>>unpredictableStringsDo: >>>>>>>>>>> >>>>>>>>>>> I'm sorry, I forgot the code. I list the existing >>>>>>>>>>> method, followed by my modified Pharo method >>>>>>>>>>> below. I welcome any >>>> feedback. >>>>>>>>>>> >>>>>>>>>>> Regards, Robert >>>>>>>>>>> >>>>>>>>>>> --- Existing: unpredictableStringsDo: aBlock >>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>> environment that >>>>>>> >>>>>>> should >>>>>>>>>>> >>>>>>>>>>> be generally hard to guess." | time | time := >>>>>>>>>>> Time millisecondsToRun: [ aBlock value: World >>>>>>>>>>> imageForm bits compressToByteArray ; value: >>>>>>>>>>> Sensor mousePoint x asString ; value: Sensor >>>>>>>>>>> mousePoint y asString ; value: Time >>>>>>>>>>> millisecondClockValue asByteArray ; value: Date >>>>>>>>>>> today asString ; value: Time now asString ; >>>>>>>>>>> value: Display extent asString. 100 timesRepeat: >>>>>>>>>>> [ aBlock value: UUID new ]. #(vmVersion >>>>>>>>>>> platformName primVmPath imageName >>>>>>> >>>>>>> platformSubtype >>>>>>>>>>> >>>>>>>>>>> datedVersion lastQuitLogPosition >>>>>>>>>>> vmStatisticsReportString imageName) collect: [ : >>>>>>>>>>> each | aBlock value: (SmalltalkImage current >>>>>>>>>>> perform: each) >>>>>>> >>>>>>> asByteArray >>>>>>>>>>> >>>>>>>>>>> ] ]. aBlock value: time asByteArray; "maybe the >>>>>>>>>>> pointer has moved, hit it again." value: Sensor >>>>>>>>>>> mousePoint asString ; value: Time >>>>>>>>>>> millisecondClockValue asByteArray >>>>>>>>>>> >>>>>>>>>>> --- Pharo port: unpredictableStringsDo: aBlock >>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>> environment that >>>>>>> >>>>>>> should >>>>>>>>>>> >>>>>>>>>>> be generally hard to guess." >>>>>>>>>>> >>>>>>>>>>> | time | time := Time millisecondsToRun: [ >>>>>>>>>>> aBlock value: Time millisecondClockValue >>>>>>>>>>> asByteArray ; value: Date today asString ; value: >>>>>>>>>>> Time now asString. 100 timesRepeat: [ aBlock >>>>>>>>>>> value: UUID new ]. #(version primImagePath >>>>>>>>>>> imagePath datedVersion lastQuitLogPosition) >>>>>>>>>>> collect: [ : each | aBlock value: (SmalltalkImage >>>>>>>>>>> current perform: each) >>>>>>> >>>>>>> asByteArray >>>>>>>>>>> >>>>>>>>>>> ] ]. aBlock value: time asByteArray; value: Time >>>>>>>>>>> millisecondClockValue asByteArray >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>> >>>>>>>>>>>> This is a message intended for anyone who was >>>>>>>>>>>> on the Cryptography >>>>>>> >>>>>>> team. >>>>>>>>>>>> >>>>>>>>>>>> I recently ported it to Pharo and had to make >>>>>>>>>>>> changes to >>>>>>>>>>> >>>>>>>>>>> RandomGenerator >>>>>>>>>>>> >>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly >>>>>>>>>>>> removed some class>>uncertainty from the >>>>>>>>>>>> results of this message. My question is what >>>>>>>>>>>> should I do about that? This method seems to >>>>>>>>>>>> require non-headless, as it is checking the >>>>>>>>>>>> mouse point and such. This being a crypto >>>>>>>>>>>> cornerstone, what the best answer here. >>>>>>>>>>>> >>>>>>>>>>>> Thank you, Robert >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> ----------------------------------------------------------- >>>>>>>> >>>>>>>> Louis LaBrunda >>>>>>>> Keystone Software Corp. SkypeMe callto://PhotonDemon >>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>> Software.com >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>> >>> > > From robert.w.withers at gmail.com Mon Oct 19 21:27:54 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 21:27:58 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <00e601d10ab3$9a100560$ce301020$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> Message-ID: <5625605A.3070100@gmail.com> (resending with Pharo list) Ron, would it be an easy process to add a second URL to the exception paperwork. Pharo does have new ideas about code storage and distribution that we would want to take advantage of. This would help a lot! Then again, screw their paperwork requirements of us. Put my name as responsible on the Pharo code and I'll take a trip to Cuba, if they need a scape goat for their 20th century thinking. Crypto is already out of the bag and everyone uses it freely. Just do it and ask permission later. In thinking about consolidating crypto code between squeak and pharo, I would guess there would be a thin capatibility layer for each system, then the Crypto code in the main. My goal is to have compatibility, crypto and plugins on both virtual platforms. Thanks so much ^^ Robert On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: > Hi Chris, > > The exemption is not for the location of the server but the URL where it is hosted. I'm happy to help in any way I can but I don't have access to the Pharo Repos. I have no issue with having Pharo packages on SqueakSource if that is what everyone agrees too. We have multiple packages hosted there. It's ok with me if we host some pharo code there too. > > All the best, > > Ron > >> -----Original Message----- >> From: Chris Muller [mailto:ma.chris.m@gmail.com] >> Sent: Monday, October 19, 2015 3:59 PM >> To: Ron Teitelbaum >> Cc: Pharo Development List; The general-purpose Squeak developers list >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> Heh, well, since then SqueakSource itself was moved to a different server in >> a different country. I guess there was also a mirror of SqueakSource hosted >> in Chile under a different URL for many years. >> >> I'm doubtful any of it matters, but we wouldn't want anyone to end up in >> Gitmo over it. If you're uncomfortable about hosting a copy elsewhere, then >> please at least namespace-prefix the Pharo-specific packages, to at least help >> keep it from becoming a tangled mess. >> >> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >> wrote: >>> Hi All, >>> >>> Unless someone filed the proper paperwork I would suggest NOT moving >> the cryptography code anywhere except for SqueakSource. When we started >> the project we spent time ensuring that we had a proper exemption from >> the U.S. regulations on exporting cryptographic code. If someone copied >> and forked the code that exemption may not still apply to that new >> repository. >>> >>> I'm not personally involved with the code on Pharo, not sure who is doing >> crypto there. >>> >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- >>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf >>>> Of Chris Muller >>>> Sent: Monday, October 19, 2015 2:47 PM >>>> To: The general-purpose Squeak developers list >>>> Cc: Pharo Development List >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>> RandomGenerator class>>unpredictableStringsDo: >>>> >>>> Yes, if a common package for both Squeak and Pharo is possible, >>>> that'd be great. Otherwise, the Squeak and Pharo versions should >>>> reside in separate repositories. Squeak users are still using >>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. >>>> >>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>> wrote: >>>>> hey Ron, >>>>> >>>>> It was actually the Pharo Cryptography team I was thinking of. >>>>> Perhaps we can get the same package to work in both squeak and >>>>> Pharo, with use of installable entropy sources or the like. In >>>>> order to get SqueakElib running in Pharo I need crypto and we may as >> well do it right. >>>>> >>>>> Cheers, >>>>> Robert >>>>> >>>>> >>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>> >>>>>> Hi Robert, >>>>>> >>>>>> You are already on the Cryptograph repo on SqueakSource.com as an >>>> admin. >>>>>> Please feel free to reorg if you like. >>>>>> >>>>>> Let me know if you have trouble resurrecting your account. >>>>>> >>>>>> All the best, >>>>>> >>>>>> Ron >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org >>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf >>>>>>> Of Robert Withers >>>>>>> Sent: Monday, October 19, 2015 1:53 PM >>>>>>> To: squeak-dev@lists.squeakfoundation.org >>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to >>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>> >>>>>>> This is great guys. Is there a way to get this from the image? >>>>>>> Good to get >>>>>> >>>>>> it >>>>>>> >>>>>>> with an FFI/OSProcess call or something. >>>>>>> >>>>>>> Thank you, >>>>>>> Robert >>>>>>> >>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>> >>>>>>>> Hi Guys, >>>>>>>> >>>>>>>> How about getting the CPU temperature. I think most CPUs >>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I >>>>>>>> think it is seven bits. The real range should be less than that >>>>>>>> but it may be enough to help add some entropy. >>>>>>>> >>>>>>>> Lou >>>>>>>> >>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, hasn't >> it? >>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope >>>>>>>>> these have been kind years to you, as they have for me. >>>>>>>>> >>>>>>>>> I love the idea of optional sources of entropy, depending on >>>>>>>>> the deployed capabilities. So there are our mouse points and >>>>>>>>> such, because they ought to be optional. >>>>>>>>> >>>>>>>>> What are some reliably present sources in the most minimal >>>> situation? >>>>>>>>> If we could define minimal as an image with no image level I/O >>>>>>>>> beyond file I/O, I would think we'd have: Kernel, System, >>>>>>>>> Collections, Compiler and FFI. Some intransitives in that scope >>>>>>>>> for entropy would be >>>>>>> >>>>>>> grand. >>>>>>>>> >>>>>>>>> >>>>>>>>> I was thinking to take 5 millisecondClockValues, separated by 4 >>>>>>>>> non-secure random intervals: take the low order byte of the 4 >>>>>>>>> intervals and reverse & concat them, as a entropic source. >>>>>>>>> >>>>>>>>> I can coordinate these changes. Ron, could you add me to the >>>>>>>>> Cryptography team so I can upload the Pharo Cryptography >>>>>>> >>>>>>> #bleedingEdge? >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>> >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>> >>>>>>>>>> Hi Robert, >>>>>>>>>> >>>>>>>>>> Nice to see you! >>>>>>>>>> >>>>>>>>>> Looks interesting I know that Chris did something gathering >>>>>>>>>> sources of >>>>>>> >>>>>>> entropy. Seems like the more the better. Could you just make >>>>>>> the entropy sources optional such that if they exist we use them? >>>>>>> I would have to go back and see what Chris did but he was >>>>>>> following suggestions from Schneider in his secureRandom. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> All the best, >>>>>>>>>> >>>>>>>>>> Ron Teitelbaum >>>>>>>>>> >>>>>>>>>>> -----Original Message----- >>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>>>>>>> Behalf Of Robert Withers >>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo >>>>>>>>>>> Development List >>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>> RandomGenerator >>>>>>>>>>> class>>unpredictableStringsDo: >>>>>>>>>>> >>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, >>>>>>>>>>> followed by my modified Pharo method below. I welcome any >>>> feedback. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Robert >>>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>> Existing: >>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>> "Enumerate sources of information from my environment >>>>>>>>>>> that >>>>>>> >>>>>>> should >>>>>>>>>>> >>>>>>>>>>> be generally hard to guess." >>>>>>>>>>> | time | >>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>> [ aBlock >>>>>>>>>>> value: World imageForm bits >>>>>>>>>>> compressToByteArray ; >>>>>>>>>>> value: Sensor mousePoint x asString ; >>>>>>>>>>> value: Sensor mousePoint y asString ; >>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>> asByteArray ; >>>>>>>>>>> value: Date today asString ; >>>>>>>>>>> value: Time now asString ; >>>>>>>>>>> value: Display extent asString. >>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>> #(vmVersion platformName primVmPath imageName >>>>>>> >>>>>>> platformSubtype >>>>>>>>>>> >>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>>>>>> imageName) >>>>>>>>>>> collect: >>>>>>>>>>> [ : each | >>>>>>>>>>> aBlock value: (SmalltalkImage current >>>>>>>>>>> perform: each) >>>>>>> >>>>>>> asByteArray >>>>>>>>>>> >>>>>>>>>>> ] ]. >>>>>>>>>>> aBlock >>>>>>>>>>> value: time asByteArray; >>>>>>>>>>> "maybe the pointer has moved, hit it again." >>>>>>>>>>> value: Sensor mousePoint asString ; >>>>>>>>>>> value: Time millisecondClockValue asByteArray >>>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>> Pharo port: >>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>> "Enumerate sources of information from my environment >>>>>>>>>>> that >>>>>>> >>>>>>> should >>>>>>>>>>> >>>>>>>>>>> be generally hard to guess." >>>>>>>>>>> >>>>>>>>>>> | time | >>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>> [ aBlock >>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>> asByteArray ; >>>>>>>>>>> value: Date today asString ; >>>>>>>>>>> value: Time now asString. >>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>> #(version primImagePath imagePath >>>>>>>>>>> datedVersion >>>>>>>>>>> lastQuitLogPosition) >>>>>>>>>>> collect: >>>>>>>>>>> [ : each | >>>>>>>>>>> aBlock value: (SmalltalkImage current >>>>>>>>>>> perform: each) >>>>>>> >>>>>>> asByteArray >>>>>>>>>>> >>>>>>>>>>> ] ]. >>>>>>>>>>> aBlock >>>>>>>>>>> value: time asByteArray; >>>>>>>>>>> value: Time millisecondClockValue asByteArray >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>> >>>>>>>>>>>> This is a message intended for anyone who was on the >>>>>>>>>>>> Cryptography >>>>>>> >>>>>>> team. >>>>>>>>>>>> >>>>>>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>>>>>> >>>>>>>>>>> RandomGenerator >>>>>>>>>>>> >>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>>>>>>> class>>uncertainty >>>>>>>>>>>> from the results of this message. My question is what should >>>>>>>>>>>> I do about that? This method seems to require non-headless, >>>>>>>>>>>> as it is checking the mouse point and such. This being a >>>>>>>>>>>> crypto cornerstone, what the best answer here. >>>>>>>>>>>> >>>>>>>>>>>> Thank you, >>>>>>>>>>>> Robert >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> ----------------------------------------------------------- >>>>>>>> Louis LaBrunda >>>>>>>> Keystone Software Corp. >>>>>>>> SkypeMe callto://PhotonDemon >>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>> Software.com >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>> >>> > > From commits at source.squeak.org Mon Oct 19 21:28:21 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:28:23 2015 Subject: [squeak-dev] The Inbox: Network-topa.165.mcz Message-ID: Tobias Pape uploaded a new version of Network to project The Inbox: http://source.squeak.org/inbox/Network-topa.165.mcz ==================== Summary ==================== Name: Network-topa.165 Author: topa Time: 19 October 2015, 11:28:20.052 pm UUID: b4b1febc-df00-4213-b76f-c007b06bb2e2 Ancestors: Network-ul.164 Simplify and speed up non-primitive UUID generation (hat-tip to Martin McClure ) Instead of generating all parts of the UUID separately, we generate a single, 128-bit number and modify it slightly to match the UUID definition. This complies with RFC 4122, Sec. 4.4. This approach is 2500 times faster than the old method and only about 3 times slower than the primitive. Hence, we disable the primitive and no longer need to rely on the UUIDPlugin to be present. Informational: The Timings: { 'Pure allocation' -> [UUID basicNew: 16] bench. 'Primitive + alloc' -> [(UUID basicNew: 16) primMakeUUID] bench. 'Old + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorOld new generateBytes: u forVersion: 4] bench. 'New + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorNew new generateBytes: u forVersion: 4] bench. }. "{ 'Pure allocation'->'56,500,000 per second. 17.7 nanoseconds per run.' . 'Primitive + alloc'->'1,510,000 per second. 663 nanoseconds per run.' . 'Old + alloc'->'202 per second. 4.95 milliseconds per run.' . 'New + alloc'->'519,000 per second. 1.93 microseconds per run.' }." =============== Diff against Network-ul.164 =============== Item was changed: ----- Method: String>>asAlphaNumeric:extraChars:mergeUID: (in category '*network-uuid') ----- asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart "Generates a String with unique identifier ( UID ) qualities, the difference to a UUID is that its beginning is derived from the receiver, so that it has a meaning for a human reader. Answers a String of totalSize, which consists of 3 parts 1.part: the beginning of the receiver only consisting of a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil ) 2.part: a single _ 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of a-z, A-Z, 0-9 Starting letters are capitalized. TotalSize must be at least 1. Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ). The random part has even for small sizes good UID qualitites for many practical purposes. If only lower- or uppercase letters are demanded, simply convert the answer with say #asLowercase. The probability of a duplicate will rise only moderately ( see below ). Example: size of random part = 10 in n generated UIDs the chance p of having non-unique UIDs is n = 10000 -> p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8 n = 100000 -> p < 1e-8 at the bottom is a snippet for your own calculations Note: the calculated propabilites are theoretical, for the actually used random generator they may be much worse" | stream out sizeOfFirstPart index ascii ch skip array random | totalSize > minimalSizeOfRandomPart ifFalse: [ self errorOutOfBounds ]. stream := ReadStream on: self. out := WriteStream on: ( String new: totalSize ). index := 0. skip := true. sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1. [ stream atEnd or: [ index >= sizeOfFirstPart ]] whileFalse: [ ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [ ( ascii >= 97 and: [ ascii <= 122 ]) or: [ ch isDigit or: [ additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]]) ifTrue: [ skip ifTrue: [ out nextPut: ch asUppercase ] ifFalse: [ out nextPut: ch ]. index := index + 1. skip := false ] ifFalse: [ skip := true ]]. out nextPut: $_. array := Array new: 62. 1 to: 26 do: [ :i | array at: i put: ( i + 64 ) asCharacter. array at: i + 26 put: ( i + 96 ) asCharacter ]. 53 to: 62 do: [ :i | array at: i put: ( i - 5 ) asCharacter ]. + random := ThreadSafeRandom value. - random := UUIDGenerator default randomGenerator. totalSize - index - 1 timesRepeat: [ out nextPut: ( array atRandom: random )]. ^out contents " calculation of probability p for failure of uniqueness in n UIDs Note: if answer will be converted to upper or lower case replace 62 with 36 | n i p all | all := 62 raisedTo: sizeOfRandomPart. i := 1. p := 0.0 . n := 10000. [ i <= n ] whileTrue: [ p := p + (( i - 1 ) / all ). i := i + 1 ]. p approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 " "'Crop SketchMorphs and Grab Screen Rect to JPG' asAlphaNumeric: 31 extraChars: nil mergeUID: 10 'CropSketchMorphsAndG_iOw94jquN6' 'Monticello' asAlphaNumeric: 31 extraChars: nil mergeUID: 10 'Monticello_kp6aV2l0IZK9uBULGOeG' 'version-', ( '1.1.2' replaceAll: $. with: $- ) asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10 'Version-1-1-2_kuz2tMg2xX9iRLDVR'" ! Item was changed: ----- Method: UUID>>initialize (in category 'initalize-release') ----- initialize + self makeUUID.! - self primMakeUUID.! Item was added: + ----- Method: UUID>>makeUUID (in category 'as yet unclassified') ----- + makeUUID + UUIDGenerator default generateBytes: self forVersion: 4.! Item was changed: ----- Method: UUID>>primMakeUUID (in category 'system primitives') ----- primMakeUUID + self makeUUID! - UUIDGenerator default generateBytes: self forVersion: 4.! Item was changed: Object subclass: #UUIDGenerator + instanceVariableNames: 'bits' + classVariableNames: 'Default TheRandom TheSemaphore' - instanceVariableNames: 'timeLow timeMid timeHiAndVersion clockSeqHiAndReserved clockSeqLow node randomCounter randomGenerator semaphoreForGenerator' - classVariableNames: 'Default' poolDictionaries: '' category: 'Network-UUID'! + !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! + I generate a pseudo-random UUID by asking Random for a 128 bit value. - !UUIDGenerator commentStamp: '' prior: 0! - This class generates a pseudo-random UUID - by John M McIntosh johnmci@smalltalkconsulting.com + See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! - See http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt! Item was changed: ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- initialize + TheRandom := Random new. + TheSemaphore := Semaphore forMutualExclusion. Smalltalk addToStartUpList: self after: nil.! Item was changed: ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- generateFieldsVersion4 + + TheSemaphore critical: [ + bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! - - timeLow := self generateRandomBitsOfLength: 32. - timeMid := self generateRandomBitsOfLength: 16. - timeHiAndVersion := 16r4000 bitOr: (self generateRandomBitsOfLength: 12). - clockSeqHiAndReserved := 16r80 bitOr: (self generateRandomBitsOfLength: 6). - clockSeqLow := self generateRandomBitsOfLength: 8. - node := self generateRandomBitsOfLength: 48. - ! Item was removed: - ----- Method: UUIDGenerator>>generateOneOrZero (in category 'generator') ----- - generateOneOrZero - ^self semaphoreForGenerator - critical: [| value | - value := self randomGenerator next. - self randomCounter: self randomCounter + 1. - self randomCounter > 100000 - ifTrue: [self setupRandom]. - value < 0.5 - ifTrue: [0] - ifFalse: [1]].! Item was removed: - ----- Method: UUIDGenerator>>generateRandomBitsOfLength: (in category 'generator') ----- - generateRandomBitsOfLength: aNumberOfBits - | target | - target := 0. - aNumberOfBits isZero ifTrue: [^target]. - target := self generateOneOrZero. - (aNumberOfBits - 1) timesRepeat: - [target := (target bitShift: 1) bitOr: self generateOneOrZero]. - ^target! Item was removed: - ----- Method: UUIDGenerator>>initialize (in category 'instance creation') ----- - initialize - self setupRandom. - semaphoreForGenerator := Semaphore forMutualExclusion. - ! Item was removed: - ----- Method: UUIDGenerator>>makeSeed (in category 'random seed') ----- - makeSeed - "Try various methods of getting good seeds" - | seed | - seed := self makeUnixSeed. - seed ifNotNil: [^seed]. - - "not sure if this is reliably random... commented out for now. -dew" - "seed := self makeSeedFromSound. - seed ifNotNil: [^seed]." - - "default" - [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash. - seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFFFFFF). - seed = 0] whileTrue: ["Try again if ever get a seed = 0"]. - - ^seed - ! Item was removed: - ----- Method: UUIDGenerator>>makeSeedFromSound (in category 'random seed') ----- - makeSeedFromSound - ^[SoundService default randomBitsFromSoundInput: 32] - ifError: [nil].! Item was removed: - ----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') ----- - makeUnixSeed - - ^[ - StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream | - stream binary. - (Integer - byte1: stream next - byte2: stream next - byte3: stream next - byte4: stream next) ] ] - on: Error - do: [ nil ]! Item was changed: ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- placeFields: aByteArray + | version fixed | + bits isLarge + ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] + ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. + + version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" + fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" + aByteArray + at: 7 put: version; + at: 9 put: fixed.! - aByteArray at: 1 put: ((timeLow bitShift: -24) bitAnd: 16rFF). - aByteArray at: 2 put: ((timeLow bitShift: -16) bitAnd: 16rFF). - aByteArray at: 3 put: ((timeLow bitShift: -8) bitAnd: 16rFF). - aByteArray at: 4 put: (timeLow bitAnd: 16rFF). - aByteArray at: 5 put: ((timeMid bitShift: -8) bitAnd: 16rFF). - aByteArray at: 6 put: (timeMid bitAnd: 16rFF). - aByteArray at: 7 put: ((timeHiAndVersion bitShift: -8) bitAnd: 16rFF). - aByteArray at: 8 put: (timeHiAndVersion bitAnd: 16rFF). - aByteArray at: 9 put: clockSeqHiAndReserved. - aByteArray at: 10 put: clockSeqLow. - 0 to: 5 do: [:i | - aByteArray at: 11 + i put: ((node bitShift: (-8*i)) bitAnd: 16rFF)] - ! Item was removed: - ----- Method: UUIDGenerator>>randomCounter (in category 'accessors and mutators') ----- - randomCounter - ^randomCounter! Item was removed: - ----- Method: UUIDGenerator>>randomCounter: (in category 'accessors and mutators') ----- - randomCounter: aNumber - randomCounter := aNumber - ! Item was removed: - ----- Method: UUIDGenerator>>randomGenerator (in category 'accessors and mutators') ----- - randomGenerator - ^randomGenerator - ! Item was removed: - ----- Method: UUIDGenerator>>randomGenerator: (in category 'accessors and mutators') ----- - randomGenerator: aGenerator - randomGenerator := aGenerator - ! Item was removed: - ----- Method: UUIDGenerator>>semaphoreForGenerator (in category 'accessors and mutators') ----- - semaphoreForGenerator - ^semaphoreForGenerator! Item was removed: - ----- Method: UUIDGenerator>>semaphoreForGenerator: (in category 'accessors and mutators') ----- - semaphoreForGenerator: aSema - semaphoreForGenerator := aSema - ! Item was removed: - ----- Method: UUIDGenerator>>setupRandom (in category 'instance creation') ----- - setupRandom - randomCounter := 0. - randomGenerator := Random seed: self makeSeed.! From commits at source.squeak.org Mon Oct 19 21:41:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:41:04 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1014.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1014.mcz ==================== Summary ==================== Name: Morphic-cmm.1014 Author: cmm Time: 19 October 2015, 4:40:19.528 pm UUID: 2cdb2aae-a459-4802-a9ca-d66ad4965a02 Ancestors: Morphic-topa.1013 - A new preference, Enable Global Command Keys, allows navigation throughout the IDE with the same hot keys available at the desktop. It is set by default, but applications might wish to disable it so they can register their own. - DockingBarMorph honors this preference too, so that applications can have Control+1 thru Control+0 too. - Hot-keys for Command+R (indent) and Command+L (outdent), respectively, have been changed to Tab and Shift+Tab, respectively, thus freeing up the letter keys for access to their global counterpart functions ((R)ecent Messages List and File (L)ist). - Transcript is also now globally available with Command+t. - Removed TextEditor>>#duplicate: because all ways to access that function through the UI were removed (in a series of separate commits). =============== Diff against Morphic-topa.1013 =============== 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. self setDefaultParameters ; beFloating ; beSticky ; layoutInset: 0 ; + dropEnabled: true! - dropEnabled: true. - Project current world activeHand addKeyboardListener: self! Item was added: + ----- Method: DockingBarMorph>>setupGlobalHotKeyEventListeners (in category 'initialize-release') ----- + setupGlobalHotKeyEventListeners + PasteUpMorph globalCommandKeysEnabled + ifTrue: [ ActiveHand addKeyboardListener: self ] + ifFalse: [ ActiveHand removeKeyboardListener: self ]! Item was changed: ----- Method: MorphicProject>>createOrUpdateMainDockingBar (in category 'docking bars support') ----- createOrUpdateMainDockingBar "Private - create a new main docking bar or update the current one" | w mainDockingBars | w := self world. mainDockingBars := w mainDockingBars. + mainDockingBars isEmpty ifTrue: + [ "no docking bar, just create a new one" + self dockingBar createDockingBar + openInWorld: w ; + setupGlobalHotKeyEventListeners. + ^ self ]. - mainDockingBars isEmpty - ifTrue: ["no docking bar, just create a new one" - self dockingBar createDockingBar openInWorld: w. - ^ self]. "update if needed" + mainDockingBars do: + [ : each | self dockingBar updateIfNeeded: each. + each setupGlobalHotKeyEventListeners ]! - mainDockingBars - do: [:each | self dockingBar updateIfNeeded: each]! Item was changed: BorderedMorph subclass: #PasteUpMorph instanceVariableNames: 'presenter model cursor padding backgroundMorph turtleTrailsForm turtlePen lastTurtlePositions isPartsBin indicateCursor wantsMouseOverHalos worldState griddingOn' + classVariableNames: 'DisableDeferredUpdates GlobalCommandKeysEnabled MinCycleLapse StillAlive WindowEventHandler' - classVariableNames: 'DisableDeferredUpdates MinCycleLapse StillAlive WindowEventHandler' poolDictionaries: '' category: 'Morphic-Worlds'! !PasteUpMorph commentStamp: '' prior: 0! A morph whose submorphs comprise a paste-up of rectangular subparts which "show through". Anything called a 'Playfield' is a PasteUpMorph. Facilities commonly needed on pages of graphical presentations and on simulation playfields, such as the painting of new objects, turtle trails, gradient fills, background paintings, parts-bin behavior, collision-detection, etc., are (or will be) provided. A World, the entire Smalltalk screen, is a PasteUpMorph. A World responds true to isWorld. Morph subclasses that have specialized menus (BookMorph) build them in the message addBookMenuItemsTo:hand:. A PasteUpMorph that is a world, builds its menu in HandMorph buildWorldMenu. presenter A Presenter in charge of stopButton stepButton and goButton, mouseOverHalosEnabled soundsEnabled fenceEnabled coloredTilesEnabled. model cursor ?? padding ?? backgroundMorph A Form that covers the background. turtleTrailsForm Moving submorphs may leave trails on this form. turtlePen Draws the trails. lastTurtlePositions A Dictionary of (aPlayer -> aPoint) so turtle trails can be drawn only once each step cycle. The point is the start of the current stroke. isPartsBin If true, every object dragged out is copied. autoLineLayout ?? indicateCursor ?? resizeToFit ?? wantsMouseOverHalos If true, simply moving the cursor over a submorph brings up its halo. worldState If I am also a World, keeps the hands, damageRecorder, stepList etc. griddingOn If true, submorphs are on a grid ! Item was added: + ----- Method: PasteUpMorph class>>globalCommandKeysEnabled (in category 'preferences') ----- + globalCommandKeysEnabled + + ^ GlobalCommandKeysEnabled ifNil: [ true ]! Item was added: + ----- Method: PasteUpMorph class>>globalCommandKeysEnabled: (in category 'preferences') ----- + globalCommandKeysEnabled: aBoolean + GlobalCommandKeysEnabled := aBoolean. + aBoolean + ifTrue: + [ ActiveHand + addKeyboardListener: SystemWindow topWindow ; + addKeyboardListener: ActiveWorld. + ActiveWorld dockingBars do: + [ : each | ActiveHand addKeyboardListener: each ] ] + ifFalse: + [ ActiveHand + removeKeyboardListener: SystemWindow topWindow ; + removeKeyboardListener: ActiveWorld. + ActiveWorld dockingBars do: + [ : each | ActiveHand removeKeyboardListener: each ] ]. + TheWorldMainDockingBar updateInstances! Item was changed: ----- Method: PasteUpMorph>>becomeActiveDuring: (in category 'initialization') ----- becomeActiveDuring: aBlock "Make the receiver the ActiveWorld during the evaluation of aBlock. Note that this method does deliberately *not* use #ensure: to prevent re-installation of the world on project switches." | priorWorld priorHand priorEvent | priorWorld := ActiveWorld. priorHand := ActiveHand. priorEvent := ActiveEvent. + priorHand removeKeyboardListener: priorWorld. - priorHand removeEventListener: priorWorld. ActiveWorld := self. ActiveHand := self hands first. "default" ActiveEvent := nil. "not in event cycle" + self class globalCommandKeysEnabled ifTrue: [ ActiveHand addKeyboardListener: self ]. - ActiveHand addEventListener: self. aBlock on: Error do: [:ex | ActiveWorld := priorWorld. ActiveEvent := priorEvent. ActiveHand := priorHand. ex pass]! Item was changed: ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') ----- handleListenEvent: aUserInputEvent "Handlers for *global* keys, regardless of which widget has keyboard focus." aUserInputEvent type = #keystroke ifTrue: [ aUserInputEvent commandKeyPressed ifTrue: + [ aUserInputEvent keyValue = $t asciiValue ifTrue: [ World findATranscript: aUserInputEvent ]. + aUserInputEvent keyValue = $R asciiValue ifTrue: [ Utilities browseRecentSubmissions ]. + aUserInputEvent keyValue = $L asciiValue ifTrue: [ World findAFileList: aUserInputEvent ]. + aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. - [ aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ]. aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ]. aUserInputEvent keyValue = $] asciiValue ifTrue: [ Smalltalk snapshot: true andQuit: false ] ] ]! Item was changed: ----- Method: PasteUpMorph>>keystrokeInWorld: (in category 'world menu') ----- keystrokeInWorld: evt "A keystroke was hit when no keyboard focus was set, so it is sent here to the world instead." | aChar isCmd ascii | aChar := evt keyCharacter. + (ascii := aChar asciiValue) = Character escape asciiValue ifTrue: + [evt commandKeyPressed ifFalse: [^ self putUpWorldMenuFromEscapeKey]]. - (ascii := aChar asciiValue) = 27 ifTrue: "escape key" - [^ self putUpWorldMenuFromEscapeKey]. (evt controlKeyPressed not and: [(#(1 4 8 28 29 30 31 32) includes: ascii) "home, end, backspace, arrow keys, space" and: [self keyboardNavigationHandler notNil]]) ifTrue: [self keyboardNavigationHandler navigateFromKeystroke: aChar]. isCmd := evt commandKeyPressed and: [Preferences cmdKeysInText]. (evt commandKeyPressed and: [Preferences eToyFriendly]) ifTrue: [(aChar == $W) ifTrue: [^ self putUpWorldMenu: evt]]. (isCmd and: [Preferences honorDesktopCmdKeys]) ifTrue: [^ self dispatchCommandKeyInWorld: aChar event: evt]. "It was unhandled. Remember the keystroke." self lastKeystroke: evt keyString. self triggerEvent: #keyStroke! Item was changed: ----- Method: SystemWindow>>activate (in category 'top window') ----- activate "Bring the receiver to the top. If I am modal, bring along my owning window as well." | modalOwner | self modalChild ifNotNil: [ : modalChild | modalChild owner ifNotNil: [ modalChild activate. ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. (isCollapsed not and: [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. self activateWindow. + PasteUpMorph globalCommandKeysEnabled ifTrue: [ActiveHand addKeyboardListener: self]. - ActiveHand addKeyboardListener: self. modalOwner := self modalOwner. (modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]! Item was changed: ----- Method: TextEditor class>>initializeShiftCmdKeyShortcuts (in category 'keyboard shortcut tables') ----- initializeShiftCmdKeyShortcuts "Initialize the shift-command-key (or control-key) shortcut table." "NOTE: if you don't know what your keyboard generates, use Sensor kbdTest" "wod 11/3/1998: Fix setting of cmdMap for shifted keys to actually use the capitalized versions of the letters. TPR 2/18/99: add the plain ascii values back in for those VMs that don't return the shifted values." "TextEditor initialize" | cmdMap cmds | "shift-command and control shortcuts" cmdMap := Array new: 256 withAll: #noop:. "use temp in case of a crash" cmdMap at: ( 1 + 1) put: #cursorHome:. "home key" cmdMap at: ( 4 + 1) put: #cursorEnd:. "end key" cmdMap at: ( 8 + 1) put: #forwardDelete:. "ctrl-H or delete key" cmdMap at: (11 + 1) put: #cursorPageUp:. "page up key" cmdMap at: (12 + 1) put: #cursorPageDown:. "page down key" cmdMap at: (13 + 1) put: #crWithIndent:. "ctrl-Return" cmdMap at: (27 + 1) put: #offerMenuFromEsc:. "escape key" cmdMap at: (28 + 1) put: #cursorLeft:. "left arrow key" cmdMap at: (29 + 1) put: #cursorRight:. "right arrow key" cmdMap at: (30 + 1) put: #cursorUp:. "up arrow key" cmdMap at: (31 + 1) put: #cursorDown:. "down arrow key" cmdMap at: (32 + 1) put: #selectWord:. "space bar key" cmdMap at: (45 + 1) put: #changeEmphasis:. "cmd-sh-minus" cmdMap at: (61 + 1) put: #changeEmphasis:. "cmd-sh-plus" cmdMap at: (127 + 1) put: #forwardDelete:. "del key" "On some keyboards, these characters require a shift" '([<{|"''9' do: [:char | cmdMap at: char asciiValue + 1 put: #enclose:]. "NB: sw 12/9/2001 commented out the idiosyncratic line just below, which was grabbing shift-esc in the text editor and hence which argued with the wish to have shift-esc be a universal gesture for escaping the local context and calling up the desktop menu." "cmdMap at: (27 + 1) put: #shiftEnclose:." "ctrl-[" "'""''(' do: [ :char | cmdMap at: (char asciiValue + 1) put: #enclose:]." cmds := #( $c compareToClipboard: - "$d duplicate:" $h cursorTopHome: $j doAgainMany: $k changeStyle: - $l outdent: $m selectCurrentTypeIn: - $r indent: $s search: $u changeLfToCr: $x makeLowercase: $y makeUppercase: $z makeCapitalized: ). 1 to: cmds size by: 2 do: [ :i | cmdMap at: ((cmds at: i) asciiValue + 1) put: (cmds at: i + 1). "plain keys" cmdMap at: ((cmds at: i) asciiValue - 32 + 1) put: (cmds at: i + 1). "shifted keys" cmdMap at: ((cmds at: i) asciiValue - 96 + 1) put: (cmds at: i + 1). "ctrl keys" ]. shiftCmdActions := cmdMap! 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 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 ]. + (aKeyboardEvent keyCharacter = Character tab and: [ self selection notEmpty ]) ifTrue: + [ aKeyboardEvent shiftPressed + ifTrue: [ self outdent: aKeyboardEvent ] + ifFalse: [ self indent: aKeyboardEvent ]. + ^ true ]. ((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 ]. self class autoEnclose + ifTrue: + [ (self autoEncloseFor: typedChar) ifFalse: [ self normalCharacter: aKeyboardEvent ] ] - ifTrue: [ (self autoEncloseFor: typedChar) ifFalse: [ self normalCharacter: aKeyboardEvent ] ] ifFalse: [ self normalCharacter: aKeyboardEvent ]. ^ false! Item was removed: - ----- Method: TextEditor>>duplicate: (in category 'editing keys') ----- - duplicate: aKeyboardEvent - "Paste the current selection over the prior selection, if it is non-overlapping and - legal. Flushes typeahead. Undoer & Redoer: undoAndReselect." - - self closeTypeIn. - (self hasSelection and: [self isDisjointFrom: otherInterval]) - ifTrue: "Something to duplicate" - [self replace: otherInterval with: self selection and: - [self selectAt: self pointIndex]] - ifFalse: - [morph flash]. - ^true! Item was changed: (PackageInfo named: 'Morphic') postscript: '"Initialize the key bindings and menus" + Editor initialize. - Editor initialize. "again" "apply the new icons" + MenuIcons initializeIcons'! - MenuIcons initializeIcons. "again" - TheWorldMainDockingBar updateInstances. - - "Fix missing inset of old-style windows." - SystemWindow allSubInstancesDo: [:ea | - (ea paneMorphs detect: [:m | m layoutFrame leftFraction = 0] ifNone: []) - ifNotNil: [:m | m layoutFrame leftOffset > 0 - ifTrue: [ea layoutInset: 0]]]. - - "Remove non-functional tools from world menu." - LanguageEditor unload. - UUniverseBrowser unload. - UUniverseEditor unload.'! From Das.Linux at gmx.de Mon Oct 19 21:42:38 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Oct 19 21:42:38 2015 Subject: [squeak-dev] The Inbox: Network-topa.165.mcz Message-ID: <6804BD73-ED7F-4634-ACDA-C9AF34F062D6@gmx.de> Hi all Don't hold back your comments. I'd like to put this into trunk and enable people not to have to install libuuid1:i386 in their shiny new 64-bit Linux environment ;) Best regards -Tobias On 19.10.2015, at 21:28, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Network to project The Inbox: > http://source.squeak.org/inbox/Network-topa.165.mcz > > ==================== Summary ==================== > > Name: Network-topa.165 > Author: topa > Time: 19 October 2015, 11:28:20.052 pm > UUID: b4b1febc-df00-4213-b76f-c007b06bb2e2 > Ancestors: Network-ul.164 > > Simplify and speed up non-primitive UUID generation (hat-tip to Martin McClure ) > > Instead of generating all parts of the UUID separately, we generate > a single, 128-bit number and modify it slightly to match the UUID definition. > This complies with RFC 4122, Sec. 4.4. > > This approach is 2500 times faster than the old method and only about 3 times > slower than the primitive. Hence, we disable the primitive and no longer need > to rely on the UUIDPlugin to be present. > > Informational: The Timings: > > { > 'Pure allocation' -> [UUID basicNew: 16] bench. > 'Primitive + alloc' -> [(UUID basicNew: 16) primMakeUUID] bench. > 'Old + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorOld new generateBytes: u forVersion: 4] bench. > 'New + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorNew new generateBytes: u forVersion: 4] bench. > }. > "{ > 'Pure allocation'->'56,500,000 per second. 17.7 nanoseconds per run.' . > 'Primitive + alloc'->'1,510,000 per second. 663 nanoseconds per run.' . > 'Old + alloc'->'202 per second. 4.95 milliseconds per run.' . > 'New + alloc'->'519,000 per second. 1.93 microseconds per run.' > }." > > =============== Diff against Network-ul.164 =============== > > Item was changed: > ----- Method: String>>asAlphaNumeric:extraChars:mergeUID: (in category '*network-uuid') ----- > asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart > "Generates a String with unique identifier ( UID ) qualities, the difference to a > UUID is that its beginning is derived from the receiver, so that it has a meaning > for a human reader. > > Answers a String of totalSize, which consists of 3 parts > 1.part: the beginning of the receiver only consisting of > a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil ) > 2.part: a single _ > 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of > a-z, A-Z, 0-9 > > Starting letters are capitalized. > TotalSize must be at least 1. > Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ). > The random part has even for small sizes good UID qualitites for many practical purposes. > If only lower- or uppercase letters are demanded, simply convert the answer with > say #asLowercase. The probability of a duplicate will rise only moderately ( see below ). > > Example: > size of random part = 10 > in n generated UIDs the chance p of having non-unique UIDs is > n = 10000 -> p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8 > n = 100000 -> p < 1e-8 > at the bottom is a snippet for your own calculations > Note: the calculated propabilites are theoretical, > for the actually used random generator they may be much worse" > > | stream out sizeOfFirstPart index ascii ch skip array random | > totalSize > minimalSizeOfRandomPart > ifFalse: [ self errorOutOfBounds ]. > stream := ReadStream on: self. > out := WriteStream on: ( String new: totalSize ). > index := 0. > skip := true. > sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1. > [ stream atEnd or: [ index >= sizeOfFirstPart ]] > whileFalse: [ > ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [ > ( ascii >= 97 and: [ ascii <= 122 ]) or: [ > ch isDigit or: [ > additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]]) > ifTrue: [ > skip > ifTrue: [ out nextPut: ch asUppercase ] > ifFalse: [ out nextPut: ch ]. > index := index + 1. > skip := false ] > ifFalse: [ skip := true ]]. > out nextPut: $_. > array := Array new: 62. > 1 to: 26 do: [ :i | > array at: i put: ( i + 64 ) asCharacter. > array at: i + 26 put: ( i + 96 ) asCharacter ]. > 53 to: 62 do: [ :i | > array at: i put: ( i - 5 ) asCharacter ]. > + random := ThreadSafeRandom value. > - random := UUIDGenerator default randomGenerator. > totalSize - index - 1 timesRepeat: [ > out nextPut: ( array atRandom: random )]. > ^out contents > > " calculation of probability p for failure of uniqueness in n UIDs > Note: if answer will be converted to upper or lower case replace 62 with 36 > | n i p all | > all := 62 raisedTo: sizeOfRandomPart. > i := 1. > p := 0.0 . > n := 10000. > [ i <= n ] > whileTrue: [ > p := p + (( i - 1 ) / all ). > i := i + 1 ]. > p > > approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 > " > > "'Crop SketchMorphs and Grab Screen Rect to JPG' > asAlphaNumeric: 31 extraChars: nil mergeUID: 10 > 'CropSketchMorphsAndG_iOw94jquN6' > 'Monticello' > asAlphaNumeric: 31 extraChars: nil mergeUID: 10 > 'Monticello_kp6aV2l0IZK9uBULGOeG' > 'version-', ( '1.1.2' replaceAll: $. with: $- ) > asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10 > 'Version-1-1-2_kuz2tMg2xX9iRLDVR'" > ! > > Item was changed: > ----- Method: UUID>>initialize (in category 'initalize-release') ----- > initialize > + self makeUUID.! > - self primMakeUUID.! > > Item was added: > + ----- Method: UUID>>makeUUID (in category 'as yet unclassified') ----- > + makeUUID > + UUIDGenerator default generateBytes: self forVersion: 4.! > > Item was changed: > ----- Method: UUID>>primMakeUUID (in category 'system primitives') ----- > primMakeUUID > > + self makeUUID! > - UUIDGenerator default generateBytes: self forVersion: 4.! > > Item was changed: > Object subclass: #UUIDGenerator > + instanceVariableNames: 'bits' > + classVariableNames: 'Default TheRandom TheSemaphore' > - instanceVariableNames: 'timeLow timeMid timeHiAndVersion clockSeqHiAndReserved clockSeqLow node randomCounter randomGenerator semaphoreForGenerator' > - classVariableNames: 'Default' > poolDictionaries: '' > category: 'Network-UUID'! > > + !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! > + I generate a pseudo-random UUID by asking Random for a 128 bit value. > - !UUIDGenerator commentStamp: '' prior: 0! > - This class generates a pseudo-random UUID > - by John M McIntosh johnmci@smalltalkconsulting.com > > + See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! > - See http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt! > > Item was changed: > ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- > initialize > + TheRandom := Random new. > + TheSemaphore := Semaphore forMutualExclusion. > Smalltalk addToStartUpList: self after: nil.! > > Item was changed: > ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- > generateFieldsVersion4 > + > + TheSemaphore critical: [ > + bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! > - > - timeLow := self generateRandomBitsOfLength: 32. > - timeMid := self generateRandomBitsOfLength: 16. > - timeHiAndVersion := 16r4000 bitOr: (self generateRandomBitsOfLength: 12). > - clockSeqHiAndReserved := 16r80 bitOr: (self generateRandomBitsOfLength: 6). > - clockSeqLow := self generateRandomBitsOfLength: 8. > - node := self generateRandomBitsOfLength: 48. > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>generateOneOrZero (in category 'generator') ----- > - generateOneOrZero > - ^self semaphoreForGenerator > - critical: [| value | > - value := self randomGenerator next. > - self randomCounter: self randomCounter + 1. > - self randomCounter > 100000 > - ifTrue: [self setupRandom]. > - value < 0.5 > - ifTrue: [0] > - ifFalse: [1]].! > > Item was removed: > - ----- Method: UUIDGenerator>>generateRandomBitsOfLength: (in category 'generator') ----- > - generateRandomBitsOfLength: aNumberOfBits > - | target | > - target := 0. > - aNumberOfBits isZero ifTrue: [^target]. > - target := self generateOneOrZero. > - (aNumberOfBits - 1) timesRepeat: > - [target := (target bitShift: 1) bitOr: self generateOneOrZero]. > - ^target! > > Item was removed: > - ----- Method: UUIDGenerator>>initialize (in category 'instance creation') ----- > - initialize > - self setupRandom. > - semaphoreForGenerator := Semaphore forMutualExclusion. > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>makeSeed (in category 'random seed') ----- > - makeSeed > - "Try various methods of getting good seeds" > - | seed | > - seed := self makeUnixSeed. > - seed ifNotNil: [^seed]. > - > - "not sure if this is reliably random... commented out for now. -dew" > - "seed := self makeSeedFromSound. > - seed ifNotNil: [^seed]." > - > - "default" > - [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash. > - seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFFFFFF). > - seed = 0] whileTrue: ["Try again if ever get a seed = 0"]. > - > - ^seed > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>makeSeedFromSound (in category 'random seed') ----- > - makeSeedFromSound > - ^[SoundService default randomBitsFromSoundInput: 32] > - ifError: [nil].! > > Item was removed: > - ----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') ----- > - makeUnixSeed > - > - ^[ > - StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream | > - stream binary. > - (Integer > - byte1: stream next > - byte2: stream next > - byte3: stream next > - byte4: stream next) ] ] > - on: Error > - do: [ nil ]! > > Item was changed: > ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- > placeFields: aByteArray > > + | version fixed | > + bits isLarge > + ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] > + ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. > + > + version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" > + fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" > + aByteArray > + at: 7 put: version; > + at: 9 put: fixed.! > - aByteArray at: 1 put: ((timeLow bitShift: -24) bitAnd: 16rFF). > - aByteArray at: 2 put: ((timeLow bitShift: -16) bitAnd: 16rFF). > - aByteArray at: 3 put: ((timeLow bitShift: -8) bitAnd: 16rFF). > - aByteArray at: 4 put: (timeLow bitAnd: 16rFF). > - aByteArray at: 5 put: ((timeMid bitShift: -8) bitAnd: 16rFF). > - aByteArray at: 6 put: (timeMid bitAnd: 16rFF). > - aByteArray at: 7 put: ((timeHiAndVersion bitShift: -8) bitAnd: 16rFF). > - aByteArray at: 8 put: (timeHiAndVersion bitAnd: 16rFF). > - aByteArray at: 9 put: clockSeqHiAndReserved. > - aByteArray at: 10 put: clockSeqLow. > - 0 to: 5 do: [:i | > - aByteArray at: 11 + i put: ((node bitShift: (-8*i)) bitAnd: 16rFF)] > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>randomCounter (in category 'accessors and mutators') ----- > - randomCounter > - ^randomCounter! > > Item was removed: > - ----- Method: UUIDGenerator>>randomCounter: (in category 'accessors and mutators') ----- > - randomCounter: aNumber > - randomCounter := aNumber > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>randomGenerator (in category 'accessors and mutators') ----- > - randomGenerator > - ^randomGenerator > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>randomGenerator: (in category 'accessors and mutators') ----- > - randomGenerator: aGenerator > - randomGenerator := aGenerator > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>semaphoreForGenerator (in category 'accessors and mutators') ----- > - semaphoreForGenerator > - ^semaphoreForGenerator! > > Item was removed: > - ----- Method: UUIDGenerator>>semaphoreForGenerator: (in category 'accessors and mutators') ----- > - semaphoreForGenerator: aSema > - semaphoreForGenerator := aSema > - ! > > Item was removed: > - ----- Method: UUIDGenerator>>setupRandom (in category 'instance creation') ----- > - setupRandom > - randomCounter := 0. > - randomGenerator := Random seed: self makeSeed.! > > From commits at source.squeak.org Mon Oct 19 21:43:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:43:24 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.642.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.642.mcz ==================== Summary ==================== Name: Tools-cmm.642 Author: cmm Time: 19 October 2015, 4:42:55.028 pm UUID: ed37650d-b99a-40be-bfba-49fbb02ba8a4 Ancestors: Tools-topa.641 - Fix hot-key for Eliot's "copy reference (C)". It was overloaded with "show category (C)", so show category was changed to Command+Y. - Restore the original Desktop Command keys when the user does not have Enable Global Command Keys enabled, but overload Command+Escape at the desktop level for a uniform way to close windows. =============== Diff against Tools-topa.641 =============== Item was changed: ----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') ----- messageListKey: aChar from: view "Respond to a Command key. I am a model with a code pane, and I also have a listView that has a list of methods. The view knows how to get the list and selection." | sel class | aChar == $D ifTrue: [^ self toggleDiffing]. sel := self selectedMessageName. aChar == $m ifTrue: "These next two put up a type in if no message selected" [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ]. aChar == $n ifTrue: [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ]. aChar == $d ifTrue: [^ self removeMessageFromBrowser]. "The following require a class selection" (class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view]. aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel]. aChar == $N ifTrue: [^ self browseClassRefs]. aChar == $i ifTrue: [^ self methodHierarchy]. aChar == $h ifTrue: [^ self classHierarchy]. aChar == $p ifTrue: [^ self browseFullProtocol]. aChar == $r ifTrue: [^ self browseVariableReferences]. aChar == $a ifTrue: [^ self browseVariableAssignments]. "The following require a method selection" sel ifNotNil: [aChar == $o ifTrue: [^ self fileOutMessage]. aChar == $c ifTrue: [^ self copySelector]. aChar == $v ifTrue: [^ self browseVersions]. aChar == $x ifTrue: [^ self removeMessage]. + aChar == $C ifTrue: [ self copyReference ]. + (aChar == $Y and: [self canShowMultipleMessageCategories]) - (aChar == $C and: [self canShowMultipleMessageCategories]) ifTrue: [^ self showHomeCategory]]. ^ self arrowKey: aChar from: view! Item was changed: ----- Method: PasteUpMorph>>defaultDesktopCommandKeyTriplets (in category '*Tools') ----- defaultDesktopCommandKeyTriplets "Answer a list of triplets of the form [+ optional fourth element, a for use in desktop-command-key-help] that will provide the default desktop command key handlers. If the selector takes an argument, that argument will be the command-key event" | noviceKeys expertKeys | noviceKeys := { { $o. ActiveWorld. #activateObjectsTool. 'Activate the "Objects Tool"'}. { $r. ActiveWorld. #restoreMorphicDisplay. 'Redraw the screen'}. { $z. self. #undoOrRedoCommand. 'Undo or redo the last undoable command'}. { $F. Project current. #toggleFlapsSuppressed. 'Toggle the display of flaps'}. { $N. self. #toggleClassicNavigatorIfAppropriate. 'Show/Hide the classic Navigator, if appropriate'}. { $M. self. #toggleShowWorldMainDockingBar. 'Show/Hide the Main Docking Bar'}. + { $]. Smalltalk. #saveSession. 'Save the image.'}. }. Preferences noviceMode ifTrue:[^ noviceKeys]. expertKeys := { { $b. SystemBrowser. #defaultOpenBrowser. 'Open a new System Browser'}. { $k. StringHolder. #open. 'Open a new, blank Workspace'}. { $m. self. #putUpNewMorphMenu. 'Put up the "New Morph" menu'}. + { $O. self. #findAMonticelloBrowser. 'Bring a Monticello window into focus.'}. { $t. self. #findATranscript:. 'Make a System Transcript visible'}. { $w. SystemWindow. #closeTopWindow. 'Close the topmost window'}. + { Character escape. SystemWindow. #closeTopWindow. 'Close the topmost window'}. + { $C. self. #findAChangeSorter:. 'Make a Change Sorter visible'}. + { $L. self. #findAFileList:. 'Make a File List visible'}. { $P. self. #findAPreferencesPanel:. 'Activate the Preferences tool'}. { $R. Utilities. #browseRecentSubmissions. 'Make a Recent Submissions browser visible'}. { $W. self. #findAMessageNamesWindow:. 'Make a MessageNames tool visible'}. { $Z. ChangeList. #browseRecentLog. 'Browse recently-logged changes'}. + { $\. SystemWindow. #sendTopWindowToBack. 'Send the top window to the back'}. { $_. Smalltalk. #quitPrimitive. 'Quit the image immediately.'}. }. ^ noviceKeys, expertKeys ! Item was changed: ----- Method: StringHolder>>messageListKey:from: (in category '*Tools') ----- messageListKey: aChar from: view "Respond to a Command key. I am a model with a code pane, and I also have a listView that has a list of methods. The view knows how to get the list and selection." | sel class | aChar == $D ifTrue: [^ self toggleDiffing]. sel := self selectedMessageName. aChar == $m ifTrue: "These next two put up a type in if no message selected" [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self systemNavigation]. aChar == $n ifTrue: [^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self systemNavigation]. "The following require a class selection" (class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view]. aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel]. aChar == $N ifTrue: [^ self browseClassRefs]. aChar == $i ifTrue: [^ self methodHierarchy]. aChar == $h ifTrue: [^ self classHierarchy]. aChar == $p ifTrue: [^ self browseFullProtocol]. "The following require a method selection" sel ifNotNil: [aChar == $o ifTrue: [^ self fileOutMessage]. aChar == $c ifTrue: [^ self copySelector]. + aChar == $C ifTrue: [^ self copyReference]. aChar == $v ifTrue: [^ self browseVersions]. aChar == $x ifTrue: [^ self removeMessage]]. ^ self arrowKey: aChar from: view! Item was changed: + (PackageInfo named: 'Tools') postscript: '"Updated for new global hot-key support." + ActiveWorld initializeDesktopCommandKeySelectors'! - (PackageInfo named: 'Tools') postscript: 'ActiveWorld initializeDesktopCommandKeySelectors'! From commits at source.squeak.org Mon Oct 19 21:45:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:45:39 2015 Subject: [squeak-dev] The Trunk: Help-Squeak-Project-cmm.31.mcz Message-ID: Chris Muller uploaded a new version of Help-Squeak-Project to project The Trunk: http://source.squeak.org/trunk/Help-Squeak-Project-cmm.31.mcz ==================== Summary ==================== Name: Help-Squeak-Project-cmm.31 Author: cmm Time: 19 October 2015, 4:45:28.777 pm UUID: c5667fc2-8a6b-4772-95f8-e62e6319806f Ancestors: Help-Squeak-Project-cmm.30 Updates for recent command-key additions. =============== Diff against Help-Squeak-Project-cmm.30 =============== Item was changed: ----- Method: SqueakTutorialsCommandKey class>>commandKeyMappings (in category 'as yet unclassified') ----- commandKeyMappings "This method was automatically generated. Edit it using:" "SqueakTutorialsCommandKey edit: #commandKeyMappings" ^HelpTopic title: 'Command Key Mappings' contents: 'Lower-case command keys (use with Cmd key on Mac and Alt key on other platforms) a Select all b Browse it (selection is a class name or cursor is over a class-list or message-list) c Copy selection d Do it (selection is a valid expression) e Exchange selection with prior selection f Find g Find again h Set selection as search string for find again i Inspect it (selection is a valid expression, or selection is over an inspect-ilst) j Again once (do the last text-related operation again) k Set font l Cancel m Implementors of it (selection is a message selector or cursor is over a class-list or message-list) n Senders of it (selection is a message selector or cursor is over a class-list or message-list) o Spawn current method p Print it (selection is a valid expression) q Query symbol (toggle all possible completion for a given prefix) r Recognizer s Save (i.e. accept) t Finds a Transcript (when cursor is over the desktop) u Toggle alignment v Paste w Delete preceding word (over text); Close-window (over morphic desktop) x Cut selection y Swap characters z Undo Note: for Do it, Senders of it, etc., a null selection will be expanded to a word or to the current line in an attempt to do what you want. Also note that Senders/Implementors of it will find the outermost keyword selector in a large selection, as when you have selected a bracketed expression or an entire line. Finally note that the same cmd-m and cmd-n (and cmd-v for versions) work in the message pane of most browsers. Upper-case command keys (use with Shift-Cmd, or Ctrl on Mac or Shift-Alt on other platforms; sometimes Ctrl works too) A Advance argument B Browse it in this same browser (in System browsers only) C Compare the selected text to the clipboard contents + D Debug-It - D Duplicate E Method strings containing it F Insert ''ifFalse:'' G fileIn from it (a file name) H cursor TopHome: I Inspect via Object Explorer J Again many (apply the previous text command repeatedly until the end of the text) K Set style L Outdent (move selection one tab-stop left) M Select current type-in N References to it (selection is a class name, or cursor is over a class-list or message-list) O Open single-message browser (in message lists) P Make project link R Indent (move selection one tab-stap right) S Search T Insert ''ifTrue:'' U Convert linefeeds to carriage returns in selection V Paste author''s initials W Selectors containing it (in text); show-world-menu (when issued with cursor over desktop) X Force selection to lowercase Y Force selection to uppercase Z Capitalize all words in selection Other special keys Backspace Backward delete character + Shift-Bksp Backward select or delete word Del Forward delete character - Shift-Bksp Backward delete word Shift-Del Forward delete word Esc Pop up the context menu Shift+Esc Pop up the World Menu + Cmd+Esc Close the active window + Ctrl+Esc Present a list of open windows + \ Send the active window to the back - Command+Esc Close the active window - \ Send top window to back - Control+Esc Present a list of open windows Cursor keys left, right, up, down Move cursor left, right, up or down Ctrl-left Move cursor left one word Ctrl-right Move cursor right one word Home Move cursor to begin of line or begin of text End Move cursor to end of line or end of text PgUp, Ctrl-up Move cursor up one page PgDown, Ctrl-Dn Move cursor down one page Note all these keys can be used together with Shift to define or enlarge the selection. You cannot however shrink that selection again, as in some other systems. Other Cmd-key combinations (not available on all platforms) Return Insert return followed by as many tabs as the previous line (with a further adjustment for additional brackets in that line) Space Select the current word as with double clicking Enclose the selection in a kind of bracket. Each is a toggle. (not available on all platforms) + Ctrl-( Toggle enclosure within parentheses + Ctrl-[ Toggle enclosure within brackets + Crtl-{ Toggle enclosre within curly braces + Ctrl-< Toggle enclosre within less-than / greater-than (HTML) + Ctrl-'' Toggle enclosure within double-quotes + Ctrl-'' Toggle encllosure within single-quotes + - Ctrl-( Enclose within ( and ), or remove enclosing ( and ) - Ctrl-[ Enclose within [ and ], or remove enclosing [ and ] - Crtl-{ Enclose within { and }, or remove enclosing { and } - Ctrl-< Enclose within < and >, or remove enclosing < and > - Ctrl-'' Enclose within '' and '', or remove enclosing '' and '' - Ctrl-" Enclose within " and ", or remove enclosing " and " Note also that you can double-click just inside any of the above delimiters, or at the beginning or end of a line, to select the text enclosed. Text Emphasis (not available on all platforms) Cmd-1 type the first method argument Cmd-2 type the second method argument Cmd-3 type the third method argument Cmd-4 type the fourth method argument Cmd-5 for future use Cmd-6 color, action-on-click, link to class comment, link to method, url Brings up a menu. To remove these properties, select more than the active part and then use command-0. Cmd-7 bold Cmd-8 italic Cmd-9 narrow (same as negative kern) Cmd-0 plain text (resets all emphasis) Cmd-- underlined (toggles it) Cmd-= struck out (toggles it) Shift-Cmd-- (aka :=) negative kern (letters 1 pixel closer) Shift-Cmd-+ positive kern (letters 1 pixel larger spread) Docking Bar Ctrl- opens the n-th (where n is between 0 and 7) menu if such exists, otherwise it moves the keyboard focus to the Search Bar. Currently this means: Ctrl-0 Activates Search Bar Ctrl-1 Squeak menu Ctrl-2 Projects menu Ctrl-3 Tools menu Ctrl-4 Apps menu Ctrl-5 Extras menu Ctrl-6 Windows menu Ctrl-7 Help menu !!' readStream nextChunkText! From commits at source.squeak.org Mon Oct 19 21:49:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:49:04 2015 Subject: [squeak-dev] The Trunk: Monticello-cmm.619.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.619.mcz ==================== Summary ==================== Name: Monticello-cmm.619 Author: cmm Time: 19 October 2015, 4:48:48.311 pm UUID: 3caf066d-c308-4b46-bb0b-af77f39ca3d2 Ancestors: Monticello-cmm.618 - Fixed hot-key for "copy reference (C)'. - Let the MC save dialog tell me what package I'm saving in the window label bar, so I can find it in the window list. - Since $R is now a global hot-key for browsing Recent Messages, change the hot key for "Refresh" in the MC Save dialog to (e). =============== Diff against Monticello-cmm.618 =============== Item was changed: ----- Method: MCCodeTool>>methodListKey:from: (in category 'menus') ----- methodListKey: aKeystroke from: aListMorph aKeystroke caseOf: { [$b] -> [self browseMethodFull]. [$h] -> [self classHierarchy]. [$p] -> [self browseFullProtocol]. [$o] -> [self fileOutMessage]. [$c] -> [self copySelector]. + [$C] -> [self copyReference]. [$n] -> [self browseSendersOfMessages]. [$m] -> [self browseMessages]. [$i] -> [self methodHierarchy]. [$v] -> [self browseVersions]} otherwise: []! Item was changed: ----- Method: MCSaveVersionDialog>>defaultLabel (in category 'ui') ----- defaultLabel + ^ 'Edit Version Name and Message: ', self name! - ^ 'Edit Version Name and Message:'! Item was changed: ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'menus') ----- methodListKey: aKeystroke from: aListMorph aKeystroke caseOf: { [$I] -> [self ignoreSelection]. + [$e] -> [self refresh]. - [$R] -> [self refresh]. } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! Item was changed: ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'menus') ----- methodListMenu: aMenu super methodListMenu: aMenu. aMenu addList:#(- ('ignore (I)' ignoreSelection 'Toggle inclusion of this change when saving.') + ('refresh (e)' refresh 'Refresh the list of changes to this package.')). - ('refresh (R)' refresh 'Refresh the list of changes to this package.')). ^aMenu! Item was added: + ----- Method: MCSaveVersionDialog>>name (in category 'accessing') ----- + name + ^ name! From commits at source.squeak.org Mon Oct 19 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151019215502.19962.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-October/009051.html Name: Protocols-cmm.51 Ancestors: Protocols-cmm.50 Open single-message browser is now activated by Command+iId. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009052.html Name: ST80-topa.188 Ancestors: ST80-eem.187 Exchange #duplicate for #debugIt on CMD-D ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009053.html Name: Morphic-topa.1012 Ancestors: Morphic-cmm.1011 Exchange #duplicate for #debugIt on CMD-D ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009054.html Name: Tools-topa.641 Ancestors: Tools-cmm.640 Exchange #duplicate for #debugIt on CMD-D (menu) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009055.html Name: Morphic-topa.1013 Ancestors: Morphic-topa.1012 Exchange #duplicate for #debugIt on CMD-D (menu icon, postscript) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009056.html Name: Protocols-topa.52 Ancestors: Protocols-cmm.51 Remove a deprecated #upTo: on a String ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009057.html Name: Morphic-cmm.1014 Ancestors: Morphic-topa.1013 - A new preference, Enable Global Command Keys, allows navigation throughout the IDE with the same hot keys available at the desktop. It is set by default, but applications might wish to disable it so they can register their own. - DockingBarMorph honors this preference too, so that applications can have Control+1 thru Control+0 too. - Hot-keys for Command+R (indent) and Command+L (outdent), respectively, have been changed to Tab and Shift+Tab, respectively, thus freeing up the letter keys for access to their global counterpart functions ((R)ecent Messages List and File (L)ist). - Transcript is also now globally available with Command+t. - Removed TextEditor>>#duplicate: because all ways to access that function through the UI were removed (in a series of separate commits). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009058.html Name: Tools-cmm.642 Ancestors: Tools-topa.641 - Fix hot-key for Eliot's "copy reference (C)". It was overloaded with "show category (C)", so show category was changed to Command+Y. - Restore the original Desktop Command keys when the user does not have Enable Global Command Keys enabled, but overload Command+Escape at the desktop level for a uniform way to close windows. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009059.html Name: Help-Squeak-Project-cmm.31 Ancestors: Help-Squeak-Project-cmm.30 Updates for recent command-key additions. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009060.html Name: Monticello-cmm.619 Ancestors: Monticello-cmm.618 - Fixed hot-key for "copy reference (C)'. - Let the MC save dialog tell me what package I'm saving in the window label bar, so I can find it in the window list. - Since $R is now a global hot-key for browsing Recent Messages, change the hot key for "Refresh" in the MC Save dialog to (e). ============================================= From ron at usmedrec.com Mon Oct 19 22:25:54 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Oct 19 22:26:01 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <5625605A.3070100@gmail.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> Message-ID: <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> Hi Robert, I went back and reviewed and this is what I sent to BIS. http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/000117.html Not much to it but we got a lot of advice from SFLC first. >From our research OS projects are allowed to host cryptographic code and make available for anyone to download. BUT that does not exclude users of the code from being restrained from exporting that code to any USA identified restricted entities. For example: http://www.state.gov/j/ct/list/c14151.htm I would recommend at the very least to register the repo with the BIS for Pharo, but I would also contact the SFLC to verify nothing has changed. All the best, Ron > -----Original Message----- > From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of > Robert Withers > Sent: Monday, October 19, 2015 5:28 PM > To: The general-purpose Squeak developers list; 'Chris Muller' > Cc: 'Pharo Development List' > Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > RandomGenerator class>>unpredictableStringsDo: > > (resending with Pharo list) > > Ron, would it be an easy process to add a second URL to the exception > paperwork. Pharo does have new ideas about code storage and distribution > that we would want to take advantage of. This would help a lot! > > Then again, screw their paperwork requirements of us. Put my name as > responsible on the Pharo code and I'll take a trip to Cuba, if they need a > scape goat for their 20th century thinking. Crypto is already out of the bag > and everyone uses it freely. Just do it and ask permission later. > > In thinking about consolidating crypto code between squeak and pharo, I > would guess there would be a thin capatibility layer for each system, then > the Crypto code in the main. My goal is to have compatibility, crypto and > plugins on both virtual platforms. > > Thanks so much ^^ > > Robert > > On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: > > Hi Chris, > > > > The exemption is not for the location of the server but the URL where it is > hosted. I'm happy to help in any way I can but I don't have access to the > Pharo Repos. I have no issue with having Pharo packages on SqueakSource if > that is what everyone agrees too. We have multiple packages hosted there. > It's ok with me if we host some pharo code there too. > > > > All the best, > > > > Ron > > > >> -----Original Message----- > >> From: Chris Muller [mailto:ma.chris.m@gmail.com] > >> Sent: Monday, October 19, 2015 3:59 PM > >> To: Ron Teitelbaum > >> Cc: Pharo Development List; The general-purpose Squeak developers > >> list > >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > >> RandomGenerator class>>unpredictableStringsDo: > >> > >> Heh, well, since then SqueakSource itself was moved to a different > >> server in a different country. I guess there was also a mirror of > >> SqueakSource hosted in Chile under a different URL for many years. > >> > >> I'm doubtful any of it matters, but we wouldn't want anyone to end up > >> in Gitmo over it. If you're uncomfortable about hosting a copy > >> elsewhere, then please at least namespace-prefix the Pharo-specific > >> packages, to at least help keep it from becoming a tangled mess. > >> > >> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum > >> wrote: > >>> Hi All, > >>> > >>> Unless someone filed the proper paperwork I would suggest NOT moving > >> the cryptography code anywhere except for SqueakSource. When we > >> started the project we spent time ensuring that we had a proper > >> exemption from the U.S. regulations on exporting cryptographic code. > >> If someone copied and forked the code that exemption may not still > >> apply to that new repository. > >>> > >>> I'm not personally involved with the code on Pharo, not sure who is > >>> doing > >> crypto there. > >>> > >>> All the best, > >>> > >>> Ron > >>> > >>>> -----Original Message----- > >>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On > >>>> Behalf Of Chris Muller > >>>> Sent: Monday, October 19, 2015 2:47 PM > >>>> To: The general-purpose Squeak developers list > >>>> Cc: Pharo Development List > >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > >>>> RandomGenerator class>>unpredictableStringsDo: > >>>> > >>>> Yes, if a common package for both Squeak and Pharo is possible, > >>>> that'd be great. Otherwise, the Squeak and Pharo versions should > >>>> reside in separate repositories. Squeak users are still using > >>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. > >>>> > >>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers > >>>> wrote: > >>>>> hey Ron, > >>>>> > >>>>> It was actually the Pharo Cryptography team I was thinking of. > >>>>> Perhaps we can get the same package to work in both squeak and > >>>>> Pharo, with use of installable entropy sources or the like. In > >>>>> order to get SqueakElib running in Pharo I need crypto and we may > >>>>> as > >> well do it right. > >>>>> > >>>>> Cheers, > >>>>> Robert > >>>>> > >>>>> > >>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: > >>>>>> > >>>>>> Hi Robert, > >>>>>> > >>>>>> You are already on the Cryptograph repo on SqueakSource.com as an > >>>> admin. > >>>>>> Please feel free to reorg if you like. > >>>>>> > >>>>>> Let me know if you have trouble resurrecting your account. > >>>>>> > >>>>>> All the best, > >>>>>> > >>>>>> Ron > >>>>>> > >>>>>>> -----Original Message----- > >>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org > >>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On > >>>>>>> Behalf Of Robert Withers > >>>>>>> Sent: Monday, October 19, 2015 1:53 PM > >>>>>>> To: squeak-dev@lists.squeakfoundation.org > >>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to > >>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: > >>>>>>> > >>>>>>> This is great guys. Is there a way to get this from the image? > >>>>>>> Good to get > >>>>>> > >>>>>> it > >>>>>>> > >>>>>>> with an FFI/OSProcess call or something. > >>>>>>> > >>>>>>> Thank you, > >>>>>>> Robert > >>>>>>> > >>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > >>>>>>>> > >>>>>>>> Hi Guys, > >>>>>>>> > >>>>>>>> How about getting the CPU temperature. I think most CPUs > >>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I > >>>>>>>> think it is seven bits. The real range should be less than > >>>>>>>> that but it may be enough to help add some entropy. > >>>>>>>> > >>>>>>>> Lou > >>>>>>>> > >>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > >>>>>>>> wrote: > >>>>>>>> > >>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, > >>>>>>>>> hasn't > >> it? > >>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope > >>>>>>>>> these have been kind years to you, as they have for me. > >>>>>>>>> > >>>>>>>>> I love the idea of optional sources of entropy, depending on > >>>>>>>>> the deployed capabilities. So there are our mouse points and > >>>>>>>>> such, because they ought to be optional. > >>>>>>>>> > >>>>>>>>> What are some reliably present sources in the most minimal > >>>> situation? > >>>>>>>>> If we could define minimal as an image with no image level I/O > >>>>>>>>> beyond file I/O, I would think we'd have: Kernel, System, > >>>>>>>>> Collections, Compiler and FFI. Some intransitives in that > >>>>>>>>> scope for entropy would be > >>>>>>> > >>>>>>> grand. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I was thinking to take 5 millisecondClockValues, separated by > >>>>>>>>> 4 non-secure random intervals: take the low order byte of the > >>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. > >>>>>>>>> > >>>>>>>>> I can coordinate these changes. Ron, could you add me to the > >>>>>>>>> Cryptography team so I can upload the Pharo Cryptography > >>>>>>> > >>>>>>> #bleedingEdge? > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks and I look forward to more, :) > >>>>>>>>> > >>>>>>>>> Robert > >>>>>>>>> > >>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > >>>>>>>>>> > >>>>>>>>>> Hi Robert, > >>>>>>>>>> > >>>>>>>>>> Nice to see you! > >>>>>>>>>> > >>>>>>>>>> Looks interesting I know that Chris did something gathering > >>>>>>>>>> sources of > >>>>>>> > >>>>>>> entropy. Seems like the more the better. Could you just make > >>>>>>> the entropy sources optional such that if they exist we use them? > >>>>>>> I would have to go back and see what Chris did but he was > >>>>>>> following suggestions from Schneider in his secureRandom. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> All the best, > >>>>>>>>>> > >>>>>>>>>> Ron Teitelbaum > >>>>>>>>>> > >>>>>>>>>>> -----Original Message----- > >>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] > >>>>>>>>>>> On Behalf Of Robert Withers > >>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM > >>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo > >>>>>>>>>>> Development List > >>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] > >>>>>>>>>>> RandomGenerator > >>>>>>>>>>> class>>unpredictableStringsDo: > >>>>>>>>>>> > >>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, > >>>>>>>>>>> followed by my modified Pharo method below. I welcome any > >>>> feedback. > >>>>>>>>>>> > >>>>>>>>>>> Regards, > >>>>>>>>>>> Robert > >>>>>>>>>>> > >>>>>>>>>>> --- > >>>>>>>>>>> Existing: > >>>>>>>>>>> unpredictableStringsDo: aBlock > >>>>>>>>>>> "Enumerate sources of information from my > >>>>>>>>>>> environment that > >>>>>>> > >>>>>>> should > >>>>>>>>>>> > >>>>>>>>>>> be generally hard to guess." > >>>>>>>>>>> | time | > >>>>>>>>>>> time := Time millisecondsToRun: > >>>>>>>>>>> [ aBlock > >>>>>>>>>>> value: World imageForm bits > >>>>>>>>>>> compressToByteArray ; > >>>>>>>>>>> value: Sensor mousePoint x asString ; > >>>>>>>>>>> value: Sensor mousePoint y asString ; > >>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>> asByteArray ; > >>>>>>>>>>> value: Date today asString ; > >>>>>>>>>>> value: Time now asString ; > >>>>>>>>>>> value: Display extent asString. > >>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>>>>>> #(vmVersion platformName primVmPath > >>>>>>>>>>> imageName > >>>>>>> > >>>>>>> platformSubtype > >>>>>>>>>>> > >>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString > >>>>>>>>>>> imageName) > >>>>>>>>>>> collect: > >>>>>>>>>>> [ : each | > >>>>>>>>>>> aBlock value: (SmalltalkImage > >>>>>>>>>>> current > >>>>>>>>>>> perform: each) > >>>>>>> > >>>>>>> asByteArray > >>>>>>>>>>> > >>>>>>>>>>> ] ]. > >>>>>>>>>>> aBlock > >>>>>>>>>>> value: time asByteArray; > >>>>>>>>>>> "maybe the pointer has moved, hit it again." > >>>>>>>>>>> value: Sensor mousePoint asString ; > >>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>> asByteArray > >>>>>>>>>>> > >>>>>>>>>>> --- > >>>>>>>>>>> Pharo port: > >>>>>>>>>>> unpredictableStringsDo: aBlock > >>>>>>>>>>> "Enumerate sources of information from my > >>>>>>>>>>> environment that > >>>>>>> > >>>>>>> should > >>>>>>>>>>> > >>>>>>>>>>> be generally hard to guess." > >>>>>>>>>>> > >>>>>>>>>>> | time | > >>>>>>>>>>> time := Time millisecondsToRun: > >>>>>>>>>>> [ aBlock > >>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>> asByteArray ; > >>>>>>>>>>> value: Date today asString ; > >>>>>>>>>>> value: Time now asString. > >>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>>>>>> #(version primImagePath imagePath > >>>>>>>>>>> datedVersion > >>>>>>>>>>> lastQuitLogPosition) > >>>>>>>>>>> collect: > >>>>>>>>>>> [ : each | > >>>>>>>>>>> aBlock value: (SmalltalkImage > >>>>>>>>>>> current > >>>>>>>>>>> perform: each) > >>>>>>> > >>>>>>> asByteArray > >>>>>>>>>>> > >>>>>>>>>>> ] ]. > >>>>>>>>>>> aBlock > >>>>>>>>>>> value: time asByteArray; > >>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>> asByteArray > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: > >>>>>>>>>>>> > >>>>>>>>>>>> This is a message intended for anyone who was on the > >>>>>>>>>>>> Cryptography > >>>>>>> > >>>>>>> team. > >>>>>>>>>>>> > >>>>>>>>>>>> I recently ported it to Pharo and had to make changes to > >>>>>>>>>>> > >>>>>>>>>>> RandomGenerator > >>>>>>>>>>>> > >>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed some > >>>>>>>>>>>> class>>uncertainty > >>>>>>>>>>>> from the results of this message. My question is what > >>>>>>>>>>>> should I do about that? This method seems to require > >>>>>>>>>>>> non-headless, as it is checking the mouse point and such. > >>>>>>>>>>>> This being a crypto cornerstone, what the best answer here. > >>>>>>>>>>>> > >>>>>>>>>>>> Thank you, > >>>>>>>>>>>> Robert > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>> > >>>>>>>> ----------------------------------------------------------- > >>>>>>>> Louis LaBrunda > >>>>>>>> Keystone Software Corp. > >>>>>>>> SkypeMe callto://PhotonDemon > >>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- > >>>> Software.com > >>>>>>>> > >>>>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > >>> > >>> > > > > From robert.w.withers at gmail.com Mon Oct 19 22:30:11 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Mon Oct 19 22:30:15 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> Message-ID: <56256EF3.1060208@gmail.com> Thank you for you research and advise on how to make it right, Ron. I may look into it, but I don't want to promise you that I will definitely. I will certainly put this in my crypto folder, though. :) ... ^^ robert On 10/19/2015 06:25 PM, Ron Teitelbaum wrote: > Hi Robert, > > I went back and reviewed and this is what I sent to BIS. > > http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/000117.html > > Not much to it but we got a lot of advice from SFLC first. > >>From our research OS projects are allowed to host cryptographic code and make available for anyone to download. BUT that does not exclude users of the code from being restrained from exporting that code to any USA identified restricted entities. For example: http://www.state.gov/j/ct/list/c14151.htm > > I would recommend at the very least to register the repo with the BIS for Pharo, but I would also contact the SFLC to verify nothing has changed. > > All the best, > > Ron > >> -----Original Message----- >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Robert Withers >> Sent: Monday, October 19, 2015 5:28 PM >> To: The general-purpose Squeak developers list; 'Chris Muller' >> Cc: 'Pharo Development List' >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> (resending with Pharo list) >> >> Ron, would it be an easy process to add a second URL to the exception >> paperwork. Pharo does have new ideas about code storage and distribution >> that we would want to take advantage of. This would help a lot! >> >> Then again, screw their paperwork requirements of us. Put my name as >> responsible on the Pharo code and I'll take a trip to Cuba, if they need a >> scape goat for their 20th century thinking. Crypto is already out of the bag >> and everyone uses it freely. Just do it and ask permission later. >> >> In thinking about consolidating crypto code between squeak and pharo, I >> would guess there would be a thin capatibility layer for each system, then >> the Crypto code in the main. My goal is to have compatibility, crypto and >> plugins on both virtual platforms. >> >> Thanks so much ^^ >> >> Robert >> >> On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: >>> Hi Chris, >>> >>> The exemption is not for the location of the server but the URL where it is >> hosted. I'm happy to help in any way I can but I don't have access to the >> Pharo Repos. I have no issue with having Pharo packages on SqueakSource if >> that is what everyone agrees too. We have multiple packages hosted there. >> It's ok with me if we host some pharo code there too. >>> >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- >>>> From: Chris Muller [mailto:ma.chris.m@gmail.com] >>>> Sent: Monday, October 19, 2015 3:59 PM >>>> To: Ron Teitelbaum >>>> Cc: Pharo Development List; The general-purpose Squeak developers >>>> list >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>> RandomGenerator class>>unpredictableStringsDo: >>>> >>>> Heh, well, since then SqueakSource itself was moved to a different >>>> server in a different country. I guess there was also a mirror of >>>> SqueakSource hosted in Chile under a different URL for many years. >>>> >>>> I'm doubtful any of it matters, but we wouldn't want anyone to end up >>>> in Gitmo over it. If you're uncomfortable about hosting a copy >>>> elsewhere, then please at least namespace-prefix the Pharo-specific >>>> packages, to at least help keep it from becoming a tangled mess. >>>> >>>> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >>>> wrote: >>>>> Hi All, >>>>> >>>>> Unless someone filed the proper paperwork I would suggest NOT moving >>>> the cryptography code anywhere except for SqueakSource. When we >>>> started the project we spent time ensuring that we had a proper >>>> exemption from the U.S. regulations on exporting cryptographic code. >>>> If someone copied and forked the code that exemption may not still >>>> apply to that new repository. >>>>> >>>>> I'm not personally involved with the code on Pharo, not sure who is >>>>> doing >>>> crypto there. >>>>> >>>>> All the best, >>>>> >>>>> Ron >>>>> >>>>>> -----Original Message----- >>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>> Behalf Of Chris Muller >>>>>> Sent: Monday, October 19, 2015 2:47 PM >>>>>> To: The general-purpose Squeak developers list >>>>>> Cc: Pharo Development List >>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>>>> RandomGenerator class>>unpredictableStringsDo: >>>>>> >>>>>> Yes, if a common package for both Squeak and Pharo is possible, >>>>>> that'd be great. Otherwise, the Squeak and Pharo versions should >>>>>> reside in separate repositories. Squeak users are still using >>>>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. >>>>>> >>>>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>>>> wrote: >>>>>>> hey Ron, >>>>>>> >>>>>>> It was actually the Pharo Cryptography team I was thinking of. >>>>>>> Perhaps we can get the same package to work in both squeak and >>>>>>> Pharo, with use of installable entropy sources or the like. In >>>>>>> order to get SqueakElib running in Pharo I need crypto and we may >>>>>>> as >>>> well do it right. >>>>>>> >>>>>>> Cheers, >>>>>>> Robert >>>>>>> >>>>>>> >>>>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>>>> >>>>>>>> Hi Robert, >>>>>>>> >>>>>>>> You are already on the Cryptograph repo on SqueakSource.com as an >>>>>> admin. >>>>>>>> Please feel free to reorg if you like. >>>>>>>> >>>>>>>> Let me know if you have trouble resurrecting your account. >>>>>>>> >>>>>>>> All the best, >>>>>>>> >>>>>>>> Ron >>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org >>>>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On >>>>>>>>> Behalf Of Robert Withers >>>>>>>>> Sent: Monday, October 19, 2015 1:53 PM >>>>>>>>> To: squeak-dev@lists.squeakfoundation.org >>>>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to >>>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>>>> >>>>>>>>> This is great guys. Is there a way to get this from the image? >>>>>>>>> Good to get >>>>>>>> >>>>>>>> it >>>>>>>>> >>>>>>>>> with an FFI/OSProcess call or something. >>>>>>>>> >>>>>>>>> Thank you, >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>>>> >>>>>>>>>> Hi Guys, >>>>>>>>>> >>>>>>>>>> How about getting the CPU temperature. I think most CPUs >>>>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I >>>>>>>>>> think it is seven bits. The real range should be less than >>>>>>>>>> that but it may be enough to help add some entropy. >>>>>>>>>> >>>>>>>>>> Lou >>>>>>>>>> >>>>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, >>>>>>>>>>> hasn't >>>> it? >>>>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope >>>>>>>>>>> these have been kind years to you, as they have for me. >>>>>>>>>>> >>>>>>>>>>> I love the idea of optional sources of entropy, depending on >>>>>>>>>>> the deployed capabilities. So there are our mouse points and >>>>>>>>>>> such, because they ought to be optional. >>>>>>>>>>> >>>>>>>>>>> What are some reliably present sources in the most minimal >>>>>> situation? >>>>>>>>>>> If we could define minimal as an image with no image level I/O >>>>>>>>>>> beyond file I/O, I would think we'd have: Kernel, System, >>>>>>>>>>> Collections, Compiler and FFI. Some intransitives in that >>>>>>>>>>> scope for entropy would be >>>>>>>>> >>>>>>>>> grand. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I was thinking to take 5 millisecondClockValues, separated by >>>>>>>>>>> 4 non-secure random intervals: take the low order byte of the >>>>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. >>>>>>>>>>> >>>>>>>>>>> I can coordinate these changes. Ron, could you add me to the >>>>>>>>>>> Cryptography team so I can upload the Pharo Cryptography >>>>>>>>> >>>>>>>>> #bleedingEdge? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>>>> >>>>>>>>>>> Robert >>>>>>>>>>> >>>>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi Robert, >>>>>>>>>>>> >>>>>>>>>>>> Nice to see you! >>>>>>>>>>>> >>>>>>>>>>>> Looks interesting I know that Chris did something gathering >>>>>>>>>>>> sources of >>>>>>>>> >>>>>>>>> entropy. Seems like the more the better. Could you just make >>>>>>>>> the entropy sources optional such that if they exist we use them? >>>>>>>>> I would have to go back and see what Chris did but he was >>>>>>>>> following suggestions from Schneider in his secureRandom. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> All the best, >>>>>>>>>>>> >>>>>>>>>>>> Ron Teitelbaum >>>>>>>>>>>> >>>>>>>>>>>>> -----Original Message----- >>>>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] >>>>>>>>>>>>> On Behalf Of Robert Withers >>>>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo >>>>>>>>>>>>> Development List >>>>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>> class>>unpredictableStringsDo: >>>>>>>>>>>>> >>>>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, >>>>>>>>>>>>> followed by my modified Pharo method below. I welcome any >>>>>> feedback. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Robert >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Existing: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> >>>>>>>>> should >>>>>>>>>>>>> >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: World imageForm bits >>>>>>>>>>>>> compressToByteArray ; >>>>>>>>>>>>> value: Sensor mousePoint x asString ; >>>>>>>>>>>>> value: Sensor mousePoint y asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString ; >>>>>>>>>>>>> value: Display extent asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(vmVersion platformName primVmPath >>>>>>>>>>>>> imageName >>>>>>>>> >>>>>>>>> platformSubtype >>>>>>>>>>>>> >>>>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>>>>>>>> imageName) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> >>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> "maybe the pointer has moved, hit it again." >>>>>>>>>>>>> value: Sensor mousePoint asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Pharo port: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> >>>>>>>>> should >>>>>>>>>>>>> >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(version primImagePath imagePath >>>>>>>>>>>>> datedVersion >>>>>>>>>>>>> lastQuitLogPosition) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> >>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> This is a message intended for anyone who was on the >>>>>>>>>>>>>> Cryptography >>>>>>>>> >>>>>>>>> team. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>>>>>>>> >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>>> >>>>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>>>>>>>>> class>>uncertainty >>>>>>>>>>>>>> from the results of this message. My question is what >>>>>>>>>>>>>> should I do about that? This method seems to require >>>>>>>>>>>>>> non-headless, as it is checking the mouse point and such. >>>>>>>>>>>>>> This being a crypto cornerstone, what the best answer here. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you, >>>>>>>>>>>>>> Robert >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> ----------------------------------------------------------- >>>>>>>>>> Louis LaBrunda >>>>>>>>>> Keystone Software Corp. >>>>>>>>>> SkypeMe callto://PhotonDemon >>>>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>>>> Software.com >>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>> >>>>> >>> >>> > > > From commits at source.squeak.org Mon Oct 19 22:52:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 19 22:52:27 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.1015.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1015.mcz ==================== Summary ==================== Name: Morphic-topa.1015 Author: topa Time: 20 October 2015, 12:51:55.209 am UUID: b4010760-9a9b-48f0-85b5-135982c5068c Ancestors: Morphic-cmm.1014 Fix World-Halo MNU * option-click in World -> Halo * click on Menu bubble (red icon) =============== Diff against Morphic-cmm.1014 =============== Item was added: + ----- Method: SolidFillStyle>>addFillStyleMenuItems:hand:from: (in category '*Morphic-Balloon') ----- + addFillStyleMenuItems: aMenu hand: aHand from: aMorph + ^ self asColor addFillStyleMenuItems: aMenu hand: aHand from: aMorph! From robert.w.withers at gmail.com Tue Oct 20 00:13:44 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Tue Oct 20 00:13:49 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> Message-ID: <56258738.2060807@gmail.com> Thank you Ron, I'll look into it. Regards, ... ^^ robert On 10/19/2015 06:25 PM, Ron Teitelbaum wrote: > Hi Robert, > > I went back and reviewed and this is what I sent to BIS. > > http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/000117.html > > Not much to it but we got a lot of advice from SFLC first. > >>From our research OS projects are allowed to host cryptographic code and make available for anyone to download. BUT that does not exclude users of the code from being restrained from exporting that code to any USA identified restricted entities. For example: http://www.state.gov/j/ct/list/c14151.htm > > I would recommend at the very least to register the repo with the BIS for Pharo, but I would also contact the SFLC to verify nothing has changed. > > All the best, > > Ron > >> -----Original Message----- >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Robert Withers >> Sent: Monday, October 19, 2015 5:28 PM >> To: The general-purpose Squeak developers list; 'Chris Muller' >> Cc: 'Pharo Development List' >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> (resending with Pharo list) >> >> Ron, would it be an easy process to add a second URL to the exception >> paperwork. Pharo does have new ideas about code storage and distribution >> that we would want to take advantage of. This would help a lot! >> >> Then again, screw their paperwork requirements of us. Put my name as >> responsible on the Pharo code and I'll take a trip to Cuba, if they need a >> scape goat for their 20th century thinking. Crypto is already out of the bag >> and everyone uses it freely. Just do it and ask permission later. >> >> In thinking about consolidating crypto code between squeak and pharo, I >> would guess there would be a thin capatibility layer for each system, then >> the Crypto code in the main. My goal is to have compatibility, crypto and >> plugins on both virtual platforms. >> >> Thanks so much ^^ >> >> Robert >> >> On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: >>> Hi Chris, >>> >>> The exemption is not for the location of the server but the URL where it is >> hosted. I'm happy to help in any way I can but I don't have access to the >> Pharo Repos. I have no issue with having Pharo packages on SqueakSource if >> that is what everyone agrees too. We have multiple packages hosted there. >> It's ok with me if we host some pharo code there too. >>> >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- >>>> From: Chris Muller [mailto:ma.chris.m@gmail.com] >>>> Sent: Monday, October 19, 2015 3:59 PM >>>> To: Ron Teitelbaum >>>> Cc: Pharo Development List; The general-purpose Squeak developers >>>> list >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>> RandomGenerator class>>unpredictableStringsDo: >>>> >>>> Heh, well, since then SqueakSource itself was moved to a different >>>> server in a different country. I guess there was also a mirror of >>>> SqueakSource hosted in Chile under a different URL for many years. >>>> >>>> I'm doubtful any of it matters, but we wouldn't want anyone to end up >>>> in Gitmo over it. If you're uncomfortable about hosting a copy >>>> elsewhere, then please at least namespace-prefix the Pharo-specific >>>> packages, to at least help keep it from becoming a tangled mess. >>>> >>>> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >>>> wrote: >>>>> Hi All, >>>>> >>>>> Unless someone filed the proper paperwork I would suggest NOT moving >>>> the cryptography code anywhere except for SqueakSource. When we >>>> started the project we spent time ensuring that we had a proper >>>> exemption from the U.S. regulations on exporting cryptographic code. >>>> If someone copied and forked the code that exemption may not still >>>> apply to that new repository. >>>>> >>>>> I'm not personally involved with the code on Pharo, not sure who is >>>>> doing >>>> crypto there. >>>>> >>>>> All the best, >>>>> >>>>> Ron >>>>> >>>>>> -----Original Message----- >>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>> Behalf Of Chris Muller >>>>>> Sent: Monday, October 19, 2015 2:47 PM >>>>>> To: The general-purpose Squeak developers list >>>>>> Cc: Pharo Development List >>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>>>> RandomGenerator class>>unpredictableStringsDo: >>>>>> >>>>>> Yes, if a common package for both Squeak and Pharo is possible, >>>>>> that'd be great. Otherwise, the Squeak and Pharo versions should >>>>>> reside in separate repositories. Squeak users are still using >>>>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. >>>>>> >>>>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>>>> wrote: >>>>>>> hey Ron, >>>>>>> >>>>>>> It was actually the Pharo Cryptography team I was thinking of. >>>>>>> Perhaps we can get the same package to work in both squeak and >>>>>>> Pharo, with use of installable entropy sources or the like. In >>>>>>> order to get SqueakElib running in Pharo I need crypto and we may >>>>>>> as >>>> well do it right. >>>>>>> >>>>>>> Cheers, >>>>>>> Robert >>>>>>> >>>>>>> >>>>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>>>> >>>>>>>> Hi Robert, >>>>>>>> >>>>>>>> You are already on the Cryptograph repo on SqueakSource.com as an >>>>>> admin. >>>>>>>> Please feel free to reorg if you like. >>>>>>>> >>>>>>>> Let me know if you have trouble resurrecting your account. >>>>>>>> >>>>>>>> All the best, >>>>>>>> >>>>>>>> Ron >>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org >>>>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On >>>>>>>>> Behalf Of Robert Withers >>>>>>>>> Sent: Monday, October 19, 2015 1:53 PM >>>>>>>>> To: squeak-dev@lists.squeakfoundation.org >>>>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to >>>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>>>> >>>>>>>>> This is great guys. Is there a way to get this from the image? >>>>>>>>> Good to get >>>>>>>> >>>>>>>> it >>>>>>>>> >>>>>>>>> with an FFI/OSProcess call or something. >>>>>>>>> >>>>>>>>> Thank you, >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>>>> >>>>>>>>>> Hi Guys, >>>>>>>>>> >>>>>>>>>> How about getting the CPU temperature. I think most CPUs >>>>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I >>>>>>>>>> think it is seven bits. The real range should be less than >>>>>>>>>> that but it may be enough to help add some entropy. >>>>>>>>>> >>>>>>>>>> Lou >>>>>>>>>> >>>>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, >>>>>>>>>>> hasn't >>>> it? >>>>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope >>>>>>>>>>> these have been kind years to you, as they have for me. >>>>>>>>>>> >>>>>>>>>>> I love the idea of optional sources of entropy, depending on >>>>>>>>>>> the deployed capabilities. So there are our mouse points and >>>>>>>>>>> such, because they ought to be optional. >>>>>>>>>>> >>>>>>>>>>> What are some reliably present sources in the most minimal >>>>>> situation? >>>>>>>>>>> If we could define minimal as an image with no image level I/O >>>>>>>>>>> beyond file I/O, I would think we'd have: Kernel, System, >>>>>>>>>>> Collections, Compiler and FFI. Some intransitives in that >>>>>>>>>>> scope for entropy would be >>>>>>>>> >>>>>>>>> grand. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I was thinking to take 5 millisecondClockValues, separated by >>>>>>>>>>> 4 non-secure random intervals: take the low order byte of the >>>>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. >>>>>>>>>>> >>>>>>>>>>> I can coordinate these changes. Ron, could you add me to the >>>>>>>>>>> Cryptography team so I can upload the Pharo Cryptography >>>>>>>>> >>>>>>>>> #bleedingEdge? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>>>> >>>>>>>>>>> Robert >>>>>>>>>>> >>>>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi Robert, >>>>>>>>>>>> >>>>>>>>>>>> Nice to see you! >>>>>>>>>>>> >>>>>>>>>>>> Looks interesting I know that Chris did something gathering >>>>>>>>>>>> sources of >>>>>>>>> >>>>>>>>> entropy. Seems like the more the better. Could you just make >>>>>>>>> the entropy sources optional such that if they exist we use them? >>>>>>>>> I would have to go back and see what Chris did but he was >>>>>>>>> following suggestions from Schneider in his secureRandom. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> All the best, >>>>>>>>>>>> >>>>>>>>>>>> Ron Teitelbaum >>>>>>>>>>>> >>>>>>>>>>>>> -----Original Message----- >>>>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] >>>>>>>>>>>>> On Behalf Of Robert Withers >>>>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo >>>>>>>>>>>>> Development List >>>>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>> class>>unpredictableStringsDo: >>>>>>>>>>>>> >>>>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, >>>>>>>>>>>>> followed by my modified Pharo method below. I welcome any >>>>>> feedback. >>>>>>>>>>>>> >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Robert >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Existing: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> >>>>>>>>> should >>>>>>>>>>>>> >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: World imageForm bits >>>>>>>>>>>>> compressToByteArray ; >>>>>>>>>>>>> value: Sensor mousePoint x asString ; >>>>>>>>>>>>> value: Sensor mousePoint y asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString ; >>>>>>>>>>>>> value: Display extent asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(vmVersion platformName primVmPath >>>>>>>>>>>>> imageName >>>>>>>>> >>>>>>>>> platformSubtype >>>>>>>>>>>>> >>>>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>>>>>>>> imageName) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> >>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> "maybe the pointer has moved, hit it again." >>>>>>>>>>>>> value: Sensor mousePoint asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Pharo port: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> >>>>>>>>> should >>>>>>>>>>>>> >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(version primImagePath imagePath >>>>>>>>>>>>> datedVersion >>>>>>>>>>>>> lastQuitLogPosition) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> >>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> This is a message intended for anyone who was on the >>>>>>>>>>>>>> Cryptography >>>>>>>>> >>>>>>>>> team. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>>>>>>>> >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>>> >>>>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>>>>>>>>> class>>uncertainty >>>>>>>>>>>>>> from the results of this message. My question is what >>>>>>>>>>>>>> should I do about that? This method seems to require >>>>>>>>>>>>>> non-headless, as it is checking the mouse point and such. >>>>>>>>>>>>>> This being a crypto cornerstone, what the best answer here. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you, >>>>>>>>>>>>>> Robert >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> ----------------------------------------------------------- >>>>>>>>>> Louis LaBrunda >>>>>>>>>> Keystone Software Corp. >>>>>>>>>> SkypeMe callto://PhotonDemon >>>>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>>>> Software.com >>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>> >>>>> >>> >>> > > > From asqueaker at gmail.com Tue Oct 20 00:55:46 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 20 00:55:49 2015 Subject: [squeak-dev] The Trunk: Help-Squeak-Project-cmm.31.mcz In-Reply-To: <56256487.e769b40a.9f97e.5d0cSMTPIN_ADDED_MISSING@mx.google.com> References: <56256487.e769b40a.9f97e.5d0cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: OMG, I'll fix my spelling errors. On Mon, Oct 19, 2015 at 4:45 PM, wrote: > Chris Muller uploaded a new version of Help-Squeak-Project to project The Trunk: > http://source.squeak.org/trunk/Help-Squeak-Project-cmm.31.mcz > > ==================== Summary ==================== > > Name: Help-Squeak-Project-cmm.31 > Author: cmm > Time: 19 October 2015, 4:45:28.777 pm > UUID: c5667fc2-8a6b-4772-95f8-e62e6319806f > Ancestors: Help-Squeak-Project-cmm.30 > > Updates for recent command-key additions. > > =============== Diff against Help-Squeak-Project-cmm.30 =============== > > Item was changed: > ----- Method: SqueakTutorialsCommandKey class>>commandKeyMappings (in category 'as yet unclassified') ----- > commandKeyMappings > "This method was automatically generated. Edit it using:" > "SqueakTutorialsCommandKey edit: #commandKeyMappings" > ^HelpTopic > title: 'Command Key Mappings' > contents: > 'Lower-case command keys > (use with Cmd key on Mac and Alt key on other platforms) > a Select all > b Browse it (selection is a class name or cursor is over a class-list or message-list) > c Copy selection > d Do it (selection is a valid expression) > e Exchange selection with prior selection > f Find > g Find again > h Set selection as search string for find again > i Inspect it (selection is a valid expression, or selection is over an inspect-ilst) > j Again once (do the last text-related operation again) > k Set font > l Cancel > m Implementors of it (selection is a message selector or cursor is over a class-list or message-list) > n Senders of it (selection is a message selector or cursor is over a class-list or message-list) > o Spawn current method > p Print it (selection is a valid expression) > q Query symbol (toggle all possible completion for a given prefix) > r Recognizer > s Save (i.e. accept) > t Finds a Transcript (when cursor is over the desktop) > u Toggle alignment > v Paste > w Delete preceding word (over text); Close-window (over morphic desktop) > x Cut selection > y Swap characters > z Undo > > Note: for Do it, Senders of it, etc., a null selection will be expanded to a word or to the current line in an attempt to do what you want. Also note that Senders/Implementors of it will find the outermost keyword selector in a large selection, as when you have selected a bracketed expression or an entire line. Finally note that the same cmd-m and cmd-n (and cmd-v for versions) work in the message pane of most browsers. > > Upper-case command keys > (use with Shift-Cmd, or Ctrl on Mac > or Shift-Alt on other platforms; sometimes Ctrl works too) > A Advance argument > B Browse it in this same browser (in System browsers only) > C Compare the selected text to the clipboard contents > + D Debug-It > - D Duplicate > E Method strings containing it > F Insert ''ifFalse:'' > G fileIn from it (a file name) > H cursor TopHome: > I Inspect via Object Explorer > J Again many (apply the previous text command repeatedly until the end of the text) > K Set style > L Outdent (move selection one tab-stop left) > M Select current type-in > N References to it (selection is a class name, or cursor is over a class-list or message-list) > O Open single-message browser (in message lists) > P Make project link > R Indent (move selection one tab-stap right) > S Search > T Insert ''ifTrue:'' > U Convert linefeeds to carriage returns in selection > V Paste author''s initials > W Selectors containing it (in text); show-world-menu (when issued with cursor over desktop) > X Force selection to lowercase > Y Force selection to uppercase > Z Capitalize all words in selection > > Other special keys > Backspace Backward delete character > + Shift-Bksp Backward select or delete word > Del Forward delete character > - Shift-Bksp Backward delete word > Shift-Del Forward delete word > Esc Pop up the context menu > Shift+Esc Pop up the World Menu > + Cmd+Esc Close the active window > + Ctrl+Esc Present a list of open windows > + \ Send the active window to the back > - Command+Esc Close the active window > - \ Send top window to back > - Control+Esc Present a list of open windows > > Cursor keys > left, right, > up, down Move cursor left, right, up or down > Ctrl-left Move cursor left one word > Ctrl-right Move cursor right one word > Home Move cursor to begin of line or begin of text > End Move cursor to end of line or end of text > PgUp, Ctrl-up Move cursor up one page > PgDown, Ctrl-Dn Move cursor down one page > > Note all these keys can be used together with Shift to define or enlarge the selection. You cannot however shrink that selection again, as in some other systems. > > Other Cmd-key combinations (not available on all platforms) > Return Insert return followed by as many tabs as the previous line > (with a further adjustment for additional brackets in that line) > Space Select the current word as with double clicking > > Enclose the selection in a kind of bracket. Each is a toggle. > (not available on all platforms) > + Ctrl-( Toggle enclosure within parentheses > + Ctrl-[ Toggle enclosure within brackets > + Crtl-{ Toggle enclosre within curly braces > + Ctrl-< Toggle enclosre within less-than / greater-than (HTML) > + Ctrl-'' Toggle enclosure within double-quotes > + Ctrl-'' Toggle encllosure within single-quotes > + > - Ctrl-( Enclose within ( and ), or remove enclosing ( and ) > - Ctrl-[ Enclose within [ and ], or remove enclosing [ and ] > - Crtl-{ Enclose within { and }, or remove enclosing { and } > - Ctrl-< Enclose within < and >, or remove enclosing < and > > - Ctrl-'' Enclose within '' and '', or remove enclosing '' and '' > - Ctrl-" Enclose within " and ", or remove enclosing " and " > Note also that you can double-click just inside any of the above delimiters, > or at the beginning or end of a line, to select the text enclosed. > > Text Emphasis > (not available on all platforms) > Cmd-1 type the first method argument > Cmd-2 type the second method argument > Cmd-3 type the third method argument > Cmd-4 type the fourth method argument > Cmd-5 for future use > Cmd-6 color, action-on-click, link to class comment, link to method, url > Brings up a menu. To remove these properties, select > more than the active part and then use command-0. > Cmd-7 bold > Cmd-8 italic > Cmd-9 narrow (same as negative kern) > Cmd-0 plain text (resets all emphasis) > Cmd-- underlined (toggles it) > Cmd-= struck out (toggles it) > > Shift-Cmd-- (aka :=) negative kern (letters 1 pixel closer) > Shift-Cmd-+ positive kern (letters 1 pixel larger spread) > > Docking Bar > Ctrl- opens the n-th (where n is between 0 and 7) menu if such exists, otherwise it moves the keyboard focus to the Search Bar. Currently this means: > Ctrl-0 Activates Search Bar > Ctrl-1 Squeak menu > Ctrl-2 Projects menu > Ctrl-3 Tools menu > Ctrl-4 Apps menu > Ctrl-5 Extras menu > Ctrl-6 Windows menu > Ctrl-7 Help menu > !!' readStream nextChunkText! > > From eliot.miranda at gmail.com Tue Oct 20 02:19:16 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 20 02:19:20 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1011.mcz In-Reply-To: <01CC603E-7C95-4EC6-B13C-A655292D11C4@gmx.de> References: <61B9E83A-72AD-49A9-9E66-56037BEED3EA@gmx.de> <01CC603E-7C95-4EC6-B13C-A655292D11C4@gmx.de> Message-ID: Hi Tobias, > On Oct 17, 2015, at 10:53 PM, Tobias Pape wrote: > > >> On 18.10.2015, at 00:56, Chris Muller wrote: >> >> On Sat, Oct 17, 2015 at 8:14 AM, Tobias Pape wrote: >> >> On 16.10.2015, at 16:33, commits@source.squeak.org wrote: >> >>> Chris Muller uploaded a new version of Morphic to project The Trunk: >>> http://source.squeak.org/trunk/Morphic-cmm.1011.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Morphic-cmm.1011 >>> Author: cmm >>> Time: 16 October 2015, 11:33:30.083 am >>> UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50 >>> Ancestors: Morphic-mt.1010 >>> >>> - Improved keyboard support. "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop). >>> The following commands are now available globally: >>> Command+Shift+O -> access a Monticello browser. >>> Command+Shift+P -> access a Preferences browser. >>> Command+Shift+Z -> browse the recent change log. >>> Command+] -> save the image. >>> Command+\ -> send the active window to the back. >>> Command+Escape -> Close the active window (formerly Command+w). >> >> Why? It's CMD-W on osx and Alt-W on windows and Ctrl-W on Linux. Why change it _away_ form cmd-w? >> >> >> Command+w has been to the desktop keys. >> >> I wanted Cmd+w for the global key too, but it is already overloaded by the editor for back-word. Back-word is overloaded with Shift+Control+[Left Arrow], but Cmd+w is nice for maintainig hand position while typing. > > Thanks. > I never understood why it is back-word? I just found it is back-word for readline (and hence most osx UI) but with ctrl-w. > We really should rethink the meaning of CMD/ctrl/alt? +1 & try and make things consistent with VNC key mapping, Mac X server key mapping and Parallels coherence key mapping (etc?) so that things continue to work when running Linux and Windows images via X & parallels. We should be prepared to change the VM. And if it is there, it would be great to lift the mapping out of the VM. > Best regards > -tobias F > > > From commits at source.squeak.org Tue Oct 20 05:40:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 05:40:33 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.961.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.961.mcz ==================== Summary ==================== Name: Kernel-ul.961 Author: ul Time: 20 October 2015, 7:39:47.9 am UUID: ce0d735e-07a6-42e8-a789-40a8776796f4 Ancestors: Kernel-ul.960 Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes efficiently. The method was extracted from #nextLargeInt:, which is its only user for now. =============== Diff against Kernel-ul.960 =============== Item was added: + ----- Method: Random>>nextBytes:into:startingAt: (in category 'accessing') ----- + nextBytes: anInteger into: aBytesObject startingAt: startIndex + "Fill aBytesObject, an object with indexable byte fields, with anInteger number of random bytes starting from startIndex. Assume that MTw is at least 8." + + | randomValue remainingBits index endIndex | + randomValue := remainingBits := 0. + index := startIndex. + endIndex := startIndex + anInteger - 1. + [ index <= endIndex ] whileTrue: [ + remainingBits >= 8 + ifTrue: [ + aBytesObject basicAt: index put: (randomValue bitAnd: 16rFF). + randomValue := randomValue bitShift: -8. + remainingBits := remainingBits - 8. + index := index + 1 ] + ifFalse: [ + remainingBits = 0 + ifTrue: [ randomValue := self nextValue ] + ifFalse: [ + | newRandomValue | + newRandomValue := self nextValue. + aBytesObject basicAt: index put: (randomValue bitShift: 8 - remainingBits) + + (newRandomValue bitAnd: (1 bitShift: 8 - remainingBits) - 1). + randomValue := newRandomValue bitShift: 0 - remainingBits. + index := index + 1 ]. + remainingBits := MTw - remainingBits ] ]! Item was changed: ----- 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 result firstDigit | - | 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. + self nextBytes: byteCount into: bigRandom startingAt: 1. - 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 ! From leves at elte.hu Tue Oct 20 05:53:27 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 05:53:34 2015 Subject: [squeak-dev] The Inbox: Network-topa.165.mcz In-Reply-To: <6804BD73-ED7F-4634-ACDA-C9AF34F062D6@gmx.de> References: <6804BD73-ED7F-4634-ACDA-C9AF34F062D6@gmx.de> Message-ID: Hi Tobias, TheRandom should be re-seeded on startup, so that images don't generate the same UUIDs. Integer >> atRandom: creates a random number between 1 and the receiver, so 16rffffffffffffffffffffffffffffffff atRandom: TheRandom won't create all possible 128-bit values. It's also a bit slow to create an intermediate Integer objects for this, so I suggest you should use Random >> #nextBytes:into:startingAt: instead to fill the UUID object with random bytes. Levente On Mon, 19 Oct 2015, Tobias Pape wrote: > Hi all > > Don't hold back your comments. > I'd like to put this into trunk and enable people not to have to install > libuuid1:i386 in their shiny new 64-bit Linux environment ;) > > Best regards > -Tobias > > On 19.10.2015, at 21:28, commits@source.squeak.org wrote: > >> Tobias Pape uploaded a new version of Network to project The Inbox: >> http://source.squeak.org/inbox/Network-topa.165.mcz >> >> ==================== Summary ==================== >> >> Name: Network-topa.165 >> Author: topa >> Time: 19 October 2015, 11:28:20.052 pm >> UUID: b4b1febc-df00-4213-b76f-c007b06bb2e2 >> Ancestors: Network-ul.164 >> >> Simplify and speed up non-primitive UUID generation (hat-tip to Martin McClure ) >> >> Instead of generating all parts of the UUID separately, we generate >> a single, 128-bit number and modify it slightly to match the UUID definition. >> This complies with RFC 4122, Sec. 4.4. >> >> This approach is 2500 times faster than the old method and only about 3 times >> slower than the primitive. Hence, we disable the primitive and no longer need >> to rely on the UUIDPlugin to be present. >> >> Informational: The Timings: >> >> { >> 'Pure allocation' -> [UUID basicNew: 16] bench. >> 'Primitive + alloc' -> [(UUID basicNew: 16) primMakeUUID] bench. >> 'Old + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorOld new generateBytes: u forVersion: 4] bench. >> 'New + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorNew new generateBytes: u forVersion: 4] bench. >> }. >> "{ >> 'Pure allocation'->'56,500,000 per second. 17.7 nanoseconds per run.' . >> 'Primitive + alloc'->'1,510,000 per second. 663 nanoseconds per run.' . >> 'Old + alloc'->'202 per second. 4.95 milliseconds per run.' . >> 'New + alloc'->'519,000 per second. 1.93 microseconds per run.' >> }." >> >> =============== Diff against Network-ul.164 =============== >> >> Item was changed: >> ----- Method: String>>asAlphaNumeric:extraChars:mergeUID: (in category '*network-uuid') ----- >> asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart >> "Generates a String with unique identifier ( UID ) qualities, the difference to a >> UUID is that its beginning is derived from the receiver, so that it has a meaning >> for a human reader. >> >> Answers a String of totalSize, which consists of 3 parts >> 1.part: the beginning of the receiver only consisting of >> a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil ) >> 2.part: a single _ >> 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of >> a-z, A-Z, 0-9 >> >> Starting letters are capitalized. >> TotalSize must be at least 1. >> Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ). >> The random part has even for small sizes good UID qualitites for many practical purposes. >> If only lower- or uppercase letters are demanded, simply convert the answer with >> say #asLowercase. The probability of a duplicate will rise only moderately ( see below ). >> >> Example: >> size of random part = 10 >> in n generated UIDs the chance p of having non-unique UIDs is >> n = 10000 -> p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8 >> n = 100000 -> p < 1e-8 >> at the bottom is a snippet for your own calculations >> Note: the calculated propabilites are theoretical, >> for the actually used random generator they may be much worse" >> >> | stream out sizeOfFirstPart index ascii ch skip array random | >> totalSize > minimalSizeOfRandomPart >> ifFalse: [ self errorOutOfBounds ]. >> stream := ReadStream on: self. >> out := WriteStream on: ( String new: totalSize ). >> index := 0. >> skip := true. >> sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1. >> [ stream atEnd or: [ index >= sizeOfFirstPart ]] >> whileFalse: [ >> ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [ >> ( ascii >= 97 and: [ ascii <= 122 ]) or: [ >> ch isDigit or: [ >> additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]]) >> ifTrue: [ >> skip >> ifTrue: [ out nextPut: ch asUppercase ] >> ifFalse: [ out nextPut: ch ]. >> index := index + 1. >> skip := false ] >> ifFalse: [ skip := true ]]. >> out nextPut: $_. >> array := Array new: 62. >> 1 to: 26 do: [ :i | >> array at: i put: ( i + 64 ) asCharacter. >> array at: i + 26 put: ( i + 96 ) asCharacter ]. >> 53 to: 62 do: [ :i | >> array at: i put: ( i - 5 ) asCharacter ]. >> + random := ThreadSafeRandom value. >> - random := UUIDGenerator default randomGenerator. >> totalSize - index - 1 timesRepeat: [ >> out nextPut: ( array atRandom: random )]. >> ^out contents >> >> " calculation of probability p for failure of uniqueness in n UIDs >> Note: if answer will be converted to upper or lower case replace 62 with 36 >> | n i p all | >> all := 62 raisedTo: sizeOfRandomPart. >> i := 1. >> p := 0.0 . >> n := 10000. >> [ i <= n ] >> whileTrue: [ >> p := p + (( i - 1 ) / all ). >> i := i + 1 ]. >> p >> >> approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 >> " >> >> "'Crop SketchMorphs and Grab Screen Rect to JPG' >> asAlphaNumeric: 31 extraChars: nil mergeUID: 10 >> 'CropSketchMorphsAndG_iOw94jquN6' >> 'Monticello' >> asAlphaNumeric: 31 extraChars: nil mergeUID: 10 >> 'Monticello_kp6aV2l0IZK9uBULGOeG' >> 'version-', ( '1.1.2' replaceAll: $. with: $- ) >> asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10 >> 'Version-1-1-2_kuz2tMg2xX9iRLDVR'" >> ! >> >> Item was changed: >> ----- Method: UUID>>initialize (in category 'initalize-release') ----- >> initialize >> + self makeUUID.! >> - self primMakeUUID.! >> >> Item was added: >> + ----- Method: UUID>>makeUUID (in category 'as yet unclassified') ----- >> + makeUUID >> + UUIDGenerator default generateBytes: self forVersion: 4.! >> >> Item was changed: >> ----- Method: UUID>>primMakeUUID (in category 'system primitives') ----- >> primMakeUUID >> >> + self makeUUID! >> - UUIDGenerator default generateBytes: self forVersion: 4.! >> >> Item was changed: >> Object subclass: #UUIDGenerator >> + instanceVariableNames: 'bits' >> + classVariableNames: 'Default TheRandom TheSemaphore' >> - instanceVariableNames: 'timeLow timeMid timeHiAndVersion clockSeqHiAndReserved clockSeqLow node randomCounter randomGenerator semaphoreForGenerator' >> - classVariableNames: 'Default' >> poolDictionaries: '' >> category: 'Network-UUID'! >> >> + !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! >> + I generate a pseudo-random UUID by asking Random for a 128 bit value. >> - !UUIDGenerator commentStamp: '' prior: 0! >> - This class generates a pseudo-random UUID >> - by John M McIntosh johnmci@smalltalkconsulting.com >> >> + See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! >> - See http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt! >> >> Item was changed: >> ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- >> initialize >> + TheRandom := Random new. >> + TheSemaphore := Semaphore forMutualExclusion. >> Smalltalk addToStartUpList: self after: nil.! >> >> Item was changed: >> ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- >> generateFieldsVersion4 >> + >> + TheSemaphore critical: [ >> + bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! >> - >> - timeLow := self generateRandomBitsOfLength: 32. >> - timeMid := self generateRandomBitsOfLength: 16. >> - timeHiAndVersion := 16r4000 bitOr: (self generateRandomBitsOfLength: 12). >> - clockSeqHiAndReserved := 16r80 bitOr: (self generateRandomBitsOfLength: 6). >> - clockSeqLow := self generateRandomBitsOfLength: 8. >> - node := self generateRandomBitsOfLength: 48. >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>generateOneOrZero (in category 'generator') ----- >> - generateOneOrZero >> - ^self semaphoreForGenerator >> - critical: [| value | >> - value := self randomGenerator next. >> - self randomCounter: self randomCounter + 1. >> - self randomCounter > 100000 >> - ifTrue: [self setupRandom]. >> - value < 0.5 >> - ifTrue: [0] >> - ifFalse: [1]].! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>generateRandomBitsOfLength: (in category 'generator') ----- >> - generateRandomBitsOfLength: aNumberOfBits >> - | target | >> - target := 0. >> - aNumberOfBits isZero ifTrue: [^target]. >> - target := self generateOneOrZero. >> - (aNumberOfBits - 1) timesRepeat: >> - [target := (target bitShift: 1) bitOr: self generateOneOrZero]. >> - ^target! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>initialize (in category 'instance creation') ----- >> - initialize >> - self setupRandom. >> - semaphoreForGenerator := Semaphore forMutualExclusion. >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>makeSeed (in category 'random seed') ----- >> - makeSeed >> - "Try various methods of getting good seeds" >> - | seed | >> - seed := self makeUnixSeed. >> - seed ifNotNil: [^seed]. >> - >> - "not sure if this is reliably random... commented out for now. -dew" >> - "seed := self makeSeedFromSound. >> - seed ifNotNil: [^seed]." >> - >> - "default" >> - [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash. >> - seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFFFFFF). >> - seed = 0] whileTrue: ["Try again if ever get a seed = 0"]. >> - >> - ^seed >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>makeSeedFromSound (in category 'random seed') ----- >> - makeSeedFromSound >> - ^[SoundService default randomBitsFromSoundInput: 32] >> - ifError: [nil].! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') ----- >> - makeUnixSeed >> - >> - ^[ >> - StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream | >> - stream binary. >> - (Integer >> - byte1: stream next >> - byte2: stream next >> - byte3: stream next >> - byte4: stream next) ] ] >> - on: Error >> - do: [ nil ]! >> >> Item was changed: >> ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- >> placeFields: aByteArray >> >> + | version fixed | >> + bits isLarge >> + ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] >> + ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. >> + >> + version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" >> + fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" >> + aByteArray >> + at: 7 put: version; >> + at: 9 put: fixed.! >> - aByteArray at: 1 put: ((timeLow bitShift: -24) bitAnd: 16rFF). >> - aByteArray at: 2 put: ((timeLow bitShift: -16) bitAnd: 16rFF). >> - aByteArray at: 3 put: ((timeLow bitShift: -8) bitAnd: 16rFF). >> - aByteArray at: 4 put: (timeLow bitAnd: 16rFF). >> - aByteArray at: 5 put: ((timeMid bitShift: -8) bitAnd: 16rFF). >> - aByteArray at: 6 put: (timeMid bitAnd: 16rFF). >> - aByteArray at: 7 put: ((timeHiAndVersion bitShift: -8) bitAnd: 16rFF). >> - aByteArray at: 8 put: (timeHiAndVersion bitAnd: 16rFF). >> - aByteArray at: 9 put: clockSeqHiAndReserved. >> - aByteArray at: 10 put: clockSeqLow. >> - 0 to: 5 do: [:i | >> - aByteArray at: 11 + i put: ((node bitShift: (-8*i)) bitAnd: 16rFF)] >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>randomCounter (in category 'accessors and mutators') ----- >> - randomCounter >> - ^randomCounter! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>randomCounter: (in category 'accessors and mutators') ----- >> - randomCounter: aNumber >> - randomCounter := aNumber >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>randomGenerator (in category 'accessors and mutators') ----- >> - randomGenerator >> - ^randomGenerator >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>randomGenerator: (in category 'accessors and mutators') ----- >> - randomGenerator: aGenerator >> - randomGenerator := aGenerator >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>semaphoreForGenerator (in category 'accessors and mutators') ----- >> - semaphoreForGenerator >> - ^semaphoreForGenerator! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>semaphoreForGenerator: (in category 'accessors and mutators') ----- >> - semaphoreForGenerator: aSema >> - semaphoreForGenerator := aSema >> - ! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>setupRandom (in category 'instance creation') ----- >> - setupRandom >> - randomCounter := 0. >> - randomGenerator := Random seed: self makeSeed.! >> >> > > > From Das.Linux at gmx.de Tue Oct 20 06:27:40 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 20 06:27:42 2015 Subject: [squeak-dev] MVC in trunk --> emergency evaluator In-Reply-To: References: Message-ID: On 19.10.2015, at 21:32, Chris Muller wrote: > One of our recent changes must've broken something in MVC, because > attempting to open a browser in there results in a EE with the top of > the stack showing: > > DNU: Preferences class>>uniformWindowColors Yea, that unknown Prefs trigger a DNU. uniformWindowColors is no pref anymore as too much is involved to unifomize the colors. I'll look. Best regards -Tobias From Marcel.Taeumel at hpi.de Tue Oct 20 08:15:19 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 08:26:44 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: Message-ID: <1445328919527-4856686.post@n4.nabble.com> What about saving timezone information, too? Taking on Eliot's thought about code from different packages, what about someone that makes a change at PST and one at UTC? ... How to merge those at the moment? Accurate timestamps are kind of important... :-/ Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856686.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Oct 20 08:40:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 08:40:12 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.1016.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1016.mcz ==================== Summary ==================== Name: Morphic-topa.1016 Author: topa Time: 20 October 2015, 10:39:32.638 am UUID: 91c7082d-0740-4139-8e22-8b3dbb56c152 Ancestors: Morphic-topa.1015 The Main Docking bar is currently morphic-only =============== Diff against Morphic-topa.1015 =============== Item was changed: ----- Method: TheWorldMainDockingBar class>>updateInstances (in category 'events') ----- updateInstances "The class has changed, time to update the instances" self setTimeStamp. + Project current in: [:project | + project isMorphic ifTrue: [ + project assureMainDockingBarPresenceMatchesPreference]].! - Project current assureMainDockingBarPresenceMatchesPreference! From Marcel.Taeumel at hpi.de Tue Oct 20 08:29:29 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 08:40:53 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <561A1C39.2040806@gmx.com> References: <56179BD0.2040607@gmx.com> <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> <1444499819871-4854889.post@n4.nabble.com> <561A1C39.2040806@gmx.com> Message-ID: <1445329769179-4856698.post@n4.nabble.com> Hi Henry, that seems to be a bug in some recent VM changes. I will take a look at it. Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4856698.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Oct 20 08:44:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 08:44:26 2015 Subject: [squeak-dev] The Trunk: ST80-topa.189.mcz Message-ID: Tobias Pape uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-topa.189.mcz ==================== Summary ==================== Name: ST80-topa.189 Author: topa Time: 20 October 2015, 10:44:13.911 am UUID: 33441d36-5afd-43db-9708-dbbe07425792 Ancestors: ST80-topa.188 React to deprecations, renames, and missing methods =============== Diff against ST80-topa.188 =============== Item was added: + ----- Method: Controller>>closeAndUnscheduleNoTerminate (in category 'as yet unclassified') ----- + closeAndUnscheduleNoTerminate + ! Item was changed: ----- Method: Debugger>>mvcResumeProcess: (in category '*ST80-opening') ----- mvcResumeProcess: aTopView aTopView erase. savedCursor + ifNotNil: [Cursor currentCursor: savedCursor]. - ifNotNil: [Sensor currentCursor: savedCursor]. interruptedProcess isTerminated ifFalse: [ ScheduledControllers activeControllerNoTerminate: interruptedController andProcess: interruptedProcess]. "if old process was terminated, just terminate current one" interruptedProcess := nil. "Before delete, so release doesn't terminate it" aTopView controller closeAndUnscheduleNoErase. Smalltalk installLowSpaceWatcher. "restart low space handler" Processor terminateActive ! Item was changed: ----- Method: ParagraphEditor>>browseClassFromIt (in category 'menu messages') ----- browseClassFromIt "Launch a browser for the class indicated by the current selection. If multiple classes matching the selection exist, let the user choose among them." | aClass | self lineSelectAndEmptyCheck: [^ self]. + aClass := UIManager default + classFromPattern: self selection string - aClass := Utilities - classFromPattern: (self selection string copyWithoutAll: CharacterSet separators) withCaption: 'choose a class to browse...'. aClass ifNil: [^ view flash]. self terminateAndInitializeAround: [| aBrow | aBrow := SystemBrowser default new. aBrow setClass: aClass selector: nil. aBrow class openBrowserView: (aBrow openEditString: nil) label: 'System Browser'].! Item was changed: ----- Method: PluggableButtonView>>getModelState (in category 'private') ----- getModelState "Answer the result of sending the receiver's model the getStateSelector message." + (model isNil or: [getStateSelector isNil]) - getStateSelector == nil ifTrue: [^ false] ifFalse: [^ model perform: getStateSelector]. ! Item was changed: ----- Method: ScreenController>>configureFonts (in category 'menu messages') ----- configureFonts + | aMenu result | + aMenu := CustomMenu fromArray: #( + ('default text font...' chooseSystemFont) + ('list font' chooseListFont) + ('flaps font' chooseFlapsFont) + ('menu font' chooseMenuFont) + ('window-title font' chooseWindowTitleFont) + ('code font' chooseCodeFont) + - + ('restore default font choices' restoreDefaultFonts)). + aMenu title: 'Standard System Fonts'. + + (result := aMenu startUp) ifNotNil: + [Preferences perform: result].! - Preferences presentMvcFontConfigurationMenu! Item was changed: ----- Method: View>>setDefaultBackgroundColor (in category 'initialize-release') ----- setDefaultBackgroundColor + "Obtain the background color from the receiver's model. + The preferences make sure whether this is a colorful or uniform + look." - "Obtain the background color from the receiver's model, unless the #uniformWindowColors preference is set to true, in which case obtain it from generic Object; and install it as the receiver's background color. 5/1/96 sw" + self backgroundColor: model defaultBackgroundColor! - | colorToUse | - colorToUse := Preferences uniformWindowColors - ifTrue: - [Object new defaultBackgroundColor] - ifFalse: - [model defaultBackgroundColor]. - self backgroundColor: colorToUse! From commits at source.squeak.org Tue Oct 20 08:45:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 08:45:46 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-topa.91.mcz Message-ID: Tobias Pape uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-topa.91.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-topa.91 Author: topa Time: 20 October 2015, 10:45:19.628 am UUID: 63d2a49c-5a31-4fcd-a2ff-8c24c045b1d3 Ancestors: ToolBuilder-Kernel-topa.90 Don't bother displaying emty lists to chose from =============== Diff against ToolBuilder-Kernel-topa.90 =============== Item was changed: ----- Method: UIManager>>classOrTraitFrom:pattern:label: (in category 'system introspecting') ----- classOrTraitFrom: environment pattern: pattern label: label "If there is a class or trait whose name exactly given by pattern, return it. If there is only one class or trait in the given environment whose name matches pattern, return it. Otherwise, put up a menu offering the names of all classes that match pattern, and return the class chosen, else nil if nothing chosen. This method ignores separator characters in the pattern" | toMatch potentialNames names exactMatch lines reducedIdentifiers selectedIndex | toMatch := pattern copyWithoutAll: Character separators. toMatch ifEmpty: [ ^nil ]. "If there's a class or trait named as pattern, then return it." Symbol hasInterned: pattern ifTrue: [ :symbol | environment at: symbol ifPresent: [ :maybeClassOrTrait | ((maybeClassOrTrait isKindOf: Class) or: [ maybeClassOrTrait isTrait ]) ifTrue: [ ^maybeClassOrTrait ] ] ]. "No exact match, look for potential matches." toMatch := pattern asLowercase copyWithout: $.. potentialNames := (environment classAndTraitNames) asOrderedCollection. names := pattern last = $. "This is some old hack, using String>>#match: may be better." ifTrue: [ potentialNames select: [ :each | each asLowercase = toMatch ] ] ifFalse: [ potentialNames select: [ :each | each includesSubstring: toMatch caseSensitive: false ] ]. exactMatch := names detect: [ :each | each asLowercase = toMatch ] ifNone: [ nil ]. lines := OrderedCollection new. exactMatch ifNotNil: [ lines add: 1 ]. "Also try some fuzzy matching." reducedIdentifiers := pattern suggestedTypeNames select: [ :each | potentialNames includes: each ]. reducedIdentifiers ifNotEmpty: [ names addAll: reducedIdentifiers. lines add: 1 + names size + reducedIdentifiers size ]. "Let the user select if there's more than one possible match. This may give surprising results." + names size = 0 ifTrue: [^ nil "nothing matches"]. + selectedIndex := names size = 1 ifTrue: [ 1 ] ifFalse: [ exactMatch ifNotNil: [ names addFirst: exactMatch ]. self chooseFrom: names lines: lines title: label ]. selectedIndex = 0 ifTrue: [ ^nil ]. ^environment at: (names at: selectedIndex) asSymbol! From commits at source.squeak.org Tue Oct 20 09:40:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 09:40:34 2015 Subject: [squeak-dev] Squeak 4.6: Graphics-mt.316.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project Squeak 4.6: http://source.squeak.org/squeak46/Graphics-mt.316.mcz ==================== Summary ==================== Name: Graphics-mt.316 Author: mt Time: 20 October 2015, 11:40:19.755 am UUID: 41cf59e1-6149-7e4b-9d40-485a1f4798ef Ancestors: Graphics-mt.313 Fixes loading of PNG files for recent (> #3397) v3 CogVMs. There seems to be a bug in the VM that, at some point, manifests itself by replacing z, which is the current ZLib stream, with self, which is the PNGReadWriter. Any indirection with a BlockClosure will do. I chose to create an interval and then calling #do: on that interval. Another way would be to wrap the body/argument of #to:do: into another block like this: 0 to: height-1 do: [:y | [ ... ] value ]. This fix might affect performance a tiny little bit and might be removed as soon as the VM bug gets fixed. Note that there might be other places in the code affected by this bug. =============== Diff against Graphics-mt.313 =============== Item was changed: ----- Method: PNGReadWriter>>processNonInterlaced (in category 'chunks') ----- processNonInterlaced | z filter temp copyMethod debug | debug := self debugging. copyMethod := #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed: copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1. debug ifTrue: [ Transcript cr; nextPutAll: 'NI chunk size='; print: idatChunkStream position ]. z := ZLibReadStream on: idatChunkStream originalContents from: 1 to: idatChunkStream position. prevScanline := ByteArray new: bytesPerScanline. thisScanline := ByteArray new: bytesPerScanline. + (0 to: height-1) do: [ :y | - 0 to: height-1 do: [ :y | filter := z next. debug ifTrue:[filtersSeen add: filter]. thisScanline := z next: bytesPerScanline into: thisScanline startingAt: 1. (debug and: [ thisScanline size < bytesPerScanline ]) ifTrue: [ Transcript nextPutAll: ('wanted {1} but only got {2}' format: { bytesPerScanline. thisScanline size }); cr ]. filter = 0 ifFalse:[self filterScanline: filter count: bytesPerScanline]. self perform: copyMethod with: y. temp := prevScanline. prevScanline := thisScanline. thisScanline := temp. ]. z atEnd ifFalse:[self error:'Unexpected data']. debug ifTrue: [Transcript nextPutAll: ' compressed size='; print: z position ]. ! From Marcel.Taeumel at hpi.de Tue Oct 20 09:31:26 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 09:42:50 2015 Subject: [squeak-dev] Re: vm build environment on windows In-Reply-To: <1445329769179-4856698.post@n4.nabble.com> References: <5617B17E.2080402@gmx.com> <1444393846744-4854700.post@n4.nabble.com> <561873E8.1040505@gmx.com> <1444464881103-4854856.post@n4.nabble.com> <56190B7E.9010204@gmx.com> <1444482860654-4854868.post@n4.nabble.com> <561912F7.9000601@gmx.com> <1444499819871-4854889.post@n4.nabble.com> <561A1C39.2040806@gmx.com> <1445329769179-4856698.post@n4.nabble.com> Message-ID: <1445333486843-4856713.post@n4.nabble.com> Hi Henry, please use this to make it build again: http://forum.world.st/Patch-FilePlugin-for-Windows-can-now-delete-read-only-files-td4855947.html Best, Marcel -- View this message in context: http://forum.world.st/vm-build-environment-on-windows-tp4854659p4856713.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Tue Oct 20 09:51:01 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 09:51:06 2015 Subject: [squeak-dev] Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: Message-ID: I don't think it's a good idea to change any code to work around a temporary VM bug. I have seen this error in other cases as well (sockets) and I decided to revert the VM to 3397. I haven't reported the bug yet, because I don't have a reproducible case. The only symptom I saw is that the instance variables get mixed with temporaries (including method arguments). Levente On Tue, 20 Oct 2015, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Graphics to project Squeak 4.6: > http://source.squeak.org/squeak46/Graphics-mt.316.mcz > > ==================== Summary ==================== > > Name: Graphics-mt.316 > Author: mt > Time: 20 October 2015, 11:40:19.755 am > UUID: 41cf59e1-6149-7e4b-9d40-485a1f4798ef > Ancestors: Graphics-mt.313 > > Fixes loading of PNG files for recent (> #3397) v3 CogVMs. > > There seems to be a bug in the VM that, at some point, manifests itself by replacing z, which is the current ZLib stream, with self, which is the PNGReadWriter. Any indirection with a BlockClosure will do. I chose to create an interval and then calling #do: on that interval. Another way would be to wrap the body/argument of #to:do: into another block like this: > > 0 to: height-1 do: [:y | [ ... ] value ]. > > This fix might affect performance a tiny little bit and might be removed as soon as the VM bug gets fixed. > > Note that there might be other places in the code affected by this bug. > > =============== Diff against Graphics-mt.313 =============== > > Item was changed: > ----- Method: PNGReadWriter>>processNonInterlaced (in category 'chunks') ----- > processNonInterlaced > | z filter temp copyMethod debug | > debug := self debugging. > copyMethod := #(copyPixelsGray: nil copyPixelsRGB: copyPixelsIndexed: > copyPixelsGrayAlpha: nil copyPixelsRGBA:) at: colorType+1. > debug ifTrue: [ Transcript cr; nextPutAll: 'NI chunk size='; print: idatChunkStream position ]. > z := ZLibReadStream > on: idatChunkStream originalContents > from: 1 > to: idatChunkStream position. > prevScanline := ByteArray new: bytesPerScanline. > thisScanline := ByteArray new: bytesPerScanline. > + (0 to: height-1) do: [ :y | > - 0 to: height-1 do: [ :y | > filter := z next. > debug ifTrue:[filtersSeen add: filter]. > thisScanline := z next: bytesPerScanline into: thisScanline startingAt: 1. > (debug and: [ thisScanline size < bytesPerScanline ]) ifTrue: [ Transcript nextPutAll: ('wanted {1} but only got {2}' format: { bytesPerScanline. thisScanline size }); cr ]. > filter = 0 ifFalse:[self filterScanline: filter count: bytesPerScanline]. > self perform: copyMethod with: y. > temp := prevScanline. > prevScanline := thisScanline. > thisScanline := temp. > ]. > z atEnd ifFalse:[self error:'Unexpected data']. > debug ifTrue: [Transcript nextPutAll: ' compressed size='; print: z position ]. > ! > > > From Marcel.Taeumel at hpi.de Tue Oct 20 09:40:45 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 09:52:11 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: Message-ID: <1445334045813-4856719.post@n4.nabble.com> Hi Eliot, :) Tobias reminded me that this might be a bug in the JIT because it only occurs if y is 42. This method is rather long and has a lot of temporaries. Additionally, the block argument of a #to:do: call will be inlined. Hope that helps. Best, Marcel -- View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856719.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Oct 20 09:43:02 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 09:54:26 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: Message-ID: <1445334182174-4856721.post@n4.nabble.com> Usually, I would agree. But we did already release Squeak 4.6 and thus have to react quickly if it does not messes things up, which this fix does not. :) Best, Marcel -- View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856721.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Tue Oct 20 09:58:17 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 09:58:19 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: <1445334182174-4856721.post@n4.nabble.com> References: <1445334182174-4856721.post@n4.nabble.com> Message-ID: The release comes with the 3397 VM, which works fine. Your fix works the bug around in a single method, but I'm sure there are hundreds of places where the issue can occur. Levente On Tue, 20 Oct 2015, marcel.taeumel wrote: > Usually, I would agree. But we did already release Squeak 4.6 and thus have > to react quickly if it does not messes things up, which this fix does not. > :) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856721.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From edgardec2005 at gmail.com Tue Oct 20 11:41:51 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Tue Oct 20 11:42:05 2015 Subject: [squeak-dev] [OT} discrete event simulation example Message-ID: I looking for a simple working example of discrete event simulation, please send feedback Edgar From nicolas.cellier.aka.nice at gmail.com Tue Oct 20 11:47:34 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 20 11:47:37 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> Message-ID: It works OK with stack VM, so I confirm it's a JIT thing So far I saw it only in cog v3, but not in cog spur 2015-10-20 11:58 GMT+02:00 Levente Uzonyi : > The release comes with the 3397 VM, which works fine. > Your fix works the bug around in a single method, but I'm sure there are > hundreds of places where the issue can occur. > > Levente > > > On Tue, 20 Oct 2015, marcel.taeumel wrote: > > Usually, I would agree. But we did already release Squeak 4.6 and thus have >> to react quickly if it does not messes things up, which this fix does not. >> :) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856721.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151020/3fc4f3cd/attachment.htm From Marcel.Taeumel at hpi.de Tue Oct 20 13:26:57 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Oct 20 13:38:23 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> Message-ID: <1445347617011-4856747.post@n4.nabble.com> And if you update the VM, it will break. And if you update the image, now, it will work again. ;-) Well, here is the thing: I am not able to fix that VM/JIT bug although I would rather like to. If you can fix it, please go ahead. If Eliot finds time for it -- well, it works in Spur and Stack versions -- he will surely do it. Until then, we should fix it if possible to improve user experience. If you find any other of those hundreds of places, please consider fixing them as well. Not into trunk, but Squeak46 branch. This VM bug has been known since mid of September at least: http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html Nothing has happened yet. Best, Marcel -- View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Lou at Keystone-Software.com Tue Oct 20 14:26:36 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Tue Oct 20 14:26:54 2015 Subject: [squeak-dev] [Pharo-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <57515E8D-D019-4E76-9AEE-D352296FE7E6@rowledge.org> Message-ID: Hi Tim, On Mon, 19 Oct 2015 10:02:25 -0700, tim Rowledge wrote: > >> On 19-10-2015, at 5:58 AM, Louis LaBrunda wrote: >> >> I think most CPUs support "Digital >> Thermal Sensor" (I'm not sure about ARM). > >ARM *is* most cpus. I think we long ago passed the point where more than 50% of all >32bit cpus were ARM. You are of course right. Possibly when I first read about "Digital Thermal Sensor", things may have been different. But I'm sure everyone knew what I meant. >Typically the temperature of each core is monitored by stuff added around the ARM cores in an SoC, not the ARM itself. For example on a Pi, `vcgencmd measure_temp` works, though strictly speaking that measures the general temp of the SoC - which like many devices that are ARM powered is a large thing to do stuff and just happens to have a few Gips of processor hidden in a small corner. >tim Exactly what temperature is being measured probably doesn't matter as long as there is enough range to help add some entropy. Lou ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From lewis at mail.msen.com Tue Oct 20 15:03:05 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 20 15:03:08 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: <1445328919527-4856686.post@n4.nabble.com> References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: <8850.136.2.1.105.1445353385.squirrel@webmail.msen.com> An ISO 8601 format would make sense, as long as it could be done it a way that does not break compatibility. Dave > What about saving timezone information, too? Taking on Eliot's thought > about > code from different packages, what about someone that makes a change at > PST > and one at UTC? ... How to merge those at the moment? > > Accurate timestamps are kind of important... :-/ > > Best, > Marcel > From bert at freudenbergs.de Tue Oct 20 15:38:55 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Oct 20 15:38:58 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> References: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> Message-ID: <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> On 18.10.2015, at 01:39, commits@source.squeak.org wrote: > > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.771.mcz > > ==================== Summary ==================== > > Name: System-mt.771 > Author: mt > Time: 17 October 2015, 6:38:55.72 pm > UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 > Ancestors: System-cmm.770 > > Log change stamps at the granularity of seconds not only minutes. > > Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. Why does the time stamp have to be unique? And it?s still not certain to be unique. IMHO minutes resolution is good enough and reads nicer. > =============== Diff against System-cmm.770 =============== > > Item was changed: > ----- Method: Utilities class>>changeStamp (in category 'identification') ----- > changeStamp > "Answer a string to be pasted into source code to mark who changed it and when." > ^ self authorInitials , ' ' , Date today mmddyyyy, ' ', > + ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)! > - ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! Btw we do have #print24 nowadays. - 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/20151020/c02c6eac/smime.bin From eliot.miranda at gmail.com Tue Oct 20 15:50:11 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 20 15:50:17 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> References: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> Message-ID: _,,,^..^,,,_ (phone) > On Oct 20, 2015, at 8:38 AM, Bert Freudenberg wrote: > >> On 18.10.2015, at 01:39, commits@source.squeak.org wrote: >> >> Marcel Taeumel uploaded a new version of System to project The Trunk: >> http://source.squeak.org/trunk/System-mt.771.mcz >> >> ==================== Summary ==================== >> >> Name: System-mt.771 >> Author: mt >> Time: 17 October 2015, 6:38:55.72 pm >> UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 >> Ancestors: System-cmm.770 >> >> Log change stamps at the granularity of seconds not only minutes. >> >> Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. > > Why does the time stamp have to be unique? And it?s still not certain to be unique. IMHO minutes resolution is good enough and reads nicer. +1. Marcel, if you really need this why not make it a preference, off by default. > >> =============== Diff against System-cmm.770 =============== >> >> Item was changed: >> ----- Method: Utilities class>>changeStamp (in category 'identification') ----- >> changeStamp >> "Answer a string to be pasted into source code to mark who changed it and when." >> ^ self authorInitials , ' ' , Date today mmddyyyy, ' ', >> + ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)! >> - ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! > > Btw we do have #print24 nowadays. > > - Bert - > > > From btc at openinworld.com Tue Oct 20 15:49:48 2015 From: btc at openinworld.com (Ben Coman) Date: Tue Oct 20 15:50:20 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.961.mcz In-Reply-To: <5625d3dd.053f420a.3a589.fffff765SMTPIN_ADDED_MISSING@mx.google.com> References: <5625d3dd.053f420a.3a589.fffff765SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On Tue, Oct 20, 2015 at 1:40 PM, wrote: > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-ul.961.mcz > > ==================== Summary ==================== > > Name: Kernel-ul.961 > Author: ul > Time: 20 October 2015, 7:39:47.9 am > UUID: ce0d735e-07a6-42e8-a789-40a8776796f4 > Ancestors: Kernel-ul.960 > > Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes efficiently. The method was extracted from #nextLargeInt:, which is its only user for now. I'm curious what the use case for this is. cheers -ben From nicolas.cellier.aka.nice at gmail.com Tue Oct 20 15:52:22 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 20 15:52:26 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: <1445347617011-4856747.post@n4.nabble.com> References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: BTW, I had a fairly reproducible case, didn't I send it to this list? Ah no, it was pharo... ScaledDecimalTests>>testCoercion https://www.mail-archive.com/pharo-dev@lists.pharo.org/msg31997.html 2015-10-20 15:26 GMT+02:00 marcel.taeumel : > And if you update the VM, it will break. > And if you update the image, now, it will work again. ;-) > > Well, here is the thing: I am not able to fix that VM/JIT bug although I > would rather like to. If you can fix it, please go ahead. If Eliot finds > time for it -- well, it works in Spur and Stack versions -- he will surely > do it. > > Until then, we should fix it if possible to improve user experience. If you > find any other of those hundreds of places, please consider fixing them as > well. Not into trunk, but Squeak46 branch. > > This VM bug has been known since mid of September at least: > > http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html > > Nothing has happened yet. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151020/7e6da14e/attachment.htm From nicolas.cellier.aka.nice at gmail.com Tue Oct 20 15:54:13 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 20 15:54:16 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.961.mcz In-Reply-To: References: <5625d3dd.053f420a.3a589.fffff765SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-10-20 17:49 GMT+02:00 Ben Coman : > On Tue, Oct 20, 2015 at 1:40 PM, wrote: > > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > > http://source.squeak.org/trunk/Kernel-ul.961.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-ul.961 > > Author: ul > > Time: 20 October 2015, 7:39:47.9 am > > UUID: ce0d735e-07a6-42e8-a789-40a8776796f4 > > Ancestors: Kernel-ul.960 > > > > Introduced Random >> #nextBytes:into:startingAt: which can be used to > fill the indexable byte fields of an objects with random bytes efficiently. > The method was extracted from #nextLargeInt:, which is its only user for > now. > > I'm curious what the use case for this is. > cheers -ben > > for example, generating UUID without the holly plugin... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151020/1f612d8f/attachment.htm From leves at elte.hu Tue Oct 20 15:55:03 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 15:55:08 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: <1445347617011-4856747.post@n4.nabble.com> References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: Wouldn't it be better to just warn the users if they're using a VM with broken JIT? For example adding the following to one of the #startUp: method: (Smalltalk vm isRunningCogit and: [ Smalltalk vm platformSourceVersion asInteger > 3397 ]) ifTrue: [ Warning signal: 'The VM you''re currently using has a bug which may cause unexpected errors in some cases.\Please consider downgrading to version 3397.' withCRs ]. Levente On Tue, 20 Oct 2015, marcel.taeumel wrote: > And if you update the VM, it will break. > And if you update the image, now, it will work again. ;-) > > Well, here is the thing: I am not able to fix that VM/JIT bug although I > would rather like to. If you can fix it, please go ahead. If Eliot finds > time for it -- well, it works in Spur and Stack versions -- he will surely > do it. > > Until then, we should fix it if possible to improve user experience. If you > find any other of those hundreds of places, please consider fixing them as > well. Not into trunk, but Squeak46 branch. > > This VM bug has been known since mid of September at least: > http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html > > Nothing has happened yet. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From Das.Linux at gmx.de Tue Oct 20 15:55:46 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 20 15:55:51 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.961.mcz In-Reply-To: References: <5625d3dd.053f420a.3a589.fffff765SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <2FF5A1C0-520A-4140-AEDF-DC4F7F0B2D08@gmx.de> My post to the inbox seem related here? Best regards -Tobias On 20.10.2015, at 17:54, Nicolas Cellier wrote: > > > 2015-10-20 17:49 GMT+02:00 Ben Coman : > On Tue, Oct 20, 2015 at 1:40 PM, wrote: > > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > > http://source.squeak.org/trunk/Kernel-ul.961.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-ul.961 > > Author: ul > > Time: 20 October 2015, 7:39:47.9 am > > UUID: ce0d735e-07a6-42e8-a789-40a8776796f4 > > Ancestors: Kernel-ul.960 > > > > Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes efficiently. The method was extracted from #nextLargeInt:, which is its only user for now. > > I'm curious what the use case for this is. > cheers -ben > > > for example, generating UUID without the holly plugin... From leves at elte.hu Tue Oct 20 16:03:28 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 16:03:33 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.961.mcz In-Reply-To: References: <5625d3dd.053f420a.3a589.fffff765SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: That's the most actual use-case, but I've been thinking about creating some primitives which would serve as an image-wide (CS)PRNG. Why? 1. primitives are faster; in case of RNG, they can be a lot faster (2-3 magnitudes) 2. there's no concurrency issue with primitives - all image-side code can share the same PRNG. Filling a ByteArray with random bytes would be one of the primitives. Another one would be generating a random integer between two given integers. And the third would be generating a random Float [0..1). Levente On Tue, 20 Oct 2015, Nicolas Cellier wrote: > > > 2015-10-20 17:49 GMT+02:00 Ben Coman : > On Tue, Oct 20, 2015 at 1:40 PM,? wrote: > > Levente Uzonyi uploaded a new version of Kernel to project The Trunk: > > http://source.squeak.org/trunk/Kernel-ul.961.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-ul.961 > > Author: ul > > Time: 20 October 2015, 7:39:47.9 am > > UUID: ce0d735e-07a6-42e8-a789-40a8776796f4 > > Ancestors: Kernel-ul.960 > > > > Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes > efficiently. The method was extracted from #nextLargeInt:, which is its only user for now. > > I'm curious what the use case for this is. > cheers -ben > > > for example, generating UUID without the holly plugin... > > From Das.Linux at gmx.de Tue Oct 20 16:27:52 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 20 16:27:57 2015 Subject: [squeak-dev] The Inbox: Network-topa.165.mcz In-Reply-To: References: <6804BD73-ED7F-4634-ACDA-C9AF34F062D6@gmx.de> Message-ID: <1BDCE759-93DF-4730-AFDF-88B0F986DE56@gmx.de> Hi all, On 20.10.2015, at 07:53, Levente Uzonyi wrote: > Hi Tobias, > > TheRandom should be re-seeded on startup, so that images don't generate the same UUIDs. > Integer >> atRandom: creates a random number between 1 and the receiver, > so 16rffffffffffffffffffffffffffffffff atRandom: TheRandom won't create > all possible 128-bit values. It's also a bit slow to create an intermediate Integer objects for this, so I suggest you should use Random >>> #nextBytes:into:startingAt: instead to fill the UUID object with random > bytes. I thought about going back to ThreadSafeRandom, it seems more fit. About the speed, I was actually quite happy with it ;) But I see your point. Best regards -Tobias > > Levente > > On Mon, 19 Oct 2015, Tobias Pape wrote: > >> Hi all >> >> Don't hold back your comments. >> I'd like to put this into trunk and enable people not to have to install >> libuuid1:i386 in their shiny new 64-bit Linux environment ;) >> >> Best regards >> -Tobias >> >> On 19.10.2015, at 21:28, commits@source.squeak.org wrote: >> >>> Tobias Pape uploaded a new version of Network to project The Inbox: >>> http://source.squeak.org/inbox/Network-topa.165.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Network-topa.165 >>> Author: topa >>> Time: 19 October 2015, 11:28:20.052 pm >>> UUID: b4b1febc-df00-4213-b76f-c007b06bb2e2 >>> Ancestors: Network-ul.164 >>> >>> Simplify and speed up non-primitive UUID generation (hat-tip to Martin McClure ) >>> >>> Instead of generating all parts of the UUID separately, we generate >>> a single, 128-bit number and modify it slightly to match the UUID definition. >>> This complies with RFC 4122, Sec. 4.4. >>> >>> This approach is 2500 times faster than the old method and only about 3 times >>> slower than the primitive. Hence, we disable the primitive and no longer need >>> to rely on the UUIDPlugin to be present. >>> >>> Informational: The Timings: >>> >>> { >>> 'Pure allocation' -> [UUID basicNew: 16] bench. >>> 'Primitive + alloc' -> [(UUID basicNew: 16) primMakeUUID] bench. >>> 'Old + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorOld new generateBytes: u forVersion: 4] bench. >>> 'New + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorNew new generateBytes: u forVersion: 4] bench. >>> }. >>> "{ >>> 'Pure allocation'->'56,500,000 per second. 17.7 nanoseconds per run.' . >>> 'Primitive + alloc'->'1,510,000 per second. 663 nanoseconds per run.' . >>> 'Old + alloc'->'202 per second. 4.95 milliseconds per run.' . >>> 'New + alloc'->'519,000 per second. 1.93 microseconds per run.' >>> }." >>> >>> =============== Diff against Network-ul.164 =============== >>> >>> Item was changed: >>> ----- Method: String>>asAlphaNumeric:extraChars:mergeUID: (in category '*network-uuid') ----- >>> asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart >>> "Generates a String with unique identifier ( UID ) qualities, the difference to a >>> UUID is that its beginning is derived from the receiver, so that it has a meaning >>> for a human reader. >>> >>> Answers a String of totalSize, which consists of 3 parts >>> 1.part: the beginning of the receiver only consisting of >>> a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil ) >>> 2.part: a single _ >>> 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of >>> a-z, A-Z, 0-9 >>> >>> Starting letters are capitalized. >>> TotalSize must be at least 1. >>> Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ). >>> The random part has even for small sizes good UID qualitites for many practical purposes. >>> If only lower- or uppercase letters are demanded, simply convert the answer with >>> say #asLowercase. The probability of a duplicate will rise only moderately ( see below ). >>> >>> Example: >>> size of random part = 10 >>> in n generated UIDs the chance p of having non-unique UIDs is >>> n = 10000 -> p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8 >>> n = 100000 -> p < 1e-8 >>> at the bottom is a snippet for your own calculations >>> Note: the calculated propabilites are theoretical, >>> for the actually used random generator they may be much worse" >>> >>> | stream out sizeOfFirstPart index ascii ch skip array random | >>> totalSize > minimalSizeOfRandomPart >>> ifFalse: [ self errorOutOfBounds ]. >>> stream := ReadStream on: self. >>> out := WriteStream on: ( String new: totalSize ). >>> index := 0. >>> skip := true. >>> sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1. >>> [ stream atEnd or: [ index >= sizeOfFirstPart ]] >>> whileFalse: [ >>> ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [ >>> ( ascii >= 97 and: [ ascii <= 122 ]) or: [ >>> ch isDigit or: [ >>> additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]]) >>> ifTrue: [ >>> skip >>> ifTrue: [ out nextPut: ch asUppercase ] >>> ifFalse: [ out nextPut: ch ]. >>> index := index + 1. >>> skip := false ] >>> ifFalse: [ skip := true ]]. >>> out nextPut: $_. >>> array := Array new: 62. >>> 1 to: 26 do: [ :i | >>> array at: i put: ( i + 64 ) asCharacter. >>> array at: i + 26 put: ( i + 96 ) asCharacter ]. >>> 53 to: 62 do: [ :i | >>> array at: i put: ( i - 5 ) asCharacter ]. >>> + random := ThreadSafeRandom value. >>> - random := UUIDGenerator default randomGenerator. >>> totalSize - index - 1 timesRepeat: [ >>> out nextPut: ( array atRandom: random )]. >>> ^out contents >>> >>> " calculation of probability p for failure of uniqueness in n UIDs >>> Note: if answer will be converted to upper or lower case replace 62 with 36 >>> | n i p all | >>> all := 62 raisedTo: sizeOfRandomPart. >>> i := 1. >>> p := 0.0 . >>> n := 10000. >>> [ i <= n ] >>> whileTrue: [ >>> p := p + (( i - 1 ) / all ). >>> i := i + 1 ]. >>> p >>> >>> approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 >>> " >>> >>> "'Crop SketchMorphs and Grab Screen Rect to JPG' >>> asAlphaNumeric: 31 extraChars: nil mergeUID: 10 >>> 'CropSketchMorphsAndG_iOw94jquN6' >>> 'Monticello' >>> asAlphaNumeric: 31 extraChars: nil mergeUID: 10 >>> 'Monticello_kp6aV2l0IZK9uBULGOeG' >>> 'version-', ( '1.1.2' replaceAll: $. with: $- ) >>> asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10 >>> 'Version-1-1-2_kuz2tMg2xX9iRLDVR'" >>> ! >>> >>> Item was changed: >>> ----- Method: UUID>>initialize (in category 'initalize-release') ----- >>> initialize >>> + self makeUUID.! >>> - self primMakeUUID.! >>> >>> Item was added: >>> + ----- Method: UUID>>makeUUID (in category 'as yet unclassified') ----- >>> + makeUUID >>> + UUIDGenerator default generateBytes: self forVersion: 4.! >>> >>> Item was changed: >>> ----- Method: UUID>>primMakeUUID (in category 'system primitives') ----- >>> primMakeUUID >>> >>> + self makeUUID! >>> - UUIDGenerator default generateBytes: self forVersion: 4.! >>> >>> Item was changed: >>> Object subclass: #UUIDGenerator >>> + instanceVariableNames: 'bits' >>> + classVariableNames: 'Default TheRandom TheSemaphore' >>> - instanceVariableNames: 'timeLow timeMid timeHiAndVersion clockSeqHiAndReserved clockSeqLow node randomCounter randomGenerator semaphoreForGenerator' >>> - classVariableNames: 'Default' >>> poolDictionaries: '' >>> category: 'Network-UUID'! >>> >>> + !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! >>> + I generate a pseudo-random UUID by asking Random for a 128 bit value. >>> - !UUIDGenerator commentStamp: '' prior: 0! >>> - This class generates a pseudo-random UUID >>> - by John M McIntosh johnmci@smalltalkconsulting.com >>> >>> + See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! >>> - See http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt! >>> >>> Item was changed: >>> ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- >>> initialize >>> + TheRandom := Random new. >>> + TheSemaphore := Semaphore forMutualExclusion. >>> Smalltalk addToStartUpList: self after: nil.! >>> >>> Item was changed: >>> ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- >>> generateFieldsVersion4 >>> + >>> + TheSemaphore critical: [ >>> + bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! >>> - >>> - timeLow := self generateRandomBitsOfLength: 32. >>> - timeMid := self generateRandomBitsOfLength: 16. >>> - timeHiAndVersion := 16r4000 bitOr: (self generateRandomBitsOfLength: 12). >>> - clockSeqHiAndReserved := 16r80 bitOr: (self generateRandomBitsOfLength: 6). >>> - clockSeqLow := self generateRandomBitsOfLength: 8. >>> - node := self generateRandomBitsOfLength: 48. >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>generateOneOrZero (in category 'generator') ----- >>> - generateOneOrZero >>> - ^self semaphoreForGenerator >>> - critical: [| value | >>> - value := self randomGenerator next. >>> - self randomCounter: self randomCounter + 1. >>> - self randomCounter > 100000 >>> - ifTrue: [self setupRandom]. >>> - value < 0.5 >>> - ifTrue: [0] >>> - ifFalse: [1]].! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>generateRandomBitsOfLength: (in category 'generator') ----- >>> - generateRandomBitsOfLength: aNumberOfBits >>> - | target | >>> - target := 0. >>> - aNumberOfBits isZero ifTrue: [^target]. >>> - target := self generateOneOrZero. >>> - (aNumberOfBits - 1) timesRepeat: >>> - [target := (target bitShift: 1) bitOr: self generateOneOrZero]. >>> - ^target! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>initialize (in category 'instance creation') ----- >>> - initialize >>> - self setupRandom. >>> - semaphoreForGenerator := Semaphore forMutualExclusion. >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>makeSeed (in category 'random seed') ----- >>> - makeSeed >>> - "Try various methods of getting good seeds" >>> - | seed | >>> - seed := self makeUnixSeed. >>> - seed ifNotNil: [^seed]. >>> - >>> - "not sure if this is reliably random... commented out for now. -dew" >>> - "seed := self makeSeedFromSound. >>> - seed ifNotNil: [^seed]." >>> - >>> - "default" >>> - [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash. >>> - seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFFFFFF). >>> - seed = 0] whileTrue: ["Try again if ever get a seed = 0"]. >>> - >>> - ^seed >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>makeSeedFromSound (in category 'random seed') ----- >>> - makeSeedFromSound >>> - ^[SoundService default randomBitsFromSoundInput: 32] >>> - ifError: [nil].! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') ----- >>> - makeUnixSeed >>> - >>> - ^[ >>> - StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream | >>> - stream binary. >>> - (Integer >>> - byte1: stream next >>> - byte2: stream next >>> - byte3: stream next >>> - byte4: stream next) ] ] >>> - on: Error >>> - do: [ nil ]! >>> >>> Item was changed: >>> ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- >>> placeFields: aByteArray >>> >>> + | version fixed | >>> + bits isLarge >>> + ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] >>> + ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. >>> + >>> + version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" >>> + fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" >>> + aByteArray >>> + at: 7 put: version; >>> + at: 9 put: fixed.! >>> - aByteArray at: 1 put: ((timeLow bitShift: -24) bitAnd: 16rFF). >>> - aByteArray at: 2 put: ((timeLow bitShift: -16) bitAnd: 16rFF). >>> - aByteArray at: 3 put: ((timeLow bitShift: -8) bitAnd: 16rFF). >>> - aByteArray at: 4 put: (timeLow bitAnd: 16rFF). >>> - aByteArray at: 5 put: ((timeMid bitShift: -8) bitAnd: 16rFF). >>> - aByteArray at: 6 put: (timeMid bitAnd: 16rFF). >>> - aByteArray at: 7 put: ((timeHiAndVersion bitShift: -8) bitAnd: 16rFF). >>> - aByteArray at: 8 put: (timeHiAndVersion bitAnd: 16rFF). >>> - aByteArray at: 9 put: clockSeqHiAndReserved. >>> - aByteArray at: 10 put: clockSeqLow. >>> - 0 to: 5 do: [:i | >>> - aByteArray at: 11 + i put: ((node bitShift: (-8*i)) bitAnd: 16rFF)] >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>randomCounter (in category 'accessors and mutators') ----- >>> - randomCounter >>> - ^randomCounter! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>randomCounter: (in category 'accessors and mutators') ----- >>> - randomCounter: aNumber >>> - randomCounter := aNumber >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>randomGenerator (in category 'accessors and mutators') ----- >>> - randomGenerator >>> - ^randomGenerator >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>randomGenerator: (in category 'accessors and mutators') ----- >>> - randomGenerator: aGenerator >>> - randomGenerator := aGenerator >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>semaphoreForGenerator (in category 'accessors and mutators') ----- >>> - semaphoreForGenerator >>> - ^semaphoreForGenerator! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>semaphoreForGenerator: (in category 'accessors and mutators') ----- >>> - semaphoreForGenerator: aSema >>> - semaphoreForGenerator := aSema >>> - ! >>> >>> Item was removed: >>> - ----- Method: UUIDGenerator>>setupRandom (in category 'instance creation') ----- >>> - setupRandom >>> - randomCounter := 0. >>> - randomGenerator := Random seed: self makeSeed.! From lewis at mail.msen.com Tue Oct 20 16:41:25 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 20 16:42:10 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <00e601d10ab3$9a100560$ce301020$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> Message-ID: <23313.136.2.1.105.1445359285.squirrel@webmail.msen.com> > Hi Chris, > > The exemption is not for the location of the server but the URL where it > is hosted. I'm happy to help in any way I can but I don't have access to > the Pharo Repos. I have no issue with having Pharo packages on > SqueakSource if that is what everyone agrees too. We have multiple > packages hosted there. It's ok with me if we host some pharo code there > too. > > All the best, > > Ron > The squeaksource.com service is open to everyone. Many people in the Pharo community make use of it, and should feel welcome to do so. Dave From leves at elte.hu Tue Oct 20 17:05:20 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Oct 20 17:05:24 2015 Subject: [squeak-dev] The Inbox: Network-topa.165.mcz In-Reply-To: <1BDCE759-93DF-4730-AFDF-88B0F986DE56@gmx.de> References: <6804BD73-ED7F-4634-ACDA-C9AF34F062D6@gmx.de> <1BDCE759-93DF-4730-AFDF-88B0F986DE56@gmx.de> Message-ID: On Tue, 20 Oct 2015, Tobias Pape wrote: > Hi all, > > On 20.10.2015, at 07:53, Levente Uzonyi wrote: > >> Hi Tobias, >> >> TheRandom should be re-seeded on startup, so that images don't generate the same UUIDs. >> Integer >> atRandom: creates a random number between 1 and the receiver, >> so 16rffffffffffffffffffffffffffffffff atRandom: TheRandom won't create >> all possible 128-bit values. It's also a bit slow to create an intermediate Integer objects for this, so I suggest you should use Random >>>> #nextBytes:into:startingAt: instead to fill the UUID object with random >> bytes. > > > I thought about going back to ThreadSafeRandom, it seems more fit. That wouldn't help either, because if you don't reseed the generator on startup, then it will produce the same numbers in the same order each time the image is launched. ThreadSafeRandom has another weakness - more general one: it's slow if you repeatedly fork a thread, generate a random value and abandon the thread, because a new generator will be initialized for each thread. Such usage pattern also decreases the randomness of the generated numbers, because currently the seed is always truncated to 32-bits, while the internal state is much larger. This should be changed. > > About the speed, I was actually quite happy with it ;) > But I see your point. I found that not creating an intermediate integer gives another 2x speedup, which makes it easier to accept not using the primitive. Levente > > Best regards > -Tobias From btc at openinworld.com Tue Oct 20 17:55:56 2015 From: btc at openinworld.com (Ben Coman) Date: Tue Oct 20 17:56:25 2015 Subject: [squeak-dev] VM background reading "porting squeak" Message-ID: Just sharing that I found the following chapter from Mark Guzdial's "Squeak: Open Personal Computing and Multimedia" an interesting background read on the VM. Cross posting since some others not on [vm-dev] might similarly find it interesting. http://sdmeta.gforge.inria.fr/FreeBooks/CollectiveNBlueBook/porting-subfinal%202.pdf cheers -ben From asqueaker at gmail.com Tue Oct 20 18:07:47 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 20 18:07:49 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: References: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> Message-ID: On Tue, Oct 20, 2015 at 10:50 AM, Eliot Miranda wrote: > > > _,,,^..^,,,_ (phone) > >> On Oct 20, 2015, at 8:38 AM, Bert Freudenberg wrote: >> >>> On 18.10.2015, at 01:39, commits@source.squeak.org wrote: >>> >>> Marcel Taeumel uploaded a new version of System to project The Trunk: >>> http://source.squeak.org/trunk/System-mt.771.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: System-mt.771 >>> Author: mt >>> Time: 17 October 2015, 6:38:55.72 pm >>> UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 >>> Ancestors: System-cmm.770 >>> >>> Log change stamps at the granularity of seconds not only minutes. >>> >>> Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. >> >> Why does the time stamp have to be unique? And it?s still not certain to be unique. IMHO minutes resolution is good enough and reads nicer. > > +1. Marcel, if you really need this why not make it a preference, off by default. Marcel already gave compelling use-cases for why he wants finer-grained timestamps. But that doesn't mean we have to print the fine resolution in the browsers -- printing is independent of internal representation, so "reads nicer" does not need to be an issue, we can keep the same print format. I'm failing to understand why anyone would be against more precision internally.. You don't have to use it, it doesn't hurt anything if its there, does it? From bert at freudenbergs.de Tue Oct 20 19:46:51 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Oct 20 19:46:54 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: References: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> Message-ID: <9A1CE872-8397-4B6A-A901-DB3E59F7E7D1@freudenbergs.de> > On 20.10.2015, at 20:07, Chris Muller wrote: > > On Tue, Oct 20, 2015 at 10:50 AM, Eliot Miranda wrote: >> >> >> _,,,^..^,,,_ (phone) >> >>> On Oct 20, 2015, at 8:38 AM, Bert Freudenberg wrote: >>> >>>> On 18.10.2015, at 01:39, commits@source.squeak.org wrote: >>>> >>>> Marcel Taeumel uploaded a new version of System to project The Trunk: >>>> http://source.squeak.org/trunk/System-mt.771.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: System-mt.771 >>>> Author: mt >>>> Time: 17 October 2015, 6:38:55.72 pm >>>> UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 >>>> Ancestors: System-cmm.770 >>>> >>>> Log change stamps at the granularity of seconds not only minutes. >>>> >>>> Why? A minute is quite long and it is likely to have two method (versions) with the same timestamp. >>> >>> Why does the time stamp have to be unique? And it?s still not certain to be unique. IMHO minutes resolution is good enough and reads nicer. >> >> +1. Marcel, if you really need this why not make it a preference, off by default. > > Marcel already gave compelling use-cases for why he wants > finer-grained timestamps. I had missed that discussion. But I read it now and the only use case Marcel mentioned was comparing method versions, and claiming comparing time stamps was faster than comparing the source code. But AFICT both timestamps and source code are retrieved from the source file each time so the difference should not be huge. Even if it was faster then you could still compare the timestamps first and compare the source only if the times are the same. > I'm failing to understand why anyone would be against more precision > internally.. You don't have to use it, it doesn't hurt anything if > its there, does it? It makes source files even more verbose than they are now. MC?s timestamps are overkill IMHO. So without a compelling reason I would not change it. I could see good arguments for adding a timezone, but that would still not necessitate higher resolution. And after all, you cannot compare timestamps across images anyway, because you cannot rely on the clock being globally synchronized. And within a system, seconds plus order in the changes files are sufficient. - 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/20151020/5cd1b474/smime.bin From eliot.miranda at gmail.com Tue Oct 20 21:38:25 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 20 21:38:27 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: <1445328919527-4856686.post@n4.nabble.com> References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: Hi Marcel, On Tue, Oct 20, 2015 at 1:15 AM, marcel.taeumel wrote: > What about saving timezone information, too? Taking on Eliot's thought > about > code from different packages, what about someone that makes a change at PST > and one at UTC? ... How to merge those at the moment? > This seems much more useful. I would like to see minute granularity UTC timestamps. And that reminds me I need to replace the time stuff in 5.0 with the microsecond clock support. > Accurate timestamps are kind of important... :-/ > Yes, agreed. But method timestamps to second granularity? Why do you need that kind of granularity? > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856686.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151020/ca102ddc/attachment.htm From eliot.miranda at gmail.com Tue Oct 20 21:40:10 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 20 21:40:12 2015 Subject: [squeak-dev] The Trunk: System-mt.771.mcz In-Reply-To: <9A1CE872-8397-4B6A-A901-DB3E59F7E7D1@freudenbergs.de> References: <505f50r9HGdRedw.RZmta@smtpin.rzone.de> <63DE321E-6793-490D-8700-EBD2B6A38CEB@freudenbergs.de> <9A1CE872-8397-4B6A-A901-DB3E59F7E7D1@freudenbergs.de> Message-ID: On Tue, Oct 20, 2015 at 12:46 PM, Bert Freudenberg wrote: > > > On 20.10.2015, at 20:07, Chris Muller wrote: > > > > On Tue, Oct 20, 2015 at 10:50 AM, Eliot Miranda > wrote: > >> > >> > >> _,,,^..^,,,_ (phone) > >> > >>> On Oct 20, 2015, at 8:38 AM, Bert Freudenberg > wrote: > >>> > >>>> On 18.10.2015, at 01:39, commits@source.squeak.org wrote: > >>>> > >>>> Marcel Taeumel uploaded a new version of System to project The Trunk: > >>>> http://source.squeak.org/trunk/System-mt.771.mcz > >>>> > >>>> ==================== Summary ==================== > >>>> > >>>> Name: System-mt.771 > >>>> Author: mt > >>>> Time: 17 October 2015, 6:38:55.72 pm > >>>> UUID: 4aee8d76-cfcf-ad48-ae3e-6d971ce6fea9 > >>>> Ancestors: System-cmm.770 > >>>> > >>>> Log change stamps at the granularity of seconds not only minutes. > >>>> > >>>> Why? A minute is quite long and it is likely to have two method > (versions) with the same timestamp. > >>> > >>> Why does the time stamp have to be unique? And it?s still not certain > to be unique. IMHO minutes resolution is good enough and reads nicer. > >> > >> +1. Marcel, if you really need this why not make it a preference, off > by default. > > > > Marcel already gave compelling use-cases for why he wants > > finer-grained timestamps. > > I had missed that discussion. But I read it now and the only use case > Marcel mentioned was comparing method versions, and claiming comparing time > stamps was faster than comparing the source code. But AFICT both timestamps > and source code are retrieved from the source file each time so the > difference should not be huge. Even if it was faster then you could still > compare the timestamps first and compare the source only if the times are > the same. > +1. Bert is right. One has to go to the file for either. > > > I'm failing to understand why anyone would be against more precision > > internally.. You don't have to use it, it doesn't hurt anything if > > its there, does it? > > It makes source files even more verbose than they are now. MC?s timestamps > are overkill IMHO. So without a compelling reason I would not change it. I > could see good arguments for adding a timezone, but that would still not > necessitate higher resolution. And after all, you cannot compare timestamps > across images anyway, because you cannot rely on the clock being globally > synchronized. And within a system, seconds plus order in the changes files > are sufficient. > > - Bert - _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151020/c20017b3/attachment.htm From commits at source.squeak.org Tue Oct 20 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 20 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151020215503.15973.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-October/009061.html Name: Morphic-topa.1015 Ancestors: Morphic-cmm.1014 Fix World-Halo MNU * option-click in World -> Halo * click on Menu bubble (red icon) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009062.html Name: Kernel-ul.961 Ancestors: Kernel-ul.960 Introduced Random >> #nextBytes:into:startingAt: which can be used to fill the indexable byte fields of an objects with random bytes efficiently. The method was extracted from #nextLargeInt:, which is its only user for now. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009063.html Name: Morphic-topa.1016 Ancestors: Morphic-topa.1015 The Main Docking bar is currently morphic-only ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009064.html Name: ST80-topa.189 Ancestors: ST80-topa.188 React to deprecations, renames, and missing methods ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009065.html Name: ToolBuilder-Kernel-topa.91 Ancestors: ToolBuilder-Kernel-topa.90 Don't bother displaying emty lists to chose from ============================================= From asqueaker at gmail.com Wed Oct 21 00:46:55 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 21 00:46:58 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: >> What about saving timezone information, too? Taking on Eliot's thought >> about >> code from different packages, what about someone that makes a change at >> PST >> and one at UTC? ... How to merge those at the moment? I see no problem merging those at the moment..? Merging does not account for timestamps, only differences. With a method conflict, timezone would not be useful to resolve a method level conflict.. > This seems much more useful. I would like to see minute granularity UTC > timestamps. Why useful? I'm not opposed, just curious if, by the end of the day, would we really ever consume it? Just an opportunity to have a more precise model at very little cost? From robert.w.withers at gmail.com Wed Oct 21 02:14:25 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Wed Oct 21 02:14:29 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> Message-ID: <5626F501.4000401@gmail.com> Ron, I checked that email and there is no mention of who it was sent to now this SFLC advisors. Ok that must be the Software Freedom Law Center. I just reached out to them on this. Thank you, Robert On 10/19/2015 06:25 PM, Ron Teitelbaum wrote: > Hi Robert, > > I went back and reviewed and this is what I sent to BIS. > > http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/000117.html > > Not much to it but we got a lot of advice from SFLC first. > > >From our research OS projects are allowed to host cryptographic code and make available for anyone to download. BUT that does not exclude users of the code from being restrained from exporting that code to any USA identified restricted entities. For example: http://www.state.gov/j/ct/list/c14151.htm > > I would recommend at the very least to register the repo with the BIS for Pharo, but I would also contact the SFLC to verify nothing has changed. > > All the best, > > Ron > >> -----Original Message----- >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Robert Withers >> Sent: Monday, October 19, 2015 5:28 PM >> To: The general-purpose Squeak developers list; 'Chris Muller' >> Cc: 'Pharo Development List' >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> (resending with Pharo list) >> >> Ron, would it be an easy process to add a second URL to the exception >> paperwork. Pharo does have new ideas about code storage and distribution >> that we would want to take advantage of. This would help a lot! >> >> Then again, screw their paperwork requirements of us. Put my name as >> responsible on the Pharo code and I'll take a trip to Cuba, if they need a >> scape goat for their 20th century thinking. Crypto is already out of the bag >> and everyone uses it freely. Just do it and ask permission later. >> >> In thinking about consolidating crypto code between squeak and pharo, I >> would guess there would be a thin capatibility layer for each system, then >> the Crypto code in the main. My goal is to have compatibility, crypto and >> plugins on both virtual platforms. >> >> Thanks so much ^^ >> >> Robert >> >> On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: >>> Hi Chris, >>> >>> The exemption is not for the location of the server but the URL where it is >> hosted. I'm happy to help in any way I can but I don't have access to the >> Pharo Repos. I have no issue with having Pharo packages on SqueakSource if >> that is what everyone agrees too. We have multiple packages hosted there. >> It's ok with me if we host some pharo code there too. >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- >>>> From: Chris Muller [mailto:ma.chris.m@gmail.com] >>>> Sent: Monday, October 19, 2015 3:59 PM >>>> To: Ron Teitelbaum >>>> Cc: Pharo Development List; The general-purpose Squeak developers >>>> list >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>> RandomGenerator class>>unpredictableStringsDo: >>>> >>>> Heh, well, since then SqueakSource itself was moved to a different >>>> server in a different country. I guess there was also a mirror of >>>> SqueakSource hosted in Chile under a different URL for many years. >>>> >>>> I'm doubtful any of it matters, but we wouldn't want anyone to end up >>>> in Gitmo over it. If you're uncomfortable about hosting a copy >>>> elsewhere, then please at least namespace-prefix the Pharo-specific >>>> packages, to at least help keep it from becoming a tangled mess. >>>> >>>> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >>>> wrote: >>>>> Hi All, >>>>> >>>>> Unless someone filed the proper paperwork I would suggest NOT moving >>>> the cryptography code anywhere except for SqueakSource. When we >>>> started the project we spent time ensuring that we had a proper >>>> exemption from the U.S. regulations on exporting cryptographic code. >>>> If someone copied and forked the code that exemption may not still >>>> apply to that new repository. >>>>> I'm not personally involved with the code on Pharo, not sure who is >>>>> doing >>>> crypto there. >>>>> All the best, >>>>> >>>>> Ron >>>>> >>>>>> -----Original Message----- >>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>> Behalf Of Chris Muller >>>>>> Sent: Monday, October 19, 2015 2:47 PM >>>>>> To: The general-purpose Squeak developers list >>>>>> Cc: Pharo Development List >>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>>>> RandomGenerator class>>unpredictableStringsDo: >>>>>> >>>>>> Yes, if a common package for both Squeak and Pharo is possible, >>>>>> that'd be great. Otherwise, the Squeak and Pharo versions should >>>>>> reside in separate repositories. Squeak users are still using >>>>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. >>>>>> >>>>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>>>> wrote: >>>>>>> hey Ron, >>>>>>> >>>>>>> It was actually the Pharo Cryptography team I was thinking of. >>>>>>> Perhaps we can get the same package to work in both squeak and >>>>>>> Pharo, with use of installable entropy sources or the like. In >>>>>>> order to get SqueakElib running in Pharo I need crypto and we may >>>>>>> as >>>> well do it right. >>>>>>> Cheers, >>>>>>> Robert >>>>>>> >>>>>>> >>>>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>>>> Hi Robert, >>>>>>>> >>>>>>>> You are already on the Cryptograph repo on SqueakSource.com as an >>>>>> admin. >>>>>>>> Please feel free to reorg if you like. >>>>>>>> >>>>>>>> Let me know if you have trouble resurrecting your account. >>>>>>>> >>>>>>>> All the best, >>>>>>>> >>>>>>>> Ron >>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org >>>>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On >>>>>>>>> Behalf Of Robert Withers >>>>>>>>> Sent: Monday, October 19, 2015 1:53 PM >>>>>>>>> To: squeak-dev@lists.squeakfoundation.org >>>>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to >>>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>>>> >>>>>>>>> This is great guys. Is there a way to get this from the image? >>>>>>>>> Good to get >>>>>>>> it >>>>>>>>> with an FFI/OSProcess call or something. >>>>>>>>> >>>>>>>>> Thank you, >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>>>> Hi Guys, >>>>>>>>>> >>>>>>>>>> How about getting the CPU temperature. I think most CPUs >>>>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I >>>>>>>>>> think it is seven bits. The real range should be less than >>>>>>>>>> that but it may be enough to help add some entropy. >>>>>>>>>> >>>>>>>>>> Lou >>>>>>>>>> >>>>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, >>>>>>>>>>> hasn't >>>> it? >>>>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope >>>>>>>>>>> these have been kind years to you, as they have for me. >>>>>>>>>>> >>>>>>>>>>> I love the idea of optional sources of entropy, depending on >>>>>>>>>>> the deployed capabilities. So there are our mouse points and >>>>>>>>>>> such, because they ought to be optional. >>>>>>>>>>> >>>>>>>>>>> What are some reliably present sources in the most minimal >>>>>> situation? >>>>>>>>>>> If we could define minimal as an image with no image level I/O >>>>>>>>>>> beyond file I/O, I would think we'd have: Kernel, System, >>>>>>>>>>> Collections, Compiler and FFI. Some intransitives in that >>>>>>>>>>> scope for entropy would be >>>>>>>>> grand. >>>>>>>>>>> >>>>>>>>>>> I was thinking to take 5 millisecondClockValues, separated by >>>>>>>>>>> 4 non-secure random intervals: take the low order byte of the >>>>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. >>>>>>>>>>> >>>>>>>>>>> I can coordinate these changes. Ron, could you add me to the >>>>>>>>>>> Cryptography team so I can upload the Pharo Cryptography >>>>>>>>> #bleedingEdge? >>>>>>>>>>> >>>>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>>>> >>>>>>>>>>> Robert >>>>>>>>>>> >>>>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>>>> Hi Robert, >>>>>>>>>>>> >>>>>>>>>>>> Nice to see you! >>>>>>>>>>>> >>>>>>>>>>>> Looks interesting I know that Chris did something gathering >>>>>>>>>>>> sources of >>>>>>>>> entropy. Seems like the more the better. Could you just make >>>>>>>>> the entropy sources optional such that if they exist we use them? >>>>>>>>> I would have to go back and see what Chris did but he was >>>>>>>>> following suggestions from Schneider in his secureRandom. >>>>>>>>>>>> >>>>>>>>>>>> All the best, >>>>>>>>>>>> >>>>>>>>>>>> Ron Teitelbaum >>>>>>>>>>>> >>>>>>>>>>>>> -----Original Message----- >>>>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] >>>>>>>>>>>>> On Behalf Of Robert Withers >>>>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo >>>>>>>>>>>>> Development List >>>>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>> class>>unpredictableStringsDo: >>>>>>>>>>>>> >>>>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, >>>>>>>>>>>>> followed by my modified Pharo method below. I welcome any >>>>>> feedback. >>>>>>>>>>>>> Regards, >>>>>>>>>>>>> Robert >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Existing: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> should >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: World imageForm bits >>>>>>>>>>>>> compressToByteArray ; >>>>>>>>>>>>> value: Sensor mousePoint x asString ; >>>>>>>>>>>>> value: Sensor mousePoint y asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString ; >>>>>>>>>>>>> value: Display extent asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(vmVersion platformName primVmPath >>>>>>>>>>>>> imageName >>>>>>>>> platformSubtype >>>>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>>>>>>>> imageName) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> asByteArray >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> "maybe the pointer has moved, hit it again." >>>>>>>>>>>>> value: Sensor mousePoint asString ; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> --- >>>>>>>>>>>>> Pharo port: >>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>> environment that >>>>>>>>> should >>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>> >>>>>>>>>>>>> | time | >>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray ; >>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>> value: Time now asString. >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>> #(version primImagePath imagePath >>>>>>>>>>>>> datedVersion >>>>>>>>>>>>> lastQuitLogPosition) >>>>>>>>>>>>> collect: >>>>>>>>>>>>> [ : each | >>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>> current >>>>>>>>>>>>> perform: each) >>>>>>>>> asByteArray >>>>>>>>>>>>> ] ]. >>>>>>>>>>>>> aBlock >>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>> asByteArray >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>>>> This is a message intended for anyone who was on the >>>>>>>>>>>>>> Cryptography >>>>>>>>> team. >>>>>>>>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed some >>>>>>>>>>>>>> class>>uncertainty >>>>>>>>>>>>>> from the results of this message. My question is what >>>>>>>>>>>>>> should I do about that? This method seems to require >>>>>>>>>>>>>> non-headless, as it is checking the mouse point and such. >>>>>>>>>>>>>> This being a crypto cornerstone, what the best answer here. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you, >>>>>>>>>>>>>> Robert >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> ----------------------------------------------------------- >>>>>>>>>> Louis LaBrunda >>>>>>>>>> Keystone Software Corp. >>>>>>>>>> SkypeMe callto://PhotonDemon >>>>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>>>> Software.com >>>>>>>>>> >>>>>>>> >>>>>>>> >>>>> >>> > > From ron at usmedrec.com Wed Oct 21 02:23:12 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Oct 21 02:23:17 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <5626F501.4000401@gmail.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> <5626F501.4000401@gmail.com> Message-ID: <046401d10ba7$6fe41e80$4fac5b80$@usmedrec.com> > From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of > Robert Withers > Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > RandomGenerator class>>unpredictableStringsDo: > > Ron, > > I checked that email and there is no mention of who it was sent to now this > SFLC advisors. Ok that must be the Software Freedom Law Center. I just > reached out to them on this. [Ron Teitelbaum] It was set to Dan Ravicher but not sure if he is still there. http://lists.squeakfoundation.org/pipermail/cryptography/2005-November/000084.html > > Thank you, > Robert > > On 10/19/2015 06:25 PM, Ron Teitelbaum wrote: > > Hi Robert, > > > > I went back and reviewed and this is what I sent to BIS. > > > > http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/ > > 000117.html > > > > Not much to it but we got a lot of advice from SFLC first. > > > > >From our research OS projects are allowed to host cryptographic code > > >and make available for anyone to download. BUT that does not exclude > > >users of the code from being restrained from exporting that code to > > >any USA identified restricted entities. For example: > > >http://www.state.gov/j/ct/list/c14151.htm > > > > I would recommend at the very least to register the repo with the BIS for > Pharo, but I would also contact the SFLC to verify nothing has changed. > > > > All the best, > > > > Ron > > > >> -----Original Message----- > >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf > >> Of Robert Withers > >> Sent: Monday, October 19, 2015 5:28 PM > >> To: The general-purpose Squeak developers list; 'Chris Muller' > >> Cc: 'Pharo Development List' > >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > >> RandomGenerator class>>unpredictableStringsDo: > >> > >> (resending with Pharo list) > >> > >> Ron, would it be an easy process to add a second URL to the exception > >> paperwork. Pharo does have new ideas about code storage and > >> distribution that we would want to take advantage of. This would help a > lot! > >> > >> Then again, screw their paperwork requirements of us. Put my name as > >> responsible on the Pharo code and I'll take a trip to Cuba, if they > >> need a scape goat for their 20th century thinking. Crypto is already > >> out of the bag and everyone uses it freely. Just do it and ask permission > later. > >> > >> In thinking about consolidating crypto code between squeak and pharo, > >> I would guess there would be a thin capatibility layer for each > >> system, then the Crypto code in the main. My goal is to have > >> compatibility, crypto and plugins on both virtual platforms. > >> > >> Thanks so much ^^ > >> > >> Robert > >> > >> On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: > >>> Hi Chris, > >>> > >>> The exemption is not for the location of the server but the URL > >>> where it is > >> hosted. I'm happy to help in any way I can but I don't have access > >> to the Pharo Repos. I have no issue with having Pharo packages on > >> SqueakSource if that is what everyone agrees too. We have multiple > packages hosted there. > >> It's ok with me if we host some pharo code there too. > >>> All the best, > >>> > >>> Ron > >>> > >>>> -----Original Message----- > >>>> From: Chris Muller [mailto:ma.chris.m@gmail.com] > >>>> Sent: Monday, October 19, 2015 3:59 PM > >>>> To: Ron Teitelbaum > >>>> Cc: Pharo Development List; The general-purpose Squeak developers > >>>> list > >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] > >>>> RandomGenerator class>>unpredictableStringsDo: > >>>> > >>>> Heh, well, since then SqueakSource itself was moved to a different > >>>> server in a different country. I guess there was also a mirror of > >>>> SqueakSource hosted in Chile under a different URL for many years. > >>>> > >>>> I'm doubtful any of it matters, but we wouldn't want anyone to end > >>>> up in Gitmo over it. If you're uncomfortable about hosting a copy > >>>> elsewhere, then please at least namespace-prefix the Pharo-specific > >>>> packages, to at least help keep it from becoming a tangled mess. > >>>> > >>>> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum > > >>>> wrote: > >>>>> Hi All, > >>>>> > >>>>> Unless someone filed the proper paperwork I would suggest NOT > >>>>> moving > >>>> the cryptography code anywhere except for SqueakSource. When we > >>>> started the project we spent time ensuring that we had a proper > >>>> exemption from the U.S. regulations on exporting cryptographic code. > >>>> If someone copied and forked the code that exemption may not still > >>>> apply to that new repository. > >>>>> I'm not personally involved with the code on Pharo, not sure who > >>>>> is doing > >>>> crypto there. > >>>>> All the best, > >>>>> > >>>>> Ron > >>>>> > >>>>>> -----Original Message----- > >>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On > >>>>>> Behalf Of Chris Muller > >>>>>> Sent: Monday, October 19, 2015 2:47 PM > >>>>>> To: The general-purpose Squeak developers list > >>>>>> Cc: Pharo Development List > >>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to > >>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: > >>>>>> > >>>>>> Yes, if a common package for both Squeak and Pharo is possible, > >>>>>> that'd be great. Otherwise, the Squeak and Pharo versions should > >>>>>> reside in separate repositories. Squeak users are still using > >>>>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. > >>>>>> > >>>>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers > >>>>>> wrote: > >>>>>>> hey Ron, > >>>>>>> > >>>>>>> It was actually the Pharo Cryptography team I was thinking of. > >>>>>>> Perhaps we can get the same package to work in both squeak and > >>>>>>> Pharo, with use of installable entropy sources or the like. In > >>>>>>> order to get SqueakElib running in Pharo I need crypto and we > >>>>>>> may as > >>>> well do it right. > >>>>>>> Cheers, > >>>>>>> Robert > >>>>>>> > >>>>>>> > >>>>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: > >>>>>>>> Hi Robert, > >>>>>>>> > >>>>>>>> You are already on the Cryptograph repo on SqueakSource.com as > >>>>>>>> an > >>>>>> admin. > >>>>>>>> Please feel free to reorg if you like. > >>>>>>>> > >>>>>>>> Let me know if you have trouble resurrecting your account. > >>>>>>>> > >>>>>>>> All the best, > >>>>>>>> > >>>>>>>> Ron > >>>>>>>> > >>>>>>>>> -----Original Message----- > >>>>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org > >>>>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On > >>>>>>>>> Behalf Of Robert Withers > >>>>>>>>> Sent: Monday, October 19, 2015 1:53 PM > >>>>>>>>> To: squeak-dev@lists.squeakfoundation.org > >>>>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to > >>>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: > >>>>>>>>> > >>>>>>>>> This is great guys. Is there a way to get this from the image? > >>>>>>>>> Good to get > >>>>>>>> it > >>>>>>>>> with an FFI/OSProcess call or something. > >>>>>>>>> > >>>>>>>>> Thank you, > >>>>>>>>> Robert > >>>>>>>>> > >>>>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: > >>>>>>>>>> Hi Guys, > >>>>>>>>>> > >>>>>>>>>> How about getting the CPU temperature. I think most CPUs > >>>>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I > >>>>>>>>>> think it is seven bits. The real range should be less than > >>>>>>>>>> that but it may be enough to help add some entropy. > >>>>>>>>>> > >>>>>>>>>> Lou > >>>>>>>>>> > >>>>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers > >>>>>>>>>> wrote: > >>>>>>>>>> > >>>>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, > >>>>>>>>>>> hasn't > >>>> it? > >>>>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope > >>>>>>>>>>> these have been kind years to you, as they have for me. > >>>>>>>>>>> > >>>>>>>>>>> I love the idea of optional sources of entropy, depending on > >>>>>>>>>>> the deployed capabilities. So there are our mouse points and > >>>>>>>>>>> such, because they ought to be optional. > >>>>>>>>>>> > >>>>>>>>>>> What are some reliably present sources in the most minimal > >>>>>> situation? > >>>>>>>>>>> If we could define minimal as an image with no image level > >>>>>>>>>>> I/O beyond file I/O, I would think we'd have: Kernel, > >>>>>>>>>>> System, Collections, Compiler and FFI. Some intransitives in > >>>>>>>>>>> that scope for entropy would be > >>>>>>>>> grand. > >>>>>>>>>>> > >>>>>>>>>>> I was thinking to take 5 millisecondClockValues, separated > >>>>>>>>>>> by > >>>>>>>>>>> 4 non-secure random intervals: take the low order byte of > >>>>>>>>>>> the > >>>>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. > >>>>>>>>>>> > >>>>>>>>>>> I can coordinate these changes. Ron, could you add me to the > >>>>>>>>>>> Cryptography team so I can upload the Pharo Cryptography > >>>>>>>>> #bleedingEdge? > >>>>>>>>>>> > >>>>>>>>>>> Thanks and I look forward to more, :) > >>>>>>>>>>> > >>>>>>>>>>> Robert > >>>>>>>>>>> > >>>>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: > >>>>>>>>>>>> Hi Robert, > >>>>>>>>>>>> > >>>>>>>>>>>> Nice to see you! > >>>>>>>>>>>> > >>>>>>>>>>>> Looks interesting I know that Chris did something gathering > >>>>>>>>>>>> sources of > >>>>>>>>> entropy. Seems like the more the better. Could you just make > >>>>>>>>> the entropy sources optional such that if they exist we use them? > >>>>>>>>> I would have to go back and see what Chris did but he was > >>>>>>>>> following suggestions from Schneider in his secureRandom. > >>>>>>>>>>>> > >>>>>>>>>>>> All the best, > >>>>>>>>>>>> > >>>>>>>>>>>> Ron Teitelbaum > >>>>>>>>>>>> > >>>>>>>>>>>>> -----Original Message----- > >>>>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev- > bounces@lists.pharo.org] > >>>>>>>>>>>>> On Behalf Of Robert Withers > >>>>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM > >>>>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo > >>>>>>>>>>>>> Development List > >>>>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] > >>>>>>>>>>>>> RandomGenerator > >>>>>>>>>>>>> class>>unpredictableStringsDo: > >>>>>>>>>>>>> > >>>>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, > >>>>>>>>>>>>> followed by my modified Pharo method below. I welcome > any > >>>>>> feedback. > >>>>>>>>>>>>> Regards, > >>>>>>>>>>>>> Robert > >>>>>>>>>>>>> > >>>>>>>>>>>>> --- > >>>>>>>>>>>>> Existing: > >>>>>>>>>>>>> unpredictableStringsDo: aBlock > >>>>>>>>>>>>> "Enumerate sources of information from my > >>>>>>>>>>>>> environment that > >>>>>>>>> should > >>>>>>>>>>>>> be generally hard to guess." > >>>>>>>>>>>>> | time | > >>>>>>>>>>>>> time := Time millisecondsToRun: > >>>>>>>>>>>>> [ aBlock > >>>>>>>>>>>>> value: World imageForm bits > >>>>>>>>>>>>> compressToByteArray ; > >>>>>>>>>>>>> value: Sensor mousePoint x asString ; > >>>>>>>>>>>>> value: Sensor mousePoint y asString ; > >>>>>>>>>>>>> value: Time > >>>>>>>>>>>>> millisecondClockValue asByteArray ; > >>>>>>>>>>>>> value: Date today asString ; > >>>>>>>>>>>>> value: Time now asString ; > >>>>>>>>>>>>> value: Display extent asString. > >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>>>>>>>> #(vmVersion platformName primVmPath > >>>>>>>>>>>>> imageName > >>>>>>>>> platformSubtype > >>>>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString > >>>>>>>>>>>>> imageName) > >>>>>>>>>>>>> collect: > >>>>>>>>>>>>> [ : each | > >>>>>>>>>>>>> aBlock value: (SmalltalkImage > >>>>>>>>>>>>> current > >>>>>>>>>>>>> perform: each) > >>>>>>>>> asByteArray > >>>>>>>>>>>>> ] ]. > >>>>>>>>>>>>> aBlock > >>>>>>>>>>>>> value: time asByteArray; > >>>>>>>>>>>>> "maybe the pointer has moved, hit it again." > >>>>>>>>>>>>> value: Sensor mousePoint asString ; > >>>>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>>>> asByteArray > >>>>>>>>>>>>> > >>>>>>>>>>>>> --- > >>>>>>>>>>>>> Pharo port: > >>>>>>>>>>>>> unpredictableStringsDo: aBlock > >>>>>>>>>>>>> "Enumerate sources of information from my > >>>>>>>>>>>>> environment that > >>>>>>>>> should > >>>>>>>>>>>>> be generally hard to guess." > >>>>>>>>>>>>> > >>>>>>>>>>>>> | time | > >>>>>>>>>>>>> time := Time millisecondsToRun: > >>>>>>>>>>>>> [ aBlock > >>>>>>>>>>>>> value: Time > >>>>>>>>>>>>> millisecondClockValue asByteArray ; > >>>>>>>>>>>>> value: Date today asString ; > >>>>>>>>>>>>> value: Time now asString. > >>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. > >>>>>>>>>>>>> #(version primImagePath imagePath > >>>>>>>>>>>>> datedVersion > >>>>>>>>>>>>> lastQuitLogPosition) > >>>>>>>>>>>>> collect: > >>>>>>>>>>>>> [ : each | > >>>>>>>>>>>>> aBlock value: (SmalltalkImage > >>>>>>>>>>>>> current > >>>>>>>>>>>>> perform: each) > >>>>>>>>> asByteArray > >>>>>>>>>>>>> ] ]. > >>>>>>>>>>>>> aBlock > >>>>>>>>>>>>> value: time asByteArray; > >>>>>>>>>>>>> value: Time millisecondClockValue > >>>>>>>>>>>>> asByteArray > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: > >>>>>>>>>>>>>> This is a message intended for anyone who was on the > >>>>>>>>>>>>>> Cryptography > >>>>>>>>> team. > >>>>>>>>>>>>>> I recently ported it to Pharo and had to make changes to > >>>>>>>>>>>>> RandomGenerator > >>>>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed > >>>>>>>>>>>>>> class>>some uncertainty > >>>>>>>>>>>>>> from the results of this message. My question is what > >>>>>>>>>>>>>> should I do about that? This method seems to require > >>>>>>>>>>>>>> non-headless, as it is checking the mouse point and such. > >>>>>>>>>>>>>> This being a crypto cornerstone, what the best answer > here. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thank you, > >>>>>>>>>>>>>> Robert > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>> ----------------------------------------------------------- > >>>>>>>>>> Louis LaBrunda > >>>>>>>>>> Keystone Software Corp. > >>>>>>>>>> SkypeMe callto://PhotonDemon > >>>>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- > >>>>>> Software.com > >>>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>> > >>> > > > > > From commits at source.squeak.org Wed Oct 21 07:33:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 21 07:33:14 2015 Subject: [squeak-dev] The Trunk: Tools-mt.643.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.643.mcz ==================== Summary ==================== Name: Tools-mt.643 Author: mt Time: 21 October 2015, 9:32:57.533 am UUID: bab4a899-da58-a849-893a-e974390d7253 Ancestors: Tools-cmm.642 If there is nothing to pretty-diff, show at least the pretty-printed version of the code to avoid confusion. =============== Diff against Tools-cmm.642 =============== Item was changed: ----- Method: ChangeList>>diffedVersionContents (in category 'viewing access') ----- diffedVersionContents "Answer diffed version contents, maybe pretty maybe not" | change class earlier later | (listIndex = 0 or: [changeList size < listIndex]) ifTrue: [^ '']. change := changeList at: listIndex. later := change text. class := change methodClass. (listIndex == changeList size or: [class == nil]) + ifTrue: [^ (self showingPrettyDiffs and: [class notNil]) + ifTrue: [class prettyPrinterClass format: later in: class notifying: nil] + ifFalse: [later]]. - ifTrue: [^ later]. earlier := (changeList at: listIndex + 1) text. ^ TextDiffBuilder buildDisplayPatchFrom: earlier to: later inClass: class prettyDiffs: self showingPrettyDiffs! From bert at freudenbergs.de Wed Oct 21 11:09:20 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 21 11:09:24 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: On 21.10.2015, at 02:46, Chris Muller wrote: > >> This seems much more useful. I would like to see minute granularity UTC >> timestamps. > > Why useful? I'm not opposed, just curious if, by the end of the day, > would we really ever consume it? > > Just an opportunity to have a more precise model at very little cost? IMHO having the timezone information is interesting. (I?d store local+tz, and derive UTC from that if needed) Having second-precision information about when exactly someone accepted a method is not interesting. - 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/20151021/277b2867/smime.bin From Marcel.Taeumel at hpi.de Wed Oct 21 12:47:33 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Oct 21 12:59:06 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: <1445431653590-4857077.post@n4.nabble.com> In my system, comparing stamp strings is about 100 times faster than comparing sources to detect the current version of code in the image. (~6,000,000 vs. ~60,000 per second) Considering the fact that stamps may be duplicate requires just 1 additional LOC: versions detect: [:v | v stamp = current stamp and: [v source = current source]. ...or none if you format differently. ;) I have 80,000 methods in my system. Adding 3 bytes/characters to each stamp would require an additional ~235 kB in the changes/sources file, which is about 0.007% of our 5.0 sources file. For example, adding 10 versions to *each* method would require additional 2 megs. However, 800,000 method changes are quite a lot. Hmm... printing the full timestamp would make that #copyFrom:to: call in Utilities >> #changeStamp obsolete. :-D *~*~*~*~* Whatever. I like to avoid that 1 LOC. I like to speed-up such detection/sorting algorithm if the actual problem size will be somewhat unknown in the (near) future. But time zones would be nice. :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4857077.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From btc at openinworld.com Wed Oct 21 14:19:52 2015 From: btc at openinworld.com (Ben Coman) Date: Wed Oct 21 14:20:38 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: On Wed, Oct 21, 2015 at 5:38 AM, Eliot Miranda wrote: > Hi Marcel, > > On Tue, Oct 20, 2015 at 1:15 AM, marcel.taeumel > wrote: >> >> What about saving timezone information, too? Taking on Eliot's thought >> about >> code from different packages, what about someone that makes a change at >> PST >> and one at UTC? ... How to merge those at the moment? > > > This seems much more useful. I would like to see minute granularity UTC > timestamps. And that reminds me I need to replace the time stuff in 5.0 > with the microsecond clock support. Are you talking about Delay? Would you like me to push my microsecond DelayScheduler introduced in Pharo? (but I still had a bit more I wanted to clean in Pharo.) cheers -ben >> Accurate timestamps are kind of important... :-/ > > > Yes, agreed. But method timestamps to second granularity? Why do you need > that kind of granularity? > >> >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856686.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > > From asqueaker at gmail.com Wed Oct 21 14:44:17 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 21 14:44:19 2015 Subject: [squeak-dev] The Trunk: Tools-mt.643.mcz In-Reply-To: <56273fc0.c839c20a.49d20.ffffd18bSMTPIN_ADDED_MISSING@mx.google.com> References: <56273fc0.c839c20a.49d20.ffffd18bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Does this not render the code below the ifTrue:ifFalse: unreachable? It looks like a unconditional return, which should be factored out to the outer level (which would allow the Compiler would be able to tell you..).. On Wed, Oct 21, 2015 at 2:33 AM, wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.643.mcz > > ==================== Summary ==================== > > Name: Tools-mt.643 > Author: mt > Time: 21 October 2015, 9:32:57.533 am > UUID: bab4a899-da58-a849-893a-e974390d7253 > Ancestors: Tools-cmm.642 > > If there is nothing to pretty-diff, show at least the pretty-printed version of the code to avoid confusion. > > =============== Diff against Tools-cmm.642 =============== > > Item was changed: > ----- Method: ChangeList>>diffedVersionContents (in category 'viewing access') ----- > diffedVersionContents > "Answer diffed version contents, maybe pretty maybe not" > > | change class earlier later | > (listIndex = 0 > or: [changeList size < listIndex]) > ifTrue: [^ '']. > change := changeList at: listIndex. > later := change text. > class := change methodClass. > (listIndex == changeList size or: [class == nil]) > + ifTrue: [^ (self showingPrettyDiffs and: [class notNil]) > + ifTrue: [class prettyPrinterClass format: later in: class notifying: nil] > + ifFalse: [later]]. > - ifTrue: [^ later]. > > earlier := (changeList at: listIndex + 1) text. > > ^ TextDiffBuilder buildDisplayPatchFrom: earlier to: later inClass: class prettyDiffs: self showingPrettyDiffs! > > From Marcel.Taeumel at hpi.de Wed Oct 21 14:41:25 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Oct 21 14:52:59 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.643.mcz In-Reply-To: References: Message-ID: <1445438485372-4857107.post@n4.nabble.com> No? The indentation might be confusing. I just expanded the "^ later" return expression. :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-643-mcz-tp4856974p4857107.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Wed Oct 21 15:28:45 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 21 15:28:47 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.643.mcz In-Reply-To: <1445438485372-4857107.post@n4.nabble.com> References: <1445438485372-4857107.post@n4.nabble.com> Message-ID: Okay, I just looked at it in the code browser, you're right.. :) On Wed, Oct 21, 2015 at 9:41 AM, marcel.taeumel wrote: > No? The indentation might be confusing. I just expanded the "^ later" return > expression. :) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Tools-mt-643-mcz-tp4856974p4857107.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Wed Oct 21 15:59:11 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 21 15:59:13 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.1017.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1017.mcz ==================== Summary ==================== Name: Morphic-cmm.1017 Author: cmm Time: 21 October 2015, 10:58:27.344 am UUID: e7bb8d82-a440-4d4f-b53d-b4c772827458 Ancestors: Morphic-topa.1016 - When Windows Raise On Click is off, still raise SystemWindows when any of their resize or splitter handles are clicked, not just their title bar, so that Z-order can be adjusted even when the title bar is covered. - Demote Command+t back to a desktop-only command key, not global, because I forgot about Command+t for stepping Over in the debugger -- we don't need that opening a Transcript. =============== Diff against Morphic-topa.1016 =============== Item was added: + ----- Method: CornerGripMorph>>mouseDown: (in category 'as yet unclassified') ----- + mouseDown: aMouseButtonEvent + target isSystemWindow ifTrue: + [ target == SystemWindow topWindow ifFalse: [ target activate ] ]. + super mouseDown: aMouseButtonEvent! Item was changed: ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') ----- handleListenEvent: aUserInputEvent "Handlers for *global* keys, regardless of which widget has keyboard focus." aUserInputEvent type = #keystroke ifTrue: [ aUserInputEvent commandKeyPressed ifTrue: + [ aUserInputEvent keyValue = $R asciiValue ifTrue: [ Utilities browseRecentSubmissions ]. - [ aUserInputEvent keyValue = $t asciiValue ifTrue: [ World findATranscript: aUserInputEvent ]. - aUserInputEvent keyValue = $R asciiValue ifTrue: [ Utilities browseRecentSubmissions ]. aUserInputEvent keyValue = $L asciiValue ifTrue: [ World findAFileList: aUserInputEvent ]. aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ]. aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ]. aUserInputEvent keyValue = $] asciiValue ifTrue: [ Smalltalk snapshot: true andQuit: false ] ] ]! Item was changed: ----- Method: ProportionalSplitterMorph>>mouseDown: (in category 'events') ----- mouseDown: anEvent "If the user manually drags me, don't override him with auto positioning." + self owningWindow ifNotNil: [ : systemWindow | systemWindow == SystemWindow topWindow ifFalse: [ systemWindow activate ]]. anEvent redButtonChanged ifTrue: [ self withSiblingSplittersDo: [ : each | each stopStepping ] ] ifFalse: [ anEvent shiftPressed ifTrue: [ self startStepping ] ifFalse: [ self startStepping. self withSiblingSplittersDo: [ : each | each startStepping ] ] ]. (self class showSplitterHandles not and: [ self bounds containsPoint: anEvent cursorPoint ]) ifTrue: [ oldColor := self color. self color: Color black ]. ^ super mouseDown: anEvent! From Das.Linux at gmx.de Wed Oct 21 17:43:19 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 21 17:43:24 2015 Subject: [squeak-dev] /inbox missing in 4.6/5.0/trunk Message-ID: Hi all, I just noticed that the 'inbox' repo is missing in our 2+1 current images, so people might be less encouraged to contribute. How would we fix that? Best regards -Tobias From asqueaker at gmail.com Wed Oct 21 18:06:07 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 21 18:06:09 2015 Subject: [squeak-dev] /inbox missing in 4.6/5.0/trunk In-Reply-To: References: Message-ID: Add it into ReleaseBuilder prepareNewRelease. On Wed, Oct 21, 2015 at 12:43 PM, Tobias Pape wrote: > Hi all, > > I just noticed that the 'inbox' repo is > missing in our 2+1 current images, so people might > be less encouraged to contribute. > How would we fix that? > > Best regards > -Tobias > > > From eliot.miranda at gmail.com Wed Oct 21 18:19:54 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 21 18:19:57 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: Hi Ben, On Wed, Oct 21, 2015 at 7:19 AM, Ben Coman wrote: > On Wed, Oct 21, 2015 at 5:38 AM, Eliot Miranda > wrote: > > Hi Marcel, > > > > On Tue, Oct 20, 2015 at 1:15 AM, marcel.taeumel > > wrote: > >> > >> What about saving timezone information, too? Taking on Eliot's thought > >> about > >> code from different packages, what about someone that makes a change at > >> PST > >> and one at UTC? ... How to merge those at the moment? > > > > > > This seems much more useful. I would like to see minute granularity UTC > > timestamps. And that reminds me I need to replace the time stuff in 5.0 > > with the microsecond clock support. > > Are you talking about Delay? Would you like me to push my microsecond > DelayScheduler introduced in Pharo? (but I still had a bit more I > wanted to clean in Pharo.) > Not juest Delay, but deriving all time from the microsecond clock primitives, and eliminating the code for the now unnecessary overflow/wraparound of the millisecond clock. So yes please. I also made changes at Cadence that mean one can profile across a snapshot and hence profile start-up and shut-down activities. I'll integrate this after you integrate the microsecond clock basis. > cheers -ben > > >> Accurate timestamps are kind of important... :-/ > > > > > > Yes, agreed. But method timestamps to second granularity? Why do you > need > > that kind of granularity? > > > >> > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > >> > http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856686.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151021/1a87e11f/attachment.htm From ericnboulder at yahoo.com Wed Oct 21 18:25:41 2015 From: ericnboulder at yahoo.com (Eric Scharff) Date: Wed Oct 21 18:25:47 2015 Subject: [squeak-dev] Does anyone have the original Squeak 1.x Mac releases? References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> I'm trying to track down the very oldest oldest squeak releases (mostly for historic purposes), the original 1.x (and earlier) releases for Mac. Of course, research.apple.com is long gone, and even ftp.squeak.org doesn't seem to have the .sit.hqx files Anyone have any idea where the old distributions can be found? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151021/1fde5149/attachment.htm From commits at source.squeak.org Wed Oct 21 18:26:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 21 18:26:26 2015 Subject: [squeak-dev] The Inbox: Network-topa.166.mcz Message-ID: Tobias Pape uploaded a new version of Network to project The Inbox: http://source.squeak.org/inbox/Network-topa.166.mcz ==================== Summary ==================== Name: Network-topa.166 Author: topa Time: 21 October 2015, 8:26:14.656 pm UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 Ancestors: Network-topa.165 UUIDGenerator - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed - Fix UUIDGenerator class>>#initialize to correctly register at startup - Do not reset default on startup but rather reseed TheRandom Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) =============== Diff against Network-topa.165 =============== Item was changed: Object subclass: #UUIDGenerator + instanceVariableNames: '' - instanceVariableNames: 'bits' classVariableNames: 'Default TheRandom TheSemaphore' poolDictionaries: '' category: 'Network-UUID'! !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! I generate a pseudo-random UUID by asking Random for a 128 bit value. See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! Item was changed: ----- Method: UUIDGenerator class>>default (in category 'instance creation') ----- default + ^ Default ifNil: [Default := self new] + ! - Default ifNil: [self generateDefault]. - ^Default! Item was removed: - ----- Method: UUIDGenerator class>>generateDefault (in category 'instance creation') ----- - generateDefault - Default := self new! Item was changed: ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- initialize TheRandom := Random new. TheSemaphore := Semaphore forMutualExclusion. + Smalltalk addToStartUpList: self! - Smalltalk addToStartUpList: self after: nil.! Item was added: + ----- Method: UUIDGenerator class>>resetDefault (in category 'class initialization') ----- + resetDefault + Default := nil.! Item was changed: ----- Method: UUIDGenerator class>>startUp (in category 'class initialization') ----- startUp + "Reseed the random" + TheSemaphore critical: [TheRandom seed: nil].! - Default := nil! Item was added: + ----- Method: UUIDGenerator>>fillRandomly: (in category 'instance creation') ----- + fillRandomly: aUUID + + TheSemaphore critical: [ + TheRandom nextBytes: 16 "128 bit" into: aUUID startingAt: 1].! Item was changed: ----- Method: UUIDGenerator>>generateBytes:forVersion: (in category 'instance creation') ----- + generateBytes: aUUID forVersion: aVersion + | versionID fixedValue | + + aVersion = 4 ifFalse: [^ self error: 'Unsupported version']. + + self fillRandomly: aUUID. + versionID := ((aUUID at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" + fixedValue := ((aUUID at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" + aUUID + at: 7 put: versionID; + at: 9 put: fixedValue.! - generateBytes: aPlaceHolder forVersion: aVersion - aVersion = 4 ifTrue: [self generateFieldsVersion4] - ifFalse: [self error: 'Unsupported version']. - self placeFields: aPlaceHolder.! Item was removed: - ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- - generateFieldsVersion4 - - TheSemaphore critical: [ - bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! Item was removed: - ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- - placeFields: aByteArray - - | version fixed | - bits isLarge - ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] - ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. - - version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" - fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" - aByteArray - at: 7 put: version; - at: 9 put: fixed.! From Das.Linux at gmx.de Wed Oct 21 18:29:27 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 21 18:29:29 2015 Subject: [squeak-dev] The Inbox: Network-topa.166.mcz Message-ID: <76DC82ED-4116-4116-8FD4-2EDC8107754C@gmx.de> Hi all I hope this version is an improvement over the last attempt :) Levente, is this way of using the Random generator useful? That is, Class-wide, guarded with a Semaphore and re-seeded at image startup? Best regards -Tobias On 21.10.2015, at 18:26, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Network to project The Inbox: > http://source.squeak.org/inbox/Network-topa.166.mcz > > ==================== Summary ==================== > > Name: Network-topa.166 > Author: topa > Time: 21 October 2015, 8:26:14.656 pm > UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 > Ancestors: Network-topa.165 > > UUIDGenerator > - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed > - Fix UUIDGenerator class>>#initialize to correctly register at startup > - Do not reset default on startup but rather reseed TheRandom > > Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) > > =============== Diff against Network-topa.165 =============== > > Item was changed: > Object subclass: #UUIDGenerator > + instanceVariableNames: '' > - instanceVariableNames: 'bits' > classVariableNames: 'Default TheRandom TheSemaphore' > poolDictionaries: '' > category: 'Network-UUID'! > > !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! > I generate a pseudo-random UUID by asking Random for a 128 bit value. > > See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! > > Item was changed: > ----- Method: UUIDGenerator class>>default (in category 'instance creation') ----- > default > + ^ Default ifNil: [Default := self new] > + ! > - Default ifNil: [self generateDefault]. > - ^Default! > > Item was removed: > - ----- Method: UUIDGenerator class>>generateDefault (in category 'instance creation') ----- > - generateDefault > - Default := self new! > > Item was changed: > ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- > initialize > TheRandom := Random new. > TheSemaphore := Semaphore forMutualExclusion. > + Smalltalk addToStartUpList: self! > - Smalltalk addToStartUpList: self after: nil.! > > Item was added: > + ----- Method: UUIDGenerator class>>resetDefault (in category 'class initialization') ----- > + resetDefault > + Default := nil.! > > Item was changed: > ----- Method: UUIDGenerator class>>startUp (in category 'class initialization') ----- > startUp > + "Reseed the random" > + TheSemaphore critical: [TheRandom seed: nil].! > - Default := nil! > > Item was added: > + ----- Method: UUIDGenerator>>fillRandomly: (in category 'instance creation') ----- > + fillRandomly: aUUID > + > + TheSemaphore critical: [ > + TheRandom nextBytes: 16 "128 bit" into: aUUID startingAt: 1].! > > Item was changed: > ----- Method: UUIDGenerator>>generateBytes:forVersion: (in category 'instance creation') ----- > + generateBytes: aUUID forVersion: aVersion > + | versionID fixedValue | > + > + aVersion = 4 ifFalse: [^ self error: 'Unsupported version']. > + > + self fillRandomly: aUUID. > + versionID := ((aUUID at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" > + fixedValue := ((aUUID at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" > + aUUID > + at: 7 put: versionID; > + at: 9 put: fixedValue.! > - generateBytes: aPlaceHolder forVersion: aVersion > - aVersion = 4 ifTrue: [self generateFieldsVersion4] > - ifFalse: [self error: 'Unsupported version']. > - self placeFields: aPlaceHolder.! > > Item was removed: > - ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- > - generateFieldsVersion4 > - > - TheSemaphore critical: [ > - bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! > > Item was removed: > - ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- > - placeFields: aByteArray > - > - | version fixed | > - bits isLarge > - ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] > - ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. > - > - version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" > - fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" > - aByteArray > - at: 7 put: version; > - at: 9 put: fixed.! > > From pdebruic at gmail.com Wed Oct 21 20:27:11 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Oct 21 20:38:47 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1445459231862-4857150.post@n4.nabble.com> Can you download an image from the SqueakJS site or is it run only? https://bertfreudenberg.github.io/SqueakJS/run/ Looks like there is a 1.13 image there. EricNBoulder wrote > I'm trying to track down the very oldest oldest squeak releases (mostly > for historic purposes), the original 1.x (and earlier) releases for Mac. > Of course, research.apple.com is long gone, and even ftp.squeak.org > doesn't seem to have the .sit.hqx files > Anyone have any idea where the old distributions can be found? -- View this message in context: http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857150.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Wed Oct 21 21:35:22 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Oct 21 21:35:29 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad Message-ID: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> I wanted to add a little cmd key hack to the debugger to print numbers in hex - useful when debugging the VM in sim etc. Eventually I found a way to solve my immediate needs but along the path I found a dazzlingly complex intertwingled mess of code for menus and cmd key handling. Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes {'make project link (P)' translated. #makeProjectLink}. which a) annoyed me because I want to use cmd-shift-p for my printItHex b) seems to be a bit odd to have in a text editor menu, and very much so in a code editor menu c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph does not understand #makeProjectLink) Also when building menus - which is done for every menu button press! - we end up doing a scan of all the methods (for menu related pragmas) of every class that could possibly be involved. This is even more insane than using #isKindOf: within UI code. Perhaps one could argue that it isn?t quite completely insane on multi-core/multi-GHz/megaRam machines but on anything slower ( like the Pi, a rather important platform for public awareness and outreach) it can ruin the UI experience. The current system reminds me unpleasantly of the PenPoint/Go UI dating back to ?89 or so; their hardware was nominally several times faster than our Active Book, and they proudly proclaimed how it was all carefully optimised code and yet it was grindingly slow to do anything in the UI. The Active Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect queue, 1Mb RAM for everything including the screen and filing system) and running that terrible slow nonsense called Smalltalk that everyone knew was slow as slow. Many years later I met one of the developers and it turned out that their framework carefully built menus by checking here, looking there, seeing if a string needed translating, having a tea-break and finally asking a complex graphics subsystem to render something. The Active Book code bitblt?d a menu form to the screen. Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. I also spotted some code where menu getting selectors are examined to see how many arguments they take and then assorted #perform incantations are used. In general abetter option is to make use of the execution machinery and just send the most flexible message. Implement it at some sensible root to re-try with a simpler version if needed. I wish I had time to clean this up but I have to make VM changes to support a largish number of Scratch users and my brain is about ready to explode. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim 29A, the hexadecimal of the Beast. From Das.Linux at gmx.de Wed Oct 21 21:47:12 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 21 21:47:15 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> Message-ID: <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> Hi Tim, On 21.10.2015, at 23:35, tim Rowledge wrote: > I wanted to add a little cmd key hack to the debugger to print numbers in hex - useful when debugging the VM in sim etc. Eventually I found a way to solve my immediate needs but along the path I found a dazzlingly complex intertwingled mess of code for menus and cmd key handling. > > Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes > {'make project link (P)' translated. #makeProjectLink}. > which > a) annoyed me because I want to use cmd-shift-p for my printItHex > b) seems to be a bit odd to have in a text editor menu, and very much so in a code editor menu > c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph does not understand #makeProjectLink) > > Also when building menus - which is done for every menu button press! - we end up doing a scan of all the methods (for menu related pragmas) of every class that could possibly be involved. This is even more insane than using #isKindOf: within UI code. Perhaps one could argue that it isn?t quite completely insane on multi-core/multi-GHz/megaRam machines but on anything slower ( like the Pi, a rather important platform for public awareness and outreach) it can ruin the UI experience. > > The current system reminds me unpleasantly of the PenPoint/Go UI dating back to ?89 or so; their hardware was nominally several times faster than our Active Book, and they proudly proclaimed how it was all carefully optimised code and yet it was grindingly slow to do anything in the UI. The Active Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect queue, 1Mb RAM for everything including the screen and filing system) and running that terrible slow nonsense called Smalltalk that everyone knew was slow as slow. Many years later I met one of the developers and it turned out that their framework carefully built menus by checking here, looking there, seeing if a string needed translating, having a tea-break and finally asking a complex graphics subsystem to render something. The Active Book code bitblt?d a menu form to the screen. > > Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. > > I also spotted some code where menu getting selectors are examined to see how many arguments they take and then assorted #perform incantations are used. In general abetter option is to make use of the execution machinery and just send the most flexible message. Implement it at some sensible root to re-try with a simpler version if needed. > > I wish I had time to clean this up but I have to make VM changes to support a largish number of Scratch users and my brain is about ready to explode. Speaking for the pragma-based menu system, yes, there's room for improvement, and once Start-of-Semester stress settles down, I'll take on it. Best regards -Tobias From Das.Linux at gmx.de Wed Oct 21 21:49:34 2015 From: Das.Linux at gmx.de (Das.Linux@gmx.de) Date: Wed Oct 21 21:49:37 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> Message-ID: On 21.10.2015, at 23:47, Tobias Pape wrote: > Hi Tim, > > On 21.10.2015, at 23:35, tim Rowledge wrote: > >> I wanted to add a little cmd key hack to the debugger to print numbers in hex - useful when debugging the VM in sim etc. Eventually I found a way to solve my immediate needs but along the path I found a dazzlingly complex intertwingled mess of code for menus and cmd key handling. >> >> Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes >> {'make project link (P)' translated. #makeProjectLink}. >> which >> a) annoyed me because I want to use cmd-shift-p for my printItHex >> b) seems to be a bit odd to have in a text editor menu, and very much so in a code editor menu >> c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph does not understand #makeProjectLink) >> >> Also when building menus - which is done for every menu button press! - we end up doing a scan of all the methods (for menu related pragmas) of every class that could possibly be involved. This is even more insane than using #isKindOf: within UI code. Perhaps one could argue that it isn?t quite completely insane on multi-core/multi-GHz/megaRam machines but on anything slower ( like the Pi, a rather important platform for public awareness and outreach) it can ruin the UI experience. >> >> The current system reminds me unpleasantly of the PenPoint/Go UI dating back to ?89 or so; their hardware was nominally several times faster than our Active Book, and they proudly proclaimed how it was all carefully optimised code and yet it was grindingly slow to do anything in the UI. The Active Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect queue, 1Mb RAM for everything including the screen and filing system) and running that terrible slow nonsense called Smalltalk that everyone knew was slow as slow. Many years later I met one of the developers and it turned out that their framework carefully built menus by checking here, looking there, seeing if a string needed translating, having a tea-break and finally asking a complex graphics subsystem to render something. The Active Book code bitblt?d a menu form to the screen. >> >> Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. >> >> I also spotted some code where menu getting selectors are examined to see how many arguments they take and then assorted #perform incantations are used. In general abetter option is to make use of the execution machinery and just send the most flexible message. Implement it at some sensible root to re-try with a simpler version if needed. >> >> I wish I had time to clean this up but I have to make VM changes to support a largish number of Scratch users and my brain is about ready to explode. > > Speaking for the pragma-based menu system, yes, there's room for > improvement, and once Start-of-Semester stress settles down, > I'll take on it. Also, keybindings in general? -t From lewis at mail.msen.com Wed Oct 21 21:49:45 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Oct 21 21:49:48 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> Message-ID: <20151021214945.GB55441@shell.msen.com> On Wed, Oct 21, 2015 at 11:47:12PM +0200, Tobias Pape wrote: > Hi Tim, > > On 21.10.2015, at 23:35, tim Rowledge wrote: > > > > I wish I had time to clean this up but I have to make VM changes to support a largish number of Scratch users and my brain is about ready to explode. > > Speaking for the pragma-based menu system, yes, there's room for > improvement, and once Start-of-Semester stress settles down, > I'll take on it. > Yay! Dave From commits at source.squeak.org Wed Oct 21 21:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 21 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151021215502.8607.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-October/009066.html Name: Tools-mt.643 Ancestors: Tools-cmm.642 If there is nothing to pretty-diff, show at least the pretty-printed version of the code to avoid confusion. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009067.html Name: Morphic-cmm.1017 Ancestors: Morphic-topa.1016 - When Windows Raise On Click is off, still raise SystemWindows when any of their resize or splitter handles are clicked, not just their title bar, so that Z-order can be adjusted even when the title bar is covered. - Demote Command+t back to a desktop-only command key, not global, because I forgot about Command+t for stepping Over in the debugger -- we don't need that opening a Transcript. ============================================= From tim at rowledge.org Wed Oct 21 22:18:09 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Oct 21 22:18:14 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <20151021214945.GB55441@shell.msen.com> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <20151021214945.GB55441@shell.msen.com> Message-ID: <8B29BF4F-9E1E-4C69-AFCB-721FCDE06000@rowledge.org> > On 21-10-2015, at 2:49 PM, David T. Lewis wrote: > > On Wed, Oct 21, 2015 at 11:47:12PM +0200, Tobias Pape wrote: >> Hi Tim, >> >> On 21.10.2015, at 23:35, tim Rowledge wrote: >>> >>> I wish I had time to clean this up but I have to make VM changes to support a largish number of Scratch users and my brain is about ready to explode. >> >> Speaking for the pragma-based menu system, yes, there's room for >> improvement, and once Start-of-Semester stress settles down, >> I'll take on it. >> > > Yay! > > Dave I?ll +1 and thumbs-up that idea. I understand you were talking about this stuff with eliot just yesterday, so nice synchronicity there. I?m moderately sure there is something of a faintly similar nature that could help Morphic performance in general. There?s far too much by way of ?ooh, let?s do some complicated work to get a value and compare it with the current value to see if anything has changed before altering the UI? when an approach more like ?let?s see if this flag has been set to tell me that some complicated work actually needs to be done to find a new value and update the UI? would be of some benefit. People working on anything relating to the UI really ought to be required to run on a Pi or similar so that they are constantly reminded of the cost of apparently clever ideas. If it runs fast on a PI imagine how quick it can seem on a fast PC. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SHP: Solve Halting Problem From asqueaker at gmail.com Wed Oct 21 22:29:08 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 21 22:29:11 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> Message-ID: Tim, Squeak is a complex system, with a lot of functions and a complex interaction between human and machine. No system like that is going to be the toddler-coddler you want it to be. >>> Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes >>> {'make project link (P)' translated. #makeProjectLink}. >>> which >>> a) annoyed me because I want to use cmd-shift-p for my printItHex So override it, you have a "live" system. The code IS the user-interface, just as much as the menus are... >>> Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. That'll waste all the memory in your Pi... From lewis at mail.msen.com Wed Oct 21 22:42:06 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Oct 21 22:42:09 2015 Subject: [squeak-dev] [FYI] Restarted jenkins on build.squeak.org Message-ID: <20151021224206.GA65793@shell.msen.com> Test jobs on build.squeak.org seemed to be running very slowly and timing out. I restarted jenkins a couple minutes ago to see if it makes any difference. Dave From leves at elte.hu Wed Oct 21 23:52:03 2015 From: leves at elte.hu (Levente Uzonyi) Date: Wed Oct 21 23:52:05 2015 Subject: [squeak-dev] The Inbox: Network-topa.166.mcz In-Reply-To: <76DC82ED-4116-4116-8FD4-2EDC8107754C@gmx.de> References: <76DC82ED-4116-4116-8FD4-2EDC8107754C@gmx.de> Message-ID: Hi Tobias, Yes, it looks good. Levente On Wed, 21 Oct 2015, Tobias Pape wrote: > Hi all > > I hope this version is an improvement over the last attempt :) > Levente, is this way of using the Random generator useful? > That is, Class-wide, guarded with a Semaphore and re-seeded at > image startup? > > Best regards > -Tobias > > On 21.10.2015, at 18:26, commits@source.squeak.org wrote: > >> Tobias Pape uploaded a new version of Network to project The Inbox: >> http://source.squeak.org/inbox/Network-topa.166.mcz >> >> ==================== Summary ==================== >> >> Name: Network-topa.166 >> Author: topa >> Time: 21 October 2015, 8:26:14.656 pm >> UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 >> Ancestors: Network-topa.165 >> >> UUIDGenerator >> - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed >> - Fix UUIDGenerator class>>#initialize to correctly register at startup >> - Do not reset default on startup but rather reseed TheRandom >> >> Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) >> >> =============== Diff against Network-topa.165 =============== >> >> Item was changed: >> Object subclass: #UUIDGenerator >> + instanceVariableNames: '' >> - instanceVariableNames: 'bits' >> classVariableNames: 'Default TheRandom TheSemaphore' >> poolDictionaries: '' >> category: 'Network-UUID'! >> >> !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! >> I generate a pseudo-random UUID by asking Random for a 128 bit value. >> >> See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! >> >> Item was changed: >> ----- Method: UUIDGenerator class>>default (in category 'instance creation') ----- >> default >> + ^ Default ifNil: [Default := self new] >> + ! >> - Default ifNil: [self generateDefault]. >> - ^Default! >> >> Item was removed: >> - ----- Method: UUIDGenerator class>>generateDefault (in category 'instance creation') ----- >> - generateDefault >> - Default := self new! >> >> Item was changed: >> ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- >> initialize >> TheRandom := Random new. >> TheSemaphore := Semaphore forMutualExclusion. >> + Smalltalk addToStartUpList: self! >> - Smalltalk addToStartUpList: self after: nil.! >> >> Item was added: >> + ----- Method: UUIDGenerator class>>resetDefault (in category 'class initialization') ----- >> + resetDefault >> + Default := nil.! >> >> Item was changed: >> ----- Method: UUIDGenerator class>>startUp (in category 'class initialization') ----- >> startUp >> + "Reseed the random" >> + TheSemaphore critical: [TheRandom seed: nil].! >> - Default := nil! >> >> Item was added: >> + ----- Method: UUIDGenerator>>fillRandomly: (in category 'instance creation') ----- >> + fillRandomly: aUUID >> + >> + TheSemaphore critical: [ >> + TheRandom nextBytes: 16 "128 bit" into: aUUID startingAt: 1].! >> >> Item was changed: >> ----- Method: UUIDGenerator>>generateBytes:forVersion: (in category 'instance creation') ----- >> + generateBytes: aUUID forVersion: aVersion >> + | versionID fixedValue | >> + >> + aVersion = 4 ifFalse: [^ self error: 'Unsupported version']. >> + >> + self fillRandomly: aUUID. >> + versionID := ((aUUID at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" >> + fixedValue := ((aUUID at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" >> + aUUID >> + at: 7 put: versionID; >> + at: 9 put: fixedValue.! >> - generateBytes: aPlaceHolder forVersion: aVersion >> - aVersion = 4 ifTrue: [self generateFieldsVersion4] >> - ifFalse: [self error: 'Unsupported version']. >> - self placeFields: aPlaceHolder.! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- >> - generateFieldsVersion4 >> - >> - TheSemaphore critical: [ >> - bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! >> >> Item was removed: >> - ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- >> - placeFields: aByteArray >> - >> - | version fixed | >> - bits isLarge >> - ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] >> - ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. >> - >> - version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" >> - fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" >> - aByteArray >> - at: 7 put: version; >> - at: 9 put: fixed.! >> >> > > > From leves at elte.hu Thu Oct 22 00:00:14 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Oct 22 00:00:19 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: The primitive names are different in Squeak and Pharo, so care must be taken to not break stuff during the integration. Also, some methods, like #millisecondClockValue, have some special semantics which should be preserved. Levente On Wed, 21 Oct 2015, Eliot Miranda wrote: > Hi Ben, > On Wed, Oct 21, 2015 at 7:19 AM, Ben Coman wrote: > On Wed, Oct 21, 2015 at 5:38 AM, Eliot Miranda wrote: > > Hi Marcel, > > > > On Tue, Oct 20, 2015 at 1:15 AM, marcel.taeumel > > wrote: > >> > >> What about saving timezone information, too? Taking on Eliot's thought > >> about > >> code from different packages, what about someone that makes a change at > >> PST > >> and one at UTC? ... How to merge those at the moment? > > > > > > This seems much more useful. I would like to see minute granularity UTC > > timestamps.? And that reminds me I need to replace the time stuff in 5.0 > > with the microsecond clock support. > > Are you talking about Delay? Would you like me to push my microsecond > DelayScheduler introduced in Pharo? (but I still had a bit more I > wanted to clean in Pharo.) > > > Not juest Delay, but deriving all time from the microsecond clock primitives, and eliminating the code for the now unnecessary overflow/wraparound > of the millisecond clock.? So yes please.? I also made changes at Cadence that mean one can profile across a snapshot and hence profile start-up > and shut-down activities.? I'll integrate this after you integrate the microsecond clock basis. > ? > cheers -ben > > >> Accurate timestamps are kind of important... :-/ > > > > > > Yes, agreed.? But method timestamps to second granularity?? Why do you need > > that kind of granularity? > > > >> > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > >> http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4856686.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > > > > -- > _,,,^..^,,,_ > best,?Eliot > > From ericnboulder at yahoo.com Thu Oct 22 01:31:28 2015 From: ericnboulder at yahoo.com (Eric Scharff) Date: Thu Oct 22 01:31:34 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <1445459231862-4857150.post@n4.nabble.com> References: <1445459231862-4857150.post@n4.nabble.com> Message-ID: <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> I could probably muck around and get the image and changes files, but what I'm looking for, among other things, is the V1.0 Mac virtual machine. On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker wrote: Can you download an image from the SqueakJS site or is it run only? https://bertfreudenberg.github.io/SqueakJS/run/ Looks like there is a 1.13 image there.? EricNBoulder wrote > I'm trying to track down the very oldest oldest squeak releases (mostly > for historic purposes), the original 1.x (and earlier) releases for Mac. > Of course, research.apple.com is long gone, and even ftp.squeak.org > doesn't seem to have the .sit.hqx files > Anyone have any idea where the old distributions can be found? -- View this message in context: http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857150.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151022/54bc9498/attachment-0001.htm From lewis at mail.msen.com Thu Oct 22 02:18:59 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 22 02:19:01 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> References: <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20151022021859.GA99476@shell.msen.com> On Thu, Oct 22, 2015 at 01:31:28AM +0000, Eric Scharff wrote: > I could probably muck around and get the image and changes files, but what I'm looking for, among other things, is the V1.0 Mac virtual machine. > Conventional wisdom is that unmodified versions of these original artifacts are lost in the mists of time. If you or anyone else should turn up evidence to the contrary, please let us know. In particular, if you are able to muck around and find the original V1.0 image and changes files, that would be a welcome find. The VM would be nice to have also, but locating a copy of the first released image would be even better, and I'm sure that Bert would quickly enshrine it on the try.squeak.org site. Dave > > On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker wrote: > > > Can you download an image from the SqueakJS site or is it run only? > > https://bertfreudenberg.github.io/SqueakJS/run/ > > Looks like there is a 1.13 image there.?? > > > EricNBoulder wrote > > I'm trying to track down the very oldest oldest squeak releases (mostly > > for historic purposes), the original 1.x (and earlier) releases for Mac. > > Of course, research.apple.com is long gone, and even ftp.squeak.org > > doesn't seem to have the .sit.hqx files > > Anyone have any idea where the old distributions can be found? > From johnmci at smalltalkconsulting.com Thu Oct 22 03:06:25 2015 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Thu Oct 22 03:07:07 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <20151022021859.GA99476@shell.msen.com> References: <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <20151022021859.GA99476@shell.msen.com> Message-ID: I may have that, but I guess I need to put it somewhere. Give me a few hours On Wed, Oct 21, 2015 at 7:18 PM, David T. Lewis wrote: > On Thu, Oct 22, 2015 at 01:31:28AM +0000, Eric Scharff wrote: > > I could probably muck around and get the image and changes files, but > what I'm looking for, among other things, is the V1.0 Mac virtual machine. > > > > Conventional wisdom is that unmodified versions of these original artifacts > are lost in the mists of time. If you or anyone else should turn up > evidence > to the contrary, please let us know. > > In particular, if you are able to muck around and find the original V1.0 > image > and changes files, that would be a welcome find. The VM would be nice to > have > also, but locating a copy of the first released image would be even > better, and > I'm sure that Bert would quickly enshrine it on the try.squeak.org site. > > Dave > > > > > > On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker < > pdebruic@gmail.com> wrote: > > > > > > Can you download an image from the SqueakJS site or is it run only? > > > > https://bertfreudenberg.github.io/SqueakJS/run/ > > > > Looks like there is a 1.13 image there.?? > > > > > > EricNBoulder wrote > > > I'm trying to track down the very oldest oldest squeak releases (mostly > > > for historic purposes), the original 1.x (and earlier) releases for > Mac. > > > Of course, research.apple.com is long gone, and even ftp.squeak.org > > > doesn't seem to have the .sit.hqx files > > > Anyone have any idea where the old distributions can be found? > > > > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151021/89dfb2b7/attachment.htm From johnmci at smalltalkconsulting.com Thu Oct 22 04:11:45 2015 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Thu Oct 22 04:12:26 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> References: <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> Message-ID: I have one that is Squeak VM 68K Dec 17th, 1996 1:05pm Not sure the version tho, guess it would be 1.1 Mmm I do have an Squeak Installer from Setp 24th 1996. Have to figure out how to open it first. On Wed, Oct 21, 2015 at 6:31 PM, Eric Scharff wrote: > I could probably muck around and get the image and changes files, but what > I'm looking for, among other things, is the V1.0 Mac virtual machine. > > > > On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker < > pdebruic@gmail.com> wrote: > > > Can you download an image from the SqueakJS site or is it run only? > > https://bertfreudenberg.github.io/SqueakJS/run/ > > Looks like there is a 1.13 image there. > > > > > > > EricNBoulder wrote > > > I'm trying to track down the very oldest oldest squeak releases (mostly > > for historic purposes), the original 1.x (and earlier) releases for Mac. > > Of course, research.apple.com is long gone, and even ftp.squeak.org > > doesn't seem to have the .sit.hqx files > > Anyone have any idea where the old distributions can be found? > > > > > > > -- > View this message in context: > http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857150.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > > > > > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151021/2d4cd268/attachment.htm From johnmci at smalltalkconsulting.com Thu Oct 22 05:26:21 2015 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Thu Oct 22 05:27:03 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: References: <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> Message-ID: Look for the Squeak 1.1 from installer.zip file in ftp://ftp.smalltalkconsulting.com On Wed, Oct 21, 2015 at 9:11 PM, John McIntosh < johnmci@smalltalkconsulting.com> wrote: > I have one that is Squeak VM 68K Dec 17th, 1996 1:05pm Not sure the > version tho, guess it would be 1.1 > Mmm I do have an Squeak Installer from Setp 24th 1996. Have to figure out > how to open it first. > > On Wed, Oct 21, 2015 at 6:31 PM, Eric Scharff > wrote: > >> I could probably muck around and get the image and changes files, but >> what I'm looking for, among other things, is the V1.0 Mac virtual machine. >> >> >> >> On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker < >> pdebruic@gmail.com> wrote: >> >> >> Can you download an image from the SqueakJS site or is it run only? >> >> https://bertfreudenberg.github.io/SqueakJS/run/ >> >> Looks like there is a 1.13 image there. >> >> >> >> >> >> >> EricNBoulder wrote >> >> > I'm trying to track down the very oldest oldest squeak releases (mostly >> > for historic purposes), the original 1.x (and earlier) releases for Mac. >> > Of course, research.apple.com is long gone, and even ftp.squeak.org >> > doesn't seem to have the .sit.hqx files >> > Anyone have any idea where the old distributions can be found? >> >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857150.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> > > > -- > =========================================================================== > John M. McIntosh. Corporate Smalltalk Consulting Ltd > https://www.linkedin.com/in/smalltalk > =========================================================================== > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151021/b74a8dba/attachment.htm From commits at source.squeak.org Thu Oct 22 06:28:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 06:28:08 2015 Subject: [squeak-dev] The Trunk: Network-topa.165.mcz Message-ID: Tobias Pape uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-topa.165.mcz ==================== Summary ==================== Name: Network-topa.165 Author: topa Time: 19 October 2015, 11:28:20.052 pm UUID: b4b1febc-df00-4213-b76f-c007b06bb2e2 Ancestors: Network-ul.164 Simplify and speed up non-primitive UUID generation (hat-tip to Martin McClure ) Instead of generating all parts of the UUID separately, we generate a single, 128-bit number and modify it slightly to match the UUID definition. This complies with RFC 4122, Sec. 4.4. This approach is 2500 times faster than the old method and only about 3 times slower than the primitive. Hence, we disable the primitive and no longer need to rely on the UUIDPlugin to be present. Informational: The Timings: { 'Pure allocation' -> [UUID basicNew: 16] bench. 'Primitive + alloc' -> [(UUID basicNew: 16) primMakeUUID] bench. 'Old + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorOld new generateBytes: u forVersion: 4] bench. 'New + alloc' -> [|u| u := (UUID basicNew: 16). UUIDGeneratorNew new generateBytes: u forVersion: 4] bench. }. "{ 'Pure allocation'->'56,500,000 per second. 17.7 nanoseconds per run.' . 'Primitive + alloc'->'1,510,000 per second. 663 nanoseconds per run.' . 'Old + alloc'->'202 per second. 4.95 milliseconds per run.' . 'New + alloc'->'519,000 per second. 1.93 microseconds per run.' }." =============== Diff against Network-ul.164 =============== Item was changed: ----- Method: String>>asAlphaNumeric:extraChars:mergeUID: (in category '*network-uuid') ----- asAlphaNumeric: totalSize extraChars: additionallyAllowed mergeUID: minimalSizeOfRandomPart "Generates a String with unique identifier ( UID ) qualities, the difference to a UUID is that its beginning is derived from the receiver, so that it has a meaning for a human reader. Answers a String of totalSize, which consists of 3 parts 1.part: the beginning of the receiver only consisting of a-z, A-Z, 0-9 and extraChars in Collection additionallyAllowed ( which can be nil ) 2.part: a single _ 3.part: a ( random ) UID of size >= minimalSizeOfRandomPart consisting of a-z, A-Z, 0-9 Starting letters are capitalized. TotalSize must be at least 1. Exactly 1 occurrence of $_ is guaranteed ( unless additionallyAllowed includes $_ ). The random part has even for small sizes good UID qualitites for many practical purposes. If only lower- or uppercase letters are demanded, simply convert the answer with say #asLowercase. The probability of a duplicate will rise only moderately ( see below ). Example: size of random part = 10 in n generated UIDs the chance p of having non-unique UIDs is n = 10000 -> p < 1e-10 if answer is reduced to lowerCase: p < 1.4 e-8 n = 100000 -> p < 1e-8 at the bottom is a snippet for your own calculations Note: the calculated propabilites are theoretical, for the actually used random generator they may be much worse" | stream out sizeOfFirstPart index ascii ch skip array random | totalSize > minimalSizeOfRandomPart ifFalse: [ self errorOutOfBounds ]. stream := ReadStream on: self. out := WriteStream on: ( String new: totalSize ). index := 0. skip := true. sizeOfFirstPart := totalSize - minimalSizeOfRandomPart - 1. [ stream atEnd or: [ index >= sizeOfFirstPart ]] whileFalse: [ ((( ascii := ( ch := stream next ) asciiValue ) >= 65 and: [ ascii <= 90 ]) or: [ ( ascii >= 97 and: [ ascii <= 122 ]) or: [ ch isDigit or: [ additionallyAllowed notNil and: [ additionallyAllowed includes: ch ]]]]) ifTrue: [ skip ifTrue: [ out nextPut: ch asUppercase ] ifFalse: [ out nextPut: ch ]. index := index + 1. skip := false ] ifFalse: [ skip := true ]]. out nextPut: $_. array := Array new: 62. 1 to: 26 do: [ :i | array at: i put: ( i + 64 ) asCharacter. array at: i + 26 put: ( i + 96 ) asCharacter ]. 53 to: 62 do: [ :i | array at: i put: ( i - 5 ) asCharacter ]. + random := ThreadSafeRandom value. - random := UUIDGenerator default randomGenerator. totalSize - index - 1 timesRepeat: [ out nextPut: ( array atRandom: random )]. ^out contents " calculation of probability p for failure of uniqueness in n UIDs Note: if answer will be converted to upper or lower case replace 62 with 36 | n i p all | all := 62 raisedTo: sizeOfRandomPart. i := 1. p := 0.0 . n := 10000. [ i <= n ] whileTrue: [ p := p + (( i - 1 ) / all ). i := i + 1 ]. p approximation formula: n squared / ( 62.0 raisedTo: sizeOfRandomPart ) / 2 " "'Crop SketchMorphs and Grab Screen Rect to JPG' asAlphaNumeric: 31 extraChars: nil mergeUID: 10 'CropSketchMorphsAndG_iOw94jquN6' 'Monticello' asAlphaNumeric: 31 extraChars: nil mergeUID: 10 'Monticello_kp6aV2l0IZK9uBULGOeG' 'version-', ( '1.1.2' replaceAll: $. with: $- ) asAlphaNumeric: 31 extraChars: #( $- ) mergeUID: 10 'Version-1-1-2_kuz2tMg2xX9iRLDVR'" ! Item was changed: ----- Method: UUID>>initialize (in category 'initalize-release') ----- initialize + self makeUUID.! - self primMakeUUID.! Item was added: + ----- Method: UUID>>makeUUID (in category 'as yet unclassified') ----- + makeUUID + UUIDGenerator default generateBytes: self forVersion: 4.! Item was changed: ----- Method: UUID>>primMakeUUID (in category 'system primitives') ----- primMakeUUID + self makeUUID! - UUIDGenerator default generateBytes: self forVersion: 4.! Item was changed: Object subclass: #UUIDGenerator + instanceVariableNames: 'bits' + classVariableNames: 'Default TheRandom TheSemaphore' - instanceVariableNames: 'timeLow timeMid timeHiAndVersion clockSeqHiAndReserved clockSeqLow node randomCounter randomGenerator semaphoreForGenerator' - classVariableNames: 'Default' poolDictionaries: '' category: 'Network-UUID'! + !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! + I generate a pseudo-random UUID by asking Random for a 128 bit value. - !UUIDGenerator commentStamp: '' prior: 0! - This class generates a pseudo-random UUID - by John M McIntosh johnmci@smalltalkconsulting.com + See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! - See http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt! Item was changed: ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- initialize + TheRandom := Random new. + TheSemaphore := Semaphore forMutualExclusion. Smalltalk addToStartUpList: self after: nil.! Item was changed: ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- generateFieldsVersion4 + + TheSemaphore critical: [ + bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! - - timeLow := self generateRandomBitsOfLength: 32. - timeMid := self generateRandomBitsOfLength: 16. - timeHiAndVersion := 16r4000 bitOr: (self generateRandomBitsOfLength: 12). - clockSeqHiAndReserved := 16r80 bitOr: (self generateRandomBitsOfLength: 6). - clockSeqLow := self generateRandomBitsOfLength: 8. - node := self generateRandomBitsOfLength: 48. - ! Item was removed: - ----- Method: UUIDGenerator>>generateOneOrZero (in category 'generator') ----- - generateOneOrZero - ^self semaphoreForGenerator - critical: [| value | - value := self randomGenerator next. - self randomCounter: self randomCounter + 1. - self randomCounter > 100000 - ifTrue: [self setupRandom]. - value < 0.5 - ifTrue: [0] - ifFalse: [1]].! Item was removed: - ----- Method: UUIDGenerator>>generateRandomBitsOfLength: (in category 'generator') ----- - generateRandomBitsOfLength: aNumberOfBits - | target | - target := 0. - aNumberOfBits isZero ifTrue: [^target]. - target := self generateOneOrZero. - (aNumberOfBits - 1) timesRepeat: - [target := (target bitShift: 1) bitOr: self generateOneOrZero]. - ^target! Item was removed: - ----- Method: UUIDGenerator>>initialize (in category 'instance creation') ----- - initialize - self setupRandom. - semaphoreForGenerator := Semaphore forMutualExclusion. - ! Item was removed: - ----- Method: UUIDGenerator>>makeSeed (in category 'random seed') ----- - makeSeed - "Try various methods of getting good seeds" - | seed | - seed := self makeUnixSeed. - seed ifNotNil: [^seed]. - - "not sure if this is reliably random... commented out for now. -dew" - "seed := self makeSeedFromSound. - seed ifNotNil: [^seed]." - - "default" - [seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash. - seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFFFFFF). - seed = 0] whileTrue: ["Try again if ever get a seed = 0"]. - - ^seed - ! Item was removed: - ----- Method: UUIDGenerator>>makeSeedFromSound (in category 'random seed') ----- - makeSeedFromSound - ^[SoundService default randomBitsFromSoundInput: 32] - ifError: [nil].! Item was removed: - ----- Method: UUIDGenerator>>makeUnixSeed (in category 'random seed') ----- - makeUnixSeed - - ^[ - StandardFileStream readOnlyFileNamed: '/dev/urandom' do: [ :stream | - stream binary. - (Integer - byte1: stream next - byte2: stream next - byte3: stream next - byte4: stream next) ] ] - on: Error - do: [ nil ]! Item was changed: ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- placeFields: aByteArray + | version fixed | + bits isLarge + ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] + ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. + + version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" + fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" + aByteArray + at: 7 put: version; + at: 9 put: fixed.! - aByteArray at: 1 put: ((timeLow bitShift: -24) bitAnd: 16rFF). - aByteArray at: 2 put: ((timeLow bitShift: -16) bitAnd: 16rFF). - aByteArray at: 3 put: ((timeLow bitShift: -8) bitAnd: 16rFF). - aByteArray at: 4 put: (timeLow bitAnd: 16rFF). - aByteArray at: 5 put: ((timeMid bitShift: -8) bitAnd: 16rFF). - aByteArray at: 6 put: (timeMid bitAnd: 16rFF). - aByteArray at: 7 put: ((timeHiAndVersion bitShift: -8) bitAnd: 16rFF). - aByteArray at: 8 put: (timeHiAndVersion bitAnd: 16rFF). - aByteArray at: 9 put: clockSeqHiAndReserved. - aByteArray at: 10 put: clockSeqLow. - 0 to: 5 do: [:i | - aByteArray at: 11 + i put: ((node bitShift: (-8*i)) bitAnd: 16rFF)] - ! Item was removed: - ----- Method: UUIDGenerator>>randomCounter (in category 'accessors and mutators') ----- - randomCounter - ^randomCounter! Item was removed: - ----- Method: UUIDGenerator>>randomCounter: (in category 'accessors and mutators') ----- - randomCounter: aNumber - randomCounter := aNumber - ! Item was removed: - ----- Method: UUIDGenerator>>randomGenerator (in category 'accessors and mutators') ----- - randomGenerator - ^randomGenerator - ! Item was removed: - ----- Method: UUIDGenerator>>randomGenerator: (in category 'accessors and mutators') ----- - randomGenerator: aGenerator - randomGenerator := aGenerator - ! Item was removed: - ----- Method: UUIDGenerator>>semaphoreForGenerator (in category 'accessors and mutators') ----- - semaphoreForGenerator - ^semaphoreForGenerator! Item was removed: - ----- Method: UUIDGenerator>>semaphoreForGenerator: (in category 'accessors and mutators') ----- - semaphoreForGenerator: aSema - semaphoreForGenerator := aSema - ! Item was removed: - ----- Method: UUIDGenerator>>setupRandom (in category 'instance creation') ----- - setupRandom - randomCounter := 0. - randomGenerator := Random seed: self makeSeed.! From commits at source.squeak.org Thu Oct 22 06:28:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 06:28:23 2015 Subject: [squeak-dev] The Trunk: Network-topa.166.mcz Message-ID: Tobias Pape uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-topa.166.mcz ==================== Summary ==================== Name: Network-topa.166 Author: topa Time: 21 October 2015, 8:26:14.656 pm UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 Ancestors: Network-topa.165 UUIDGenerator - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed - Fix UUIDGenerator class>>#initialize to correctly register at startup - Do not reset default on startup but rather reseed TheRandom Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) =============== Diff against Network-topa.165 =============== Item was changed: Object subclass: #UUIDGenerator + instanceVariableNames: '' - instanceVariableNames: 'bits' classVariableNames: 'Default TheRandom TheSemaphore' poolDictionaries: '' category: 'Network-UUID'! !UUIDGenerator commentStamp: 'topa 10/19/2015 23:23:19' prior: 0! I generate a pseudo-random UUID by asking Random for a 128 bit value. See https://tools.ietf.org/html/rfc4122.html#section-4.4 for reference.! Item was changed: ----- Method: UUIDGenerator class>>default (in category 'instance creation') ----- default + ^ Default ifNil: [Default := self new] + ! - Default ifNil: [self generateDefault]. - ^Default! Item was removed: - ----- Method: UUIDGenerator class>>generateDefault (in category 'instance creation') ----- - generateDefault - Default := self new! Item was changed: ----- Method: UUIDGenerator class>>initialize (in category 'class initialization') ----- initialize TheRandom := Random new. TheSemaphore := Semaphore forMutualExclusion. + Smalltalk addToStartUpList: self! - Smalltalk addToStartUpList: self after: nil.! Item was added: + ----- Method: UUIDGenerator class>>resetDefault (in category 'class initialization') ----- + resetDefault + Default := nil.! Item was changed: ----- Method: UUIDGenerator class>>startUp (in category 'class initialization') ----- startUp + "Reseed the random" + TheSemaphore critical: [TheRandom seed: nil].! - Default := nil! Item was added: + ----- Method: UUIDGenerator>>fillRandomly: (in category 'instance creation') ----- + fillRandomly: aUUID + + TheSemaphore critical: [ + TheRandom nextBytes: 16 "128 bit" into: aUUID startingAt: 1].! Item was changed: ----- Method: UUIDGenerator>>generateBytes:forVersion: (in category 'instance creation') ----- + generateBytes: aUUID forVersion: aVersion + | versionID fixedValue | + + aVersion = 4 ifFalse: [^ self error: 'Unsupported version']. + + self fillRandomly: aUUID. + versionID := ((aUUID at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" + fixedValue := ((aUUID at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" + aUUID + at: 7 put: versionID; + at: 9 put: fixedValue.! - generateBytes: aPlaceHolder forVersion: aVersion - aVersion = 4 ifTrue: [self generateFieldsVersion4] - ifFalse: [self error: 'Unsupported version']. - self placeFields: aPlaceHolder.! Item was removed: - ----- Method: UUIDGenerator>>generateFieldsVersion4 (in category 'instance creation') ----- - generateFieldsVersion4 - - TheSemaphore critical: [ - bits := 16rffffffffffffffffffffffffffffffff atRandom: TheRandom. "128 bit"].! Item was removed: - ----- Method: UUIDGenerator>>placeFields: (in category 'instance creation') ----- - placeFields: aByteArray - - | version fixed | - bits isLarge - ifTrue: [ aByteArray replaceFrom: 1 to: bits size with: bits] - ifFalse: [aByteArray unsignedLongAt: 1 put: bits bigEndian: false]. - - version := ((aByteArray at: 7) bitAnd: 16r0F) bitOr: 16r40. "Version 4" - fixed := ((aByteArray at: 9) bitAnd: 16r3F) bitOr: 16r80. "Fixed 8..b value" - aByteArray - at: 7 put: version; - at: 9 put: fixed.! From commits at source.squeak.org Thu Oct 22 08:51:18 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 08:51:20 2015 Subject: [squeak-dev] The Trunk: Files-mt.147.mcz Message-ID: Marcel Taeumel uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-mt.147.mcz ==================== Summary ==================== Name: Files-mt.147 Author: mt Time: 22 October 2015, 10:51:13.247 am UUID: 088e1934-a399-40ed-923c-a0cdca15894b Ancestors: Files-topa.146 Adds support for dropping directories into the image. =============== Diff against Files-topa.146 =============== Item was added: + ----- Method: FileDirectory class>>fileReaderServicesForFile:suffix: (in category 'file reader services') ----- + fileReaderServicesForFile: fullName suffix: suffix + + ^ (self on: fullName) exists + ifTrue: [self services] + ifFalse: [#()].! Item was added: + ----- Method: FileDirectory class>>initialize (in category 'class initialization') ----- + initialize + + FileServices registerFileReader: self.! Item was added: + ----- Method: FileDirectory class>>requestDropDirectory: (in category 'dnd requests') ----- + requestDropDirectory: dropIndex + + ^ self on: (FileStream primDropRequestFileName: dropIndex)! Item was added: + ----- Method: FileDirectory class>>services (in category 'file reader services') ----- + services + + ^ (self class selectors copyWithout: #services) + select: [:symbol | symbol beginsWith: #service] + thenCollect: [:selector | self perform: selector]! Item was added: + ----- Method: FileDirectory>>mimeTypes (in category 'path access') ----- + mimeTypes + + ^ #('text/directory')! Item was added: + ----- Method: FileDirectory>>name (in category 'path access') ----- + name + "Compatibility with StandardFileStream >> #name to be used, for example, for drop event handling." + + ^ self fullName! Item was changed: ----- Method: FileStream class>>fileReaderServicesForFile:suffix: (in category 'file reader services') ----- fileReaderServicesForFile: fullName suffix: suffix "Answer services for the given file" + "Check whether the given path points to a directory or file." + (FileStream isAFileNamed: fullName) ifFalse: [^ #()]. + ^ self servicesWithSuffixes select: [:spec | spec key anySatisfy: [:pattern | suffix = '*' or: [pattern match: suffix]]] thenCollect: [:spec | spec value]! Item was added: + ----- Method: FileStream class>>primDropRequestFileName: (in category 'dnd requests') ----- + primDropRequestFileName: dropIndex + "Primitive. Return the file name for some file that was just dropped onto Squeak. + Fail if dropIndex is out of range or the primitive is not supported." + + ^nil! Item was removed: - ----- Method: StandardFileStream>>primDropRequestFileName: (in category 'dnd requests') ----- - primDropRequestFileName: dropIndex - "Primitive. Return the file name for some file that was just dropped onto Squeak. - Fail if dropIndex is out of range or the primitive is not supported." - - ^nil! Item was changed: ----- Method: StandardFileStream>>requestDropStream: (in category 'dnd requests') ----- requestDropStream: dropIndex "Return a read-only stream for some file the user has just dropped onto Squeak." | rawName | + rawName := self class primDropRequestFileName: dropIndex. - rawName := self primDropRequestFileName: dropIndex. name := (FilePath pathName: rawName isEncoded: true) asSqueakPathName. fileID := self primDropRequestFileHandle: dropIndex. fileID == nil ifTrue:[^nil]. self register. rwmode := false. buffer1 := String new: 1. self enableReadBuffering ! From commits at source.squeak.org Thu Oct 22 08:52:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 08:52:28 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.1018.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1018.mcz ==================== Summary ==================== Name: Morphic-mt.1018 Author: mt Time: 22 October 2015, 10:51:51.981 am UUID: e2faf21f-a955-4d6f-849c-0d844a7eaf2b Ancestors: Morphic-cmm.1017 Adds support for dropping directories into the image. =============== Diff against Morphic-cmm.1017 =============== Item was changed: ----- Method: PasteUpMorph>>dropFiles: (in category 'event handling') ----- dropFiles: anEvent "Handle a number of dropped files from the OS. TODO: - use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu) - remember the resource location or (when in browser) even the actual file handle " + | numFiles | - | numFiles stream handler | numFiles := anEvent contents. 1 to: numFiles do: [ :i | + (FileStream requestDropStream: i) + ifNotNil: [:stream | + [ (ExternalDropHandler lookupExternalDropHandler: stream) ifNotNil: [:handler | + handler handle: stream in: self dropEvent: anEvent ] ] + ensure: [ stream close ] ] + ifNil: [(FileDirectory requestDropDirectory: i) ifNotNil: [:directory | + (ExternalDropHandler lookupExternalDropHandler: directory) ifNotNil: [:handler | + handler handle: directory in: self dropEvent: anEvent]]]].! - (stream := FileStream requestDropStream: i) ifNotNil: [ - handler := ExternalDropHandler lookupExternalDropHandler: stream. - [ handler ifNotNil: [handler handle: stream in: self dropEvent: anEvent ] ] - ensure: [ stream close ] ] ].! From commits at source.squeak.org Thu Oct 22 08:53:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 08:53:14 2015 Subject: [squeak-dev] The Trunk: Tools-mt.644.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.644.mcz ==================== Summary ==================== Name: Tools-mt.644 Author: mt Time: 22 October 2015, 10:52:56.745 am UUID: 6b7546e7-363c-4382-8907-97fb0d98fddc Ancestors: Tools-mt.643 Adds support for dropping directories into the image and opening file lists on those. =============== Diff against Tools-mt.643 =============== Item was added: + ----- Method: FileDirectory class>>serviceBrowseDirectory (in category '*Tools-FileList') ----- + serviceBrowseDirectory + + ^ (SimpleServiceEntry + provider: FileList + label: 'browse directory' + selector: #openOn: + description: 'browse directory' + buttonLabel: 'browse') + argumentGetter: [:directory | directory]; + yourself! Item was changed: ----- Method: FileList class>>newOn: (in category 'instance creation') ----- newOn: aDirectory + ^super new directory: aDirectory! Item was added: + ----- Method: FileList class>>openOn: (in category 'instance creation') ----- + openOn: directory + + ^ToolBuilder open: (self newOn: directory)! From commits at source.squeak.org Thu Oct 22 08:55:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 22 08:55:16 2015 Subject: [squeak-dev] The Trunk: System-mt.772.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.772.mcz ==================== Summary ==================== Name: System-mt.772 Author: mt Time: 22 October 2015, 10:54:57.804 am UUID: 46118b7a-46d1-41c1-8b5f-0be4d5aaf89a Ancestors: System-mt.771 Reverts last commit to log change stamps at the granularity of minutes again. See discussion here: http://forum.world.st/The-Trunk-System-mt-771-mcz-td4856201.html =============== Diff against System-mt.771 =============== Item was changed: ----- Method: Utilities class>>changeStamp (in category 'identification') ----- changeStamp "Answer a string to be pasted into source code to mark who changed it and when." ^ self authorInitials , ' ' , Date today mmddyyyy, ' ', + ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)! - ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)! From Marcel.Taeumel at hpi.de Thu Oct 22 09:01:59 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Oct 22 09:13:38 2015 Subject: [squeak-dev] Re: The Trunk: System-mt.771.mcz In-Reply-To: References: <1445328919527-4856686.post@n4.nabble.com> Message-ID: <1445504519376-4857262.post@n4.nabble.com> It's minutes again: http://forum.world.st/The-Trunk-System-mt-772-mcz-td4857260.html Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-771-mcz-tp4856201p4857262.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Thu Oct 22 12:37:25 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 22 12:37:27 2015 Subject: [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <201510220628.t9M6SQJr045098@shell.msen.com> References: <201510220628.t9M6SQJr045098@shell.msen.com> Message-ID: <20151022123725.GA8276@shell.msen.com> On Thu, Oct 22, 2015 at 06:28:09AM +0000, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Network to project The Trunk: > http://source.squeak.org/trunk/Network-topa.166.mcz > > ==================== Summary ==================== > > Name: Network-topa.166 > Author: topa > Time: 21 October 2015, 8:26:14.656 pm > UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 > Ancestors: Network-topa.165 > > UUIDGenerator > - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed > - Fix UUIDGenerator class>>#initialize to correctly register at startup > - Do not reset default on startup but rather reseed TheRandom > > Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) > This is outstanding. The UUID plugin has long been a source of problems in the VM, partly due to issues in various Linux distributions. http://bugs.squeak.org/view.php?id=7358 Making the plugin unnecessary is a big improvement. Dave From Das.Linux at gmx.de Thu Oct 22 12:49:28 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 22 12:49:32 2015 Subject: [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <20151022123725.GA8276@shell.msen.com> References: <201510220628.t9M6SQJr045098@shell.msen.com> <20151022123725.GA8276@shell.msen.com> Message-ID: <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> On 22.10.2015, at 14:37, David T. Lewis wrote: > On Thu, Oct 22, 2015 at 06:28:09AM +0000, commits@source.squeak.org wrote: >> Tobias Pape uploaded a new version of Network to project The Trunk: >> http://source.squeak.org/trunk/Network-topa.166.mcz >> >> ==================== Summary ==================== >> >> Name: Network-topa.166 >> Author: topa >> Time: 21 October 2015, 8:26:14.656 pm >> UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 >> Ancestors: Network-topa.165 >> >> UUIDGenerator >> - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed >> - Fix UUIDGenerator class>>#initialize to correctly register at startup >> - Do not reset default on startup but rather reseed TheRandom >> >> Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) >> > > This is outstanding. The UUID plugin has long been a source of problems in > the VM, partly due to issues in various Linux distributions. > > http://bugs.squeak.org/view.php?id=7358 > > Making the plugin unnecessary is a big improvement. Thats what I thought. Probably we want to present this (Mersenne PRNG + new UUID gen) to the Pharo core developers (cc) so that we can just remove the UUID plugin from the VMs (cc vm-dev)? Best regards -Tobias From robert.w.withers at gmail.com Thu Oct 22 13:15:27 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Thu Oct 22 13:15:33 2015 Subject: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] RandomGenerator class>>unpredictableStringsDo: In-Reply-To: <046401d10ba7$6fe41e80$4fac5b80$@usmedrec.com> References: <56235719.50403@gmail.com> <56235F81.40808@gmail.com> <031701d109d4$377e0ee0$a67a2ca0$@usmedrec.com> <5624D667.7040708@gmail.com> <3up92b5jpb2lt0bhibgl6jt5fk3tvgub6s@4ax.com> <56252DF1.3050607@gmail.com> <06ae01d10a9b$fdf36350$f9da29f0$@usmedrec.com> <56253993.3000706@gmail.com> <007201d10aa5$f0853b80$d18fb280$@usmedrec.com> <00e601d10ab3$9a100560$ce301020$@usmedrec.com> <5625605A.3070100@gmail.com> <011c01d10abd$1ebf1130$5c3d3390$@usmedrec.com> <5626F501.4000401@gmail.com> <046401d10ba7$6fe41e80$4fac5b80$@usmedrec.com> Message-ID: <5628E16F.6020403@gmail.com> Thanks for the link and the name, Ron. When SFLC get back to me I will mention Dan's involvement. Best, Robert On 10/20/2015 10:23 PM, Ron Teitelbaum wrote: >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of >> Robert Withers >> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >> RandomGenerator class>>unpredictableStringsDo: >> >> Ron, >> >> I checked that email and there is no mention of who it was sent to now this >> SFLC advisors. Ok that must be the Software Freedom Law Center. I just >> reached out to them on this. > [Ron Teitelbaum] > It was set to Dan Ravicher but not sure if he is still there. > > http://lists.squeakfoundation.org/pipermail/cryptography/2005-November/000084.html > >> Thank you, >> Robert >> >> On 10/19/2015 06:25 PM, Ron Teitelbaum wrote: >>> Hi Robert, >>> >>> I went back and reviewed and this is what I sent to BIS. >>> >>> http://lists.squeakfoundation.org/pipermail/cryptography/2006-January/ >>> 000117.html >>> >>> Not much to it but we got a lot of advice from SFLC first. >>> >>> >From our research OS projects are allowed to host cryptographic code >>>> and make available for anyone to download. BUT that does not exclude >>>> users of the code from being restrained from exporting that code to >>>> any USA identified restricted entities. For example: >>>> http://www.state.gov/j/ct/list/c14151.htm >>> I would recommend at the very least to register the repo with the BIS for >> Pharo, but I would also contact the SFLC to verify nothing has changed. >>> All the best, >>> >>> Ron >>> >>>> -----Original Message----- >>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf >>>> Of Robert Withers >>>> Sent: Monday, October 19, 2015 5:28 PM >>>> To: The general-purpose Squeak developers list; 'Chris Muller' >>>> Cc: 'Pharo Development List' >>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>> RandomGenerator class>>unpredictableStringsDo: >>>> >>>> (resending with Pharo list) >>>> >>>> Ron, would it be an easy process to add a second URL to the exception >>>> paperwork. Pharo does have new ideas about code storage and >>>> distribution that we would want to take advantage of. This would help a >> lot! >>>> Then again, screw their paperwork requirements of us. Put my name as >>>> responsible on the Pharo code and I'll take a trip to Cuba, if they >>>> need a scape goat for their 20th century thinking. Crypto is already >>>> out of the bag and everyone uses it freely. Just do it and ask permission >> later. >>>> In thinking about consolidating crypto code between squeak and pharo, >>>> I would guess there would be a thin capatibility layer for each >>>> system, then the Crypto code in the main. My goal is to have >>>> compatibility, crypto and plugins on both virtual platforms. >>>> >>>> Thanks so much ^^ >>>> >>>> Robert >>>> >>>> On 10/19/2015 05:17 PM, Ron Teitelbaum wrote: >>>>> Hi Chris, >>>>> >>>>> The exemption is not for the location of the server but the URL >>>>> where it is >>>> hosted. I'm happy to help in any way I can but I don't have access >>>> to the Pharo Repos. I have no issue with having Pharo packages on >>>> SqueakSource if that is what everyone agrees too. We have multiple >> packages hosted there. >>>> It's ok with me if we host some pharo code there too. >>>>> All the best, >>>>> >>>>> Ron >>>>> >>>>>> -----Original Message----- >>>>>> From: Chris Muller [mailto:ma.chris.m@gmail.com] >>>>>> Sent: Monday, October 19, 2015 3:59 PM >>>>>> To: Ron Teitelbaum >>>>>> Cc: Pharo Development List; The general-purpose Squeak developers >>>>>> list >>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to Pharo] >>>>>> RandomGenerator class>>unpredictableStringsDo: >>>>>> >>>>>> Heh, well, since then SqueakSource itself was moved to a different >>>>>> server in a different country. I guess there was also a mirror of >>>>>> SqueakSource hosted in Chile under a different URL for many years. >>>>>> >>>>>> I'm doubtful any of it matters, but we wouldn't want anyone to end >>>>>> up in Gitmo over it. If you're uncomfortable about hosting a copy >>>>>> elsewhere, then please at least namespace-prefix the Pharo-specific >>>>>> packages, to at least help keep it from becoming a tangled mess. >>>>>> >>>>>> On Mon, Oct 19, 2015 at 2:39 PM, Ron Teitelbaum >> >>>>>> wrote: >>>>>>> Hi All, >>>>>>> >>>>>>> Unless someone filed the proper paperwork I would suggest NOT >>>>>>> moving >>>>>> the cryptography code anywhere except for SqueakSource. When we >>>>>> started the project we spent time ensuring that we had a proper >>>>>> exemption from the U.S. regulations on exporting cryptographic code. >>>>>> If someone copied and forked the code that exemption may not still >>>>>> apply to that new repository. >>>>>>> I'm not personally involved with the code on Pharo, not sure who >>>>>>> is doing >>>>>> crypto there. >>>>>>> All the best, >>>>>>> >>>>>>> Ron >>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On >>>>>>>> Behalf Of Chris Muller >>>>>>>> Sent: Monday, October 19, 2015 2:47 PM >>>>>>>> To: The general-purpose Squeak developers list >>>>>>>> Cc: Pharo Development List >>>>>>>> Subject: Re: [Pharo-dev] [squeak-dev] [Cryptography port to >>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>>> >>>>>>>> Yes, if a common package for both Squeak and Pharo is possible, >>>>>>>> that'd be great. Otherwise, the Squeak and Pharo versions should >>>>>>>> reside in separate repositories. Squeak users are still using >>>>>>>> squeaksource.com, Pharo moved to smalltalkhub and beyond.. >>>>>>>> >>>>>>>> On Mon, Oct 19, 2015 at 1:42 PM, Robert Withers >>>>>>>> wrote: >>>>>>>>> hey Ron, >>>>>>>>> >>>>>>>>> It was actually the Pharo Cryptography team I was thinking of. >>>>>>>>> Perhaps we can get the same package to work in both squeak and >>>>>>>>> Pharo, with use of installable entropy sources or the like. In >>>>>>>>> order to get SqueakElib running in Pharo I need crypto and we >>>>>>>>> may as >>>>>> well do it right. >>>>>>>>> Cheers, >>>>>>>>> Robert >>>>>>>>> >>>>>>>>> >>>>>>>>> On 10/19/2015 02:28 PM, Ron Teitelbaum wrote: >>>>>>>>>> Hi Robert, >>>>>>>>>> >>>>>>>>>> You are already on the Cryptograph repo on SqueakSource.com as >>>>>>>>>> an >>>>>>>> admin. >>>>>>>>>> Please feel free to reorg if you like. >>>>>>>>>> >>>>>>>>>> Let me know if you have trouble resurrecting your account. >>>>>>>>>> >>>>>>>>>> All the best, >>>>>>>>>> >>>>>>>>>> Ron >>>>>>>>>> >>>>>>>>>>> -----Original Message----- >>>>>>>>>>> From: squeak-dev-bounces@lists.squeakfoundation.org >>>>>>>>>>> [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On >>>>>>>>>>> Behalf Of Robert Withers >>>>>>>>>>> Sent: Monday, October 19, 2015 1:53 PM >>>>>>>>>>> To: squeak-dev@lists.squeakfoundation.org >>>>>>>>>>> Subject: Re: [squeak-dev] [Pharo-dev] [Cryptography port to >>>>>>>>>>> Pharo] RandomGenerator class>>unpredictableStringsDo: >>>>>>>>>>> >>>>>>>>>>> This is great guys. Is there a way to get this from the image? >>>>>>>>>>> Good to get >>>>>>>>>> it >>>>>>>>>>> with an FFI/OSProcess call or something. >>>>>>>>>>> >>>>>>>>>>> Thank you, >>>>>>>>>>> Robert >>>>>>>>>>> >>>>>>>>>>> On 10/19/2015 08:58 AM, Louis LaBrunda wrote: >>>>>>>>>>>> Hi Guys, >>>>>>>>>>>> >>>>>>>>>>>> How about getting the CPU temperature. I think most CPUs >>>>>>>>>>>> support "Digital Thermal Sensor" (I'm not sure about ARM). I >>>>>>>>>>>> think it is seven bits. The real range should be less than >>>>>>>>>>>> that but it may be enough to help add some entropy. >>>>>>>>>>>> >>>>>>>>>>>> Lou >>>>>>>>>>>> >>>>>>>>>>>> On Mon, 19 Oct 2015 07:39:19 -0400, Robert Withers >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Ron , nice to see you too! It has been a number of years, >>>>>>>>>>>>> hasn't >>>>>> it? >>>>>>>>>>>>> Crypto is timestamped back in 2010, so there is is. I hope >>>>>>>>>>>>> these have been kind years to you, as they have for me. >>>>>>>>>>>>> >>>>>>>>>>>>> I love the idea of optional sources of entropy, depending on >>>>>>>>>>>>> the deployed capabilities. So there are our mouse points and >>>>>>>>>>>>> such, because they ought to be optional. >>>>>>>>>>>>> >>>>>>>>>>>>> What are some reliably present sources in the most minimal >>>>>>>> situation? >>>>>>>>>>>>> If we could define minimal as an image with no image level >>>>>>>>>>>>> I/O beyond file I/O, I would think we'd have: Kernel, >>>>>>>>>>>>> System, Collections, Compiler and FFI. Some intransitives in >>>>>>>>>>>>> that scope for entropy would be >>>>>>>>>>> grand. >>>>>>>>>>>>> I was thinking to take 5 millisecondClockValues, separated >>>>>>>>>>>>> by >>>>>>>>>>>>> 4 non-secure random intervals: take the low order byte of >>>>>>>>>>>>> the >>>>>>>>>>>>> 4 intervals and reverse & concat them, as a entropic source. >>>>>>>>>>>>> >>>>>>>>>>>>> I can coordinate these changes. Ron, could you add me to the >>>>>>>>>>>>> Cryptography team so I can upload the Pharo Cryptography >>>>>>>>>>> #bleedingEdge? >>>>>>>>>>>>> Thanks and I look forward to more, :) >>>>>>>>>>>>> >>>>>>>>>>>>> Robert >>>>>>>>>>>>> >>>>>>>>>>>>> On 10/18/2015 02:38 PM, Ron Teitelbaum wrote: >>>>>>>>>>>>>> Hi Robert, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Nice to see you! >>>>>>>>>>>>>> >>>>>>>>>>>>>> Looks interesting I know that Chris did something gathering >>>>>>>>>>>>>> sources of >>>>>>>>>>> entropy. Seems like the more the better. Could you just make >>>>>>>>>>> the entropy sources optional such that if they exist we use them? >>>>>>>>>>> I would have to go back and see what Chris did but he was >>>>>>>>>>> following suggestions from Schneider in his secureRandom. >>>>>>>>>>>>>> All the best, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Ron Teitelbaum >>>>>>>>>>>>>> >>>>>>>>>>>>>>> -----Original Message----- >>>>>>>>>>>>>>> From: Pharo-dev [mailto:pharo-dev- >> bounces@lists.pharo.org] >>>>>>>>>>>>>>> On Behalf Of Robert Withers >>>>>>>>>>>>>>> Sent: Sunday, October 18, 2015 5:00 AM >>>>>>>>>>>>>>> To: The general-purpose Squeak developers list; Pharo >>>>>>>>>>>>>>> Development List >>>>>>>>>>>>>>> Subject: Re: [Pharo-dev] [Cryptography port to Pharo] >>>>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>>>> class>>unpredictableStringsDo: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I'm sorry, I forgot the code. I list the existing method, >>>>>>>>>>>>>>> followed by my modified Pharo method below. I welcome >> any >>>>>>>> feedback. >>>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>>> Robert >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> --- >>>>>>>>>>>>>>> Existing: >>>>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>>>> environment that >>>>>>>>>>> should >>>>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>>>> | time | >>>>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>>>> value: World imageForm bits >>>>>>>>>>>>>>> compressToByteArray ; >>>>>>>>>>>>>>> value: Sensor mousePoint x asString ; >>>>>>>>>>>>>>> value: Sensor mousePoint y asString ; >>>>>>>>>>>>>>> value: Time >>>>>>>>>>>>>>> millisecondClockValue asByteArray ; >>>>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>>>> value: Time now asString ; >>>>>>>>>>>>>>> value: Display extent asString. >>>>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>>>> #(vmVersion platformName primVmPath >>>>>>>>>>>>>>> imageName >>>>>>>>>>> platformSubtype >>>>>>>>>>>>>>> datedVersion lastQuitLogPosition vmStatisticsReportString >>>>>>>>>>>>>>> imageName) >>>>>>>>>>>>>>> collect: >>>>>>>>>>>>>>> [ : each | >>>>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>>>> current >>>>>>>>>>>>>>> perform: each) >>>>>>>>>>> asByteArray >>>>>>>>>>>>>>> ] ]. >>>>>>>>>>>>>>> aBlock >>>>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>>>> "maybe the pointer has moved, hit it again." >>>>>>>>>>>>>>> value: Sensor mousePoint asString ; >>>>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>>>> asByteArray >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> --- >>>>>>>>>>>>>>> Pharo port: >>>>>>>>>>>>>>> unpredictableStringsDo: aBlock >>>>>>>>>>>>>>> "Enumerate sources of information from my >>>>>>>>>>>>>>> environment that >>>>>>>>>>> should >>>>>>>>>>>>>>> be generally hard to guess." >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> | time | >>>>>>>>>>>>>>> time := Time millisecondsToRun: >>>>>>>>>>>>>>> [ aBlock >>>>>>>>>>>>>>> value: Time >>>>>>>>>>>>>>> millisecondClockValue asByteArray ; >>>>>>>>>>>>>>> value: Date today asString ; >>>>>>>>>>>>>>> value: Time now asString. >>>>>>>>>>>>>>> 100 timesRepeat: [ aBlock value: UUID new ]. >>>>>>>>>>>>>>> #(version primImagePath imagePath >>>>>>>>>>>>>>> datedVersion >>>>>>>>>>>>>>> lastQuitLogPosition) >>>>>>>>>>>>>>> collect: >>>>>>>>>>>>>>> [ : each | >>>>>>>>>>>>>>> aBlock value: (SmalltalkImage >>>>>>>>>>>>>>> current >>>>>>>>>>>>>>> perform: each) >>>>>>>>>>> asByteArray >>>>>>>>>>>>>>> ] ]. >>>>>>>>>>>>>>> aBlock >>>>>>>>>>>>>>> value: time asByteArray; >>>>>>>>>>>>>>> value: Time millisecondClockValue >>>>>>>>>>>>>>> asByteArray >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On 10/18/2015 04:23 AM, Robert Withers wrote: >>>>>>>>>>>>>>>> This is a message intended for anyone who was on the >>>>>>>>>>>>>>>> Cryptography >>>>>>>>>>> team. >>>>>>>>>>>>>>>> I recently ported it to Pharo and had to make changes to >>>>>>>>>>>>>>> RandomGenerator >>>>>>>>>>>>>>>> class>>unpredictableStringsDo:. This certainly removed >>>>>>>>>>>>>>>> class>>some uncertainty >>>>>>>>>>>>>>>> from the results of this message. My question is what >>>>>>>>>>>>>>>> should I do about that? This method seems to require >>>>>>>>>>>>>>>> non-headless, as it is checking the mouse point and such. >>>>>>>>>>>>>>>> This being a crypto cornerstone, what the best answer >> here. >>>>>>>>>>>>>>>> Thank you, >>>>>>>>>>>>>>>> Robert >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>> ----------------------------------------------------------- >>>>>>>>>>>> Louis LaBrunda >>>>>>>>>>>> Keystone Software Corp. >>>>>>>>>>>> SkypeMe callto://PhotonDemon >>>>>>>>>>>> mailto:Lou@Keystone-Software.com http://www.Keystone- >>>>>>>> Software.com >>>>>>>>>> >>> > > From lewis at mail.msen.com Thu Oct 22 16:24:03 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Oct 24 13:45:50 2015 Subject: [squeak-dev] source.squeak.org UI needs a bump Message-ID: <59078.136.2.1.105.1445531043.squirrel@webmail.msen.com> The user interface for our repository seems to be off line (http://source.squeak.org). I am seeing an nginx 502 bad gateway message. I am travelling and cannot help, could someone please check it? Thanks Dave From eliot.miranda at gmail.com Fri Oct 23 17:55:29 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Oct 24 13:50:39 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: Nicolas, what's (where's) the reproducible case? On Tue, Oct 20, 2015 at 8:52 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > BTW, I had a fairly reproducible case, didn't I send it to this list? > Ah no, it was pharo... > > ScaledDecimalTests>>testCoercion > > > https://www.mail-archive.com/pharo-dev@lists.pharo.org/msg31997.html > > 2015-10-20 15:26 GMT+02:00 marcel.taeumel : > >> And if you update the VM, it will break. >> And if you update the image, now, it will work again. ;-) >> >> Well, here is the thing: I am not able to fix that VM/JIT bug although I >> would rather like to. If you can fix it, please go ahead. If Eliot finds >> time for it -- well, it works in Spur and Stack versions -- he will surely >> do it. >> >> Until then, we should fix it if possible to improve user experience. If >> you >> find any other of those hundreds of places, please consider fixing them as >> well. Not into trunk, but Squeak46 branch. >> >> This VM bug has been known since mid of September at least: >> >> http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html >> >> Nothing has happened yet. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151023/146eaead/attachment-0001.htm From stephan at stack.nl Thu Oct 22 15:05:13 2015 From: stephan at stack.nl (stephan) Date: Sat Oct 24 13:52:50 2015 Subject: [squeak-dev] Fwd: FOSDEM 2016 devroom selection In-Reply-To: <20151022111825.GA20780@stack.nl> References: <20151022111825.GA20780@stack.nl> Message-ID: <5628FB29.3000501@stack.nl> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Attached Message Part Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151022/0e6cdce5/AttachedMessagePart.pgp From leves at elte.hu Sat Oct 24 13:54:55 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sat Oct 24 13:55:00 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: Running that test case on the latest V3 CogVM (3427) should give you a debugger where the receiver got mixed up with some other variable. Levente On Fri, 23 Oct 2015, Eliot Miranda wrote: > Nicolas, > ? ?what's (where's) the reproducible case? ? > > On Tue, Oct 20, 2015 at 8:52 AM, Nicolas Cellier wrote: > ?BTW, I had a fairly reproducible case, didn't I send it to this list? > Ah no, it was pharo... > > ScaledDecimalTests>>testCoercion > > https://www.mail-archive.com/pharo-dev@lists.pharo.org/msg31997.html > > 2015-10-20 15:26 GMT+02:00 marcel.taeumel : > And if you update the VM, it will break. > And if you update the image, now, it will work again. ;-) > > Well, here is the thing: I am not able to fix that VM/JIT bug although I > would rather like to. If you can fix it, please go ahead. If Eliot finds > time for it -- well, it works in Spur and Stack versions -- he will surely > do it. > > Until then, we should fix it if possible to improve user experience. If you > find any other of those hundreds of places, please consider fixing them as > well. Not into trunk, but Squeak46 branch. > > This VM bug has been known since mid of September at least: > http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html > > Nothing has happened yet. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > > > > > > -- > _,,,^..^,,,_ > best,?Eliot > > From Marcel.Taeumel at hpi.de Fri Oct 23 18:28:52 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 24 14:37:36 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1445624932011-4857648.post@n4.nabble.com> The image looks like the 1.1 on our FTP (http://ftp.squeak.org/1.1/) but it will not open with the Windows VM from then. Was the image format somewhat different between Windows/Mac back then? Best, Marcel -- View this message in context: http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857648.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Oct 23 18:32:13 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 24 14:42:33 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: <1445625133383-4857649.post@n4.nabble.com> Sounds reasonable. :) Best, Marcel -- View this message in context: http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4857649.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From hannes.hirzel at gmail.com Fri Oct 23 14:44:21 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Oct 24 15:07:20 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> Message-ID: On 10/21/15, tim Rowledge wrote: > I wanted to add a little cmd key hack to the debugger to print numbers in > hex - useful when debugging the VM in sim etc. Eventually I found a way to > solve my immediate needs but along the path I found a dazzlingly complex > intertwingled mess of code for menus and cmd key handling. > > Part of it is likely because of the confusion inherent to having two > separate UI systems that aren?t quite separate. For example StringHolder > class>>#yellowButtonMenuItems includes > {'make project link (P)' translated. #makeProjectLink}. > which > a) annoyed me because I want to use cmd-shift-p for my printItHex > b) seems to be a bit odd to have in a text editor menu, and very much so in > a code editor menu > c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph > does not understand #makeProjectLink) > > Also when building menus - which is done for every menu button press! - we > end up doing a scan of all the methods (for menu related pragmas) of every > class that could possibly be involved. Just curious -- where is this scanning of all methods done in version 5.0? It does not seem to involve the TheWorldMenu http://wiki.squeak.org/squeak/6213 ? --Hannes This is even more insane than using > #isKindOf: within UI code. Perhaps one could argue that it isn?t quite > completely insane on multi-core/multi-GHz/megaRam machines but on anything > slower ( like the Pi, a rather important platform for public awareness and > outreach) it can ruin the UI experience. > > The current system reminds me unpleasantly of the PenPoint/Go UI dating back > to ?89 or so; their hardware was nominally several times faster than our > Active Book, and they proudly proclaimed how it was all carefully optimised > code and yet it was grindingly slow to do anything in the UI. The Active > Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect queue, > 1Mb RAM for everything including the screen and filing system) and running > that terrible slow nonsense called Smalltalk that everyone knew was slow as > slow. Many years later I met one of the developers and it turned out that > their framework carefully built menus by checking here, looking there, > seeing if a string needed translating, having a tea-break and finally asking > a complex graphics subsystem to render something. The Active Book code > bitblt?d a menu form to the screen. > > Ideally menus should be pre-built and cached, with some cache-flushing > algorithm connected to anything that changes what should be in them. Such as > adding a new menu related pragma. > > I also spotted some code where menu getting selectors are examined to see > how many arguments they take and then assorted #perform incantations are > used. In general abetter option is to make use of the execution machinery > and just send the most flexible message. Implement it at some sensible root > to re-try with a simpler version if needed. > > I wish I had time to clean this up but I have to make VM changes to support > a largish number of Scratch users and my brain is about ready to explode. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > 29A, the hexadecimal of the Beast. > > > > From marcus.denker at inria.fr Thu Oct 22 14:44:57 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Sat Oct 24 15:13:01 2015 Subject: [Pharo-dev] [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <1E45EC11-6956-48DE-8A85-1CC212C80C50@inria.fr> References: <201510220628.t9M6SQJr045098@shell.msen.com> <20151022123725.GA8276@shell.msen.com> <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> <1E45EC11-6956-48DE-8A85-1CC212C80C50@inria.fr> Message-ID: <051553A0-7147-49CD-A9EB-6AA0B0AA7D7C@inria.fr> > On 22 Oct 2015, at 16:13, Marcus Denker wrote: >>> >> >> Thats what I thought. >> Probably we want to present this (Mersenne PRNG + new UUID gen) to >> the Pharo core developers (cc) so that we can just remove the UUID plugin >> from the VMs (cc vm-dev)? >> > > That sounds good! I added an issue tracker entry so we do not forget: https://pharo.fogbugz.com/f/cases/16846/integrate-non-Plugin-UUIDGenerator-from-Squeak Marcus -- Marcus Denker ? 2Denker GmbH http://www.2denker.de From Das.Linux at gmx.de Sat Oct 24 15:14:14 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Oct 24 15:14:16 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> Message-ID: <262C3550-AF9E-47DC-B2EC-09C5810E75FE@gmx.de> On 23.10.2015, at 16:44, H. Hirzel wrote: > On 10/21/15, tim Rowledge wrote: >> I wanted to add a little cmd key hack to the debugger to print numbers in >> hex - useful when debugging the VM in sim etc. Eventually I found a way to >> solve my immediate needs but along the path I found a dazzlingly complex >> intertwingled mess of code for menus and cmd key handling. >> >> Part of it is likely because of the confusion inherent to having two >> separate UI systems that aren?t quite separate. For example StringHolder >> class>>#yellowButtonMenuItems includes >> {'make project link (P)' translated. #makeProjectLink}. >> which >> a) annoyed me because I want to use cmd-shift-p for my printItHex >> b) seems to be a bit odd to have in a text editor menu, and very much so in >> a code editor menu >> c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph >> does not understand #makeProjectLink) >> >> Also when building menus - which is done for every menu button press! - we >> end up doing a scan of all the methods (for menu related pragmas) of every >> class that could possibly be involved. > > > Just curious -- where is this scanning of all methods done in version 5.0? > It does not seem to involve the TheWorldMenu > http://wiki.squeak.org/squeak/6213 > ? Its in Model, for use with tools. The world menu is a different beast, still/yet. Best -Tobias > > --Hannes > > > > This is even more insane than using >> #isKindOf: within UI code. Perhaps one could argue that it isn?t quite >> completely insane on multi-core/multi-GHz/megaRam machines but on anything >> slower ( like the Pi, a rather important platform for public awareness and >> outreach) it can ruin the UI experience. >> >> The current system reminds me unpleasantly of the PenPoint/Go UI dating back >> to ?89 or so; their hardware was nominally several times faster than our >> Active Book, and they proudly proclaimed how it was all carefully optimised >> code and yet it was grindingly slow to do anything in the UI. The Active >> Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect queue, >> 1Mb RAM for everything including the screen and filing system) and running >> that terrible slow nonsense called Smalltalk that everyone knew was slow as >> slow. Many years later I met one of the developers and it turned out that >> their framework carefully built menus by checking here, looking there, >> seeing if a string needed translating, having a tea-break and finally asking >> a complex graphics subsystem to render something. The Active Book code >> bitblt?d a menu form to the screen. >> >> Ideally menus should be pre-built and cached, with some cache-flushing >> algorithm connected to anything that changes what should be in them. Such as >> adding a new menu related pragma. >> >> I also spotted some code where menu getting selectors are examined to see >> how many arguments they take and then assorted #perform incantations are >> used. In general abetter option is to make use of the execution machinery >> and just send the most flexible message. Implement it at some sensible root >> to re-try with a simpler version if needed. >> >> I wish I had time to clean this up but I have to make VM changes to support >> a largish number of Scratch users and my brain is about ready to explode. >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> 29A, the hexadecimal of the Beast. From leves at elte.hu Thu Oct 22 16:55:45 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sat Oct 24 15:20:00 2015 Subject: [Pharo-dev] [Vm-dev] [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <3C54901C-E534-4262-BCF1-41FF89CC9063@veloxit.no> References: <201510220628.t9M6SQJr045098@shell.msen.com> <20151022123725.GA8276@shell.msen.com> <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> <3C54901C-E534-4262-BCF1-41FF89CC9063@veloxit.no> Message-ID: On Thu, 22 Oct 2015, Henrik Johansen wrote: > >> On 22 Oct 2015, at 2:49 , Tobias Pape wrote: >> >> >> >> On 22.10.2015, at 14:37, David T. Lewis wrote: >> >>> On Thu, Oct 22, 2015 at 06:28:09AM +0000, commits@source.squeak.org wrote: >>>> Tobias Pape uploaded a new version of Network to project The Trunk: >>>> http://source.squeak.org/trunk/Network-topa.166.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Network-topa.166 >>>> Author: topa >>>> Time: 21 October 2015, 8:26:14.656 pm >>>> UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 >>>> Ancestors: Network-topa.165 >>>> >>>> UUIDGenerator >>>> - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed >>>> - Fix UUIDGenerator class>>#initialize to correctly register at startup >>>> - Do not reset default on startup but rather reseed TheRandom >>>> >>>> Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) >>>> >>> >>> This is outstanding. The UUID plugin has long been a source of problems in >>> the VM, partly due to issues in various Linux distributions. >>> >>> http://bugs.squeak.org/view.php?id=7358 >>> >>> Making the plugin unnecessary is a big improvement. >> >> Thats what I thought. >> Probably we want to present this (Mersenne PRNG + new UUID gen) to >> the Pharo core developers (cc) so that we can just remove the UUID plugin >> from the VMs (cc vm-dev)? >> >> Best regards >> -Tobias > > In the release version of Squeak 5.0, the Mersenne Twister is initialized using a single seed restricted to 32bit. > Has this been changed since to use a wider ranged value? > Otherwise, you run into problems with potential collisions from separate image starts rather too fast for UUID uses... (IMHO) No, that's still something to be done[1]. Levente [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2015-October/186409.html > > Cheers, > Henry > From marcus.denker at inria.fr Thu Oct 22 14:13:08 2015 From: marcus.denker at inria.fr (Marcus Denker) Date: Sat Oct 24 15:50:55 2015 Subject: [Pharo-dev] [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> References: <201510220628.t9M6SQJr045098@shell.msen.com> <20151022123725.GA8276@shell.msen.com> <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> Message-ID: <1E45EC11-6956-48DE-8A85-1CC212C80C50@inria.fr> > On 22 Oct 2015, at 14:49, Tobias Pape wrote: > > > On 22.10.2015, at 14:37, David T. Lewis wrote: > >> On Thu, Oct 22, 2015 at 06:28:09AM +0000, commits@source.squeak.org wrote: >>> Tobias Pape uploaded a new version of Network to project The Trunk: >>> http://source.squeak.org/trunk/Network-topa.166.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Network-topa.166 >>> Author: topa >>> Time: 21 October 2015, 8:26:14.656 pm >>> UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 >>> Ancestors: Network-topa.165 >>> >>> UUIDGenerator >>> - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed >>> - Fix UUIDGenerator class>>#initialize to correctly register at startup >>> - Do not reset default on startup but rather reseed TheRandom >>> >>> Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) >>> >> >> This is outstanding. The UUID plugin has long been a source of problems in >> the VM, partly due to issues in various Linux distributions. >> >> http://bugs.squeak.org/view.php?id=7358 >> >> Making the plugin unnecessary is a big improvement. > > Thats what I thought. > Probably we want to present this (Mersenne PRNG + new UUID gen) to > the Pharo core developers (cc) so that we can just remove the UUID plugin > from the VMs (cc vm-dev)? > That sounds good! Marcus From johnmci at smalltalkconsulting.com Thu Oct 22 19:54:51 2015 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Sat Oct 24 16:17:34 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: References: <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> Message-ID: Ok, I posted a set of three image disks that contain all the work that I had done on the macintosh version of the Squeak VM from the late 1999's thru to 2010. There are three files involved which require about 6GB of storage. People are welcome to grab a copy of them if they are curious about the code used to build earlier versions of Squeak, or need something to run on their trophy SE/30 The files can be found at ftp://ftp.smalltalkconsulting.com/MacintoshSqueakBuildSource1996to2010/ On Wed, Oct 21, 2015 at 10:26 PM, John McIntosh < johnmci@smalltalkconsulting.com> wrote: > Look for the Squeak 1.1 from installer.zip file in > ftp://ftp.smalltalkconsulting.com > > > On Wed, Oct 21, 2015 at 9:11 PM, John McIntosh < > johnmci@smalltalkconsulting.com> wrote: > >> I have one that is Squeak VM 68K Dec 17th, 1996 1:05pm Not sure the >> version tho, guess it would be 1.1 >> Mmm I do have an Squeak Installer from Setp 24th 1996. Have to figure out >> how to open it first. >> >> On Wed, Oct 21, 2015 at 6:31 PM, Eric Scharff >> wrote: >> >>> I could probably muck around and get the image and changes files, but >>> what I'm looking for, among other things, is the V1.0 Mac virtual machine. >>> >>> >>> >>> On Wednesday, October 21, 2015 4:38 PM, Paul DeBruicker < >>> pdebruic@gmail.com> wrote: >>> >>> >>> Can you download an image from the SqueakJS site or is it run only? >>> >>> https://bertfreudenberg.github.io/SqueakJS/run/ >>> >>> Looks like there is a 1.13 image there. >>> >>> >>> >>> >>> >>> >>> EricNBoulder wrote >>> >>> > I'm trying to track down the very oldest oldest squeak releases (mostly >>> > for historic purposes), the original 1.x (and earlier) releases for >>> Mac. >>> > Of course, research.apple.com is long gone, and even ftp.squeak.org >>> > doesn't seem to have the .sit.hqx files >>> > Anyone have any idea where the old distributions can be found? >>> >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Does-anyone-have-the-original-Squeak-1-x-Mac-releases-tp4857135p4857150.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> -- >> >> =========================================================================== >> John M. McIntosh. Corporate Smalltalk Consulting Ltd >> https://www.linkedin.com/in/smalltalk >> >> =========================================================================== >> > > > > -- > =========================================================================== > John M. McIntosh. Corporate Smalltalk Consulting Ltd > https://www.linkedin.com/in/smalltalk > =========================================================================== > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151022/adf6c4a4/attachment.htm From nicolas.cellier.aka.nice at gmail.com Sat Oct 24 17:01:31 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Oct 24 17:01:34 2015 Subject: [squeak-dev] Re: Squeak 4.6: Graphics-mt.316.mcz In-Reply-To: References: <1445334182174-4856721.post@n4.nabble.com> <1445347617011-4856747.post@n4.nabble.com> Message-ID: Hi Eliot, the test case is : ScaledDecimalTest new testCoercion 2015-10-24 15:54 GMT+02:00 Levente Uzonyi : > Running that test case on the latest V3 CogVM (3427) should give you a > debugger where the receiver got mixed up with some other variable. > > Levente > > > On Fri, 23 Oct 2015, Eliot Miranda wrote: > > Nicolas, >> what's (where's) the reproducible case? >> >> On Tue, Oct 20, 2015 at 8:52 AM, Nicolas Cellier < >> nicolas.cellier.aka.nice@gmail.com> wrote: >> BTW, I had a fairly reproducible case, didn't I send it to this >> list? >> Ah no, it was pharo... >> >> ScaledDecimalTests>>testCoercion >> >> >> https://www.mail-archive.com/pharo-dev@lists.pharo.org/msg31997.html >> >> 2015-10-20 15:26 GMT+02:00 marcel.taeumel : >> And if you update the VM, it will break. >> And if you update the image, now, it will work again. ;-) >> >> Well, here is the thing: I am not able to fix that VM/JIT bug >> although I >> would rather like to. If you can fix it, please go ahead. If Eliot >> finds >> time for it -- well, it works in Spur and Stack versions -- he will >> surely >> do it. >> >> Until then, we should fix it if possible to improve user >> experience. If you >> find any other of those hundreds of places, please consider fixing >> them as >> well. Not into trunk, but Squeak46 branch. >> >> This VM bug has been known since mid of September at least: >> >> http://forum.world.st/Non-Spur-CogVM-3427-and-3410-cannot-load-PNG-files-anymore-td4850308.html >> >> Nothing has happened yet. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Squeak-4-6-Graphics-mt-316-mcz-tp4856712p4856747.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151024/5a3bd915/attachment.htm From tim at rowledge.org Sat Oct 24 17:15:02 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 24 17:15:08 2015 Subject: [squeak-dev] Re: Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <1445624932011-4857648.post@n4.nabble.com> References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <1445624932011-4857648.post@n4.nabble.com> Message-ID: <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> > On 23-10-2015, at 11:28 AM, marcel.taeumel wrote: > > The image looks like the 1.1 on our FTP (http://ftp.squeak.org/1.1/) but it > will not open with the Windows VM from then. Was the image format somewhat > different between Windows/Mac back then? No, the image *format* was the same but the image was originally pretty solidly Mac specific until Andreas added support for Windows, Ian added it for *nix and I added it for RISC OS. It?s possible that image you have there simply predates any of that. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Maniac: An early computer built by nuts... From henrik.s.johansen at veloxit.no Thu Oct 22 15:57:01 2015 From: henrik.s.johansen at veloxit.no (Henrik Johansen) Date: Sat Oct 24 17:16:14 2015 Subject: [Vm-dev] [squeak-dev] The Trunk: Network-topa.166.mcz In-Reply-To: <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> References: <201510220628.t9M6SQJr045098@shell.msen.com> <20151022123725.GA8276@shell.msen.com> <030FB8A8-2658-4A3B-B26B-90CEA4CC7ABE@gmx.de> Message-ID: <3C54901C-E534-4262-BCF1-41FF89CC9063@veloxit.no> > On 22 Oct 2015, at 2:49 , Tobias Pape wrote: > > > > On 22.10.2015, at 14:37, David T. Lewis wrote: > >> On Thu, Oct 22, 2015 at 06:28:09AM +0000, commits@source.squeak.org wrote: >>> Tobias Pape uploaded a new version of Network to project The Trunk: >>> http://source.squeak.org/trunk/Network-topa.166.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Network-topa.166 >>> Author: topa >>> Time: 21 October 2015, 8:26:14.656 pm >>> UUID: d6d9910f-fa67-4c69-9a89-030c81233e90 >>> Ancestors: Network-topa.165 >>> >>> UUIDGenerator >>> - Use new Random>>#nextBytes:into:startingAt: (needs Kernel-ul.960) for even more speed >>> - Fix UUIDGenerator class>>#initialize to correctly register at startup >>> - Do not reset default on startup but rather reseed TheRandom >>> >>> Timings improved: '1,190,000 per second. 842 nanoseconds per run.' (0.25 times slower than primitive version) >>> >> >> This is outstanding. The UUID plugin has long been a source of problems in >> the VM, partly due to issues in various Linux distributions. >> >> http://bugs.squeak.org/view.php?id=7358 >> >> Making the plugin unnecessary is a big improvement. > > Thats what I thought. > Probably we want to present this (Mersenne PRNG + new UUID gen) to > the Pharo core developers (cc) so that we can just remove the UUID plugin > from the VMs (cc vm-dev)? > > Best regards > -Tobias In the release version of Squeak 5.0, the Mersenne Twister is initialized using a single seed restricted to 32bit. Has this been changed since to use a wider ranged value? Otherwise, you run into problems with potential collisions from separate image starts rather too fast for UUID uses... (IMHO) Cheers, Henry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 842 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151022/6c9daa19/signature.pgp From craig at netjam.org Fri Oct 23 12:03:20 2015 From: craig at netjam.org (Craig Latta) Date: Sat Oct 24 19:06:01 2015 Subject: [squeak-dev] re: FOSDEM 2016 devroom selection In-Reply-To: <5628FB29.3000501@stack.nl> References: <20151022111825.GA20780@stack.nl> <5628FB29.3000501@stack.nl> Message-ID: Would anyone like to go to FOSDEM and do Smalltalky things anyway? -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at netjam.org Thu Oct 22 17:41:47 2015 From: craig at netjam.org (Craig Latta) Date: Sat Oct 24 19:06:03 2015 Subject: [squeak-dev] re: FOSDEM 2016 devroom selection In-Reply-To: <5628FB29.3000501@stack.nl> References: <20151022111825.GA20780@stack.nl> <5628FB29.3000501@stack.nl> Message-ID: That sucks. Well, it was a fun three years. Thanks for organizing it! -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From stephan at stack.nl Fri Oct 23 14:58:52 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Oct 24 19:06:05 2015 Subject: [squeak-dev] Re: Fwd: FOSDEM 2016 devroom selection In-Reply-To: References: <20151022111825.GA20780@stack.nl> <5628FB29.3000501@stack.nl> Message-ID: On 23/10/15 12:07, Jose San Leandro wrote: > Sad news. Indeed. I'll try again next year. There are of course several devrooms where we can propose talks, e.g. "Containers and Process Isolation" should be interested to hear about our long-time experience with images Stephan https://fosdem.org/2016/news/2015-10-22-accepted-devrooms/ From tim at rowledge.org Sat Oct 24 20:11:26 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 24 20:11:32 2015 Subject: [squeak-dev] Re: Fwd: FOSDEM 2016 devroom selection In-Reply-To: References: <20151022111825.GA20780@stack.nl> <5628FB29.3000501@stack.nl> Message-ID: <7DA1294C-4CA0-49D5-BF2C-2754C8B483E5@rowledge.org> > On 23-10-2015, at 7:58 AM, Stephan Eggermont wrote: > > On 23/10/15 12:07, Jose San Leandro wrote: >> Sad news. > > Indeed. I'll try again next year. > There are of course several devrooms where we can propose talks, e.g. > "Containers and Process Isolation" should be interested to hear about our long-time experience with images IoT - the Pi Scratch system is gradually intruding there and of course that means various device drivers are now in Squeak Open Media Open Source Design Coding for Language Communities Graphics - all seem areas where Squeak has a place tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- IDIOS AMIGOS - We're wild and crazy guys! From commits at source.squeak.org Sun Oct 25 22:09:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 25 22:09:02 2015 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-dtl.142.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-dtl.142.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.142 Author: dtl Time: 25 October 2015, 6:08:54.084 pm UUID: c87d888b-1820-43f0-bc7b-9c4988d3d263 Ancestors: MonticelloConfigurations-dtl.141 On completion, an interactive system update blocks the UI with a notifier. Allow the notifier to be bypassed for scripted updates, and write a message to the transcript in either case. =============== Diff against MonticelloConfigurations-dtl.141 =============== Item was changed: ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- doUpdate "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete. + Flush all caches. If a previous download failed this is often helpful" + + ^self doUpdate: true + ! - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { self repository }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was added: + ----- Method: MCMcmUpdater>>doUpdate: (in category 'updating') ----- + doUpdate: interactive + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete. + If interteractive use a modal notifier, otherwise only update the transcript. + Flush all caches. If a previous download failed this is often helpful" + + | config | + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [ + interactive ifTrue: [ ^self inform: 'Unable to retrieve updates from remote repository.' translated ]. + Transcript cr; show: '========== Unable to retrieve updates from remote repository. ==========' translated; cr. + ^ self ]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + interactive ifTrue: [ self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate) ]. + Transcript cr; + show: '========== Update completed. Current update number ' translated; + show: SystemVersion current highestUpdate; + show: ' =========='; cr ] + ifFalse: [ + interactive + ifTrue: [ self inform: 'Update completed.' ]. + Transcript cr; show: '========== Update completed. ==========' translated; cr ] + ! From commits at source.squeak.org Sun Oct 25 22:17:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 25 22:17:53 2015 Subject: [squeak-dev] Squeak 4.6: MonticelloConfigurations-dtl.142.mcz Message-ID: David T. Lewis uploaded a new version of MonticelloConfigurations to project Squeak 4.6: http://source.squeak.org/squeak46/MonticelloConfigurations-dtl.142.mcz ==================== Summary ==================== Name: MonticelloConfigurations-dtl.142 Author: dtl Time: 25 October 2015, 6:08:54.084 pm UUID: c87d888b-1820-43f0-bc7b-9c4988d3d263 Ancestors: MonticelloConfigurations-dtl.141 On completion, an interactive system update blocks the UI with a notifier. Allow the notifier to be bypassed for scripted updates, and write a message to the transcript in either case. =============== Diff against MonticelloConfigurations-dtl.141 =============== Item was changed: ----- Method: MCMcmUpdater>>doUpdate (in category 'updating') ----- doUpdate "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete. + Flush all caches. If a previous download failed this is often helpful" + + ^self doUpdate: true + ! - the default updater for the system, update the system version when complete." - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := self updateFromRepositories: { self repository }. - config ifNil: [^self inform: 'Unable to retrieve updates from remote repository.' translated]. - MCMcmUpdater default == self - ifTrue: [ config setSystemVersion. - self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate).] - ifFalse: [self inform: 'Update completed.'] - ! Item was added: + ----- Method: MCMcmUpdater>>doUpdate: (in category 'updating') ----- + doUpdate: interactive + "Update the image by loading all pending updates from the server. If this is + the default updater for the system, update the system version when complete. + If interteractive use a modal notifier, otherwise only update the transcript. + Flush all caches. If a previous download failed this is often helpful" + + | config | + MCFileBasedRepository flushAllCaches. + config := self updateFromRepositories: { self repository }. + config ifNil: [ + interactive ifTrue: [ ^self inform: 'Unable to retrieve updates from remote repository.' translated ]. + Transcript cr; show: '========== Unable to retrieve updates from remote repository. ==========' translated; cr. + ^ self ]. + MCMcmUpdater default == self + ifTrue: [ config setSystemVersion. + interactive ifTrue: [ self inform: ('Update completed. + Current update number: ' translated, SystemVersion current highestUpdate) ]. + Transcript cr; + show: '========== Update completed. Current update number ' translated; + show: SystemVersion current highestUpdate; + show: ' =========='; cr ] + ifFalse: [ + interactive + ifTrue: [ self inform: 'Update completed.' ]. + Transcript cr; show: '========== Update completed. ==========' translated; cr ] + ! From commits at source.squeak.org Sun Oct 25 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 25 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151025225502.25668.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-October/009074.html Name: MonticelloConfigurations-dtl.142 Ancestors: MonticelloConfigurations-dtl.141 On completion, an interactive system update blocks the UI with a notifier. Allow the notifier to be bypassed for scripted updates, and write a message to the transcript in either case. ============================================= From bert at freudenbergs.de Sun Oct 25 23:51:55 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Oct 25 23:51:59 2015 Subject: [squeak-dev] Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <1445624932011-4857648.post@n4.nabble.com> <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> Message-ID: <3B866FC5-1A70-4ADE-AD0C-9AC11ADAAB23@freudenbergs.de> > On 24.10.2015, at 19:15, tim Rowledge wrote: > > >> On 23-10-2015, at 11:28 AM, marcel.taeumel wrote: >> >> The image looks like the 1.1 on our FTP (http://ftp.squeak.org/1.1/) but it >> will not open with the Windows VM from then. Was the image format somewhat >> different between Windows/Mac back then? > > No, the image *format* was the same but the image was originally pretty solidly Mac specific until Andreas added support for Windows, Ian added it for *nix and I added it for RISC OS. It?s possible that image you have there simply predates any of that. The image on the website is 1.1w meaning it has the WindowsFileDirectory class which is needed to make it work on the Windows VM (it supports Mac and Windows). IIRC it lacks the UnixFileDir though (those are labeled ?...u?). John?s image only has MacFileDirectory, so I think this is actually the oldest released image found so far, and we should put it on the website. Would be fun if someone looked at the changes file time stamps to reconstruct the evolution of early Squeak images ... - 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/20151026/63d82147/smime-0001.bin From stephan at stack.nl Mon Oct 26 10:18:04 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Oct 26 10:18:23 2015 Subject: [squeak-dev] Re: Fwd: FOSDEM 2016 devroom selection In-Reply-To: <7DA1294C-4CA0-49D5-BF2C-2754C8B483E5@rowledge.org> References: <20151022111825.GA20780@stack.nl> <5628FB29.3000501@stack.nl> <7DA1294C-4CA0-49D5-BF2C-2754C8B483E5@rowledge.org> Message-ID: On 24/10/15 22:11, tim Rowledge wrote: > >> On 23-10-2015, at 7:58 AM, Stephan Eggermont wrote: >> >> On 23/10/15 12:07, Jose San Leandro wrote: >>> Sad news. >> >> Indeed. I'll try again next year. >> There are of course several devrooms where we can propose talks, e.g. >> "Containers and Process Isolation" should be interested to hear about our long-time experience with images > > IoT - the Pi Scratch system is gradually intruding there and of course that means various device drivers are now in Squeak > Open Media > Open Source Design > Coding for Language Communities > Graphics > - all seem areas where Squeak has a place And the best way to increase our chances next year are of course to make sure that there are lots of smalltalk-using presentations at the devrooms. There was an IWST paper this year that would fit the EDA (Electronic Design Automation) devroom, and I would be interested to see PostgreSQL development in action. Stephan From commits at source.squeak.org Mon Oct 26 23:46:45 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 26 23:46:48 2015 Subject: [squeak-dev] The Trunk: System-ul.774.mcz Message-ID: Levente Uzonyi uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-ul.774.mcz ==================== Summary ==================== Name: System-ul.774 Author: ul Time: 27 October 2015, 1:44:16.212 am UUID: 5c00c594-7a1a-4148-9b3b-bfe6ae6486e1 Ancestors: System-ul.773 Reverted some of the less efficient optimizations. =============== Diff against System-mt.772 =============== Item was changed: Object subclass: #SecureHashAlgorithm instanceVariableNames: 'totalA totalB totalC totalD totalE totals' + classVariableNames: 'K1 K2 K3 K4 TA TB TC TD TE TI' - classVariableNames: 'K1 K2 K3 K4' poolDictionaries: '' category: 'System-Digital Signatures'! !SecureHashAlgorithm commentStamp: '' prior: 0! This class implements the Secure Hash Algorithm (SHA) described in the U.S. government's Secure Hash Standard (SHS). This standard is described in FIPS PUB 180-1, "SECURE HASH STANDARD", April 17, 1995. The Secure Hash Algorithm is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996. See the comment in class DigitalSignatureAlgorithm for details on its use. Implementation notes: The secure hash standard was created with 32-bit hardware in mind. All arithmetic in the hash computation must be done modulo 2^32. This implementation uses ThirtyTwoBitRegister objects to simulate hardware registers; this implementation is about six times faster than using LargePositiveIntegers (measured on a Macintosh G3 Powerbook). Implementing a primitive to process each 64-byte buffer would probably speed up the computation by a factor of 20 or more. ! Item was changed: ----- Method: SecureHashAlgorithm class>>initialize (in category 'class initialization') ----- initialize "SecureHashAlgorithm initialize" "For the curious, here's where these constants come from: #(2 3 5 10) collect: [:x | ((x sqrt / 4.0) * (2.0 raisedTo: 32)) truncated hex]" K1 := ThirtyTwoBitRegister fromInteger: 16r5A827999. K2 := ThirtyTwoBitRegister fromInteger: 16r6ED9EBA1. K3 := ThirtyTwoBitRegister fromInteger: 16r8F1BBCDC. K4 := ThirtyTwoBitRegister fromInteger: 16rCA62C1D6. + + TA := ThirtyTwoBitRegister fromInteger: 16r67452301. + TB := ThirtyTwoBitRegister fromInteger: 16rEFCDAB89. + TC := ThirtyTwoBitRegister fromInteger: 16r98BADCFE. + TD := ThirtyTwoBitRegister fromInteger: 16r10325476. + TE := ThirtyTwoBitRegister fromInteger: 16rC3D2E1F0. + (TI := Bitmap new: 5) + at: 1 put: 16r67452301; + at: 2 put: 16rEFCDAB89; + at: 3 put: 16r98BADCFE; + at: 4 put: 16r10325476; + at: 5 put: 16rC3D2E1F0! - ! Item was changed: ----- Method: SecureHashAlgorithm>>expandedBlock: (in category 'private') ----- expandedBlock: aByteArray + "Convert the given 64 byte buffer into 80 32-bit registers and answer the result." + + | out src | - "Convert the given 64 byte buffer into 80 32-bit registers and answer the result." - | out src v | out := Array new: 80. src := 1. 1 to: 16 do: [:i | out at: i put: (ThirtyTwoBitRegister fromByteArray: aByteArray at: src). src := src + 4]. 17 to: 80 do: [:i | + out at: i put: ( + (out at: i - 3) copy + bitXor: (out at: i - 8); + bitXor: (out at: i - 14); + bitXor: (out at: i - 16); + leftRotateBy: 1) ]. - v := (out at: i - 3) copy. - v bitXor: (out at: i - 8); - bitXor: (out at: i - 14); - bitXor: (out at: i - 16); - leftRotateBy: 1. - out at: i put: v]. ^ out ! Item was changed: ----- Method: SecureHashAlgorithm>>finalHash (in category 'private') ----- finalHash "Concatenate the final totals to build the 160-bit integer result." "Details: If the primitives are supported, the results are in the totals array. Otherwise, they are in the instance variables totalA through totalE." + | result | + result := ByteArray new: 20. + totals + ifNil: [ "compute final hash when not using primitives" + result + unsignedShortAt: 1 put: totalE low bigEndian: false; + unsignedShortAt: 3 put: totalE hi bigEndian: false; + unsignedShortAt: 5 put: totalD low bigEndian: false; + unsignedShortAt: 7 put: totalD hi bigEndian: false; + unsignedShortAt: 9 put: totalC low bigEndian: false; + unsignedShortAt: 11 put: totalC hi bigEndian: false; + unsignedShortAt: 13 put: totalB low bigEndian: false; + unsignedShortAt: 15 put: totalB hi bigEndian: false; + unsignedShortAt: 17 put: totalA low bigEndian: false; + unsignedShortAt: 19 put: totalA hi bigEndian: false ] + ifNotNil: [ "compute final hash when using primitives" + result + unsignedLongAt: 1 put: (totals at: 5) bigEndian: false; + unsignedLongAt: 5 put: (totals at: 4) bigEndian: false; + unsignedLongAt: 9 put: (totals at: 3) bigEndian: false; + unsignedLongAt: 13 put: (totals at: 2) bigEndian: false; + unsignedLongAt: 17 put: (totals at: 1) bigEndian: false ]. + ^(LargePositiveInteger new: result size) + replaceFrom: 1 + to: result size + with: result + startingAt: 1; + normalize! - | r | - totals ifNil: [ "compute final hash when not using primitives" - ^ (totalA asInteger bitShift: 128) + - (totalB asInteger bitShift: 96) + - (totalC asInteger bitShift: 64) + - (totalD asInteger bitShift: 32) + - (totalE asInteger)]. - - "compute final hash when using primitives" - r := 0. - 1 to: 5 do: [:i | - r := r bitOr: ((totals at: i) bitShift: (32 * (5 - i)))]. - ^ r - ! Item was removed: - ----- Method: SecureHashAlgorithm>>hashFunction:of:with:with: (in category 'private') ----- - hashFunction: i of: x with: y with: z - "Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard." - "Details: There are four functions, one for each 20 iterations. The second and fourth are the same." - - i <= 20 ifTrue: [^ x copy bitAnd: y; bitOr: (x copy bitInvert; bitAnd: z)]. - i <= 40 ifTrue: [^ x copy bitXor: y; bitXor: z]. - i <= 60 ifTrue: [^ x copy bitAnd: y; bitOr: (x copy bitAnd: z); bitOr: (y copy bitAnd: z)]. - ^ x copy bitXor: y; bitXor: z - ! Item was added: + ----- Method: SecureHashAlgorithm>>hashFunction:of:with:with:using:and: (in category 'private') ----- + hashFunction: i of: x with: y with: z using: t1 and: t2 + "Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard." + "Details: There are four functions, one for each 20 iterations. The second and fourth are the same." + + t1 loadFrom: x. + i <= 20 ifTrue: [ + t2 + loadFrom: x; + bitInvert; + bitAnd: z. + ^t1 + bitAnd: y; + bitOr: t2 ]. + i <= 40 ifTrue: [ + ^t1 + bitXor: y; + bitXor: z ]. + i <= 60 ifTrue: [ + t2 + loadFrom: x; + bitOr: y; + bitAnd: z. + ^t1 + bitAnd: y; + bitOr: t2 ]. + ^t1 + bitXor: y; + bitXor: z + ! Item was changed: ----- Method: SecureHashAlgorithm>>hashInteger:seed: (in category 'public') ----- hashInteger: aPositiveInteger seed: seedInteger "Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in the production of random numbers" | buffer dstIndex | "Initialize totalA through totalE to their seed values." + totals + ifNil: [ + totalA := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF). + totalB := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF). + totalC := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF). + totalD := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF). + totalE := ThirtyTwoBitRegister + fromInteger: (seedInteger bitAnd: 16rFFFFFFFF) ] + ifNotNil: [ + totals + at: 1 put: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF); + at: 2 put: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF); + at: 3 put: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF); + at: 4 put: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF); + at: 5 put: (seedInteger bitAnd: 16rFFFFFFFF) ]. - totalA := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF). - totalB := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF). - totalC := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF). - totalD := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF). - totalE := ThirtyTwoBitRegister - fromInteger: (seedInteger bitAnd: 16rFFFFFFFF). - self initializeTotalsArray. - "pad integer with zeros" buffer := ByteArray new: 64. dstIndex := 0. aPositiveInteger digitLength to: 1 by: -1 do: [:i | buffer at: (dstIndex := dstIndex + 1) put: (aPositiveInteger digitAt: i)]. "process that one block" self processBuffer: buffer. ^ self finalHash ! Item was changed: ----- Method: SecureHashAlgorithm>>hashStream: (in category 'public') ----- hashStream: aPositionableStream "Hash the contents of the given stream from the current position to the end using the Secure Hash Algorithm. The SHA algorithm is defined in FIPS PUB 180-1. It is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996." "SecureHashAlgorithm new hashStream: (ReadStream on: 'foo')" | startPosition buf bitLength | self initializeTotals. "(SecureHashAlgorithm new hashMessage: '') radix: 16 => 'DA39A3EE5E6B4B0D3255BFEF95601890AFD80709'" + aPositionableStream atEnd ifTrue: [self processFinalBuffer: #[] bitLength: 0]. - aPositionableStream atEnd ifTrue: [self processFinalBuffer: #() bitLength: 0]. startPosition := aPositionableStream position. + buf := ByteArray new: 64. [aPositionableStream atEnd] whileFalse: [ + buf := aPositionableStream next: 64 into: buf startingAt: 1. - buf := aPositionableStream next: 64. (aPositionableStream atEnd not and: [buf size = 64]) ifTrue: [self processBuffer: buf] ifFalse: [ bitLength := (aPositionableStream position - startPosition) * 8. self processFinalBuffer: buf bitLength: bitLength]]. ^ self finalHash ! Item was added: + ----- Method: SecureHashAlgorithm>>initialize (in category 'initialize-release') ----- + initialize + + self primHasSecureHashPrimitive + ifTrue: [ totals := Bitmap new: 5 ] + ifFalse: [ + totalA := ThirtyTwoBitRegister new. + totalB := ThirtyTwoBitRegister new. + totalC := ThirtyTwoBitRegister new. + totalD := ThirtyTwoBitRegister new. + totalE := ThirtyTwoBitRegister new ]! Item was changed: ----- Method: SecureHashAlgorithm>>initializeTotals (in category 'private') ----- initializeTotals "Initialize totalA through totalE to their seed values." + totals + ifNil: [ + "total registers for use when primitives are absent" + totalA loadFrom: TA. + totalB loadFrom: TB. + totalC loadFrom: TC. + totalD loadFrom: TD. + totalE loadFrom: TE ] + ifNotNil: [ + totals + replaceFrom: 1 + to: totals size + with: TI + startingAt: 1 ]! - "total registers for use when primitives are absent" - totalA := ThirtyTwoBitRegister fromInteger: 16r67452301. - totalB := ThirtyTwoBitRegister fromInteger: 16rEFCDAB89. - totalC := ThirtyTwoBitRegister fromInteger: 16r98BADCFE. - totalD := ThirtyTwoBitRegister fromInteger: 16r10325476. - totalE := ThirtyTwoBitRegister fromInteger: 16rC3D2E1F0. - self initializeTotalsArray. - ! Item was removed: - ----- Method: SecureHashAlgorithm>>initializeTotalsArray (in category 'private') ----- - initializeTotalsArray - "Initialize the totals array from the registers for use with the primitives." - - totals := Bitmap new: 5. - totals at: 1 put: totalA asInteger. - totals at: 2 put: totalB asInteger. - totals at: 3 put: totalC asInteger. - totals at: 4 put: totalD asInteger. - totals at: 5 put: totalE asInteger. - ! Item was changed: ----- Method: SecureHashAlgorithm>>processBuffer: (in category 'private') ----- processBuffer: aByteArray "Process given 64-byte buffer, accumulating the results in totalA through totalE." + | a b c d e t tmp w tmp2 tmp3 | + totals ifNotNil: [ ^self processBufferUsingPrimitives: aByteArray ]. - | a b c d e w tmp | - self primHasSecureHashPrimitive - ifTrue: [^ self processBufferUsingPrimitives: aByteArray] - ifFalse: [totals := nil]. "initialize registers a through e from the current totals" a := totalA copy. b := totalB copy. c := totalC copy. d := totalD copy. e := totalE copy. "expand and process the buffer" w := self expandedBlock: aByteArray. + tmp := ThirtyTwoBitRegister new. + tmp2 := ThirtyTwoBitRegister new. + tmp3 := ThirtyTwoBitRegister new. 1 to: 80 do: [:i | + tmp + loadFrom: a; + leftRotateBy: 5; + += (self hashFunction: i of: b with: c with: d using: tmp2 and: tmp3); - tmp := (a copy leftRotateBy: 5) - += (self hashFunction: i of: b with: c with: d); += e; += (w at: i); += (self constantForStep: i). + t := e. e := d. d := c. c := b leftRotateBy: 30. b := a. + a := tmp. + tmp := t ]. - a := tmp]. "add a through e into total accumulators" totalA += a. totalB += b. totalC += c. totalD += d. totalE += e. ! From commits at source.squeak.org Mon Oct 26 23:47:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 26 23:47:05 2015 Subject: [squeak-dev] The Trunk: System-ul.773.mcz Message-ID: Levente Uzonyi uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-ul.773.mcz ==================== Summary ==================== Name: System-ul.773 Author: ul Time: 26 October 2015, 3:58:12.896 am UUID: 6bc40bec-54a9-43e1-ae6d-f4fc730cdc16 Ancestors: System-mt.772 SecureHashAlgorithm speedups: - avoid allocations - simplified hash function =============== Diff against System-mt.772 =============== Item was changed: Object subclass: #SecureHashAlgorithm + instanceVariableNames: 'totalA totalB totalC totalD totalE totals expandBuffer t1 t2 a b c d e t' + classVariableNames: 'K1 K2 K3 K4 TA TB TC TD TE TI' - instanceVariableNames: 'totalA totalB totalC totalD totalE totals' - classVariableNames: 'K1 K2 K3 K4' poolDictionaries: '' category: 'System-Digital Signatures'! !SecureHashAlgorithm commentStamp: '' prior: 0! This class implements the Secure Hash Algorithm (SHA) described in the U.S. government's Secure Hash Standard (SHS). This standard is described in FIPS PUB 180-1, "SECURE HASH STANDARD", April 17, 1995. The Secure Hash Algorithm is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996. See the comment in class DigitalSignatureAlgorithm for details on its use. Implementation notes: The secure hash standard was created with 32-bit hardware in mind. All arithmetic in the hash computation must be done modulo 2^32. This implementation uses ThirtyTwoBitRegister objects to simulate hardware registers; this implementation is about six times faster than using LargePositiveIntegers (measured on a Macintosh G3 Powerbook). Implementing a primitive to process each 64-byte buffer would probably speed up the computation by a factor of 20 or more. ! Item was changed: ----- Method: SecureHashAlgorithm class>>initialize (in category 'class initialization') ----- initialize "SecureHashAlgorithm initialize" "For the curious, here's where these constants come from: #(2 3 5 10) collect: [:x | ((x sqrt / 4.0) * (2.0 raisedTo: 32)) truncated hex]" K1 := ThirtyTwoBitRegister fromInteger: 16r5A827999. K2 := ThirtyTwoBitRegister fromInteger: 16r6ED9EBA1. K3 := ThirtyTwoBitRegister fromInteger: 16r8F1BBCDC. K4 := ThirtyTwoBitRegister fromInteger: 16rCA62C1D6. + + TA := ThirtyTwoBitRegister fromInteger: 16r67452301. + TB := ThirtyTwoBitRegister fromInteger: 16rEFCDAB89. + TC := ThirtyTwoBitRegister fromInteger: 16r98BADCFE. + TD := ThirtyTwoBitRegister fromInteger: 16r10325476. + TE := ThirtyTwoBitRegister fromInteger: 16rC3D2E1F0. + (TI := Bitmap new: 5) + at: 1 put: 16r67452301; + at: 2 put: 16rEFCDAB89; + at: 3 put: 16r98BADCFE; + at: 4 put: 16r10325476; + at: 5 put: 16rC3D2E1F0! - ! Item was changed: ----- Method: SecureHashAlgorithm>>expandedBlock: (in category 'private') ----- expandedBlock: aByteArray "Convert the given 64 byte buffer into 80 32-bit registers and answer the result." + + | src | - | out src v | - out := Array new: 80. src := 1. 1 to: 16 do: [:i | + (expandBuffer at: i) loadFrom: aByteArray at: src. - out at: i put: (ThirtyTwoBitRegister fromByteArray: aByteArray at: src). src := src + 4]. 17 to: 80 do: [:i | + t1 + loadFrom: (expandBuffer at: i - 3); + bitXor: (expandBuffer at: i - 8); + bitXor: (expandBuffer at: i - 14); + bitXor: (expandBuffer at: i - 16); - v := (out at: i - 3) copy. - v bitXor: (out at: i - 8); - bitXor: (out at: i - 14); - bitXor: (out at: i - 16); leftRotateBy: 1. + (expandBuffer at: i) loadFrom: t1 ] - out at: i put: v]. - ^ out ! Item was changed: ----- Method: SecureHashAlgorithm>>finalHash (in category 'private') ----- finalHash "Concatenate the final totals to build the 160-bit integer result." "Details: If the primitives are supported, the results are in the totals array. Otherwise, they are in the instance variables totalA through totalE." + | result | + result := ByteArray new: 20. + totals + ifNil: [ "compute final hash when not using primitives" + result + unsignedShortAt: 1 put: totalE low bigEndian: false; + unsignedShortAt: 3 put: totalE hi bigEndian: false; + unsignedShortAt: 5 put: totalD low bigEndian: false; + unsignedShortAt: 7 put: totalD hi bigEndian: false; + unsignedShortAt: 9 put: totalC low bigEndian: false; + unsignedShortAt: 11 put: totalC hi bigEndian: false; + unsignedShortAt: 13 put: totalB low bigEndian: false; + unsignedShortAt: 15 put: totalB hi bigEndian: false; + unsignedShortAt: 17 put: totalA low bigEndian: false; + unsignedShortAt: 19 put: totalA hi bigEndian: false ] + ifNotNil: [ "compute final hash when using primitives" + result + unsignedLongAt: 1 put: (totals at: 5) bigEndian: false; + unsignedLongAt: 5 put: (totals at: 4) bigEndian: false; + unsignedLongAt: 9 put: (totals at: 3) bigEndian: false; + unsignedLongAt: 13 put: (totals at: 2) bigEndian: false; + unsignedLongAt: 17 put: (totals at: 1) bigEndian: false ]. + ^(LargePositiveInteger new: result size) + replaceFrom: 1 + to: result size + with: result + startingAt: 1; + normalize! - | r | - totals ifNil: [ "compute final hash when not using primitives" - ^ (totalA asInteger bitShift: 128) + - (totalB asInteger bitShift: 96) + - (totalC asInteger bitShift: 64) + - (totalD asInteger bitShift: 32) + - (totalE asInteger)]. - - "compute final hash when using primitives" - r := 0. - 1 to: 5 do: [:i | - r := r bitOr: ((totals at: i) bitShift: (32 * (5 - i)))]. - ^ r - ! Item was added: + ----- Method: SecureHashAlgorithm>>hashFunction: (in category 'private') ----- + hashFunction: i + "Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard." + "Details: There are four functions, one for each 20 iterations. The second and fourth are the same." + + t1 loadFrom: b. + i <= 20 ifTrue: [ + t2 + loadFrom: b; + bitInvert; + bitAnd: d. + ^t1 + bitAnd: c; + bitOr: t2 ]. + i <= 40 ifTrue: [ + ^t1 + bitXor: c; + bitXor: d ]. + i <= 60 ifTrue: [ + t2 + loadFrom: b; + bitOr: c; + bitAnd: d. + ^t1 + bitAnd: c; + bitOr: t2 ]. + ^t1 + bitXor: c; + bitXor: d + ! Item was removed: - ----- Method: SecureHashAlgorithm>>hashFunction:of:with:with: (in category 'private') ----- - hashFunction: i of: x with: y with: z - "Compute the hash function for the i-th step of the block hash loop. We number our steps 1-80, versus the 0-79 of the standard." - "Details: There are four functions, one for each 20 iterations. The second and fourth are the same." - - i <= 20 ifTrue: [^ x copy bitAnd: y; bitOr: (x copy bitInvert; bitAnd: z)]. - i <= 40 ifTrue: [^ x copy bitXor: y; bitXor: z]. - i <= 60 ifTrue: [^ x copy bitAnd: y; bitOr: (x copy bitAnd: z); bitOr: (y copy bitAnd: z)]. - ^ x copy bitXor: y; bitXor: z - ! Item was changed: ----- Method: SecureHashAlgorithm>>hashInteger:seed: (in category 'public') ----- hashInteger: aPositiveInteger seed: seedInteger "Hash the given positive integer. The integer to be hashed should have 512 or fewer bits. This entry point is used in the production of random numbers" | buffer dstIndex | "Initialize totalA through totalE to their seed values." + totals + ifNil: [ + totalA := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF). + totalB := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF). + totalC := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF). + totalD := ThirtyTwoBitRegister + fromInteger: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF). + totalE := ThirtyTwoBitRegister + fromInteger: (seedInteger bitAnd: 16rFFFFFFFF) ] + ifNotNil: [ + totals + at: 1 put: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF); + at: 2 put: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF); + at: 3 put: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF); + at: 4 put: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF); + at: 5 put: (seedInteger bitAnd: 16rFFFFFFFF) ]. - totalA := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -128) bitAnd: 16rFFFFFFFF). - totalB := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -96) bitAnd: 16rFFFFFFFF). - totalC := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -64) bitAnd: 16rFFFFFFFF). - totalD := ThirtyTwoBitRegister - fromInteger: ((seedInteger bitShift: -32) bitAnd: 16rFFFFFFFF). - totalE := ThirtyTwoBitRegister - fromInteger: (seedInteger bitAnd: 16rFFFFFFFF). - self initializeTotalsArray. - "pad integer with zeros" buffer := ByteArray new: 64. dstIndex := 0. aPositiveInteger digitLength to: 1 by: -1 do: [:i | buffer at: (dstIndex := dstIndex + 1) put: (aPositiveInteger digitAt: i)]. "process that one block" self processBuffer: buffer. ^ self finalHash ! Item was changed: ----- Method: SecureHashAlgorithm>>hashStream: (in category 'public') ----- hashStream: aPositionableStream "Hash the contents of the given stream from the current position to the end using the Secure Hash Algorithm. The SHA algorithm is defined in FIPS PUB 180-1. It is also described on p. 442 of 'Applied Cryptography: Protocols, Algorithms, and Source Code in C' by Bruce Scheier, Wiley, 1996." "SecureHashAlgorithm new hashStream: (ReadStream on: 'foo')" | startPosition buf bitLength | self initializeTotals. "(SecureHashAlgorithm new hashMessage: '') radix: 16 => 'DA39A3EE5E6B4B0D3255BFEF95601890AFD80709'" + aPositionableStream atEnd ifTrue: [self processFinalBuffer: #[] bitLength: 0]. - aPositionableStream atEnd ifTrue: [self processFinalBuffer: #() bitLength: 0]. startPosition := aPositionableStream position. + buf := ByteArray new: 64. [aPositionableStream atEnd] whileFalse: [ + buf := aPositionableStream next: 64 into: buf startingAt: 1. - buf := aPositionableStream next: 64. (aPositionableStream atEnd not and: [buf size = 64]) ifTrue: [self processBuffer: buf] ifFalse: [ bitLength := (aPositionableStream position - startPosition) * 8. self processFinalBuffer: buf bitLength: bitLength]]. ^ self finalHash ! Item was added: + ----- Method: SecureHashAlgorithm>>initialize (in category 'initialize-release') ----- + initialize + + self primHasSecureHashPrimitive + ifTrue: [ + totals := Bitmap new: 5. + expandBuffer := Bitmap new: 80 ] + ifFalse: [ + totalA := ThirtyTwoBitRegister new. + totalB := ThirtyTwoBitRegister new. + totalC := ThirtyTwoBitRegister new. + totalD := ThirtyTwoBitRegister new. + totalE := ThirtyTwoBitRegister new. + expandBuffer := Array new: 80. + 1 to: 80 do: [ :index | + expandBuffer at: index put: ThirtyTwoBitRegister new ]. + t1 := ThirtyTwoBitRegister new. + t2 := ThirtyTwoBitRegister new. + t := ThirtyTwoBitRegister new. + a := ThirtyTwoBitRegister new. + b := ThirtyTwoBitRegister new. + c := ThirtyTwoBitRegister new. + d := ThirtyTwoBitRegister new. + e := ThirtyTwoBitRegister new ]! Item was changed: ----- Method: SecureHashAlgorithm>>initializeTotals (in category 'private') ----- initializeTotals "Initialize totalA through totalE to their seed values." + totals + ifNil: [ + "total registers for use when primitives are absent" + totalA loadFrom: TA. + totalB loadFrom: TB. + totalC loadFrom: TC. + totalD loadFrom: TD. + totalE loadFrom: TE ] + ifNotNil: [ + totals + replaceFrom: 1 + to: totals size + with: TI + startingAt: 1 ]! - "total registers for use when primitives are absent" - totalA := ThirtyTwoBitRegister fromInteger: 16r67452301. - totalB := ThirtyTwoBitRegister fromInteger: 16rEFCDAB89. - totalC := ThirtyTwoBitRegister fromInteger: 16r98BADCFE. - totalD := ThirtyTwoBitRegister fromInteger: 16r10325476. - totalE := ThirtyTwoBitRegister fromInteger: 16rC3D2E1F0. - self initializeTotalsArray. - ! Item was removed: - ----- Method: SecureHashAlgorithm>>initializeTotalsArray (in category 'private') ----- - initializeTotalsArray - "Initialize the totals array from the registers for use with the primitives." - - totals := Bitmap new: 5. - totals at: 1 put: totalA asInteger. - totals at: 2 put: totalB asInteger. - totals at: 3 put: totalC asInteger. - totals at: 4 put: totalD asInteger. - totals at: 5 put: totalE asInteger. - ! Item was changed: ----- Method: SecureHashAlgorithm>>processBuffer: (in category 'private') ----- processBuffer: aByteArray "Process given 64-byte buffer, accumulating the results in totalA through totalE." + | tmp | + totals ifNotNil: [ ^self processBufferUsingPrimitives: aByteArray ]. - | a b c d e w tmp | - self primHasSecureHashPrimitive - ifTrue: [^ self processBufferUsingPrimitives: aByteArray] - ifFalse: [totals := nil]. - "initialize registers a through e from the current totals" - a := totalA copy. - b := totalB copy. - c := totalC copy. - d := totalD copy. - e := totalE copy. - "expand and process the buffer" + self expandedBlock: aByteArray. + + "initialize registers a through e from the current totals" + a loadFrom: totalA. + b loadFrom: totalB. + c loadFrom: totalC. + d loadFrom: totalD. + e loadFrom: totalE. - w := self expandedBlock: aByteArray. 1 to: 80 do: [:i | + t + loadFrom: a; + leftRotateBy: 5; + += (self hashFunction: i); - tmp := (a copy leftRotateBy: 5) - += (self hashFunction: i of: b with: c with: d); += e; + += (expandBuffer at: i); - += (w at: i); += (self constantForStep: i). + tmp := e. e := d. d := c. c := b leftRotateBy: 30. b := a. + a := t. + t := tmp ]. - a := tmp]. "add a through e into total accumulators" totalA += a. totalB += b. totalC += c. totalD += d. totalE += e. ! Item was changed: ----- Method: SecureHashAlgorithm>>processBufferUsingPrimitives: (in category 'private') ----- processBufferUsingPrimitives: aByteArray "Process given 64-byte buffer using the primitives, accumulating the results in totals." - | w | "expand and process the buffer" + self + primExpandBlock: aByteArray into: expandBuffer; + primHashBlock: expandBuffer using: totals. - w := Bitmap new: 80. - self primExpandBlock: aByteArray into: w. - self primHashBlock: w using: totals. ! From hannes.hirzel at gmail.com Tue Oct 27 09:56:02 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Tue Oct 27 09:56:04 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <262C3550-AF9E-47DC-B2EC-09C5810E75FE@gmx.de> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <262C3550-AF9E-47DC-B2EC-09C5810E75FE@gmx.de> Message-ID: You mean the class 'Model' and method #addItem: ? addItem: classAndMethod "Make a linked message list and put this method in it" self flag: #mref. "classAndMethod is a String" MessageSet parse: classAndMethod toClassAndSelector: [ :class :sel | | list | class ifNil: [^self]. list := OrderedCollection with: ( MethodReference new setClass: class methodSymbol: sel stringVersion: classAndMethod ). ToolSet browseMessageSet: list name: 'Linked by HyperText' autoSelect: nil ] --Hannes On 10/24/15, Tobias Pape wrote: > > On 23.10.2015, at 16:44, H. Hirzel wrote: > >> On 10/21/15, tim Rowledge wrote: >>> I wanted to add a little cmd key hack to the debugger to print numbers >>> in >>> hex - useful when debugging the VM in sim etc. Eventually I found a way >>> to >>> solve my immediate needs but along the path I found a dazzlingly complex >>> intertwingled mess of code for menus and cmd key handling. >>> >>> Part of it is likely because of the confusion inherent to having two >>> separate UI systems that aren?t quite separate. For example StringHolder >>> class>>#yellowButtonMenuItems includes >>> {'make project link (P)' translated. #makeProjectLink}. >>> which >>> a) annoyed me because I want to use cmd-shift-p for my printItHex >>> b) seems to be a bit odd to have in a text editor menu, and very much so >>> in >>> a code editor menu >>> c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph >>> does not understand #makeProjectLink) >>> >>> Also when building menus - which is done for every menu button press! - >>> we >>> end up doing a scan of all the methods (for menu related pragmas) of >>> every >>> class that could possibly be involved. >> >> >> Just curious -- where is this scanning of all methods done in version >> 5.0? >> It does not seem to involve the TheWorldMenu >> http://wiki.squeak.org/squeak/6213 >> ? > > Its in Model, for use with tools. > The world menu is a different beast, still/yet. > > Best > -Tobias > >> >> --Hannes >> >> >> >> This is even more insane than using >>> #isKindOf: within UI code. Perhaps one could argue that it isn?t quite >>> completely insane on multi-core/multi-GHz/megaRam machines but on >>> anything >>> slower ( like the Pi, a rather important platform for public awareness >>> and >>> outreach) it can ruin the UI experience. >>> >>> The current system reminds me unpleasantly of the PenPoint/Go UI dating >>> back >>> to ?89 or so; their hardware was nominally several times faster than our >>> Active Book, and they proudly proclaimed how it was all carefully >>> optimised >>> code and yet it was grindingly slow to do anything in the UI. The Active >>> Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect >>> queue, >>> 1Mb RAM for everything including the screen and filing system) and >>> running >>> that terrible slow nonsense called Smalltalk that everyone knew was slow >>> as >>> slow. Many years later I met one of the developers and it turned out >>> that >>> their framework carefully built menus by checking here, looking there, >>> seeing if a string needed translating, having a tea-break and finally >>> asking >>> a complex graphics subsystem to render something. The Active Book code >>> bitblt?d a menu form to the screen. >>> >>> Ideally menus should be pre-built and cached, with some cache-flushing >>> algorithm connected to anything that changes what should be in them. Such >>> as >>> adding a new menu related pragma. >>> >>> I also spotted some code where menu getting selectors are examined to >>> see >>> how many arguments they take and then assorted #perform incantations are >>> used. In general abetter option is to make use of the execution >>> machinery >>> and just send the most flexible message. Implement it at some sensible >>> root >>> to re-try with a simpler version if needed. >>> >>> I wish I had time to clean this up but I have to make VM changes to >>> support >>> a largish number of Scratch users and my brain is about ready to >>> explode. >>> >>> tim >>> -- >>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>> 29A, the hexadecimal of the Beast. > > > > From Das.Linux at gmx.de Tue Oct 27 10:33:02 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 27 10:33:06 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <262C3550-AF9E-47DC-B2EC-09C5810E75FE@gmx.de> Message-ID: On 27.10.2015, at 10:56, H. Hirzel wrote: > You mean the class 'Model' and method #addItem: ? > > No. I meant Model>>menuPragmasFor: aMenuSymbolOrCollection in: aClass. Do we actually talk about the same thing? I'm unsure :) Best regards -Tobias > addItem: classAndMethod > "Make a linked message list and put this method in it" > > > self flag: #mref. "classAndMethod is a String" > > MessageSet > parse: classAndMethod > toClassAndSelector: [ :class :sel | | list | > class ifNil: [^self]. > list := OrderedCollection with: ( > MethodReference new > setClass: class > methodSymbol: sel > stringVersion: classAndMethod > ). > ToolSet > browseMessageSet: list > name: 'Linked by HyperText' > autoSelect: nil > ] > > > > --Hannes > > On 10/24/15, Tobias Pape wrote: >> >> On 23.10.2015, at 16:44, H. Hirzel wrote: >> >>> On 10/21/15, tim Rowledge wrote: >>>> I wanted to add a little cmd key hack to the debugger to print numbers >>>> in >>>> hex - useful when debugging the VM in sim etc. Eventually I found a way >>>> to >>>> solve my immediate needs but along the path I found a dazzlingly complex >>>> intertwingled mess of code for menus and cmd key handling. >>>> >>>> Part of it is likely because of the confusion inherent to having two >>>> separate UI systems that aren?t quite separate. For example StringHolder >>>> class>>#yellowButtonMenuItems includes >>>> {'make project link (P)' translated. #makeProjectLink}. >>>> which >>>> a) annoyed me because I want to use cmd-shift-p for my printItHex >>>> b) seems to be a bit odd to have in a text editor menu, and very much so >>>> in >>>> a code editor menu >>>> c) doesn?t even work in Morphic so far as I can tell (PluggableTextMorph >>>> does not understand #makeProjectLink) >>>> >>>> Also when building menus - which is done for every menu button press! - >>>> we >>>> end up doing a scan of all the methods (for menu related pragmas) of >>>> every >>>> class that could possibly be involved. >>> >>> >>> Just curious -- where is this scanning of all methods done in version >>> 5.0? >>> It does not seem to involve the TheWorldMenu >>> http://wiki.squeak.org/squeak/6213 >>> ? >> >> Its in Model, for use with tools. >> The world menu is a different beast, still/yet. >> >> Best >> -Tobias >> >>> >>> --Hannes >>> >>> >>> >>> This is even more insane than using >>>> #isKindOf: within UI code. Perhaps one could argue that it isn?t quite >>>> completely insane on multi-core/multi-GHz/megaRam machines but on >>>> anything >>>> slower ( like the Pi, a rather important platform for public awareness >>>> and >>>> outreach) it can ruin the UI experience. >>>> >>>> The current system reminds me unpleasantly of the PenPoint/Go UI dating >>>> back >>>> to ?89 or so; their hardware was nominally several times faster than our >>>> Active Book, and they proudly proclaimed how it was all carefully >>>> optimised >>>> code and yet it was grindingly slow to do anything in the UI. The Active >>>> Book was a mere 8MHz ARM2 (no caches, not even an instruction prefect >>>> queue, >>>> 1Mb RAM for everything including the screen and filing system) and >>>> running >>>> that terrible slow nonsense called Smalltalk that everyone knew was slow >>>> as >>>> slow. Many years later I met one of the developers and it turned out >>>> that >>>> their framework carefully built menus by checking here, looking there, >>>> seeing if a string needed translating, having a tea-break and finally >>>> asking >>>> a complex graphics subsystem to render something. The Active Book code >>>> bitblt?d a menu form to the screen. >>>> >>>> Ideally menus should be pre-built and cached, with some cache-flushing >>>> algorithm connected to anything that changes what should be in them. Such >>>> as >>>> adding a new menu related pragma. >>>> >>>> I also spotted some code where menu getting selectors are examined to >>>> see >>>> how many arguments they take and then assorted #perform incantations are >>>> used. In general abetter option is to make use of the execution >>>> machinery >>>> and just send the most flexible message. Implement it at some sensible >>>> root >>>> to re-try with a simpler version if needed. >>>> >>>> I wish I had time to clean this up but I have to make VM changes to >>>> support >>>> a largish number of Scratch users and my brain is about ready to >>>> explode. >>>> >>>> tim >>>> -- >>>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>>> 29A, the hexadecimal of the Beast. From commits at source.squeak.org Tue Oct 27 15:22:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 27 15:22:30 2015 Subject: [squeak-dev] The Inbox: Morphic-kfr.1019.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-kfr.1019.mcz ==================== Summary ==================== Name: Morphic-kfr.1019 Author: kfr Time: 27 October 2015, 5:21:35.825 pm UUID: 440773d3-8bad-4232-b989-60c0a6dfb1f0 Ancestors: Morphic-mt.1018 Adds a GradientEditor for morphic =============== Diff against Morphic-mt.1018 =============== Item was added: + RectangleMorph subclass: #GradientDisplayMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Widgets'! Item was added: + ----- Method: GradientDisplayMorph>>colorRamp (in category 'as yet unclassified') ----- + colorRamp + ^self fillStyle colorRamp! Item was added: + ----- Method: GradientDisplayMorph>>colorRamp: (in category 'as yet unclassified') ----- + colorRamp: aColorRamp + self fillStyle colorRamp: aColorRamp! Item was added: + ----- Method: GradientDisplayMorph>>drawOn: (in category 'as yet unclassified') ----- + drawOn: aCanvas + "Draw a hatch pattern first." + aCanvas + fillRectangle: self innerBounds + fillStyle: (InfiniteForm with: ColorPresenterMorph hatchForm). + super drawOn: aCanvas! Item was added: + ----- Method: GradientDisplayMorph>>initialize (in category 'as yet unclassified') ----- + initialize + | fill colorRamp | + super initialize. + "self hResizing: #spaceFill. " + colorRamp := {0.0 -> Color green. 0.3 -> Color red. 0.7 -> Color black. 1.0 -> Color blue}. + fill := GradientFillStyle ramp: colorRamp. + fill origin: 0@0. + fill direction: self bounds extent x @ 0. + fill radial: false. + self fillStyle: fill! Item was added: + RectangleMorph subclass: #GradientEditor + instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch gradientMorph row text target selector morph' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Widgets'! Item was added: + ----- Method: GradientEditor class>>on:selector:forMorph:colorRamp: (in category 'as yet unclassified') ----- + on: aTarget selector: aSelector forMorph: aMorph colorRamp: aColorRamp + ^self new + setTarget: aTarget + selector: aSelector + forMorph: aMorph + colorRamp: aColorRamp. + + ! Item was added: + ----- Method: GradientEditor>>addButtonRow (in category 'initialization') ----- + addButtonRow + | button button2 buttonRow button4 | + buttonRow := RectangleMorph new extent: self width @ 30; + borderWidth: 0; color: Color transparent. + buttonRow layoutPolicy: TableLayout new; + cellPositioning: #center; + listCentering: #topLeft; + listDirection: #LeftToRight; + reverseTableCells: true; + cellInset: 20 @ 20. + + button := SimpleButtonMorph new target: self; + label: 'Add color'; + actionSelector: #addHandle. + buttonRow addMorph: button. + + button2 := SimpleButtonMorph new target: self; + label: 'Remove color'; + actionSelector: #deleteHandle. + buttonRow addMorph: button2. + + button4 := SimpleButtonMorph new target: self; + label: 'Close'; + actionSelector: #delete. + buttonRow addMorph: button4. + + self addMorph: buttonRow! Item was added: + ----- Method: GradientEditor>>addHandle (in category 'change reporting') ----- + addHandle + | handleInstance colorIcon | + handleInstance := self handle. + colorIcon := SketchMorph + withForm: ((Color random value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. + self eventHandler: colorIcon target: colorIcon. + self eventHandler: handleInstance target: self. + row addMorph: handleInstance. + handleInstance position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay top - 18). + handleInstance addMorph: colorIcon. + rampMorphs addLast: handleInstance. + colorIcon position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay bottom + 5). + self updateColorRamp! Item was added: + ----- Method: GradientEditor>>addHandles (in category 'initialization') ----- + addHandles + | handle handleInstance colorIcon colorRamp | + rampMorphs := OrderedCollection new. + colorRamp := self gradientDisplay colorRamp asOrderedCollection. + handle := self handle. + colorRamp + do: [:i | + colorIcon := SketchMorph + withForm: ((i value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. + self eventHandler: colorIcon target: colorIcon. + handleInstance := handle copy. + self eventHandler: handleInstance target: self. + row addMorph: handleInstance. + handleInstance position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay top - 18). + handleInstance addMorph: colorIcon. + rampMorphs addLast: handleInstance. + colorIcon position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay bottom + 5)]. + self changed.! Item was added: + ----- Method: GradientEditor>>changeColor:event:target: (in category 'change reporting') ----- + changeColor: aSketchMorph event: evt target: aMorph + | newColor | + newColor := aSketchMorph rotatedForm colorAt: aSketchMorph rotatedForm center. + selectedSketch := aSketchMorph. + self changeColorTarget: self selector: #updateColor: originalColor: newColor value hand: evt hand. + ! Item was added: + ----- Method: GradientEditor>>colorRamp (in category 'accessing') ----- + colorRamp + | i string | + string := gradientDisplay fillStyle colorRamp asOrderedCollection printString. + i := string indexOf:$(. + ^string copyFrom: i to: string size! Item was added: + ----- Method: GradientEditor>>colorRamp: (in category 'accessing') ----- + colorRamp: aColorRamp + + "rampMorphs do:[ :i | rampMorphs remove:i. row removeMorph: i . ]. + self changed." + gradientDisplay colorRamp: aColorRamp. + self addHandles. + ! Item was added: + ----- Method: GradientEditor>>deleteHandle (in category 'change reporting') ----- + deleteHandle + rampMorphs do:[ :i | (i color == Color red) ifTrue:[ rampMorphs remove: i. row removeMorph: i]]. + self updateColorRamp + + ! Item was added: + ----- Method: GradientEditor>>eventHandler:target: (in category 'event handling') ----- + eventHandler: anInstance target: aTarget + (anInstance isKindOf: SketchMorph) + ifTrue:[anInstance on: #mouseUp + send: #changeColor:event:target: + to: self withValue: aTarget] + ifFalse:[anInstance on: #mouseDown + send: #limitHandleMove:event:from: + to: self withValue: aTarget. + anInstance on: #mouseMove + send: #limitHandleMove:event:from: + to: self withValue: aTarget]! Item was added: + ----- Method: GradientEditor>>gradientDisplay (in category 'accessing') ----- + gradientDisplay + ^gradientDisplay! Item was added: + ----- Method: GradientEditor>>handle (in category 'initialization') ----- + handle + | handle | + handle := PolygonMorph + vertices: (Array + with: 0 @ 0 + with: 16 @ 0 + with: 8 @ 16) + color: Color gray + borderWidth: 1 + borderColor: Color black. + ^handle + addMorph: ((RectangleMorph + newBounds: (8 @ 18 extent: 1 @ (gradientDisplay height - 2)) + color: Color orange) + borderWidth: 0).! Item was added: + ----- Method: GradientEditor>>initialize (in category 'initialization') ----- + initialize + + super initialize. + self myLayout. + self extent: 600 @ 150. + row := RectangleMorph new extent: self width @ 100. + + row addMorph: (gradientDisplay := GradientDisplayMorph new position: 20 @ 20; + extent: self width - 40 @ 40). + gradientDisplay fillStyle direction: gradientDisplay width @ 0. + "self addHandles." + self addMorph: row. + self addButtonRow. + text := PluggableTextMorph + on: self + text: #colorRamp + accept: nil + readSelection: nil + menu: nil. + text color: Color white; + width: self width; + height: 50. + self addMorph: text. + ! Item was added: + ----- Method: GradientEditor>>limitHandleMove:event:from: (in category 'change reporting') ----- + limitHandleMove: association event: evt from: handle + | p newBounds | + rampMorphs do:[ : i | i color: Color gray]. + newBounds := gradientDisplay bounds. + newBounds := (newBounds left: (newBounds left - 10)). + newBounds := (newBounds right: (newBounds right - 10)). + p := evt cursorPoint adhereTo: newBounds. + handle position: (p x )@ (handle position y). + handle color: Color red. + self updateColorRamp! Item was added: + ----- Method: GradientEditor>>morph: (in category 'accessing') ----- + morph: aMorph + ^morph := aMorph! Item was added: + ----- Method: GradientEditor>>myLayout (in category 'initialization') ----- + myLayout + self layoutPolicy: TableLayout new; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + cellPositioning: #center; + listCentering: #topLeft; + layoutInset: 10@10; + listDirection: #topToBottom; + reverseTableCells: true; + wrapCentering: #topLeft; + cellInset: 19 @ 10! Item was added: + ----- Method: GradientEditor>>selector: (in category 'accessing') ----- + selector: aSelector + ^selector := aSelector! Item was added: + ----- Method: GradientEditor>>setTarget:selector:forMorph:colorRamp: (in category 'initialization') ----- + setTarget: aTarget selector: aSelector forMorph:aMorph colorRamp: aColorRamp + + self target: aTarget. + self selector: aSelector. + self morph: aMorph. + self colorRamp: aColorRamp. + + ! Item was added: + ----- Method: GradientEditor>>target: (in category 'accessing') ----- + target: aTarget + ^target := aTarget! Item was added: + ----- Method: GradientEditor>>updateColor: (in category 'change reporting') ----- + updateColor: aColor + selectedSketch rotatedForm floodFill: aColor at: selectedSketch rotatedForm center. + self updateColorRamp + ! Item was added: + ----- Method: GradientEditor>>updateColorRamp (in category 'change reporting') ----- + updateColorRamp + | newAssociation newKey newColor sketch colorRamp | + + self updateRampMorphs. + colorRamp := OrderedCollection new. + rampMorphs + do: [:i | + newKey := ((i position x - gradientDisplay left / gradientDisplay width) asFloat roundUpTo: 0.01) + min: 1.0 + max: 0.0. + sketch := i findA: SketchMorph. + newColor := sketch rotatedForm colorAt: sketch rotatedForm center. + newAssociation := newKey -> newColor. + colorRamp addLast: newAssociation]. + colorRamp := colorRamp sorted. + gradientDisplay colorRamp: colorRamp. + gradientDisplay fillStyle direction: gradientDisplay extent x @ 0. + self changed. + target ifNotNil:[ + target perform: selector + with: colorRamp + with: morph]. + text setText: self colorRamp! Item was added: + ----- Method: GradientEditor>>updateRampMorphs (in category 'change reporting') ----- + updateRampMorphs + rampMorphs do:[ :i | i isInWorld ifFalse:[ rampMorphs remove: i]]! Item was changed: ----- Method: GradientFillStyle>>addFillStyleMenuItems:hand:from: (in category '*Morphic-Balloon') ----- addFillStyleMenuItems: aMenu hand: aHand from: aMorph "Add the items for changing the current fill style of the receiver" self isRadialFill ifTrue:[ aMenu add: 'linear gradient' translated target: self selector: #beLinearGradientIn: argument: aMorph. ] ifFalse:[ aMenu add: 'radial gradient' translated target: self selector: #beRadialGradientIn: argument: aMorph. ]. aMenu addLine. + aMenu add: 'change color ramp' translated target: self selector: #changeColorRampIn:event: argument: aMorph. - aMenu add: 'change first color' translated target: self selector: #changeFirstColorIn:event: argument: aMorph. - aMenu add: 'change second color' translated target: self selector: #changeSecondColorIn:event: argument: aMorph. aMenu addLine. super addFillStyleMenuItems: aMenu hand: aHand from: aMorph.! Item was added: + ----- Method: GradientFillStyle>>changeColorRampIn:event: (in category '*Morphic-Balloon') ----- + changeColorRampIn: aMorph event: evt + ^self changeColorSelector: #colorRamp:forMorph: hand: evt hand morph: aMorph originalColor:aMorph fillStyle colorRamp! Item was changed: ----- Method: GradientFillStyle>>changeColorSelector:hand:morph:originalColor: (in category '*Morphic-Balloon') ----- changeColorSelector: aSymbol hand: aHand morph: aMorph originalColor: originalColor "Change either the firstColor or the lastColor (depending on aSymbol). Put up a color picker to hande it. We always use a modal picker so that the user can adjust both colors concurrently." + + ^(GradientEditor on: self selector: aSymbol forMorph: aMorph colorRamp: originalColor) openNear: aMorph fullBoundsInWorld. + + + "NewColorPickerMorph useIt - NewColorPickerMorph useIt ifTrue: [ (NewColorPickerMorph on: self originalColor: originalColor setColorSelector: aSymbol) openNear: aMorph fullBoundsInWorld ] ifFalse: [ ColorPickerMorph new initializeModal: false ; sourceHand: aHand ; target: self ; selector: aSymbol ; argument: aMorph ; originalColor: originalColor ; putUpFor: aMorph + near: aMorph fullBoundsInWorld ]"! - near: aMorph fullBoundsInWorld ]! Item was added: + ----- Method: GradientFillStyle>>colorRamp:forMorph: (in category '*Morphic-Balloon') ----- + colorRamp: aColorRamp forMorph: aMorph + colorRamp :=aColorRamp. + isTranslucent := nil. + pixelRamp := nil. + aMorph changed.! From commits at source.squeak.org Tue Oct 27 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Oct 27 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151027225502.27939.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-October/009075.html Name: System-ul.774 Ancestors: System-ul.773 Reverted some of the less efficient optimizations. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009076.html Name: System-ul.773 Ancestors: System-mt.772 SecureHashAlgorithm speedups: - avoid allocations - simplified hash function ============================================= From eliot.miranda at gmail.com Tue Oct 27 23:25:54 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 27 23:26:02 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> Message-ID: <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Hi Chris, _,,,^..^,,,_ (phone) > On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: > > Tim, Squeak is a complex system, with a lot of functions and a complex > interaction between human and machine. No system like that is going > to be the toddler-coddler you want it to be. > >>>> Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes >>>> {'make project link (P)' translated. #makeProjectLink}. >>>> which >>>> a) annoyed me because I want to use cmd-shift-p for my printItHex > > So override it, you have a "live" system. The code IS the > user-interface, just as much as the menus are... > >>>> Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. > > That'll waste all the memory in your Pi... No it won't :). First there's a gigabyte of ran on a Pi. Second, if the menu system saves the symbolic firm of the menu rather than the rendered but so it should be quite compact. From jecel at merlintec.com Wed Oct 28 01:35:56 2015 From: jecel at merlintec.com (Jecel Assumpcao Jr.) Date: Wed Oct 28 00:36:11 2015 Subject: [squeak-dev] Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <3B866FC5-1A70-4ADE-AD0C-9AC11ADAAB23@freudenbergs.de> References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <1445624932011-4857648.post@n4.nabble.com> <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> <3B866FC5-1A70-4ADE-AD0C-9AC11ADAAB23@freudenbergs.de> Message-ID: Bert Freudenberg wrote on Mon, 26 Oct 2015 00:51:55 +0100: > > On 24.10.2015, at 19:15, tim Rowledge wrote: > >> On 23-10-2015, at 11:28 AM, marcel.taeumel wrote: > >> > >> The image looks like the 1.1 on our FTP (http://ftp.squeak.org/1.1/) but it > >> will not open with the Windows VM from then. Was the image format somewhat > >> different between Windows/Mac back then? > > > > No, the image *format* was the same but the image was originally pretty solidly > > Mac specific until Andreas added support for Windows, Ian added it for *nix and > > I added it for RISC OS. It?s possible that image you have there simply predates > > any of that. Wasn't one of your RISC OS additions the ability to load images saved in the opposite "endian"? I would guess that any VMs (Mac, Windows and Unix) before that would be more picky about what images they could load, though a newer VM could easily be used to create the needed image. > The image on the website is 1.1w meaning it has the WindowsFileDirectory class > which is needed to make it work on the Windows VM (it supports Mac and Windows). > IIRC it lacks the UnixFileDir though (those are labeled ?...u?). > > John?s image only has MacFileDirectory, so I think this is actually the oldest released > image found so far, and we should put it on the website. > > Would be fun if someone looked at the changes file time stamps to reconstruct the > evolution of early Squeak images ... The first image I ever saw was 1.13 until the relicensed 1.1 was released about 10 years later. I think that individual methods didn't have timestaps before 2.2 or so, but all the times the image was saved would be indicated in the .changes files and that should be good enough. It might even be possible to continue tracing back the evolution to the Apple Smalltalk and then Xerox Smalltalk this way. -- Jecel From bert at freudenbergs.de Wed Oct 28 11:19:29 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 28 11:19:36 2015 Subject: [squeak-dev] Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <1445624932011-4857648.post@n4.nabble.com> <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> <3B866FC5-1A70-4ADE-AD0C-9AC11ADAAB23@freudenbergs.de> Message-ID: <6F1E654B-C080-4016-B593-17D53FEF3DDC@freudenbergs.de> > On 28.10.2015, at 02:35, Jecel Assumpcao Jr. wrote: > > Bert Freudenberg wrote on Mon, 26 Oct 2015 00:51:55 +0100: >>> On 24.10.2015, at 19:15, tim Rowledge wrote: >>>> On 23-10-2015, at 11:28 AM, marcel.taeumel wrote: >>>> >>>> The image looks like the 1.1 on our FTP (http://ftp.squeak.org/1.1/) but it >>>> will not open with the Windows VM from then. Was the image format somewhat >>>> different between Windows/Mac back then? >>> >>> No, the image *format* was the same but the image was originally pretty solidly >>> Mac specific until Andreas added support for Windows, Ian added it for *nix and >>> I added it for RISC OS. It?s possible that image you have there simply predates >>> any of that. > > Wasn't one of your RISC OS additions the ability to load images saved in > the opposite "endian"? I would guess that any VMs (Mac, Windows and > Unix) before that would be more picky about what images they could load, > though a newer VM could easily be used to create the needed image. I thought Ian created that ? we should write up an article about the early community history of Squeak. >> The image on the website is 1.1w meaning it has the WindowsFileDirectory class >> which is needed to make it work on the Windows VM (it supports Mac and Windows). >> IIRC it lacks the UnixFileDir though (those are labeled ?...u?). >> >> John?s image only has MacFileDirectory, so I think this is actually the oldest released >> image found so far, and we should put it on the website. >> >> Would be fun if someone looked at the changes file time stamps to reconstruct the >> evolution of early Squeak images ... > > The first image I ever saw was 1.13 until the relicensed 1.1 was > released about 10 years later. I think that individual methods didn't > have timestaps before 2.2 or so, but all the times the image was saved > would be indicated in the .changes files and that should be good enough. > It might even be possible to continue tracing back the evolution to the > Apple Smalltalk and then Xerox Smalltalk this way. I have a pre-release Squeak image from May 20 1996 (image format version 6501) but I?m not entirely sure of its licensing status ? - 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/20151028/a5eefcfd/smime.bin From bert at freudenbergs.de Wed Oct 28 11:38:12 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 28 11:38:19 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Message-ID: On 28.10.2015, at 00:25, Eliot Miranda wrote: > On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: >> >> >> That'll waste all the memory in your Pi... > > No it won't :). First there's a gigabyte of ran on a Pi. You?re thinking of the Pi 2. The original Pi had 256 MB or 512 MB, and it sold by the millions: https://www.raspberrypi.org/documentation/hardware/raspberrypi/models/specs.md Once all of Linux and X11 is loaded there is not much RAM left. The Pi 2 was only introduced this year. - 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/20151028/3eba7807/smime.bin From hannes.hirzel at gmail.com Wed Oct 28 12:00:14 2015 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Wed Oct 28 12:00:16 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Message-ID: How much memory would these cached menus use ? (estimate) On 10/28/15, Bert Freudenberg wrote: > On 28.10.2015, at 00:25, Eliot Miranda wrote: >> On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: >>> >>> >>> That'll waste all the memory in your Pi... >> >> No it won't :). First there's a gigabyte of ran on a Pi. > > You?re thinking of the Pi 2. The original Pi had 256 MB or 512 MB, and it > sold by the millions: > > https://www.raspberrypi.org/documentation/hardware/raspberrypi/models/specs.md > > Once all of Linux and X11 is loaded there is not much RAM left. > > The Pi 2 was only introduced this year. > > - Bert - > > From Das.Linux at gmx.de Wed Oct 28 12:01:56 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 28 12:01:58 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Message-ID: <5E512237-A75A-4F2E-B16D-ED0F80752B42@gmx.de> On 28.10.2015, at 13:00, H. Hirzel wrote: > How much memory would these cached menus use ? (estimate) Nobody knows 'cause I haven't implemented them, yet;) Best regards -Tobias > > On 10/28/15, Bert Freudenberg wrote: >> On 28.10.2015, at 00:25, Eliot Miranda wrote: >>> On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: >>>> >>>> >>>> That'll waste all the memory in your Pi... >>> >>> No it won't :). First there's a gigabyte of ran on a Pi. >> >> You?re thinking of the Pi 2. The original Pi had 256 MB or 512 MB, and it >> sold by the millions: >> >> https://www.raspberrypi.org/documentation/hardware/raspberrypi/models/specs.md >> >> Once all of Linux and X11 is loaded there is not much RAM left. >> >> The Pi 2 was only introduced this year. >> >> - Bert - From asqueaker at gmail.com Wed Oct 28 15:05:50 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 28 15:05:53 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Message-ID: If we have to cache menus and introduce some "cache-flushing algorithm" merely for performance, then I think its a sign that we should do a critical re-evaluation of the pragma-based preferences. I'm starting to think the negative aspects they've brought to Preference management within the system outweigh their positives, when compared to simple object structures accessed by a unified API.. On Tue, Oct 27, 2015 at 6:25 PM, Eliot Miranda wrote: > Hi Chris, > > _,,,^..^,,,_ (phone) > >> On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: >> >> Tim, Squeak is a complex system, with a lot of functions and a complex >> interaction between human and machine. No system like that is going >> to be the toddler-coddler you want it to be. >> >>>>> Part of it is likely because of the confusion inherent to having two separate UI systems that aren?t quite separate. For example StringHolder class>>#yellowButtonMenuItems includes >>>>> {'make project link (P)' translated. #makeProjectLink}. >>>>> which >>>>> a) annoyed me because I want to use cmd-shift-p for my printItHex >> >> So override it, you have a "live" system. The code IS the >> user-interface, just as much as the menus are... >> >>>>> Ideally menus should be pre-built and cached, with some cache-flushing algorithm connected to anything that changes what should be in them. Such as adding a new menu related pragma. >> >> That'll waste all the memory in your Pi... > > No it won't :). First there's a gigabyte of ran on a Pi. Second, if the menu system saves the symbolic firm of the menu rather than the rendered but so it should be quite compact. > > From Das.Linux at gmx.de Wed Oct 28 15:41:17 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 28 15:41:17 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> Message-ID: <4F1E2E7A-10C5-492B-9D5B-39C6932868CD@gmx.de> Hi, On 28.10.2015, at 16:05, Chris Muller wrote: > If we have to cache menus and introduce some "cache-flushing > algorithm" merely for performance, then I think its a sign that we > should do a critical re-evaluation of the pragma-based preferences. > I'm starting to think the negative aspects they've brought to > Preference management within the system outweigh their positives, when > compared to simple object structures accessed by a unified API.. I don't agree. There'll always be a cache you have to remember to flush. In fact, the Preferences are a cache even without the pragma prefs. Best regards -Tobias > > On Tue, Oct 27, 2015 at 6:25 PM, Eliot Miranda wrote: >> Hi Chris, >> >> _,,,^..^,,,_ (phone) >> >>> On Oct 21, 2015, at 6:29 PM, Chris Muller wrote: >>> >>> Tim, Squeak is a complex system, with a lot of functions and a complex >>> interaction between human and machine. No system like that is going >>> to be the toddler-coddler you want it to be. >>> >>> >>> So override it, you have a "live" system. The code IS the >>> user-interface, just as much as the menus are... >>> >>> >>> That'll waste all the memory in your Pi... >> >> No it won't :). First there's a gigabyte of ran on a Pi. Second, if the menu system saves the symbolic firm of the menu rather than the rendered but so it should be quite compact. From tim at rowledge.org Wed Oct 28 17:13:48 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Oct 28 17:13:55 2015 Subject: [squeak-dev] Does anyone have the original Squeak 1.x Mac releases? In-Reply-To: <6F1E654B-C080-4016-B593-17D53FEF3DDC@freudenbergs.de> References: <1100550119.911068.1445451941935.JavaMail.yahoo@mail.yahoo.com> <1445459231862-4857150.post@n4.nabble.com> <708941900.1053511.1445477488646.JavaMail.yahoo@mail.yahoo.com> <1445624932011-4857648.post@n4.nabble.com> <4EED6161-C808-47BF-8FE6-0B98E2D62A3E@rowledge.org> <3B866FC5-1A70-4ADE-AD0C-9AC11ADAAB23@freudenbergs.de> <6F1E654B-C080-4016-B593-17D53FEF3DDC@freudenbergs.de> Message-ID: <5A6DADCD-46D9-45D0-9726-4C4623C4C77F@rowledge.org> > On 28-10-2015, at 4:19 AM, Bert Freudenberg wrote: > I thought Ian created that ? we should write up an article about the early community history of Squeak. I think Ian did the first approach, Andreas added some stuff and I added some simplistifications. We could actually get rid of it these days since there are no interesting big-endian cpus anymore. :-) And we should get rid of the big-endian bitmaps too. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Life would be much easier if I had the source code. From ma.chris.m at gmail.com Wed Oct 28 17:41:07 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Oct 28 17:41:50 2015 Subject: [squeak-dev] Menus and cmd keys considered quite, quite, mad In-Reply-To: <4F1E2E7A-10C5-492B-9D5B-39C6932868CD@gmx.de> References: <561EFD5E-AAF2-4DC4-929A-63C3A987E4F9@rowledge.org> <3954D98D-AE3C-4F35-AFB8-EB148B380132@gmx.de> <7B4CD360-24E4-4450-A7BF-769C4BDB55E2@gmail.com> <4F1E2E7A-10C5-492B-9D5B-39C6932868CD@gmx.de> Message-ID: > > > If we have to cache menus and introduce some "cache-flushing > > algorithm" merely for performance, then I think its a sign that we > > should do a critical re-evaluation of the pragma-based preferences. > > I'm starting to think the negative aspects they've brought to > > Preference management within the system outweigh their positives, when > > compared to simple object structures accessed by a unified API.. > > I don't agree. There'll always be a cache you have to remember to flush. > In fact, the Preferences are a cache even without the pragma prefs. > Preferences never needs to be "flushed". Why? Because its an original model, not a cache. A "cache" is extranneous -- on TOP of original models, for purposes of performance.. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151028/7d4519ec/attachment.htm From tim at rowledge.org Wed Oct 28 23:45:46 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Oct 28 23:45:51 2015 Subject: [squeak-dev] image startup complications Message-ID: <859BE612-46D6-40B7-A94B-ECC40B023399@rowledge.org> One of the things that running Squeak in the vm simulator will teach you is that we have a lot of stuff going on during system startup. A slow startup might not seem like a big deal when you?re running on a fast machine (because it will be less-slow, duh) or planning to keep running for a while. However, on a slow machine (Pi, for example) or when you are trying to quickly spin up a wotsit for Docker (or other fashionable SaaS thingummy) the slowness can be a real annoyance. As an example, I?ve just fired up an image under the vm sim to test a new CPIC design. After a lot of whirring you tend to get worried that something is recursively recursing and otherwise going around and around chasing its own tail recursion. So you interrupt to see where things are and ? oh, yeah, going around and around in something to do with X. Proceed, wait a while, look again.. same stuff? In this case it prompted me to look at MenuIcon initializeTranslations. What happens here is that the class MenuIcons is running down all the registered menu item icons to translate the attached strings. This involves a great deal of work to find the correct domain(s) to do the translating, potentially reading many files to build dictionaries etc. I have to do much the same in Scratch - and indeed probably ought to rework that to use the latest stuff. Part of the job here is to find the translator for the current locale. See NaturalLanguageTranslator class>availableForLocaleID: where we check the list of known translators and if nothing is found, check for the parent of the requested locale, and if still nothing return a default. The problem is that finding the parent involves a long search which seems to mainly return a locale the same as the not-found one which of course is itself not found. So then we find the default - which involves making a new translator and going via that same long search. Because this newly made default translator is not saved we go through this for every single string that wants a translation. I tallied the work and on a Pi with Cog VM it takes 373mS - 1/3rd of a second each time we start an image. On my iMac it?s only 37mS, which may seem too trivial to worry about but remember this is only one of many startup operations. So, what to do? Well simply saving the new default translator back into the list of known translators - which I really suspect is what the original authors intended to do since it?s such an obvious thing - the time is cut to less than 1/5th, or 62mS. Since I?m not at all expert in the workings of the translation code I don?t want to just commit this. It really is a trivial change- NaturalLanguageTranslator class>>#availableForLocaleID: availableForLocaleID: localeID "Answer available locale ID. If translator is not found for correct locale ID, then isoLanguage is attempted for the key." ^ self translators at: localeID ifAbsent: [localeID hasParent ifTrue: [self translators at: localeID parent ifAbsent: [self translators at: localeID put: self default]] ifFalse: [self translators at: localeID put: self default]] There?s a *lot* of senders of #translated that this will give a little boost to. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim All computers run at the same speed...with the power off. From commits at source.squeak.org Thu Oct 29 00:06:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 00:06:34 2015 Subject: [squeak-dev] The Inbox: System-topa.775.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-topa.775.mcz ==================== Summary ==================== Name: System-topa.775 Author: topa Time: 29 October 2015, 1:06:23.749 am UUID: a2ad05e2-8cf3-4974-84c4-7a5d93e304e3 Ancestors: System-ul.774 Cache NaturalLanguageTranslator when looking up yet inexisting ones. Induced by tim Rowledge (see http://forum.world.st/image-startup-complications-td4858390.html) =============== Diff against System-ul.774 =============== Item was changed: ----- Method: NaturalLanguageTranslator class>>availableForLocaleID: (in category 'accessing') ----- availableForLocaleID: localeID "Answer available locale ID. If translator is not found for correct locale ID, then isoLanguage is attempted for the key." ^ self translators at: localeID + ifAbsentPut: [localeID hasParent - ifAbsent: [localeID hasParent ifTrue: [self translators at: localeID parent ifAbsent: [self default]] ifFalse: [self default]]! From Das.Linux at gmx.de Thu Oct 29 00:07:45 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 29 00:07:42 2015 Subject: [squeak-dev] The Inbox: System-topa.775.mcz Message-ID: <18DB368D-B90C-4291-9607-70D82A85F27C@gmx.de> Hey tim, regarding "image startup complications", does this fit your needS? Best regards -Tobias On 29.10.2015, at 00:06, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of System to project The Inbox: > http://source.squeak.org/inbox/System-topa.775.mcz > > ==================== Summary ==================== > > Name: System-topa.775 > Author: topa > Time: 29 October 2015, 1:06:23.749 am > UUID: a2ad05e2-8cf3-4974-84c4-7a5d93e304e3 > Ancestors: System-ul.774 > > Cache NaturalLanguageTranslator when looking up yet inexisting ones. > > Induced by tim Rowledge > (see http://forum.world.st/image-startup-complications-td4858390.html) > > =============== Diff against System-ul.774 =============== > > Item was changed: From tim at rowledge.org Thu Oct 29 00:12:59 2015 From: tim at rowledge.org (tim Rowledge) Date: Thu Oct 29 00:13:08 2015 Subject: [squeak-dev] The Inbox: System-topa.775.mcz In-Reply-To: <18DB368D-B90C-4291-9607-70D82A85F27C@gmx.de> References: <18DB368D-B90C-4291-9607-70D82A85F27C@gmx.de> Message-ID: <464CF7F9-565A-49A3-888F-E51141149678@rowledge.org> > On 28-10-2015, at 5:07 PM, Tobias Pape wrote: > > Hey tim, > > regarding "image startup complications", does this fit your needS? Looks like it; I forgot about the at:ifAbsentPut: stuff. Thanks. Now there?s just another gazillion similar things to fix? :-) tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Mind like a steel sieve. From lewis at mail.msen.com Thu Oct 29 01:04:53 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 29 01:04:55 2015 Subject: [squeak-dev] The Inbox: System-topa.775.mcz In-Reply-To: <18DB368D-B90C-4291-9607-70D82A85F27C@gmx.de> References: <18DB368D-B90C-4291-9607-70D82A85F27C@gmx.de> Message-ID: <20151029010453.GA2704@shell.msen.com> It looks right to me, please move to trunk :-) Dave On Thu, Oct 29, 2015 at 01:07:45AM +0100, Tobias Pape wrote: > Hey tim, > > regarding "image startup complications", does this fit your needS? > > Best regards > -Tobias > > On 29.10.2015, at 00:06, commits@source.squeak.org wrote: > > > Tobias Pape uploaded a new version of System to project The Inbox: > > http://source.squeak.org/inbox/System-topa.775.mcz > > > > ==================== Summary ==================== > > > > Name: System-topa.775 > > Author: topa > > Time: 29 October 2015, 1:06:23.749 am > > UUID: a2ad05e2-8cf3-4974-84c4-7a5d93e304e3 > > Ancestors: System-ul.774 > > > > Cache NaturalLanguageTranslator when looking up yet inexisting ones. > > > > Induced by tim Rowledge > > (see http://forum.world.st/image-startup-complications-td4858390.html) > > > > =============== Diff against System-ul.774 =============== > > > > Item was changed: > > > From commits at source.squeak.org Thu Oct 29 01:13:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 01:13:05 2015 Subject: [squeak-dev] The Trunk: System-topa.775.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.775.mcz ==================== Summary ==================== Name: System-topa.775 Author: topa Time: 29 October 2015, 1:06:23.749 am UUID: a2ad05e2-8cf3-4974-84c4-7a5d93e304e3 Ancestors: System-ul.774 Cache NaturalLanguageTranslator when looking up yet inexisting ones. Induced by tim Rowledge (see http://forum.world.st/image-startup-complications-td4858390.html) =============== Diff against System-ul.774 =============== Item was changed: ----- Method: NaturalLanguageTranslator class>>availableForLocaleID: (in category 'accessing') ----- availableForLocaleID: localeID "Answer available locale ID. If translator is not found for correct locale ID, then isoLanguage is attempted for the key." ^ self translators at: localeID + ifAbsentPut: [localeID hasParent - ifAbsent: [localeID hasParent ifTrue: [self translators at: localeID parent ifAbsent: [self default]] ifFalse: [self default]]! From commits at source.squeak.org Thu Oct 29 12:09:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 12:09:35 2015 Subject: [squeak-dev] The Trunk: Morphic-kfr.1019.mcz Message-ID: Karl Ramberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1019.mcz ==================== Summary ==================== Name: Morphic-kfr.1019 Author: kfr Time: 27 October 2015, 5:21:35.825 pm UUID: 440773d3-8bad-4232-b989-60c0a6dfb1f0 Ancestors: Morphic-mt.1018 Adds a GradientEditor for morphic =============== Diff against Morphic-mt.1018 =============== Item was added: + RectangleMorph subclass: #GradientDisplayMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Widgets'! Item was added: + ----- Method: GradientDisplayMorph>>colorRamp (in category 'as yet unclassified') ----- + colorRamp + ^self fillStyle colorRamp! Item was added: + ----- Method: GradientDisplayMorph>>colorRamp: (in category 'as yet unclassified') ----- + colorRamp: aColorRamp + self fillStyle colorRamp: aColorRamp! Item was added: + ----- Method: GradientDisplayMorph>>drawOn: (in category 'as yet unclassified') ----- + drawOn: aCanvas + "Draw a hatch pattern first." + aCanvas + fillRectangle: self innerBounds + fillStyle: (InfiniteForm with: ColorPresenterMorph hatchForm). + super drawOn: aCanvas! Item was added: + ----- Method: GradientDisplayMorph>>initialize (in category 'as yet unclassified') ----- + initialize + | fill colorRamp | + super initialize. + "self hResizing: #spaceFill. " + colorRamp := {0.0 -> Color green. 0.3 -> Color red. 0.7 -> Color black. 1.0 -> Color blue}. + fill := GradientFillStyle ramp: colorRamp. + fill origin: 0@0. + fill direction: self bounds extent x @ 0. + fill radial: false. + self fillStyle: fill! Item was added: + RectangleMorph subclass: #GradientEditor + instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch gradientMorph row text target selector morph' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Widgets'! Item was added: + ----- Method: GradientEditor class>>on:selector:forMorph:colorRamp: (in category 'as yet unclassified') ----- + on: aTarget selector: aSelector forMorph: aMorph colorRamp: aColorRamp + ^self new + setTarget: aTarget + selector: aSelector + forMorph: aMorph + colorRamp: aColorRamp. + + ! Item was added: + ----- Method: GradientEditor>>addButtonRow (in category 'initialization') ----- + addButtonRow + | button button2 buttonRow button4 | + buttonRow := RectangleMorph new extent: self width @ 30; + borderWidth: 0; color: Color transparent. + buttonRow layoutPolicy: TableLayout new; + cellPositioning: #center; + listCentering: #topLeft; + listDirection: #LeftToRight; + reverseTableCells: true; + cellInset: 20 @ 20. + + button := SimpleButtonMorph new target: self; + label: 'Add color'; + actionSelector: #addHandle. + buttonRow addMorph: button. + + button2 := SimpleButtonMorph new target: self; + label: 'Remove color'; + actionSelector: #deleteHandle. + buttonRow addMorph: button2. + + button4 := SimpleButtonMorph new target: self; + label: 'Close'; + actionSelector: #delete. + buttonRow addMorph: button4. + + self addMorph: buttonRow! Item was added: + ----- Method: GradientEditor>>addHandle (in category 'change reporting') ----- + addHandle + | handleInstance colorIcon | + handleInstance := self handle. + colorIcon := SketchMorph + withForm: ((Color random value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. + self eventHandler: colorIcon target: colorIcon. + self eventHandler: handleInstance target: self. + row addMorph: handleInstance. + handleInstance position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay top - 18). + handleInstance addMorph: colorIcon. + rampMorphs addLast: handleInstance. + colorIcon position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay bottom + 5). + self updateColorRamp! Item was added: + ----- Method: GradientEditor>>addHandles (in category 'initialization') ----- + addHandles + | handle handleInstance colorIcon colorRamp | + rampMorphs := OrderedCollection new. + colorRamp := self gradientDisplay colorRamp asOrderedCollection. + handle := self handle. + colorRamp + do: [:i | + colorIcon := SketchMorph + withForm: ((i value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. + self eventHandler: colorIcon target: colorIcon. + handleInstance := handle copy. + self eventHandler: handleInstance target: self. + row addMorph: handleInstance. + handleInstance position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay top - 18). + handleInstance addMorph: colorIcon. + rampMorphs addLast: handleInstance. + colorIcon position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay bottom + 5)]. + self changed.! Item was added: + ----- Method: GradientEditor>>changeColor:event:target: (in category 'change reporting') ----- + changeColor: aSketchMorph event: evt target: aMorph + | newColor | + newColor := aSketchMorph rotatedForm colorAt: aSketchMorph rotatedForm center. + selectedSketch := aSketchMorph. + self changeColorTarget: self selector: #updateColor: originalColor: newColor value hand: evt hand. + ! Item was added: + ----- Method: GradientEditor>>colorRamp (in category 'accessing') ----- + colorRamp + | i string | + string := gradientDisplay fillStyle colorRamp asOrderedCollection printString. + i := string indexOf:$(. + ^string copyFrom: i to: string size! Item was added: + ----- Method: GradientEditor>>colorRamp: (in category 'accessing') ----- + colorRamp: aColorRamp + + "rampMorphs do:[ :i | rampMorphs remove:i. row removeMorph: i . ]. + self changed." + gradientDisplay colorRamp: aColorRamp. + self addHandles. + ! Item was added: + ----- Method: GradientEditor>>deleteHandle (in category 'change reporting') ----- + deleteHandle + rampMorphs do:[ :i | (i color == Color red) ifTrue:[ rampMorphs remove: i. row removeMorph: i]]. + self updateColorRamp + + ! Item was added: + ----- Method: GradientEditor>>eventHandler:target: (in category 'event handling') ----- + eventHandler: anInstance target: aTarget + (anInstance isKindOf: SketchMorph) + ifTrue:[anInstance on: #mouseUp + send: #changeColor:event:target: + to: self withValue: aTarget] + ifFalse:[anInstance on: #mouseDown + send: #limitHandleMove:event:from: + to: self withValue: aTarget. + anInstance on: #mouseMove + send: #limitHandleMove:event:from: + to: self withValue: aTarget]! Item was added: + ----- Method: GradientEditor>>gradientDisplay (in category 'accessing') ----- + gradientDisplay + ^gradientDisplay! Item was added: + ----- Method: GradientEditor>>handle (in category 'initialization') ----- + handle + | handle | + handle := PolygonMorph + vertices: (Array + with: 0 @ 0 + with: 16 @ 0 + with: 8 @ 16) + color: Color gray + borderWidth: 1 + borderColor: Color black. + ^handle + addMorph: ((RectangleMorph + newBounds: (8 @ 18 extent: 1 @ (gradientDisplay height - 2)) + color: Color orange) + borderWidth: 0).! Item was added: + ----- Method: GradientEditor>>initialize (in category 'initialization') ----- + initialize + + super initialize. + self myLayout. + self extent: 600 @ 150. + row := RectangleMorph new extent: self width @ 100. + + row addMorph: (gradientDisplay := GradientDisplayMorph new position: 20 @ 20; + extent: self width - 40 @ 40). + gradientDisplay fillStyle direction: gradientDisplay width @ 0. + "self addHandles." + self addMorph: row. + self addButtonRow. + text := PluggableTextMorph + on: self + text: #colorRamp + accept: nil + readSelection: nil + menu: nil. + text color: Color white; + width: self width; + height: 50. + self addMorph: text. + ! Item was added: + ----- Method: GradientEditor>>limitHandleMove:event:from: (in category 'change reporting') ----- + limitHandleMove: association event: evt from: handle + | p newBounds | + rampMorphs do:[ : i | i color: Color gray]. + newBounds := gradientDisplay bounds. + newBounds := (newBounds left: (newBounds left - 10)). + newBounds := (newBounds right: (newBounds right - 10)). + p := evt cursorPoint adhereTo: newBounds. + handle position: (p x )@ (handle position y). + handle color: Color red. + self updateColorRamp! Item was added: + ----- Method: GradientEditor>>morph: (in category 'accessing') ----- + morph: aMorph + ^morph := aMorph! Item was added: + ----- Method: GradientEditor>>myLayout (in category 'initialization') ----- + myLayout + self layoutPolicy: TableLayout new; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + cellPositioning: #center; + listCentering: #topLeft; + layoutInset: 10@10; + listDirection: #topToBottom; + reverseTableCells: true; + wrapCentering: #topLeft; + cellInset: 19 @ 10! Item was added: + ----- Method: GradientEditor>>selector: (in category 'accessing') ----- + selector: aSelector + ^selector := aSelector! Item was added: + ----- Method: GradientEditor>>setTarget:selector:forMorph:colorRamp: (in category 'initialization') ----- + setTarget: aTarget selector: aSelector forMorph:aMorph colorRamp: aColorRamp + + self target: aTarget. + self selector: aSelector. + self morph: aMorph. + self colorRamp: aColorRamp. + + ! Item was added: + ----- Method: GradientEditor>>target: (in category 'accessing') ----- + target: aTarget + ^target := aTarget! Item was added: + ----- Method: GradientEditor>>updateColor: (in category 'change reporting') ----- + updateColor: aColor + selectedSketch rotatedForm floodFill: aColor at: selectedSketch rotatedForm center. + self updateColorRamp + ! Item was added: + ----- Method: GradientEditor>>updateColorRamp (in category 'change reporting') ----- + updateColorRamp + | newAssociation newKey newColor sketch colorRamp | + + self updateRampMorphs. + colorRamp := OrderedCollection new. + rampMorphs + do: [:i | + newKey := ((i position x - gradientDisplay left / gradientDisplay width) asFloat roundUpTo: 0.01) + min: 1.0 + max: 0.0. + sketch := i findA: SketchMorph. + newColor := sketch rotatedForm colorAt: sketch rotatedForm center. + newAssociation := newKey -> newColor. + colorRamp addLast: newAssociation]. + colorRamp := colorRamp sorted. + gradientDisplay colorRamp: colorRamp. + gradientDisplay fillStyle direction: gradientDisplay extent x @ 0. + self changed. + target ifNotNil:[ + target perform: selector + with: colorRamp + with: morph]. + text setText: self colorRamp! Item was added: + ----- Method: GradientEditor>>updateRampMorphs (in category 'change reporting') ----- + updateRampMorphs + rampMorphs do:[ :i | i isInWorld ifFalse:[ rampMorphs remove: i]]! Item was changed: ----- Method: GradientFillStyle>>addFillStyleMenuItems:hand:from: (in category '*Morphic-Balloon') ----- addFillStyleMenuItems: aMenu hand: aHand from: aMorph "Add the items for changing the current fill style of the receiver" self isRadialFill ifTrue:[ aMenu add: 'linear gradient' translated target: self selector: #beLinearGradientIn: argument: aMorph. ] ifFalse:[ aMenu add: 'radial gradient' translated target: self selector: #beRadialGradientIn: argument: aMorph. ]. aMenu addLine. + aMenu add: 'change color ramp' translated target: self selector: #changeColorRampIn:event: argument: aMorph. - aMenu add: 'change first color' translated target: self selector: #changeFirstColorIn:event: argument: aMorph. - aMenu add: 'change second color' translated target: self selector: #changeSecondColorIn:event: argument: aMorph. aMenu addLine. super addFillStyleMenuItems: aMenu hand: aHand from: aMorph.! Item was added: + ----- Method: GradientFillStyle>>changeColorRampIn:event: (in category '*Morphic-Balloon') ----- + changeColorRampIn: aMorph event: evt + ^self changeColorSelector: #colorRamp:forMorph: hand: evt hand morph: aMorph originalColor:aMorph fillStyle colorRamp! Item was changed: ----- Method: GradientFillStyle>>changeColorSelector:hand:morph:originalColor: (in category '*Morphic-Balloon') ----- changeColorSelector: aSymbol hand: aHand morph: aMorph originalColor: originalColor "Change either the firstColor or the lastColor (depending on aSymbol). Put up a color picker to hande it. We always use a modal picker so that the user can adjust both colors concurrently." + + ^(GradientEditor on: self selector: aSymbol forMorph: aMorph colorRamp: originalColor) openNear: aMorph fullBoundsInWorld. + + + "NewColorPickerMorph useIt - NewColorPickerMorph useIt ifTrue: [ (NewColorPickerMorph on: self originalColor: originalColor setColorSelector: aSymbol) openNear: aMorph fullBoundsInWorld ] ifFalse: [ ColorPickerMorph new initializeModal: false ; sourceHand: aHand ; target: self ; selector: aSymbol ; argument: aMorph ; originalColor: originalColor ; putUpFor: aMorph + near: aMorph fullBoundsInWorld ]"! - near: aMorph fullBoundsInWorld ]! Item was added: + ----- Method: GradientFillStyle>>colorRamp:forMorph: (in category '*Morphic-Balloon') ----- + colorRamp: aColorRamp forMorph: aMorph + colorRamp :=aColorRamp. + isTranslucent := nil. + pixelRamp := nil. + aMorph changed.! From commits at source.squeak.org Thu Oct 29 12:10:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 12:10:29 2015 Subject: [squeak-dev] The Trunk: Morphic-kfr.1020.mcz Message-ID: Karl Ramberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1020.mcz ==================== Summary ==================== Name: Morphic-kfr.1020 Author: kfr Time: 27 October 2015, 10:51:37.134 pm UUID: d667bea0-4b77-4166-92db-ed20188194c0 Ancestors: Morphic-kfr.1019 Fixing =============== Diff against Morphic-kfr.1019 =============== Item was changed: ----- Method: GradientEditor>>addHandle (in category 'change reporting') ----- addHandle + self addHandleForColor: Color random position: 0.5. - | handleInstance colorIcon | - handleInstance := self handle. - colorIcon := SketchMorph - withForm: ((Color random value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. - self eventHandler: colorIcon target: colorIcon. - self eventHandler: handleInstance target: self. - row addMorph: handleInstance. - handleInstance position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay top - 18). - handleInstance addMorph: colorIcon. - rampMorphs addLast: handleInstance. - colorIcon position: gradientDisplay left - 10 + (gradientDisplay width // 2) @ (gradientDisplay bottom + 5). self updateColorRamp! Item was added: + ----- Method: GradientEditor>>addHandleForColor:position: (in category 'change reporting') ----- + addHandleForColor: aColor position: aPosition + | handleInstance colorIcon delta | + handleInstance := self handle. + colorIcon := SketchMorph + withForm: ((aColor iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. + self eventHandler: colorIcon target: colorIcon. + self eventHandler: handleInstance target: self. + row addMorph: handleInstance. + delta := gradientDisplay left - 10 + (gradientDisplay width * aPosition). + handleInstance position: delta @ (gradientDisplay top - 18). + colorIcon position: delta @ (gradientDisplay bottom + 5). + handleInstance addMorph: colorIcon. + rampMorphs addLast: handleInstance. + + ! Item was changed: + ----- Method: GradientEditor>>addHandles (in category 'change reporting') ----- - ----- Method: GradientEditor>>addHandles (in category 'initialization') ----- addHandles + | handle colorRamp | - | handle handleInstance colorIcon colorRamp | rampMorphs := OrderedCollection new. colorRamp := self gradientDisplay colorRamp asOrderedCollection. handle := self handle. colorRamp do: [:i | + self addHandleForColor: i value position: i key + ]. + - colorIcon := SketchMorph - withForm: ((i value iconOrThumbnailOfSize: 20) borderWidth: 1 color: Color black).. - self eventHandler: colorIcon target: colorIcon. - handleInstance := handle copy. - self eventHandler: handleInstance target: self. - row addMorph: handleInstance. - handleInstance position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay top - 18). - handleInstance addMorph: colorIcon. - rampMorphs addLast: handleInstance. - colorIcon position: gradientDisplay left - 10 + (gradientDisplay width * i key) @ (gradientDisplay bottom + 5)]. self changed.! From commits at source.squeak.org Thu Oct 29 12:10:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 12:10:51 2015 Subject: [squeak-dev] The Trunk: Morphic-kfr.1021.mcz Message-ID: Karl Ramberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1021.mcz ==================== Summary ==================== Name: Morphic-kfr.1021 Author: kfr Time: 28 October 2015, 6:07:53.098 pm UUID: 6ece13c6-b1e4-4cd1-a039-1d57ba351644 Ancestors: Morphic-kfr.1020 Adopted look more like NewColorPicker =============== Diff against Morphic-kfr.1020 =============== Item was changed: ----- Method: GradientEditor>>addButtonRow (in category 'initialization') ----- addButtonRow + | button button2 buttonRow button3 | + buttonRow := RectangleMorph new borderWidth: 0; + color: Color transparent; + layoutPolicy: TableLayout new; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; - | button button2 buttonRow button4 | - buttonRow := RectangleMorph new extent: self width @ 30; - borderWidth: 0; color: Color transparent. - buttonRow layoutPolicy: TableLayout new; cellPositioning: #center; listCentering: #topLeft; listDirection: #LeftToRight; reverseTableCells: true; cellInset: 20 @ 20. + button := PluggableButtonMorph on: self + getState: nil + action: #addHandle + label: #addColorButtonLabel. - button := SimpleButtonMorph new target: self; - label: 'Add color'; - actionSelector: #addHandle. buttonRow addMorph: button. + button2 := PluggableButtonMorph on: self + getState: nil + action: #deleteHandle + label: #removeColorButtonLabel. - button2 := SimpleButtonMorph new target: self; - label: 'Remove color'; - actionSelector: #deleteHandle. buttonRow addMorph: button2. + button3 := PluggableButtonMorph on: self + getState: nil + action: #delete + label: #closeButtonLabel. + buttonRow addMorph: button3. - button4 := SimpleButtonMorph new target: self; - label: 'Close'; - actionSelector: #delete. - buttonRow addMorph: button4. self addMorph: buttonRow! Item was added: + ----- Method: GradientEditor>>addColorButtonLabel (in category 'initialization') ----- + addColorButtonLabel + ^ 'Add color' translated! Item was added: + ----- Method: GradientEditor>>closeButtonLabel (in category 'initialization') ----- + closeButtonLabel + ^ 'Close' translated! Item was changed: ----- Method: GradientEditor>>deleteHandle (in category 'change reporting') ----- deleteHandle + rampMorphs do:[ :i | (i color == Color black) ifTrue:[ rampMorphs remove: i. row removeMorph: i]]. - rampMorphs do:[ :i | (i color == Color red) ifTrue:[ rampMorphs remove: i. row removeMorph: i]]. self updateColorRamp ! Item was changed: ----- Method: GradientEditor>>handle (in category 'initialization') ----- handle | handle | handle := PolygonMorph vertices: (Array with: 0 @ 0 with: 16 @ 0 with: 8 @ 16) + color: (Color white darker) - color: Color gray borderWidth: 1 borderColor: Color black. ^handle addMorph: ((RectangleMorph newBounds: (8 @ 18 extent: 1 @ (gradientDisplay height - 2)) color: Color orange) borderWidth: 0).! Item was changed: ----- Method: GradientEditor>>initialize (in category 'initialization') ----- initialize super initialize. self myLayout. self extent: 600 @ 150. + row := RectangleMorph new extent: self width @ 100; color: Color transparent; borderColor: #inset. - row := RectangleMorph new extent: self width @ 100. row addMorph: (gradientDisplay := GradientDisplayMorph new position: 20 @ 20; extent: self width - 40 @ 40). gradientDisplay fillStyle direction: gradientDisplay width @ 0. + - "self addHandles." self addMorph: row. self addButtonRow. text := PluggableTextMorph on: self text: #colorRamp accept: nil readSelection: nil menu: nil. text color: Color white; width: self width; height: 50. self addMorph: text. ! Item was changed: ----- Method: GradientEditor>>limitHandleMove:event:from: (in category 'change reporting') ----- limitHandleMove: association event: evt from: handle | p newBounds | + rampMorphs do:[ : i | i color: (Color white darker)]. - rampMorphs do:[ : i | i color: Color gray]. newBounds := gradientDisplay bounds. newBounds := (newBounds left: (newBounds left - 10)). newBounds := (newBounds right: (newBounds right - 10)). + p := (evt cursorPoint - (10@0)) adhereTo: newBounds. - p := evt cursorPoint adhereTo: newBounds. handle position: (p x )@ (handle position y). + handle color: Color black. - handle color: Color red. self updateColorRamp! Item was changed: ----- Method: GradientEditor>>myLayout (in category 'initialization') ----- myLayout + self color: (Color white darker) ; + cornerStyle: #rounded ; + borderWidth: 0; + layoutPolicy: TableLayout new; - self layoutPolicy: TableLayout new; hResizing: #shrinkWrap; vResizing: #shrinkWrap; cellPositioning: #center; listCentering: #topLeft; + layoutInset: 4; - layoutInset: 10@10; listDirection: #topToBottom; reverseTableCells: true; wrapCentering: #topLeft; cellInset: 19 @ 10! Item was added: + ----- Method: GradientEditor>>removeColorButtonLabel (in category 'initialization') ----- + removeColorButtonLabel + ^ 'Remove color' translated! From commits at source.squeak.org Thu Oct 29 12:11:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 12:11:35 2015 Subject: [squeak-dev] The Trunk: Morphic-kfr.1022.mcz Message-ID: Karl Ramberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1022.mcz ==================== Summary ==================== Name: Morphic-kfr.1022 Author: kfr Time: 29 October 2015, 12:52:07.646 pm UUID: 64c8e8d1-462d-48e5-af29-706bd470f767 Ancestors: Morphic-kfr.1021 More look enhancements =============== Diff against Morphic-kfr.1021 =============== Item was changed: RectangleMorph subclass: #GradientEditor + instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch row text target selector morph' - instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch gradientMorph row text target selector morph' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Widgets'! Item was changed: ----- Method: GradientEditor>>addButtonRow (in category 'initialization') ----- addButtonRow | button button2 buttonRow button3 | buttonRow := RectangleMorph new borderWidth: 0; color: Color transparent; layoutPolicy: TableLayout new; + hResizing: #spaceFil; + vResizing: #spaceFill; - hResizing: #shrinkWrap; - vResizing: #shrinkWrap; cellPositioning: #center; listCentering: #topLeft; listDirection: #LeftToRight; reverseTableCells: true; + cellInset: 4. - cellInset: 20 @ 20. button := PluggableButtonMorph on: self getState: nil action: #addHandle label: #addColorButtonLabel. + button hResizing: #spaceFill; + vResizing: #spaceFill. buttonRow addMorph: button. button2 := PluggableButtonMorph on: self getState: nil action: #deleteHandle label: #removeColorButtonLabel. + button2 hResizing: #spaceFill; + vResizing: #spaceFill. buttonRow addMorph: button2. button3 := PluggableButtonMorph on: self getState: nil action: #delete label: #closeButtonLabel. + button3 hResizing: #spaceFill; + vResizing: #spaceFill. buttonRow addMorph: button3. self addMorph: buttonRow! Item was changed: ----- Method: GradientEditor>>initialize (in category 'initialization') ----- initialize super initialize. self myLayout. self extent: 600 @ 150. row := RectangleMorph new extent: self width @ 100; color: Color transparent; borderColor: #inset. row addMorph: (gradientDisplay := GradientDisplayMorph new position: 20 @ 20; extent: self width - 40 @ 40). gradientDisplay fillStyle direction: gradientDisplay width @ 0. self addMorph: row. self addButtonRow. + "text := PluggableTextMorph - text := PluggableTextMorph on: self text: #colorRamp accept: nil readSelection: nil menu: nil. text color: Color white; width: self width; height: 50. + self addMorph: text." - self addMorph: text. ! Item was changed: ----- Method: GradientEditor>>myLayout (in category 'initialization') ----- myLayout self color: (Color white darker) ; cornerStyle: #rounded ; borderWidth: 0; layoutPolicy: TableLayout new; hResizing: #shrinkWrap; vResizing: #shrinkWrap; cellPositioning: #center; listCentering: #topLeft; layoutInset: 4; listDirection: #topToBottom; reverseTableCells: true; wrapCentering: #topLeft; + cellInset: 4! - cellInset: 19 @ 10! Item was changed: ----- Method: GradientEditor>>updateColorRamp (in category 'change reporting') ----- updateColorRamp | newAssociation newKey newColor sketch colorRamp | self updateRampMorphs. colorRamp := OrderedCollection new. rampMorphs do: [:i | newKey := ((i position x - gradientDisplay left / gradientDisplay width) asFloat roundUpTo: 0.01) min: 1.0 max: 0.0. sketch := i findA: SketchMorph. newColor := sketch rotatedForm colorAt: sketch rotatedForm center. newAssociation := newKey -> newColor. colorRamp addLast: newAssociation]. colorRamp := colorRamp sorted. gradientDisplay colorRamp: colorRamp. gradientDisplay fillStyle direction: gradientDisplay extent x @ 0. self changed. target ifNotNil:[ target perform: selector with: colorRamp with: morph]. + "text setText: self colorRamp"! - text setText: self colorRamp! From karlramberg at gmail.com Thu Oct 29 12:35:15 2015 From: karlramberg at gmail.com (karl ramberg) Date: Thu Oct 29 12:35:18 2015 Subject: [squeak-dev] The Trunk: Morphic-kfr.1022.mcz In-Reply-To: <56320cfe.4306c20a.9ba6e.ffffd724SMTPIN_ADDED_MISSING@mx.google.com> References: <56320cfe.4306c20a.9ba6e.ffffd724SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: It should now be more feasible to remove some hard coded gradients in widgets like windows, buttons and menus. Many of them rely on one user selected color and to hard code the other to white for example. It should now be much easier to edit a gradient with more than 2 colors Karl On Thu, Oct 29, 2015 at 1:10 PM, wrote: > Karl Ramberg uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-kfr.1022.mcz > > ==================== Summary ==================== > > Name: Morphic-kfr.1022 > Author: kfr > Time: 29 October 2015, 12:52:07.646 pm > UUID: 64c8e8d1-462d-48e5-af29-706bd470f767 > Ancestors: Morphic-kfr.1021 > > More look enhancements > > =============== Diff against Morphic-kfr.1021 =============== > > Item was changed: > RectangleMorph subclass: #GradientEditor > + instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch > row text target selector morph' > - instanceVariableNames: 'gradientDisplay rampMorphs selectedSketch > gradientMorph row text target selector morph' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Widgets'! > > Item was changed: > ----- Method: GradientEditor>>addButtonRow (in category > 'initialization') ----- > addButtonRow > | button button2 buttonRow button3 | > buttonRow := RectangleMorph new borderWidth: 0; > color: Color transparent; > layoutPolicy: TableLayout new; > + hResizing: #spaceFil; > + vResizing: #spaceFill; > - hResizing: #shrinkWrap; > - vResizing: #shrinkWrap; > cellPositioning: #center; > listCentering: #topLeft; > listDirection: #LeftToRight; > reverseTableCells: true; > + cellInset: 4. > - cellInset: 20 @ 20. > > button := PluggableButtonMorph on: self > getState: nil > action: #addHandle > label: #addColorButtonLabel. > + button hResizing: #spaceFill; > + vResizing: #spaceFill. > buttonRow addMorph: button. > > button2 := PluggableButtonMorph on: self > getState: nil > action: #deleteHandle > label: #removeColorButtonLabel. > + button2 hResizing: #spaceFill; > + vResizing: #spaceFill. > buttonRow addMorph: button2. > > button3 := PluggableButtonMorph on: self > getState: nil > action: #delete > label: #closeButtonLabel. > + button3 hResizing: #spaceFill; > + vResizing: #spaceFill. > buttonRow addMorph: button3. > > self addMorph: buttonRow! > > Item was changed: > ----- Method: GradientEditor>>initialize (in category 'initialization') > ----- > initialize > > super initialize. > self myLayout. > self extent: 600 @ 150. > row := RectangleMorph new extent: self width @ 100; color: Color > transparent; borderColor: #inset. > > row addMorph: (gradientDisplay := GradientDisplayMorph new > position: 20 @ 20; > extent: self width - 40 @ 40). > gradientDisplay fillStyle direction: gradientDisplay width @ 0. > > self addMorph: row. > self addButtonRow. > + "text := PluggableTextMorph > - text := PluggableTextMorph > on: self > text: #colorRamp > accept: nil > readSelection: nil > menu: nil. > text color: Color white; > width: self width; > height: 50. > + self addMorph: text." > - self addMorph: text. > ! > > Item was changed: > ----- Method: GradientEditor>>myLayout (in category 'initialization') > ----- > myLayout > self color: (Color white darker) ; > cornerStyle: #rounded ; > borderWidth: 0; > layoutPolicy: TableLayout new; > hResizing: #shrinkWrap; > vResizing: #shrinkWrap; > cellPositioning: #center; > listCentering: #topLeft; > layoutInset: 4; > listDirection: #topToBottom; > reverseTableCells: true; > wrapCentering: #topLeft; > + cellInset: 4! > - cellInset: 19 @ 10! > > Item was changed: > ----- Method: GradientEditor>>updateColorRamp (in category 'change > reporting') ----- > updateColorRamp > | newAssociation newKey newColor sketch colorRamp | > > self updateRampMorphs. > colorRamp := OrderedCollection new. > rampMorphs > do: [:i | > newKey := ((i position x - gradientDisplay left / > gradientDisplay width) asFloat roundUpTo: 0.01) > min: 1.0 > max: 0.0. > sketch := i findA: SketchMorph. > newColor := sketch rotatedForm colorAt: sketch > rotatedForm center. > newAssociation := newKey -> newColor. > colorRamp addLast: newAssociation]. > colorRamp := colorRamp sorted. > gradientDisplay colorRamp: colorRamp. > gradientDisplay fillStyle direction: gradientDisplay extent x @ 0. > self changed. > target ifNotNil:[ > target perform: selector > with: colorRamp > with: morph]. > + "text setText: self colorRamp"! > - text setText: self colorRamp! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151029/667bac3f/attachment.htm From commits at source.squeak.org Thu Oct 29 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 29 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151029225502.19735.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-October/009077.html Name: System-topa.775 Ancestors: System-ul.774 Cache NaturalLanguageTranslator when looking up yet inexisting ones. Induced by tim Rowledge (see http://forum.world.st/image-startup-complications-td4858390.html) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009078.html Name: Morphic-kfr.1019 Ancestors: Morphic-mt.1018 Adds a GradientEditor for morphic ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009079.html Name: Morphic-kfr.1020 Ancestors: Morphic-kfr.1019 Fixing ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009080.html Name: Morphic-kfr.1021 Ancestors: Morphic-kfr.1020 Adopted look more like NewColorPicker ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009081.html Name: Morphic-kfr.1022 Ancestors: Morphic-kfr.1021 More look enhancements ============================================= From tim at rowledge.org Fri Oct 30 00:26:09 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Oct 30 00:26:16 2015 Subject: [squeak-dev] Squeak & Scratch mentions in The MagPi magazine Message-ID: <5C2F1782-FB9F-4C58-A318-C88588A12612@rowledge.org> In this month?s MagPi magazine there is a (very) small article about the latest Pi Scratch and even a mention of Smalltalk in a review of a book on python programming. https://www.raspberrypi.org/magpi-issues/MagPi39.pdf Pages 80-1 & 86. You?ll notice that the article is a little thin on details and missing the point on several items, but whatever. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- VENI, VIDI, VICE - I came, I saw, I partied. From p3anoman at gmail.com Fri Oct 30 02:08:34 2015 From: p3anoman at gmail.com (John McKeon) Date: Fri Oct 30 02:21:07 2015 Subject: [squeak-dev] Re: Squeak & Scratch mentions in The MagPi magazine In-Reply-To: <5C2F1782-FB9F-4C58-A318-C88588A12612@rowledge.org> References: <5C2F1782-FB9F-4C58-A318-C88588A12612@rowledge.org> Message-ID: <1446170914349-4858572.post@n4.nabble.com> I think its a fine article giving proper, and well deserved,kudos to "a developer called Tim Rowledge" x] well done Tim Rowledge -- View this message in context: http://forum.world.st/Squeak-Scratch-mentions-in-The-MagPi-magazine-tp4858568p4858572.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Fri Oct 30 03:02:42 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Oct 30 03:02:47 2015 Subject: [squeak-dev] Re: Squeak & Scratch mentions in The MagPi magazine In-Reply-To: <1446170914349-4858572.post@n4.nabble.com> References: <5C2F1782-FB9F-4C58-A318-C88588A12612@rowledge.org> <1446170914349-4858572.post@n4.nabble.com> Message-ID: <4ABF4BF5-3083-410A-B91C-032A81705182@rowledge.org> > On 29-10-2015, at 7:08 PM, John McKeon wrote: > > I think its a fine article giving proper, and well deserved,kudos to "a > developer called Tim Rowledge" x] > well done Tim Rowledge Well thanks - though I could wish that there had been room to mention at least the Squeak community. And there is that oh-so-blah phrase "or MIT rewrites Scratch in a different language.? that we?ve heard so many, many, times. (And by the way, if you know a project that ?got rewritten in a different language? successfully, please don?t tell me because then I won?t be able to say that I don?t know of any. Not without lying, and at least a couple of times people have been able to spot when I Iied) And "a version of Pac-Man created in Scratch by Andrew Oliver is now running at a playable 30fps, up from 16fps on the Raspberry Pi model B and a mere 1fps on the original Pi.? is a bit clumsily phrased and should refer to 30fps on Pi2, 16fps on Pi B whereas the original version of Scratch was 1fps on a Pi B. Sigh. I really should be used to magazine articles not getting it very close to correct by now. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Immune from any serious head injury. From Marcel.Taeumel at hpi.de Fri Oct 30 07:42:25 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Oct 30 07:55:02 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-kfr.1022.mcz In-Reply-To: References: Message-ID: <1446190945320-4858595.post@n4.nabble.com> Hi Karl, if we remove gradient specifications from code, how will we version them with Monticello? Is there a way to get the code snippet that produces the result, which the user has fine-tuned in this gradient editor? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1022-mcz-tp4858453p4858595.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Fri Oct 30 22:44:31 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 30 22:44:34 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-kfr.1022.mcz In-Reply-To: <1446190945320-4858595.post@n4.nabble.com> References: <1446190945320-4858595.post@n4.nabble.com> Message-ID: > Is there a way to get the code snippet that produces the result, which the > user has fine-tuned in this gradient editor? I didn't see the new editor yet, but +1 about the idea. Like the NewColorPicker shows the code snippet for instantiating the selected color. I love things like this which bring the code to the surface in a useful way and invite users to use and regard code as just another widget of the UI. From karlramberg at gmail.com Sat Oct 31 11:27:47 2015 From: karlramberg at gmail.com (karl ramberg) Date: Sat Oct 31 11:27:50 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-kfr.1022.mcz In-Reply-To: <1446190945320-4858595.post@n4.nabble.com> References: <1446190945320-4858595.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Gradient.JPG Type: image/jpeg Size: 23905 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151031/b1977b86/Gradient.jpeg From Marcel.Taeumel at hpi.de Sat Oct 31 16:00:42 2015 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Oct 31 16:13:26 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-kfr.1022.mcz In-Reply-To: References: <1446190945320-4858595.post@n4.nabble.com> Message-ID: <1446307242067-4858794.post@n4.nabble.com> Nice. :) We might want to think about Monticello and Code from time to time. At the moment, there is no feasible way to version real objects (morphs etc.) with it. [Which is not a limitation of MCZ files storing binary versions of MCMethodAddtions already in the snapshot.bin] Those really cool features do all make sense. However, a team may only pick them up if it can share and version the results. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1022-mcz-tp4858453p4858794.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Oct 31 16:45:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 16:45:19 2015 Subject: [squeak-dev] The Trunk: MorphicExtrasTests-nice.4.mcz Message-ID: Nicolas Cellier uploaded a new version of MorphicExtrasTests to project The Trunk: http://source.squeak.org/trunk/MorphicExtrasTests-nice.4.mcz ==================== Summary ==================== Name: MorphicExtrasTests-nice.4 Author: nice Time: 31 October 2015, 5:44:19.516 pm UUID: c4f7d3c0-bde7-41b9-b6a3-5588544e6e9d Ancestors: MorphicExtrasTests-fbs.3 Do not use at:put: on a Float (especially a literal!), this superpower should be considered harmful and it is not 64-bits spur compatible anyway. =============== Diff against MorphicExtrasTests-fbs.3 =============== Item was changed: ----- Method: FlapTabTests>>testFlapTabRecusion (in category 'tests') ----- testFlapTabRecusion | a b tab | + "This float is 466.7005813953488" + a := (16r1D2B3594D65359 asFloat timesTwoPower: -44). - "Create a float close to 466.700581395349" - a := 1.1 - at: 1 put: 1081944885; - at: 2 put: 2497074009; - yourself. b := 105. self deny: a + b - a = b. tab := Flaps newFlapTitled: 'Test' onEdge: #top. tab left: a. self should: [tab extent: b asPoint] notTakeMoreThanMilliseconds: 10 ! From commits at source.squeak.org Sat Oct 31 17:25:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 17:25:16 2015 Subject: [squeak-dev] The Trunk: Compiler-nice.316.mcz Message-ID: Nicolas Cellier uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-nice.316.mcz ==================== Summary ==================== Name: Compiler-nice.316 Author: nice Time: 31 October 2015, 6:24:53.362 pm UUID: 7a0893b3-8e86-4fa0-9d0c-5e80104c8278 Ancestors: Compiler-cmm.315 Make markerOrNil 64bits spur compatible by not hardcoding wordSize. =============== Diff against Compiler-cmm.315 =============== Item was changed: ----- Method: EncoderForV3 class>>markerOrNilFor: (in category 'compiled method support') ----- markerOrNilFor: aMethod "If aMethod is a marker method, answer the symbol used to mark it. Otherwise answer nil. What is a marker method? It is method with body like 'self subclassResponsibility' or '^ self subclassResponsibility' used to indicate ('mark') a special property. Marker methods compile to two bytecode forms, this: self send: pop returnSelf or this: self send: returnTop" + | expectedHeaderPlusLliteralSize e | + expectedHeaderPlusLliteralSize := Smalltalk wordSize * 4. + ^(((e := aMethod endPC - expectedHeaderPlusLliteralSize) = 3 or: [e = 4]) - | e | - ^(((e := aMethod endPC) = 19 or: [e = 20]) and: [aMethod numLiterals = 3 + and: [(aMethod at: expectedHeaderPlusLliteralSize + 1) = 16r70 "push self" + and: [(aMethod at: expectedHeaderPlusLliteralSize + 2) = 16rD0]]]) "send " - and: [(aMethod at: 17) = 16r70 "push self" - and: [(aMethod at: 18) = 16rD0]]]) "send " ifTrue: [aMethod literalAt: 1]! From commits at source.squeak.org Sat Oct 31 17:39:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 17:39:45 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.255.mcz Message-ID: Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-nice.255.mcz ==================== Summary ==================== Name: CollectionsTests-nice.255 Author: nice Time: 31 October 2015, 6:39:25.525 pm UUID: 4f5361b3-18c8-47f1-ba59-030004683963 Ancestors: CollectionsTests-ul.254 In a 64bits spur VM, not all SmallInteger can be stored in an IntegerArray, It's time to document it. =============== Diff against CollectionsTests-ul.254 =============== Item was changed: ----- Method: IntegerArrayTest>>testStoreSmallInteger (in category 'tests') ----- testStoreSmallInteger + "Any SmallInteger may be stored in an IntegerArray in a 32bits VM. + Not so true for a 64bits spur VM though..." - "Any SmallInteger may be stored in an IntegerArray." | ia val | ia := IntegerArray new: 1. + val := Smalltalk wordSize = 8 + ifTrue: [1 << 31 - 1] + ifFalse: [SmallInteger maxVal]. - val := SmallInteger maxVal. ia at: 1 put: val. self assert: ((ia at: 1) = val). + val := Smalltalk wordSize = 8 + ifTrue: [(1 << 31) negated] + ifFalse: [SmallInteger minVal]. - val := SmallInteger minVal. ia at: 1 put: val. self assert: ((ia at: 1) = val) ! From commits at source.squeak.org Sat Oct 31 17:49:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 17:50:00 2015 Subject: [squeak-dev] The Trunk: KernelTests-nice.298.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.298.mcz ==================== Summary ==================== Name: KernelTests-nice.298 Author: nice Time: 31 October 2015, 6:49:35.522 pm UUID: bd6fa081-0481-4e5c-85d0-c1c8207c7f7f Ancestors: KernelTests-eem.297 Revise the tests relative to SmallInteger range for 64bits spur VM compatibility. =============== Diff against KernelTests-eem.297 =============== Item was changed: ----- Method: SmallIntegerTest>>testMaxVal (in category 'testing - Class Methods') ----- testMaxVal + self assert: (SmallInteger maxVal = 16r3FFFFFFF or: [SmallInteger maxVal = 16rFFFFFFFFFFFFFFF]).! - self assert: (SmallInteger maxVal = 16r3FFFFFFF).! Item was changed: ----- Method: SmallIntegerTest>>testMinVal (in category 'testing - Class Methods') ----- testMinVal + self assert: (SmallInteger minVal = -16r40000000 or: [SmallInteger minVal = -16r1000000000000000]).! - self assert: (SmallInteger minVal = -16r40000000).! Item was changed: ----- Method: SmallIntegerTest>>testPrintString (in category 'testing - printing') ----- testPrintString self assert: 1 printString = '1'. self assert: -1 printString = '-1'. + self assert: SmallInteger minVal printString = (Smalltalk wordSize = 8 ifTrue: [ '-1152921504606846976'] ifFalse: ['-1073741824']). + self assert: SmallInteger maxVal printString = (Smalltalk wordSize = 8 ifTrue: [ '1152921504606846975'] ifFalse: ['-1073741823']). - self assert: SmallInteger minVal printString = '-1073741824'. - self assert: SmallInteger maxVal printString = '1073741823'. self assert: 12345 printString = '12345'. self assert: -54321 printString = '-54321'. self assert: 0 decimalDigitLength = 1. self assert: 4 decimalDigitLength = 1. self assert: 12 decimalDigitLength = 2. self assert: 123 decimalDigitLength = 3. self assert: 1234 decimalDigitLength = 4. self assert: 56789 decimalDigitLength = 5. self assert: 657483 decimalDigitLength = 6. self assert: 6571483 decimalDigitLength = 7. self assert: 65174383 decimalDigitLength = 8. self assert: 625744831 decimalDigitLength = 9. self assert: 1000001111 decimalDigitLength = 10. + self assert: SmallInteger maxVal decimalDigitLength = (Smalltalk wordSize = 8 ifTrue: [19] ifFalse: [10]).! - self assert: SmallInteger maxVal decimalDigitLength = 10.! From commits at source.squeak.org Sat Oct 31 18:25:36 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 18:25:38 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.962.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.962.mcz ==================== Summary ==================== Name: Kernel-nice.962 Author: nice Time: 31 October 2015, 7:24:30.118 pm UUID: 7437325d-9085-4d61-9960-368cd42f46fe Ancestors: Kernel-ul.961 Fix DataStream-serialization of SmallInteger in a 64bits spur VM. DataStream assumes each and every SmallInteger fits in 32bits which is no more true. If the SmallInteger is out of 32bits VM SmallInteger range, then use a fake LargeInteger. Also care to re-normalize LageIntegers at materialization time. =============== Diff against Kernel-ul.961 =============== Item was added: + ----- Method: LargePositiveInteger>>readDataFrom:size: (in category 'objects from disk') ----- + readDataFrom: aDataStream size: varsOnDisk + ^(super readDataFrom: aDataStream size: varsOnDisk) normalize + ! Item was added: + ----- Method: SmallInteger>>objectForDataStream: (in category 'objects from disk') ----- + objectForDataStream: refStrm + "In a 64bits sput VM, we may have to fake 32bits SmallInteger for compatibility" + + | large | + self > 16r37777777 ifTrue: [ + large := LargePositiveInteger new: self digitLength neg: false. + 1 to: self digitLength do: [:i | large digitAt: i put: (self digitAt: i)]. + ^large]. + self < -16r40000000 ifTrue: [ + large := LargeNegativeInteger new: self digitLength neg: true. + 1 to: self digitLength do: [:i | large digitAt: i put: (self digitAt: i)]. + ^large]. + ^ self + ! From Das.Linux at gmx.de Sat Oct 31 19:45:44 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Oct 31 19:45:48 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.255.mcz Message-ID: <9853A8D3-0CFA-4AC7-8399-3861375635DA@gmx.de> On 31.10.2015, at 17:39, commits@source.squeak.org wrote: > Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: > http://source.squeak.org/trunk/CollectionsTests-nice.255.mcz > > ==================== Summary ==================== > > Name: CollectionsTests-nice.255 > Author: nice > Time: 31 October 2015, 6:39:25.525 pm > UUID: 4f5361b3-18c8-47f1-ba59-030004683963 > Ancestors: CollectionsTests-ul.254 > > In a 64bits spur VM, not all SmallInteger can be stored in an IntegerArray, It's time to document it. > Eh? Shouldn't we rather fix IntegerArray then? Best -Tobias > =============== Diff against CollectionsTests-ul.254 =============== > > Item was changed: From lewis at mail.msen.com Sat Oct 31 19:54:34 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Oct 31 19:54:36 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.255.mcz In-Reply-To: <9853A8D3-0CFA-4AC7-8399-3861375635DA@gmx.de> References: <9853A8D3-0CFA-4AC7-8399-3861375635DA@gmx.de> Message-ID: <20151031195434.GA67835@shell.msen.com> On Sat, Oct 31, 2015 at 08:45:44PM +0100, Tobias Pape wrote: > > On 31.10.2015, at 17:39, commits@source.squeak.org wrote: > > > Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: > > http://source.squeak.org/trunk/CollectionsTests-nice.255.mcz > > > > ==================== Summary ==================== > > > > Name: CollectionsTests-nice.255 > > Author: nice > > Time: 31 October 2015, 6:39:25.525 pm > > UUID: 4f5361b3-18c8-47f1-ba59-030004683963 > > Ancestors: CollectionsTests-ul.254 > > > > In a 64bits spur VM, not all SmallInteger can be stored in an IntegerArray, It's time to document it. > > > > Eh? > Shouldn't we rather fix IntegerArray then? > Best > -Tobias > No. From the class comment: IntegerArrays store 32bit signed Integer values. Negative values are stored as 2's complement. Therefore the range of SmallInteger may now exceed the range of a 32bit twos complement integer, and this should be documented. Dave From Das.Linux at gmx.de Sat Oct 31 20:25:22 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Oct 31 20:25:26 2015 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.255.mcz In-Reply-To: <20151031195434.GA67835@shell.msen.com> References: <9853A8D3-0CFA-4AC7-8399-3861375635DA@gmx.de> <20151031195434.GA67835@shell.msen.com> Message-ID: <4B1C0377-6713-46EB-8053-C54222BFC43E@gmx.de> On 31.10.2015, at 20:54, David T. Lewis wrote: > On Sat, Oct 31, 2015 at 08:45:44PM +0100, Tobias Pape wrote: >> >> On 31.10.2015, at 17:39, commits@source.squeak.org wrote: >> >>> Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: >>> http://source.squeak.org/trunk/CollectionsTests-nice.255.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: CollectionsTests-nice.255 >>> Author: nice >>> Time: 31 October 2015, 6:39:25.525 pm >>> UUID: 4f5361b3-18c8-47f1-ba59-030004683963 >>> Ancestors: CollectionsTests-ul.254 >>> >>> In a 64bits spur VM, not all SmallInteger can be stored in an IntegerArray, It's time to document it. >>> >> >> Eh? >> Shouldn't we rather fix IntegerArray then? >> Best >> -Tobias >> > > No. From the class comment: > > IntegerArrays store 32bit signed Integer values. > Negative values are stored as 2's complement. > > Therefore the range of SmallInteger may now exceed the range of a > 32bit twos complement integer, and this should be documented. Oh, ok then. Best -Tobias From commits at source.squeak.org Sat Oct 31 22:36:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 22:36:40 2015 Subject: [squeak-dev] The Trunk: System-nice.776.mcz Message-ID: Nicolas Cellier uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-nice.776.mcz ==================== Summary ==================== Name: System-nice.776 Author: nice Time: 31 October 2015, 11:35:30.653 pm UUID: d178a6bb-8b9a-47ed-9eff-8544ba286894 Ancestors: System-topa.775 Fix SmartRefStream for 64bits spur VM. The scenario is this one: a SmallInteger smaller than 32 bits VM minSmallInteger is being replaced with a fake LargeNegativeInteger. But the fake LargeNegativeInteger is not stored in references IdentityDictionary; consequently the class is NOT properly registered into the structures, and this creates an Error at materialization time... So let's reference the fake... =============== Diff against System-topa.775 =============== Item was changed: ----- Method: DataStream>>nextPut: (in category 'write and read') ----- nextPut: anObject "Write anObject to the receiver stream. Answer anObject." | typeID selector objectToStore | typeID := self typeIDFor: anObject. (self tryToPutReference: anObject typeID: typeID) ifTrue: [^ anObject]. objectToStore := (self objectIfBlocked: anObject) objectForDataStream: self. + objectToStore == anObject + ifFalse: + [typeID := self typeIDFor: objectToStore. + (self tryToPutReference: objectToStore typeID: typeID) + ifTrue: [^ anObject]]. - objectToStore == anObject ifFalse: [typeID := self typeIDFor: objectToStore]. byteStream nextPut: typeID. selector := #(writeNil: writeTrue: writeFalse: writeInteger: writeStringOld: writeSymbol: writeByteArray: writeArray: writeInstance: errorWriteReference: writeBitmap: writeClass: writeUser: writeFloat: writeRectangle: == "<-16 short inst" writeString: writeBitmap: writeBitmap: writeWordLike: writeInstance: "CompiledMethod") at: typeID. self perform: selector with: objectToStore. ^ anObject "NOTE: If anObject is a reference type (one that we write cross-references to) but its externalized form (result of objectForDataStream:) isn't (e.g. CompiledMethod and ViewState), then we should remember its externalized form but not add to 'references'. Putting that object again should just put its external form again. That's more compact and avoids seeks when reading. But we just do the simple thing here, allowing backward-references for non-reference types like nil. So objectAt: has to compensate. Objects that externalize nicely won't contain the likes of ViewStates, so this shouldn't hurt much. writeReference: -> errorWriteReference:."! From nicolas.cellier.aka.nice at gmail.com Sat Oct 31 22:39:02 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Oct 31 22:39:04 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.962.mcz In-Reply-To: <563507a5.4733370a.79443.ffffae7eSMTPIN_ADDED_MISSING@mx.google.com> References: <563507a5.4733370a.79443.ffffae7eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-10-31 19:25 GMT+01:00 : > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-nice.962.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.962 > Author: nice > Time: 31 October 2015, 7:24:30.118 pm > UUID: 7437325d-9085-4d61-9960-368cd42f46fe > Ancestors: Kernel-ul.961 > > Fix DataStream-serialization of SmallInteger in a 64bits spur VM. > > DataStream assumes each and every SmallInteger fits in 32bits which is no > more true. > If the SmallInteger is out of 32bits VM SmallInteger range, then use a > fake LargeInteger. > Also care to re-normalize LageIntegers at materialization time. > > =============== Diff against Kernel-ul.961 =============== > > Item was added: > + ----- Method: LargePositiveInteger>>readDataFrom:size: (in category > 'objects from disk') ----- > + readDataFrom: aDataStream size: varsOnDisk > + ^(super readDataFrom: aDataStream size: varsOnDisk) normalize > + ! > > Item was added: > + ----- Method: SmallInteger>>objectForDataStream: (in category 'objects > from disk') ----- > + objectForDataStream: refStrm > + "In a 64bits sput VM, we may have to fake 32bits SmallInteger for > compatibility" > + > + | large | > + self > 16r37777777 ifTrue: [ > Ahem, err... what's this 7777777 ??? Probably I was thinking of typing seven F so loud that I fooled myself !!! Let me retry... > + large := LargePositiveInteger new: self digitLength neg: > false. > + 1 to: self digitLength do: [:i | large digitAt: i put: > (self digitAt: i)]. > + ^large]. > + self < -16r40000000 ifTrue: [ > + large := LargeNegativeInteger new: self digitLength neg: > true. > + 1 to: self digitLength do: [:i | large digitAt: i put: > (self digitAt: i)]. > + ^large]. > + ^ self > + ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151031/82c4cbcf/attachment.htm From commits at source.squeak.org Sat Oct 31 22:49:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 22:49:44 2015 Subject: [squeak-dev] The Trunk: Kernel-nice.963.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.963.mcz ==================== Summary ==================== Name: Kernel-nice.963 Author: nice Time: 31 October 2015, 11:48:47.351 pm UUID: 251411b2-0110-4d17-8469-5b3aef45ebee Ancestors: Kernel-nice.962 Let's correct my fresh DataStream correction... The ugly 37777777 pattern may happen in octal, but 50 birthdays is well too young for practicing such sport correctly ;) if the MC commit window would not try and reformat the code (especially rewrite hexadecimal constants in decimal) - that would have given me one more chance to correct before committing... =============== Diff against Kernel-nice.962 =============== Item was changed: ----- Method: SmallInteger>>objectForDataStream: (in category 'objects from disk') ----- objectForDataStream: refStrm "In a 64bits sput VM, we may have to fake 32bits SmallInteger for compatibility" | large | + self > 16r3FFFFFFF ifTrue: [ - self > 16r37777777 ifTrue: [ large := LargePositiveInteger new: self digitLength neg: false. 1 to: self digitLength do: [:i | large digitAt: i put: (self digitAt: i)]. ^large]. self < -16r40000000 ifTrue: [ large := LargeNegativeInteger new: self digitLength neg: true. 1 to: self digitLength do: [:i | large digitAt: i put: (self digitAt: i)]. ^large]. ^ self ! From commits at source.squeak.org Sat Oct 31 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 31 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20151031225502.11259.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-October/009082.html Name: MorphicExtrasTests-nice.4 Ancestors: MorphicExtrasTests-fbs.3 Do not use at:put: on a Float (especially a literal!), this superpower should be considered harmful and it is not 64-bits spur compatible anyway. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009083.html Name: Compiler-nice.316 Ancestors: Compiler-cmm.315 Make markerOrNil 64bits spur compatible by not hardcoding wordSize. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009084.html Name: CollectionsTests-nice.255 Ancestors: CollectionsTests-ul.254 In a 64bits spur VM, not all SmallInteger can be stored in an IntegerArray, It's time to document it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009085.html Name: KernelTests-nice.298 Ancestors: KernelTests-eem.297 Revise the tests relative to SmallInteger range for 64bits spur VM compatibility. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009086.html Name: Kernel-nice.962 Ancestors: Kernel-ul.961 Fix DataStream-serialization of SmallInteger in a 64bits spur VM. DataStream assumes each and every SmallInteger fits in 32bits which is no more true. If the SmallInteger is out of 32bits VM SmallInteger range, then use a fake LargeInteger. Also care to re-normalize LageIntegers at materialization time. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009087.html Name: System-nice.776 Ancestors: System-topa.775 Fix SmartRefStream for 64bits spur VM. The scenario is this one: a SmallInteger smaller than 32 bits VM minSmallInteger is being replaced with a fake LargeNegativeInteger. But the fake LargeNegativeInteger is not stored in references IdentityDictionary; consequently the class is NOT properly registered into the structures, and this creates an Error at materialization time... So let's reference the fake... ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-October/009088.html Name: Kernel-nice.963 Ancestors: Kernel-nice.962 Let's correct my fresh DataStream correction... The ugly 37777777 pattern may happen in octal, but 50 birthdays is well too young for practicing such sport correctly ;) if the MC commit window would not try and reformat the code (especially rewrite hexadecimal constants in decimal) - that would have given me one more chance to correct before committing... =============================================