68 points · by llambda · 13y ago · 80 comments
- Rewrite most of Clojure in Clojure (which has been talked about since the beginning, really) to find the "small core". Thankfully ClojureScript has helped hasten the CiC movement.
- Base FFI and code gen on more abstractions so that Clojure living in a .net world or a C/C++ world or a Python world would feel just as cozy as Clojure living on the JVM. Rich Hickey talked about why he abandoned primary CLR support early on. He said he "didn't want to keep writing everything twice". This was probably the best strategy at first, but now one hopes that with ClojureScript + Clojure enough has been learned to discover more ways to factor out the commonalities so that Clojure is more easily retargetable.
- Speaking of targets: there should be a first class, fully supported Clojure frontend to LLVM. There are research projects and personal projects in this area, but that's about it. I'd like to see an official LLVM target.
- Introduce or surface more abstractions and macros such that the immutability and pure functional underpinnings could be extended, removed, or replaced. This is likely to be the most controversial change, but it would be essential to the possibility of Clojure running on small embedded systems and other environments where the choice of underlying data structures and concurrency algorithms can't come baked in. This is mostly done already (as most things in Clojure are built on top of abstractions), but it still needs a deep look.
- Open up the reader. A Lisp without full reader macros is unlikely to win over all potential converts, not because reader macros are this incredibly common thing, but because the personality of most Lisp hackers tends to thinking like "well I don't think I'll need a reader macro, but why would I want a language that won't even give me the option?"
While I agree that most of the other points are valid personal opinions, this one could safely be ignored. New Clojure users are largely converted from the enormous Java, Scala, Ruby, ... developer pool, and ignoring the projected wishes of (Common) Lisp programmers is a valid choice.
Whether that's even possible is another matter, but I agree that the LLVM memory management problem is an interesting one.
Another question is whether there should exist a "sys lisp" that can form the lisp core of higher level lisps but that itself is not a garbage collected lisp. I don't immediately see a way forward on that one, but it's an interesting thought.
You may be interested in Henry Baker has a paper where he shows a VM where the semantics prevent garbage from being created http://home.pipeline.com/~hbaker1/LinearLisp.html
In certain circumstances - for instance a web framework creating a heap for each request - this will make GC dramatically cheaper. Though of course your cache locality will be poor.
Which is important if Clojure gets ported to bare metal runtimes, as the parent was suggesting.
There isn't a problem with the CL community. There's a problem with the culture surrounding CL that seems to attract trolls.
Newbies get answers to genuine questions. I've received a great deal of help over the years from experience CL programmers. Anything from beginner questions to code reviews of various snippets I've been working on. I have received a lot of great advice over the years that has helped me tremendously. And I've seen other newcomers receive the same treatment as well. If you arrive in #lisp of c.l.l and have a genuine question about a problem you are stuck on you will likely attract someone willing to help you. It's a small community but it is friendly.
Second, CL was in the end designed to outlive itself. You get full programmatic access to the compiler and reader. It is trivial to add any feature a modern programmer may require that wasn't accounted for in the original specification. CLUEL could certainly have been useful if the author had finished it and put it out into the wild (maybe waiting until it was finished was the wrong choice).
I think if you are genuinely interested in learning CL you need to check your ego at the door, so to speak, and just start from scratch. Write programs that solve yours or your users' problems and ask questions in #lisp and on c.l.l if you get stuck. There is a wealth of great literature, papers, tools, and a small, friendly community to help you.
Edit: I meant to note that the reason the specification hasn't been updated, afaik, is because it doesn't have to be updated. All the tools you need to add the features you require are there in the spec. You can make it into the language you need.
That's a big part of the reason I haven't used CL for anything bigger than some toy projects.
It's a crusty, old language, and instead of keeping up with the times, everybody has to build the features they need. I can do that, or I can use language that has the features I need and that I don't have to assemble myself.
And to make it worse, it's hard to even use libraries that solve the problem, because nobody in the CL community can agree on anything. There's always a dozen incompatible solutions, and it's never clear which one should be used.
Welcome to software.
While your other sentiment seems logical, if you actually look at it as a lisp practitioner, you'll find the answers to the questions you have relatively easy. You don't have to "update" the language, for many things you can just use it like any other.
The problem isn't that lisp isn't updated, but that there aren't enough of us to build the lisp django, or at least there aren't enough of us who want the lisp django for it to happen, so thats why web development in lisp is limited to using raw hunchentoot or microframeworks like Restas and Caveman/Clack(which are both pretty awesome btw). Other than a few minor tweaks, lisp really doesn't need updating. More/better libraries would be sufficient!
Can you give a couple of specific examples where you think lisp is behind the times and you are "forced" to implement whatever. I can think of maybe a handful of such instances(there isn't a really great STM, but we do have other awesome concurrency options as just one example), but the list of lisp features I miss in python(my day job) is 1-2 dozens at least(and If I had macros and CLOS I could probably half that list in a week or two :)
In other words if you are crazy enough to use lisp for useful projects, the language will help you, maybe you haven't tried? Maybe you have and just had bad luck. Some domains(GUI programming for example) aren't as well supported for example. Others are pretty ok.
However unlike the C++ and ANSI C standards, the CL specification left room for programmers to extend the language as they need it. Instead of waiting for decades of expensive committee debates and meetings as you do with C/C++/ECMAScript/etc the programmers using the language in the field can go ahead and add the features they need and implementors can fill the gaps between new OSs and hardware. How is that bad?
And it's also bad because CL is ancient and it's filled with things that simply don't make sense any more, or have been replaced by "better" solutions in every other language. Look at filename and filepath handling to see what I mean. 2 or 3 of the fields haven't been used in real systems in 20 or 30 years, yet they're kept around because they're in the unchanging CL standard.
Lets take a look at a few patterns I've noticed:
* Newbie posts some snippet and asks for review, the snippet is C++ code written in CL, lisper tells him it sucks, newbie explains that he has a lot of C++ experience and this is how his brain works. Lispers(now plural) explain to him that lisp must be learned with a beginners mind and he must forget C++ temporarily in order to learn it properly. Newbie gets insulted for some reason and begins arguing.
* newbie asks question about "generic lisp", lispers explain that the question makes no sense, and give his an answer about common lisp. Newbie asks question again emphasizing that he isn't interested in Common Lisp but in lisp in general, lispers tell him to read the topic, #lisp is about Common Lisp. Newbie argues that #lisp should be about generic lisp, and #commonlisp or whatever should be about CL, argument goes nowhere of course.
* newbie asks question and posts snippet. The code is obviously written by somebody with exactly 1 hour of lisp experience(parens are mismatched and aligned wrong, indentation is horrible, not to mention the obvious hacks). lispers explain that lisp is best learned patiently and not through the "learn x in y minutes" way, and that he should read Practical Common Lisp. Newbie gets insulted he was told to RTFM instead of getting an actual answer to his "wrong" question(at least in the eyes of us lispers).
* newbie asks about scheme/emacs and refuses to accept that #lisp isn't about those languages, see pattern #2.
* newbie asks scheme vs CL vs clojure vs haskell vs python vs ... question. Gets surprised when lispers unapologetically proclaim CL the best language ever and everything else is shit. Lispers do not hide their bias. Newbie then begins to argue about his favorite language and why it is better than lisp. Sometimes it's clojure, sometimes its scheme, or it could be whatever.
* (my favorite, and probably most frequent) Newbie asks what is lisp good for, gets pissed off when we tell him we program computers with it :)
Many other such questions include:
Q: "why isn't lisp popular" A: You haven't converted enough people to it :) Q: "Why does lisp have so few libraries" A: You haven't written enough libraries yet :) Q: "Why isn't there a library for X" A: Nobody needed it, if you do, write it and push it to github :) Q: "Why doesn't library X do Y" A: patches welcome.
Notice a pattern :)
All of these cases or variations of them have happened many times since I started to frequent #lisp, often times the word "fags" or "cunts" get used, and not by lispers.
The problem in comp.lang.lisp is the number of trolls -- in other words, the universal problem on Usenet. People come in trying to prove that some other language is superior, or asking questions like "If Lisp is so great why is nobody using it?"
a homework problem is a problem you're charged with solving so as to reinforce elements and critical thinking from the chapter or segment of teaching that you experienced before the problem. Very few homework problems are given that cannot be solved by the user, if they paid attention to the work. There is a very thin line between someone trying to crowd-source their homework to a programming forum, and actually asking for help. This can usually be determined by how the question is asked.
Example: "How do I write this..?" is not as respectable a question as "I am writing this, i'm this far and I ran into this problem, can anyone help me to understand my problem?"
a newbie problem is a problem generated through normal use of a language to achieve a goal, in which the language user ( the newbie ) lacks the personal experience to conquer some goal post standing between him and his reason for writing what he/she's writing.
Example : "I'm coming from such and such a language where we can do this... ... will this ... work the same in CL?" or "This piece of code behaves in this way ... can anyone help me work through as to why it does this?"
The problem (that people have) with the lisp community is that they tend to be highly sensitive in regards to hand-holding, and can usually sniff out homework problems with relative ease.
1) the implication if you have read your holy book and still believe then you are a poor thinker.
2) if we were in the Middle Ages, the story might be more relevant. I do believe most believers of any religion in the modern era have probably read their own holy book.
That said, even as a non-Christian I was also uncomfortable with that as an introduction. I'm sure many Lispers are of the opinion that almost 100% of their peers are atheists or other "nones", but that's (I suspect) more a function of geography than language choice.
It's unwise to turn off what could be a significant portion of your readers in the first paragraph!
There's also the minor detail that if you're a Christian the really canon stuff is in the New Testament, a lot if not most of the problematic stuff is in the Old Testament and not longer strictly applies (surely most of us remember "Let he who is without sin cast the first stone"???), so I suspect the whole premise is false.
I just found it very tone deaf to open with that kind of story when it basically has the same effect as what he is complaining about. Its just odd.
1) Although if you happen to hit a disaster, reviewing a bit of the health guidelines in Leviticus couldn't hurt. It will also probably help if you remember a lot of it is basic how-not-to-die health guidelines.
2) I came from the Catholic and 7th Day Adv family (yeah, not exactly the most agreeable to mix), and both seem to have gone through the whole thing. Plus, they have a bit of disagreement as to what constitutes the whole thing. Luther did a bit of pruning.
Maybe its a Baptist thing, but Catholics and 7th Day Adv defiantly have gone through the whole thing as part of their studies. Nuns do get a little mad when you giggle about certain sections much like and English teacher with some scenes in Shakespeare.
Depends on how often they go to church. If they attend regularly for a few years, then the preacher will likely have gone over 80% of the Bible in Sunday morning sermons.
And most Baptist churches have some kind of weekly Bible study where you go more in depth.
Plus, most Baptist churches I've been to will start some kind of "read the Bible in a year" thing in January--complete with handouts for how much you need to read each day.
Thinking about community effects, I'm not as convinced a community represents a gating factor for hackers. I attend the occasional Clojure meetup (and Clojure/Conj for that matter). The meetups in my area are well-attended and run, although they could be improved with a better introduction and ice-breaker for more introverted attendees (yes, I've just outed my personality type).
But from an opportunity mindset, the Clojure community seems to have done an admirable job getting the message out. Multiple good books, the Clojure/conj, and a well-attended meetup in my area all make me feel like I may not only stretch myself and learn new programming techniques, but that I have some hope of advocating for Clojure in my workplace or, good grief, applying for an actual day job where I would use Clojure.
It's unclear to me that Common Lisp can offer that.
My only recommendations are quite generic - for smaller meetups, make sure a group introduction is on the agenda and actually happens. Might be nice if there were easy ways to become more active in the group, but this is hard for the meetup/talk format.
I'm definitely not being critical though - I feel lucky enough to have a Clojure meetup happen in my general area. Mostly it falls back on me, as an interested-in-the-community hacker to find a way actually be social and integrate myself into that group.
though "tell us your name, where you're from and one nice thing that happened to you this week" is a non-demanding one
Let's address his complaints in two basic areas:
1. Community.
The Lisp community as typified by #lisp and comp.lang.lisp can be remarkably acerbic to the point of toxic, depending on who feels like contributing at the time. Part of this are the annoying trolls that show up; one's patience wears thin. A FAQ document might go a ways. However, there are a large number of people who don't ream newbies out and really are helpful. lispm here on HN is one of the friendliest Lispers out there and actually has helped me out tons.
Addendum: r/lisp on Reddit is good for generalish Lisp questions. StackOverflow's common lisp tag almost always gets an answer to most any reasonable question. sbcl-devel mailing list is useful if you want to take the time to posit in-depth technical questions to the SBCL developers. Lispforum, oddly enough, I haven't used much. I simply don't go there much. I should, I suppose. :)
2. Technical. I can do no better than quote my /r/lisp post on this (r/lisp is really good for lisp help).
---
First of all, consistency. A variety of things are peculiar in how they are named. TERPRI? Really?
Second, Common Lisp is a (the?) programmable programming language. CLUEL-esque platforms could be used to drive CDR adoption and cleanups of the original language.
My primary gripes with CL are the lack of CDR-2, lack of CDR-8, the lack of hierarchical namespaces, the funky naming conventions & expectations[1], and the lack of deeper CLOS integration[2].
[1] ELT vs AREF vs NTH, for instance. Or, LOOP for lists vs arrays vs (your data structure here).
[2] See CDR-8.
Also, it runs basically anywhere. One could embed it inside an iPhone app, for instance.
There are some big things missing still. There is no standard database access library, or an equivalent to Python's WSGI (or Ruby's Rack). Or MongoDB drivers (that's my fault, I promised the community one a couple of months ago).
There's also some missing tooling. Better debugging support, for instance. That's mostly avoided by the use of unit tests and the REPL, but is occasionally required. Or profilers. Or code coverage tools. Due to the fact that everything is compiled to C, there are some tools that may be used, but it is still not ideal.
Would have to look at it's condition system, it's been way too long.
I never used the condition system extensively (or CL) but my recollection is that when you raise the condition you can also furnish various recovery strategies to be selected by the handler. If the caller doesn't handle, it will travel up the stack to someone who does, but that entity is not limited to innovating its own handling strategy, it can also choose one of the provided ones without breaking the abstraction or involving intermediate callers. The toplevel handler shows the provided restarts, adds the retry/fail options and lets the user interactively select one. It's pretty sophisticated.
This is in part philosophical, the "prefer 10 data types and 90 functions that operate on them, often all of them" sort of thing, in part my horror at smearing behavior and data all over the place, and pragmatically, how that's much more of an imperative than functional approach. And functional is where its at for what I want to do. And experience in using OOSE to develop a greenfields system. That was utterly cool and amazing, but ... see my last sentence below.
Which is not to say that the next time I do a GUI I'm not going to use OO to model the widgets et. al. on the screen. I believe it has its place, but that it's used much more widely than makes sense.
On the other hand, the mailing list did get a lot of posts that kind of remind me of this: "Hi, I just started using Plan 9, where's emacs? Anyway I have a lot of great ideas on how to fix this OS so you should all start doing these things... I'll set up the wiki and write the newbie guide"
On the other hand, the mailing list did get a lot of posts that kind of remind me of this: "Hi, I just started using Plan 9, where's emacs? Anyway I have a lot of great ideas on how to fix this OS so you should all start doing these things... I'll set up the wiki and write the newbie guide"
and this:
Dare to criticize something and they'll leap down your throat.
are related?
I doubt that, based on my observation of a strong correlation between intense academic study of the Bible and fortitude of Christian faith.
Maybe LISP doesn't need saved? Maybe it's okay that a language isn't popular? Maybe It's okay that a language isn't hip? Maybe it's okay if a language doesn't have the latest gee wiz social status? The fact that people keep trying to save LISP every 4 or 5 years could mean it's perfectly fine how it is. I don't see people trying to save the COBOL, or FORTRAN, or <insert favorite esoteric language here> community.
Common Lisp has had 3 decades to get its act together and is an abject failure in my view, plus it's got a half century of accumulated backwards compatibility accreted messiness.
Clojure is not a LISP, as in LISt Processing is not its alpha and omega. For now I won't go into details on I think it's being so successful, expect to point out that its architect has exquisite taste and savvy pragmatism, has made some great innovations in e.g. making maps and vectors syntactically first class citizens, and of course if you like serious functional programming and/or multi-core SMP/ccNUMA programming is has a great story. And most of all it's developed an ecosystem that has left Common Lisp and Scheme in the dust.
BTW, I don't think anyone needs to "save" COBOL, it's still used a lot, and as I understand it FORTRAN is still going strong in its niche, with regular new standard. Either are very far from being esoteric languages, although COBOL action is mostly hidden in the IT departments of organizations that write and maintain their custom systems.
I work a lot with clojure, and it reminds me a lot of when I was forced a hack ruby. There is this guy, or even a group of people, who get caught up in the glamourous idea of reinventing programming. They then jerk their favourite features and design artifacts into a language. The main point of the design seems to be being able to express the thing in fancy words.
Some people love that stuff, they think its beauty and good design because it's somewhat consistent (usually not after the second glance).
I think good design is whats works, and what has evolved due to the needs of practicioners. And that is the beauty of CL, it's shaped by evolution and consensus, not by some vison.
Edit: Also, ever taken into account, that CL is maybe simply good enough? Every possble feature can be included by libraries. There is no need for an updated CL, what we need is more standards like bordeaux-threads, usocket, closer-mop...
Underneath the hood I think there's no comparison, then again it addresses exactly the sort of things I'm interested in. Common Lisp just can't win there due to it being the current version of mainline LISP going back to, well, I supposed the punched card days when it was implemented as FORTRAN subroutines. Yeah, car and cdr are neat, and even useful in combination, but ... well, no where can you assume TCO.
(Have to run, more later.)
But you bring up a good point. Those languages are still around because of the niche they fill. It's okay for LISP to be around only because it fills a niche, too.
It's spelled Fortran since the 1992 standard, which was a huge improvement, and now since the 2003 and 2008 standards, Fortran is a pretty decent language.
But a funny thought occurred to me: year 1992 is now 21 years ago, but ignorance of the difference between FORTRAN 77 and modern Fortran continues strong. In next 5 year or so we'll start to get Fortran-ignorant comments from people who are younger than the "Fortran 90" standard from 1992.
The language was updated before they were born, but they haven't yet noticed it.
It was an interesting exercise in college when I took a class on numerical methods and some programs where in "old" style while other were in "new" style. It made the non-programmers go bonkers.
These days I focus more on writing useful code and making end users happy and I've found that to be much more satisfying than wringing my hands over the inelegance of everyday languages.