@seancorfield I think it's a common pattern this one: "wrap this code/var/selection/block into something and evaluate", so maybe it'll be good to expose some kind of API?
@mauricio.szabo Maybe. Have you looked over the rest of my inspect
commands in that init.coffee
file?
There are several different types of context (top block, block, selection, var-at-cursor, ...) and different code wrapping (although those could all just become a function to apply to whatever text ended up being selected).
I guess I could refactor all those commands to use a common eval and present wrapper where the range computation and wrapper functions are passed in as arguments...
Yes, I saw your init. There are some on mine too, that's why I thought it would be a good idea. Also, REBL integration "out of the box" could be a good feature for Chlorine to have, so I think I'll keep it on the codebase
I'd certainly be happy for the extra REBL commands from my init.coffee
file to end up as built-in commands in Chlorine, given that it already has two of them π
@mauricio.szabo I refactored my init.coffee
file to a wrapped_eval
function that takes three (function) args https://github.com/seancorfield/atom-chlorine-setup/blob/master/init.coffee#L59-L117
If you wire up those EditorUtils
range functions to use the new rewrite-cljs
logic (if the feature flag is enabled) then I'd be able to test my setup more easily against your new features π
Interesting discussion. I have a problem in that I have an old school need for understanding whatβs going on (React/webpack/etc takes some calm breathing to work for me...). So. This REPL thing. Anyone know of a good resource for understanding what a repl in the Clojure world is at a technical level? (Why do we have a bunch? Differences? Etc...). Thankful for any pointers π
@Matt how about this? https://lambdaisland.com/guides/clojure-repls
it doesn't seem to cover prepls though
Thanks, Iβll read anything π
This is an interesting development as of this morning. Typing in a new namespace (cljs) repeats it in the REPL (with some delay)
@seancorfield great, I'll look at your code as soon as I can. I'll first have to look at the "console" implementation (I'll try to re-add the old Console because its removal broke my workflow).
@henrik it's possible that the autocomplete on ClojureScript is rendering something on the console. Maybe some debug println
that escaped, or something that should be ignored that it isn't. I'll look at it too.
(shadow-cljs, some versions ago, didn't redirect the console so these bugs can start to appear now that it does)