Re: [Newbies] Number formatting printf/sprintf for Squeak?

2009-02-17 Thread David Finlayson
field? >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/Number-formatting-printf-sprintf-for-Squeak--tp22045889p22049206.html > Sent from the Squeak - Beginners mailing list archive at Nabble.com. > > ___

Re: [Newbies] Re: Binary file I/O performance problems

2008-09-06 Thread David Finlayson
I have implemented a number of signal processing programs in both C99 and Python (with psyco jit). I have an 8-core Mac Pro workstation which I can use as for parallel processing by launching multiple instances of the code using Make scripts. An interesting thing happened when I compared the perfor

Re: [Newbies] Re: Binary file I/O performance problems

2008-09-05 Thread David Finlayson
Coastal and marine geology, USGS. But this isn't an official project. Just a pipe dream of mine right now. I am not even sure I am competent enough to pull it off by myself. However, I figure the best way to get support for this is to build a semi-working prototype and then show it off and see what

Re: [Newbies] Re: Binary file I/O performance problems

2008-09-05 Thread David Finlayson
the number of XYZA_Txer structs to follow, each XYZA_Txer struct indicates the number of XYZA_Point structs to follow and so on until the entire structure is read into memory. Then you start over again and read the next ping. It is painful, but I don't know how to read any othe

Re: [Newbies] Binary file I/O performance problems

2008-09-05 Thread David Finlayson
For the most part, these numbers represent instrument measurements (swath bathymetry from sonar systems). Precision ranges from 5 to 10 significant figures depending on the specific instrument being recorded. So it wouldn't really be practical to form a look-up table in most cases. What attracted

Re: [Newbies] Binary file I/O performance problems

2008-09-05 Thread David Finlayson
I re-wrote the test application to load the test file entirely into memory before parsing the data. The total time to parse the file decreased by about 50%. Now that I/O is removed from the picture, the new bottle neck is turning bytes into integers (and then integers into Floats). I know that Sma

Re: [Newbies] Binary file I/O performance problems

