Skip to content

Instantly share code, notes, and snippets.

View spdegabrielle's full-sized avatar

Stephen De Gabrielle spdegabrielle

View GitHub Profile
@spdegabrielle
spdegabrielle / site.rkt
Created January 12, 2025 23:52
site.rkt for making your own Racket.
#lang distro-build/config
(machine
#:pkgs '("2d"
"at-exp-lib"
"compatibility"
"contract-profile"
"compiler"
"data"
"datalog"
@spdegabrielle
spdegabrielle / R16 description.txt
Created January 11, 2025 11:02
R16 description and example of backticks in markdown
An instance of R16 `!rkt`, the Racket ‘trick-bot’, can be used to run short pieces of code.
Use `!rkt help` for the full list of commands.
You can include clode blocks by putting three backticks (\`\`\`) on the lines before and after:
```scheme
`​`​`scheme
(define (myfun a)
(+ 1 a))
`​`​`
@spdegabrielle
spdegabrielle / cities plot.rkt
Last active July 9, 2024 12:45
cities plot
#lang racket
(require plot)
(require pict)
(define (pick l)
(list-ref l (random (length l))))
(define (pick-colour)
(pick (list "red" "orange" "yellow" "green" "blue" "indigo" "violet")))
(struct city (name lat long))
@spdegabrielle
spdegabrielle / terminal.md
Created November 5, 2023 12:22
@thingskatedid 💡FAQ about displaying stuff in a terminal
@spdegabrielle
spdegabrielle / Learning.md
Created October 17, 2023 07:32
Do you recommend Racket for learning?

Racket has a wide variety of great learning resources.

Racket has several languages specifically designed for new learners including

  • the student languages for use with the book How to Design Programs (full text freely available at https://htdp.org)
  • the SICP language and Picture language used in the seminal text Structure and Interpretation of Computer Programs (freely available online)

Racket also includes the Scheme R6RS language which can be used with The Scheme Programming Language which is also freely available at https://www.scheme.com/tspl4/

Racket - unsurprisingly - also includes the Racket Language (which is a descendent of Scheme), Type Racket, Lazy Racket, and a variety of other languages. Check out the home page to get an overview: https://racket-lang.org/ - there is getting started guidance at https://docs.racket-lang.org/getting-started/index.html

@spdegabrielle
spdegabrielle / badges.md
Created October 16, 2023 19:47
badges for Racket

Racket

Discourse users

Racket Discord

Mastodon Follow

@spdegabrielle
spdegabrielle / 3.md
Last active June 19, 2023 15:33
Rhombus

The problem with Racket is that it is more of a research language than a "productive" LISP.

Many of us in the Racket community are professional developers and both participate in the ongoing development and use it on a day to day basis for tasks unrelated to CS research.

The Racket team is focused on building a platform for PLT research, and are not that invested in Racket (the LISP) as much as they are invested in Racket (the platform). In fact, the current proposal for "Racket 2" (now called "Rhombus", the successor language for Racket) does not use S-exps at all.

Rhombus is a Racket #lang language implemented in Racket, and compiled down to fully expanded Racket before being compiled to native machine code.

Since the Rhombus announcement in 2019 Racket has continued to grow and evolve, as a language, a platform, and a community.

import * as $rjs_core from '../runtime/core.js';
import * as M0 from "../links/racketscript-extras/racketscript/htdp/universe.rkt.js";
import * as M1 from "../collects/racket/private/list.rkt.js";
import * as M2 from "../links/racketscript-extras/racketscript/htdp/image.rkt.js";
import * as M3 from "../runtime/kernel.rkt.js";
import * as M4 from "../collects/racket/private/for.rkt.js";
import * as M5 from "../collects/racket/private/map.rkt.js";
import * as M6 from "../collects/racket/private/reverse.rkt.js";
var G = 6.67428e-11;
var AU = 149600000.0 * 1000;
@spdegabrielle
spdegabrielle / botracket.json
Last active April 6, 2023 16:40
Tracery bots
{
"origin": ["#code#"],
"code": ["'(I love you)",
"(quote (I love you))",
"(list 'I 'love 'you)",
"(list (quote I) (quote love) (quote you))",
"(cons 'I (cons 'love (cons 'you '())))",
"(cons 'I (cons 'love (list 'you)))",
"(cons 'I (list 'love 'you))",
"(cons 'I '(love you))",
@spdegabrielle
spdegabrielle / level.rkt
Last active April 2, 2023 11:58
level data for untitled maze game
(vector
;0 4 8 2 6 0 4 8
"╔═══╗║T║╔════╕╒════╗║T║╔═══╗"
"║.*.║║t║║..*.║║.*..║║t║║.*.║"
"║...╚╝t╚╝.┌┐.║║.┌┐.╚╝t╚╝...║"
"║.........││.║║.││.........║"
"║.┌──┐.*..└┘.╚╝.└┘..*.┌──┐.║"
"║.└──┘................└──┘.║"
"║.┌──┐.┌┐.┌──────┐.┌┐.┌──┐.║"
"║.└──┘.││.└──┐┌──┘.││.└──┘.║"