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.
>
> ___
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
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
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
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
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
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
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
(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
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
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
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
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-
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
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
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 "
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
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
>
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
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
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,
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
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
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
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
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
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
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
28 matches
Mail list logo