Squeak Messaging services

Created a page for Squeak Messaging Services. Right now, the plan is to
focus on IRC, but AIM, ICQ, et al will be added in the future.
Seperate pages will be added for each project area soon.
http://minnow.cc.gatech.edu/squeak/1048.save
Daniel Joyce

[UPDATES] More for 2.7alpha

Dan Ingalls <Dan.Ingalls <at> disney.com>
1999-12-06 22:41:09 GMT

Folks -
Here follow summaries of a recent spate of updates. These include many of STP's goodies, mostly hooked up to
preferences, plus a number of little fixes (like Interval>>includes: and ProtoObject dNU:.), Lex's
service to mankind (reworks dozens of blocks to eliminate out-of-scope references to block variables),
a reorganization and my first pass at Environments.
Note this includes a LONG recompilation of every metaclass which may take 10 minutes or so. Also, due to the
notifier, if you are in MVC, you may need to cmd-. and restore the display after it is all done. Sorry about that.
- Dan
---------------------------
1687imgSegByte-tkME -- Ted Kaehler -- 6 December 1999
This will be a New Format for Image Segments, both swapped and exported.
When a new VM is issued, bring all segments in with an old VM, then get new VM, then let them out again.
Two bits are now encoded in the version word of an Image Segment. (1) whether 4-byte words are bigEndian or
littleEndian (2) whether byte objects are stored bigEndian or littleEndian. How can a byte object be
stored the wrong way, since both VMs store it correctly? If the entire segment was word-reversed along the
way, it may be correct, but the byte objects will be backwards. We now allow DataStream|rTetraByteArray
to always read bigEndian. If the file came from the opposite polarity, this is a reversal of byte objects."
1688FasterSorting-STP -- Stephen T. Pope -- 6 December 1999
SortedCollections assign a default sort block if none is provided. Since
90% of these blocks are the same, we can save one block activation per
sort comparison if we code the comparison directly for collections where
the sort block is nil. The attached change set implements this; the
speed-up is quite significant for large collections (>100% for 50000
items in random order).
1689ScrollBarPrefs-STP -- Stephen T. Pope (tweaked by DI) -- 6 December 1999

Re: Shouldn't 2 hash = 2.0 hash? [LONG]

On Wed, 1 Dec 1999 19:21:54 David N. Smith (IBM) wrote:
>At 18:28 -0500 12/1/99, David N. Smith \(IBM\) wrote:
>>...SNIP...
>>Also note that if not, one could have the case where:
>>
>> 1.0 = 1.0 => false
>>
>>but
>>
>> 1.0 == 1.0 => true!
>
>There is another case that follows.
>
>If, for equal a and b, if a=b is false, a>=b would *also have* to
>answer false, else we could write an equality test this way:
>
> (a<b
> ifFalse: [a>=b & (a>b) not]
> ifTrue: [a<=b & (a<b) not])
>
>But, if a=b answers false, and a>=b answers false, and obviously a<b
>and a<=b are false, how do the values compare? In IEEE there is one
>other option, called unordered, but that happens only when one or
>both values are NaNs, and both a and b would fail the test for NaNs.
>
>So, making a=b answer false leads to a logical impossibility where
>all possible relationships are false.
Well, Dave, yes, it would. The definition

RE: Help! Squeak crashes during updates

Raab, Andreas <Andreas.Raab <at> disney.com>
1999-12-17 19:33:28 GMT

------_=_NextPart_001_01BF48C5.5FADC3A6
Content-Type: text/plain;
charset="iso-8859-1"
You can get the version of the running VM by pressing F2 and choosing
'display version information' from the menu. However, your debug log looks
somewhat strange - it seems that the system is breaking during the attempt
to show a notifier... quite strange. It's also weird that Windows says there
would be an exception '10H' - AFAIK, there is *no* such exception...
A.
-----Original Message-----
From: Torge Husfeldt [mailto:jean-jaques.gelee <at> gmx.de]
Sent: Friday, December 17, 1999 2:49 AM
To: Squeak Mailingliste
Cc: recipient list not shown
Subject: Help! Squeak crashes during updates
Hi there!
I have a Problem with update #1695
When I Proceed the notifier squeak raises a Windows-Exception and is
immediately shut down
I am running Squeak under win98.
I included the Debug.log as an attachment.
I didn't find the version number of the VM but it is exactly 319,488 Bytes
and
seems to be created Friday the 8th of October (just what windows tells me).

Re: [BUG] Project>>okToChange

Marcus Denker <marcus <at> ira.uka.de>
1999-12-19 10:01:02 GMT

