logoalt Hacker News

A Friendly Introduction to Racket

164 pointsby signa11today at 2:08 PM64 commentsview on HN

Comments

GregBuchholztoday 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)" #())
show 4 replies
perrygeotoday 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.

show 1 reply
fn-motetoday 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.

show 3 replies
soegaardtoday at 9:17 PM

Btw - if people are interested in Racket related blogs / articles etc.

https://racket-stories.com/

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

show 3 replies
0x3444ac53today at 8:39 PM

Mild nitpick, but on Janet https://news.ycombinator.com/item?id=26496339

em-beetoday 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/

show 2 replies
vatsachaktoday at 4:23 PM

I've never seen the appeal in schemes other than hot reloadability...

show 3 replies
SilentM68today at 9:40 PM

Thanks for sharing. It's been bookmarked :)

  .-.
 / λ \
 '---'
ux266478today 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.

mcbk2142today at 4:33 PM

Very cool! Always was interested in racket, I will try writing Black Jack in it!

tech_armytoday at 5:06 PM

Will definitely try it.

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

tonethemantoday at 6:42 PM

[dead]