Re: [Pharo-dev] Aconcagua Hashing Bug?
On Tue, May 20, 2014 at 7:28 AM, Sven Van Caekenberghe s...@stfx.eu wrote: So ? 1/2 hash ~= 0.5 hash ((1/2) hash = 0.5 hash) true ((1/2) hash ~= 0.5 hash) true and ((1/3) hash =(1.0/3) hash) false The implementation (in 3.0) has a special case for denominator is a power of 2: Fractionhash Hash is reimplemented because = is implemented. Care is taken that a Fraction equal to a Float also have an equal hash | tmp | denominator isPowerOfTwo ifTrue: [ If denominator is a power of two, I can be exactly equal to a Float tmp := self asFloat. tmp isFinite ifTrue: [^tmp hash]]. Else, I cannot be exactly equal to a Float, use own hash algorithm. (Assume the fraction is already reduced) ^numerator hash bitXor: denominator hash Floathash Hash is reimplemented because = is implemented. Both words of the float are used; 8 bits are removed from each end to clear most of the exponent regardless of the byte ordering. (The bitAnd:'s ensure that the intermediate results do not become a large integer.) Slower than the original version in the ratios 12:5 to 2:1 depending on values. (DNS, 11 May, 1997) (self isFinite and: [self fractionPart = 0.0]) ifTrue: [^self truncated hash]. ^ (((self basicAt: 1) bitAnd: 16r0000) + ((self basicAt: 2) bitAnd: 16r0000)) bitShift: -8 Mmmh, I am curious to know what the rationale for this is. Getting into: FractionisPowerOfTwo |reduced| reduced := self reduced. ^(reduced numerator = 1 and: [reduced denominator isPowerOfTwo]) or: [reduced denominator = 1 and: [reduced numerator isPowerOfTwo]] calls in reduced, which in turn calls gcd: ... That's quite something to be aware of. Phil I mean what would you expect, how should this have to work ? Maybe the hashing specialists have something to say about this. On 20 May 2014, at 01:38, Sean P. DeNigris s...@clipperadams.com wrote: (1/2) teaspoons hash ~= 0.5 teaspoons hash b.t.w. Phexample caught this automatically because it checks hashes when comparing for equality... pretty cool - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] installing pharo 3.0 on Debian wheezy
Hi, First of all, you are going to the old site (as noticed in the first page), you should be going to pharo.org The problem is not 64 or 32 bit there, is that Debian is still based in an old version of libc. I’m preparing a slave specially for that, but for now, you need to use this VM: http://files.pharo.org/vm/pharo/linux/old-libc/pharovm-ubuntu804.tar.gz Is not the latest one, but will work fine. cheers, Esteban On 20 May 2014, at 05:50, Ralph Boland rpbol...@gmail.com wrote: I just tried installing pharo 3.0 on Linux Debian wheezy and failed. I first went to http://www.pharo-project.org/pharo-download and downloaded the Linux version. I unzipped it and attempted to run pharo. I got the error: ralph@m31:~/Pharo$ ./pharo /home/ralph/Pharo/bin/pharo: /lib/i386-linux-gnu/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /home/ralph/Pharo/bin/pharo) I assume the problem is Pharo is expecting me to have the 64 bit version of a library and i have the 32 bit version of the library but I am not sure of that. So I tried installing the Ubuntu version (from the same web page) following the instructions I ran: sudo add-apt-repository ppa:pharo/stable sudo apt-get update On the second command I got the errors: ... Hit ftp://ftp.debian.org stable/contrib Translation-en Hit ftp://ftp.debian.org stable/main Translation-en Hit ftp://ftp.debian.org stable/non-free Translation-en Err http://ppa.launchpad.net wheezy/main Sources 404 Not Found Err http://ppa.launchpad.net wheezy/main i386 Packages 404 Not Found Ign http://ppa.launchpad.net wheezy/main Translation-en_CA Ign http://ppa.launchpad.net wheezy/main Translation-en Fetched 129 kB in 4s (30.7 kB/s) W: Failed to fetch http://ppa.launchpad.net/pharo/stable/ubuntu/dists/wheezy/main/source/Sources 404 Not Found W: Failed to fetch http://ppa.launchpad.net/pharo/stable/ubuntu/dists/wheezy/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. The solution is probably obvious to many of you. If I could be enlightened as to what to do that would be great. Thanks Ralph Boland
Re: [Pharo-dev] Reef status
Hi, For some reason, #loadDevelopment is not loading the right development version. Please try this way: Gofer it smalltalkhubUser: 'estebanlm' project: 'Reef'; configuration; load. ConfigurationOfReef loadDevelopment. cheers, Esteban On 20 May 2014, at 02:32, Facundo Vozzi facundo...@gmail.com wrote: Esteban, I'm getting this error on Pharo3 (see attach). Seaside and Magritte are loaded and working fine. I just try to load it using your instructions. I haven't time to debug right now but I'm going to try it again later. Thanks, FV On Thu, May 15, 2014 at 7:59 AM, Facundo Vozzi facundo...@gmail.com wrote: Yes, not problem. I have seaside, magritte and folks on my image. I'll let you know if I have problems. Thanks, On Thu, May 15, 2014 at 5:45 AM, Esteban Lorenzano esteba...@gmail.com wrote: On 15 May 2014, at 10:41, Esteban Lorenzano esteba...@gmail.com wrote: Hi, Reef works out of the box in Pharo3. What does not work is the configuration (I need to update it) :P Real thing is that I was migrating (and simplifying) everything to work with bootstrap out of the box” and I made (as always) just what I needed. But I’m willing to help and to spend some time on it. So, first… I updated the configuration. This should work now: Gofer it smalltalkhubUser: 'estebanlm' project: 'Reef'; configuration; loadDevelopment. ah, but you need to have seaside loaded first. Reef just loads “seaside core”, which means not all packages you might need (like the zinc adaptor) will be present. Esteban And any question you have… I’m happy to help. cheers, Esteban On 15 May 2014, at 08:46, stepharo steph...@free.fr wrote: It would so great! Esteban is too busy but yes yes yes. We have a draft of a chapter but I do not enough knowledge to be efficient On 15/5/14 01:25, Facundo Vozzi wrote: Hi, someone is working with Reef and is someone planning to migrate to Pharo 3? Is it working on Pharo 2 ? Thanks, p.s.: if nobody is migrating it maybe I can try it with Esteban instructions. Reef.png
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [nil]. ^ result isNil ifTrue: [ noneBlock value ] ifFalse: [ presentBlock value: result ] From CollectionExtensions in MCSmalltalkhubRepository owner: 'Moose' project: 'CollectionExtensions' user: '' password: ''
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
But that does't work in the case the object you are looking for nil... (Ok, maybe that's not a really relevant case...) This version however handles the case, detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [ ^ noneBlock value ]. ^ presentBlock value: result Guille On Tue, May 20, 2014 at 9:38 AM, Stephan Eggermont step...@stack.nl wrote: detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [nil]. ^ result isNil ifTrue: [ noneBlock value ] ifFalse: [ presentBlock value: result ] From CollectionExtensions in MCSmalltalkhubRepository owner: 'Moose' project: 'CollectionExtensions' user: '' password: ''
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
Cool. I integrated your suggestion. Thanks, Doru On Tue, May 20, 2014 at 9:43 AM, Guillermo Polito guillermopol...@gmail.com wrote: But that does't work in the case the object you are looking for nil... (Ok, maybe that's not a really relevant case...) This version however handles the case, detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [ ^ noneBlock value ]. ^ presentBlock value: result Guille On Tue, May 20, 2014 at 9:38 AM, Stephan Eggermont step...@stack.nlwrote: detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [nil]. ^ result isNil ifTrue: [ noneBlock value ] ifFalse: [ presentBlock value: result ] From CollectionExtensions in MCSmalltalkhubRepository owner: 'Moose' project: 'CollectionExtensions' user: '' password: '' -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
This method did not exist a a couple of years ago. It is too long on the todo list to merge CollectionExtensions into Pharo, but we did not get a chance to do it completely. I do not quite like the ifFound:ifNone: because ifFound: does not sound like the inverse of ifNone:. Better would be detect:ifFound:ifNotFound:, but that would not work well with the established detect:ifNone:. Doru On Tue, May 20, 2014 at 9:47 AM, Sven Van Caekenberghe s...@stfx.eu wrote: I find the selector name somewhat confusing, especially since we already have: detect: aBlock ifFound: foundBlock ifNone: exceptionBlock Evaluate aBlock with each of the receiver's elements as the argument. If some element evaluates aBlock to true, then cull this element into foundBlock and answer the result of this evaluation. If none evaluate to true, then evaluate exceptionBlock. self do: [ :each | (aBlock value: each) ifTrue: [ ^ foundBlock cull: each ] ]. ^ exceptionBlock value On 20 May 2014, at 09:42, Tudor Girba tu...@tudorgirba.com wrote: Ah, yes :). Doru On Tue, May 20, 2014 at 9:38 AM, Stephan Eggermont step...@stack.nl wrote: detect: aBlock ifOne: presentBlock ifNone: noneBlock | result | result := self detect: aBlock ifNone: [nil]. ^ result isNil ifTrue: [ noneBlock value ] ifFalse: [ presentBlock value: result ] From CollectionExtensions in MCSmalltalkhubRepository owner: 'Moose' project: 'CollectionExtensions' user: '' password: '' -- www.tudorgirba.com Every thing has its own flow -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
About the speed, you get a rather large rendering scene. The creation time can be improved, but we just did not get a chance to do it. For moving around, you can use: - W: go closer - S: go further - Arrows to move around - Cmd+arrows to rotate the scene Cheers, Doru On Tue, May 20, 2014 at 9:46 AM, Serge Stinckwich serge.stinckw...@gmail.com wrote: Thank you Doru. Really nice to have the details about this visualization. A little disappointed, because it takes a lot of time to setup and the interactions with the visualization is quite slow on my macbook pro. How can I zoom on the 3D city ? Regards, On Mon, May 19, 2014 at 8:21 PM, Sean P. DeNigris s...@clipperadams.com wrote: Tudor Girba-2 wrote I now put together a blog post to explain it: Cool!! I wanted that since I saw the visualization :) - Cheers, Sean -- View this message in context: http://forum.world.st/blog-post-explaining-the-codecity-visualization-of-pharo-changes-tp4759400p4759580.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. -- Serge Stinckwich UCBN UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/ -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-dev] Versionner is even Coooler
I agree! Stef On 19/5/14 20:41, Sean P. DeNigris wrote: It is really a joy to start a project with Versionner... I used to delay creating a Metacello config as long as possible, and would try to add all the dependencies at once, often forgetting and chasing them down one at a time. Now these are all simple visual operations, so I create a config with the first dependency and add them as they come along, without interrupting my workflow too much. Thanks Christophe and other Versionner contributors :) - Cheers, Sean -- View this message in context: http://forum.world.st/Versionner-is-even-Coooler-tp4759583.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] GetText deleting Pharo classes
On Mon, May 19, 2014 at 6:10 PM, Marcus Denker marcus.den...@inria.frwrote: On 19 May 2014, at 18:03, Hilaire Fernandes hilaire.fernan...@gmail.com wrote: It will ease a lot of things but is it really the right things to do? 1) Pharo itself should be multi-lingual eventually 2) now we have code in the image that seemingly nobody should use. Why is it there? Does that make sense? I am not sure if there is any useful description about the System-Localization package somewhere because when I started to look for multi-lingual functionality in Pharo, I was told to look at GetText. And then I found some very useful text explaining how to use it ( http://pharo.gemtalksystems.com/book/LanguageAndLibraries/Localisation/PreparingImage/ ). But it is essential to merge the classes from System-Localization package and into GetText. I had a look at System-Localization package. Its Locale class provides services for language management inside the image. I use these services it in my application to switch the language of the image. ISOLanguageDefinition class, though currently not used, provides implementation for ISO standard. My suggestion: - not to throw away pharo package - merge pharo package with GetText and name the merged package as system-localization in Pharo (for default multi-lingual functionality inside the image). - write some tests (because currently there are none). What do you say? regards, Usman (i.e. all the new packages carved in Pharo now) Hilaire Le 19/05/2014 17:52, Marcus Denker a écrit : Maybe we should have the get text solution in the image by default? -- Dr. Geo http://drgeo.eu
Re: [Pharo-dev] Versionner is even Coooler
can someone explain save to development ? I agree its a really nice tool. On Tue, May 20, 2014 at 10:56 AM, stepharo steph...@free.fr wrote: I agree! Stef On 19/5/14 20:41, Sean P. DeNigris wrote: It is really a joy to start a project with Versionner... I used to delay creating a Metacello config as long as possible, and would try to add all the dependencies at once, often forgetting and chasing them down one at a time. Now these are all simple visual operations, so I create a config with the first dependency and add them as they come along, without interrupting my workflow too much. Thanks Christophe and other Versionner contributors :) - Cheers, Sean -- View this message in context: http://forum.world.st/ Versionner-is-even-Coooler-tp4759583.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] Versionner is even Coooler
Thanks a lot for all your nice words. You were right, there are other contributors to Versionner: first author Alexandre Bergel, then Juan Pablo Sandoval but also a lot of feedbacks from users (a mention to Sean for that) essential for such a tool. Le 20 mai 2014 à 10:10, kilon alios a écrit : can someone explain save to development ? When you do structural changes* in your configuration, it is done in memory. To keep theses changes, you need to save them in the configuration. It is always done in the development version (the only version you can edit is the development version) that is backed by a baseline. If you need to do structural changes, use Save to development to flush your changes. If you only need to generate a new version with packages numbers updated, then use the release version button. * structural change: basically a change made to a baseline: addition/removal of a package / project group, edition of requirements or includes directives. If it is not clear, don't hesitate to ask more explanation. Best regards, Christophe. smime.p7s Description: S/MIME cryptographic signature
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
Hi Doru. Thank you for explanation. On question. We have a construct called “tag” on the package level, so we can reason about the parts of the package on object level. Do we really need to go into string parsing? Uko On 18 May 2014, at 09:52, Tudor Girba tu...@tudorgirba.com wrote: Hi, I was asked several times for how the visualization from the Pharo 3.0 announcement was created. I now put together a blog post to explain it: http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0 Cheers, Doru -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-dev] Versionner is even Coooler
thank you its clear. On Tue, May 20, 2014 at 11:46 AM, Christophe Demarey christophe.dema...@inria.fr wrote: Thanks a lot for all your nice words. You were right, there are other contributors to Versionner: first author Alexandre Bergel, then Juan Pablo Sandoval but also a lot of feedbacks from users (a mention to Sean for that) essential for such a tool. Le 20 mai 2014 à 10:10, kilon alios a écrit : can someone explain save to development ? When you do structural changes* in your configuration, it is done in memory. To keep theses changes, you need to save them in the configuration. It is always done in the development version (the only version you can edit is the development version) that is backed by a baseline. If you need to do structural changes, use Save to development to flush your changes. If you only need to generate a new version with packages numbers updated, then use the release version button. * structural change: basically a change made to a baseline: addition/removal of a package / project group, edition of requirements or includes directives. If it is not clear, don't hesitate to ask more explanation. Best regards, Christophe.
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
Yes, of course I know about tags. But, they are not used so prominently just yet. For example, take the AST packages: - AST-Core - AST-Interpreter-Core - AST-Interpreter-Extension - AST-Interpreter-Test - AST-Tests-Core Of these, AST-Core does have tags, but the rest are not explicitly related to the AST concept. By using string magic in this case all of these would appear close together. That is why I used strings instead of tags. Cheers, Doru On Tue, May 20, 2014 at 11:13 AM, Yuriy Tymchuk yuriy.tymc...@me.comwrote: Hi Doru. Thank you for explanation. On question. We have a construct called “tag” on the package level, so we can reason about the parts of the package on object level. Do we really need to go into string parsing? Uko On 18 May 2014, at 09:52, Tudor Girba tu...@tudorgirba.com wrote: Hi, I was asked several times for how the visualization from the Pharo 3.0 announcement was created. I now put together a blog post to explain it: http://www.humane-assessment.com/blog/communicating-changes-in-pharo-3-0 Cheers, Doru -- www.tudorgirba.com Every thing has its own flow -- www.tudorgirba.com Every thing has its own flow
Re: [Pharo-dev] blog post explaining the codecity visualization of pharo changes
Le 20/05/2014 13:22, Tudor Girba a écrit : Yes, of course I know about tags. But, they are not used so prominently just yet. For example, take the AST packages: - AST-Core - AST-Interpreter-Core - AST-Interpreter-Extension - AST-Interpreter-Test - AST-Tests-Core Of these, AST-Core does have tags, but the rest are not explicitly related to the AST concept. By using string magic in this case all of these would appear close together. That is why I used strings instead of tags. We probably have a few versions of code doing packages classifications based on prefix floating around :) It works fairly well. I do have some code which also scans catalogKeywords in configurations to improve the classification. Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Re: [Pharo-dev] Versionner is even Coooler
Christophe Demarey wrote: Thanks a lot for all your nice words. You were right, there are other contributors to Versionner: first author Alexandre Bergel, then Juan Pablo Sandoval but also a lot of feedbacks from users (a mention to Sean for that) essential for such a tool. Le 20 mai 2014 10:10, kilon alios a crit : can someone explain "save to development" ? When you do structural changes* in your configuration, it is done "in memory". To keep theses changes, you need to save them in the configuration. It is always done in the development version (the only version you can edit is the development version) that is backed by a baseline. If you need to do structural changes, use "Save to development" to flush your changes. If you only need to generate a new version with packages numbers updated, then use the "release version" button. * structural change: basically a change made to a baseline: addition/removal of a package / project group, edition of requirements or includes directives. If it is not clear, don't hesitate to ask more explanation. Best regards, Christophe. So would "Save to baseline" mean the same as "Save to development"? cheers -ben
Re: [Pharo-dev] Versionner is even Coooler
Le 20 mai 2014 à 14:28, Ben Coman a écrit : Christophe Demarey wrote: Thanks a lot for all your nice words. You were right, there are other contributors to Versionner: first author Alexandre Bergel, then Juan Pablo Sandoval but also a lot of feedbacks from users (a mention to Sean for that) essential for such a tool. Le 20 mai 2014 à 10:10, kilon alios a écrit : can someone explain save to development ? When you do structural changes* in your configuration, it is done in memory. To keep theses changes, you need to save them in the configuration. It is always done in the development version (the only version you can edit is the development version) that is backed by a baseline. If you need to do structural changes, use Save to development to flush your changes. If you only need to generate a new version with packages numbers updated, then use the release version button. * structural change: basically a change made to a baseline: addition/removal of a package / project group, edition of requirements or includes directives. If it is not clear, don't hesitate to ask more explanation. Best regards, Christophe. So would Save to baseline mean the same as Save to development? Kind of. The idea is to hide the baseline complexity from the user point of view. The user only see releases (numbered version) and the development version where changes are possible. 'Save to baseline' is not clear about the baseline that will be used to save. In fact, development points to the latest baseline and creates new one if needed (ex: baseline used by a release that you need to edit). smime.p7s Description: S/MIME cryptographic signature
Re: [Pharo-dev] compiling Pillar files locally (for LaserGame book)
And of course there is no need to have a lower number of screenshots now you can generate them from the image. Stephan
[Pharo-dev] Pharo in Rasbian ?
Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Pharo in Rasbian ?
Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Mustache
I tried that already. But as with most hipster projects nobody feels responsible anymore. I contacted the original author but I he has nothing to do anymore with it. I tried to track it down (because besides a cool ascii art picture there is no contact data on the site) und even found I guy I know from berlin but he didn’t respond. So I decided I have better things to do then to run after people which don’t care about their project… Norbert Am 20.05.2014 um 15:06 schrieb Torsten Bergmann asta...@gmx.de: Hi Norbert, http://mustache.github.io/ does not mention the port for Pharo Smalltalk. Maybe you should contact them to add a link to http://smalltalkhub.com/#!/~NorbertHartl/Mustache. Such links can help getting more visibility. Thx T.
Re: [Pharo-dev] Aconcagua Hashing Bug?
In few words, one measure is equal to another when their internal collaborators are equals between each other. And the hash of two measures are equals when the hash of their collaborators are equals too. Then, some examples #= (1/2) = 0.5 this evaluate to true (1/2) ~= 0.5 this evaluate to false #hash (1/2) hash = 0.5 hash this evaluate to true (1/2) hash ~= 0.5 hash this evaluate to false Seeing the same with aconcagua | teaspoons aHalfTeaspoon anotherHalfTeaspoon | teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #= aHalfTeaspoon = anotherHalfTeaspoon this evaluate to true aHalfTeaspoon ~= anotherHalfTeaspoon this evaluate to false aHalfTeaspoon unit = anotherHalfTeaspoon unit this evaluate to true aHalfTeaspoon unit ~= anotherHalfTeaspoon unit this evaluate to false aHalfTeaspoon amount = anotherHalfTeaspoon amount this evaluate to true aHalfTeaspoon amount ~= anotherHalfTeaspoon amount this evaluate to false #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true aHalfTeaspoon hash ~= anotherHalfTeaspoon hash this evaluate to false aHalfTeaspoon unit hash = anotherHalfTeaspoon unit hash this evaluate to true aHalfTeaspoon unit hash ~= anotherHalfTeaspoon unit hash this evaluate to false aHalfTeaspoon amount hash = anotherHalfTeaspoon amount hash this evaluate to true aHalfTeaspoon amount hash ~= anotherHalfTeaspoon amount hash this evaluate to false So, I don't see where is the bug. Regards. Maxi 2014-05-20 4:14 GMT-03:00 Guillermo Polito guillermopol...@gmail.com: I don't know about aconcagua, but as far as I know we have to keep the following invariant to have well behaving hashed collections: if two objects a and b are equals, they should have the same hash. On Tue, May 20, 2014 at 8:34 AM, Sven Van Caekenberghe s...@stfx.euwrote: On 20 May 2014, at 08:17, p...@highoctane.be wrote: On Tue, May 20, 2014 at 7:28 AM, Sven Van Caekenberghe s...@stfx.eu wrote: So ? 1/2 hash ~= 0.5 hash ((1/2) hash = 0.5 hash) true Yes, with the () they're equal...
Re: [Pharo-dev] 32 bits and 64 bits VM
On 05/19/2014 05:01 PM, Eliot Miranda wrote: On Mon, May 19, 2014 at 1:01 PM, Damien Cassou damien.cas...@gmail.com mailto:damien.cassou-re5jqeeqqe8avxtiumw...@public.gmane.org wrote: On Mon, May 19, 2014 at 8:57 PM, Eliot Miranda eliot.miranda-re5jqeeqqe8avxtiumw...@public.gmane.org mailto:eliot.miranda-re5jqeeqqe8avxtiumw...@public.gmane.org wrote: Can you point me to this? I'd like to see if I can use it with my linux installs. it works in most of the supported Ubuntu releases: http://www.pharo-project.org/pharo-download/ubuntu Ah, oh. Am I right to think the magic command is sudo dpkg --add-architecture i386? If so is there a dpkg command to check if the i386 architecture has been installed? -- Damien Cassou http://damiencassou.seasidehosting.st Success is the ability to go from one failure to another without losing enthusiasm. Winston Churchill -- best, Eliot I am running Crunchbang #! Linux using the Jessie repositories. Crunchbang is a Debian distribution with only a number of preconfigured items, such as OpenBox, Tint2, etc. to give a nice out of the box Debian experience. The Ubuntu PPAs do not work well or could cause problems for Debian systems. From the pharo-vm GitHub page I downloaded and modified this script to work on my system. It should work on most any 64bit Debian Jessie/Testing and probably Sid/Unstable systems. I am not sure about Wheezy. https://github.com/pharo-project/pharo-vm/blob/master/scripts/setup-ubuntu.sh Download the above and edit. Or copy the below into a file and save. I called mine setup-pharo.sh. Hope this helps. Jimmie dpkg --add-architecture i386 apt-get update # INSTALL BUILD LIBRARIES == apt-get --yes install cmake zip bash-completion ruby git xz-utils debhelper devscripts apt-get --yes install libc6-dev:i386 libasound2:i386 libasound2-dev:i386 libasound2-plugins:i386 apt-get --yes install libssl-dev:i386 libssl1.0.0:i386 libfreetype6-dev:i386 libx11-dev:i386 libsm-dev:i386 libice-dev:i386 apt-get --yes install build-essential gcc-multilib g++ # due to https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/949606 we cannot directly install libgl1-mesa-dev:i386 apt-get --yes install libgl1-mesa-dev:i386 libgl1-mesa-glx:i386 #ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so /usr/lib/i386-linux-gnu/libGL.so #ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/mesa/libGL.so
Re: [Pharo-dev] WhatsUp from: 2014-05-19 until: 2014-05-31
Le 19/05/2014 07:00, seas...@rmod.lille.inria.fr a écrit : Hi! We're sending this automatic email twice a month, to give the community an opportunity to easily know what's happening and to coordinate efforts. Just answer informally, and feel free to spawn discussions thereafter! ### Here's what I've been up to since the last WhatsUp: - try to understand 32/64 bits status of interpreted VM, StackVM or CogVM. Looks like it is not clear, and I am still confused: there is definitely 64bits interpreted VM capable to run 32bits 1.4 Pharo image; does not work with 2.0 image, and newer plugin will be problem? Not clear answer regarding CogVM compiled with 64bits libs to run 32 bits image. - rebooting on Dr. Geo after a freeze of 7 months. Make it work on Pharo 2.0, several fixes, fix the mini-browser script problem using Nautillus for now https://bugs.launchpad.net/drgeo/+bugs?field.tag=pharo3 - iStoa continuing work: UI improvement, new activities. ### What's next, until 2014-05-31 (*): - Look at the situation regarding TextMorph rendering on Athens. First re-investigation showed the situation is still the same as sept. 2013. It is one of the final peace to get DrGeo fully working on Pharo2 with Athens and produce a newer release. - Update the iStoa build environment with the VM provided by Philip, it has a working keypad:) and it is linked against LTS distribution libs. - Release iStoa 14.06. - investigating again on the VM. (*) we'll be expecting results by then ;) -- Dr. Geo http://drgeo.eu
Re: [Pharo-dev] Pharo in Rasbian ?
Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.comwrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Pharo in Rasbian ?
Hi Juan, I don't know. I did not have enough time to try that. We should try, and see :) Jannik 2014-05-20 16:23 GMT+02:00 Juan smalltalker.marc...@gmail.com: Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.comwrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/ -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Pharo in Rasbian ?
Hi Jannick, I want to know about that too :) Thierry Le 20/05/2014 16:30, jannik laval a écrit : Hi Juan, I don't know. I did not have enough time to try that. We should try, and see :) Jannik 2014-05-20 16:23 GMT+02:00 Juan smalltalker.marc...@gmail.com mailto:smalltalker.marc...@gmail.com: Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.com mailto:jannik.la...@gmail.com wrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com mailto:alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/ -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/ -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Re: [Pharo-dev] Pharo in Rasbian ?
Do you have a snippet code to try it in Pharo ? Jannik 2014-05-20 16:34 GMT+02:00 Goubier Thierry thierry.goub...@cea.fr: Hi Jannick, I want to know about that too :) Thierry Le 20/05/2014 16:30, jannik laval a écrit : Hi Juan, I don't know. I did not have enough time to try that. We should try, and see :) Jannik 2014-05-20 16:23 GMT+02:00 Juan smalltalker.marc...@gmail.com mailto:smalltalker.marc...@gmail.com: Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.com mailto:jannik.la...@gmail.com wrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/ Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com mailto:alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/ -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/ -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
[Pharo-dev] Pharo contribution plot plugin update
Hi, I don’t have access to jenkins config, but it looks like the Plot Plugin[1] is not latest version. Can someone please update because they added support for matrix jobs. Uko [1] https://wiki.jenkins-ci.org/display/JENKINS/Plot+Plugin
Re: [Pharo-dev] WhatsUp from: 2014-05-19 until: 2014-05-31
Hi Hilaire, On May 20, 2014, at 6:53 AM, Hilaire Fernandes hilaire.fernan...@gmail.com wrote: Le 19/05/2014 07:00, seas...@rmod.lille.inria.fr a écrit : Hi! We're sending this automatic email twice a month, to give the community an opportunity to easily know what's happening and to coordinate efforts. Just answer informally, and feel free to spawn discussions thereafter! ### Here's what I've been up to since the last WhatsUp: - try to understand 32/64 bits status of interpreted VM, StackVM or CogVM. Looks like it is not clear, and I am still confused: there is definitely 64bits interpreted VM capable to run 32bits 1.4 Pharo image; does not work with 2.0 image, and newer plugin will be problem? Not clear answer regarding CogVM compiled with 64bits libs to run 32 bits image. you'll get quick answers if you ask on vm-dev. Currently I knowoif no work to allow Cog to be compiled 64-bit to run a 32-bit image. we're working towards 64-bit compiled with 64-but image. Eliot (phone) - rebooting on Dr. Geo after a freeze of 7 months. Make it work on Pharo 2.0, several fixes, fix the mini-browser script problem using Nautillus for now https://bugs.launchpad.net/drgeo/+bugs?field.tag=pharo3 - iStoa continuing work: UI improvement, new activities. ### What's next, until 2014-05-31 (*): - Look at the situation regarding TextMorph rendering on Athens. First re-investigation showed the situation is still the same as sept. 2013. It is one of the final peace to get DrGeo fully working on Pharo2 with Athens and produce a newer release. - Update the iStoa build environment with the VM provided by Philip, it has a working keypad:) and it is linked against LTS distribution libs. - Release iStoa 14.06. - investigating again on the VM. (*) we'll be expecting results by then ;) -- Dr. Geo http://drgeo.eu
Re: [Pharo-dev] Pharo in Rasbian ?
2014-05-20 16:23 GMT+02:00 Juan smalltalker.marc...@gmail.com: Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? FFI for the raspberry pie was finished for the Pharo vm 3 weeks ago. So I guess the Phratch team has not found the time yet to do that, but it should be possible. thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.comwrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Mustache
Well if you get a few minutes and feel like doing something send a pull request with the changes to their github pages site you'd like to see. Makes it easy on them. NorbertHartl wrote I tried that already. But as with most hipster projects nobody feels responsible anymore. I contacted the original author but I he has nothing to do anymore with it. I tried to track it down (because besides a cool ascii art picture there is no contact data on the site) und even found I guy I know from berlin but he didn’t respond. So I decided I have better things to do then to run after people which don’t care about their project… Norbert Am 20.05.2014 um 15:06 schrieb Torsten Bergmann lt; astares@ gt;: Hi Norbert, http://mustache.github.io/ does not mention the port for Pharo Smalltalk. Maybe you should contact them to add a link to http://smalltalkhub.com/#!/~NorbertHartl/Mustache. Such links can help getting more visibility. Thx T. -- View this message in context: http://forum.world.st/Mustache-tp4759684p4759709.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] Mustache
Moustache is, supposedly, heavy used by Twitter itself. Not with its JS version, but with its Java implementation. So the project is not dead. Although it probably was created as a hipster project in its beginning. Esteban A. Maringolo 2014-05-20 12:12 GMT-03:00 Paul DeBruicker pdebr...@gmail.com: Well if you get a few minutes and feel like doing something send a pull request with the changes to their github pages site you'd like to see. Makes it easy on them. NorbertHartl wrote I tried that already. But as with most hipster projects nobody feels responsible anymore. I contacted the original author but I he has nothing to do anymore with it. I tried to track it down (because besides a cool ascii art picture there is no contact data on the site) und even found I guy I know from berlin but he didn’t respond. So I decided I have better things to do then to run after people which don’t care about their project… Norbert Am 20.05.2014 um 15:06 schrieb Torsten Bergmann lt; astares@ gt;: Hi Norbert, http://mustache.github.io/ does not mention the port for Pharo Smalltalk. Maybe you should contact them to add a link to http://smalltalkhub.com/#!/~NorbertHartl/Mustache. Such links can help getting more visibility. Thx T. -- View this message in context: http://forum.world.st/Mustache-tp4759684p4759709.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] Pharo in Rasbian ?
Clement I think, ffi can enable access to GPIO via a plugin, slope is then the job of making this plugin right? best jmdc On Tue, May 20, 2014 at 12:06 PM, Clément Bera bera.clem...@gmail.comwrote: 2014-05-20 16:23 GMT+02:00 Juan smalltalker.marc...@gmail.com: Jannik the phratch proyect provides access to GPIO port? ffi to achieve such access is available? any ideas? FFI for the raspberry pie was finished for the Pharo vm 3 weeks ago. So I guess the Phratch team has not found the time yet to do that, but it should be possible. thanks in advance best jmdc On Tue, May 20, 2014 at 10:36 AM, jannik laval jannik.la...@gmail.comwrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Pharo in Rasbian ?
Hi! My point was the following: why Phratch is not included in the default setting of Rasbian? Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 20, 2014, at 9:36 AM, jannik laval jannik.la...@gmail.com wrote: Hi, Probably he does not know phratch for Rasberry-Pi: https://ci.inria.fr/pharo-contribution/view/Phratch/job/Phratch-OneClick-RPi/ Cheers :) 2014-05-20 15:32 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi! A friend of mine recently bought a Raspberry pi and installed Rasbian, a Debian-like OS for Raspberry. Squeak and Scratch are installed per default. There is room to fill here... image001.png Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- ~~Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://car.mines-douai.fr/
Re: [Pharo-dev] Pharo in Rasbian ?
Ah okay, this is an answer that I understand :-) We are not really good at promoting what we are doing. For the the case of Rasbian, it seems not that difficult to have Phratch and Pharo installed per default, if there is Scratch and Squeak. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 20, 2014, at 11:06 AM, Clément Bera bera.clem...@gmail.com wrote: FFI for the raspberry pie was finished for the Pharo vm 3 weeks ago. So I guess the Phratch team has not found the time yet to do that, but it should be possible.
Re: [Pharo-dev] Pharo contribution plot plugin update
Done! Le 20 mai 2014 à 16:55, Yuriy Tymchuk a écrit : Hi, I don’t have access to jenkins config, but it looks like the Plot Plugin[1] is not latest version. Can someone please update because they added support for matrix jobs. Uko [1] https://wiki.jenkins-ci.org/display/JENKINS/Plot+Plugin smime.p7s Description: S/MIME cryptographic signature
Re: [Pharo-dev] Pharo in Rasbian ?
FFI for the raspberry pie was finished for the Pharo vm 3 weeks ago. Wait a second. Nope. FFI, have been implemented and integrated on CogVM repository by Doug since 3 week, yes, not in Pharo repository. There are small differences between CogVM and PharoVM. A simple operation of extraction, installation, test , merge with the stable pharoS-vm rasp. So 3 week ago I extracted the code of Doug from the CogVM repository, I install it on my own jenkins. But nothing is integrated yet, except in my repository. Where also the OSProcess is currently tested. But no it is not in the latest pharos on raspberry. On 20 May 2014, at 17:43, Alexandre Bergel alexandre.ber...@me.com wrote: Ah okay, this is an answer that I understand :-) We are not really good at promoting what we are doing. For the the case of Rasbian, it seems not that difficult to have Phratch and Pharo installed per default, if there is Scratch and Squeak. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 20, 2014, at 11:06 AM, Clément Bera bera.clem...@gmail.com wrote: FFI for the raspberry pie was finished for the Pharo vm 3 weeks ago. So I guess the Phratch team has not found the time yet to do that, but it should be possible. Best Regards Jean Baptiste Arnaud jbaptiste.arn...@gmail.com
Re: [Pharo-dev] Aconcagua Hashing Bug?
2014-05-20 8:17 GMT+02:00 p...@highoctane.be p...@highoctane.be: On Tue, May 20, 2014 at 7:28 AM, Sven Van Caekenberghe s...@stfx.euwrote: So ? 1/2 hash ~= 0.5 hash ((1/2) hash = 0.5 hash) true ((1/2) hash ~= 0.5 hash) true and ((1/3) hash =(1.0/3) hash) false The implementation (in 3.0) has a special case for denominator is a power of 2: Fractionhash Hash is reimplemented because = is implemented. Care is taken that a Fraction equal to a Float also have an equal hash | tmp | denominator isPowerOfTwo ifTrue: [ If denominator is a power of two, I can be exactly equal to a Float tmp := self asFloat. tmp isFinite ifTrue: [^tmp hash]]. Else, I cannot be exactly equal to a Float, use own hash algorithm. (Assume the fraction is already reduced) ^numerator hash bitXor: denominator hash Floathash Hash is reimplemented because = is implemented. Both words of the float are used; 8 bits are removed from each end to clear most of the exponent regardless of the byte ordering. (The bitAnd:'s ensure that the intermediate results do not become a large integer.) Slower than the original version in the ratios 12:5 to 2:1 depending on values. (DNS, 11 May, 1997) (self isFinite and: [self fractionPart = 0.0]) ifTrue: [^self truncated hash]. ^ (((self basicAt: 1) bitAnd: 16r0000) + ((self basicAt: 2) bitAnd: 16r0000)) bitShift: -8 Mmmh, I am curious to know what the rationale for this is. A Float exact representation is of the form (-1 raisedTo: signBit) * integerSignificand * (2 raisedTo: biasedExponent). Thus it is either an Integer, or a Fraction whose denominator is a power of 2 (when biasedExponent 0). In Squeak and Pharo, Float equality versus other numbers is based on equality of exact representation. I think this has been changed too in Dolphin and gst, but not in VW. So a naive implementation of hash matching those equality rules could be Floathash ^self asTrueFraction hash But we try to avoid sending asTrueFraction because it costs (involves LargeInt arithmetic), so the logic for hash is: if Float can be an integer, convert it to integer. if Fraction could be a Float, convert it to Float. Note that we could also check the other requirement (Fraction numerator highBitOfMagnitude = Float precision). Also note that ^ (((self basicAt: 1) bitAnd: 16r0000) + ((self basicAt: 2) bitAnd: 16r0000)) bitShift: -8 is the historical Squeak hash method for Float and is really POOR (many collisions, only half bits are used !!!) I think I changed it in Squeak, but can't remember. Getting into: FractionisPowerOfTwo |reduced| reduced := self reduced. ^(reduced numerator = 1 and: [reduced denominator isPowerOfTwo]) or: [reduced denominator = 1 and: [reduced numerator isPowerOfTwo]] calls in reduced, which in turn calls gcd: ... That's quite something to be aware of. I don't see no need for reduced here. All Fraction are (should be) reduced. replaced reduced by self, and you won't get any gcd: Phil I mean what would you expect, how should this have to work ? Maybe the hashing specialists have something to say about this. On 20 May 2014, at 01:38, Sean P. DeNigris s...@clipperadams.com wrote: (1/2) teaspoons hash ~= 0.5 teaspoons hash b.t.w. Phexample caught this automatically because it checks hashes when comparing for equality... pretty cool - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
2014-05-20 4:42 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Some students have also tried to update Pharo using the update stream. Is this still used? Should nt it be removed Alexandre How I see it: Pharo team wants to perform deep changes into the system. Pharo team wants to perform those changes fast, and not be swamped like they think squeak is (it sure was! but let's say that Squeak values backward compatibility which is naturally a drag). It might be difficult/take a long time to find a way to perform these changes in a reproducible way in customers' images. So the philosophy it let updateStream tools available, but do not bother with update stream if it's too difficult. It's without any guaranty and I often saw it fail (once every few dozens of updates...) I'd say keep it as is. Nicolas Le 19-05-2014 à 15:49, kilon alios kilon.al...@gmail.com a écrit : I felt adventurous today, so I said what the hell lets try to update Pharo with the updater tool. So I used world menu navigated to system and choose software update. And after a long download and method's compiling the attached image appeared :) Screen Shot 2014-05-19 at 22.46.28.png
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
On 20 May 2014, at 19:49, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com wrote: 2014-05-20 4:42 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Some students have also tried to update Pharo using the update stream. Is this still used? Should nt it be removed Alexandre How I see it: Pharo team wants to perform deep changes into the system. Pharo team wants to perform those changes fast, and not be swamped like they think squeak is (it sure was! but let's say that Squeak values backward compatibility which is naturally a drag). It might be difficult/take a long time to find a way to perform these changes in a reproducible way in customers' images. So the philosophy it let updateStream tools available, but do not bother with update stream if it's too difficult. It's without any guaranty and I often saw it fail (once every few dozens of updates...) I'd say keep it as is. Pretty good summary, maybe we should make it less accessible... Nicolas Le 19-05-2014 à 15:49, kilon alios kilon.al...@gmail.com a écrit : I felt adventurous today, so I said what the hell lets try to update Pharo with the updater tool. So I used world menu navigated to system and choose software update. And after a long download and method's compiling the attached image appeared :) Screen Shot 2014-05-19 at 22.46.28.png
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
Hi Nicolas, I completely agree with you. I was wondering what is the relevance of having the “Software update” menu entry if it does not work? Maybe it should be simply removed? It will make menu shorter and less error prone. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 20, 2014, at 1:49 PM, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com wrote: 2014-05-20 4:42 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Some students have also tried to update Pharo using the update stream. Is this still used? Should nt it be removed Alexandre How I see it: Pharo team wants to perform deep changes into the system. Pharo team wants to perform those changes fast, and not be swamped like they think squeak is (it sure was! but let's say that Squeak values backward compatibility which is naturally a drag). It might be difficult/take a long time to find a way to perform these changes in a reproducible way in customers' images. So the philosophy it let updateStream tools available, but do not bother with update stream if it's too difficult. It's without any guaranty and I often saw it fail (once every few dozens of updates...) I'd say keep it as is. Nicolas Le 19-05-2014 à 15:49, kilon alios kilon.al...@gmail.com a écrit : I felt adventurous today, so I said what the hell lets try to update Pharo with the updater tool. So I used world menu navigated to system and choose software update. And after a long download and method's compiling the attached image appeared :) Screen Shot 2014-05-19 at 22.46.28.png
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
2014-05-20 21:52 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Hi Nicolas, I completely agree with you. I was wondering what is the relevance of having the “Software update” menu entry if it does not work? Maybe it should be simply removed? It will make menu shorter and less error prone. Alexandre Well, I allways favoured updating to downloading and restarting from scratch - it's less involved, like I don't re-install a linux from scratch more than once or twice a year, and I'm sure I'm not alone. If we are prepared to see it failing, it does not really matter, it's in the contract... The only problem is to be aware of this contract and avoid negative impression. Maybe an advanced menu triggered by some preference? Nicolas -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. On May 20, 2014, at 1:49 PM, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com wrote: 2014-05-20 4:42 GMT+02:00 Alexandre Bergel alexandre.ber...@me.com: Some students have also tried to update Pharo using the update stream. Is this still used? Should nt it be removed Alexandre How I see it: Pharo team wants to perform deep changes into the system. Pharo team wants to perform those changes fast, and not be swamped like they think squeak is (it sure was! but let's say that Squeak values backward compatibility which is naturally a drag). It might be difficult/take a long time to find a way to perform these changes in a reproducible way in customers' images. So the philosophy it let updateStream tools available, but do not bother with update stream if it's too difficult. It's without any guaranty and I often saw it fail (once every few dozens of updates...) I'd say keep it as is. Nicolas Le 19-05-2014 à 15:49, kilon alios kilon.al...@gmail.com a écrit : I felt adventurous today, so I said what the hell lets try to update Pharo with the updater tool. So I used world menu navigated to system and choose software update. And after a long download and method's compiling the attached image appeared :) Screen Shot 2014-05-19 at 22.46.28.png
Re: [Pharo-dev] Aconcagua Hashing Bug?
Maximiliano Taborda wrote Seeing the same with aconcagua ... teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true So, I don't see where is the bug. It seems to only appear when comparing measures with derived units... baseUnit := BaseUnit named: 'tablespoon'. unit := ProportionalDerivedUnit baseUnit: baseUnit conversionFactor: 1/3 named: 'teaspoon'. m1 := Measure amount: 1/2 unit: unit. m2 := Measure amount: 0.5 unit: unit. m1 hash = m2 hash. this evaluate to false - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759745.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
2014-05-20 17:21 GMT-03:00 Nicolas Cellier nicolas.cellier.aka.n...@gmail.com: If we are prepared to see it failing, it does not really matter, it's in the contract... The only problem is to be aware of this contract and avoid negative impression. Maybe an advanced menu triggered by some preference? Or a one liner: Smalltalk upgrade Possible with a warning (muteable) to avoid unintended executions, and enable unattended (i.e. scripted) upgrades. Regards.
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
2014-05-20 22:00 GMT+01:00 Esteban A. Maringolo emaring...@gmail.com: 2014-05-20 17:21 GMT-03:00 Nicolas Cellier nicolas.cellier.aka.n...@gmail.com: If we are prepared to see it failing, it does not really matter, it's in the contract... The only problem is to be aware of this contract and avoid negative impression. Maybe an advanced menu triggered by some preference? Or a one liner: Smalltalk upgrade Possible with a warning (muteable) to avoid unintended executions, and enable unattended (i.e. scripted) upgrades. Regards. +1!
Re: [Pharo-dev] The funny side of Pharo : Message Definitely Not Understood
On 05/20/2014 04:00 PM, Esteban A. Maringolo wrote: 2014-05-20 17:21 GMT-03:00 Nicolas Cellier nicolas.cellier.aka.nice-re5jqeeqqe8avxtiumw...@public.gmane.org: If we are prepared to see it failing, it does not really matter, it's in the contract... The only problem is to be aware of this contract and avoid negative impression. Maybe an advanced menu triggered by some preference? Or a one liner: Smalltalk upgrade Possible with a warning (muteable) to avoid unintended executions, and enable unattended (i.e. scripted) upgrades. Regards. Or even also something like Smalltalk snapshotAndUpgrade or Smalltalk saveImageAndUpgrade That way the images current state is saved or snapshotted and if the upgrade messes everything up, you are back to where you were before the upgrade. Just a thought. Jimmie
Re: [Pharo-dev] Pharo contribution plot plugin update
Thank you! On 20 May 2014, at 17:48, Christophe Demarey christophe.dema...@inria.fr wrote: Done! Le 20 mai 2014 à 16:55, Yuriy Tymchuk a écrit : Hi, I don’t have access to jenkins config, but it looks like the Plot Plugin[1] is not latest version. Can someone please update because they added support for matrix jobs. Uko [1] https://wiki.jenkins-ci.org/display/JENKINS/Plot+Plugin
[Pharo-dev] NewList without Icons
Hi, anyone knows how to use NewList without icons. Background: I have a collection with 5000 entries, every entry is a list of 20 strings. Inspecting this collection works, but scrolling the left pane of the inspector window is awfully slow. This is unexpected, as the only changing visual parts are the collection indices. For exampel, inspect the following collection: (1 to:5000) collect:[:x | (1 to:20) collect:[:t| t asString] ]. Dragging the scrollbar (or only dragging the window) is slow. Ok, there are many entries, but now, change this method (return nil instead of accessing the cache) NewList#iconForItem:at: ^nil ^ iconCache at: anItem ifAbsentPut: [ (self model iconForItem: anItem at: anIndex) asMorph ] scrolling is smooth. The problem is, accessing the iconCache calls #hash on anItem, which is an IndexedEyeElement and this calls hash on its index AND on the value (the string array). The funny thing is, eyeinspector does not provide any icons at all. Therefore, is there a way to create the NewList and tell it to NEVER ask for icons? regards Nicolai
Re: [Pharo-dev] Aconcagua Hashing Bug?
On Tue, May 20, 2014 at 1:45 PM, Sean P. DeNigris s...@clipperadams.comwrote: Maximiliano Taborda wrote Seeing the same with aconcagua ... teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true So, I don't see where is the bug. It seems to only appear when comparing measures with derived units... baseUnit := BaseUnit named: 'tablespoon'. unit := ProportionalDerivedUnit baseUnit: baseUnit conversionFactor: 1/3 named: 'teaspoon'. m1 := Measure amount: 1/2 unit: unit. m2 := Measure amount: 0.5 unit: unit. m1 hash = m2 hash. this evaluate to false are you surprised? 0.5 * 0.5 = (1/2 * (1/2)) true 0.5 / 3 = (1/2 * (1/3)) false You can't divide floats by 3 and get an exact answer: 0.5 / 3 = 0.1 (1/2)/3 = (1/6) - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759745.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. -- best, Eliot
Re: [Pharo-dev] Aconcagua Hashing Bug?
2014-05-21 0:16 GMT+02:00 Eliot Miranda eliot.mira...@gmail.com: On Tue, May 20, 2014 at 1:45 PM, Sean P. DeNigris s...@clipperadams.comwrote: Maximiliano Taborda wrote Seeing the same with aconcagua ... teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true So, I don't see where is the bug. It seems to only appear when comparing measures with derived units... baseUnit := BaseUnit named: 'tablespoon'. unit := ProportionalDerivedUnit baseUnit: baseUnit conversionFactor: 1/3 named: 'teaspoon'. m1 := Measure amount: 1/2 unit: unit. m2 := Measure amount: 0.5 unit: unit. m1 hash = m2 hash. this evaluate to false are you surprised? 0.5 * 0.5 = (1/2 * (1/2)) true 0.5 / 3 = (1/2 * (1/3)) false You can't divide floats by 3 and get an exact answer: 0.5 / 3 = 0.1 (1/2)/3 = (1/6) Good find! Use a smaller spoon, like 1/4 ;) - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759745.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. -- best, Eliot
Re: [Pharo-dev] Aconcagua Hashing Bug?
Or just use ScaledDecimal instead of Float 0.5 asScaledDecimal * 0.5 asScaledDecimal = (1/2 * (1/2)) true 0.5 asScaledDecimal / 3 = (1/2 * (1/3)) true 2014-05-20 19:21 GMT-03:00 Nicolas Cellier nicolas.cellier.aka.n...@gmail.com: 2014-05-21 0:16 GMT+02:00 Eliot Miranda eliot.mira...@gmail.com: On Tue, May 20, 2014 at 1:45 PM, Sean P. DeNigris s...@clipperadams.comwrote: Maximiliano Taborda wrote Seeing the same with aconcagua ... teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true So, I don't see where is the bug. It seems to only appear when comparing measures with derived units... baseUnit := BaseUnit named: 'tablespoon'. unit := ProportionalDerivedUnit baseUnit: baseUnit conversionFactor: 1/3 named: 'teaspoon'. m1 := Measure amount: 1/2 unit: unit. m2 := Measure amount: 0.5 unit: unit. m1 hash = m2 hash. this evaluate to false are you surprised? 0.5 * 0.5 = (1/2 * (1/2)) true 0.5 / 3 = (1/2 * (1/3)) false You can't divide floats by 3 and get an exact answer: 0.5 / 3 = 0.1 (1/2)/3 = (1/6) Good find! Use a smaller spoon, like 1/4 ;) - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759745.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. -- best, Eliot
Re: [Pharo-dev] Aconcagua Hashing Bug?
If you see the code at #hash method for class Measure, your realize that this class converts the amount of the measure to its base unit and then sends hash to this converted value. So, for the case where you have 1/2 teaspoon the #hash method, after some conversions, this does: (1/2) * (1/3) = (1/6) then, obtain the hash of the fraction 1/6 = 7. The same goes for your 0.5 teaspoon. But, because floats are bad guys, this is what happens: 0.5 * (1/3) = 0.1 (like Eliot shows) then, obtain the hash for this ugly float = 72362. Its ok or not, well, thats depends. If you need a more precise number, use fractions or scaled decimals. 2014-05-20 21:07 GMT-03:00 Maximiliano Taborda mtabo...@gmail.com: Or just use ScaledDecimal instead of Float 0.5 asScaledDecimal * 0.5 asScaledDecimal = (1/2 * (1/2)) true 0.5 asScaledDecimal / 3 = (1/2 * (1/3)) true 2014-05-20 19:21 GMT-03:00 Nicolas Cellier nicolas.cellier.aka.n...@gmail.com: 2014-05-21 0:16 GMT+02:00 Eliot Miranda eliot.mira...@gmail.com: On Tue, May 20, 2014 at 1:45 PM, Sean P. DeNigris s...@clipperadams.com wrote: Maximiliano Taborda wrote Seeing the same with aconcagua ... teaspoons := BaseUnit named: 'teaspoons'. aHalfTeaspoon := Measure amount: 1/2 unit: teaspoons. anotherHalfTeaspoon := Measure amount: 0.5 unit: teaspoons. #hash aHalfTeaspoon hash = anotherHalfTeaspoon hash this evaluate to true So, I don't see where is the bug. It seems to only appear when comparing measures with derived units... baseUnit := BaseUnit named: 'tablespoon'. unit := ProportionalDerivedUnit baseUnit: baseUnit conversionFactor: 1/3 named: 'teaspoon'. m1 := Measure amount: 1/2 unit: unit. m2 := Measure amount: 0.5 unit: unit. m1 hash = m2 hash. this evaluate to false are you surprised? 0.5 * 0.5 = (1/2 * (1/2)) true 0.5 / 3 = (1/2 * (1/3)) false You can't divide floats by 3 and get an exact answer: 0.5 / 3 = 0.1 (1/2)/3 = (1/6) Good find! Use a smaller spoon, like 1/4 ;) - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759745.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. -- best, Eliot
Re: [Pharo-dev] Aconcagua Hashing Bug?
Eliot Miranda-2 wrote You can't divide floats by 3 and get an exact answer: 0.5 / 3 = 0.1 Duh :) Thank you. - Cheers, Sean -- View this message in context: http://forum.world.st/Aconcagua-Hashing-Bug-tp4759622p4759779.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Re: [Pharo-dev] Advice for a newb
Thanks for the advice. I have spent some quality time with Monticello. In the end I’ve made a copy of Duration and DurationTest and I’m working on that. I’m not doing the image juggling you describe below however. I don’t really understand why that workflow is worth the cost so I’ll just keep getting closer to the stove until I get burned. I’ll (probably) learn then. —Rick On May 19, 2014 at 8:53:10 PM, Ron Teitelbaum (r...@usmedrec.com) wrote: Hi Rick, Change sets and changes file will save you no matter how you crash your image. Saving your image after development is dangerous, I don’t recommend it. What I do is make a change set. I’ll develop and then when I’m ready to start testing I’ll file it out. I’ll do some testing blow up develop more. If I forget to file out the change set the changes file is your friend. World menu - changes… - recently logged changes … will give you a nice list of the last things you did. It’s quite easy to filter out stuff and get a nice list of changes, and file them in. It is very hard to lose code. When you get to a good point and want to save your state always start from your last saved image. Load your change set, save your changes to Monticello, or your own favorite repo. Exit, load your changes from your repo, clean your image and save. Now your recently logged changes will have another nice clean entry. Rinse and repeat. Hope that helps. All the best, Ron Teitelbaum Head Of Engineering 3d Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum www.3dicc.com https://www.google.com/+3dicc From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of Rick Kitts Sent: Monday, May 19, 2014 10:41 PM To: Pharo Development List Subject: [Pharo-dev] Advice for a newb Hello. I was wondering if anyone could point me to or otherwise suggest some best practices for working on Kernel code. I’m futzing about with the Duration class (in the interest of fixing 13215) and have discovered that it’s really easy to crash Pharo if I break that class. I assume there are other classes that would exhibit the same behavior. I suppose I could just be really cautious and save my image after every change but that seems so error prone that I’m hoping that there are idiomatic ways of working on kernel code (beyond just save ones image early and often) so I don’t lose work. I’m asking because the naive solution (copy the original class, modify it to suit, delete the original and rename the new class to the original) of course doesn’t work. TIA for any suggestions or assistance and apologies in advance if this is RTFM, I didn’t see anything (didn’t look very hard either though). —Rick