Skip to content

Instantly share code, notes, and snippets.

@zamora
zamora / eopl-1.36.scrbl
Last active January 27, 2025 19:54
How to Solve EoPL Exercise 1.36
#lang scribble/lp2
@title{Solving EoPL Exercise 1.36}
@author[(author+email "Justin Zamora" "[email protected]")]
@section{The Problem}
The exercise is to write a procedure @racket[g] such that number-elements from page 23
could be defined as:
@zamora
zamora / wapo-keyword.py
Last active November 20, 2024 19:17
Solve The Washington Post's Keyword game
#!/usr/bin/python3
#
# wapo-keyword.py
#
# Program to solve The Washington Post's Keyword game.
# https://www.washingtonpost.com/games/keyword
#
# Usage: Enter the words on the command line, using a period for the
# missing letters.
#
@zamora
zamora / format-selection.rkt
Last active September 26, 2023 13:54 — forked from alex-hhh/format-selection.rkt
A fixed version of Alex Harsányi's Quickscript that doesn't hang when a single word is longer than the maximum width (as sometimes happens with long URLs)
#lang racket/base
(require quickscript racket/string)
(define prefix-rx #px"^\\s*;+\\s*")
(define fill-column 78)
(define (determine-prefix line)
(define m (regexp-match prefix-rx line))
(if m (car m) ""))
#lang racket/gui
; Main Window
(define frame (new frame% [label "FooChat Deluxe"]
[width 800]
[height 300]))
; Menu Bar
(define menubar (new menu-bar% [parent frame]))
(define file-menu (new menu% [parent menubar] [label "File"]))