Re: [Newbies] Re: Recap: How to empty a collection

2008-02-20 Thread Bert Freudenberg
On Feb 20, 2008, at 2:01 , nicolas cellier wrote: One thing I wasn't clear on is whether Bert's suggestion: aColl removeAllSuchThat: [:anElement| true]. Is okay, and why it's okay while many of the other similar approaches were not. Bert's suggestion is simple and works well. The only

Re: [Newbies] Re: Recap: How to empty a collection

2008-02-20 Thread Janko Mivšek
Ok, I reimplemented this method as Bert suggested and in the next version of Aida/Web it will be: OrderedCollectionremoveAll remove all elements quickly self removeAllSuchThat: [:each | true]. Squeak specific self become: OrderedCollection new VW specific Note that this method is

Re: [Newbies] More Morphic Fun

2008-02-20 Thread Edgar J. De Cleene
El 2/19/08 11:22 PM, Jeffrey Straszheim [EMAIL PROTECTED] escribió: I want to create a container -- a panel -- that will contain other Morphs, but within which I can drag the morphs around. If the more were dragged out from the container it should be deleted. What is the most

Re: [Newbies] is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread Bert Freudenberg
On Feb 20, 2008, at 11:31 , cdrick wrote: I think 0.1 should be considered as a ScaledDecimal so that we could write 0.1 asFraction and have 1/10... To achieve that, ... write it as 0.1s1 - Bert - ___ Beginners mailing list

Re: [Newbies] is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread cdrick
Computers generally do what you tell them, not what you mean. 0.1 does have a different meaning than 1/10 in computing land. If you mean a fraction, write a fraction. If you mean a float, write a dotted decimal. Smalltalk even has means to write fractions as decimals (0.1s1). So simply

[Newbies] Named Primitives et al

2008-02-20 Thread david.briant
Hi I'm looking to hook up my own dlls (and some of the standard windows ones too in due course) to Squeak. I've been through the named-primitive tutorial and it appears that it is for earlier versions of Squeak than the present version. Can anyone point me in the right direction to calling a C

Re: [Newbies] is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread Bert Freudenberg
On Feb 20, 2008, at 14:21 , cdrick wrote: To achieve that, ... write it as 0.1s1 ok, so 0.1 asFraction (3602879701896397/36028797018963968) is no problem ;-) Indeed, because it is correct. Perhaps #asApproximateFraction is what you are after. The problem I have is the intention... I

Re: [Newbies] is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread cdrick
To achieve that, ... write it as 0.1s1 ok, so 0.1 asFraction (3602879701896397/36028797018963968) is no problem ;-) The problem I have is the intention... I think everybody who writes/enters 0.1 means 1/10... and not a flotting point value... Float to me is more a computer number more than

Re: [Newbies] Named Primitives et al

2008-02-20 Thread cdrick
Hi I'm looking to hook up my own dlls (and some of the standard windows ones too in due course) to Squeak. I've been through the named-primitive tutorial and it appears that it is for earlier versions of Squeak than the present version. Can anyone point me in the right direction to calling a

RE: [Newbies] Named Primitives et al

2008-02-20 Thread david.briant
Thx. I've read that article but I can't find an ExternalTypes class in my image. Do I need to load a particular package to get NamedPrimitives or FFI to work? Thx David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of cdrick Sent: 20 February 2008

Re: [Newbies] Named Primitives et al

2008-02-20 Thread cdrick
depends on your image... Maybe it's not loaded as in 3.9 and later... Go and see in Universe Browser (open menu) under the category system then select the different FFI-categories and install them. Maybe you'll have to make an update list from network in the Universe Browser first. HTH Cédrick

[Newbies] ordinary #hash and Dictionary [was: Recap: How to empty a collection]

2008-02-20 Thread Klaus D. Witzel
On Wed, 20 Feb 2008 00:59:57 +0100, nicolas cellier wrote: ... I see, become: does exchange #identityHash, and that makes our IdentityDictionary work, god thanks, but there is no such provision for ordinary #hash and Dictionary... But there are sufficient provisions in place, since

[Newbies] Re: is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread Louis LaBrunda
I have another interrogation. Please take it as a student/newbie whatever question. I think 0.1 should be considered as a ScaledDecimal so that we could write 0.1 asFraction and have 1/10... What you desire is admirable but no longer practical as it would break a great many existing

