2,816 karma · joined November 26, 2019
Vanderbilt CS and math. Yale CS.
Email me! siraben [at] siraben.dev
In the meantime, months ago I achieved bootstrap of TCC (then GCC 4.6) via the same path as the live-bootstrap project but replacing the Scheme part with a C compiler in Ben Lynn's Haskell dialect.[1] This was a project I wish I had time to do years ago[2] but never had the time or motivation for, and the type of things agents can do well now (they couldn't write good Haskell a year ago).
[0] https://github.com/siraben/mrustc/tree/siraben/cmrustc
[1] https://github.com/siraben/blynn-bootstrap
[2] https://logs.guix.gnu.org/bootstrappable/2021-05-26.log#1438...
[0] https://www.anker.com/products/a2687-anker-prime-charger-160...
But the resulting ISO:
- has no network
- can't switch configurations
- doesn't have a text editor
https://gist.github.com/siraben/a8fce9912891d85e1ec3cf74081b...
The weird thing about TI-BASIC is how seemingly innocent changes in the input can cause huge performance regressions e.g. https://siraben.github.io/ti84p-re/sub-tibasic-for-paren.htm...
For(I,1,N
If 0
1
End
is much slower than For(I,1,N)
If 0
1
EndRegarding source build, I think reverse engineering it to the point where you can reconstruct the source is possibly legally problematic, so I don't plan to do this, but maybe for certain subsystems like MathPrint (equation display) which was especially fun to RE. I have a PR up for it and it will be live at
Broad takeaways:
- Ghidra MCP is not a silver bullet. Lots of opportunities for mis-decoding especially on older instruction sets (e.g. conflating code + data), which requires user input to flag data layout/structs.
- Agents still need a lot of user direction otherwise the RE production is just kind of a random walk. With Z80 it's decent at reading code but I expect that it has much worse performance than reading x86 or ARM for instance. The TI-84+ has a bunch of hardware quirks as well.
- GPT 5.5 is better than Opus 4.8 at RE. Opus 4.8 loves plausible-sounding RE'd logic without any checking. The gold standard is actually dynamically executing the binary and comparing the logic against the prose.
- Maintaining consistency in style and prose is a PITA across the wiki. Hard to reconcile prose <-> code. Can be somewhat mitigated by agent loops.
Was also in discussions with people in the TI calculator programming space who helped provide guidance as well. We previously did not have a catalogue of every subsystem in TI-OS yet alone most subroutines in the OS.
https://gist.github.com/siraben/cb0eb96b820a50e11218f0152f2e...
[0] https://github.com/siraben/dotfiles/blob/84225d914acd226863e...
λ> pretty (sumTo 10)
c += 0
n += 10
while n >= 0 {
c += n
n -= 1
}
λ> runAssembler (sumTo 10) -- Program length: 31
Right [847425747 % 2,13 % 3,19 % 13,11 % 3,11 % 29,31 % 11,41 % 31,23
% 11,23 % 47,2279 % 23,59 % 301,59 % 41,67 % 413,329 % 67,61 % 59,73 %
61,83 % 73,71 % 61,71 % 97,445 % 71,707 % 89,103 % 5353,103 % 83,109 %
5459,5141 % 109,107 % 103,113 % 749,113 % 19,131 % 113,29 % 131,127 %
113]
λ> runAsm (sumTo 10)
[(Prime 97,55),(Prime 107,1)]candy lasers redux: https://tixy.land/?code=0.2%2Bsin%28i*t%2F64%29%2B.3*sin%288...
A tiny 63 bit program[0] in this language represents a number unfathomably larger than not only ack(9,9), but the far larger Graham’s Number as well. It originates in a Code Golf challenge asking for the “Shortest terminating program whose output size exceeds Graham’s number”, answered by user Patcail and further optimized by user 2014MELO03. With one final optimization applied.
Here's a really short program. Let's calculate 2 * 3
(λn m s. n (m s)) (λf n. f (f n)) (λf n. f (f (f n)))
eventually it terminates with λ s n.s (s (s (s (s (s n)))))
which is just the church encoding of 6.[0] https://downloads.reactivemicro.com/Electronics/Reverse%20En...