People write books about different things. We have books about big concepts things universe and small things like bacteria. We have books with instructional information like pilot manuals and abstract information like novels. There are books about the lives of other people, detailed records of historical events that were created by people, descriptions of scientific observations made by people, and discussions on our aesthetic evolution. And then there are books about very strange things like one line of code.
The book 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 is a book written about one line of code. Under the examination of this simple program, the book touches on a variety of topics ranging from computer-generated art, the history of mazes and labyrinths, forms of randomness, the psychology of repetition, the history of hardware among some. The book is free to download, but I highly recommend getting your own physical copy.
Victor Vaserely is widely accepted as a “grandfather” and leader of the Op art movement. His work is so systematized that he invented a notation system to enable the team of assistants to assemble his work using instructions and modular, prefabricated color pieces. (Looks like even before Sol Le Witt)
As I was reading 10PRINT I went down the rabbit hole of thinking of other famous one-liners in programing. *One liners* in general have a very expert quality in it - it is almost bragging rights for a developer to make computer do something with as little lines as possible. But a one-liner is an entirely different game. Here are some interesting one-liner programs.
``` # basic : generating graphical demos
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
```
```
# c L glob pattern matching a winning entry in the "Best one-liner" category of the IOCCC)
main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return*t-42?*s?63==*t|*s==*t&&m(s+1,t+1):!*t:m(s,t+1)||*s&&m(s+1,t);}
```
```
#perl This regular expression matches strings whose length is prime.
/^.?$|^(..+?)\1+$/
```
``` #bash Shows 10 largest files
$*lsof / | awk ‘{ if($7 > 1048576) print $7/1048576 “MB” “ “ $9 “ “ $1 }’ | sort -n -u | tail
```
“Generative art is a form of art that is either completely or partially created using an autonomous system. This system can be represented by any kind of algorithm: mathematical, mechanical, or biological.”
Brief history:
*AN 18TH CENTURY GAME* One of the earliest examples of generative 18th century musical game Musikalisches Würfelspiel, where a specific melodic line was assigned to a number on a dice after it was rolled.
* *THE KALEIDOSCOPE* -byproduct of light polarization study, visually shows an algorithm of hypothetical polarization patterns.
*THE GRAPHIC EDITOR* - as computer technologies started to be widely adopted, the new graphic display in combination with various algorithms can generate uniquely aestethical patterns.
As our daily activities are moving move online, more and more people join trade schools(known as coding bootcamps) to learn how to write code and build infrastructure for our online world. Contemporary modern webpages are written in Javascript and the backend data manipulations done by scientists are written in Python. Github publishes a popularity index based on the volume of code committed: PYPL PopularitY of Programming Language index . But there is a very tiny universe that has the minimal number of users: *Esoteric Programming Languages*(ess-oh-terr-ick), or *esolang*, is a computer programming language designed to experiment with weird ideas, to be hard to program in, or as a joke, rather than for practical use. The purposes vary from minimalism to exploration of new concepts, to just pure humor. For example Shakesphere computer languages: The Shakespeare Programming Language was designed to make a language with beautiful source code that resembled Shakespeare plays. Here are some more:
* The earliest known resoling is INTERCAL containing commands like DO, PLEASE, or PLEASE DO. (Proposed extensions allow other statement identifiers such as MAYBE.) The politesse of a program’s statement identifiers is checked to make sure it stays within certain limits.
* The most popular: *Brainfuck* has inspired the creation of a host of other languages. Due to the fact that the last half of its name is often considered one of the most offensive words in the English language, it is sometimes referred to as brainf***, brainf*ck, brainfsck, b****fuck (as a joke)
*Piet* is a programming language in which programs look like abstract paintings. The language is named after Piet Mondrian, who pioneered the field of geometric abstract art. A Piet program is an image file, usually, a gif, which uses a set of 20 colors and the transitions between blocks of those colors to define a series of instructions and program flow. For example this program prints the first 100 Fibonacci numbers