A lightweight Lisp interpreter in Malbolge(github.com) |
A lightweight Lisp interpreter in Malbolge(github.com) |
bCBA@?>=<;:9876543210/.-,I*)(E~%$#"RQ}={
zyxwvutsrD0|nQl,+*)(f%dF"a3_^]\[ZYXWVUTS
RQJmNMLKJIHGFEDCBA@?>=<;:9876543210/.-,+
*)('&%$#dc~}|_^yrwZutsrqpinPlOjihgf_dcEa
D_^]\UZYX:V9TSRQPONGLK.IHGF?DCB$@#>=<;49
87w/v3210/.-,+$k('&%|#"!~w`{zyxwputslUpo
nmlkjiKgf_Hcba`_^]\[ZYXWP9TSRQPONMFKJCHA
*EDCBA@?>=<|:98y6543210).-,%*#j'&%$#"!~}
I'd love to hear about the tools used to construct this monster of code. My hat off to this programming wizard!
Btw, it's shocking to see how much better bzip3 by this same author [3] compresses than bzip2: 46M blc.mb
1.6M blc.mb.bz2
1004K blc.mb.bz3
[1] https://palaiologos.rocks/about/As for the compression: probably an artifact of a bigger block size and a closer-to-optimal entropy coding stage in bzip3 (simple model + binary arithmetic coding; fast suffix sorting due to research of Ilya Grebnov) vs bzip2's suboptimal implementation of what could have been Package-Merge that currently assigns excessively long Huffman codes (as I discovered while doing research for my data compression book); also probably the RLEs everywhere that Seward considers a mistake, small BWT blocks, etc. You could try the tool https://pastebin.com/6DUKs4q9, which eliminates the redundancy associated with the Malbolge encoding (which bzip3 kind of catches on without any preprocessing, while bzip2 not entirely) and drastically improves performance of all other compressors:
% ./a d <blc.mb >blc.n
% bzip3 -vfb50 blc.n
blc.n: 48175489 -> 647179 bytes, 1.34%, 0.11 bpb
% bzip3 -vfb50 blc.mb
blc.mb: 48175489 -> 1025582 bytes, 2.13%, 0.17 bpb"The first program was not written by a human being; it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp"
So now Malbolge repays the favor by implementing a Lisp interpreter.
Now, 19 years of professional software engineering later, I don't think my actual code-outputting skills are much better than they were at 19 - all I have now is more knowledge about the process and human side of software engineering and some extra esoteric facts and histories stored in my head. In fact, maybe I'm even worse, because I wouldn't have the time or patience to actually sit down and write something like that in befunge any more, because my priorities have changed.
Lisp in an “impossible” language, the most complex Malbolge program to date - https://news.ycombinator.com/item?id=28048072 - Aug 2021 (73 comments)
While I'm at it:
Malbolge - A programming language designed to be almost impossible to use - https://news.ycombinator.com/item?id=37863289 - Oct 2023 (2 comments)
Malbolge - https://news.ycombinator.com/item?id=37854603 - Oct 2023 (3 comments)
KFC Mascot Col. Sanders Talks Malbolge Programming on General Hospital - https://news.ycombinator.com/item?id=25835971 - Jan 2021 (83 comments, and yes this is real)
Malbolge: Intentionally difficult to reason about esoteric language - https://news.ycombinator.com/item?id=24549737 - Sept 2020 (1 comment)
A visualization of Malbolge programs, try playing with the m parameter - https://news.ycombinator.com/item?id=18849392 - Jan 2019 (1 comment)
Malbolge: Esoteric Programming Language - https://news.ycombinator.com/item?id=10559814 - Nov 2015 (1 comment)
Show HN: Web based interactive Malbolge interpreter, generator and a crackme - https://news.ycombinator.com/item?id=9478038 - May 2015 (1 comment)
Malbolge - https://news.ycombinator.com/item?id=7051732 - Jan 2014 (1 comment)
Malbolge (programming language) - https://news.ycombinator.com/item?id=4042148 - May 2012 (16 comments)
Malbolge - https://news.ycombinator.com/item?id=920546 - Nov 2009 (1 comment)
The peculiarity of Malbolge is that it was designed to be the worst possible programming language - https://news.ycombinator.com/item?id=162096 - April 2008 (3 comments)
All you startups hanging out on here, shouldn't you be hiring her?
[1] https://www.dyalog.com/blog/2023/10/dyalog-23-day-5-the-end-...
I see the author considers this a competitor to Electron. </s>