2008-09-02 Thread David Finlayson
OK - I made some of the suggested changes. I broke the readers into two parts: uint32 "returns the next unsigned, 32-bit integer from the binary stream" isBigEndian ifTrue: [^ self nextBigEndianNumber: 4] ifFalse: [^ self nextLittleEndianNumb

Re: [Newbies] Binary file I/O performance problems

2008-09-02 Thread David Finlayson
Thanks for the style pointers. I'm a scientist, not a programmer, so it will be rough going while I learn. What I wanted was an exception (try/except) in case any of the reads failed. Corrupt files are an expected case that should be handled by the program. So I can't crash while reading (or writi

[Newbies] Binary file I/O performance problems

2008-09-02 Thread David Finlayson
(Integer)>>+ 3.8% {6312ms} BinaryStreamReader>>uint16 3.4% {5647ms} Float class(Behavior)>>new: 2.0% {3322ms} BinaryStreamReader>>double **Memory** old +3,705,004 bytes young -28,800 bytes used+3,676,204 byte

[Newbies] Add refactoring to base squeak

2008-08-19 Thread David Finlayson
I downloaded the developer image which has re-factoring options in the browser, but I prefer the look and feel of the default squeak. Is there an easy way to get refactoring into the standard squeak browser? -- David Finlayson ___ Beginners mailing

Re: [Newbies] Re: Primitives and array computation

2008-07-11 Thread David Finlayson
the close future will be > restricted to my current need (a Bellman-like equation propagation). > > See you, > > FD > > > ___ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfou

Re: [Newbies] Totally dumbfounded!!

2008-07-04 Thread David Finlayson
Don't take what I wrote to be negative. I am greatly enjoying learning Squeak and Smalltalk. It is a great personal amplifier. But, unless you are into web development (as already mentioned), there isn't really a business side to Squeak. ___ Beginners mai

Re: [Newbies] Totally dumbfounded!!

2008-07-04 Thread David Finlayson
Squeak is a toy for academics and hobbyists to try out new ideas and explore computing at a higher-level. It wasn't designed for doing conventional application development and you won't find much support in Squeak for normal commercial programming. In fact, just the opposite, Squeak (Smalltalk) de-

Re: [Newbies] What's the deal with the changes file/versions button?

2008-07-03 Thread David Finlayson
s mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -- David Finlayson, Ph.D. Operational Geologist U.S. Geological Survey Pacific Science Center 400 Natural Bridges Drive Santa Cruz, CA 95

Re: [Newbies] Reading and writing C structs

2008-07-01 Thread David Finlayson
I need to read very large files so a single ByteArray holding all the data wouldn't work (not until I get a 64-bit version of Squeak). However, I could read in one or more structure at-a-time as a ByteArray and then parse out the data I need, then read the next sequence. This is kind-of like a buff

Re: [Newbies] Reading and writing C structs

2008-07-01 Thread David Finlayson
Thanks. The following methods work, can they be improved/simplified? double " returns a double " | n a b | a := self uint32. b := self uint32. n := Float new: 2. n at: 1 put: b. n at: 2 put: a. ^n float " returns a float "

Re: [Newbies] Reading and writing C structs

2008-06-30 Thread David Finlayson
OK, I've got an object that can read int and uint for 8, 16, 24 and 32 bit numbers from a binary file stream. But I cant figure out how to read a float or double. What I want is something like this (these don't work): double | n | n := Float from: (aFileStream next: 32). ^n

Re: [Newbies] Reading and writing C structs

2008-05-23 Thread David Finlayson
On Fri, May 23, 2008 at 6:17 PM, David T. Lewis <[EMAIL PROTECTED]> wrote: > > Look at the Number class hierarchy (browse hierarchy) and look at the > "instance creation" category on the class side of each of these classes. > That will give you some good tips. If you are dealing with simple data >

Re: [Newbies] Setting up a dependency mechanism in Squeak

2008-05-23 Thread David Finlayson
That is refreshing news. Lewis's book is pretty good, glad it still applies. He described things well. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners

[Newbies] Setting up a dependency mechanism in Squeak

2008-05-23 Thread David Finlayson
In the Art and Science of Smalltalk by Simon Lewis, there is a lengthy discussion of Smalltalk's dependency mechanism (yourObject addDependent: myObject; myObject changed, etc.) . A few of the examples of Morphic (Squeak by Example, Squeak: Object Oriented Design with Multimedia Applications) show

[Newbies] Reading and writing C structs

2008-05-23 Thread David Finlayson
An instrument I am working with creates a complicated binary file (memory dumps of C structs). I would like to try reading the file into Squeak for a cool new project. What's the best way to set up and read C-based structs and then, once I'm done, to write them back out again (including endianness,

Re: [Newbies] How to put a block into an Array

2008-05-16 Thread David Finlayson
ulmer <[EMAIL PROTECTED]> wrote: > On Fri, May 16, 2008 at 12:11:50PM -0700, David Finlayson wrote: >> Newbie here, working my way through Guzdial's Squeak: Object-Oriented >> Design with Multimedia Applications (2001). One of the exercises >> requires building an Arr

[Newbies] How to put a block into an Array

2008-05-16 Thread David Finlayson
Newbie here, working my way through Guzdial's Squeak: Object-Oriented Design with Multimedia Applications (2001). One of the exercises requires building an Array with a block of code as an element, the idea is to lookup the stored block in some way and execute it. But, how do you store a block of c

[Newbies] Examples of GUI programs developed in Squeak

2008-04-02 Thread David Finlayson
that could be done with Morphic to go places a photoshop-type application can't go. Maybe Morphic will suck at this type of thing, I don't know. I am only half way through Squeak By Example, and I am probably biting off more than I can chew, but maybe not? -- David Finlayson, Ph.D. O

Re: [Newbies] SBE and Squeak versions out-of-sync?

2008-04-01 Thread David Finlayson
There is no problem. I was confused by the differences between the normal image described in the book and the development image and obviously clicked on the novice mode button while I was flailing around. ___ Beginners mailing list Beginners@lists.squeakf

Re: [Newbies] report / graph generator

2008-03-31 Thread David Finlayson
Danny - I am learning squeak for exactly the same reasons. Up until a month or so ago, I did all my data analysis in C programs. A funny thing happened when my workstation was upgraded to an 8-core machine: my programs became I/O bound at a work load of 2 to 3 (ideal would be 8). My CPUs are way

Re: [Newbies] SBE and Squeak versions out-of-sync?

2008-03-30 Thread David Finlayson
Thanks, that did the trick. Use the regular Squeak image with the book, not the dev image. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners

[Newbies] SBE and Squeak versions out-of-sync?

2008-03-28 Thread David Finlayson
I'm on vacation and learning Smalltalk is how I'm spending my evenings (family is young and goes to bed early). I downloaded a copy of Squeak by Example (Version 2008-3-10) and the latest squeak for OS X: Squeak3.9-7067mac vm 3.8.18beta1U With the recommended dev-image: sq3.9.1-7075dev08.03.1 C