summaryrefslogtreecommitdiff
path: root/2024-06-18-guix-social/slides.org
blob: b7c740e4f8a5ec33e48dd299e65e62c3e785a249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
#+TITLE:  Get rich slow with Guile and Guix
#+AUTHOR: David Thompson
#+DATE:   2024-06-18 Tue

#+OPTIONS: toc:nil num:nil reveal_title_slide:nil
#+REVEAL_MAX_SCALE: 2
#+REVEAL_MARGIN: 0.075
#+REVEAL_MIN_SCALE: 0.5
#+REVEAL_TRANS: cube
#+REVEAL_THEME: night
#+REVEAL_HLEVEL: 2
#+REVEAL_ROOT: reveal.js

# * To-Do
# ** TODO Fix Christine deadname in old blog post

* Get rich slow with Guile and Guix
Guix Social

2024-06-18

https://dthompson.us

* Hi!
- I'm David Thompson
- From Massachusetts, USA
  - The birthplace of Scheme and Free Software
- CTO at Spritely Institute
- Guile/Guix user and contributor for over 10 years

* tl;dr
- 2012: Discovered Scheme then started using Guile
- 2013: Became an early Guix contributor
- 2015-2017: Made my own tools/libraries with Guile
- 2022-now: Making FOSS full-time

* 2012: Libreplanet
In hindsight, the most defining moment in my career path:

- Yukihiro Matsumoto: "How Emacs Changed My Life"
- Christine Lemmer-Webber: GNU MediaGoblin

* 2012: Libreplanet
- Immediately dropped Vim for Emacs
- Started to use/hack on MediaGoblin

* 2012: Ruby
- First professional development job writing Ruby
- Relevant to Guix, eventually

* 2012: Game dev
- Wanted to make games as a hobby
- Went the C core with embedded "scripting" language route
- Started with Lua, but then...

* 2012: SICP
#+REVEAL_HTML: <img class="stretch" src="sicp.jpg">

* 2012: Guile
- "official" GNU extension language
- I was into GNU at the time
- Can extend C programs... but at what cost?

* 2013: First FOSS patch
- Like many, I struggled to find a way to participate in FOSS
  development
- GNU MediaGoblin turned out to be very welcoming!
  - Issue tracker had "bitesized" tag for newcomers
  - I added an option to enable/disable comments

* 2013: Guix
- I hadn't heard of Nix, but this new Guix thing by Ludovic Courtès
  looked fascinating
- Started before the distro was bootstrapped
- Switched from Debian to Guix later

* Why Guix?
- Functional package management model
- Practical software freedom
- Whole-system rollback
- Easy development environments

* Extend vs. Embed
- Nix embeds Bash into package recipes
- Guix uses Guile all the way down (almost)
- Scheme isn't *icing* on top of C++/Bash
  - Scheme is the *cake*

* 2013: Guix contributor
- First Guix patch: Packaged libtheora
- Packaged SDL, SDL2, etc. shortly after
- Ludo gave me commit access!

* 2013: Guile contributor
- First patch to Guile: =alist->hash-table=
- Worked on =(system repl coop-server)= with Mark Weaver

* 2014: Ruby build system
- Wrote =(guix build-system ruby)= and initial Ruby packages
- Pjotr Prins was involved in this, too

* 2014: guix environment
- Wanted something like =nix shell=
- Would become =guix shell= later
- Did not achieve consensus on sane defaults
  - Remember =--ad-hoc=?
- =guix shell= corrected the problems, eventually

* 2015: guix publish
- Guix wanted to encourage more substitute providers
  - but Hydra was a large piece of software
- I wrote the initial version of =guix publish=
  - Pure Guile; uses the =(web ...)= modules

* 2015: guix publish
- Seems to have been useful over the years
  - but substitute availability is far from a solved problem
- Distributed substitutes seem like the way to go

* 2015: call-with-container
- Learned that there was more to containers than layered disk images
  - Thanks to Docker for "container" ambiguity! 😞
- The good stuff is actually the runtime environment (Linux namespaces, etc.)
- Can we implement just the good parts of Docker for Guix?

* 2015: call-with-container
- Don't mount opaque disk images of unknown provenance
- Bind mount =/gnu/store= directories instead
- Containment + reproducibility
- Used in:
  - =guix shell --container=
  - =guix system container=
  - containerized Shepherd services

* 2015: Haunt
- Static site generator written in Guile
- Uses =guix shell= for development environment
- Guix is the first (only?) distro that gets package updates
- Both the Guix and Guile websites use Haunt

* 2016: Oops, I bought a house
- Who could have imagined this would use up all my free time?
- Guix contibutions greatly reduced
  - I've never returned to my previous level of activity
  - But the Guix community has grown *a lot*!
  - I can be a user now (mostly) 👾

* 2017: Chickadee

#+REVEAL_HTML: <img class="stretch" src="chickadee-3d.png">

- After all this time, I still wanted to make games
- Created Guile-SDL2 along the way
- Uses =guix shell= for development, naturally

* Chickadee
- *not* a wrapper around raylib, etc.
- Inspired by Guix to *maximize* usage of Guile
- Rendering code 100% Scheme (until we hit libGL)
  - Made possible by Andy Wingo's incredible compiler/VM work

* 2019: guix deploy
- Wanted an answer to Chef, Ansible, etc.
- Co-mentored Jakob L. Kreuze with Christine Lemmer-Webber for Google
  Summer of Code
- A GSoC project that made it upstream!
- I now manage my personal server with =guix deploy=
- Lots of improvements could be made
  - Any volunteers? 🙂

* Intermission: Pandemic

* 2022: Lisp Game Jam
- Became co-host of the Lisp Game Jam on itch.io
  - along with Fennel maintainer technomancy
- This will become relevant shortly

* 2022: Spritely

#+REVEAL_HTML: <img style="background-color: #edeaee; border-radius: 5px;" class="stretch" src="spritely-institute-logo.png">

- Spritely is a US 501(c)(3) nonprofit
- Cofounded by *Christine Lemmer-Webber*
  - now famous for ActivityPub!
- Building the next generation of *secure*, distributed networking
  infrastructure
- Object capability security

https://spritely.institute

* OCapN: The Object Capability Network

#+REVEAL_HTML: <video src="ocapn-handoff.mp4" autoplay="true" loop="true" class="stretch"/>

* OCapN
- Open standard for capability-secure networking
- Pre-standardization phase

https://ocapn.org

* My role at Spritely
- Initially hired as Core Infrastructure Architect
  - now CTO
- First big project: Distributed debugging

* 2023: Distributed debugger

#+REVEAL_HTML: <img class="stretch" src="questie-lamport-diagram.png">

* How Spritely uses Guix
- =guix shell= for development environments
- =guix deploy= to manage servers over SSH
- =guix pack -f docker= to build CI images
- Goblins and Hoot releases are immediately published to Guix on
  release day

* Highlight: GitLab CI

I've noticed people asking about this lately:

#+BEGIN_SRC sh
  guix pack -m ci-manifest.scm -C zstd -f docker -S /bin=bin
  skopeo copy ...
#+END_SRC

* 2023: Hoot

#+REVEAL_HTML: <img class="stretch" src="hoot-future-of-scheme-hacking.png">

* 2023: Hoot
- Hoot is a Scheme-to-WebAssembly compiler
  - with its own toolchain!
  - *No* emscripten!
- Scheme in the browser!
- Lead engineer: Andy Wingo (Guile maintainer)
- I wrote the Wasm interpreter =(wasm vm)=
- Still actively working on toolchain and Scheme implementation

* 2023: Strigoform
#+REVEAL_HTML: <iframe frameborder="0" src="https://itch.io/embed-upload/8997570?color=333333" allowfullscreen="" width="482" height="662"><a href="https://davexunit.itch.io/strigoform">Play Strigoform on itch.io</a></iframe>

* 2023: Strigoform
- My game dev fascination comes full circle!
- Made for the Autumn Lisp Game Jam
- One of the first Wasm GC games to be published
- Built with Hoot 0.1 + some additional stuff from the main branch
- Largest program built with Hoot at the time

* 2024: Cirkoban
#+REVEAL_HTML: <iframe frameborder="0" src="https://itch.io/embed-upload/10583669?color=222034" allowfullscreen="" width="640" height="500"><a href="https://davexunit.itch.io/cirkoban">Play Cirkoban on itch.io</a></iframe>

* 2024: Cirkoban
- Made for the Spring Lisp Game Jam
- Built with Hoot 0.4.1 and a WIP port of Goblins
- Uses Goblins actors and transactional rollback

* The future: guix develop
- =docker compose= but for Guix
- I've wanted this for 10 years!
- Like =guix shell= but also spawns a Shepherd
- Uh oh, *another* kind of service?

* The future: Distributed shepherd
- Currently funded by NLnet and in development by Juli Sims
- Shepherd + Spritely Goblins
- Orchestrate clusters of Guix machines securely!
- =guix deploy= over Object Capabilities Network (OCapN)?

* The future: Distributed substitutes
- Using ERIS perhaps?
  https://codeberg.org/eris/guile-eris/

* The future: Guix, the OCap OS
- Unified services (no system vs. home split)
- Reduce ambient authority on Linux
- Build on =call-with-container=?

* The future: Chickadee + Hoot
- Native + web builds of Guile games from the same source
- Need to improve Wasm GC to make this possible

* Fin
- Opportunties come from unexpected vectors
- Guile and Guix have come a long way!
- Keep pushing the limits of what Guile can do!
- Thank you to the Guix Social organizers!

* Questions?

https://dthompson.us

https://spritely.institute