S

Shaun Lebron

shaunlebron.github.io · Personal blog · on HN since 2015

Shaun Lebron writes about Clojure(Script) and Lisp tooling, including Parinfer, plus visual explainers and small game projects.

What HN saysCommenters discuss Parinfer as an intuitive way to handle Lisp parentheses, though some still prefer Paredit, and recommend his GitHub work on ClojureScript.
60HN people shared it
47linked it in comments
33stories submitted
1.8Kstory points
5 months agolast shared
2015people per year2026

Most-shared posts

  1. 1
    Parinfer – Simpler Lisp Editing
    48 people · 393 points · first shared 2015 · 82 comments on HN
  2. 2
    Tetris in ClojureScript
    5 people · 343 points · first shared 2016 · 33 comments on HN
  3. 3
    Visualizing JavaScript as a Solar System
    5 people · 21 points · first shared 2015 · 3 comments on HN
  4. 4
    Visualizing Projections
    3 people · 104 points · first shared 2015 · 11 comments on HN
  5. 5
    Show HN: Parinfer – a simpler way to write Lisp
    2 people · 677 points · first shared 2015 · 134 comments on HN
  6. 6
    Drawing isometric boxes in the correct order
    2 people · 189 points · first shared 2016 · 40 comments on HN
  7. 7
    Pac-Man Maze Generation
    1 people · 107 points · first shared 2020 · 6 comments on HN
  8. 8
    Chandler 1995.pdf
    1 people · first shared 2024
  9. 9
    Homepage
    1 people · first shared 2021
  10. 10
    Ratios
    1 people · first shared 2018

What HN people wrote when they linked it