Re: [Newbies] Re: is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread cdrick
What you desire is admirable but no longer practical as it would break a great many existing programs. Yep, that's a BIG problem :-) [snip] between different manufactures computers. After a while, computers supported integers, floating point numbers and IBM mainframes had packed decimal

Re: [Newbies] Re: is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread cdrick
I don't know what you are working on but if you use fractions for what you are doing it would be interesting to hear about how you use them and your results. Because fractions are kept as an integer numerator and an integer denominator, they probably take up more memory than floats but less

Re[2]: [Newbies] Named Primitives et al

2008-02-20 Thread Herbert König
Hello David, dbuc Thx. I've read that article but I can't find an dbuc ExternalTypes class in my image. Do I need to load a particular dbuc package to get NamedPrimitives or FFI to work? maybe you are not aware of the fact that FFI and namedPrimitives are two independent ways to talk to external

Re: [Newbies] Re: is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread cdrick
Waaah, belief and plausibility as sum over numbers; shudder; political-systems-failure through machine calculations; market-meltdown through machine calculations; poverty-for-everyone through machine calculations :( Anyways, have you compared to Pei Wang's NARS (or perhaps his The limitation

[Newbies] Re: is 0.1 a Float or a ScaledDecimal ?

2008-02-20 Thread Klaus D. Witzel
On Wed, 20 Feb 2008 18:27:09 +0100, cdrick wrote: ... I think all this is premature optimization for me :) as I'm only building an early prototype (I'm doing a start of Dempster Shafer Theory [1] implementation (actually Transferable Belief Model)... and it's won't reach a big size for a while.

[Newbies] Re: ordinary #hash and Dictionary [was: Recap: How to empty a collection]

2008-02-20 Thread nicolas cellier
Klaus D. Witzel a écrit : On Wed, 20 Feb 2008 00:59:57 +0100, nicolas cellier wrote: ... I see, become: does exchange #identityHash, and that makes our IdentityDictionary work, god thanks, but there is no such provision for ordinary #hash and Dictionary... But there are sufficient

[Newbies] Re: Recap: How to empty a collection

2008-02-20 Thread nicolas cellier
Klaus D. Witzel a écrit : On Wed, 20 Feb 2008 02:01:49 +0100, nicolas cellier wrote: Some proposed an alternative based on (self removeAll: self), and started writing optimized versions of #removeAll:. No, (anOrderedCollection removeAll: anOrderedCollection) was not optimized. It had a

[Newbies] The bouncing sound

2008-02-20 Thread polishookm
Im finding that with [Rectangle forward by 5] [Rectangle bounce silence] the rectangle eventually collides with the top of the world and bounces off in the opposite direction - with no sound ... the bounce is silent. However, this script [Rectangle forward by JoyStick's upDown * 8]

Re: [Newbies] The bouncing sound

2008-02-20 Thread Scott Wallace
Hi, polishookm, I cannot reproduce the phenomenon you describe in any image I have close to hand -- not in Squeak 3.9, not in Squeakland3.8-05, and not in the OLPC etoys image. (Can anyone else?) What version of Squeak are you using? If it's 3.10, I'll leave it for other 3.10 users to

[Newbies] Re: ordinary #hash and Dictionary [was: Recap: How to empty a collection]

2008-02-20 Thread Klaus D. Witzel
On Wed, 20 Feb 2008 22:12:57 +0100, nicolas cellier wrote: Klaus D. Witzel a écrit : On Wed, 20 Feb 2008 00:59:57 +0100, nicolas cellier wrote: ... I see, become: does exchange #identityHash, and that makes our IdentityDictionary work, god thanks, but there is no such provision for

[Newbies] Re: Recap: How to empty a collection

2008-02-20 Thread Klaus D. Witzel
On Wed, 20 Feb 2008 23:05:47 +0100, nicolas cellier wrote: Klaus D. Witzel a écrit : On Wed, 20 Feb 2008 02:01:49 +0100, nicolas cellier wrote: Some proposed an alternative based on (self removeAll: self), and started writing optimized versions of #removeAll:. No, (anOrderedCollection

Re: [Newbies] The bouncing sound

2008-02-20 Thread Scott Wallace
Hi, Mark, What you're hearing is not a sound associated with the bounce but rather a sound associated with an object hitting the fence. The fence is a feature that makes a forward command which would take an object beyond the edge of its container result in the the object's jiggling back