News for hackers. Stuff that matters.
Re:Racket Language by MarceColl on Sunday April 21, 2024 @12:36AM (#40103205)
how do you deal with the very bad Racket repl? Thats what turned me off the language

edit: I dont reslly understand the downvotes, not trying to be rude or anything. Coming from CL the racket repl is very very barebones, it loses all state everytime you recompile. So I ask him how he deals with that coming from the very nice CL repl

Re:Racket Language by neilv on Sunday April 21, 2024 @01:14AM (#40103328)
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.

Re:Racket Language by djtango on Sunday April 21, 2024 @01:45AM (#40103430)
For someone lazy - what is the set up for the "evil" amongst aka vim users
Re:Racket Language by xhevahir on Sunday April 21, 2024 @04:18AM (#40104013)
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/
Re:Racket Language by neilv on Sunday April 21, 2024 @02:18AM (#40103536)
Re:Racket Language by arbitrandomuser on Sunday April 21, 2024 @04:56AM (#40104164)
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

Re:Racket Language by tionis on Sunday April 21, 2024 @07:18AM (#40104760)
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)
Re:Racket Language by MarceColl on Sunday April 21, 2024 @01:25AM (#40103357)
Oh! okay, heavy misunderstanding by using DrRacket. Thanks for the clarification :)
Re:Racket Language by jnxx on Monday April 22, 2024 @02:47PM (#40117467)
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.

Re:Racket Language by neilv on Tuesday April 23, 2024 @02:24PM (#40135331)
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.

Re:Racket Language by samth on Wednesday April 24, 2024 @08:27AM (#40143551)
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.