There are a few ancient sayings about going around the world, looking for the Truth (which us Out There, you know) and then returning back home only to find It right there. Other ancient thinkers have suggested to look no further than onto your own self (to find all the answers). And, of course, the ultimate resit is I Am That from the Upanishads.

There are some manifestations Truths I found going around the world.

Principles at work.

There is a list of remarkable and even extraordinary achievements, which all together point at the same “Mountain”.

Most of the time it is about uniformity which emerged from using just right principles and proper universal abstractions.

M. A. Jackson’s book.

PRINCIPLES OF PROGRAM DESIGN, Academic Press, 1975.

By that time it was well-understood from the algorithm charting techniques, that just 3 the control structurs are required to express any algorithm.

  • a sequence

  • branching

  • a branch that returns back (a loop)

    Unsurprisingly, the same fundamental building blocks can be found at circuit schematics.

    The crucial thing to realize here is that there is that, just as with a road fork, always only one particular road could be taken (without backtracking).

    No matter how complex a river’s delta is, each molecule takes a “linear path” and “see no forks”.

    Loops correspond to the universal “feed-back” and “feed-forward” loops.

All you need is Lambda

by prof. Brian Harvey, the great.

The Natural Numbers, branching and looping (via recursion) can be implemented within the Lambda Calculus.

This theoretical result proves the “All you need” part.

The language Scheme tried to do everything “just right”, including a proper “Numeric Tower”, tail-recursion, etc.

Barbara Liskov books

Data abstractions (ADTs) and specifications as the essence of a high-level programming, when on just adds new data-abstractions to a language.

This means that a “core” language should be augmented with Abstract Data Types in exactly the same way mathematics has been augmented with Sets or Monoids.

Notice that the “procedural abstraction” (lambdas) and “data abstraction” (ADTs) are everywhere at all levels (universal).

The “iteration abstraction” are an instance of a standardized protocol (interfaces and informal rules) defined as a type-class.

The Miranda language

The big idea here is that the “core language” should be an abstract machine (which interprets an augmented Lambda Calculus).

This is, basically, an executable mathematics done right, including the “Natural Order” (non-strict) of evaluation.

Smalltalk

This is a uniform message-passing everywhere - a standard protocol for communication between objects.

It is this uniformity and the rules which make Smalltalk small.

Haskell vs. Ada vs. C++ vs. Awk vs. …

The famous paper which shows nearly 10 times less LOC for a math-heavy task.

https://web.cecs.pdx.edu/~apt/cs457_2005/hudak-jones.pdf

The result is not just from application of a Functional Language to a math problem, but from doing things at a higher-level, at the same level as the problem domain.

Octave (MATLAB)

This is the best high-level DSL ever created. Well, maybe second only to TeX.

Andrew Ng’s phenomenal results

Whole ML algorithms implemented as one liners in Octave.

PG’s Arc Language

There we could actually observe how all the “control structures” has been bootsrapped from the “lambda”.

The first three expressions of arc.arc basically bootsrapped a Lambda-based LISP dialect using assignment (for an implicit environment – there is always an environment!), the lambda (fn) and the syntax-level macros.

Yes. there is some “cheating” in that it uses Racket’s runtime (because runtimes are hard and messy), but nevertheless.

  • The original version of Arc has been mirrored here:

https://github.com/liolaarc/arc3.1

  • The community version is here

https://github.com/arclanguage/anarki

Clojure

Practical immutable (persistent) data structures - a rewrite of the Okasaki book, translating to the JVM primitive types.

Clojure is a clever hack itself, which, just like Arc, delegates (or offloads) the difficult parts to a “stable” runtime.

Haskell’s Prelude

An evolved (part of a) standard library of universal pure-functional data abstractions.

This is indeed nothing but applied principles and the mathematical abstractions done right (implemented as ADTs within corresponding modules in a pure system of logic).

Erlang

A whole world in itself. One has to read everything by Joe Armstrong.

It is an asynchronous message-passing between share-nothing lambdas (and the runtime which makes it happen).

Ocaml’s standard library

A proper discipline and modularity done right. Good-enough to implement an advanced compiler.

The type-hierarchy of Coq

Both so-called “sum-types” and “product-types” have been bootstrapped as parts of a standard library.

Yes, all the types are just augmented Sets, just as all the control is augmented Lambdas.

Well, we could have simple lambdas (parameterization and application of types to one another) at the level of types too.

CLOS

Which is just an embedded DSL, based on structs and slots which contains “lambdas”.

My own contribution

I abbreviate my results as , | ->, which basically says it all. These universal patterns are literally everywhere.

The shallow meaning is that these kinds of types (parameterized, “type-classed” or not) is all you need besides the lambda.

The deep meaning is that these are universal notions, and they can be traced back to the very “nature of Causality”.