Many thanks,
This explanation and the example from Ref. manual 3.9.8 Immutable Cyclic Data
makes everything clearer.
Example:> (let* ([ph (make-placeholder #f)] [x (cons 1 ph)])
(placeholder-set! ph x)(make-reader-graph x))#0= '(1 . #0#)
> Subject: Re: [racket] Re
On Thu, Aug 18, 2011 at 10:21:06AM -0400, Harry Spier wrote:
>
> I've done that and what displays is:
> #0=(1 . #0#)
> #0='(1 . #0#)
>
> Again I'm not clear why this doesn't try to produce an endlessly
> recurring (1 . (1 . ( 1 ... list
It does. But the racket implementers probably reali
On Aug 18, 2011, at 10:21 AM, Harry Spier wrote:
> I've done that and what displays is:
> #0=(1 . #0#)
> #0='(1 . #0#)
>
> Again I'm not clear why this doesn't try to produce an endlessly recurring (1
> . (1 . ( 1 ... list
At this point you're entering philosophical grounds:
is a cycl
gt;
> into the input box that appears.
>
I've done that and what displays is:
#0=(1 . #0#)
#0='(1 . #0#)
Again I'm not clear why this doesn't try to produce an endlessly recurring (1 .
(1 . ( 1 ....... list
Thanks,
Harry Spier
> Subject: Re: [racket] Reading graph
On Aug 18, 2011, at 9:09 AM, Harry Spier wrote:
> When I put (#1=100 #1# #1#) in either the definitions or interactions window
> I get
>
> . read: #..= expressions not allowed in read-syntax mode
In these areas, read-syntax takes over. Enter
(read)
at the prompt. Type
#0=(1 . #0#
On Thu, Aug 18, 2011 at 9:09 AM, Harry Spier wrote:
> Dear list members,
>
> Firstly thank you, for clarifying uninterned symbols.
>
> I've tried running the examples for reading graph structure in the reference
> manual 12.6.16 in DrRacket.
>
> When I put (#1=100 #1# #1#) in either the definition
Dear list members,
Firstly thank you, for clarifying uninterned symbols.
I've tried running the examples for reading graph structure in the reference
manual 12.6.16 in DrRacket.
When I put (#1=100 #1# #1#) in either the definitions or interactions window I
get
. read: #..= expressions not
On Thu, Jun 9, 2011 at 8:34 AM, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Thanks Matthias,
>
> On 06/09/11 16:34, Matthias Felleisen wrote:
>>
>> (1) To create cyclic structs you need mutability in our world. [gensym is 0
>> assignments, cyclic structs is 1 assignment, a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thanks Matthias,
On 06/09/11 16:34, Matthias Felleisen wrote:
>
> (1) To create cyclic structs you need mutability in our world. [gensym is 0
> assignments, cyclic structs is 1 assignment, and state is N assignments.]
>
> (2) I think the failure sh
(1) To create cyclic structs you need mutability in our world. [gensym is 0
assignments, cyclic structs is 1 assignment, and state is N assignments.]
(2) I think the failure should come earlier when a struct isn't mutable. If you
agree, you can try to request a feature change.
On Jun 8,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Matthias,
On 06/06/11 16:58, Matthias Felleisen wrote:
>
> Do you want something like this:
>
> #lang racket
>
> (struct dl (left node right) #:transparent #:mutable)
>
> (shared ((middle (dl left 1 right))
> (left (dl #false 0 mi
Do you want something like this:
#lang racket
(struct dl (left node right) #:transparent #:mutable)
(shared ((middle (dl left 1 right))
(left (dl #false 0 middle))
(right (dl middle 2 #false)))
middle)
On Jun 6, 2011, at 10:30 AM, Marijn wrote:
> -BEGIN PGP SIG
25 minutes ago, Marijn wrote:
>
> My understanding is that it is a finite data structure that refers
> to itself. It is supposed to represent 3 nodes/links of a doubly
> linked list where each node points to its neighbours or #f, so
> really it should only be 3 _dl's big...
Yes, I know what you m
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/06/11 15:14, Eli Barzilay wrote:
> 20 minutes ago, Marijn wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Hi,
>>
>> why does the following code
>>
>>
>> #lang racket
>>
>> (struct _dl (left val right))
>>
>> (define (dlist a b c)
At Mon, 6 Jun 2011 06:49:33 -0600, Jay McCarthy wrote:
> Graph syntax is not allowed, but you be able to put it in a quote
It doesn't work under quote, either. Graph syntax works only as input
to `read' --- as opposed to `read-syntax' for code.
Quoted cyclic syntax used to work, but cyclic consta
20 minutes ago, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> why does the following code
>
>
> #lang racket
>
> (struct _dl (left val right))
>
> (define (dlist a b c)
> #1=(_dl #f a #2=(_dl #1# b (_dl #2# c #f))) )
Note that you wrote an infinite piece of co
Graph syntax is not allowed, but you be able to put it in a quote
iPhoneから送信
On 2011/06/06, at 6:48, Marijn wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> why does the following code
>
>
> #lang racket
>
> (struct _dl (left val right))
>
> (define (dlist a b c)
> #1
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
why does the following code
#lang racket
(struct _dl (left val right))
(define (dlist a b c)
#1=(_dl #f a #2=(_dl #1# b (_dl #2# c #f))) )
produce the error:
Module Language: invalid module text
. read: #..= expressions not allowed in rea
18 matches
Mail list logo