dmesg --follow
[ 70426500.000 ] posts.x: ↻ @jeremyphoward: We built a tool for our own internal team at AnswerAI to let us learn, explore, & develop mastery with the help of AI: S…  |   [ 70396140.000 ] posts.x: "Can I have the code that solved the CAPTCHAs?" Since my talk at @aiDotEngineer World's Fair, that's the question I get most. I've got something…  |   [ 70396200.000 ] posts.x: The talk this comes from, The Dark Arts of Web Automation, at AI Engineer World's Fair:  |   [ 70390020.000 ] posts.x: ↻ @htmx_org: some big news! after a long & intensive search process i am very happy to announce @JensenHuang as the next CEO of htmx ve…  |   [ 70241940.000 ] posts.x: ↻ @JayNagy: I’ve worked that heatshield my entire adult life. Peak career moment today To go from little 7 tile patches to a full reusabl…  |   [ 69798180.000 ] posts.x: ↻ @atlantajug: Maintainers are drowning in AI-generated slop. How do you make sure your PR isn't part of the problem? 🤖 @CoreyGallon shar…  |   [ 69798120.000 ] posts.x: ↻ @devnexus: Maintainers are drowning in AI-generated slop. How do you make sure your PR isn't part of the problem? 🤖 At #Devnexus2027, @…  |   [ 69626580.000 ] posts.x: @sentinelwayne Not following … ticketing systems are typically async, nay?  |   [ 69483540.000 ] posts.x: @sentinelwayne The chat dropped a couple of times, due to timeout. It’s just the same as if I was distracted on another screen and didn’t respond in…  |   [ 69435300.000 ] posts.x: Happy V for Vendetta Day!  |   [ 69435120.000 ] posts.x: Happy V for Vendetta Day!  |   [ 69346140.000 ] posts.x: This is a *chef’s kiss* salutation from the app in the morning. Nicely done, Claude team! 👌  |   [ 69303240.000 ] posts.x: @markfenner Nyope! It all went off perfectly, as though I had engaged in the chat myself.  |   [ 69303180.000 ] posts.x: @noelkimx Happy to share more — what are you after?  |  
corey@gallon.me:~/til$

Working through SICP in Jupyter Notebooks

FIGURE 1 ⋅ Working through SICP in Jupyter Notebooks

I’m reading Structure and Interpretation of Computer Programs and want to write Racket in VSCode in Jupyter notebooks in a dialect of Scheme closest to the book. This requires this declaration at the top of each Racket file:

#lang r5rs

HOWEVER, Jupyter doesn’t like this …

Jupyter Doesn't Like This
FIGURE 2 ⋅ Jupyter Doesn't Like This

The Jupyter kernel for Racket doesn't directly support changing the language with #lang declarations in individual cells. Claude to the rescue, though … eventually … what a pain to finally get to this!

  1. We need to find our where iracket is installed.
❯ find ~/.local -name iracket.rkt
/home/captivus/.local/share/racket/8.2/pkgs/iracket/iracket.rkt
  1. Now, we edit this file (home/captivus/.local/share/racket/8.2/pkgs/iracket/iracket.rkt) as follows:
#lang racket/base

;; ============================================================
;; Enabling R5RS mode for compatibility with SICP code
(require racket/sandbox)

(define orig-current-namespace (current-namespace))
(define r5rs-namespace (make-base-namespace))
(parameterize ([current-namespace r5rs-namespace])
  (namespace-require 'r5rs))

(define (switch-to-r5rs)
  (current-namespace r5rs-namespace))

(define (switch-to-orig)
  (current-namespace orig-current-namespace))

(switch-to-r5rs)

;; The rest of the original iracket.rkt content should follow here ...
;; ============================================================
  1. Now, restart your VSCode and create a Jupyter notebook as previously described in your TIL article … and you’re up!
corey@gallon.me:~$ tail -f /writing Attach to the stream. An email when I have something worth sending. Replies encouraged!
corey@gallon.me:~$ ls -lt /til ↑2024-10-06 Installing Racket (Scheme) in WSL
▸2024-10-06 Working through SICP in Jupyter Notebooks ⋅ you are here
↓2024-10-06 Writing Racket (Scheme) in Jupyter Notebooks