9 ms·
Lisp as the Maxwell’s Equations of Software (2012)
- sitkack 4y agoIf Lisp is the Maxwell's Equations, what is the Heaviside language? https://en.wikipedia.org/wiki/Oliver_Heaviside https://en.wikipedia.org/wiki/Oliver_Heaviside
- protonfish 4y agoHeaviside promoted Maxwell's equations and created clearer, simpler versions of them. So I think it would be a language that uses list processing and functional concepts as a feature of a syntax that is easier for beginners. Something like Python or JavaScript.
- all2 4y agoReminds me of Peter Norvig's sketch of Lisp in Python: https://norvig.com/lispy.html https://norvig.com/lispy.html
- Beldin 4y agoInterestingly, the article users the nowadays standard 4-equation form of the Maxwellian concept - but Maxwell himself used 20 equations [1]. The current version is due to Oliver Heaviside (who doesn't get enough respect for this). As I understand things, Maxwell's work was held in high regard, but only became usable due to Heaviside's reformulation. Whether that aspect (beautiful but unusable) is true and carries over to Lisp... dunno, I'm insufficiently familiar with Lisp. But the xkcd with brackets [2] comes to mind. [1] https://en.m.wikipedia.org/wiki/History_of_Maxwell%27s_equations https://en.m.wikipedia.org/wiki/History_of_Maxwell%27s_equat... [2] https://xkcd.com/297/ https://xkcd.com/297/
- jpitz 4y agoI think I might argue that the "Maxwell's Equations of Software" could be a set of things that proscribe and constrain...whose consequences are pervasive throughout. For example: Turing Machines and the Halting Problem Queueing Theory Shannon Entropy The CAP Theorem
- analog31 4y agoMaxwell's Equations are an interesting analogy. As they were originally written, they were cumbersome and hard to understand. Along came Oliver Heaviside, who translated them into the notation of vector calculus, resulting in the form that remains in use today. But even the present form is not without its detractors, and I've read comments in this forum to the effect that a better notation would make them even less forbidding for students. Algebra has a similar history too. You practically had to be a philosopher to understand algebra as described by Al-Khwarizmi's book -- there are no numerals or equations, just a wall of text. The notation of equations hadn't been invented yet. Today, thanks in part to gradual development of notation, we can teach algebra to schoolchildren. I think there are probably many developments, where the brilliant invention, and the language that can be understood by the rest of us, had to come from two different people.
- martyalain 4y agoI thought the same thing for a long time, I found s-expressions very elegant. Then I discovered lambda-calculus, with its scary syntax but based on a process I could understand, text-rewriting. So I had the idea to explore the lambda-calculus using s-expressions and patiently rebuilt booleans, pairs, lists, recursion and beyond a real complete Turing language, for instance: - http://lambdaway.free.fr/lambdawalks http://lambdaway.free.fr/lambdawalks - http://lambdaway.free.fr/lambdawalks/?view=lambdacode5 http://lambdaway.free.fr/lambdawalks/?view=lambdacode5 No need for cons, car, cdr and other historical names. We can rebuild everything from scratch, from abstractions and applications. No need for Lisp, Scheme, Common Lisp and other Clojure, even if they remain excellent examples. So in my opinion the Maxwell equations of computation are to be seen more in the lambda-calculus than in LISP and its dialects. We just need to make the syntax a little more human.
- martyalain 4y agoAbout "We just need to make the syntax a little more human", see for instance http://lambdaway.free.fr/lambdawalks/?view=sierpinsky4 http://lambdaway.free.fr/lambdawalks/?view=sierpinsky4
- jerf 4y agoFor the reasons you give, it is perhaps more reasonable to say that Lisp is a Maxwell's Equations of software. But there are several. Forth has another reasonable claim to it, despite unpopularity, and Turing Machines have a claim too, despite their extreme unpopularity as a programming methodology. I don't know array languages well enough to know but I bet they have one too. There isn't really a unique set of Maxwell's equations in software.
- kragen 4y agoi wasn't able to get a runnable forth to less than a couple of pages written in itself https://github.com/kragen/stoneknifeforth https://github.com/kragen/stoneknifeforth but schönfinkel's ski-combinators are maybe the simplest practical basis s f g x → f x (g x) k a b → a i = s k k (one of many possible definitions) maybe wolfram knows of a simpler alternative my favorite is abadi and cardelli's object-calculus on which i based bicicleta. it has two reduction rules rather than the λ-calculus's one. using a hybrid of bicicleta's syntax and abadi and cardelli's {f = ς(v)b, g = ς(v)c, ...}{f = ς(v)d} → {f = ς(v)d, g = ς(v)c, ...} {f = ς(v)b, g = ς(v)c, ...}.f → b[{f = ς(v)b, g = ς(v)c, ...}/v] the first of these derives an inherited object with a new definition for method f. the second one invokes method f on an object, which is evaluated by replacing its self-variable v with the object itself throughout its body, using the standard β-reduction semantics with α-renaming that we're familiar with from the λ-calculus (b[x/y] means b but with x replacing y) despite the simplicity of the semantics the ς-calculus is enormously more usable for actually writing down functions than the λ-calculus. here's factorial(10) in the notation above (untested) {fac = ς(env){ n = ς(_)3, return = ς(o) (o.n < 2).if_true{ then = ς(_)1 else = ς(_)o.n * env.fac{n = ς(_)o.n - 1}.return }.return } }.fac{n = ς(10)}.return bicicleta has a lot of syntactic sugar which reduces this to (tested) {env: fac = {fac: arg1 = 3 '()' = (fac.arg1 < 2).if_true( then = 1 else = fac.arg1 * env.fac(fac.arg1 - 1) ) }}.fac(10) in particular to be able to define infix operators inside the language, bicicleta rewrites x * y as x.'*'{arg1 = y}.'()' and analogously for -, <, etc. they published a bunch of papers and a book on this but they were more interested in static typing than anything else. a paper on one imperative variation of the thing is http://lucacardelli.name/Papers/PrimObjImpSIPL.A4.pdf http://lucacardelli.name/Papers/PrimObjImpSIPL.A4.pdf you can implement a turing machine in a few lines of c, making it internally simpler than the other alternatives, but as you point out it's unusable except as a compilation target or to prove theorems about
- deltasevennine 4y agoA lot of people don't agree. But I feel category theory is the Maxwells Equation for software. What is the shortest distances between two points? A straight line. I calculate the solution to that problem. I don't design it. What's the best way to travel between two points? Do I take a car or plane? Which is cheaper, faster, or more comfortable? I can't calculate a solution because the problem is to complex. Instead I design the solution to the problem. That is the fundamental difference between design and calculation. Whenever you use the word "design" you are operating in a zone where humans have no foundational optimization theory. You are guessing, using your instincts, your common sense and your gut to find solutions for the problem. It's unlikely you'll hit the most optimal solution, but you can very likely arrive at a "good" solution. If you squint, Category theory looks to fill this gap for designing programs. Depending on how you look at it, category theory looks like a fundamental theory on how to organize code. It can be thought of as a fundamental theory on abstraction or a fundamental theory on interfaces. Maybe another way to put it is that the concept of interfaces are the maxwells equations of software.. Even turing machines/lambda caculus seem oddly specific let alone lisp. If we want something fundamental and general I think Category theory is it. My guess is, if the advancement of computer science was allowed to play out for centuries and we got rid of all the historical baggage, some form of category theory would lie at the heart of it all.
- deterministic 4y agoLambda Calculus is a much better representation of computation than Category Theory. I can teach somebody functional programming using Lambda Calculus fairly quickly. It would take a lot longer using Category Theory. I have studied quite a bit of Category Theory but I would still struggle to explain beta-reduction using Category Theory. Another better system to use IMHO is Martin Luff style Type Theory. Much simpler. Much more useful in practice.
- deltasevennine 4y agoWell if teaching length justified the title of Maxwell's equations I would agree with you. CT does take longer to learn. However if foundational theory was what justified the title, I believe CT is more foundational then lambda calculus.
- phoe-krk 4y agoAlso related, An Intuition for Lisp Syntax (2020) - https://news.ycombinator.com/item?id=32630675#32635785 https://news.ycombinator.com/item?id=32630675#32635785
- sbf501 4y agoI think a more astute argument would be that Backus-Naur Form is the Maxwells Equations, since that's what the definition of LISP is written in on the 1/2 page screenshot that starts the OP's thesis.
- nerpderp82 4y agoGuy Steele talk on Metanotation [1] https://www.youtube.com/watch?v=dCuZkaaou0Q https://www.youtube.com/watch?v=dCuZkaaou0Q
- amelius 4y agoMaxwell's equations address only part of physics. E.g. you can't describe anything nonlinear with it, like transistors. Also, it is quite difficult to prove that Maxwell's equations have a single solution for different boundary conditions. For lambda calculus it is quite easy, there can only be one solution.
- tim_hutton 4y agoIf this is true then Haskell's type system is Noether's Theorem.
- tome 4y agoAre you familiar with this? https://bentnib.org/conservation-laws.html https://bentnib.org/conservation-laws.html
- dang 4y agoRelated: Lisp as the Maxwell’s Equations of Software (2012) - https://news.ycombinator.com/item?id=23687904 https://news.ycombinator.com/item?id=23687904 - June 2020 (46 comments) Lisp as the Maxwell’s equations of software (2012) - https://news.ycombinator.com/item?id=9607843 https://news.ycombinator.com/item?id=9607843 - May 2015 (8 comments) Lisp as the Maxwell Equations of Software (2012) - https://news.ycombinator.com/item?id=9038505 https://news.ycombinator.com/item?id=9038505 - Feb 2015 (122 comments) Lisp as the Maxwell’s equations of software - https://news.ycombinator.com/item?id=3830867 https://news.ycombinator.com/item?id=3830867 - April 2012 (37 comments)
- deleted 4y ago[deleted]