LabRat

Mark van Gulik ghoul6 at home.com
Sat Nov 17 22:25:16 UTC 2001


It seems to me that a SharedQueue is more appropriate.  You can 
block on it waiting for data to arrive, for example.


On Saturday, November 17, 2001, at 02:42 pm, Philip Knodle wrote:

> danielv at netvision.net.il wrote:
>
>> You are rightly hesitant in this case - the implementation is a usage
>> guidance - you are not supposed to create Streams without 
>> specifying an
>> object to be streamed over. This is the role for the parameter of
>> on:/with:.
>>
>> Maybe you could explain why you want to separate the creation of the
>> stream from it's configuration - there might be an easier way 
>> to achieve
>> whatever it is you're trying to do.
>>
> The general idea is that I have a volt meter in the lab across 
> the street that I want to acess on my computer using squeak.  
> Say that every second my volt meter takes a reading.  So there 
> is this collection of volt meter readings that I need to get 
> realtime and thatI don't know where they end.
>
> My first inclination was to override the stream class.  I would 
> read the data off of a socket, and throw it at my custom stream 
> class, and that would be that.  I was thinking I could reuse 
> the streams class easily this way.  And I coded with fury...
>
> After some thought, subclassing Collection is a better idea.  
> This way, I can use the collection of reading as a collection, 
> and when I want a stream I can use Stream on: when I want a 
> stream.
>
> So, I'm going to make these changes for the next alpha.  I 
> tihnk this solves my problems of breaking the stream class and 
> having a realtime collection.  Any thoughts and advise is 
> welcome and appreciated.
>
> I've used Java a bit, and I thought that Smalltalk streams are 
> silmilar to Java streams.  So I coded without understanding the 
> difference.  This reminds me of a fortune I try to code by:
> "Furious activity is no substitute for understanding.
>        -- H.H. Williams
> " --by way of the fortune file
>
> --
> Happy Thinking,
> Phil Knodle
>
>
>
>
>





More information about the Squeak-dev mailing list