[racket] serializability of ISL structures?

2013-11-16 Thread Norman Ramsey
A structure is defined with `define-struct` in Intermediate Student Language. Is it serializable? That is, can it be written and then re-read successfully with `write` and `read`? If not, is there a way to make it so? (I have found the function `make-serialize-info` in the racket/serialize libra

Re: [racket] serializability of ISL structures?

2013-11-16 Thread Matthias Felleisen
Kind of. If this is about Universe programming (so that students can send messages back and forth), I have them write conversion functions: (define-struct hh (cakes henries)) (define (hh->lists hh) (list (cakes->lists (hh-cakes hh)) (henries->lists (hh-henries hh -- Matthias On N

Re: [racket] serializability of ISL structures?

2013-11-16 Thread Jay McCarthy
I think the conversion function is useful pedagogically to talk about the need to serialize, but having it just work might be expedient in other situations. I do not believe that they are actually serializable, but we could fairly easily make that change. On Sat, Nov 16, 2013 at 10:22 AM, Matthias

Re: [racket] serializability of ISL structures?

2013-11-16 Thread Matthias Felleisen
I have considered making them prefab instead Sent from my iPhone > On Nov 16, 2013, at 12:32 PM, Jay McCarthy wrote: > > I think the conversion function is useful pedagogically to talk about > the need to serialize, but having it just work might be expedient in > other situations. I do not be

Re: [racket] serializability of ISL structures?

2013-11-16 Thread Marco Morazan
I agree. Having the students write the marshalling and unmarshalling functions is important when introducing them to DP. It also a great way to demonstrate the importance inverse functions. Take a look at some of my thoughts here: http://faculty.cs.byu.edu/~jay/conferences/2013-tfp/proceedings/tfp2

Re: [racket] serializability of ISL structures?

2013-11-16 Thread Norman Ramsey
> > [Are ISL structures made with define-struct serializable?] > > Kind of. If this is about Universe programming (so that students can send > messages back and forth), I have them write conversion functions: > > (define-struct hh (cakes henries)) > > (define (hh->lists hh) >(list