Live data from Hacker News

Racket: Lisp for Learning

lwn.net

41–50 of 154 posts

Re: Racket: Lisp for Learning

#41
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…

It has always been core part of the language experience on Amiga, PC and Mac platforms.

Just not on UNIX culture.

Re: Racket: Lisp for Learning

#42
post #38

Racket is a mixed bag for me. I've found a little quirks in the standard library, with simple fixes, but annoying. Stuff like decimal->string (?) producing odd output. (It was a tiny fix on my end, but it's a little subjective, maybe the behavior was intended) Not a big deal, but maybe a little impediment for learners compared to python. The article mentions Scribble, which I use as a static site generator for a a pa…

Can you say more about the issue with number->string (probably that's the function you used)?

Also, I think we'd be happy to take patches to improve the Scribble CSS for mobile.

Re: Racket: Lisp for Learning

#43
post #38

Racket is a mixed bag for me. I've found a little quirks in the standard library, with simple fixes, but annoying. Stuff like decimal->string (?) producing odd output. (It was a tiny fix on my end, but it's a little subjective, maybe the behavior was intended) Not a big deal, but maybe a little impediment for learners compared to python. The article mentions Scribble, which I use as a static site generator for a a pa…

Apparently we've had very different experiences.

- Yes, there are some quirks in the standard library, but overall most of it seems very well designed. Having spent a bunch of time in Python, which also has a standard library with I'd argue even more quirks. But most Racket libraries seem very carefully thought out IME; I'm not sure that something this old can not have some weird oddities though. - We used DrRacket to teach a class to students who had never programmed before. What's amazing is that a) the students picked it up quickly and immediately... what other lisp can claim having something like that? and b) it's the only editor that I myself am happy to use other than Emacs. That's an interesting and unusual overlap, and deserves a pat on the back.

Yes, Racket has its quirks, but what doesn't? It's still an extraordinary project, community, development environment IMO.

Re: Racket: Lisp for Learning

#44
post #38

Racket is a mixed bag for me. I've found a little quirks in the standard library, with simple fixes, but annoying. Stuff like decimal->string (?) producing odd output. (It was a tiny fix on my end, but it's a little subjective, maybe the behavior was intended) Not a big deal, but maybe a little impediment for learners compared to python. The article mentions Scribble, which I use as a static site generator for a a pa…

The modern way of converting numbers to strings is ~v. Unlike `number->string` (which is compatible with Scheme), ~v has all the features one would expect (min-width, padding rounding etc.).

Re: Racket: Lisp for Learning

#45
post #38

Racket is a mixed bag for me. I've found a little quirks in the standard library, with simple fixes, but annoying. Stuff like decimal->string (?) producing odd output. (It was a tiny fix on my end, but it's a little subjective, maybe the behavior was intended) Not a big deal, but maybe a little impediment for learners compared to python. The article mentions Scribble, which I use as a static site generator for a a pa…

The modern way of converting numbers to strings is ~v. Unlike `number->string` (which is compatible with Scheme), ~v has all the features one would expect (min-width, padding rounding etc.).

Also check racket-mode for Emacs.

Re: Racket: Lisp for Learning

#46
post #18
post #15

Earlier quoted context omitted.

Yes, Racket support using multiple cores/OS threads. There are two mechanisms -- shared memory parallelism that is limited in what operations the threads can execute in parallel (called futures in Racket) and shared-nothing parallelism with message passing, more like Erlang (called places in Racket). Most real work using parallelism in Racket uses places.

I guess I was confused by this [1], specifically: Racket supports multiple threads of evaluation. Threads run concurrently, in the sense that one thread can preempt another without its cooperation, but threads currently all run on the same processor (i.e., the same underlying operating system process and thread). Is this documentation out of date or am I looking in the wrong place? [1] https://docs.racket-lang.org/re…

That's about the `thread` construct specifically, which as it says is green threads. Mostly people who are spreading work across multiple cores will have a few places that communicate, each of which has multiple threads to handle internal concurrency.

Re: Racket: Lisp for Learning

#47
post #33

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

It's mostly used in various education projects, and various commercial and research projects that are largely done by a single strong programmer (e.g., Carmack-ish people).

There's at least one large-codebase complex Web-based production system in it, which incidentally accomplished a first on AWS, but you've never heard of it, since it's internal-ish. It was a happy accident of history, that grew out of a lone super-productive programmer starting a complex data science infrastructure that I'd say few teams could've pulled off in a non-Lisp.

I've been waiting for another startup to decide they're going to do their first version in Racket, to do something non-cookiecutter. (It turned out neither myself nor my own startup co-founder had any interest in doing the CEO side of things, or I would've launched such a startup already.) But anything Scheme-related has a terrible curse for perception: students associate it with academic oddities in first-year classes, and then they focus on whatever "real" tools they hear employers or other companies are using.

Re: Racket: Lisp for Learning

#49
post #46
post #18

Earlier quoted context omitted.

I guess I was confused by this [1], specifically: Racket supports multiple threads of evaluation. Threads run concurrently, in the sense that one thread can preempt another without its cooperation, but threads currently all run on the same processor (i.e., the same underlying operating system process and thread). Is this documentation out of date or am I looking in the wrong place? [1] https://docs.racket-lang.org/re…

That's about the `thread` construct specifically, which as it says is green threads. Mostly people who are spreading work across multiple cores will have a few places that communicate, each of which has multiple threads to handle internal concurrency.

Fair enough! That's what I get for giving up after the first piece of documentation.

Maybe I'll give Racket another try....

Re: Racket: Lisp for Learning

#50
post #38

Racket is a mixed bag for me. I've found a little quirks in the standard library, with simple fixes, but annoying. Stuff like decimal->string (?) producing odd output. (It was a tiny fix on my end, but it's a little subjective, maybe the behavior was intended) Not a big deal, but maybe a little impediment for learners compared to python. The article mentions Scribble, which I use as a static site generator for a a pa…

Apparently we've had very different experiences. - Yes, there are some quirks in the standard library, but overall most of it seems very well designed. Having spent a bunch of time in Python, which also has a standard library with I'd argue even more quirks. But most Racket libraries seem very carefully thought out IME; I'm not sure that something this old can not have some weird oddities though. - We used DrRacket t…

What kind of machine do you have where DrRacket functions at an appropriate speed? Does it run better on Windows, maybe? It's noticeably laggy on my desktop with 5GB RAM free, a fast quad-core processor, and a fast SSD.

I like the design and the ideas it has for teaching, but I can't imagine it being usable performance-wise on the kind of machines that schools usually purchase.

Post reply on HN