clojure-austin 2024-05-10

Here’s what I was talking about the sqlite bytecode the other day:

❯ sqlite3
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table foo(id int);
sqlite> select * from bytecode('select * from foo');
0|Init|0|7|0||0|Start at 7||0|0
1|OpenRead|0|2|0|1|0|root=2 iDb=0; foo||0|0
2|Rewind|0|6|0||0|||0|0
3|Column|0|0|1||0|r[1]= cursor 0 column 0||0|0
4|ResultRow|1|1|0||0|output=r[1]||0|0
5|Next|0|3|0||1|||0|0
6|Halt|0|0|0||0|||0|0
7|Transaction|0|0|1|0|1|usesStmtJournal=0||0|0
8|Goto|0|1|0||0|||0|0
and a good page with lots of links to the technical bits from sqlite: https://www.sqlite.org/whybytecode.html

💯 1