Hacker News new | past | comments | ask | show | jobs | submit login

What's the most popular Lisp in use today? Does it come with a static compile type checking?



Racket is the best Lisp to learn for a few reasons:

1. It was designed to be a teaching language

2. Everything included. You get a great simple IDE and a ton of packages

3. Great teaching materials (I learned the most from HTDP than any other programming book and I have read a ton)

a) How to Design Programs http://www.ccs.neu.edu/home/matthias/HtDP2e/

b) http://realmofracket.com/ . Great book I learned a ton and especially when I went through the book with my 11 year old daughter

4. The great minds of Lisp are at Racket (Ever read Little Schemer?)

5. Racket keeps getting better and better with great modern ideas. It might have been born from Academia it has awesome real world legs. Just look how easy it is to deploy your program after you are done.

6. Best documentation system of any language. The documentation is code and it makes for great documents. http://docs.racket-lang.org/


Racket isn't near as fast as SBCL though. However, now that Chez Scheme is open source, Racket is in the process of leveraging that run time. Also I don't know, but would guess deployment is easier with SBCL as it can build a standalone executable (albeit it is very large due to saving the running image).


10-20 MB isn't large these days, especially when every iPhone app update is on the order of 60-200 MB.


I guess it's all based on perspective. Comparing to C, D, Nim...etc, it's huge. However, the mathematical model my company exports alone is 10-22 MB alone in just text or binary form (no code), so yeeeaaa I see what you're saying :)


One of the most popular Common Lisps is Steel Bank Common Lisp (SBCL) [0], which has some degree of compile time type checking and compile time type inference.

[0] http://www.sbcl.org/


>What's the most popular Lisp in use today?

At least if based in 2016 GitHub popularity:

http://sogrady-media.redmonk.com/sogrady/files/2016/07/lang....

#1 Emacs Lisp

#2 Common Lisp

#3 Scheme

#4 Racket

Unless you consider Clojure a Lisp (yes it is, and no, it isn't...), in which case #1 would be Clojure, and then the others listed above.


Why would clojure not be considered a lisp? (I'm curious)


See this subthread and answers by LispM:

https://news.ycombinator.com/item?id=10207616


There's a website article called "Clojure Sucks" that is written by a Common Lisp user who uses a symbolics lisp machine and has some interesting insight although it is very aggressive.


You can mostly combine 3 & 4 on that list. Racket (formerly PLT Scheme) has moved beyond Scheme in many ways (language features, batteries), but is still exceptionally similar.


Rather than most popular, I propose using the most useful.

That'd be Lumen.

http://github.com/sctb/lumen

It's the only lisp that can interface seamlessly with any JS library you want. Just `npm i leftpad && LUMEN_HOST=node lumen` and type `(require 'leftpad)`.

  $ npm i leftpad
  $ LUMEN_HOST=node lumen
  > (require 'leftpad)
  function
  > ((require 'leftpad) "foo" 5) 
  "00foo"
Other lisps are nice, but they all try to build their own ecosystems instead of use existing infrastructure. So if you want to do webdev and run into a problem with the library, your only option is to fix it yourself or write your own, since most people don't use lisp for webdev.

That brings us to Clojure: the prima facie "lisp for webdev". It's a good lisp, but it forces you into non-optional immutability. That's a feature for some and a burden for others. And it's very difficult to transpile into JS. In an era where size and speed matter due to bandwidth concerns, this is a severe limitation.

That said, all of the lisps are a delight to use in their own way. Racket is fun to wrestle with, mostly to coerce it into doing what you want. SBCL is neat for doing archeology in -- you can run all kinds of interesting old programs. Elisp is fun because you can extend your editor to do anything you can imagine. Arc powers the website you're reading this on, and its underlying ideas are worth internalizing.


> And it's very difficult to transpile into JS

How so? The Clojurescript compiler works great and has a massive variety of libraries available, and optimizes well thanks to the closure compiler


This is wonderful. Thank you for sharing! I've been putting off a JS coding project for some interview, which I now think I'll write in Lumen. Another pleasant surprise: it was written by the HN moderators.

Have you used this in any substantial projects?


Immutability is optional in Clojure, though it is the default. Also I'm confused what you mean with size and speed mattering, ClojureScript does better then most by going through the Google Closure compiler for minification and dead code elimination.


Lumen seems interesting, but at a quick glance the GitHub repo has zero information as to how to install it and getting it to run. Is it an npm package/lua rock as well?

(edit: it's all in the repo.)

Follow-up: I don't see much in the way of interop documentation... Pointers?


The cool thing is, there's no interop. It's literally JS or Lua. Think of it like CoffeeScript -- there's no "interop" between CoffeeScript and JS. It's just JS.

You can see what each expression compiles to by passing it through (print (compile (expand ...)))

For example:

  > ((require 'leftpad) "foo" 5) 
  "00foo"
  > (print (compile (expand '((require 'leftpad) "foo" 5))))
  require("leftpad")("foo", 5)
And of course, you can use macros to shorten this

  > (define-macro see (x)
      `(print (compile (expand ',x))))
  (macro: function)
  > (fn (x) (+ x 1))
  function
  > (see (fn (x) (+ x 1)))
  function (x) {
    return x + 1;
  }
The best way to learn it is to read test.l and mess around with the expressions while running `make test` to see what breaks.

If you have questions, be sure to reach out or post them here. The maintainer is also quite responsive to opening new issues.


Also, you can compile a Lumen file to JS/Lua by running `lumen -c file.l -o file.js`. More info at `lumen --help`.


By interop I mean how to interact with existing functions (fine, most of the above covers that) and syntax for accessing data structures (arrays, tables, etc.).


If you are interested in getting into lisp, I would recommend you start with Racket.

Racket has several different languages (the main one called racket) that are all trivially interoperable.

If you want static types, there is typed racket.


Depends if you mean free or commercial.

For the free ones, there are already plenty of answers.

For the commercial ones, that would be Allegro Common Lisp and LispWorks, both having a complete "Lisp Machine" like experience, given that they are around for a few decades.


Another vote for Common Lisp here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: