At https://github.com/blinry/legit, you will find two implementations: An interpreter (better suited for development and debugging purposes) and a compiler (which produces highly efficient binaries using LLVM). Both are written in Ruby. <3
legit is Turing complete! Here's a fully functioning Brainfuck interpreter to conveniently prove that. (Um, implementing that *might* have taken longer than doing the original language design…) https://github.com/blinry/legit-brainfuck
@blinry so what exactly _is_ the input to legit? Is it the git graph, or is it the meta-language of shell commands to generate that git graph?
@blinry (on the other hand, one could describe the meta-language of git commands the "language" and the git graph the "compiled bytecode")
@daniel_bohrer I feel like a program printing the Git commands required to build itself would be a valid quine, but the programs are definitely the Git repos themselves! :D
@blinry I’m both in love and scared to death, where do I sign up?
@blinry >A fun consequence of programs defined by a Git history is that you can’t properly track versions, because they already are Git repositories
You could commit it in a Mercurial repo^^
@l3viathan That actually works! /o\
I wonder if you could make a language (actually I'm sure it's possible) that cares *only* about commit structure, and disregards commit messages etc.
@blinry I've been studying the language design. Was there a reason behind the decision to have multiple instructions per commit? Is this just syntactic sugar to make the program more concise?
@hastern Yeah, mostly that. Also, you can group instructions to logical units, I guess. And you are free to make one commit per instruction, after all.
@blinry I like how you can use the rest of the commit as comments explaining your thought process of the oneliner above, so it feels just like writing real commit messages ^^
@blinry do you have a goto sha1?
With that, you can do some very interesting things with inclusion of code from other git repos, once git has pulled the necessary libraries.
(Similar to my idea https://joeyh.name/blog/entry/extending_Scuttlebutt_with_Annah/ )
@joeyh There is a jump command, which jumps to the commit pointed to by a certain tag. But it would be easy to extend that to full-fletched SHA1 jumping, I think! :)
@blinry you... you monster
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!