In response to: https://ratfactor.com/cards/pl-small
brevity is the soul of wit - Shakespeare
…the length of a shortest computer program (in a predetermined programming language) that produces the object as output
My white whale is the most compressed/compressible program. Lisp, TCL Arthur Whitney style C, APL (no coincidence that I’ve been sharing such things) let you par down the implementation primitives very well, but an OS which exposes what we actually need/renders much code unnecessary helps even more. Just as garbage collection abstracted away memory management, Plan 9 abstracted away networking. We still have a long way to go, but e.g. condensing golfing SSGs and servers or Prolog implementations and accounting and valuation rule sets are a lot of fun!
the concept can be boiled down to this hand-held size. And that means I can probably fit it in my head
An empowering, condensing notation is a tool of thought, because it lets you think faster, as if everything were in our brain’s L1 cache. (By repeated effort, we can grow our L0 and hold rules, symbol tables etc. in it as we get used to a new paradigm/notation.) We can then grow the language into anything we want. That was the original promise of Forth, though modern architectures, interop etc. make it all dreadful, time consuming… I hope we can soon abstract away these modern concerns.
For a time, I chased the dragon of lisp machines, of a low level machine able to handle configurations through a logic language, of Forth drivers etc. Projects like EYG are now using the browser as lisp machine, which is brilliant! It has a DB and so much built in!
Uh…
making programs short is what high level languages are for. It may not be 100% accurate to say the power of a programming language is in inverse proportion to the length of programs written in it, but it’s damned close
The most meaningful test of the length of a program is not lines or characters but the size of the codetree– the tree you’d need to represent the source. The Arc example has a codetree of 23 nodes: 15 leaves/tokens + 8 interior nodes.
my m.o. while working on Arc was to write applications in it, then comb through them line by line trying to imagine language features that would make them shorter. Then I’d implement those features, rewrite the program to use them, and start over
https://www.paulgraham.com/arcchallenge.html
McCarthy began. In his original 1960 paper he built Lisp up from “axioms” like
car
,cdr
, andcons
, through “theorems” likeassoc
andmapcar
. There must be some optimal path all the way up to a complete language. What is it? McCarthy didn’t get very far along it in his paper. And after that the language passed into the hands of his grad students, who at the time were more worried about the exigencies of making an interpreter run on the IBM 704 than continuing McCarthy’s axiomatic approach. We’ve been living with their hacks ever since. Steele and Sussman tried to start over when they first began working on Scheme
that’s the goal: to find an optimal path from a small number of axioms up to a complete language for everyday use … because I suspect that’s the way to get maximum expressive power
Brevity is of course core APL style: https://www.sacrideo.us/apl-style-patterns-and-anti-patterns-in-apl/
In APL an operation is often shorter than its name avoiding this problem:
An abstraction frees you from thinking about its internals every time you use it. A service allows you to never learn its internals. A service is not an abstraction. It isn’t ‘abstracting’ away the details. Somebody else is thinking about the details so you can remain ignorant. - Kartik Agaram
Data & Code
https://blog.rongarret.info/2008/02/what-are-programming-languages-for.html
1989 paper by Phil Agre and David Chapman entitled What are Plans For? … plans should be considered as generalized information resources for a complex (and therefore academically interesting) execution engine
Programs should be written for people to read, and only incidentally for machines to execute. - SICP
legibility is a function of a person’s knowledge state
brevity of a program is much more dependent on the available libraries than on the structure of the language
even node count is a red herring because it begs the question of where you draw the line between “language” and “library” and “program”
criteria should be, minimize /N x the length of Arc plus the length of each program in some representative set/ - queensnake
correct goal is to create a language that MINIMIZES the total of code, documentation, training, and learning curve to maintain it correctly - lgriffith
what are programming languages for? They are for making the creation of programs easier … Sometimes investing a little more typing can pay dividends down the road, like making you do less typing when you change your mind and decide to use a hash table instead of an association list
Start from the Goal
The way I wrote web.py was simple: I imagined how things should work and then I made that happen - Aaron Swartz
M.P. Ward’s Language-Oriented Programming:
- Start by developing a formally specified, domain-oriented very high-level language which is well-suited to developing “this kind of program”
- Implement the system using this “middle level” language
- Implement a compiler or translator or interpreter for the language