Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/"), and ended up leaning more on modules and embedded unit tests ("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.



Very 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.


Oh! okay, heavy misunderstanding by using DrRacket. Thanks for the clarification :)


I 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.


Regarding 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.


For someone lazy - what is the set up for the "evil" amongst aka vim users


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)



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


There 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/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: