Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repl? figwheel-repl or boot-cljs-repl ? #6

Open
azizzaeny opened this issue Mar 21, 2017 · 9 comments
Open

Repl? figwheel-repl or boot-cljs-repl ? #6

azizzaeny opened this issue Mar 21, 2017 · 9 comments
Labels

Comments

@azizzaeny
Copy link

consider using repl from boot cljs repl ? or figwheel repl ?

pros fig side:

  • figwheel repl will bring the ability of node.js seamlessly with (figwheeel.client/start!) and

pros cljs repl side:

@arichiardi
Copy link
Contributor

At the moment the boot-cljs-repl option is the one I found works ootb, but of course it has no interaction with the reloading of the browser web page. Figwheel has very good repl, which does a lot of things and it is probably the most advanced out there as many folks (Cognitect folks included) use.

I haven't had the time to try the figwheel repl with boot-figreload but I can imagine it might even just work, because it is sending events to its own web socket client /listener.

For sure some preliminary work is necessary what is the best option.

@arichiardi
Copy link
Contributor

Note that figwheel uses piggieback if I remember correctly.

@azizzaeny
Copy link
Author

azizzaeny commented Mar 21, 2017

@arichiardi what editor did you use..?
ya.. imagine we can display parse error message not just in browser but in node.js

(defmethod repl/process-message :eval-js [message]
  (let
    {:op :result
     :value (try
              {:status :success, :value (str ((fn [src] (.runInThisContext vm src)) code))}
              (catch js/Error e
                {:status :exception
                 :value (pr-str e)
                 :stacktrace (if (.hasOwnProperty e "stack")
                               (.-stack e)
                               "No stacktrace available.")})
              (catch :default e
                {:status :exception
                 :value (pr-str e)
                 :stacktrace "No stacktrace available."}))})) 

quick evaling and catch error display it somewhere..? example in electron or in
atom editor proto-repl..? and beutify it like figwheel does...

like the book of shader editor..
https://thebookofshaders.com/edit.php#05/smoothstep.frag
(note: trying changing color by draging)

or color picker in atom editor https://atom.io/packages/color-picker

analyzing what code changes... and quick evaling tiny fraction code by calling code function that changes and evaluate on-reload function.. not reconstructing... from scracth the build... and re-render

it will be huge win..

@arichiardi
Copy link
Contributor

I use emacs at the moment. Beautify is a good idea, and I think the goal of having this library now is that we can modify the client part of figwheel and we'll have benefits for us "booters" as well.

Figwheel client should be available for Node (I haven't tried it yet), so the test would be really just to add :target :nodejs in your :client-opts.

@azizzaeny
Copy link
Author

sorry i just updated the comment to get better sight...

@azizzaeny
Copy link
Author

by the way... i just statisfies by using your work.. :-) and hopes we can improve it bit by bit...

@arichiardi
Copy link
Contributor

arichiardi commented Mar 21, 2017

I think this might already be what the figwheel repl does, there is a :repl-eval event I am not using at the moment from here, but it is there.

At this point we might as well ask @bhauman directly. My goal was exactly to be able to re-use his great work for improving ours 😄 So big thanks to him in the first place!

@kommen
Copy link
Contributor

kommen commented Aug 10, 2017

We're using boot-cljs-repl right now, and we're running into adzerk-oss/boot-cljs-repl#49, so I'm looking to use the figwheel repl now.

@arichiardi
Copy link
Contributor

arichiardi commented Aug 10, 2017

@kommen it would be great to use the figwheel repl, I am very keen on having a boot task for that in this project.

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

No branches or pull requests

3 participants