A Friendly Introduction to Racket

170 points - today at 2:08 PM

Source

Comments

GregBuchholz today at 7:05 PM
> no special syntax for anything.

    (list '(1. . #\#)
          -5/6+7.s-8i
          `(1 ,@2)
          1@1           ;hmmm, no unquote splicing comma ;-)
          10#           ;surprised?
          (list #i+1 +1i 1+i) ;complicated or complex?
          #e-1e10i     ;Old MacDonald?
          "(* 9 10)" #())
SA9G today at 10:14 PM
My first language, 1980 in CMU, was Pascal... quickly followed by LISP in CS/AI courses and C for EE courses. I was a big fan of MacLisp at the time, the MIT version that GLS worked on (could see his comments all over the sources). Of course GLS moved on to Scheme and wrote a few definitive papers on closures. Yeah, that was before PC's everywhere... a loooong time ago. (C++ came years and years afterwards, not a fan. I would have stayed with hardware if the ++ version of C was forced on me all those years ago.)

GLS moved to CMU in the early 80's... I remember taking "Comparative Programming Languages" from him. Good teacher and impressive guy. In addition to the obvious, he also covered SNOBOL and APL in that course. Memories :-)

perrygeo today at 3:14 PM
> In The Amazing Digital Circus (episode 8, "hjsakldfhl"), when Kinger opens the terminal to try to reset Caine, you can see that Caine (a creative AI built in 1996) is programmed in Lisp. The file is literally named Caine-core.lisp.

Nice touch. Explains how Caine returns in episode 9: Lisp continuations allow for graceful error recovery.

fn-mote today at 4:56 PM
Much as I am a fan of Racket, this is not a friendly intro. It is a speedrun.

When an introduction says “friendly”, I don’t expect it to assume that I know what lambda is.

When an introduction says “friendly”, I don’t expect syntax rules to appear in it. At all.

zerr today at 5:59 PM
While the language is interesting, sadly, nobody is using it in the wild. Maybe due to cumbersome deployment options? The ability to produce native standalone executables would boost its usage I believe.
soegaard today at 9:17 PM
Btw - if people are interested in Racket related blogs / articles etc.

https://racket-stories.com/

em-bee today at 3:02 PM
any time the topic of racket comes up, i wonder if there are any interesting apps i could explore. but all i find is libraries and dev tools: https://awesome-racket.com/
0x3444ac53 today at 8:39 PM
vatsachak today at 4:23 PM
I've never seen the appeal in schemes other than hot reloadability...
ux266478 today at 8:08 PM
Nothing against Lisp, but to correct the record:

> For decades, Lisp was the language of artificial intelligence. [...] Then came the "AI winter," funding dried up, and Lisp went from star to cult language.

Lisp had fallen from relevance before then. Only the United States was still using it, and mostly out of technical debt and a stubborn refusal to move on. Prolog displaced it in the late 1970s, and even within the US, the Lisp part was an unfortunate implementation detail to get to a Prolog-shaped object. It's not surprising that the US fell way behind Japan in this area in the 1980s. Anybody who would imply they would take a Lisp machine over a PIM is either not interested in symbolic computation and just likes Lisp, or they're doing so out of total ignorance of how much more advanced the PIMs were for symbolic AI.

The cutting edge was with Prolog, and that's still the case today. Nobody's researching MIL in Lisp, even in America.

SilentM68 today at 9:40 PM
Thanks for sharing. It's been bookmarked :)

  .-.
 / λ \
 '---'
mcbk2142 today at 4:33 PM
Very cool! Always was interested in racket, I will try writing Black Jack in it!
deleted today at 4:26 PM
tech_army today at 5:06 PM
Will definitely try it.
usxr1515 today at 6:52 PM
I've been designing my own small language runtime in Rust (VM + JIT + AOT backends) mostly as a way to actually understand tradeoffs compiler authors make instead of just reading about them. Racket's approach to macros and language-oriented programming is one of the things I keep coming back to as a reference curious how much of that flexibility comes at a real runtime cost vs. being mostly a compile-time abstraction.
tonetheman today at 6:42 PM
[dead]