Introduction to Esoteric Language Malbolge Masahiko Sakai (Nagoya University) 99 Bottles of Beer(1/3) 99 Bottles of Beer(2/3) 99

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Esoteric Language Malbolge Masahiko Sakai (Nagoya University) 99 Bottles of Beer(1/3) 99 Bottles of Beer(2/3) 99 99 bottles of beer(2/3) 99 bottles of beer(1/3) • Top list (2008): ours in Malbolge is No.1 ! • http://www.99-bottles-of-beer.net/ • Collection of programs that output the song Introduction to 99 bottles of beer on the wall, 99 bottles of beer. Esoteric Language Malbolge Take on down and pass it around, 98 bottles of beer on the wall. ... 2 bottles of beer on the wall, 2 bottles of beer. Masahiko Sakai (Nagoya University) Take on down and pass it around, 1 bottle of beer on the wall. 1 bottle of beer on the wall, 1 bottle of beer. Take on down and pass it around, no more bottles of beer on the 10 Dec 2010, College of Technology, VNU wall. No more bottles of beer on the wall, no more bottles of beer. Go to the store and buy some more, 99 bottles of beer on the wall. • Programs in more than 1200 different lan- guages 1 2 3 99 bottles of beer(3/3) Esoteric Programming Languages Malbolge • Comments for Malbolge • Language designed to be HARD to read and • A programming language come from HELL write - 10 trits machine defined by its interpreter - INTERCAL [Woods, Lyon 1972] - Each operation is modified after execution - BrainF∗ ∗ ∗ [M¨uller 1993] - Only one trit-wise operation is poor - Befunge [Pressey 1997] A,[D] := crz(A,[D]) - Malbolge [Olmstead 1998] [D]\ A 0 1 2 0 1 0 0 • Proposed as jokes 1 1 0 2 • References 2 2 2 1 http://members.tripod.com/rkusnery/weird.html - Hard to load data, because non-operations http://www.99-bottles-of-beer.net/toplist_esoteric.html are not loadable. 4 5 6 Our Motivation History of Malbolge • Programs written in Esoteric Languages are This talk like encrypted but Executable without en- • [Ben Olmsted 1998] Language Proposal cryption • Explanation of Malbolge • [Andrew Cooke] “HEllo WORld” program • Overview of Programming technique • [Anthony Youhas 2000] Three programs that - Bootstrapping output strings - Low level assembly language • [Lou Scheffer] Program like “cat” - High level assembly language • [Tomasz Wegrzanowski 2004] Method to produce a program that outputs a given string 7 8 9 Syntax of Malbolge Example of Malbolge program • String of printable characters (33 to 126 in Semantics of Malbolge(1/3) ASCII) where spaces are ignored. • “HEllo WORld” program by Cooke. • Each i-th character x must be an operator % cat hello-fake.mal • Malbolge machine (=<‘$9]7<5YXz7wT.3,+O/o’K%$H"’~D|#z@b=‘{^L const char xlat1[] = - Address area = One word = ten trit x8%$Xmrkpohm-kNi;gsedcba‘_^]\[ZYXWVUTSRQPO 10 "+b(29e*j1VMEKLyC})8&m#~W>qxdRp0wkrUo" NMLKJIHGFEDCBA@?>=<;:9876543s+O<oLm 0 to 59048 = 3 − 1 "[D7,XTcA\"lI.v%{gJh4G\\-=O@5‘_3i<?Z’" % ./malbolge hello-fake.mal - Codes and data are stored in memory ";FNQuY]szf$!BS/|t:Pn6^Ha"; HEllO WORld - Three registers if(strchr( "ji*p</vo", • Operations obtained by xlat1[(x-33+i)%94] A: accumulator xlat1[( x-33+i ) % 94]) == NULL) C: code pointer jpp<jp<pop<<jo*<popp<o*p<pp<pop<pop<jijoj/ D: data pointer fputs("invalid character\n", stderr ); o<vvjpopoopo<ojo/ovooooooooooooooooooooooo Note that illegal operator is not loadable, but oooooooooooooooooooooooooooo*p<v*<* executable as Nop. 10 11 12 (3/3) Semantics of Malbolge(2/3) Semantics of Malbolge • Eight operators, which take no operands Example of execution • Execution operator notation action j MovD D := [D] const char xlat2[] = • “HEllo WORld” "5z]&gqtyfr$(we4{WP)H-Zn,[%\\3dL+Q;>U!pJS72FhOA1C" i Jmp C := [D] "B6v^=I_0/8|jsb9m<.TVac‘uY*MK’X~xDl}REokN:#?G\"i@"; * Rot A,[D] := rotr([D]) A C D adr data opr for (;;) { if ( mem[c] < 33 || mem[c] > 126 ) continue; p Opr A,[D] := crz(A,[D]) 0000000000t 0 0 0 0000001111t ( j MovD switch ( xlat1[( mem[c]-33+c )%94] ) { < Out putchar(A) case ’j’: d = mem[d]; break; 0000000000t 1 41 1 0000002021t = p Opr case ’i’: c = mem[d]; break; / In A := getchar() 1111112211t 2 42 2 0000002020t < p Opr case ’*’: a = mem[d] = v Hlt halt mem[d]/3 + mem[d]%3*19683; break; 0000002200t 3 43 3 0000010120t ‘ < Out case ’p’: a = mem[d] = crz( a, mem[d] ); break; o Nop no operation case ’<’: putc( a, stdout ); break; other printable Nop no operation case ’/’: x = getc( stdin ); a = x; break; 41 0000002211t L / In case ’v’: return; non-printable — infinite loop } 42 0000011110t x o Nop mem[c] = xlat2[mem[c] - 33]; 43 0000002002t 8 < Out if ( c == 59048 ) c = 0; else c++; • Codes are rewritten after step execution if ( d == 59048 ) d = 0; else d++; } • C and D registers are incremented after step execution 13 14 15 Repeated access data on memory(2/2) Trit-wise operations • Example: implementation of pseudo-code (1/2) Repeated access data on memory Fact: Any trit-wise operations are function- Pseudo code label data/opr ally composable from 0, 1, 2 by crz • No load nor save operation. We have only C Rot label operation Nop Proof: By exhaustive search - Rot: A,[D] := rotr([D]) Rot CON2 Opr X Y Opr X Example: inc( , ) increment - Opr: A,[D] := crz(A,[D]) MovD Y\X 0 1 2 Rot CON2 Rot Problem: Hard to access data repeatedly Opr X 0 1 2 0 • Nop 1 1 2 0 Opr • A solution: preparing codes so that D register CON2: 2222222222t 2 0 1 2 loops in data area (D register is incremented MovD Y: inc(X, Y) = crz(crz(crz(crz(2, X), 0), Y),crz(2, X)) in similar to C register) X: D CON2: 2222222222t • Note: It does not guarantee the existence of A := X (nondestructive Y: load of X) X: codes, since Opr is destructive operation CON2 - 1 16 17 18 Generating special constants(3/3) Generating special constants(1/3) Generating special constants(2/3) • P20: 2222222220t • CON1: 1111111111t • CON2: 2222222222t Precondition: TMP has a pattern .......2.. Precondition: variable CON1 has no 1s Precondition: TMP has a pattern ...20... (each . is not 2) and P20 = CON2 (... parts contain no 2s) Rot CON1 Rot TMP Opr CON1 Rot CON1 Rot TMP Opr CON2 Opr P20 • CON0: 0000000000t Opr CON2 Rot CON1 Now variable CON2 has been set 1111111111t • Possible initial code for data area Opr CON0 Rot TMP adr label opr data Opr CON0 Opr CON2 85 TMP In 0000011200t Opr CON0 repeat 10 times in total 88 CON1 Nop 0000002202t 91 Hlt 84 19 20 21 Nondestructive data copy Successor function: X := X+1 • Y := X using Z for temporal area Precondition: Zero clear Rot CON1 • Opr Z Y = 2222222220t and • X := 0 Opr Z Z contains no 2s Rot CON1 Opr Y Rot CON1 Opr Y Opr Y Opr X Opr Y Opr Z Opr X Rot CON2 Opr X Rot CON2 Rot CON2 Opr Z Opr Y Opr X Opr X Opr X Opr Z Rot X Rot CON2 Opr Z Opr Y Opr X repeat 10 times in total Opr Z Opr Y 22 23 24 Generating arbitral data(1/2) Generating arbitral data(2/2) • Trit-wise operation f(X, Y) = crz(2,crz(X, Y)) This talk Y\X 0 1 2 0 2 0 0 • Generation of arbitral data is possible from 1 2 0 1 X = 1111111111t by previous code and “Rot X” • Explanation of Malbolge 2 1 1 2 • Loading P20 • Overview of Programming technique • Precondition: right-most trit of X be 1 Rot CON0 - Bootstrapping Opr X - Low level assembly language Rot CON2 Opr P2X Opr X • Loading P21 - High level assembly language makes right-most trit of X to Rot CON1 0 if A = 2222222221t (=P21) Opr P2X 1 if A = 2222222222t (=CON2) 2 if A = 2222222220t (=P20) where P2X is 2222222220t or 2222222221 without changing the other trits 25 26 27 Low level assembly language Character-replacement analysis(1/3) • Designed for writing loop programs. • Replacement by xlat2[] • Syntax • Example of low level assembly code for a pseudo code const char xlat2[] = - Labeled sequence of U_JMP, U_ROT, R_ROT, "5z]&gqtyfr$(we4{WP)H-Zn,[%\\3dL+Q;>U!pJS72FhOA1C" L1: R_ROT "B6v^=I_0/8|jsb9m<.TVac‘uY*MK’X~xDl}REokN:#?G\"i@"; U_MOV_PC, R_MOV_PC and so on, and Flags for (;;) { U_ROT X ... OMITTED ... • Semantics: ternary virtual machine Rot X ENTRY: U_ROT X mem[c] = xlat2[mem[c] - 33]; } - Registers: A and PC Opr X X: 30537 FLAG1 • Periodic table - Need to execute R_hoge after executing op- X: 30527 L1 erator U_hoge R_OPR ID period sequence Pseudo code END #1 2 F J - Variables must be placed below and near #2 4 *r}i the operation. All operation between the Low level assembly code #3 5 )f‘<3 operation and the variable are skipped un- #4 6 %guox: executed. #5 9 2PB>LOCUI2 - Flags act as flip-flopped U_MOV_PC #6 68 !5-wN1W0{GS~9[ · · · 28 29 30 Character-replacement analysis(2/3) • Operators for sequence with period two adr op. F op. J adr op. F op. J Character-replacement analysis(3/3) 7 – Hlt 59 – Rot Implementation of L Ass(1/3) 11 Hlt – 60 – MovD • Jmp is not replaced by execution, instead the 24 – Jmp 63 Rot – operater at one earlier location of the new • Basic idea 25 – Out 64 MovD – 28 Jmp – 82 – Opr location is replaced - Construct operation units each of which 29 Out – 86 Opr – • Character corresponding to SNop exists for ev- consists of an operation with cycling pe- 43 – In 88 – Nop ery location riod two 47 In – 92 Nop – - Stable Nop (SNop): no operation appears in - Use D register as program counter PC - Address are in mod 94 the sequence except Nop or Nop - Symbol – represents non-operator that works as Nop -e.g.
Recommended publications
  • Radare2 Book
    Table of Contents introduction 1.1 Introduction 1.2 History 1.2.1 Overview 1.2.2 Getting radare2 1.2.3 Compilation and Portability 1.2.4 Compilation on Windows 1.2.5 Command-line Flags 1.2.6 Basic Usage 1.2.7 Command Format 1.2.8 Expressions 1.2.9 Rax2 1.2.10 Basic Debugger Session 1.2.11 Contributing to radare2 1.2.12 Configuration 1.3 Colors 1.3.1 Common Configuration Variables 1.3.2 Basic Commands 1.4 Seeking 1.4.1 Block Size 1.4.2 Sections 1.4.3 Mapping Files 1.4.4 Print Modes 1.4.5 Flags 1.4.6 Write 1.4.7 Zoom 1.4.8 Yank/Paste 1.4.9 Comparing Bytes 1.4.10 Visual mode 1.5 Visual Disassembly 1.5.1 2 Searching bytes 1.6 Basic Searches 1.6.1 Configurating the Search 1.6.2 Pattern Search 1.6.3 Automation 1.6.4 Backward Search 1.6.5 Search in Assembly 1.6.6 Searching for AES Keys 1.6.7 Disassembling 1.7 Adding Metadata 1.7.1 ESIL 1.7.2 Scripting 1.8 Loops 1.8.1 Macros 1.8.2 R2pipe 1.8.3 Rabin2 1.9 File Identification 1.9.1 Entrypoint 1.9.2 Imports 1.9.3 Symbols (exports) 1.9.4 Libraries 1.9.5 Strings 1.9.6 Program Sections 1.9.7 Radiff2 1.10 Binary Diffing 1.10.1 Rasm2 1.11 Assemble 1.11.1 Disassemble 1.11.2 Ragg2 1.12 Analysis 1.13 Code Analysis 1.13.1 Rahash2 1.14 Rahash Tool 1.14.1 Debugger 1.15 3 Getting Started 1.15.1 Registers 1.15.2 Remote Access Capabilities 1.16 Remoting Capabilities 1.16.1 Plugins 1.17 Plugins 1.17.1 Crackmes 1.18 IOLI 1.18.1 IOLI 0x00 1.18.1.1 IOLI 0x01 1.18.1.2 Avatao 1.18.2 R3v3rs3 4 1.18.2.1 .intro 1.18.2.1.1 .radare2 1.18.2.1.2 .first_steps 1.18.2.1.3 .main 1.18.2.1.4 .vmloop 1.18.2.1.5 .instructionset 1.18.2.1.6
    [Show full text]
  • Software Studies: a Lexicon, Edited by Matthew Fuller, 2008
    fuller_jkt.qxd 4/11/08 7:13 AM Page 1 ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• S •••••••••••••••••••••••••••••••••••••new media/cultural studies ••••software studies •••••••••••••••••••••••••••••••••• ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• O ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• F software studies\ a lexicon ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• T edited by matthew fuller Matthew Fuller is David Gee Reader in ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• This collection of short expository, critical, Digital Media at the Centre for Cultural ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• W and speculative texts offers a field guide Studies, Goldsmiths College, University of to the cultural, political, social, and aes- London. He is the author of Media ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• thetic impact of software. Computing and Ecologies: Materialist Energies in Art and A digital media are essential to the way we Technoculture (MIT Press, 2005) and ••••••••••••••••••••••••••••••••••••• •••• •••••••••••••••••••••••••••••••••• work and live, and much has been said Behind the Blip: Essays on the Culture of •••••••••••••••••••••••••••••••••••••
    [Show full text]
  • Radare2 Book
    Radare2 Book Table of Contents 1. introduction 2. Introduction i. History ii. Overview iii. Getting radare2 iv. Compilation and Portability v. Compilation on Windows vi. Command-line Flags vii. Basic Usage viii. Command Format ix. Expressions x. Rax2 xi. Basic Debugger Session xii. Contributing to radare2 3. Configuration i. Colors ii. Common Configuration Variables 4. Basic Commands i. Seeking ii. Block Size iii. Sections iv. Mapping Files v. Print Modes vi. Flags vii. Write viii. Zoom ix. Yank/Paste x. Comparing Bytes 5. Visual mode i. Visual Cursor ii. Visual Inserts iii. Visual XREFS iv. Visual Configuration Editor 6. Searching bytes i. Basic Searches ii. Configurating the Search iii. Pattern Search iv. Automatization v. Backward Search vi. Search in Assembly vii. Searching for AES Keys 7. Disassembling 2 Radare2 Book i. Adding Metadata ii. ESIL 8. Rabin2 i. File Identification ii. Entrypoint iii. Imports iv. Symbols (exports) v. Libraries vi. Strings vii. Program Sections 9. Radiff2 i. Binary Diffing 10. Rasm2 i. Assemble ii. Disassemble 11. Analysis i. Code Analysis 12. Rahash2 i. Rahash Tool 13. Debugger i. Registers 14. Remote Access Capabilities i. Remoting Capabilities 15. Plugins i. Plugins 16. Crackmes i. IOLI i. IOLI 0x00 ii. IOLI 0x01 17. Reference Card 3 Radare2 Book R2 "Book" Welcome to the Radare2 Book Webpage: https://www.gitbook.com/book/radare/radare2book/details Online: http://radare.gitbooks.io/radare2book/content/ PDF: https://www.gitbook.com/download/pdf/book/radare/radare2book Epub: https://www.gitbook.com/download/epub/book/radare/radare2book Mobi: https://www.gitbook.com/download/mobi/book/radare/radare2book introduction 4 Radare2 Book Introduction This book aims to cover most usage aspects of radare2.
    [Show full text]
  • Weird Languages (1) for Software Studies Michael Mateas, [email protected]
    Weird Languages (1) For Software Studies Michael Mateas, [email protected] Programming languages are often seen as given, an immutable logic within which everyday coding practice takes place. Viewed in this light, a programming language becomes a tool to be mastered, a means to an end. The practice of writing obfuscated code (see Montfort, this volume) exploits the syntactic and semantic play of a language to create code that, often humorously, comments on the constructs provided by a specific language. But the constructs and logics of languages are themselves contingent, abstractions pulled into being out of the space of computational possibility, and enforced and maintained by nothing more than programs, specifically the interpreters and compilers that implement the language. In the field of weird languages, also known as esoteric languages (2), programmers explore and exploit the play that is possible in programming language design. Weird programming languages are not designed for any real-world application or normal educational use; rather, they are intended to test the boundaries of programming language design itself. A quality they share with obfuscated code is that they often ironically comment on features of existing, traditional languages. There are literally dozens, if not hundreds of weird languages, commenting on many different aspects of language design, programming history and programming culture. A representative selection is considered here, with an eye towards understanding what these languages have to tell us about programming aesthetics. Languages are considered in terms of four dimensions of analysis: 1) parody, spoof, or explicit commentary on language features, 2) a tendency to reduce the number of operations and strive toward computational minimalism, 3) the use of structured play to explicitly encourage and support double-coding, and 4) the goal of creating a puzzle, and of making programming difficult.
    [Show full text]
  • Malbolge from Wikipedia, the Free Encyclopedia
    Malbolge From Wikipedia, the free encyclopedia Malbolge is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge. Malbolge Paradigm Esoteric, Imperative, Malbolge was specifically designed to be almost impossible to use, via a counter-intuitive 'crazy operation', base-three Scalar, Value-level arithmetic, and self-altering code.[1] It builds on the difficulty of earlier, challenging esoteric languages (such as Brainfuck and Befunge), but takes this aspect to the extreme, playing on the entangled histories of computer science and encryption. Despite Designed by Ben Olmstead this design, it is possible (though very difficult) to write useful Malbolge programs. First appeared 1998 Typing Untyped discipline Contents Filename .mal, .mb extensions Influenced by 1 Programming in Malbolge 2 Example Program Brainfuck, INTERCAL (Tri-INTERCAL), Befunge 2.1 Hello, World! Influenced 2.2 CAT Program Dis 3 Design 3.1 Registers 3.2 Pointer notation 3.3 Memory 3.4 Instructions 3.5 Crazy operation 3.6 Encryption 4 Variants 5 Popular culture 6 See also 7 References 8 External links Programming in Malbolge Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. Indeed, the author himself has never written a single Malbolge program.[1] 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.[2] Later, Lou Scheffer posted a cryptanalysis of Malbolge and provided a program to copy its input to its output.[3] He also saved the original interpreter and specification after the original site stopped functioning, and offered a general strategy of writing programs in Malbolge as well as some thoughts on its Turing-completeness.[4] Olmstead believed Malbolge to be a linear bounded automaton.
    [Show full text]
  • Esoteric Programming Languages
    Esoteric Programming Languages An introduction to Brainfuck, INTERCAL, Befunge, Malbolge, and Shakespeare Sebastian Morr Braunschweig University of Technology [email protected] ABSTRACT requires its programs to look like Shakespearean plays, mak- There is a class of programming languages that are not actu- ing it a themed language. It is not obvious at all that the ally designed to be used for programming. These so-called resulting texts are, in fact, meaningful programs. For each “esoteric” programming languages have other purposes: To language, we are going describe its origins, history, and to- entertain, to be beautiful, or to make a point. This paper day’s significance. We will explain how the language works, describes and contrasts five influential, stereotypical, and give a meaningful example and mention some popular imple- widely different esoteric programming languages: The mini- mentations and variants. All five languages are imperative languages. While there mal Brainfuck, the weird Intercal, the multi-dimensional Befunge, the hard Malbolge, and the poetic Shakespeare. are esoteric languages which follow declarative programming paradigms, most of them are quite new and much less popu- lar. It is also interesting to note that esoteric programming 1. INTRODUCTION languages hardly ever seem to get out of fashion, because While programming languages are usually designed to be of their often unique, weird features. Whereas “real” multi- used productively and to be helpful in real-world applications, purpose languages are sometimes replaced by more modern esoteric programming languages have other goals: They can ones that add new features or make programming easier represent proof-of-concepts, demonstrating how minimal a in some way, esoteric languages are not under this kind of language syntax can get, while still maintaining universality.
    [Show full text]
  • Weird Languages1 Michael Mateas Programming Languages Are Often Seen As a Given an Immutable Logic Within Which Everyday Coding Practice Takes Place
    Weird Languages1 Michael Mateas Programming languages are often seen as a given an immutable logic within which everyday coding practice takes place. Viewed in this light, a program- ming language becomes a tool to be mastered, a means to an end. The practice of writing obfuscated code (see Montfort in this volume) exploits the syntactic and semantic play of a language to create code that, often humorously, com- ments on the constructs provided by a specifi c language. But the constructs and logics of languages are themselves contingent abstractions pulled into be- ing out of the space of computational possibility, and enforced and maintained by nothing more than programs, specifi cally the interpreters and compilers that implement the languages. In the fi eld of “weird” or “esoteric” languages,2 programmers explore and exploit the play that is possible in programming language design. Weird pro- gramming languages are not designed for any real-world application or normal educational use; rather, they are intended to test the boundaries of program- ming language design itself. A quality they share with obfuscated code is that they often ironically comment on features of existing, traditional languages. There are literally dozens, if not hundreds of weird languages, which com- ment on many different aspects of language design, programming history, and programming culture. A representative selection is considered here, with an eye toward understanding what these languages have to tell us about program- ming aesthetics. Languages are considered in terms of four dimensions of analysis: (1) parody, spoof, or explicit commentary on language features, (2) a tendency to reduce the number of operations and strive toward computational minimalism, (3) the use of structured play to explicitly encourage and support double- coding, and (4) the goal of creating a puzzle, and of making programming diffi cult.
    [Show full text]
  • A Trip Into Estoteric Languages, Turing Machines, Cellular Automata and the Nature of Computation
    From Brainfuck to Domino Computers A trip into Estoteric Languages, Turing Machines, Cellular Automata and the Nature of Computation Nicolas Seriot October 27th, 2017 1. Esoteric Languages 2. Turing Machines 3. 2D Cellular Automata 4. 1D Cellular Automata 5. Computers Everywhere Brainfuck +++>++>>>+[>>,[>+++++<[[->]<<]<[>]>]>-[<<+++++>>-[<<---->>-[->]<]] <[<-<[<]+<+[>]<<+>->>>]<]<[<]>[-[>++++++<-]>[<+>-]+<<<+++>+> [- [<<+>->- [<<[-]>>- [<<++>+>- [<<-->->>+++<- [<<+>+>>--<- [<<->->- [<<++++>+>>+<- [>-<- [<<->->- [<<->>- [<<+++>>>-<- [<<---->>>++<- [<<++>>>+<- [>[-]<- [<<->>>+++<- [<<->>>--<- [<<++++>+>>+<- [<<[-]>->>++<- [<<+++++>+>>--<- [<->>++< [<<->>- ]]]]]]]]]]]]]]]]]]]]]]<[->>[<<+>>-]<<<[>>>+<<<-]<[>>>+<<<-]]>>] >[-[---[-<]]>]>[+++[<+++++>--]>]+<++[[>+++++<-]<]>>[-.>] Brainfuck Syntax > Move the pointer to the right < Move the pointer to the left + Increment the memory cell under the pointer - Decrement the memory cell under the pointer . Output the character signified by the cell at the pointer , Input a character and store it in the cell at the pointer [ Jump past the matching ] if the cell under the pointer is 0 ] Jump back to the matching [ if the cell under the pointer is nonzero BF Addition [->+<] # [0, 0, 0, ...] ++> # [2, 0, 0, ...] +++< # [2, 3, 0, ...] [->+<] # [0, 5, 0, ...] ------------------------------------------------------------------------------------ STEP: 6 PROG: ++++++[>++++++<-]>. ^ 6 DATA: 06 00 00 00 00 00 00 00 00 00 00 ^^ 0 ------------------------------------------------------------------------------------
    [Show full text]
  • PHP Or Other Scripting Languages - and Scale Them to Compete with Established "Store Bought" Enterprise Web Technologies
    Building Scalable Web Sites By Cal Henderson ............................................... Publisher: O'Reilly Pub Date: May 2006 Print ISBN-10: 0-596-10235-6 Print ISBN-13: 978-0-59-610235-7 Pages: 348 Table of Contents | Index Slow websites infuriate users. Lots of people can visit your web site or use your web application - but you have to be prepared for those visitors, or they won't come back. Your sites need to be built to withstand the problems success creates. Building Scalable Web Sites looks at a variety of techniques for creating sites that can keep users cheerful even when there are thousands or millions of them. Flickr.com developer, Cal Henderson, explains how to build sites so that large numbers of visitors can enjoy them. Henderson examines techniques that go beyond sheer speed, exploring how to coordinate developers, support international users, and integrate with other services from email to SOAP to RSS to the APIs exposed by many Ajax-based web applications. This book uncovers the secrets that you need to know for back-end scaling, architecture and failover so your websites can handle countless requests. You'll learn how to take the "poor man's web technologies" - Linux, Apache, MySQL and PHP or other scripting languages - and scale them to compete with established "store bought" enterprise web technologies. Toward the end of the book, you'll discover techniques for keeping web applications running with event monitoring and long- term statistical tracking for capacity planning. If you're about to build your first dynamic website, then Building Scalable Web Sites isn't for you.
    [Show full text]
  • A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics
    A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics Michael Mateas Nick Montfort Georgia Institute of Technology University of Pennsylvania College of Computing Department of Computer and Information Science School of Literature, Communication and Culture [email protected] [email protected] ABSTRACT The standard idea of code aesthetics, when such an idea manifests 2. READING CODE itself at all, allows for programmers to have elegance and clarity Version 2.1 of the online lexical reference system WordNet gives as their standards. This paper explores programming practices in 11 senses for “read,” including “look at, interpret, and say out which other values are at work, showing that the aesthetics of loud something that is written or printed” and “interpret the code must be enlarged to accommodate them. The two practices significance of, as of palms, tea leaves, intestines, the sky, etc.; considered are obfuscated programming and the creation of also of human behavior.” [14] This discussion is about a fairly “weird languages” for coding. Connections between these two literal application of the most common sense, “interpret practices, and between these and other mechanical and literary something that is written or printed,” although of course code that aesthetic traditions, are discussed. appears on a screen (rather than being written or printed out) can also be read. 1. INTRODUCTION The understanding of behavior is certainly involved in reading Programmers write code in order to cause the computer to code in the primary sense of “read,” however. It is essential to any function in desired ways. But modern computer programs are ordinary human reading of a computer program to develop an written in a form, usually textual, that is also meant to be understanding of how the computer will behave, and what it will manipulable and understandable by human beings.
    [Show full text]
  • Serial Programming
    Serial Programming Wikibooks.org March 18, 2013 On the 28th of April 2012 the contents of the English as well as German Wikibooks and Wikipedia projects were licensed under Creative Commons Attribution-ShareAlike 3.0 Unported license. An URI to this license is given in the list of figures on page 141. If this document is a derived work from the contents of one of these projects and the content was still licensed by the project under this license at the time of derivation this document has to be licensed under the same, a similar or a compatible license, as stated in section 4b of the license. The list of contributors is included in chapter Contributors on page 139. The licenses GPL, LGPL and GFDL are included in chapter Licenses on page 145, since this book and/or parts of it may or may not be licensed under one or more of these licenses, and thus require inclusion of these licenses. The licenses of the figures are given in the list of figures on page 141. This PDF was generated by the LATEX typesetting software. The LATEX source code is included as an attachment (source.7z.txt) in this PDF file. To extract the source from the PDF file, we recommend the use of http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ utility or clicking the paper clip attachment symbol on the lower left of your PDF Viewer, selecting Save Attachment. After extracting it from the PDF file you have to rename it to source.7z. To uncompress the resulting archive we recommend the use of http://www.7-zip.org/.
    [Show full text]
  • Giant List of Programming Languages
    Giant List of Programming Languages This list is almost like a history lesson, some of the languages below are over half a century old. It is by no means exhaustive, but there are just so many of them. A large chunk of these languages are no longer active or supported. We added links to the official site where possible, otherwise linked to a knowledgable source or manual. If there is a better link for any of them, please let us know or check out this larger list. 1. 51-FORTH https://codelani.com/languages/51forth 2. 1C:Enterprise Script https://1c-dn.com/1c_enterprise/1c_enterprise_script 3. 4DOS https://www.4dos.info 4. A+ http://www.aplusdev.org 5. A++ https://www.aplusplus.net 6. A? (Axiom) http://axiom-developer.org 7. A-0 System No live site 8. ABCL/c+ No live site 9. ABAP https://www.sap.com/community/topics/abap 10. ABC https://homepages.cwi.nl/~steven/abc 11. ABC ALGOL No live site 12. ABSET http://hopl.info/showlanguage.prx?exp=356 13. Absys No live site 14. ACC No live site 15. Accent No live site 16. Accent R http://nissoftware.net/accentr_home 17. ACL2 http://www.cs.utexas.edu/users/moore/acl2 18. ActionScript https://www.adobe.com/devnet/actionscript 19. ActiveVFP https://archive.codeplex.com/?p=activevfp 20. Actor No live site 21. Ada https://www.adaic.org 22. Adenine http://www.ifcx.org/attach/Adenine 23. ADMB http://www.admb-project.org 24. Adobe ColdFusion https://www.adobe.com/products/coldfusion-family 25.
    [Show full text]