Yes, I owe you apologies, Christian; and I knew someone would come up with this
remark. However, indeed I had your (great) book in mind when I wrote that. But
I meant that to be taken from the point of view of newbies: they favour the
docs that are shipped with the system and they trust them to have all that it
takes.

As the docs are very detailed and didactic as regards certain topics, "spaces"
come across as some curiosity, something that may well, even is meant to be
ignored. And when a newbie finally gets interested, having as only resource a
whole (non-free) book is not that engaging...

Cheers,

Jorge.

Selon Christian Schulte <[EMAIL PROTECTED]>:

> Obviously, I have to object to "they always run for worst-documented
> feature": if any, spaces are the most widely published concepts in Oz and
> one of the rather few to which an entire book is devoted! Use the book!
>
> Christian
>
>
> --
> Christian Schulte, http://www.imit.kth.se/~schulte/
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Sukit Tretriluxana
> Sent: Monday, May 01, 2006 10:03 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: The code block
>
>
> Thank you very much Jorge. That's very helpful.
>
> Ed
>
>
> On 5/1/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
>
> Hi there!
>
> > I am a newbie in Oz and Mozart. I am following a tutorial on logic
> > programming. Part of it states that the following code can execute without
> > blocking if it is called determistically.
>
> That is true provided you make a call inside a space. Actually, dis can
> never be
> used in the toplevel space because the latter never gets stable and dis
> implicitly calls Space.waitStable.
>
> Thus:
> --------------
> declare
> proc {FullAppend L1 L2 L3}
>    dis L1=nil L2=L3
>    [] X M1 M3 in
>       L1=X|M1 L3=X|M3 {FullAppend M1 L2 M3}
>    end
> end
> fun {MergeAfterStable S}
>    {Space.ask S _}
>    {Space.merge S}
> end
>
> {Browse {MergeAfterStable {Space.new fun {$} {FullAppend [1 2] [3 4]} end}}}
>
> --------------
>
> does the job. Beware that calling Space.waitStable poses somes constraints
> on
> the use of dis. For example, it cannot be called by a thread if another
> thread
> is calling Space.waitStable... That's life, or rather, that's one of the
> things
> that make learning about spaces such a must in Oz, though they always run
> for
> worst-documented feature :o) I mean, there is no space tutorial.
>
> A common procedure: keep on trying to ignore spaces - or learn as little as
> possible - till they finally impose themselves. People on the list will
> always
> be there to help you out!
>
> Cheers,
>
> Jorge.
>
>




_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to