Live data from Hacker News

Racket: Lisp for Learning

lwn.net

51–60 of 154 posts

Re: Racket: Lisp for Learning

#51
post #48

Well, I'm pretty sure this is going to go badly for me in the end, but I might as well leave this here: https://ihateracket.com

And before any says it, yes, I do love the idea of students EVENTUALLY learning a Lisp/Racket kind of language before they graduate. I would even be happy with an entire course dedicated to it. But I don't want that to be the CS1. I've just seen it go so wrong for so long now.

Re: Racket: Lisp for Learning

#52
post #33

Who are the current major users of Racket? Are there any large commercial codebases written in it?

I taught Racket last fall, and failed to find any major ongoing projects or products I could talk about with the students. It's really only used educational contexts and within its academic research cult, it seems to me. And the number of schools that are using it are dwindling.

Re: Racket: Lisp for Learning

#53
post #2

Carmack is a huge fan of Racket. He was going to use it as the scripting language for VR until the Oculus execs made him use JavaScript instead (boooooo) https://twitter.com/id_aa_carmack/status/807797812700348416

Last week I tried writing a new Love2d mode for Emacs in Emacs Lisp, but it was on Windows so my muscle memory for Paredit wasn't helpful. Editing s-expressions is a nightmare without some kind of automatic help. Last night I wrote the same plugin for VS Code which used JavaScript, and naturally it was effortless. It got me thinking about how s-expressions are inherently hostile to non-customized setups, whereas Java…

I evaluated Paredit while it was being developed. I thought it was a massive boon to working with Lisp.

Then, one day, I turned it off. I'm not sure why.

I think it's because I didn't want to get too attached to it. I reasoned that Paredit wouldn't always be in the places I was working with Lisp, so I had better remain flexible enough to not need it. And between the editor's paren matching and the way I format my Lisp code, I can be pretty productive in Lisp without Paredit or a similar structural editing tool.

Also, AFAIK Paredit is pure Elisp, so should work just fine in Windows.

Re: Racket: Lisp for Learning

#54
post #29

Earlier quoted context omitted.

> Editing s-expressions is a nightmare without some kind of automatic help. I used to write C and C++ code in (non-vim) vi, with only autoindent, and it was fine. I could also type the spaces, if I had to. For s-expressions, like in a Lisp, you want autoindent a bit more, and some kind of of paren-matching/highlighting is also important. Fortunately, editors have been doing autoindent and paren-matching for decades.…

I agree that a good IDE experience is a core part of the language nowadays. And in my experience, VS Code + TypeScript is by far the best IDE experience, far better than Clojure + Emacs ever was. A significant amount of productivity that I thought that combination was giving me turned out to just be a feeling of productivity because of how ninja the stuff I was doing was. Similar to how I'm faster in Emacs than I was…

I know it’s java, I know it’s big and bloated and gross but at some point give IntelliJ idea a chance if you like the ide experience of vs code & ts! It’s mindboggling coming from editors & terminals

Re: Racket: Lisp for Learning

#56
post #33

Who are the current major users of Racket? Are there any large commercial codebases written in it?

Well, my 10 year old spaghetti-code rewrite of my 22 year old password manager is written in Racket [1], but I don't think about 1/3 sales per year qualify as commercial. If I ever have the time, I'll rewrite it in another language with proper memory locking and better password stretching.

[1] http://peppermind.com

Re: Racket: Lisp for Learning

#57
post #48

Well, I'm pretty sure this is going to go badly for me in the end, but I might as well leave this here: https://ihateracket.com

I'm actually glad I read that.

I recommend HtDP and Racket semi-regularly because 1) the incidental complexity of getting started with DrRacket is so low and 2) I don't have a better recommendation for a book that covers the same fundamentals.

Do you have suggestions to recommend instead?

Re: Racket: Lisp for Learning

#58
post #51
post #48

Well, I'm pretty sure this is going to go badly for me in the end, but I might as well leave this here: https://ihateracket.com

And before any says it, yes, I do love the idea of students EVENTUALLY learning a Lisp/Racket kind of language before they graduate. I would even be happy with an entire course dedicated to it. But I don't want that to be the CS1. I've just seen it go so wrong for so long now.

I think this is extremely fair. It's really hard to understand why anyone might want metaprogramming until you've tried programming without it (on something larger than the average intro-to-CS assignment). Having more libraries and resources is extremely useful from teaching to working in the real world.

Most of the points in the article are valid, and I especially agree that Racket or another Scheme should be taught at some point later on. Maybe even implementing a Scheme as a final course project or something like that (although that might not make sense outside a compilers class...)

Re: Racket: Lisp for Learning

#59
post #11
post #9

Does Racket support "real" multithreading yet? I remember looking at their documentation a few years ago and it only had support for a green-threading thing, which (along with the first-class hashmaps) steered me towards Clojure.

You can use futures, which have access to underlying OS threads. They don’t share a memory space though. There’s also an Actor library called Goblins which is nice, but I’m not sure if can use multiple cores.

Futures are difficult to use, because if you allocate or you call any of the "forbidden" primitives the thread will block and resume automatically when it is safe to do the operation. They are good for numerical work, but you have to pay a lot of attention writing code with futures.

It's more easy to use places, you can run whatever you want in places, but the communication between places is restricted and they have a big startup time (something like a quarter of a second) so if you create one, ensure that you are going to use it for a long time.

Re: Racket: Lisp for Learning

#60
post #29

Earlier quoted context omitted.

> Editing s-expressions is a nightmare without some kind of automatic help. I used to write C and C++ code in (non-vim) vi, with only autoindent, and it was fine. I could also type the spaces, if I had to. For s-expressions, like in a Lisp, you want autoindent a bit more, and some kind of of paren-matching/highlighting is also important. Fortunately, editors have been doing autoindent and paren-matching for decades.…

I agree that a good IDE experience is a core part of the language nowadays. And in my experience, VS Code + TypeScript is by far the best IDE experience, far better than Clojure + Emacs ever was. A significant amount of productivity that I thought that combination was giving me turned out to just be a feeling of productivity because of how ninja the stuff I was doing was. Similar to how I'm faster in Emacs than I was…

I am going quite in the opposite way. My IDE is getting more and more the shell, the VI(M) and the terminal based development tools (in my case mostly Haskell and Shell-Related). The more I work the more I am getting used to the terminal, get better usage of the tools. And strangely I find my screen more often to just have fullscreen terminal window.

I concede that I do not do any web or graphics development at the moment, this might help. But it's deeply satisfying to be able to discover new helpful functionality in the tools that are there for decades. And it's good to be able to use them almost everywhere, be it on a server over ssh or on a windows box with cygwin.

Post reply on HN