3 ms·
To me, being able to make changes to your code while keeping the current state in the REPL is key to interactive development. My workflow is generally to build
by mjmein 9y ago
To me, being able to make changes to your code while keeping the current state in the REPL is key to interactive development.
My workflow is generally to build up state, and then experiment with functions on that state until I get the correct output.
This workflow is very natural in Clojure, Common Lisp and even Python (with IPython and autoreload).
However, in Racket you have to restart everything on every change. This works ok for smaller applications, but if for example, your state is a large dataset that you pull from a remote database, it becomes a little more difficult.
There are possibly workarounds, and I'm not saying that Racket is bad because of this. There are definite advantages to this approach, mainly for keeping everything simple and predictable. However, this was a roadblock for me, and the main reason why I didn't spend more time working on it.
I also miss the ability to make changes to code, refresh the browser and instantly see the changes (instead of having to restart the server after each change).
Here's a good discussion (in my opinion) of what makes a good REPL for interactive development:
http://vvvvalvalval.github.io/posts/what-makes-a-good-repl.html http://vvvvalvalval.github.io/posts/what-makes-a-good-repl.h...
- stonemetal 9y agoIt isn't in DrRacket by default but it is a common enough requested feature that they keep an example of how to add it in the documentation. https://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html#%28part._.Sending_.Program_.Fragments_to_the_.R.E.P.L%29 https://docs.racket-lang.org/drracket/Keyboard_Shortcuts.htm...
- mjmein 9y agoThanks. Do you know if it works with the module system - for example, if I edit function definition in a module, and then send that module definition to the REPL, would any code using that module start using the new definition?
- bad_login 9y agoIt works in geiser-mode, i don't know if it works with drracket or racket-mode. http://docs.racket-lang.org/guide/eval.html?q=namespace#%28part._.Namespaces_and_.Modules%29 http://docs.racket-lang.org/guide/eval.html?q=namespace#%28p...
- sillysaurus3 9y agoI'm surprised no one has mentioned geiser. It sounds like exactly what you want for racket. http://nongnu.org/geiser/geiser_3.html http://nongnu.org/geiser/geiser_3.html
- pera 9y agoThere is also racket-mode (available on MELPA): https://github.com/greghendershott/racket-mode https://github.com/greghendershott/racket-mode
- peatmoss 9y agoThis is what I use. I find it quite comfortable / very easy to get going.
- ebzzry 9y agoGeiser is fine. However, we can’t compare it with SLIME. The integration of the latter is much better.
- baldfat 9y agoI use Visual Studio Code for Racket. https://marketplace.visualstudio.com/items?itemName=karyfoundation.racket https://marketplace.visualstudio.com/items?itemName=karyfoun... Before that I would use VIM with a tiled window manager that worked really well.