What's the coolest / most impactful Racket demo that you've ever seen?

I'm looking for things that a programmer unfamiliar with Racket might see and go "holy crap this is amazing".

I ask because I want to do a lunch-and-learn on Racket to a local programming friend group. :smile:

Things I've been linked so far:

I asked this question on the Racket Discord, but @spdegabrielle suggested that I ask here too. :sweat_smile:

6 Likes

Thanks & welcome Noah :grin:

I’d forgotten how wild the Racket map snip and plot combined demo - YouTube video is. I don’t think you can do that in any other modern editor or notebook. (Maybe Mathematica idk?)

Also Interactive Evaluation in Slideshow is amazing - I’ve not tried it yet with other #langs - I assume it works for any #lang?

I’ve fixed the link and changed the settings so you should be gold now. (We had terrible spam problems on the old mailing list)

Best regards

Stephen :beetle:

3 Likes

Oh I didn’t mean Quick: An Introduction to Racket with Pictures was a video- I just meant it easily could be a short video.

Any of the videos on @bogdan’s YT channel: Bogdan Popa - YouTube

Particularly:

3 Likes

I might try to run through that intro myself and turn it into a video. :smile:

2 Likes

The video for Super 8 Languages for Making Movies (Functional Pearl) International Conference on Functional Programming 2017
Is at

( I can’t make it work on my phone unless I open it via podcasts)

2 Likes

Ah, nice!

Here is the URL to the MP4 file for that one: http://media.podcasts.ox.ac.uk/comlab/comsci/2017-09-04-ICFP2017/2017-09-04-ICFP2017-day1-am-02.mp4

1 Like

I enjoyed All Programming Languages Suck? Just Build Your Own! — Language-Oriented Programming with Racket. That's the only one I really enjoyed that wasn't already listed.

4 Likes

Alex Harsányi's hobby projects

2 Likes

I just found “Bringing together language workbenches and macro systems” presentation by @michaelballantyne to the Strumenta Community*

I’ve only just started, but Michael begins with a cracking example with five languages in 9 lines of #lang rash! (I’m not sure what a metalanguage is?)

https://strumenta.community/meetup/virtual-meetup-michael-ballantyne/

YouTube:

https://youtu.be/p-5RcvF_Xc0

https://strumenta.community/meetup/virtual-meetup-michael-ballantyne/

(* a community for persons interested in Language Engineering. We discuss Domain-Specific Languages (DSLs), parsers, compilers, interpreters, editors, transpilers, code processing techniques. - https://strumenta.community/ )

3 Likes

I always thought the Demo for Rash: The Reckless Racket Shell was cool

3 Likes

I think Greg Cooper's talk at LL2 (2002?) had the coolest Racket-related demo I've seen. It was one of the first demos that I saw that showed off the power and flexibility of DrRacket. You could hear a hundred people's assumptions shattering at the same time. It wasn't recorded, but I'll try to relay a little bit of the magic to you. Open DrRacket and change the language to FrTime. (It isn't enough to use #lang frtime; you must select FrTime from the language menu; it's under "Other languages" in the Experimental section.) Then paste the following program into DrRacket and run it.

(require (lifted pict
                 circle disk colorize text
                 refocus pin-over inset cc-superimpose))

;; clock : Integer -> Pict
(define (clock s)
  (define RADIUS 100)
  (define DETAIL 40)
  (define base (colorize (disk (* 2 RADIUS)) "lightgray"))
  (define (fraction->clock-radians x) (* 2 pi (- x 1/4)))
  (define (2digit n) (if (< n 10) (format "0~s" n) (format "~s" n)))
  (define (center p) (let ([b (blank)]) (refocus (cc-superimpose p b) b)))
  (define s-rad (fraction->clock-radians (/ s 60)))
  (define m-rad (fraction->clock-radians (/ s 60 60)))
  (define h-rad (fraction->clock-radians (/ s 60 60 12)))
  (define s-disk (center (colorize (disk (* DETAIL 1/4)) "red")))
  (define m-disk (center (colorize (disk (* DETAIL 1/2)) "blue")))
  (define h-disk (center (colorize (disk (* DETAIL 1)) "purple")))
  (define (add base radius rad p)
    (pin-over base
              (+ RADIUS (* radius (cos rad)))
              (+ RADIUS (* radius (sin rad)))
              p))
  (define analog
    (let* ([base (add base (* RADIUS 3/5) h-rad h-disk)]
           [base (add base (* RADIUS 3/4) m-rad m-disk)]
           [base (add base (* RADIUS 1)   s-rad s-disk)])
      base))
  (define digital-s
    (format "~a:~a:~a"
            (2digit (modulo (quotient s (* 60 60)) 24))
            (2digit (modulo (quotient s 60) 60))
            (2digit (modulo s 60))))
  (define digital (center (text digital-s)))
  (inset (cc-superimpose analog digital) (* RADIUS 1/10)))

seconds
(clock seconds)
(let ([start (value-now seconds)])
  (format "You have been watching this program run for ~s seconds."
          (- seconds start)))

(Then check out Greg's real demos in the frtime package.)

1 Like

The version of this demo where the result of current-seconds changed every second got a spontaneous ovation in the middle of the talk at the 2003 Scheme Workshop.

Aha, I was mistaken, my memory was from LL3, the day after Scheme Workshop 2003, and he talked at both. My fuzzy recollection is that the Scheme audience was impressed but the LL3 audience was astonished. And apparently LL3 was recorded (at 320x240!) but the links to the recordings are now broken.

I’m on my phone right now but it looks like the video may be at

https://web.archive.org/web/20040319034249/http://ll3.ai.mit.edu/

Those video links don't work, unfortunately. They are just stub files that point to a server that is no longer online.