News for hackers. Stuff that matters.
Re:Lisp as the Maxwell Equations of Software (2012) by cousin_it on Thursday February 12, 2015 @09:09AM (#9038795)
I admit that I don't completely understand Lisp's claim to fame. Yes, programs in the language are represented by a built-in data type, and you can write a self-interpreter quite easily. But the same is true for a simple assembly language, if you know the instruction encoding! You can represent a program as a code pointer, and it's easy to write an analog of "eval" by hand, using just a handful of arithmetic instructions and conditional jumps. What's more, such an "eval" won't even depend on a garbage collector or other niceties that Lisp self-interpreters take for granted.
Re:Lisp as the Maxwell Equations of Software (2012) by mjburgess on Thursday February 12, 2015 @09:20AM (#9038849)
The "claim to fame" has more to do with homoiconicity, ie. that the language is its own syntax tree. This allows you to extend the language in arbitrarily complex ways in the language itself - a consequence of this is the simplicity of writing a self-interpreter.

Languages involve a lot of apparent mystification, in part because the syntax tree and the semantics of the syntax tree are not the program you are writing. Who knows what "class X {}" actually does to the (virtual) machine?

By essentially providing a 1:1 correspondence between the "real" semantics and the "apparent" semantics, programming this way can seem magical compared to other languages.

With assembly you arent taking objects of the language and making them objects of a metalanguage, ie. you arent preserving semantics when you abstract. All you're doing is creating hacks on top of the basic semantics, so in effect, introducing a new language (of specialized jumps, etc.).

Re:Lisp as the Maxwell Equations of Software (2012) by Blackthorn on Friday February 13, 2015 @12:21AM (#9043020)
Where this argument loses me is that I have yet to see a single Lisp person going around extolling the virtues of Prolog, a language that is also homoiconic and has macros.

(If Lisp people want to start doing that though, I'd be happy. Prolog is great.)

Re:Lisp as the Maxwell Equations of Software (2012) by hga on Friday February 13, 2015 @09:29AM (#9044463)
A lot of Lispers are interested in logic programming, if not Prolog. It's in SICP, it's the topic of The Reasoned Schemer (www.amazon.com/Reasoned-Schemer-Daniel-P-Friedman/dp/0262562146/), Shen includes a Prolog and you can use its syntax: http://www.shenlanguage.org/learn-shen/prolog.html

So you'll have to modify your statement at minimum to "a single person other than Mark Tarver" ^_^.

Re:Lisp as the Maxwell Equations of Software (2012) by mjburgess on Monday February 16, 2015 @04:18AM (#9055979)
Well I would, I often mention logic programming in the same list as functional. However, lisp is simply awesome/powerful/etc. while logic and more formal-abstract kinds of programming (from Prolog to Haskell) are "difficultly" awesome.
Re:Lisp as the Maxwell Equations of Software (2012) by molloy on Friday February 13, 2015 @01:04AM (#9043129)
Maybe that's because a "Lisp person" who did so would be considered a "Prolog person." :)

I'll give Prolog a shot!

Re:Lisp as the Maxwell Equations of Software (2012) by RodgerTheGreat on Thursday February 12, 2015 @09:17AM (#9038831)
Lisp gets a great deal of undue credit as being some kind of timeless enlightened wisdom, which I see as ignorant of the history of the language's development.

It took years to develop approaches to garbage collection (the earliest prototypes used bump allocators and crashed when they exhausted a heap), years to finalize the syntax of the language (you'll notice that the "maxwell's equations" are written using M-Expressions, a syntax for the language which was discarded for ease of implementation and later rationalized because homoiconicity can be handy), decades to realize how important lexical scope (versus dynamic) is to maintaining encapsulation. Modern Lisps are substantially different in syntax and semantics from these earliest ideas; we're just still calling them Lisp.

It's very easy to make Lisp look elegant when you brush all the implementation details under the rug.

Re:Lisp as the Maxwell Equations of Software (2012) by db48x on Friday February 13, 2015 @12:20AM (#9043019)
Exactly the same is true of Maxwell's equations. The four we use today are different than the 20 he originally came up with; most of that reduction comes from vectorizing them, and they gain a lot of clarity by using vector-calculus operations such as gradient and curl.

Together these changes brush the computational complexities under the rug, and leave only the descriptive power of the laws:

* "the gradient of the electric field is proportional to the amount of electric charge"

* "the curl of an electric field is always zero"

* "the gradient of a magnetic field is always zero"

* "the curl of a magnetic field is proportional to the size of the electric current plus the amount of change in the electric field with respect to time".

Re:Lisp as the Maxwell Equations of Software (2012) by Delmania on Thursday February 12, 2015 @09:55AM (#9038980)
No language that is developed is perfect on release. The timeless wisdom of Lisp, as you call it, rest largely on macros and lambdas. Those ideas are powerful in their ability to allow you to build abstractions and customize the language to your needs. Basically, Lisp allowed for DSLs before the concept of a DSL was even recognized.
Re:Lisp as the Maxwell Equations of Software (2012) by vinceguidry on Thursday February 12, 2015 @09:22PM (#9042546)
You can't call it timeless if it took time to develop.
Re:Lisp as the Maxwell Equations of Software (2012) by nights192 on Thursday February 12, 2015 @09:33PM (#9042587)
Yeah- you're right. Pythagoras' theorem obviously isn't timeless; the fool took time devising the formula!
Re:Lisp as the Maxwell Equations of Software (2012) by vinceguidry on Thursday February 12, 2015 @10:25PM (#9042739)
Pythagoras did not discover the theorem, it's just named after him. He may have been the first to record a proof of it. It's conceivable that the very first peoples to become seriously interested in geometrical calculation would have discovered it as a matter of course. It does meet the definition of timelessness whereas Lisp does not.

As Wikipedia notes: "Mesopotamian, Indian and Chinese mathematicians are all known to have discovered the theorem independently and, in some cases, provide proofs for special cases."

Re:Lisp as the Maxwell Equations of Software (2012) by nights192 on Thursday February 12, 2015 @11:09PM (#9042818)
... which is irrelevant. The point posed was that the ephemeral form heralds the so-called 'revolutionary' concepts, and stating that a prolonged delivery of the concepts invalidates their usefulness is the result of an overly literal interpretation of a common phrase.
Re:Lisp as the Maxwell Equations of Software (2012) by vinceguidry on Friday February 13, 2015 @09:22AM (#9044416)
Usefulness? When did I say Lisp wasn't useful?
Re:Lisp as the Maxwell Equations of Software (2012) by coldtea on Thursday February 12, 2015 @09:52AM (#9038969)
>Modern Lisps are substantially different in syntax and semantics from these earliest ideas; we're just still calling them Lisp.

An interesting take on "modern", meaning "the last 3 decades or so", which is like millenia in the IT industry...

Re:Lisp as the Maxwell Equations of Software (2012) by yogthos on Thursday February 12, 2015 @10:11PM (#9042698)
I'm not sure what you're talking about here. The latest language in Lisp family is Clojure and it came out in 2007. The syntax that it uses is quite a bit different from Lisps from 30 years go.
Re:Lisp as the Maxwell Equations of Software (2012) by taeric on Thursday February 12, 2015 @11:48PM (#9042915)
I wouldn't call it quite a bit different. Really just seems to have a few small changes where they prefer [] over (). Otherwise just a different set of standard macros.

Or are you referring to some other difference?

Re:Lisp as the Maxwell Equations of Software (2012) by coldtea on Friday February 13, 2015 @09:32AM (#9044472)
Clojure is not that different, but besides that, parent implied changes from Lisp circa '60s that were already in CommonLisp and Scheme 30 years ago...
Re:Lisp as the Maxwell Equations of Software (2012) by TeMPOraL on Thursday February 12, 2015 @04:34PM (#9041532)
I understand that by "IT industry" you mean the Web, which is the industry's equivalent of a fashion show.

Work clothes, suits and hazmat wear also don't change their design every three months.

Re:Lisp as the Maxwell Equations of Software (2012) by laichzeit0 on Friday February 13, 2015 @12:58AM (#9043115)
Not redesign, but recycle old ideas. It might change in details, but as far as I've thus far observed, IT operates in cycles. The terminal + mainframe -> the personal computer -> the cloud (personal mainframe) -> ?

Like cycles in economics, climate, fashion, etc.

Re:Lisp as the Maxwell Equations of Software (2012) by coldtea on Thursday February 12, 2015 @06:03PM (#9041935)
No, I mean the IT industry. I have been following it since the mid-eighties...
Re:Lisp as the Maxwell Equations of Software (2012) by michaelsbradley on Thursday February 12, 2015 @02:36PM (#9040858)
Some of the "old Lisp things" are becoming new again.

For example, John Shutt has developed a non-trivial theory of F-Expressions (vau-calculus)[1] and a language named Kernel that employs them[2]. Neither has received wide attention yet, but the Lisp renaissance of the past few years is still young...

[1] https://www.wpi.edu/Pubs/ETD/Available/etd-090110-124904/unr...

[2] ftp://ftp.cs.wpi.edu/pub/techreports/pdf/05-07.pdf

Re:Lisp as the Maxwell Equations of Software (2012) by agumonkey on Thursday February 12, 2015 @01:09PM (#9040213)
It's the opposite side of the computing spectrum. Many languages aimed at using machines, Lisp was an ideal to express computability. As other said, yeah the eval definition hides away GC, IO and the read function, which fits my interpretation (sic) of lisp as an abstraction abstraction. They weren't interested much in the machine details, this itself is already a fun fact.

So it started an ideal until a student was foolish enough to actually program it. Yet this vaporous ideal was enough to write a symbolic differentiator. You don't have bytes nor integers but you can express non trivial mathematical concepts.

You had almost nothing yet you could do a lot, another fun fact. To me Lisp is like a linguistic library, on top of which you'll add primitive types as needed. The expressiveness is given by scope, lambdas, logic and recursion, the rest is secondary. Maybe my lambda calculus classes are making me biased though. McCarthy said he wasn't too inspired by LC even though I've read he was a student of A. Church.

ps: about scoping, I've read emails from Lisp users circa 59 who were discussing the addition of lexical scope, that was before Algol was publicly released.

Re:Lisp as the Maxwell Equations of Software (2012) by cousin_it on Thursday February 12, 2015 @02:46PM (#9040920)
There's a spectrum of near vs. far from the machine, but there's no spectrum of computability, all Turing complete languages are equally Turing complete. There's no difference between Lisp and assembly in this regard. In fact if you take into account the big-O time complexity, then assembly is better than the version of Lisp described in the OP, because the latter suffers a logarithmic penalty due to immutability.

More to the point, Lisp is nice because it's in a sweet spot of language complexity vs self-interpreter complexity, and lambda calculus is nice because it's a simple basis of computation. But there are many languages that make self-interpreters simple (assembly, Forth...) and many simple bases of computation (SKI calculus, rule 110...)

To call something the "Maxwell equations of software", IMO you need something more substantial. For example, Haskell folks can claim that lazy evaluation is provably superior (in termination and time complexity) to any other evaluation strategy. The dependent typing folks can claim that all valid programs correspond to valid proofs and vice versa, and that strict and lazy evaluation are equivalent w.r.t. termination. The guy behind Kernel can claim that the one true Lisp should allow you to mapcar a macro. There are many kinds of wonderful math that give you insight into computation!

Re:Lisp as the Maxwell Equations of Software (2012) by ihm on Thursday February 12, 2015 @11:11PM (#9042820)
It's true that Turing complete languages are (almost by definition) equivalent for writing programs of type "Nat -> Nat". However, things are not so simple at other types and it turns out there is actually something of a spectrum of computability. Andrej Bauer has a nice post on such things here: http://math.andrej.com/2011/07/27/definability-and-extension...
Re:Lisp as the Maxwell Equations of Software (2012) by hga on Thursday February 12, 2015 @02:54PM (#9040979)
Please correct me if I'm wrong, since this is very much not my field, but as I understand it, there are at least 4-5 mathematically equivalent fundamental models of computation, and in practice the Turning machine and the lambda calculus (developed by Turing's thesis adviser ... I gather that was a small world back then) are useful.

E.g. does the additional math you're talking about stand on top of either of those? I don't know (By nature and calling I'm a scientist of the continuous world, not discrete, damnit! :-).

Of course, I'm moving the goalposts by using "Lisp" as a stand in for the lambda calculus (and I remember someone, maybe McCarthy, saying Lisp is what you get after you've read and only understand the first chapter of a book on it :-), which I don't even know at the poets level (but am maybe starting to correct that; don't know if the payoff is worth it to me at this point in my life).

Re:Lisp as the Maxwell Equations of Software (2012) by cousin_it on Thursday February 12, 2015 @05:25PM (#9041793)
Yeah, you understand correctly. The thing is, I don't know any mathematical insight that singles out lambda calculus as a basis for computation among other possible bases, or any mathematical insight that singles out Lisp as an approach to writing self-interpreters. In other words, there's no theorem saying Lisp lies at the extreme end of any spectrum.

To many people, Lisp is simply the most advanced language they know, so they view other languages as "Lisp plus some features that you could implement with macros". They might as well view other languages as "assembly plus some features that you could implement with assembly". It's just the blub paradox all over again.

To add insult to injury, many of today's advanced languages aren't even built on Lisp. They throw away the key idea of Lisp (easy equivalence between code and data) in order to achieve other things which are not achievable in Lisp (provability of certain classes of statements about all valid programs). To put it in an exaggerated but not entirely untrue way, these days Lisp seems like a dead end in terms of research. Most of the interesting stuff is coming from ML-like languages instead.

Re:Lisp as the Maxwell Equations of Software (2012) by tunesmith on Thursday February 12, 2015 @01:59PM (#9040601)
I saw that bit about McCarthy too. I wonder if his point was that while you can do functional programming in lisp, you can do a lot of other non-functional-programming stuff too, and so in that sense he didn't see Lisp as an implementation of lambda calculus.
Re:Lisp as the Maxwell Equations of Software (2012) by agumonkey on Thursday February 12, 2015 @08:59PM (#9042480)
According to D. Gabriel, the imperative forms were added later to seduce scientists used to FORTRAN algorithms. But Steele's interview of McCarthy makes it clear that Lisp is more a natural accident turning into compressed carbon than the implementation of an apriori concept.
Re:Lisp as the Maxwell Equations of Software (2012) by julienchastang on Thursday February 12, 2015 @10:03AM (#9039018)
If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases. - Guy L. Steele
Re:Lisp as the Maxwell Equations of Software (2012) by Permit on Thursday February 12, 2015 @01:23PM (#9040313)
That seems like a huge disadvantage to me. The bottle neck in any software project (> 1 person) is usually the time it takes to read and understand source code. Some estimates[1] claim that up to 78% of development time is spent just reading code.

With that in mind, I would not want to learn a new language for every project I was a part of. I'd even go so far as to say: The majority of programmers cannot design a good language, and if Lisp gives them the opportunity to try then that's a BadThing™.

[1]http://blogs.msdn.com/b/peterhal/archive/2006/01/04/509302.a...

Re:Lisp as the Maxwell Equations of Software (2012) by wwweston on Thursday February 12, 2015 @03:46PM (#9041284)
> That seems like a huge disadvantage to me. The bottle neck in any software project (> 1 person)

Even single-author projects have the person who wrote the code months ago and the person reading it today. :)

> is usually the time it takes to read and understand source code. Some estimates[1] claim that up to 78% of development time is spent just reading code.

Sure. This is a big deal.

I'm not sure the software-conservative approach of locking down the syntax and flexibility of expression is deeply helpful, though. My experience is that comprehending syntax (while it can be a barrier) isn't the biggest portion of that 78% you're talking about -- maybe 15%. Wrapping your head around the semantics of what a piece of code does is a much bigger portion.

The semantics of what the software does are the true language of the program you're writing, so in a sense the choice isn't whether or not you're going to have a DSL or not, it's just how concisely the syntax of the language will support the expression of it. And I've found that the less flexibility you have in syntax, the more likely it is over time that you'll have to type/read over larger amounts of code in order to capture the expression of a given semantic goal.

Re:Lisp as the Maxwell Equations of Software (2012) by julienchastang on Thursday February 12, 2015 @02:52PM (#9040959)
The thing is when you know lisp (or scheme) you understand programming languages much more fundamentally than you would otherwise and so jumping from one programming language to another becomes much easier. (BTW, I hated Scheme in school, but I have since seen the light thanks to SICP.) Overall, I agree with the theme of this sub-thread that non-idiomatic code in any language is a real pain in the ass. I see this everyday when I look at code written by scientists who are smart, driven, motivated people and therein lies the problem.
Re:Lisp as the Maxwell Equations of Software (2012) by sjolsen on Thursday February 12, 2015 @03:47PM (#9041292)
>With that in mind, I would not want to learn a new language for every project I was a part of

Well, you have to. Every new project comes with its own vocabulary and semantics. You have to learn those whether they're expressed in terms of data/function abstractions or syntactic abstractions. Sometimes—perhaps less often than many Lisp programmers appreciate, but sometimes nonetheless—those new concepts are simply easier to understand when expressed syntactically.

>The majority of programmers cannot design a good language, and if Lisp gives them the opportunity to try then that's a BadThing™

There are many programmers (I say "many" because I haven't actually met most programmers, but "most" might be true, too) who cannot design good data abstractions. Would you consider that [your favorite "OO" language here] allows one to form data abstractions to be a "bad thing?"

Re:Lisp as the Maxwell Equations of Software (2012) by tunesmith on Thursday February 12, 2015 @02:00PM (#9040613)
It depends on the complexity of the new language, doesn't it? If these new languages are highly domain-specific DSL's for complex domains, then the entire software package might be more understandable overall.
Re:Lisp as the Maxwell Equations of Software (2012) by brudgers on Thursday February 12, 2015 @04:34PM (#9041534)
It's not so much a huge disadvantage as a huge trade-off.

The risk is that Lisp is used to create a lousy language ill-suited for the task at hand. The benefits come when it is used to capture the ubiquitous language of a domain and used at the appropriate level of abstraction.

If it makes the code harder to reason about, then it's not the right level of abstraction. But poor code can be written in any language.

Re:Lisp as the Maxwell Equations of Software (2012) by Flow on Thursday February 12, 2015 @01:57PM (#9040591)
A big problem is people being too smart for their own good. But that happens in all languages.
Re:Lisp as the Maxwell Equations of Software (2012) by sedachv on Thursday February 12, 2015 @03:13PM (#9041088)
What's wrong with DSLs? They make it easier to read and understand code.
Re:Lisp as the Maxwell Equations of Software (2012) by GregBuchholz on Thursday February 12, 2015 @11:28AM (#9039527)
I think there are multiple factors to Lisp's claim to fame, and other have covered a few of them. But one thing to also keep in mind is the historical context. Lisp had features like garbage collection and much more of a "batteries included" standard library. It was a much higher level language, and more safe to use (memory safe, fewer incidence of off-by-one errors, etc.) compared to most other contemporary languages in the 70s and 80s (C for instance). You might still see a lot of Lisp advocacy aimed at wooing you away from those languages by touting the virtues of bignums/rationals, garbage collection, anonymous functions/closures, etc.. By the time the late 90s and 2000s rolled around pretty much of all of the popular languages had incorporated high-level features pioneered by lisp, and so now-a-days lisp doesn't probably seem quite as attractive to python or ruby or javascript or C# or Haskell users. Also, I think there may just be some personal preferences involved in different language choices. If you like C, and think it is a great language, then I'd say there is a lower probability that you'd like lisp, because they have a different philosophy about how programs could be built.
Re:Lisp as the Maxwell Equations of Software (2012) by abecedarius on Thursday February 12, 2015 @11:11AM (#9039406)
Turning that around, there was the Scheme-79 chip: http://dspace.mit.edu/handle/1721.1/6334

This takes Lisp as the machine language of a high-level machine (with READ as the assembler). You could do the same with C, but without a compiler stage it'd be absurd.

[deleted]
Re:Lisp as the Maxwell Equations of Software (2012) by hga on Thursday February 12, 2015 @11:42AM (#9039664)
ADDED: the author of the deleted post I'm responding to thought that he remembered that the Scheme 79 chip failed to actually run Lisp (Scheme). I replied:

Not that I know of, but only because of microcode errors. I was told "Sussman wasn't quite as smart as he thought he was" to tape it out without making really sure the microcode was correct.

In all fairness, at the time they had little in the way of available computer resources to e.g. simulate it, and it was all part of a very exciting time when MIT started doing Mead and Conway style VLSI, see https://en.wikipedia.org/wiki/Mead_%26_Conway_revolution and note the latter gave a famous course on it at MIT in 1978.

Re:Lisp as the Maxwell Equations of Software (2012) by billsix on Thursday February 12, 2015 @10:29AM (#9039153)
Lisp's eval/apply is so short and dense that it can fit on a chalkboard. Its also easy experiment with language design by making slight changes to the intrepeter.
Re:Lisp as the Maxwell Equations of Software (2012) by coliveira on Thursday February 12, 2015 @09:15PM (#9042532)
This is very close to the idea explored by Forth. It has just a simple engine that compiles pieces of code on the fly. No need for garbage collection or any complicated macros.
Re:Lisp as the Maxwell Equations of Software (2012) by DavidPlumpton on Thursday February 12, 2015 @01:39PM (#9040451)
Try writing a complex program in 1960s era COBOL. Then you will understand a large part of Lisp's claim to fame.
Re:Lisp as the Maxwell Equations of Software (2012) by hga on Thursday February 12, 2015 @01:44PM (#9040485)
Perhaps, but when you add alternates like Algol and PL/1 (1964) that case becomes a lot weaker. (Although I don't really know Algol and only know PL/1 as of IBM's late '70s version.) The weaknesses of COBOL were widely realized (and in it's niches it's not hardly so bad, or so I say from one week of using it).
Re:Lisp as the Maxwell Equations of Software (2012) by 4ad on Thursday February 12, 2015 @09:19AM (#9038844)
Sure, assembly is also homoiconic. However, there's more to lisp than homoiconicity.
Re:Lisp as the Maxwell Equations of Software (2012) by 4ad on Friday February 13, 2015 @04:40AM (#9043584)
Wow, downvotes, amazing.