Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Move in with Alda via cljc #2

Open
daveyarwood opened this issue Sep 16, 2015 · 0 comments
Open

Move in with Alda via cljc #2

daveyarwood opened this issue Sep 16, 2015 · 0 comments

Comments

@daveyarwood
Copy link
Member

I've started a cljc branch for this in both this repo and the alda repo.

The parsing part pretty much works as-is, which is awesome, but it will be trickier to come up with a shared implementation for alda.lisp, for at least two reasons:

  • ClojureScript doesn't have in-ns, which I have used extensively as a way to split up the alda.lisp namespace into a whole family of files. It would probably be good to have things properly namespaced and not use in-ns, so I'm OK with reorganizing things a little. This approach might be helpful.
  • ClojureScript doesn't have eval (yet?), so it's unclear at this point what to do with the Clojure code that the parser generates.

Copypasta of @crisptrutski's comments on Alda issue #72:

For replacing eval, you could use the bootstrapped compiler in cljs.js (as long as the state is isolatable).

Should be able to execute without eval for regular alda.lisp forms (no expressions besides alda function calls and primates) with a simple multimethod though (dispatch on #(when (list? %) (first %))), to get rid of eval on both platforms

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant