#lang distro-build/config | |
(machine | |
#:pkgs '("2d" | |
"at-exp-lib" | |
"compatibility" | |
"contract-profile" | |
"compiler" | |
"data" | |
"datalog" |
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)) | |
``` |
#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)) |
https://x.com/thingskatedid/status/1316074032379248640?s=20
Q. Kate which terminal is that!? omg A. The terminal I use is called kitty. https://sw.kovidgoyal.net/kitty/
Other terminals can display images, too. Go and read this: https://saitoha.github.io/libsixel/
I think kitty uses its own protocol, rather than sixel.
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
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; |
{ | |
"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))", |