samth
2018-10-29 20:23:25

@mflatt the expander uses uninterned symbols for renaming linklet variables, which makes serialization tricky. Do you have a pointer to where that serialization is implemented in Racket (I know Chez has stable gensyms which I don’t want to implement at the moment)? Or alternatively is there something else the expander could do?


mflatt
2018-10-29 21:02:05

Doesn’t the expander generate only unreadable symbols? Those are interned but not “interned,” since they’re in a parallel table.


samth
2018-10-29 21:04:35

Here’s my test case: > (define l (instantiate-linklet (compile-linklet '(linklet () ((x x15) k) (define-values (x) 4) (define-values (x15) 75) (define-values (k) x15))) null)) > l #<instance> > (instance-variable-names l) '(x15 k x15.3) > (map symbol-interned? (instance-variable-names l)) '(#t #t #f) > (define l2 (instantiate-linklet (compile-linklet '(linklet () ((x x16) k) (define-values (x) 4) (define-values (x15) 75) (define-values (k) x15))) null)) > (map symbol-interned? (instance-variable-names l2)) '(#t #t #t)


samth
2018-10-29 21:05:09

which suggests that the only uninterned symbol is when there’s a renaming due to a name collision


samth
2018-10-29 21:21:33

also, the same symbol that is uninterned is also unreadable, and the others are all readable