Re: [Newbies] problem with numbers

2009-07-14 Thread johnps11
Try searching on "subtractive cancellation" on google for information on strategies to avoid this kind of thing. One is to treat (a-b) as (a^2 - b^2)/(a+b), which can reduce the relative error in some cases. Unfortunately the exact strategy often depends on the numbers used and the hardware it run

Re: [Newbies] What's wrong with this statement?

2008-07-31 Thread johnps11
> El 7/31/08 5:31 PM, "Timothy J Miller" <[EMAIL PROTECTED]> escribió: > >> >> On Jul 31, 2008, at 2:54 PM, Edgar J. De Cleene wrote: >>> But (2 raisedTo: 128) atRandom could genetate >>> 49572205802560219958060582892667404289 >>> >>> and >>> 49572205802560219958060582892667404289 hex also is wron

Re: [Newbies] What's wrong with this statement?

2008-07-31 Thread johnps11
The issue is almost certainly in atRandom: Running 30 timesRepeat: [ | a | a:= (2 raisedTo: 57) atRandom. Transcript show: a ; show: ' ' ; show: a even ; cr ]. Gives me 30 falses. The odds of that are less than one in a billion (assuming uniformly distributed integers). This doesn't

Re: [Newbies] reading from named pipes

2008-05-22 Thread johnps11
> Hi there, > > I'm trying to read from a named pipe. I'm on Linux (Ubuntu 8.04). > >- I created the pipe using mkfifo >- I can write to it, and when I cat the pipe within another terminal I >see the output. >- I've tried using various combinations of FileStream, >OSProcess-Ext

Re: [Newbies] Linux locks up when handling large data sets

2008-05-03 Thread johnps11
> Quoting [EMAIL PROTECTED]: > >> Hi Stan! > > Hi John, not confusing- an excellent response, thanks. > > With the memory option it also cruises on under Linux, until it freezes at > 70 > million objects. > > While it's still loading vmstat shows: > > procs ---memory-- ---swap-- --

Re: [Newbies] Linux locks up when handling large data sets

2008-05-02 Thread johnps11
Hi Stan! Have you tried using the -mmap option when starting Squeak? I notice that according to the squeakvm man page: squeak uses a dynamic heap by default with the maximum size set to 75% of the available virtual memory or 1 gigabyte, whichever is smaller. Perhaps Windows doesn't have

Re: [Newbies] Newbie assortment

2008-04-08 Thread johnps11
Hi Sven, Yes, I'm in Oz, on the Gold Coast. I'm not an expert on Squeak by any means, but I'm using it in maths education, and thinking seriously about using it for a PhD in Maths Education in a couple of years. I know of one other guy (a PHP wizard) who was pretty wowed by Seaside and Squeak, I

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

2008-02-20 Thread johnps11
>> 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 fl

Re: Looking back... (was Re: [Newbies] How to empty a collection?)

2008-02-19 Thread johnps11
Hi Goran! I just want to point out that the long links in your mail were broken for me (although a little cut and paste fixed that). Perhaps a service like tinyURL would be useful when sending long links from the dark and distant past. I have noticed in this thread an undertone of "#become is the

Re: [Newbies] Re: [BUG] Inconsistent float soustraction (slightly offtopic)

2008-02-17 Thread johnps11
I studied and taught at Griffith University in Australia. At the time the computing dept was a weird combination of Business Programmers and Numerical Modelers. I wouldn't be surprised if this kind of fundamental instruction has disappeared these days, given the tendency to expose students to Jav

Re: [Newbies] Re: [BUG] Inconsistent float soustraction

2008-02-17 Thread johnps11
Cedric, As a follow up, when doing high precision arithmetic (in engineering, numerical integration, weather prediction and the like) you usually have a setup routine that does things like: BEGIN let a = 0.5 let b = a /2.0 while ( (a+b) <> a ) do epsilon = b b = b/2 endwhile then epsilon i

Re: [Newbies] Re: [BUG] Inconsistent float soustraction

2008-02-17 Thread johnps11
Cedric, Part of the issue is that different architectures will have different values for machine epsilon (1e-09 in your post). Machine epsilon is defined to be the largest float such that 0.0 + epsilon = 0.0 Its value varies according to your machine though - typically a machine with a much lar

Re: [Newbies] Overriding methods

2008-01-20 Thread johnps11
Hi Blake! I've yet to find a situation where I can't put the code that would be in a constructor in C++ into #initialize. I suppose there are situations where that would be a bad idea, but I just haven't met them, or else I'm doing bad things (very likely). Every time I get that kind of a warnin

Re: [Newbies] GemStone/S 6.1.5 on Debian running problem

2007-12-28 Thread johnps11
Hi, I think it's probably a vendor bug. I notice that Gemstone is getting a SIGILL, this is usually either a bad opcode (data corruption) or an attempt to do stupid tricks like overwrite the return address in the stack (this is in breach of POSIX). Possibly you might have a subtle issue with li

Re: [Newbies] Bitmap loading from array - representation

2007-12-06 Thread johnps11
> On Dec 6, 2007, at 14:24 , [EMAIL PROTECTED] wrote: > >>> On Dec 1, 2007, at 20:34 , Pete wrote: >>> It's also not clear to me why this array is size of 120, when we have an rectangular region of 40x40, and what is the difference of depth 1,2,4 ... >>> >>> >>> Depth is the number o

Re: [Newbies] Bitmap loading from array - representation

2007-12-06 Thread johnps11
> > On Dec 1, 2007, at 20:34 , Pete wrote: > >> Hi, I'm new to Smalltalk, coming from C++ and Java. >> >> I find Squeak very interesting, especially the >> features for rapid prototyping. >> >> I tried learning on the job, started with the >> Games-Chess class category, as I'm was formerly >> exper

Re: [Newbies] Re: [Etoys] can't install Squeak on Ubuntu 7.10 -- could not finddisplay driver vm-display-X11

2007-11-13 Thread johnps11
ALSA is the sound drivers and associated support files. You won't get sound to work without them. Have patience, sometimes getting sound working in Linux is an exercise in being persistent and methodical. John > Offray, > > > Thanks for your help. I tried the instructions on your website but

Re: [Newbies] Linux and Squeak server help

2007-11-06 Thread johnps11
Gday Edgar, What distribution (i.e. Redhat, Suse, Debian, Ubuntu etc) and version (hamm, buzz, Hoary Hedghog, 7 etc) are you running? That information will probably allow us to help you. Yrs John > People: > > Still this old donkey could't figure how to have Squeak as server on > Linux. > I tr

Re: [Newbies] printing graphics in squeak

2007-09-17 Thread johnps11
Hi Ching! I've been saving the form to a graphic file and then printing that. That way I can use Paint Shop Pro to add all sorts of eye candy before printing. This is in the context of maths problems for remedial teaching - I have a set of classes that create a form and populate it with maths pr

Re: [Newbies] Is it possible to manipulate excel spreadsheet by squeak

2007-09-06 Thread johnps11
> The new XML based format may be easier to parse / write using YAXO As someone who has done this stuff (though not from Squeak), Good Luck with OOXML. It's very fragile, and appears to break for no apparent reason. I suggest you either use a library (as others have suggested) or use Oo.org as a

Re: [Newbies] The old inisqueak problem on Linux

2007-08-22 Thread johnps11
> Hi Michael,. >> >> Are you installing the package that >> comes with your Linux distribution? > Are there already such distributions? I wonder why SuSE does not have > integrated Squeak yet. > Debian doesn't include Squeak in main because Squeak-L is not DFSG compliant. According to a note a

Re: [Newbies] Proper fractions?

2007-07-27 Thread johnps11
> Hey, guys: > > (And who came up with that whole "improper" terminology? Some guys with > small numerators, I'd bet) > > ===Blake=== I spent many years teaching remedial maths. The whole proper/improper/mixed number concept messes with many kids learning arithmetic with fractions

Re: [Newbies] Opening a file twice

2007-07-05 Thread johnps11
Thanks Dave. I'd looked at #close, but already had the system in a pretty weird state so it didn't seem to help. #ensure: is the kind of thing I really needed - but never found. Two more questions arise: 1) How do I get a password to edit the wiki? The page 'Recipe: Reading a file' could use

[Newbies] Oponing a file twice

2007-07-05 Thread johnps11
Just as I was thinking I was getting a handle on this I'm terribly confused... a _ FileStream fileNamed: 'readme.txt'. gives me a stream an the file. b _ FileStream fileNamed: 'readme.txt'. gives me nil a _ nil. a _ FileStream fileNamed: 'readme.txt'. a is still nil It seems that the only w