Skip to content

Instantly share code, notes, and snippets.

@LiberalArtist
LiberalArtist / cont.rkt
Created June 1, 2026 17:41
Simulating generic `do` notation with a continuation monad
#lang racket
;; https://blog.sigfpe.com/2008/12/mother-of-all-monads.html
(require syntax/parse/define
(only-in data/applicative pure)
(only-in data/monad chain))
;; By happy coincidence, pure and chain are the generic versions,
;; bind and return are specific to the continuation monad below.
@LiberalArtist
LiberalArtist / ucnv-debug.c
Last active October 13, 2025 17:01
ucnv-debug.c
/* cc -o ucnv-debug ucnv-debug.c `pkg-config --libs --cflags icu-uc`
* SPDX-License-Identifier: (Apache-2.0 OR CC0-1.0)
* SPDX-FileCopyrightText: Philip McGrath <philip@philipmcgrath.com>
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include "unicode/utypes.h" /* Basic ICU data types */
#include "unicode/ucnv.h" /* C Converter API */
@LiberalArtist
LiberalArtist / info.rkt
Created May 30, 2024 19:50
Quickscript Gist Package Example
#lang info
;; SPDX-License-Identifier: CC0-1.0
(define quickscript-directory #t)
@LiberalArtist
LiberalArtist / $$README.md
Last active August 31, 2023 11:56
`raco dist` Demo

Inspired by .

@LiberalArtist
LiberalArtist / .gitignore
Last active February 15, 2023 12:22
Fibonacci Optimization in Racket
*~
\#*
.\#*
.DS_Store
compiled/
/doc/
@LiberalArtist
LiberalArtist / .gitignore
Last active November 6, 2022 02:31
Racket release branch diagram
*~
\#*
.\#*
.DS_Store
compiled/
/doc/
@LiberalArtist
LiberalArtist / .gitignore
Last active December 4, 2021 17:01
racket-tethered-apps-dir-demo
/workspace/
/layer/
*~
\#*
.\#*
.DS_Store
compiled/
/doc/
@LiberalArtist
LiberalArtist / README.md
Last active May 7, 2020 04:47
Breaking Cyclic Dependencies with Racket's Units

Breaking Cyclic Dependencies with Racket's Units

This is a responce to a [question] posted by James Platt to the racket-users email list.

Start with [single-file.rkt] for an example, then see how the example can be split into multiple files with the entry point [main.rkt].

@LiberalArtist
LiberalArtist / README.md
Last active February 22, 2020 19:49
application-preferences-handler-issue-demo