[Pharo-project] Transcript rant
stephane.ducasse at inria.fr
Mon Apr 4 15:54:33 CEST 2011
I would like to try to understand and be more in positive thinking mode.
> First thing, is that Transcript is no longer a global variable, but
> instead a singleton class (Transcript).
> So, now, what i suppose to do if i want to redirect all
> Transcript show: ...
> to file instead of in-image stream?
so does what fernando replied true?
In that case it does not look as a problem
> Second. I told it before and i will repeat it again.
> Transcript ===== WriteStream
> yes, it is stream.
> And Transcript as a tool - a window which you see on desktop is a
> view of that stream. Do you follow? Transcript is model, and
> transcript window is view. Simple enough?
> Then why its not like that?
What is the implication at the design and use level of Transcript been a stream?
> So, we should have a model, which is a stream,
> and as many as we like views, which simply listening of updates on
> that stream and updating their view correspondingly..
> This means that to do it right, we should do something like following:
> - Transcript is a stream, but which also notifies the view(s) about
> new stuff coming in, so views can react and update themselves
> - Transcript is write only stream, and any attempts to seek or read
> from it should be prohibited. Sorry guys.. if i'd like to do
> transcript logging via socket,
> where i suppose to take a content which i already sent via wire?
you lost me here.
> it would be really nice to have xtreams, which allow stream
> composition.. so then transcript is a composed stream of a following
> notifier stream -> output stream
> notifier stream is direct any writes to output stream, but in addition
> it notifies any listeners about new content are written to it. This is
> easy to implement using xtreams..
> but not so easy with old streams (but its doable).
> An output stream could be anything, which application/image wants to be.
> For obvious reasons, i'd like to redirect all transcript output in
> headless mode to stdout. It was doable with old implementation.. but
> with a new one its impossible, because then i will need to replace
> class with something else,
> and then restore it back when i have to switch back to normal operation...
> Views.. Views are receiving notifications and update their own
> contents (usually text morphs). There could be as many as one wants
> views on transcript stream. Not only one.
> I really don't like that in new transcript i can't even select a text
> or clear window... from my POV this is what called regression.
We can revert it if this is important
Now let us try to learn.
> Make it simple, but not simpler (c) Albert Einstein.
> Best regards,
> Igor Stasenko AKA sig.
More information about the Pharo-project