Has anybody used webassembly as a compiler target for pet languages? I’m struggling with the text format- it’s a very strange mix of standard linear-format assembly and block structure.
But I think the text format isn't too bad! It's weirdly forgiving, but I would just think about it as Lisp/S-expressions.
-
-
Hmm- the main problem is that it doesn't really work like s-exps because there's no sequencing operator- you simply write a \separated (c1 c2 c3 c4 ...) for a sequence of commands, interspersed with *structured* control blocks. I'd rather have it one way or the other, is all.
-
Perhaps you just need to write more imperative code ;-) or maybe it's helpful to see it as a direct encoding of the AST? See e.g. the OCaml datatype in the reference interpreter: https://github.com/WebAssembly/spec/blob/master/interpreter/syntax/ast.ml#L71 …
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD