Unofficial Hacker News companion — get notified on comment replies, and more.

Why stop at Emacs? Native apps you or an AI reprogram in Clojure while they run (opens external site)

153 points by RiccardoSottini 5 days ago | github.com | 110 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (2)

  1. Could you maybe do a quick demo video? I’m really, really curious, but as someone coming from a very “traditional” programming background, your comment sounds super intriguing, but just doesn’t “click” for me.
    Replies (1)
    1. There will be a lot of ground to cover, I don't think I can explain all the things involved, cramming it all in a simple "quick demo". I can, of course, give suggestions on specific things or answer concrete questions. If you're just looking for the "feel" of what it is like to program with a Lisp, there are plenty of videos already.

      Getting into Lisp is not that difficult. One basically needs to understand the idea behind "REPL-driven development", which is not like using REPLs in other (non-homoiconic) PLs - Lispers typically never type in the REPL shell explicitly, they evaluate things directly from their editor, connected to a REPL instance. Sometimes that instance can be on a remote machine. For example, for some of our Clojure-based services, my team maintains an nREPL connection to things running in a k8s cluster. We can easily experiment and change the behavior of the running system without having to recompile, restart or kill the pods.

      Another thing (which is not even a requirement, just nice-to-have) is structural editing. Figuring out that early on will make it easier to deal with Lisp code.

      Everyone has a different way of learning languages. Some prefer reading books, some prefer watching videos, and some prefer understanding the theory first. Others would simply try to build things. I'd say, don't overthink it, start somewhere. Don't overwhelm yourself with choices. It really doesn't matter which Lisp dialect you start with. I started with Clojure and Emacs Lisp, and later I got to use a bunch of others. What's great about learning Lisp is that later you can move from one dialect to another with virtually zero overhead, something that isn't easily achievable even between Javascript and Typescript. You then pick a runtime for a specific type of work. These days we have so many Lisp dialects that I think they cover pretty much any runtime - you can become a true polyglot without wasting years of your life, grokking the intricacies of every PL for a different runtime. You never would have to choose to become: "an Android developer", "React.js dev", "Rust programmer", "Pythonista", etc., it will simplify the work of switching between different stacks. Of course, you won't be able to use Lisp in every team you work on; you'd still be using non-lispy languages, yet understanding Lisp would make you a better programmer. It will never feel like a burden or a waste of your time. Not to mention the unmatched level of pragmatism for serving your personal needs. The only regret you will ever have is not getting into Lisp sooner.