400 likes | 583 Views
Symbolic array languages. Stephen Taylor editor@vector.org.uk. vector.org.uk. Symbolic array languages. symbolic, not lexical all data are arrayed few primitives, much generality short programs. HEALTH WARNING. Exposure to symbolic array languages can cause addiction .
E N D
Symbolic array languages Stephen Taylor editor@vector.org.uk Symbolic array languages
vector.org.uk Symbolic array languages
Symbolic array languages • symbolic, not lexical • all data are arrayed • few primitives, much generality • short programs Symbolic array languages
HEALTH WARNING • Exposure to symbolic array languages can cause addiction. • Risk is low (fewer than 1 in 100) but higher among mathematicians and scientists. • Addiction is severe; no cure has been found. Symbolic array languages
This is your first opportunity to leave. Symbolic array languages
Now we go live. Symbolic array languages
Where did they come from? Symbolic array languages
Harvard, 1950s • Kenneth E. Iverson (1920-2004) • Automatic Data Processing (with Fred Brooks) • AProgramming Language (1962) Symbolic array languages
IBM, 1960s – 1970s • Lathwell, Iverson, Moore, Falkoff, Abrams & Breed • IBM Scientific Center, Philadelphia Symbolic array languages
Wall St 1985— • Arthur Whitney • A+, Morgan Stanley, 1980-90s • k, kdb+, q, Kx Systems, 1995— Symbolic array languages
Array language designers • original approach • deeply influential • honoured by experts • not taught and little known Symbolic array languages
Sound like anyone you know? Symbolic array languages
Who speaks arrays? • Insurance • Pensions • Science • Engineering • Financial markets Symbolic array languages
Array languagesin the financial markets Symbolic array languages
Kx Systems Symbolic array languages
kdb+ in financial markets • Fast, in-memory, column-store database • used where conventional database fails • billion-row tables • sub-second million-row updates • routinely 20-50× faster than Oracle • commonly faster than hand-coded C Symbolic array languages
kdb+ in financial markets • kdb+ interpreter object code: 100Kb • kdb+ does its own memory management (3× faster than OS) • server licences about US$25k per core, eg US$100,000 for a typical server Symbolic array languages
kdb+ in financial markets • typically 1% code volume of equivalent C • eg 4 lines of k = 400 lines of C Symbolic array languages
kdb+ in financial markets • 2007: lexical ‘wrapper’ language q • 2009: q free for personal users • 2009: textbook q for Mortals, sold on Amazon Symbolic array languages
kdb+ in financial markets • SuDoKu • Define p as a 3×81 array of integers indicating the ‘exclusivity group’ for each board position • p,:3/:_(p:9\:!81)%3 Symbolic array languages
kdb+ in financial markets • SuDoKu • Function s solves for all SuDoKo positions • s:{*(,x)(,/{@[x;y;:;]'&21=x[&|/p[;y]=p]?!10}')/&~x} Symbolic array languages
back to APL Symbolic array languages
Conway’s Game of Life Symbolic array languages
Industrial functional programming Symbolic array languages
Inquisitive programming Symbolic array languages
Notation as a tool of thought K.E. Iverson, Turing Award lecture, Association for Computing Machinery, 1979 Symbolic array languages
But the key to flexibility, I think, is to make the language very abstract. The easiest program to change is one that’s very short. Paul Graham “Painters and Hackers” Symbolic array languages
A programming language is for thinking of programs, not for expressing programs you’ve already thought of. It should be a pencil, not a pen. Paul Graham, “Painters and Hackers” Symbolic array languages
My work last week Symbolic array languages
Our work next year Symbolic array languages
The way we live now • financial breakdown Symbolic array languages
The way we live now • financial breakdown • less energy Symbolic array languages
The way we live now • financial breakdown • less energy • unstable climate Symbolic array languages
Let’s put the future behind us. Symbolic array languages
Expect • rapidly changing requirements • short development cycles • uncertainty • tight budgets Symbolic array languages
Bet on • short programs • light tools (text editors not Visual Studio) • small teams of smart people • direct, informal methods Symbolic array languages
Be ready to • adapt • rescue • improvise Symbolic array languages
Where do people already work this way? Symbolic array languages
Хелло Свет 2nd Symbolic array languages
editor@vector.org.uk www.vector.org.uk Symbolic array languages