It is very strange. I have cloned https://github.com/ctford/klangmeister/tree/master/src/klangmeister/compile and run: lein figwheel The app has run and I can play with music via REPL Next I had extended synthesis.cljs with my sstr function and registered that functions to namespace-declaration After stoping app, removing target and starting lein fig wheel, the sstr is not visible in REPL ;-(
On Saturday, 2 April 2016 22:32:49 UTC+2, Mike Fikes wrote: > Hi Olek, > > The first argument to `eval`—the compiler state—would need to have metadata > regarding your `sstr` function. Since the state is empty, you run into a > problem. (As a quick aside, there is no need to write your own `eval-str` > that calls `eval`—one exists in `cljs.js`.) > > Frequently, for REPLs and other use cases, the compiler state is kept in a > top-level def, and the same state passed back in. (This causes the compiler > state to be mutated to incorporate new definitions that are encountered when > evaluating things.) > > But, in your case, you want to call a function in the very same namespace > that is hosting your code. One interesting solution to this is in Chris > Ford's Klangmeister project. Have a look in the code in this area to see how > he does it using some cleverness with macros: > https://github.com/ctford/klangmeister/tree/master/src/klangmeister/compile > > With respect to your last question: If I understand, most definitely "yes". > All of the evaluation / execution with self-hosted ClojureScript is happening > in the target JavaScript engine (no need for runtime support in the back-end > server.) > > - Mike -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
