aboutsummaryrefslogtreecommitdiff
path: root/posts/SDL2_devlog.md
diff options
context:
space:
mode:
Diffstat (limited to 'posts/SDL2_devlog.md')
-rw-r--r--posts/SDL2_devlog.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/posts/SDL2_devlog.md b/posts/SDL2_devlog.md
index 4605b91..72aedef 100644
--- a/posts/SDL2_devlog.md
+++ b/posts/SDL2_devlog.md
@@ -5,6 +5,43 @@ on the editor. The days are listed in reverse chronological
5order, begin from the bottom, if this is your first time on 5order, begin from the bottom, if this is your first time on
6this page. 6this page.
7 7
8### Day 16
9
10The embedded lisp is coming along nicely, users can load
11a custom `rc.lisp`, which is evaluated on startup. To
12disable to grid on start, for example:
13
14```scheme
15;;; rc.lisp
16(toggle-grid)
17```
18
19Some aliases to switch between brushes:
20
21```scheme
22;;; rc.lisp
23(define (brush kind)
24 (cond
25 ((eq? kind 'f) (brush-fill))
26 ((eq? kind 'c) (brush-circle))
27 ((eq? kind 'l) (brush-line))
28 ((eq? kind 'l+) (brush-line-extend))
29 (else (brush-circle))))
30```
31
32### Day 15
33
34I began writing a standard library for the lisp, in lisp. It
35includes basic list operations: `car`, `cdr`, `null?`,
36`list`, higher order functions: `map`, `filter`, `fold`:
37
38```lisp
39(define (member? item ls)
40 (fold #f
41 (lambda (acc x) (or acc (eq? item x)))
42 ls))
43```
44
8### Day 14 45### Day 14
9 46
10I attempted a [small art 47I attempted a [small art