lemming · 2024-10-04
More than it not being possible, it's not regarded as desirable - IntelliJ users greatly value consistency. The fact that the experience is consistent across different languages is one of the things I like best about IntelliJ. Can you give me an idea of the sort of thing that you'd like to see that you haven't seen? Here's an example of something I recently added (an inline inspector), that my main competitor (VS Code) said wasn't possible with the VS Code APIs: https://cursive-ide.com/blog/cursive-1.14.0-eap1.html. I have another major feature that I don't have good online doc for, which is also not possible with the VS Code API (parinfer, a Clojure editing mode). This gives you an idea of what it looks like, but this is old and my implementation doesn't work much like this any more: https://shaunlebron.github.io/parinfer.
hombre_fatal · 2024-05-22
Oh, interesting. Yeah, that's even better for an onboarding tutorial. I didn't know it existed (used Clojure for 6 years a long time ago). Cool: https://shaunlebron.github.io/parinfer/ I always thought that the surrounding tooling (having to learn how to edit parens productively, using nrepl/cider, maybe even emacs... with evil-mode of course) to be both the worst and then eventually the best parts of Clojure.
kazinator · 2024-01-23
The vast majority of Lisp code is assiduously written with nested indentation! So that can't be it. Non-lisp languages have parentheses, brackets and braces, using indentation to clarify the structure. Nobody can reasonably work with minified Javascript, without reformatting it first to span multiple lines, with indentation. Lisp has great support for indentation; reformatting Lisp nicely, though not entirely trivial, is easier than other languages. Oh, have you seen parinfer? It's an editing mode that infers indentation from nesting, and nesting from indentation (both directions) in real-time. It also infers closing parentheses. You can just delete lines and it reshuffles the closers. The github.io site has animations: https://shaunlebron.github.io/parinfer/
tartoran · 2021-06-14
Shaun Lebron has a bunch of interesting stuff on his github[0] involving closurescript. I haven't toyed with closurescript yet, if anyone has any experience with it, what are its strengths and weaknesses? I' ve been learning scheme/racket for the past year and for learning purposes Dr Racket is more than enough for now, but sometime in the future I'd like to branch out of that. [0]: https://shaunlebron.github.io/
narwally · 2018-11-11
Parinfer is also really nice. It rearranges your parens automatically based off of your indentation. I still prefer something like Paredit, or Smartparens for the power user features, but Parinfer is really intuitive and just works without having to learn new editing commands or hotkeys. It's my go-to recommendation now for people coming to lisp for the first time because it makes working with lisp code very similar to working with an indentation-based syntax like Python. https://shaunlebron.github.io/parinfer/
gnl · 2018-04-27
For anyone who'd be interested in trying a Lisp (with Clojure probably being the most mainstream one at the moment) and who's been put off by the parens, paredit and/or Emacs: - Parinfer [https://shaunlebron.github.io/parinfer/] - makes the parens follow indentation and vice versa and effectively makes them a non-issue at worst and a great advantage at best (you can combine it with paredit later on to perform all kinds of ninja magic when editing code) - Cursive [https://cursive-ide.com/] - a Clojure plugin for IntelliJ IDEA for a more 'just works' experience. Integrates parinfer, among other things, and is generally pretty great (I'm a happy customer). And last but not least - rainbow parens to keep nested expressions readable. Pretty much every Lisp editor has them more or less out of the box.
finalfantasia · 2018-03-14
My favorite online REPL for Clojure. It would be great if Parinfer [0] were integrated into the Clojure (and Scheme?) REPL. [0] https://shaunlebron.github.io/parinfer/
yogthos · 2017-10-22
I recommend taking a look at parinfer as well https://shaunlebron.github.io/parinfer/
coolmitch · 2017-05-25
I'll plug Parinfer as the best tool I've found for removing the pain of editing s-expressions. It's done wonders for my own workflow, and there's almost nothing to learn before you can use it effectively (compare to Paredit which requires you to know quite a few shortcuts before becoming productive) I almost never have to think about the parentheses while editing, any more than I would braces in a c-like language. It's really freeing. It's also fully integrated into Cursive so there isn't even a setup step if you're using that already. https://shaunlebron.github.io/parinfer/
keymone · 2017-03-26
the biggest leap in productivity i've experienced is after i tried parinfer (https://shaunlebron.github.io/parinfer/). seriously, just find the plugin for your editor, it is amazing, the cognitive load of balancing is simply gone.
ode · 2017-02-07
1. To understand Clojure stacktraces you should read https://8thlight.com/blog/connor-mendenhall/2014/09/12/clojure-stacktr… Although I agree the lengthy huge Java dump when crashing is pretty awful, you can ignore most of it. 3. I would recommend you look into Parinfer - https://shaunlebron.github.io/parinfer/. You can manage scopes with levels of indentation, rather than having to move parens around. It works with most major editors, including Emacs.
Check out parinfer! It's a great new editing mode for lisps that doesn't require memorizing any special commands. It's built into Cursive as well as my own IDE (Nightcode). https://shaunlebron.github.io/parinfer/
escherize · 2016-05-17
Incedentally I also use Emacs for editing lisp. (emacs lisp and Clojure.) Learning the hotkeys/concepts behind structural editing of lisp code was life changing metamorphasis, but quite difficult overall. There's been some fantastic work done by the Parinfer [1] team to bring the awesomeness of structural editing of lisp to the masses. The basic idea is that your parenthesis should infer where they belong by way of your indentation. I installed Parinfer it on my project: CLJSFiddle[2], and it's not what I'm used to and doesn't have everything but for a novice it is highly usable - check it out! [1] https://shaunlebron.github.io/parinfer/ [2] http://cljsfiddle.com
modernerd · 2017-11-24
As Evan Czaplicki (creator of Elm) said: “If functional programming is so great, why is it still niche? We have a product that can practically eliminate runtime errors, make refactoring much easier, lighten the testing burden, all while being quite delightful to use. What’s the hold up?” - http://www.elmbark.com/2016/03/16/mainstream-elm-user-focused-design I'm just getting into Clojure and enjoy working with it so much that I don't care if there are job opportunities at the end of it to justify the time investment and mind-reboot. It's the first language that I didn't feel like I was fighting, and Parinfer has made all those “weird parentheses“ a joy: https://shaunlebron.github.io/parinfer/ That said, there do seem to be more opportunities than last time I looked at Clojure/Scala/Haskell (Functional Works, mentions in HN Who's Hiring) – it feels like people are waking up to FP ideas after React stormed the front-end scene.
chrisoakman · 2017-10-22
Hi :) I feel your pain here and just wanted to let you know how common this is for programmers who initially try out Lisp for the first time. As others have alluded to, I promise this initial "parenthesis shock" goes away rather quickly as you read and write Lisp code. In my direct experience, I have hired junior developers straight out of a coding bootcamp who were able to pick up ClojureScript in their first week using Sublime Text with no editor extensions. In other words: you can definitely do this; it's not magic. I would strongly encourage you to check out Parinfer [1]. Parinfer makes indentation "significant" so you never have to worry about "closing the parens". Basically, if you can handle Python or CoffeeScript indentation, you can handle Lisp. There are no hotkeys to learn and it is available in most common editors today. For a first project I would recommend rewriting something you have already written and are familiar with. That way you can focus on just the language and not worry about the problem domain or "how to solve it". Just do a 1-to-1 port of something you've already done and compare how the two solutions are the same or different. I'm sorry you are being downvoted and being told to "just use emacs" or "use the REPL more". IMO, these are not helpful suggestions for someone new to the language. Good luck. You won't regret learning Clojure. One of the best things I have ever done for my career. [1]:https://shaunlebron.github.io/parinfer/
pgt · 2026-06-03
> "I do wish there were an easier way to move in the ]}]})))}-ness of block ends though." If he means navigating the AST, there is Parinfer: https://shaunlebron.github.io/parinfer/ Paredit / Parinfer ruined other languages for me. It lets you navigate up/down/in/out of the Clojure AST with keyboard commands and mutate those expressions, e.g. "Split" will split open the current data structure you're in: `(a| b)` =Split=> `(a)| (b)`, where | is caret. Join is the inverse, and it works for all data structures.
Slackwise · 2025-01-06
> Glad to see more exploration in this space. I mean.... ParEdit [1] and ParInfer [2] have been around for a long time now. Structural editing is basically ancient. Lispers have been doing this for a long while, `slurp`ing and `barf`ing their parens. [1]: https://paredit.org/ [2]: https://shaunlebron.github.io/parinfer/
behnamoh · 2024-08-09
related to this: I want structural editing for non-lisp languages so I don't have to deal with measly lines of code, but with entire trees and branches. something like this for Python: https://shaunlebron.github.io/parinfer/
undershirt · 2024-01-19
I’ll second this. A philosophy for engineering is nestled I think in the larger “philosophy of technology”, but this field of philosophy has traditionally been a lot more critical of technology than most of us can stomach today. This is a really good map of the field that not many know about, written in 1995: https://shaunlebron.github.io/chandler-1995.pdf
elangoc · 2023-04-28
People who use Parinfer rather than Paredit when learning Clojure really like it. The concept is available in the Clojure mode in all the usual suspects of IDEs (IntelliJ Cursive, emacs Cider, etc.) https://shaunlebron.github.io/parinfer/ The size of the community is not as important as the value of what is available. It's just not widely known, or maybe there's still much potential yet unrealized. This is an oldie but a goodie on how interactive an experience you can have when using Clojure on the front end and backend of a web app: https://figwheel.org/ This project is the most recent and most promising iteration of someone making a very visual interactive tool for introspecting on data structures in the REPL environment https://github.com/djblue/portal
harryvederci · 2023-04-19
> you start to wonder why you're destroying your eyesight trying to match parentheses Manually matching parentheses is a non-issue since tools like Parinfer were created: https://shaunlebron.github.io/parinfer
erichocean · 2023-03-10
Seems like building off of a Lezer grammar for Clojure would have been the way to go. It's lightweight, fast, and supports very fast incremental re-parsing. [0] If anyone wants a fun project, adding Parinfer [1] support to lang-clojure [2] for CodeMirror 6 would be welcome. [0] https://github.com/nextjournal/lezer-clojure [1] https://shaunlebron.github.io/parinfer/ [2] https://github.com/nextjournal/lang-clojure
User23 · 2023-01-10
I don't find reading properly indented Lisp any harder than reading properly indented Python. I agree however with respect to having the tooling help with balancing delimiters, although I let the editor do that job instead of the parser. And that's one of the major advantages of Lisp. Structural editing is considerably easier to implement. Parinfer[1] for example is really cool. I have to say I'm really excited about tree-sitter allowing similar structural editing for harder to parse languages. [1] https://shaunlebron.github.io/parinfer/
cormacrelf · 2022-07-30
The major alternative to this is Parinfer (https://shaunlebron.github.io/parinfer/). It works very well, especially for Vim where paredit-style bindings aren't that natural IMO. Parinfer has less to remember. There are some very solid implementations like https://github.com/eraserhd/parinfer-rust and its Vim plugin.
samatman · 2022-01-29
It's not supposed to be! https://shaunlebron.github.io/parinfer/ A better world is possible!
jedimastert · 2021-11-17
> I find lisp impenetrable and parenthetical soup I think part of this is the somewhat idiosyncratic indenting style, where closing parens are gathered together instead of their own line like curly brackets in C-style syntax. It ends up being somewhat similar to python, in that if a lisp program is indented "properly" you should be able to ignore the pileup of closing parens that tend to happen at the end of a long expression, and even the open parens, and see the structure for what it is. I found that Parinfer's introduction helped me a ton in this regard <https://shaunlebron.github.io/parinfer/>
simongray · 2021-09-24
When I edit Clojure I only ever think about indentation: https://shaunlebron.github.io/parinfer/
presz · 2021-09-02
Maybe take a look at parinfer https://shaunlebron.github.io/parinfer/
KurtMueller · 2021-06-14
Shaun also released the really neat Parinfer package as well: https://shaunlebron.github.io/parinfer/
vikeri · 2021-01-03
I use paredit myself but I also think that parinfer is very interesting: https://shaunlebron.github.io/parinfer/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close