Skip to content
0:00 / 0:00

#shen#prolog#macros

"Shen: A Sufficiently Advanced Lisp" by Aditya Siram

Strange Loop Conference

88K subscribers • 107 videos on Hallway • Conference channel

YouTube
  • Recommended by 4 people: 2 on Hacker News, 1 on Lobsters and 1 in engineering communities.
  • A classic. People kept recommending it from 2015 to 2023.
  • Presented by Aditya Siram

Intermediate. Assumes working knowledge.

26K views12 years ago4 recommendations

Programming languagesLisp and ClojureFunctional programming

Aditya Siram introduces Shen, a hosted Lisp featuring a macro system, a built-in Prolog, and an optional static type system.

Shen is an hosted Lisp that comes with a full-featured macro system, a Prolog, an optional type system more powerful than Haskell's, and does it all in under 5000 lines of code. It has been ported to many platforms including Java, JavaScript and Ruby. In the true Lisp spirit it gives complete freedom to the programmer. And this talk will introduce the language by demoing a complete web-application written in Shen that transitions effortlessly between functional, logic, and imperative styles, seamlessly intermixing macros, statically verified and dynamic code. by Aditya Siram (@deech) I am currently a web developer at Intoximeters, Inc. in St. Louis, Missouri. I do Ruby and JavaScript by day and Haskell and C by candlelight.

Why it's here

4 people recommend this

What people say. Recommended for its demonstration of Shen's powerful features, including turning JSON into a type using macros and metaprogramming.

u/theindigamerin r/ProgrammingLanguages • Recommends

"Shen: A Sufficiently Advanced Lisp" by Aditya Siram

eggyon Hacker News • Recommends

On “Stanza: A New Optionally-Typed General Purpose Language from UC Berkeley”

Stanza looks very interesting. I'll have to check it out. Thanks! Shen allows you to turn the type checker on or off: (tc +) (tc -) You can leave your type signatures in the code when you turn them off, and when tc is on you only need a type in the top level of your function. It has a fully functional Prolog engine built in, and it supports optional lazy evaluation too. Great talk by Aditya Siram Sept 2014 Strange Loop talk introducing Shen 2. Shen has been ported to many languages, since it only requires porting the 46 primitive instruction set, called Klambda. Shen has been ported to CL (SBCL), Ruby, JavaScript, Haskell and even Emacs Lisp. 1 link 2 link to this video

eggyon Hacker News • Recommends

On “The Power of Prolog”

I love Shen, but I have not taken it on. I subscribed to the professional version for half a year, and I like the amount of implementations of Shen in other PLs. The pattern matching, optional type checking, and the built-in Prolog is incredible. It's a case where the creator has been shunned by the wider community, partially due to his diplomacy, but he is brilliant, and the uptake has been niche and bleeding edge. If it had a Mozilla behind it or other, I think it would have been more universally appealing. @deech's talks, though older now, are fantastic and relevant1,2. But take what I have to say with a grain a salt: I am an avid APL/J/BQN fanboy ;) 1 link to this video 2 link

bsimaon Lobsters • Recommends

Shen: A Sufficiently Advanced Lisp (2014)

delishon Hacker News • Recommends

On “Shen-js Browser REPL”

Looking for a feel for Shen? A Strange Loop talk by @deech (40minutes): Shen: A Sufficiently Advanced Lisp. link to this video An essay: link It's insightful and readable and it links to several articles new Shen users would be interested in0. It was written before Shen, so it talks about Shen's predecessor, Qi. This article and the Bipolar Lisp Programmer by Mark Tarver (creator of Shen) made me feel not so weird for not "getting" UNIX, and helped me get excited about lisp. I'm looking to use Shen or another highly cross-platform functional language for my next project. Application logic in Shen with type-checking. web code using some framework. 0 Wow I'm re-skimming it now: it has Stanislav, Ja…

eggyon Hacker News • Recommends

On “Show HN: Eslisp – Minimal JavaScript S-expression syntax and macro system”

I am learning Shen 1, and this talk 2 shows how you can write Shen on JavaScript, Ruby, front an backend. Shen is a lisp with pattern matching, optional lazy evaluation, optional static type checking, macros of course, and many other cool treats! It can run on top of CL (SBCL), Clojure, JavaScript, Python, and more. 1 link 2 link to this video

eggyon Hacker News • Recommends

On “Why Janet?”

…systems (Windows, Linux, OS/X), is extensively documented in a book has nearly a decade of use. Aditya Siram made two very good videos on Shen. You can program your front and backend in Shen given Shen is implemented in JavaScript and other PLs. I know somebody did a port to C, but I am not sure if you can then make an exe as described for Janet. link to this video link You implement Kλ in your PL of choice if it is not already available, and voila, you can program in Shen! 1 link…

u/puzzle-gamein r/ProgrammingLanguages • Mentions

In what way(s) is the type system for Shen-lang "more advanced" than Haskell? I'm looking at this language Shen * http://shenlanguage.org/ and one of the quotes they reference on the homepage has me curious >"Shen ... has a logic-based type system with capabilities beyond even Haskell." - Quora I know this could just be a random person on Quora who doesn't even know what they're talking about, but I'm coming from Haskell and really love langs with static type systems so this low key has be salivating if true. In fact, they reiterate this comparison in the one video I can find about the lang, in the description >Shen is an hosted Lisp that comes with a full-featured macro system, a P…

u/theindigamerin r/ProgrammingLanguages • Mentions

On “The Language Design Meta-Problem”

In some respects, Shen is a realization of this concept. You can put your own type system on top relatively easily (e.g. 13:02 in link to this video and it compiles to a small combinator calculus, making it quite easy to port to new platforms (the earlier part of the talk expands on this).

deechon Hacker News • Mentions

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

The second half of the talk ( link to this video ) is about turning a JSON object into a type using macros and meta-programming.

leanthonyrnon Hacker News • Mentions

On “Switching from Common Lisp to Julia (2017)”

I was thinking about this the other day. How can I expose my Common Lisp code to Julia. 1. You could take the Clasp path by exposing CL to C++. link This means taking / writing a CL in Julia. 2. Julia has an AST representation written in femtolisp. So it would be in interesting target for CL or some glue middle language like Shen. link link to this video

bsimaon Hacker News • Mentions

On “The Bipolar Lisp Programmer”

I love Shen and highly recommend the Book of Shen and Tarver's other book on Logic and Computation. The crazy thing about Shen is that its type system is sequent calculus, which means when you define your types, you are literally writing the same language that mathematicians use when they prove things about type theories. Why would you use it? Because you can leverage a crazy amount of power by writing your own type theories in your programs. Is it practical in today's corporate world? Probably not, but there is at least one case study in the real world link to this video

cylinder714on Hacker News • Mentions

On “Crunch – a Scheme compiler with a minimal runtime”

I'm not super familiar with the details but I've heard that Shen has a really good type system. Aditya Siram addresses types at 12:00 in this video: link to this video Shen homepage: link