Lisp as an Alternative to Java (1999)
norvig.com
norvig.com
Ultimately, Common Lisp flew on a spacecraft once, on the New Millennium DS1 mission. Unfortunately, there was a serious political shitstorm that accompanied that mission, and Lisp never flew again despite several million dollars having been spent to show it to be a viable approach. :-(
The general opinion is that those systems failed due to technical issues, however most of the time failures are caused by political wars.
They are even worse when they are caused by those that don't want things to change, like what seems to have happened during Longhorn development.
So one needs a group strong enough monetary and political, to be able to change ways of computing, sometimes even loosing a couple of battles to eventually win the game.
They brought COM+ Runtime back from the grave, exchanged the COM type libraries for .NET metadata and renamed it WinRT.
At the same time C++/CLI syntax was repurposed for C++/CX this time doing AOT compilation to native code. Similarly, .NET went through two new AOT compilation toolchains, first the MDIL binary format used in Windows 8.x, followed by .NET Native introduced in Windows 10.
Which begs the question if the Dev and Windows devisions weren't so busy fighting each other, maybe just maybe, Longhorn would have had the UWP application model instead of Windows having gone through all these releases until they had settled their differences.
Now it still remains to be seen how much it will eventually matter.
This was just an example, there are others regarding other technologies, for example Symbolics had quite a few internal fights.
https://www.youtube.com/watch?v=_gZK0tW8EhQ
Stuart got one significant factual detail wrong: the race condition was in Lisp code.
It turns out I was wrong when I said that the reason Ada didn't get used more was that it didn't scale. It did. It worked just fine on Cassini, and there was no reason based on that experience to believe that it wouldn't work on other spacecraft.
The reason it wasn't used more turns out to be the same reason Lisp wasn't used more: politics. Cassini was being developed at the same time as the Pathfinder mission Because Pathfinder was done on a (relatively) low budget, they used C because it was easier and cheaper to get C coders and compilers than Ada coders and compilers. Pathfinder was seen as the way of the future while Cassini was perceived as part of the stodgy (and expensive) past, so subsequent missions were built on top of the Pathfinder C code base and not the Cassini code base.
Ironically, it was the same event that killed Lisp which also killed Ada, though the effect was less direct. The Remote Agent was originally going to be the mainline software that controlled the entire DS1 mission. But when it became clear that the RA would not be ready in time, management decided to demote the RA to a flight experiment and adapt the Pathfinder software to run the DS1 mission. Because the Pathfinder mission itself was over, the team was available, while the Cassini team (the Ada folks) were still busy working on Cassini. By the time the Cassini mission ended [1] and the people with Ada experience became available again, C was already entrenched as the new de facto standard for slight software. The success of the subsequent Mars missions, and particularly the spectacular success of the Mars Science Laboratory EDL (which, I have to say, was freakin' amazing) further cemented the status of the Pathfinder approach to software development.
I have to give the C folks a lot of credit here: they have produced an awful lot of very reliable code for a very long time now. But I still think they're playing with fire.
[1] The Cassini software development team actually became available before the end of the mission, but they were still needed through the Saturn oribit insertion in 2004.
Are there any papers on the actual lisp ports? Are there any gotchas?
No. The flight Lisp was just a commercial product: LispWorks. You can probably get detailed info from them. We also used CLisp and (what is now) Clozure Common Lisp for development.
> Are there any gotchas?
From Lisp? No, not really. In fact, I was pleasantly surprised at how easy it was to port the code from one Lisp to another. That part mostly Just Worked.
Now you work on SC4? And before JPL and other places of ill repute?
When do you kick back and put out low quality, lowbrow work? Haha.
I was curious to see Lexicons, and Ciel seems neat, now there is a buildup in systems programming in high level langs. GC-less and system-friendly Lisps are hard to come by, and sadly it seems like work on this stopped a while back.
Thanks for all your work, open and closed. I have enjoyed your essays and you seem to be giving us great stuff. Keep it up!
> When do you kick back and put out low quality, lowbrow work?
I have gobs of "low quality, lowbrow work" which I don't publish. Too embarrassing.
But I kick back a lot. Lisp is a huge lever that allows me to appear a lot more productive than I really am :-)
Despite all the jokes I can profer on HN in this trendy topic, some of us are destined to suck at programming, from Assemly to PHP to Datalog to J!
That sounds like a self-fulfilling prophecy.
https://github.com/rongarret/BWFP/
Feedback appreciated.
Honestly, I find a lot of this frustrating because I do not have a small goal. This week I came up with a few minor projects and will try to implement them in different languages if I have a chance, like an IP subnet calculator, and a reporting tool for maildirs on my computer. Trying to learn without simple goals has proven wasteful. I decided this last weekend to change course.
We shall see how it goes.
Haskell is coming around though. We got Stack which is a fantastic package manager, and we now have a web API library which is pretty much unmatched: http://haskell-servant.readthedocs.io/en/stable/ (each Servant endpoint has a type, and you can generate docs and client libraries from your backend code). Editor tooling has historically been the other problem, but that's starting to come around too.
"Insider: Oracle has lost interest in Java" - http://www.infoworld.com/article/2987529/java/insider-oracle...
"The email, sent to InfoWorld on Tuesday by a former high-ranking Java official, claimed to feature details from inside Oracle. It said the company was becoming a cloud company, competing with Salesforce, and 'Java has no interest to them anymore.' The subject line cited 'Java -- planned obsolescence.'"
"Oracle’s “planned obsolescence” for Java" - https://jaxenter.com/oracle-and-javas-planned-obsolescence-1...
'Oracle is cutting back on Java EE...it[Oracle] does not want to allow other companies to help out on the Java platform. Proprietary product work will be done using the Java app server WebLogic, and there will also be a proprietary microservices platform. The email also dashes any hopes of Oracle collaborating on a ‘Java foundation’ with other companies, let alone ever relinquishing its ‘ownership’ of the Java platform.'
• In Java 9 modularise the platform, add a static linker, support new JIT compiler plugins with an advanced new compiler (Graal) as the first user, a whole other bunch of things.
• In Java 10 add value types, better generics, local type inference to the Java language, possibly a replacement for JNI/native code usage (Project Panama), a bunch of other things.
There are quite a lot of plans for Java actually, considering that it's not a profit center for Oracle.
SE isn't going anywhere. Personally I'm a JVM developer but I really don't care too much about EE.
If we're talking about the JVM, we must also include Clojure, Scala, Groovy, and any other JVM language code that would be killed if the JVM died.
If we're talking about the language, then the majority of Android and its app ecosystem are included.
Most importantly, don't forget that Java the specification is an open standard with dozens of runtime implementations and 7 compilers (not counting Google's). And the primary compiler, Sun's javac is GPL.
https://en.wikipedia.org/wiki/List_of_Java_virtual_machines https://en.wikipedia.org/wiki/List_of_compilers#Java_compile...
There are maybe in total 2 compilers out there which are still usable (i. e. not 10 years out of date and unmaintained).
The specification is "open" in the sense that you can't build your own implementation of Java without accepting a proprietary licensing agreement with Oracle (assuming you even get one).
You can't BUILD an implementation of Java, because "Java" is defined by "passes the Java conformance tests".
You can build "something", but it won't be Java, so don't call it Java. Even Google understood that.
Java in 1999 was about as inexpressive as today's Go. The gap is narrower if you take today's Java 8.
The tech was released in 1996:
http://www.modulaware.com/mdlt69.htm
It's funny that Franz was influential to both Brendan Eich (JS) and Andreas Gal (Tracing JIT) but we still got JavaScript as a language, even though Brendan cited[1] Oberon as an influence. At least we got tracing JITs and the alternative AST encoding from Franz's intellectual cloud. I would really like to understand how Bill Joy and Brendan Eich studied Oberon and we still got Java and JavaScript, which haunt us to this day like the industrial takeover by C in the 1980s does.
Join the dynamic programming underground! :-) (Or at least use a static language that's not all jacked up)
Same thing with Java, it was available for free, just download and install with a JDK that was "batteries included" versus the chaos of trying to write portable code in C or C++ in the mid-90's.
I would love to see a Common Lisp expert do an entire book on Armed Bear Common Lisp (Common Lisp entirely on the JVM). Edi Weitz hinted at what might be possible in his book, Common Lisp Recipes, but only very superficially.
To me, the power of Common Lisp married to the ubiquity and library of the JVM is the great possible future for CL.
emacs & slime[1]
> I would love to see a Common Lisp expert do an entire book on Armed Bear Common Lisp
I'm curious what you'd expect from such a book. There are some excellent books on CL in general and good libraries that provide a convenient layer over implementation specific things (e.g.: uiop or cl-fad). One usually does not think about a specific CL implementation when writing code - I'd even go as far as saying that targeting a specific implementation is usually a sign of bad coding style.
I've spent a lot of time with emacs, and slime was what I used when I was exploring Common Lisp: both SBCL and CLISP. Emacs is really powerful and I'm fairly at home with it, but I've come to prefer more graphical IDE's. Judging from the popularity of Eclipse, Visual Studio, NetBeans, etc...I'd say I'm not alone. Telling programmers it's emacs+slime or the highway is not a strength; it discourages everyone who prefers those other environments.
> I'd even go as far as saying that targeting a specific implementation is usually a sign of bad coding style.
I was suggesting ABCL because it is a full implementation of CL on the JVM. If there are other CL's with ABCL's level of maturity on the JVM, then they would work just as well.
Beyond that, I imagine that many programming projects target specific implementations for various, pragmatic reasons.
LispWorks and Clozure CL are good non-emacs IDEs, and there are several others. I will agree that Emacs and Slime are pushed a little too hard sometimes.
> Beyond that, I imagine that many programming projects target specific implementations for various, pragmatic reasons.
That has not been my experience actually using Lisp for a number of projects. IME it's far more likely to support specific platforms (Linux, Windows, OSX, ...) than it is to support specific Lisp implementations. Even that is usually only because a required C library doesn't run on Windows or something like that, which is no different than Python, Java, or any other language.
No offense, but between your conclusions being incorrect and your phrasing ("I imagine..."), it sounds like you're hypothesizing without much actual experience writing Lisp.
The second Emacs (after TECO) was written in Lisp. On a Lisp Machine. Stallman later went for an Emacs, GNU Emacs, written on top of Lisp VM implemented in C. That one then got support for 'inferior' Lisps, external Lisp processes run from GNU Emacs. Extensive modes were ILISP and ELI. Slime is kind of a reimplementation of ILISP.
Clozure CL goes back to Coral Lisp, an early Lisp for the Macintosh, written in the mid 80s. Coral Lisp, and the Coral Common Lisp, and then Macintosh Allegro Common Lisp and then Macintosh Common Lisp all were written mostly in Lisp and had an Emacs-like editor (FRED - FRED Resembles Emacs Deliberately) included plus a bunch of tools: backtrace, inspector, interface designer, Editor-based Listener with REPL, etc. The main difference to GNU Emacs: it was focused on Common Lisp programming, it was implemented all in Common Lisp, it all ran in one application (no external Lisp), much of the tools made use of the GUI toolkit from the mac (menus, dialogs, buttons, copy/paste, AppleEvents, ...). MCL then was dead end, because it was tied to the old Macintosh libraries. OpenMCL was a fork initially thought to run on the spaceship mentioned before (but it was actually LispWorks, which was used for the spaceship). It was stripped down and ported to Unix or something similar. OpenMCL, later renamed to Clozure CL, was brought to the new Mac OS and got a simple IDE, but not based on the MCL code, but using some of its IDEs.
So Clozure CL's IDE goes back to the old MCL IDE and to Hemlock (the Emacs-like editor from Spice Lisp / CMUCL). It's not based on remote/external execution, like Slime.
Clozure CL's IDE is very simple, offers not many tools, and those tools are not really powerful. For MCL there were much better IDE tools developed. But MCL is gone.
Seems most of them "win" by having more effective advocacy than they do more effective features.
As well as a tree view of the properties and methods of the handful of "god classes" within said projects.
But seriously, on the plus side, IntelliJ is actually fairly usable in that you can quickly toggle on and off the supplemental info panels and just use the "distraction free" editor panel, particularly with the vim (key map) plugin (don't know if there's an emacs plugin).
I think Steve Yegge had a comment in one of his rants that IDEs have better support for languages that require IDEs :-)
Pretty sure I have seen similar things written for class views. I had one that was interactive view of javap's output. I liked that one pretty well. (I'm partial to anything that is just an interactive version of an existing cmd line.)
Simplicity. In my IDE, I start it up and then program.
With emacs, it always felt like I spent a lot of time curating the editor. Part of that was because customizing emacs is fun--I have this big .emacs file that imports an even bigger .elisp file--but I also always seemed to be referring to some documentation because I'd forgotten that particular set of key-chords or messing with something to get it to work.
I've come to prefer simplicity. In fact, after years of using emacs, I switched to vim for the moments when I want to program on the command line. (I think my only customization in VIM is mapping jj to escape)
If you're used to hitting ctrl with your left pinky, which is necessary for us emacsers, then Ctrl+[ will be 100x better than hitting escape.
I don't know how useful this is in practice, and it's not representative of what IDEs for mainstream languages are doing, but it's pretty cool.
It makes for some awesome demos. But... so does https://www.youtube.com/watch?v=VEcobuYr5wg. I'm just not sure how practical this is.
Don't get me wrong. Sometimes, I do want to boot into IDEA for some of the refactor tools. If I truly used them enough, though, I would write one for myself in emacs.
I was not aware you have experience with both, I just tried to point out what most people use today. I did not intend to start yet another editor war, even clay tablets are fine with me :).
> If there are other CL's with ABCL's level of maturity on the JVM
My point is that the (virtual) machine does not matter at all. ABCL is just another CL and it should not be relevant except for when you are specifically looking into interfacing java libraries (for which one does not need a book, just a few paragraphs of docs).
> Beyond that, I imagine that many programming projects target specific implementations for various, pragmatic reasons.
Only to the point that you sometimes have to implement things for your current CL implementation (i.e. stuff not defined in the standard and for which no interop. libs exist - a pretty rare thing).
https://pbs.twimg.com/media/CouoF9DVUAUUhg1.jpg:large
On the Mac using native Cocoa:
The last two are game changers.
Yeah, no. We had Lisp Machines and Smalltalk environments in the 80s, why would we go back to something so crude in 2016?
There are a few remnants - the Java Browsing perspective [1] is basically the classic Smalltalk browser [2], which is still there in modern Smalltalk [3]. The only people i've ever seen using it are old Smalltalkers who have reluctantly come over to Java!
[1] http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse....
[2] http://www.abclinuxu.cz/images/clanky/krivanek/smalltalk-80-...
I also use it occasionally.
Then again, I used Smalltalk on an university project before Java was announced to the world. :)
Well, when it comes to editing Java, they're leaps and bounds above Emacs for the same task. If they offered the same flexibility and power for Lisp, Emacs/Slime would not even compare.
(And Eclipse is a descendant of a once-popular Smalltalk IDE).
Google could have leveraged Dart with Dartium and created a Smalltalk like environment, instead we got just yet another browser based OS.
I was an avid collector of Hugi.
Also was a bit disappointed to see Java and .NET follow the VM route when we had Oberon, Modula-3, Delphi, Ada ,Eiffel among many others.
At least their designers seem to finally willing to offer the same kind of toolchain, instead of having us rely on third parties for those features.
What do you mean?
Similarly Microsoft's efforts regarding MDIL cloud compiler, .NET Native and CoreRT.
> emacs & slime[1]
Here the Windows support (important if you want to target a larger audience) is really bad.
At least I tried out Emacs on Windows (from Cygwin) a few years ago.
Emacs has a perfectly good native Windows build available on its download page, and it works great and it supports Slime just fine.
I would like to actually use CL for something. Unfortunately, my feeling was that the infrastructure--especially for GUI's--wasn't there the way it is with lots of other languages and that was a real deal breaker. In this, I don't believe I'm alone.
Armed Bear Common Lisp already exists. The JVM with all its libraries exists. Common Lisp on the JVM seems like an easy win-win to me, but I would like to see somebody really proficient in CL explore that in depth first.
The best and most complete is Qtools (and CommonQt), which wrap Qt. IMO it makes Qt development easier in Lisp than it is in C++. Installation on Linux is super easy, just make sure the Qt libs and dev libraries are installed from your package manager, and then install with QuickLisp. On OSX it was tricky installing the Qt libs, but after that installing with QuickLisp just worked. I haven't tried on Windows, but supposedly it works for people. https://github.com/Shinmera/qtools
I've also used ltk a few times, and it's okay, but it's wrapping Tk, so ...
I think there are also interfaces for wxWidgets and Gtk, but I've always liked Qt, so I haven't looked very hard.
The greater variance between programmers than languages is very telling. It shows experience and competence trump language difference.
As for Android, Google Purchased Android Inc in 2005, and I'm pretty sure the decision to use Java came before Google's purchase.
They are always quite clear that it is Java + C or C++ for native methods, regardless of what developers might wish for.
And while I value Lisp (I started on Allegro Common Lisp on Sun OS), it's density is also its greatest problem for any significantly large codebases.
Ron could've partly controlled for this by posting the same query on comp.lang.java -- of course it's still very hard to say how much bias would remain.
There is also the Common Lisp code from AIMA second edition.
PAIP and AIMA for CL is the same as SICP and old classic HtDP for Scheme. After mastering these one might consider oneself a programmer.)