Either you run doits in separate process (as Sven demonstrated),
or you run it in UI process, blocking the rest of UI.
Stef, you complaining about not being able to see output of code that
blocks a process from doing such output.
I wonder how you going to fix that, and how much other complaints you will
face,
once you will fix that.
The solution could be to change the whole UI paradigm and separate
rendering from UI handling, which means that display no longer depends on
what UI process are busy with. That means a lot of work revising the way
how morphic delivers content to the real estate..

Only then Transcript could work as expected, scheduling screen updates into
rendering/screen update schedule, as well as many other applications that
can benefit from separating rendering pipeline from event handling.
But alas, even then, you won't be fully satisfied, since VM is single
threaded and it can be busy only with one thing at a time, either updating
your screen, or advancing in progress of an action you instructed it to
perform.
And i remember many complaints of the past, where people was really annoyed
that 'Transcript is tooooo damn slow' because often for VM it takes more
cycles to update transcript than to do any progress with computation you
run..
So, the choice is yours: you can run simulation that force updates of its
progress every microsecond on screen (so fast, that human eye cannot
notice) and as result your simulation takes hours rather than seconds,
or you block the updates , or at least do not update that often (for human
eyes updating more than 25 times per second is overkill).


On 8 May 2015 at 16:16, Eliot Miranda <eliot.mira...@gmail.com> wrote:

> Hi,
>
>     if one uses a at doit transcript then no special action is required to
> get output to appear beyond sending flush to Transcript right?  So any
> solution that requires special action to get the moronic transcript to work
> us broken.  We should fix the transcript, not expect every application to
> work around a bug.
>
> Eliot (phone)
>
> On May 8, 2015, at 6:15 AM, Alain Rastoul <alf.mmm....@gmail.com> wrote:
>
> > Le 08/05/2015 11:34, stepharo a écrit :
> >> Hi guys
> >>
> >> the Transcript in Pharo is that it's not asynchronous so I can't use it
> >> in VM development to show the current progress of the simulation. For
> >> example:
> >> 1 to: 100 do: [ :i |
> >>     0.1 seconds asDelay wait.
> >>     Transcript show: 'x'. ]
> >> => on Squeak, this shows a x every 0.1 second in the Transcript
> >> => on Pharo, nothing happens during 10 seconds then all the x are shown.
> >>
> >> https://pharo.fogbugz.com/default.asp?15515
> > Yes, as do it are evaluated in the World morphic process, running in a
> forked process or sending World doOneCycle in the loop solve the problem.
> >
> > Probably in squeak, in Transcript this is done somewhere under the hood.
> >
> > via dependents ?
> >
> > TranscriptStream>>endEndtry
> >    "Display all the characters since the last endEntry, and reset the
> stream"
> >    self semaphore critical:[
> >        self changed: #appendEntry.
> >        self reset.
> >    ].
> >
> > Object>>changed: aParameter
> >    self dependents do: [:aDependent | aDependent update: aParameter]
> >
> > And probably not doOnecycle since you cannot do anything else during
> execution (clicking or moving windows).
> >
> >
> > --
> > Regards,
> >
> > Alain
> >
> >
>
>


-- 
Best regards,
Igor Stasenko.

Reply via email to