--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
On Sat, Dec 18, 1999 at 10:33:32PM -0500, Andrew C. Greenberg wrote:
> In the most current 2.7 image (updated today), I opened a new morphic
> project, did nothing, and jumped back to MVC. When I tried to delete
> the new morphic project, I got a notifier announcing that
> #copyWithout: was not understood in the following segment:
>
> "Remove Player classes and metaclasses owned by project"
> (1) is _ ImageSegment new arrayOfRoots: (Array with: self).
> (2) (is rootsIncludingPlayers copyWithout: self) do: [:playerCls | . . .
>
> I inserted an:
>
> is rootsIncludingPlayers ifNil: [^true].
>
> between lines (1) and (2), and I was able to close the project, but I
> have no idea if this was a useful "solution" at all.
>
One problem with this solution is that the empty changeset of your deleted
project won't get deleted. So it may be better do do something like
"Remove Player classes and metaclasses owned by project"
roots _ (ImageSegment new arrayOfRoots: (Array with: self)) rootsIncludingPlayers.
roots ifNotNil: [
(roots copyWithout: self) do:
so the code at the end of the method will be executed and the empty
changeset will be deleted.

Re: Another Question

Dear Mr. Blacktooth,
It's OK to ask questions, there's no need to hide behind an alias
Compared to Dan and the others from the LRG days were all newbies at this!
I still think there's a good deal of room for making your code more
Smalltalk-like. This is no end in itself; it will also become much shorter
and clearer. In particular, you can exploit the power of the Collection
classes; using loops instead of the Collection protocol is a common symptom
of someone coming from traditional languages.
First of all, if I understand it right, you are doing something similar to a
breadth-first tree traversal, more or less? Here's a standard solution to
b-t traversal, thanks to Kent Beck :) See how short it is thanks to the
Collection protocols:
Node>>levelOrderDo: aBlock
| queue current |
queue := OrderedCollection with: self.
[queue isEmpty] whileFalse: [
current := queue removeLast.
aBlock value: current.
queue addAllFirst: current children]
(The rest is off the top of my head since to run the code I would need more
than this snippet. Ie. it's probably buggy.) The main loop would become:
tempRefs keysAndValuesDo: [ :refKey :refDeps | "gives you the value too"
refQue := refQue, refDeps. "merges (most) whole collections for
you"

Re: Plugin & strings

David T. Lewis <lewis <at> mail.msen.com>
1999-12-08 22:34:48 GMT

On Wed, Dec 08, 1999 at 04:22:35PM +0100, rob.van.den.berg <at> philips.com wrote:
> Hi,
>
> As I want to interface Squeak with an PCI card running an RTOS (Mercury card with MCOS), I need to create a
plugin for the communication. ( A second step ofcourse is porting Squeak to this RTOS) my first approach is
just to exchange strings.(e.g. MyClass
> new doIt: 'aString', which returns a string). However looking at both Andy Greenberg's Pluggable
Primitives doc on minnow and the plugin code for FloatArray etc. I didn't understand how to do this. Can
anyone give me any pointers?
>
Here's an example of a primitive which allocates and returns a string. You
can also pass a string as a parameter on the stack, which is safer from a
memory management point of view. I've heard that doing the allocation in the
primitive can get you into trouble if you run out of object memory, so use
this with caution and add some error handling.
In your example, you would probably want to pass one string "out of"
Squeak. This would be a parameter which you pass on the stack. The
string which you answer back as a result would either be allocated
in the primitive (as in the attached example), or it would have been
pre-allocated and passed as a second parameter.
Dave
----- example follows -----
!UnixOSProcessAccessor methodsFor: 'primitives - OS process access' stamp: 'dtl 10/26/1999 11:21'!
primitiveArgumentAt
"Answer a string containing the OS process argument at index (an Integer) in the

Re: bugs? hash and the debugger.

<ohshima <at> is.titech.ac.jp>
1999-12-13 11:35:22 GMT

Hi,
> Hash should be a fast function, since it is often used for
> quick rejection of potentially long comparisons. How about
> making the default collection hash be order independent, so
> there's no need to sort as part of hashing, and perhaps fall
> back to a simple function of size if it is greater than,
> say, 10.
Yes. Simply xor'ing the elements' hash values seems
better.
At first, I thought the hash values of Sets should be
distributed widely even if the elements of the Sets are
similar. But it doesn't have to.
> hash
> | hash |
> hash := self species hash.
> self size > 10 ifTrue: [^ hash + size].
> self do: [:elem | hash := hash bitXor: elem hash].
> ^ hash.
>
> Would this answer your needs?
Precisely speaking, this is not my needs but it seems
reasonable implementation.
Thank you.