<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-12 19:55 GMT+02:00 Denis Fourt <span dir="ltr"><<a href="mailto:denis.prog@hotmail.com" target="_blank">denis.prog@hotmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi,<div><br></div><div>my error was that the "quote" was actually a different unicode char (from the copy/paste), therefore gsi did not understand it as a quoted symbol but as an unquoted (undefined) symbol.</div>

<div><br></div><div>And I got a weird error message because of the code point of that char was written right in it. And I have to admit it, I had no clue about what was occurring. </div><div><br></div><div>I understand that no thread could return anything that would be eq? with (let ((unique (list 'unique))). But :</div>

<div><br></div><div>a) Is there anything more simple than using list? </div></div></div></blockquote><div><br></div><div>Uninterned sy. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div dir="ltr"><div>b) Would it be a good idea to have one (or more) reserved symbol (or keyword) in Gambit like None, Nothing, Fail, etc. to handle that kind of problem. I am asking this question because a similar problem arises with hash table or similar dictionary like structures. Most of the time #f or '() work except when storing booleans or lists.</div>

</div></div></blockquote><div><br></div><div>No just use a unique object for this purpose - if there'd be a global undefined value, then of course you'd get the same uniqueness problems with it as with a global symbol like 'undefined , or #f etc.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><div><br></div><div>Any thoughts?</div><span class="HOEnZb"><font color="#888888"><div>

<br></div><div>Denis</div></font></span><div><br></div><div><div class="hm HOEnZb"><br></div><div><div class="hm HOEnZb"><hr>From: <a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a><br>Date: Mon, 12 May 2014 14:33:44 +0200<br>

Subject: Re: [gambit-list] example from the doc<br>To: <a href="mailto:denis.prog@hotmail.com" target="_blank">denis.prog@hotmail.com</a>; <a href="mailto:gambit-list@iro.umontreal.ca" target="_blank">gambit-list@iro.umontreal.ca</a></div>

<div><div class="h5"><br><br><div dir="ltr">Denis, the unique variable is for it to work even if the thread ended its execution by returning a symbol by the name unique - it interprets fine, what's your err?</div><div>

<br><br><div>

2014-05-12 2:38 GMT+02:00 Denis Fourt <span dir="ltr"><<a href="mailto:denis.prog@hotmail.com" target="_blank">denis.prog@hotmail.com</a>></span>:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">






<div><div dir="ltr"><font face="Arial">Hi,</font><div><font face="Arial"><br></font></div><div><font face="Arial">In Gambit 4.7.2 documentation, in the section dedicated to threads, there is the following code example :</font></div>



<div><font size="3" face="Arial"><br></font></div><div>
                
        
        
                <div title="Page 103">
                        <div>
                                <div>
                                        <pre><font size="3" face="Arial">(define thread-alive?
            (let ((unique (list ’unique)))
</font></pre>
                                        <pre><font size="3" face="Arial">              (lambda (thread)
                ; Note: this procedure raises an exception if
                ; the thread terminated abnormally.
                (eq? (thread-join! thread 0 unique) unique))))</font></pre><pre><font face="Arial" size="3">This code is actually incorrect (according to gsi), the let is rejected. I believe that :</font></pre><pre><pre>

<font size="3" face="Arial">(define thread-alive?</font><span style="font-family:Arial;font-size:12pt"> </span></pre><pre><span style="font-family:Arial;font-size:12pt"> (lambda (thread)</span></pre><pre><font size="3" face="Arial">     (eq? (thread-join! thread 0 'unique) 'unique)))</font></pre>



<pre><font size="3" face="Arial"><br></font></pre><pre><font size="3" face="Arial">should be enough (though I do not know what happens if the thread returns nothing). I would like to know if there was some precise reason behind this let construction.</font></pre>



<pre><font face="Arial" size="3">Thanks,</font></pre><pre><font face="Arial" size="3"><br></font></pre><pre><font face="Arial" size="3">Denis</font></pre></pre>
                                </div>
                        </div>
                </div></div>                                          </div></div>
<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div></div></div></div></div>                                           </div></div>
<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div></div>