Comment

Comment by JonChesterfield

Doesn't say anything about cycles or what datatypes can be serialised. In general lisps _can't_ print arbitrary objects in a form that can be read back in. E.g.

    Welcome to Racket v7.9 [bc].
    > (lambda (x) x)
    #<procedure>
7.9 doesn't have csexp, was curious what it would do with a function object but not quite curious enough to install a racket from outside the package manager. It seems relatively likely that racket would have some serialisation feature that can round trip arbitrary objects through a bytestring though initial guesses haven't worked out for me

    > (require racket/serialize)
    > (serializable? (lambda (x) x))
    #f
Still, being able to take some arbitrary closure and kick it over the network to another racket instance would be great. It's not immediately obvious that csexp can do that.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton