Question about WriteStream

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about WriteStream

Brian Brown-5
I'm playing around with some simple things, and am attempting something like:

|aStr|
aStr := WriteStream on: String new.
aStr nextPutAll: 'monkey'; nextPutAll: 'shine'.
Transcript show: aStr contents; cr.

and I get the following traceback snippet: 

Exception in thread "main" st.redline.core.RedlineException: Object 'WriteStream' (st.redline.core.PrimObjectMetaclass@43462851) does not understand 'on:' with arguments:
1 st.redline.core.PrimObject@33010058 null

I've seen this pattern in smalltalk/rt/st/redline/core/Object.st (line 127) and other places, for example. Any thoughts on what I'm doing wrong?

- Brian
Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

James Ladd
You will probably find that on: is not implemented as we are still in the process of implementing the Runtime library
- James

Sent from Hyperspace.

On 29/12/2012, at 9:38 AM, Brian Brown <[hidden email]> wrote:

I'm playing around with some simple things, and am attempting something like:

|aStr|
aStr := WriteStream on: String new.
aStr nextPutAll: 'monkey'; nextPutAll: 'shine'.
Transcript show: aStr contents; cr.

and I get the following traceback snippet: 

Exception in thread "main" st.redline.core.RedlineException: Object 'WriteStream' (st.redline.core.PrimObjectMetaclass@43462851) does not understand 'on:' with arguments:
1 st.redline.core.PrimObject@33010058 null

I've seen this pattern in smalltalk/rt/st/redline/core/Object.st (line 127) and other places, for example. Any thoughts on what I'm doing wrong?

- Brian
Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

Brian Brown-5
Ha! That would explain it ;)

So I guess I should put my name next to Stream, eh?

- Brian
Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

James Ladd
Yes please - and make a StreamTeat as well :)
You might hit a hurdle or two but I will be there to help.
I have 7 days uninterrupted on RL coming
- James

Sent from Hyperspace.

On 29/12/2012, at 9:53 AM, Brian Brown <[hidden email]> wrote:

> Ha! That would explain it ;)
>
> So I guess I should put my name next to Stream, eh?
>
> - Brian
Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

Brian Brown-5
Ok, so I'm working on implementing the Stream hierarchy - should I use the bluebook for the first pass and then add in pharo additions later, or just start with Pharo?

- Brian


On Friday, December 28, 2012 4:15:31 PM UTC-7, jamesl wrote:
Yes please - and make a StreamTeat as well :)
You might hit a hurdle or two but I will be there to help.
I have 7 days uninterrupted on RL coming
- James

Sent from Hyperspace.

On 29/12/2012, at 9:53 AM, Brian Brown <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="nk_32DJA-PAJ">bro...@...> wrote:

> Ha! That would explain it ;)
>
> So I guess I should put my name next to Stream, eh?
>
> - Brian
Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

Les Hazlewood
Just relaying information that James has clarified for me in the past:

Look to the Blue Book first, then Pharo for assistance/help/guidance.

If you copy Pharo verbatim, it *could* (but not always) lead you down a rabbit hole:  You'll see they use class A and B in their implementation, so you'll then have to copy the same into Redline.  Then those in turn use classes C, D, and E which need to be copied into Redline, etc...

In many cases, copying classes and hierarchies make sense because the classes are core to so many parts of the system.  However the default train of thought should be to make it Blue Book compatible first and leverage Pharo when necessary, not the other way around.

Cheers,

Les

On Mon, Dec 31, 2012 at 8:55 AM, Brian Brown <[hidden email]> wrote:
Ok, so I'm working on implementing the Stream hierarchy - should I use the bluebook for the first pass and then add in pharo additions later, or just start with Pharo?

- Brian


On Friday, December 28, 2012 4:15:31 PM UTC-7, jamesl wrote:
Yes please - and make a StreamTeat as well :)
You might hit a hurdle or two but I will be there to help.
I have 7 days uninterrupted on RL coming
- James

Sent from Hyperspace.

On 29/12/2012, at 9:53 AM, Brian Brown <[hidden email]> wrote:

> Ha! That would explain it ;)
>
> So I guess I should put my name next to Stream, eh?
>
> - Brian

Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

Brian Brown-5
Thanks, Les. I'll go with Blue book :)


Reply | Threaded
Open this post in threaded view
|

Re: Question about WriteStream

James Ladd
You guys rock!
Yes - implement just the blue book methods and classes by looking at the Pharo implementation.
Redline needs the smallest and simplest usable implementation - which the blue boom defines.
When this is in place we can look to adding new classes and methods

- James

Sent from Hyperspace.

On 01/01/2013, at 5:20 AM, Brian Brown <[hidden email]> wrote:

Thanks, Les. I'll go with Blue book :)