Talk:Remarks: One-Liners
From Maze
Jump to:
navigation
,
search
This wiki is a read-only archive; the page source is shown below.
Ideas for broadening the section [Casey] - Fork Bomb (Bash seems simpler than Perl?) - Perl culture . Useful snippets for doing work (search/replace etc.) . Code poetry competitions (the aesthetics of concision and obfuscation) - Rhizome/Processing competition (TinySketch in 2009) // For bomb in Bash: :(){ :|:& };: [Note: do not run this code] http://www.cyberciti.biz/faq/understanding-bash-fork-bomb/ Rhizome TinySketch http://www.openprocessing.org/collections/rhizome.php http://archive.rhizome.org:8080/tinysketch/ This competition was constrained by 140 characters (via SMS, but mostly influenced by Twitter in this case) The winner: float h=256,t,T,x,y;void draw(){t+=x=.3-mouseY/h/5;T+=mouseX/h*x-x;noStroke();for(y=0;++y<h;){fill(h-y,85);rect(0,h+y,h*2,1);x=h/y+t;fill(x%20*9,85);x=T+noise(x/99)*60-30;rect(h-x*y-2*y,h+y,y*4,1);}} One-liners are possible in programming languages that are flexible with white space because multiple lines of code can be put into a single line. In contrast, a language like Python which enforces line breaks to format the code has less potential. // // // // // // // // who wrote this and what does it mean?! These one-liners make good use of the print and poke commands. We know that PRINT was inherited from the earliest Dartmouth BASIC implementation. Did Bill Gates invent the POKE command? *Everything Random 10 poke 1024+rnd(0)*1000,78 20 poke 53248+24,timeand255 30 poke 53248+17,(time/10)and255 40 poke 53248+22,(time/9)and255 50 poke 54272 + rnd(0)*25,rnd(0)*256 60 poke 1024 + rnd(0)*1000,rnd(0)*256 70 goto 10 these are too dangerous and bizarre to be distributed in a book like this. *Crazy VIC-II 10 poke 53248+rnd(0)*46,rnd(0)*256: goto 10 *Nutty VIC-II 10 poke 53248+24,rnd(0)*256: goto 10 This is too hardcore: Commodore 64 users have experienced so many different system crashes that they can be aesthetically categorized. For example, the following one-liner: *Snowcrash - do not use on real Commodore 64 10 poke 53248+24,timeand255: goto 10 *Crashes I Have Known and Loved. Also, this one-liner imitates a particular set of crashes, those involving complex writes to the video hardware: 10 poke 53248+17,(time/10)and255: goto 10
Views
Page
Discussion
View source
History
Personal tools
Log in / create account
Navigation
Main page
Recent changes
Help
Search
Toolbox
What links here
Special pages
Permanent link