Shen: A Sufficiently Advanced Lisp [video] (2014)

11 years ago (youtube.com)

Also interesting and worthy of note is that this project transitioned to BSD recently, and they are doing it as part of a donation drive.

http://www.shenlanguage.org/shenbsd.htm

I am an amateur Lisper, and like others I whined (perhaps irrationally) that their custom non-OSI only one implementation of the language or else license was scaring people off. Not that the BSD license assuages my concerns about community weirdness (hard to describe, but this ia a very personal opinion and you can dismiss it), but I would like to see if the demand will drive open sourcing the code.

Also very cool is that you can find Shen implementations in more than one flavor: Common Lisp, Clojure, Ruby, and more. Definitely check out the site if you have not yet.

  • That was a really weird "episode" in the history of Shen, IMO. I mean, the outcome was good and all, but it was really weird to ask for donations to change the license. I don't think there was any real explanation for that other that "we want money"?

    • I believe it came from a discussion where to draft a new license would require the original developer to pay a lawyer. Someone suggested raising money to pay the developer the money to transition to BSD, a known license, instead of to a lawyer for yet another unknown license.

      1 reply →

It's pretty strange to see a "Lisp" with so much syntax. Lots of infix notation, and even semicolons! Usually Lisps have a very simple reader that reads S-expression and a few other things, but here we have this:

  (define map
    { (A --> B) --> (list A) --> (list B) }
    F [] -> []
    F [ X | XS ] -> [(F X) | (map F XS)])

And this is one of the cases without any semicolons.

Shen also uses the atrocious "curried form" of function types, where the function that adds two numbers has type number->number->number, and the reader must do the mental gymnastics to convert it to (number,number)->number (and good luck when it's more complicated than that).

I wonder if you took a language like Haskell and changed some of the syntax to look Lispy if it could masquerade as a Lisp? I'm not saying that's what's happening, it's just hard to wrap my head around a syntax like this that claims to be Lispy.

Put this in my "watch later" queue. I'm very interested in a Lisp whose type system is on par with that of Haskell/Ocaml.

EDIT: Especially since Shen is now BSD licensed.

  • To me, it seems impossible to have both macros and a type system on par with Haskell. Either your macros can no longer do arbitrary textural transformations, or your type system can't reason about macro cases. (Or, I suppose, your type system has to run after the macro transformations, and you could get a type error then just like you could get a syntax error then. But that means your IDE/development environment can't give you any type assistance on macro calls - you have to compile it to find out if it works. (Or, I suppose, your IDE has to run the macro for you and then do the type checking on the resulting post-macro code.))

    I am open to being proven wrong, though...

  • Now, I understand that is BSD licensed, but I am bothered by their proud "we support OSI, but never GPL" attitude. I wonder what happened to the original developer, but does anyone know why he has GPL issues? Yes, I know he is not unique in the industry at large, but I rarely see project download pages with GPL with a red line through it.

    http://www.shenlanguage.org/download_form.html

Once again, types are way overrated. However, Shen is an interesting new Lisp to watch. Needs a more open community, though (like a free book and/or deep documentation).

  • > Once again, types are way overrated.

    Care to expand on this? I'm curious, what is your opinion and preferred platform/languages?

    • I'm not the parent, but in noncritical applications an accommodating compiler/interpreter will speed up development. Few advocate such an attitude for critical applications, but whether all compile-time checking should be done in terms of types or not is an open question.

      4 replies →

  • > types are way overrated.

    Please show your scientifically rigiorous evidence. Because it appears very few other people have any (either way), so at the very least you could earn a prize if you shared yours! :)

    • > Because it appears very few other people have any (either way)

      If there is no evidence either way, yet every other developer raves about types all the time (the way "connaisseurs" rave about fine wine and expensive scotch despite being unable to objectively tell the difference), doesn't it follow that types are overrated?

      2 replies →

  • The community is bizarre, I will not lie, but the original developer did release a book quite recently using Shen, although Shen might not be the focus.

    http://www.shenlanguage.org/LPC/lpc.html

    • There are two books you can buy ; the latter one uses Shen; the first one (The Book of Shen) teaches you Shen. If you know Lisp & Prolog, it should not be hard to pick it up from examples and the source code. The book is worth it, I just wish there was a digital version; I think it would sell a lot more.

      1 reply →

  • > Once again, types are way overrated.

    You just had to state that, even though it has nothing to do with the rest of your comment? Oh right, I guess that's how flame igniting driveby-comments tend to work - "Once again, startup incubators are way overrated. This forum looks cool. OK, see ya!"

Unfortunately I found shen a pain to get into due to it still being mostly a teaching tool. However, if the community builds some nice tooling around it I will definitely give it another look.