Some pretty interesting paper
I happened to find out that the creator of the famous "99 bottles of beer" program in Malbolge, Hisashi Iizawa, has published a paper called "Programming Method in Obfuscated Language Malbolge" with some other people.
I'd be extremely interested reading the paper, in case it's available in English (if not, hopefully someone can translate it).
Here's a short abstract:
- Malbolge is an obfuscated (esoteric) programming language, which is designed to be difficult to program in. In this paper, we propose a guide for programming in Malbolge for the purpose of the application for obfuscation in software protection.
A bit longer abstract (featuring a lot more interesting stuff) can be found here: http://www.is.nagoya-u.ac.jp/thesis/M2005/i/M350402019e.pdf
They have designed some method for translating a C-like language into Malbolge.. Would love to hear more about this. "... Using these solutions, we finally present a compiler from C like programs to codes in Malbolge."
- The japanese paper is here: http://www.sakabe.i.is.nagoya-u.ac.jp/~nishida/DB/pdf/iizawa05ss2005-22.pdf
- Not too helpful (unless you speak japanese), but it contains some C code which might be of interest --Rune 20:26, 1 Jun 2006 (UTC)
- On second glance, the C code is obviously just a Malbolge interpreter, so I guess there's not really anything useful to get from it (unless we can get it translated). --Rune 21:12, 1 Jun 2006 (UTC)
- Big thanks! Yeah, too bad I can't understand anything.. And, have people known about this for a long time already and I have just missed the news when I was away from #esoteric for a while and didn't read its logs..? Hmmm, the parts I linked mentioned there'd be some interesting stuff.. I guess there's no way to get it translated. --Keymaker 21:18, 1 Jun 2006 (UTC)
- The only place I've heard of this is on this talk page. I found the japanese article by googling. Anyway, I have posted a comment on the 99 bottles of beer website, asking if there is an english translation. Mr. Iizawa has posted there before, so if we're lucky he'll respond. --Rune 21:23, 1 Jun 2006 (UTC)
For what it's worth, the Iizawa's team have presented the very paper in JVSE 2010 (in English): Introduction to Esoteric Language Malbolge. It thoroughly describes bootstrapping process (how to generate an arbitrary value) and the low-level assembly language (called a "module" in the paper), though the high-level assembly language remains somewhat vague. It is still the helpful presentation though. --Kang Seonghoon (aka lifthrasiir) 05:18, 21 July 2011 (UTC)
I think the following is also an interesting thesis (it's Japanese again :-( ): http://www.kochi-tech.ac.jp/library/ron/2010/2010info/1110243.pdf It seems that this thesis discusses a decompiler for Malbolge programs created with the technique that is described by Mr. Iizawa et. al. And a very interesting thing: Appendix B contains Malbolge code for a cat program that halts on EOF! 126.96.36.199 18:36, 19 December 2012 (UTC)
- The cat program in the thesis seems to crash the original interpreter because of applying xlat2 to a cell not containing an ASCII character. 188.8.131.52 20:34, 19 December 2012 (UTC)
About the computational class
From the Computational Class section:
- The difficulty in showing Malbolge to be isomorphic to even a finite-state automaton, though, is not one of lack of features, but one of predictability. The code pointer can be readjusted with the i operation; the problem is in being able to execute it arbitrarily.
I planned to write a section about practical Malbolge programming to show that that's not a problem actually. Note that i operations (jumps) are immutable because the execution order is:
- Fetch and decrypt the instruction.
- Execute the instruction.
- Encrypt the byte at [C]
- Increment C
When a jump is executed, i.e. C = [D], the third step encrypts the destination address rather than the jump itself.
This, and the fact that short (length 2) cycles exist in step 3 for all instructions, is the base for making Malbolge coding practical. The BIG trouble is that the source code can't hold arbitrary numbers, just the allowed instructions which are 8 possibilities per address, making it necessary to add an execute-once initialization routine that sets data to the desired values. In the sample "cat" program that's the code below the "j" that is alone in a line.
--pgimeno 00:07, 13 Jun 2005 (GMT)
- Sounds good to me... that section is exactly what would have to be referenced by a proof (of equivalency with an FSA), to show that it's possible to execute chosen instructions at will. --Chris Pressey 04:39, 13 Jun 2005 (GMT)
Trinary vs. ternary
This page uses the word "trinary" extensively, although "ternary" is, AFAIK, the correct word. I've added a small mention of it, but I'm wondering if it would be better to rewrite it using only ternary, but with a sentence near the first mention, bad example: "Ben used the word trinary..." so that the reader knows that trinary is often used as well? --Calamari 01:44, 13 Jun 2005 (GMT)
- The proposed change sounds fine. The usage of trinary seems to originate in being able to use the abbreviation "trit", but yes, ternary is more widely used. --pgimeno 12:13, 13 Jun 2005 (GMT)
- My recollection is that Foldoc (which seems to be down at the mo) states that both words are equally valid. On Wikipedia, "trinary" redirects to Ternary numeral system, and the article mentions both terms in the intro but otherwise doesn't comment on this aspect of the terminology. As for the question of which is more widely used, I know that "ternary" is the usual term in other contexts (ternary operators, ternary musical forms) but what evidence is there of one being more common when talking about the number base? -- Smjg 16:30, 25 August 2008 (UTC)
Do any of the other old-timers here know where the appellation "crazy" for the operation comes from? Someone asked at the wikipedia talk page because they couldn't find any good reference for it. It's not in the original Malbolge specification or implementation. The questioner considered us as a reference, but I see the wikipedia use is older than ours, but on the other hand our phrasing is somewhat different. --Ørjan 02:00, 7 January 2011 (UTC)
Possible error in translation to Normalized Malbolge
Translation of cat program to Normalized Malbolge
jivvvvvvvvvvvvvvvvvvvvvvv<ivvvvvvvvvvvvvvoj/ivvvvv vvvvvvvvvvjivvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv**v**j< v*oopvvvvvvvvv/vvvv/vv j ppopppp*ooooooooooooo*ooooj o*oopoooooooooooooooo*ooooj ooo*ooopooopooooooooo*ooooj oooooooo*oooooooooooooooooj ooopopooooooooooooooo*ooooj o*oooopoooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj oooooopoooopooooooooooooooj ooooooooooi
seems to contain a bunch of errors. "Sample Programs"
Take a look at the third symbol in original program for example.
ASCII code for "B" is 66. 66 + 2 = 68 which translates to "o" instruction. Not "v".
The correct translated version
jiooooooooooooooooooooooo<ioooooooooooooooj/iooooo oooooooooojiooooooooooooooooooooooooooooooo**o**j< v*oopooooooooo/oooo/oo j ppopppp*ooooooooooooo*ooooj o*oopoooooooooooooooo*ooooj ooo*ooopooopooooooooo*ooooj oooooooo*oooooooooooooooooj ooopopooooooooooooooo*ooooj o*oooopoooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj ooooooooooooooooooooo*ooooj oooooopoooopooooooooooooooj ooooooooooi