Fork me on GitHub
#off-topic
<
2018-08-28
>
john22:08:15

@benzap what docs are you working with to do the wat2wasm compiler?

benzap22:08:45

I've just been reviewing the main spec

benzap22:08:03

It won't be a while till I start creating anything

john22:08:15

Cool, I've been reading up on the wast semantics. Thinking about how to build a cljs-subset->wast dsl.

john22:08:35

ah, you did the clojure based stack language fif! nice

john22:08:14

@benzap do you have any recommendations on how you'd go about implementing a wast dsl in clj/s?

john22:08:09

I was just taking this approach and I've got it making some simple wast forms

john22:08:19

But I also tried just defining most of the functions in the spec as first class functions, emitting strings, while closing over any strings passed in as parameters, and that seems to compose wast forms pretty easily too

john22:08:47

Then it should just be a matter of defining functions over those string fns that translate more clojurey fn semantics to the wast

benzap22:08:54

I don't have any particular recommendations, everyone has their own style of coding

benzap22:08:35

I kind of want to do what I did with fif, where everything is expressed as EDN symbols, but i'm worried they'll add something to later specs that will break that particular method

benzap22:08:16

so yeah, I might go the string route for WASM, but for an intermediate, i'll make it an EDN-based language, so it can be used as a clojure DSL

benzap22:08:54

You're method sounds pretty interesting, i'll give it a look later and steal some ideas from it 🙂

john22:08:52

no prob 🙂 I'll be checking out fif some more. I'll probably start a play ground on maria.cloud for the wast dsl and drop whatever I come up with in here