4 ms·
The REPL in DrRacket is like that because it was made by professors, specifically targeting intro students who had never programmed before. They thought a big
by neilv 3y ago
The REPL in DrRacket is like that because it was made by professors, specifically targeting intro students who had never programmed before. They thought a big Run button with a clean slate each time would be less confusing.
You don't have to use DrRacket to use Racket.
People doing real work with Racket tend to have "workflow" setups that are closer to SLIME.
I personally used a simpler Emacs setup ("https://www.neilvandyke.org/quack/ https://www.neilvandyke.org/quack/"), and ended up leaning more on modules and embedded unit tests ("https://www.neilvandyke.org/racket/overeasy/ https://www.neilvandyke.org/racket/overeasy/"), and less on very dynamic interactive evaluation like I'd done before.
Though, if you want to monkeypatch heavily, CL is famously good at that.
- samth 3y agoVery few people I know doing real work in Racket have a SLIME-like workflow. In general, Racket discouraging this style is related to us being a bunch of professors, but not really in the way you say. Instead, it's because it's not possible to give a sensible semantics to the top-level, especially in the presence of macros. We care a lot about macros, and we also care a lot about sensible semantics, and thus the attitude towards the REPL. The slogan in the Racket community that "the top level is hopeless" expresses this sentiment.
- MarceColl 3y agoOh! okay, heavy misunderstanding by using DrRacket. Thanks for the clarification :)
- djtango 3y agoFor someone lazy - what is the set up for the "evil" amongst aka vim users
- neilv 3y agohttps://docs.racket-lang.org/guide/Vim.html https://docs.racket-lang.org/guide/Vim.html
- xhevahir 3y agoThere was a nice extension called DivaScheme that used unchorded keystrokes like vi and allowed structural editing but it stopped working when PLT Scheme reached version 5. (Which I think was when they changed the name to Racket.) https://cs.brown.edu/research/plt/software/divascheme/ https://cs.brown.edu/research/plt/software/divascheme/
- arbitrandomuser 3y agohttps://github.com/jpalardy/vim-slime https://github.com/jpalardy/vim-slime you can have a REPL in nvim/vim/tmux/screen/another terminal/or any other window , and send regions from your vim buffer to that repl
- tionis 3y agoConjure (https://github.com/Olical/conjure https://github.com/Olical/conjure) for neovim should work quite well. I've been using it for quite some.time with Janet(another lisp)
- jnxx 3y agoI think Guile is a good example that one can have an SBCL-like workflow of live coding (with debugging and jumping right into a stack trace) in Scheme. I have heard that this is not possible because Racket needs to make a stricgter separation of compile time and run time... but I am not sure whether this is actually true.
- neilv 3y agoRegarding the stricter separation, Racket and its module system have nicely clear concepts of phases. (I really like how the Racket module system has been used these to benefit the language.) But, though I don't know current Racket internals, I'm not sure those need to be a barrier to monkeypatching that approaches CL. Other than optimizations that make some debugging info and dynamic changes difficult-to-impossible, if the system had a mode to disable these optimizations (or to maintain some information in parallel that permits a cascading unraveling of optimizations affected by a change), I'm not aware of a fundamental reason the system couldn't support more loose poking at things. Though, one implementation complication that Schemes do have is first-class continuations.