geek night 16.0 - evolution of programming languages
TRANSCRIPT
Programming, LanguagesAn inComplete, inAccurate and Poignant reCAP!
(with apologies and thanks to James Iry)
(all pictures sourced from Wikipedia)
1801 : Jacquard’s headBuilding on some preceding work, Joseph Marie Jacquard invents a method to use the
same loom to weave different patterns on cloth, by simply feeding different “chains of
punched cards” to it.
Each position on the card corresponds to a “raise” or a “lower” control for a weft
thread, depending on whether the position was punched or not.
IBM and Unix nerds of the time are not impressed, because the size of Jacquard’s
punched cards is not one of 80x10, 80x24 or 80x25!
1837 : Babbage’s design for Analytical EngineOriginal Difference Engine intended to compute series of values of polynomial
functions automatically. But, it could not be completed.
Analytical Engine is designed as the first general-purpose computer with arithmetic
logic unit, branching, looping and memory. The design even has a printer and a curve
plotter for output! [This could not be completed by Babbage, as well!]
While the design is grand, Go programmers of those days find its lack of select
statement too limiting!
1842 : Ada Lovelace’s first algorithmAda translates Babbage’s lecture transcript from French to into English.
She then writes the world’s first algorithm: a sequential logic for the Analytical Engine
to compute Bernoulli numbers.
Unfortunately, the Analytical Engine is not yet available to actually run it.
Nonetheless, Martin Richards and Brian Kernighan are displeased to find that Ada’s
first algorithm is not written to print “Hello, World!”
1931 : Gödel’s and his IncompletenessA maverick 25-year old Kurt Gödel publishes Über formal unentscheidbare Sätze der
"Principia Mathematica" und verwandter Systeme (On Formally Undecidable
Propositions of "Principia Mathematica" and Related Systems).
He proves that no computable axiomatic system could be both consistent and
complete. Moreover, the consistency can not be proved within the system.
Leading philosophers revel in the theorem’s ability to interpret life!
Conspiracy theorists, however, conjecture that his undecidability does not refer to
Russell’s work, but to the upcoming tabs vs. spaces debate!
1936 : Church’s lambda calculusAlonzo Church comes up with a formal system in mathematical logic named “lambda
calculus” that invents all future programming languages!
It describes how any computation can be represented and performed using variable
binding and substitution. α-conversion, β-reduction, η-conversion and several non-
parseable symbolisms are distilled as the building blocks of all languages for
programming, humans, great apes and dolphins!
Lambda calculus is, however, condemned to obscurity because it does not follow the
syntax and the stylistic conventions of the yet-to-be-created Algol.
1936 : Turing and his CompletenessNot to be left behind, Alan Turing invents paper tape and brings back a machine from
future that reads and prints one prehistoric symbol per cell. The resulting universal
computing machine also invents all programming languages that will ever be.
Desirous of avoiding mutual patent litigation, Church and Turing then get together,
and publish the Church-Turing thesis. This establishes a duopoly in the field of
programming languages.
However, before an anti-trust case could be brought against the pair, Turing consumes
cyanide and goes into cryogenic freezing. [The ACM resurrects his spirit in 1966.]
1946-8 : ENIAC and SSEMThe Electronic Numerical Integrator and Computer (ENIAC) is announced to the
public as the world’s first general-purpose, programmable, digital computer. Lacking
storage, it requires the programmers to learn the machine code by heart, and shout the
sequence into it -- for every run.
Widespread protests and strikes by the budding Programmers’ Union result in the
development of the Manchester Small-Scale Experimental Machine (SSEM).
Nicknamed “Baby”, it can run stored programs.
Mainstream psychoanalysts expect that its nickname will play a role in soothing the
post-war subconscious anxieties of the members of the Union.
1952 : UNIVAC IEckert and Mauchly create the UNIVAC I mainframe computer the previous year.
They show off its computing capability by predicting a 100-1 odds for Eisenhower to
win the US Presidential election. Mainstream media roots for Adlai Stevenson.
CBS’ news boss - unconvinced - decides to enact stage theatrics, and pretend that the
computer is not responding. Later, CBS says that the computer predicted 8-7 for
Eisenhower. Actual results are within 1% of UNIVAC I’s original prediction!
Luddites immediately denounce the creation of UNIVAC I as a big mistake, since it is
UNIVAC I that most likely evolved into Multivac, Planetary AC, Galactic AC, and
finally into Skynet.
1954 : The George systemLaning and Zierler decide that any computer that is not capable of performing algebra
computations is a dud. So, they create “George”, a compiler for algebra that provides
symbolic variables and automatic memory allocation.
To prove how good George was, Laning and Zierler decide to solve an aeronautics
problem that requires 7 differential equations. They write it in 2.5 hours, and it runs
correctly on the first attempt!
Tier 1 contractors lobby against George until it is removed, since programs that run
successfully on the first attempt could lead to gangs of unemployed programmers.
1957 : FORTRAN SUBROUTINE BACKUS(I,B,M)
INTEGER I,M
DO 10 J=I-1,1,-1
10 B=B+(I*J)/M
RETURN
Engineering, weather, fluid dynamics, physics, chemistry, biology, …
R programmers of the time are overjoyed, because in FORTRAN R is real.
1958 : LISP(defun LISP (lambda-calculus ipl)
(progn (mc-carthy designs)
(let ((meta-circular (lambda (eval) (apply)))
(prim (car (cdr (atom list cons)))))
(steve-russell implements-eval))))
“This does not mean that I fail to recognise that Lisp is still #1 for key algorithmic
techniques such as recursion and condescension.” - Verity Stob
1958 : ALGOLNot satisfied with FORTRAN, Backus drums up international support for a new
language in both the US and across the Atlantic. The result is International Algebraic
Language - the grandfather of a large branch of programming languages.
However, the research community involved in the international discussions of this
international language thinks so much in closed rooms, that it takes no input and
generates no output. The international language, thus, becomes academic!
In addition to the language itself, gives birth to Backus-Naur form.
Suspicious onlookers link its continuing influence - on the syntax and the structure of
modern programming languages - to mysterious activities of Illuminati.
1960 : COBOLGovernment and industry pour their minds into a small hulk, to discuss a new
programming language.
The ingredients precipitate Cantankerous, Onerous, Boilerplate-Oriented Language
that cannot be parsed unambiguously, because it is too much like English.
By 1970, COBOL becomes the most used programming language in the world! In
1997, Gartner estimates that 80% of world’s businesses use over 200 billion lines of
COBOL code everyday!
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a
criminal offense." - Edsger Dijkstra
GenerationsHARDWARE SOFTWARE
Mid-1940s : Thermionic vacuum tubes -
IBM 650
Machine languages
1956 : Transistors and the beginning of
miniaturisation - IBM 7090, Burroughs
B5000
Assembly languages
1964 : Integrated Circuits and unheard-of
logic densities - IBM 360/91
High-Level languages : FORTRAN, LISP,
ALGOL, COBOL
1964 : BASIC10 Despite being experts in type theory and statistics, Kemeny and Kurtz decide that
non-scientists needed a programming language.
20 For this language for non-scientists, they choose scientist languages FORTRAN II
and ALGOL 60 as their inspirations.
30 The result is Boisterous, Animated Symbolic Instruction Code.
40 Survives through modern times (e.g. Microsoft Visual Basic.NET).
50 GOTO 10
60 RUN
1964 : APLInspired by Backus-Naur’s specification, Iverson imagines a multidimensional array at
the foundation of an unwieldy skyscraper.
In the interest of safety, A Programming Language is kept out of the hands of mere
mortals, by describing computation using a large range of symbols from mathematics
and modern art.
Nonetheless, it heavily influences modeling, spreadsheets, functional programming
and math software packages.
Psychologists attribute high enrolments of programmers into sanatoriums to early
exposure to APL.
1964 : APLPick 6 random numbers in ascending order
x[⍋x←6?40]
All prime numbers from 1 to R
(~R∊R∘.×R)/R←1↓ιR
Entire Conway’s Game of Life
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
1965 : SimulaNygaard and Dahl wish to describe the vast and deep heterogeneity of computer
simulations, mental imbalances and cosmic vibrations.
They decide to build a language - based on ALGOL 60 - introducing classes, objects,
subclasses, virtual procedures, coroutines and discrete event simulation.
The list is so big that it overflows into C++, Object Pascal, Java and C#. [Stroustrup
acknowledges that Simula 67 was the greatest influence on C++.]
Programmers continue to debate whether Simula’s name played a role in business
software vendors not showing interest in it.
1970 : SchemeSteele and Sussman publish a series of “Lambda Papers” culminating in the web site
“Lambda the Ultimate Kitchen Sink”.
They Scheme together to introduce lexical scope, full recursion, tail-call optimisation
and strong functional programming support into LISP.
Unwittingly, they go on to introduce first-class continuations with :
(((call/cc (lambda (k) k)) (lambda (x) x)) "HUH!")
Steele and Sussman are still untangling their recursively tail-call-optimised ganglia
continuations to exactly understand why the above answers “HUH!”.
1970 : PascalNiklaus Wirth writes a book Algorithms + Data Structures = Programs. When
challenged to prove his point, he creates Pascal based on his ALGOL-W.
Pascal is an imperative and procedural programming language for structured
programming. Its fully nested structure means that a program, a procedure and a
function are described identically.
Features include records, enumerations, subranges, dynamically allocated variables
with associated pointers, and sets.
Critics, however, dismiss Pascal immediately, because it uses “:=” for assignment
instead of “=” like the not-yet-created C.
1972 : CRitchie invents a modern boomerang that has the shape of the English letter “C”.
Eager to provide maximum efficiency, he makes a cutting-edge of each edge of the
boomerang.
Consequently, all programmers who use the “C” boomerang have their fingers
chopped off, or suffer other severe maimings.
Pleased with the outcomes, Ritchie creates a programming language - also called “C” -
modeled on the “C” boomerang.
1972 : PrologDesirous of representing programs using Horn Clauses, Colmerauer and Roussel lift
first-order logic into a programming language.
Prolog is invented as a declarative language with program logic represented in the
form relations: facts and rules. The language attempts to prove the given query using
these relations.
Its performance is dismal, despite the Fifth Generation initiative’s push.
It shows the signs of a death by a thousand “cut”s. In the process, it degenerates into a
logical state that answers “No” to every query!
1973 : MLRobin Milner creates ML, a language based on the M&M type theory.
ML begets SML which has a formally specified semantics.
When asked for a formal semantics of the formal semantics Milner's head explodes.
Other well known languages in the ML family include OCaml, F#, and Visual Basic.
-- James Iry
1980 : SmalltalkAfter Smalltalk-71, Smalltalk-72, Smalltalk-75, …, Alan Kay and team finally release
Smalltalk-80.
Kay remarks that Smalltalk is “object-oriented”. To explain that, he says “Smalltalk
programs are objects, and their executions are activation records, which are themselves
objects.” When asked what objects are made of, he replies “Objects, of course!”
In Smalltalk, “3 + 4” means: the object 3 receives a message called “+” with one
argument, which is another object “4”.
Industry experts are so thrilled by the beauty of its concepts, that they have not yet
recovered enough to actually use Smalltalk.
1980 : AdaIchbiah’s Ada is a structured, statically typed, imperative, wide-spectrum, and object-
oriented high-level computer programming language, extended from Pascal and other
languages.
It has built-in language support for design-by-contract, extremely strong typing,
explicit concurrency, offering tasks, synchronous message passing, protected objects,
and non-determinism.
Its list of features being so long, people have not yet had time to learn enough of the
language to complete any large software project in Ada.
DoD declares the language a success, nevertheless.
1983 : C++Bjarne Stroustrup comes across a humongous clay oven. He is seized by a powerful
desire to collect a large body of programming language features into it.
He then brews the contents in C, giving rise to C++.
C++ is so complex that he - and all the programmers in the world - fail(s) to write a
compiler for it.
Fortunately, Stroustrup discovers a wormhole that opens into a supercomputer from
future. He quickly writes a compiler facade for the wormhole. All C++ programs are
now sent into that wormhole for compilation.
Leagues of innocent C++ programmers puzzle over why their builds take so long!
1986 : Objective CCox and Love ponder the question of software reusability. Strongly aware of their
need to interoperate with C, they bolt on Smalltalk-like message-passing to C.
Accomplished initially as Object-Oriented Pre-Compiler, their creation has “all the
memory safety of C combined with all the blazing speed of Smalltalk.”
Historians suspect that an inadvertent word-level Spoonerism may have slipped into
that description of Objective C.
NeXT and, decades later, Apple give it an unexpected longevity.
1986 : ErlangWhen field technicians refuse to travel to godforsaken corners in order to conduct
repairs of Ericsson telecom systems, Joe Armstrong, Robert Virding and Mike
Williams decide to write software that would never go down.
A new programming language is created. Initial interpreter, written in Prolog, wakes
up the next morning every time it is launched.
Bogdan and Björn write a new VM, titled Bogdan/Björn's Erlang Abstract Machine
(BEAM), which runs 40 times faster.
General industry outside telecom is not excited because of Erlang’s Prolog syntax.
1987 : PerlSorry to see APL’s legacy of beautiful symbols used all over programs go, Larry Wall
decides to reincarnate it in a UNIXy fashion.
The resultant scripting language soon begins to have a mind of its own, letting strings
be added to numbers, etc. The world hails the text processing capabilities of Perl.
Eric Raymond nicknames it “the Swiss Army chainsaw of scripting languages” because
of its flexibility and power, and also because of its “ugliness”.
Larry Wall serves a rejoinder describing Perl as the duct tape holding Internet
together, in a possible reference to its future role in serving CGI web pages.
1990 : HaskellA large team of type theory nerds get accidentally shut in a cave. Their discussions
give rise to the design of a new programming language.
Haskell is born as a pure functional language with non-strict evaluation.
Normal programmers fail to understand its pure semantics and monads. Wadler
pacifies their apprehensions by answering “Nothing to get confused about: a monad is
nothing but a monoid in the category of endofunctors.”
A Haskell program written to interpret that explanation continues to evaluate lazily
(in true non-strict fashion). Its completion time is, by definition, not determinable.
Languages & Broad Families● Imperative
○ Procedural
○ Object-oriented
● Functional
○ Strict
○ Non-strict
● Logic
● Message-passing
○ Synchronous
○ Actor-based
Languages & PerformanceRough buckets of performance
1. Tree-walk interpreters : Ruby <= v1.8.7, Io, the interpreter that you wrote when in
college
2. Bytecode interpreters : Python, Ruby >= v1.9, Lua, early JavaScript, Erlang
3. JIT compiled dynamically-typed VMs : modern JavaScript VMs, PyPy, LuaJIT,
Dart
4. JIT compiled statically-typed VMs : Java, C#
5. AOT compiled statically-typed : C, C++, D*, Go*, Rust
* Presence of GC reduces performance to Bucket 4 levels, usually.