Have you moved to Lisp to ESCAPE another language?

Whatever is on your mind, whether Lisp related or not.
Post Reply
Compositor
Posts: 3
Joined: Mon Aug 26, 2019 6:11 pm

Have you moved to Lisp to ESCAPE another language?

Post by Compositor » Mon Aug 26, 2019 7:40 pm

First post, so I guess I should introduce myself. I'm a front-end developer whose primary focus has been in the marketing world. A significant amount of my experience has been focused on SEO, site speed optimization, information architecture, and generally optimizing websites. Naturally, that means a lot of focus on HTML, CSS, and to a lesser degree JS. I also have a fair amount of PHP and Python experience. I have copy pasta-level experience with Scala for doing some data analysis at scale, and don't really care to ever go back to that language.

More recently, in the past year and a half, I've become interested in the Lisp family of languages. This might sound funny, or totally logical. JavaScript has been the driving force behind me looking for an "escape hatch", and hoping to eventually discover that One True Programming Languageâ„¢. ;) The JS world has become so volatile, I've really come to dread every line of it I write. Furthermore, the mental drain of dealing with, sometimes, complex syntax usage and operator precedence has led me to think heavily about those problems. That's how I discovered Lisp.

I first found Lisp through Racket, which I confess I've only used trivially. At the time, I had been thinking heavily about wanting to focus on HTML, CSS, and JS as compile targets, as opposed to writing them manually. The way I discovered Racket was through a static site generator called Pollen. It certainly opened my eyes to some ideas I hadn't really considered before, though I have yet to put a small site in production with it.

Next has been Clojure. I still haven't accomplished anything noteworthy with it yet, however I do see a potential future path towards using some degree of Clojure at work since we are largely a Java shop. One of the things that really drew me to Clojure was ClojureScript, the fact it uses the Google Closure compiler, and the possibility of interop with React.

More recently, I've also been taking a look at and am intrigued by Common Lisp.

I'm curious who else has any similar story of moving to a Lisp dialect in an effort to maintain their sanity? ;) If you've had such an experience, what was the driving force behind it and the major problem you hoped to escape or solve?

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: Have you moved to Lisp to ESCAPE another language?

Post by findinglisp » Fri Aug 30, 2019 1:53 pm

I think almost every Lisper has a similar story. I started programming 40 years ago in BASIC, spend a lot of time with C and later C++, spent time with Java, dabbled with Ruby and Python, and found Common Lisp shortly after Paul Graham started writing about it. In truth, I had used Common Lisp back in the 1980s in a college AI class and dabbled a bit with Scheme to handle some electrical engineering calculations for my first post-college job, but neither of those resulted in the "aha!" moment. I finally found that in about 2003 or so. Once you "get it," you'll always be disappointed with other languages. Today, I program almost exclusively in Clojure.

I'd encourage you to spend some time with both Racket and Common Lisp. They both have lots of interesting ideas that could still have a huge impact going forward. Notably, the CL conditions system and meta-object protocol (MOP) for CLOS are still great pieces of engineering.

That said, I think Clojure is leaving them in the dust in terms of innovation and momentum. Watch all of Rich Hickey's videos on YouTube and it'll finally start to sink in. Originally, when I was programming in Common Lisp and Clojure had just come out, I didn't get it. It seemed like yet another Lisp on the JVM, and there were already versions of CL and Scheme that ran on the JVM. That wasn't, in fact, the big Clojure feature. The big feature was immutable persistent data structures. Those have changed the way I program and until you've programmed a multi-threaded system with and without immutable persistent data structures, you just won't get it. Once you do, you'll never go back. In general, I find everything that Rich has designed to be well thought-out. You might disagree with his final decision, but it's always well-reasoned and he spends a lot of time thinking everything through before he writes code.

So, in short, welcome to the Lisp club!
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

Compositor
Posts: 3
Joined: Mon Aug 26, 2019 6:11 pm

Re: Have you moved to Lisp to ESCAPE another language?

Post by Compositor » Tue Sep 03, 2019 10:26 pm

Thanks for the warm welcome, and the background info!

I think I've discovered I'm a PL geek. :D As I come across interesting concepts in different languages, I feel the urge to learn more languages, if only for the fun of it. If it's any indicator, I have hello-worlded in Haskell. ;) I'm not quite ready for it, but one day... I also discovered Forth in the past ~1 year, and it's definitely gone on the list of languages to learn.

Absolutely, I'm going to invest more time in Racket and Common Lisp. They each have some interesting features I'd like to experience further. I quite like the focus I'm seeing that Racket has in fostering DSL creation.

I definitely see myself investing heavily in Clojure over the long term. If there's one thing I see a lot of in the front-end world, it's that there's a lot to be said of momentum and speed/ease of adoption with a language, library, or framework. Clojure certainly seems to shine in these areas more-so than other Lisps, at least from my layman's perspective.

The biggest draw for me is Clojure + ClojureScript. Also, from an architectural standpoint, the fact that CLJS uses the Google Closure compiler is a highly attractive proposition. That would seem to be a giant leap closer towards the ability to program in one language for both front-end and back-end, while being able to compile JS down to highly performant ES5, or even ES3 if I really need maximum browser compatibility for a particular use case.

There's React JS interop/compile target as well. As far as modern front-end frameworks, I do like React compared to some other options (Angular, ugh). Though, I'm pessimistic about the degree of traditional back-end effort that's being shifted to the front-end. Recreating core back-end features in the front-end, such as routing, seems a bit like self-inflicted pain.

I've already become a Rich Hickey junky. I've watched nearly all of his videos at this point. I really enjoy the philosophical/psychological knowledge he brings to most subjects he discusses. I'm also reading/watching anything I can find from Peter Seibel, Paul Graham, Eric Raymond, etc.

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: Have you moved to Lisp to ESCAPE another language?

Post by findinglisp » Sat Sep 07, 2019 11:38 am

Compositor wrote:
Tue Sep 03, 2019 10:26 pm
Thanks for the warm welcome, and the background info!

I think I've discovered I'm a PL geek. :D As I come across interesting concepts in different languages, I feel the urge to learn more languages, if only for the fun of it. If it's any indicator, I have hello-worlded in Haskell. ;) I'm not quite ready for it, but one day... I also discovered Forth in the past ~1 year, and it's definitely gone on the list of languages to learn.

Absolutely, I'm going to invest more time in Racket and Common Lisp. They each have some interesting features I'd like to experience further. I quite like the focus I'm seeing that Racket has in fostering DSL creation.

I definitely see myself investing heavily in Clojure over the long term. If there's one thing I see a lot of in the front-end world, it's that there's a lot to be said of momentum and speed/ease of adoption with a language, library, or framework. Clojure certainly seems to shine in these areas more-so than other Lisps, at least from my layman's perspective.

...

I've already become a Rich Hickey junky. I've watched nearly all of his videos at this point. I really enjoy the philosophical/psychological knowledge he brings to most subjects he discusses. I'm also reading/watching anything I can find from Peter Seibel, Paul Graham, Eric Raymond, etc.
I'm a bit of a PL geek as well. Further, I'm a bit of a PL history geek. I've found that there are an awful lot of awesome ideas that have been invented and forgotten already (e.g., the CL conditions system). So, yea, learn things like Forth. It'll do you good, even if you don't program in it regularly. Ditto things like Smalltalk. BTW, Forth is sort of an interesting dual to Lisp: minimal abstract machine that executes concatenated words. The biggest issue I've always had with Forth is the extreme amount of fixed memory management that goes on. You have to juggle a lot of stuff in your head with Forth that you don't with Lisp, but Forth is pretty cool for some application spaces (e.g., embedded).

The original John McCarthy paper on Lisp was a real eye-opener for me. Once you see a Lisp interpreter, written in Lisp, in less than a page of code, you start to understand Alan Kay's quote about Lisp being "Maxwell's equations of software." Lisp is computation stripped down to its fundamental core. Everything else is just trappings, a library for Lisp, essentially. Every other programming language could be just another interpreter/compiler written on top of Lisp. I actually have a coffee cup with the abstract Lisp interpreter from McCarthy's paper on one side and a picture of John on the other side. (Fun fact: I met John McCarthy briefly at a Lisp conference at Stanford several years ago (ILC 2005).) In short, there's something extremely fundamental about Lisp, which is why it has never died as a language, in spite of being "on the outs" for a long time. Lisp and computation itself are fundamentally linked. Maybe that's because it's one of the simplest expressions of the lambda calculus that we can create.

In terms of the differences between Lisps, there aren't many fundamental ones. Things like proper tail recursion and lexical scoping come to mind, but beyond that, they all capture the essence of McCarthy's original. The rest, again, is just libraries/interpreters on top. Even Clojure could be easily written as an interpreter on top of anything from McCarthy's original interpreter to Emacs Lisp to Racket to whatever. Surely, there might be performance differences, but in theory it's just lambda expressions all the way down.

And yes, if you're reading/watching things by Rich, Peter, Paul, and Eric you're going to be well-served. Free your mind and all that. Even if you have to work on JavaScript by day, you'll be a better programmer for having dived into these resources.

Anyway, keep pursuing these things!
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: Have you moved to Lisp to ESCAPE another language?

Post by findinglisp » Thu Sep 19, 2019 9:04 am

BTW, here's a great example of how malleable Lisp is in general. It's a library for Clojure that adds a completely new multi-method dispatch algorithm that mimics some of the CLOS dispatch mechanisms used in Common Lisp: https://github.com/camsaul/methodical

It's just a library and is not part of the core Clojure distribution and it completely changes method dispatch.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

Post Reply