frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

(How to Write a (Lisp) Interpreter (In Python)) (2010)

https://norvig.com/lispy.html
56•tosh•1h ago

Comments

tosh•1h ago
I can't recommend highly enough to implement a simple lisp (or a forth).

Illuminating experience and it will also help you see (among many other things) the parentheses in a different light.

stdatomic•1h ago
First day of paradigms course in the 2000s and prof says "if your opinion of Scheme is too many parentheses, then you're an idiot."

Needless to say that was my opinion and every day I think, more and more, how right he was.

(later I did make some gui apps that included scripting and chose s-expr syntax because of how simple it is to implement it)

NooneAtAll3•1h ago
main problem isn't brackets themselves - it's that they're too on the right

had brackets been displayed as curly braces in C - everything would look much more manageable

phpnode•46m ago
so, instead of

    (foo (bar (1 2 3))
you'd prefer

    {
      foo {
        bar {
          1
          2
          3
        }
      }
    }
is that right?
irishcoffee•26m ago
Emacs vs vim, go!
eska•40m ago
I changed my opinion about parens when I stopped formatting like C, and used indent rather than parens to denote blocks. That is, a large amount of them at the end is totally fine.
bananaflag•1h ago
There are two problems with Lisp parentheses in my opinion:

1) Humans are not that equipped to handle that level of nesting without some other aid, this is why Lisp code is usually indented.

2) Parentheses aren't just about grouping, and this is unintuitive. For example, x is not the same as (x). This is a bit like in set theory where x is not the same as {x}, but parentheses do not look like the kind of sign that would work like that.

urcite_ty_kokos•1h ago
Appreciated the title xD
e12e•1h ago
(2010)?
zahlman•1h ago
(how-to in-python (write (interpreter lisp)))
consumer451•39m ago
Yes, but to be fair, you only have a couple minutes to fight the HN title regex.
azhenley•1h ago
Writing a Lisp is one of my favorite projects. I try to do it every year or two, taking a different approach each time.
onraglanroad•34m ago
The one where you replaced parentheses with the crying laughing emojis was definitely the worst.
chombier•58m ago
If you ever wondered how to write a programming language, this is probably the best resource to get started (and then of course Crafting Interpreters).

See also part 2 https://norvig.com/lispy2.html

librasteve•45m ago
or you could just use Raku and its “surprisingly good lisp impression”:

https://www.codesections.com/blog/raku-lisp-impression/

joshuamorton•37m ago
There are edge cases where this fails, but `def parse(s): return json.loads('['+re.sub('([")])\s*(["(])','\g<1>,\g<2>',re.sub('[^()\s]+','"\g<0>"',s)).replace('(','[').replace(')',']')+']')` is a surprisingly robust lisp parser.
timonoko•37m ago
One of those exercises that are now just boring, because AI does it better.

Gemini did write Lisp-1 interpreter in Linux-assembly the other day. It was ready to implement garbage collection and compiler and all shit, but that was just depressing from human point of view.

chamomeal•25m ago
I mean it’s still worth doing, even if AI can do it. But I definitely empathize with that bit of AI ennui.
tosh•24m ago
is learning how to accomplish or understand something boring

just because someone or something else does it better?

genxy•13m ago
There is always someone better than you at almost everything you do, this is statistical reality.

If all you care about is the artifact and not the path, there is no reason to do anything.

Use the tool to better yourself, your understanding and push the limits of what is possible. If an Lisp in assembly with GC is now hello world, change what a hard project is.

I see this attitude a lot, and I think it is rooted in a sort of self-centered elitism. Anyone can do it, so why do it? Instead you could have the AI teach you how to implement it yourself with a deep understanding that no human, even if you paid them, would put up with.

But sure, get depressed. But why tho?

Lyngbakr•11m ago
It depends why you're doing it. Are you doing it for the product or the process? (Of course, they're not mutually exclusive.) I do it for the fun of building, in which case AI is irrelevant.
RedCinnabar•16m ago
Man these kind of resources have aged really bad in the age of AI.
jgalt212•14m ago
How so?
Crespyl•12m ago
Why would AI make these age worse than, say, libraries or languages becoming obsolete?

I don't think a good learning resource gets worse just because there's a newer alternative.

incanus77•3m ago
How do you mean “these kind”?

Code duplication is far cheaper than the wrong abstraction (2016)

https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction
94•rafaepta•1h ago•66 comments

(How to Write a (Lisp) Interpreter (In Python)) (2010)

https://norvig.com/lispy.html
56•tosh•1h ago•25 comments

Beyond All Reason (Free Total Annihilation Inspired RTS)

https://www.beyondallreason.info
278•mosiuerbarso•5h ago•139 comments

The Minimum Viable Unit of Saleable Software

https://brandur.org/minimum-viable-unit
8•brandur•42m ago•0 comments

Tell HN: Happy Fathers Day to all the fathers, uncles, anyone in that role!

39•consumer451•23m ago•4 comments

Who Owns Your ATProto Identity? Hint: It's Probably Not You

https://kevinak.se/blog/who-actually-owns-your-atproto-identity-hint-its-probably-not-you
106•kevinak•3h ago•100 comments

Wildcard (YC W25) Is Hiring a Founding Applied ML Engineer

https://www.ycombinator.com/companies/wildcard/jobs/SEmo4di-founding-applied-ml-engineer
1•kaushikmahorker•23m ago

Commodore Made a Digital Detox Phone That Isn't Dumb

https://www.wired.me/story/commodore-made-a-digital-detox-phone-that-isnt-dumb
68•Audiophilip•3d ago•46 comments

Occupancy Math on the AMD MI355X: A From-First-Principles Guide

https://indianspeedster.github.io/blog/occupancy-math-mi355x/
14•skidrow•4d ago•0 comments

Google Hits 50% IPv6

https://blog.apnic.net/2026/04/28/google-hits-50-ipv6/
341•barqawiz•9h ago•324 comments

AI Has Broken Hiring

https://hbr.org/2026/06/ai-has-broken-hiring-heres-how-to-fix-it
40•ChrisArchitect•1h ago•36 comments

Fossil Fuels Are 40% of Freight Shipping Tonnage, but Half Its Fuel Use

https://cleantechnica.com/2026/06/16/shipping-freight-energy-fossil-cargo/
56•choult•2h ago•29 comments

A 3D voxel game engine written in APL

https://github.com/namgyaaal/avoxelgame
116•sph•9h ago•10 comments

System call instrumentation on Linux/x86‑64 using memory‑indirect calls, part I

https://www.humprog.org/~stephen/blog/2026/06/15/#system-call-instrumentation-on-intel-negative-r...
14•matt_d•4d ago•5 comments

Loupe – A iOS app that raises awareness about what native apps can see

https://github.com/mysk-research/loupe
444•Cider9986•1d ago•177 comments

Running MicroVMs in Proxmox VE, the Easy Way

https://taoofmac.com/space/blog/2026/06/18/1845
163•zdw•2d ago•24 comments

Two Qwen3 models on one DGX Spark: the residency math

https://www.devashish.me/p/two-qwen3-models-on-one-dgx-spark
54•devashish86•3d ago•26 comments

The case against geometric algebra (2024)

https://alexkritchevsky.com/2024/02/28/geometric-algebra.html
104•Hbruz0•6h ago•87 comments

Slow breathing modulates brain function and risk behavior

https://www.cell.com/neuron/fulltext/S0896-6273(26)00339-9
324•croes•19h ago•94 comments

Renting a sewing machine from the library

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
299•sohkamyung•18h ago•173 comments

Zigzag Decoding with AVX-512

https://zeux.io/2026/06/17/zigzag-decoding-avx512/
112•luu•3d ago•21 comments

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
225•Sibexico•18h ago•53 comments

A tale of two path separators

https://alexwlchan.net/2021/slashes/
54•dbaupp•4d ago•22 comments

Developers don't understand CORS (2019)

https://fosterelli.co/developers-dont-understand-cors
294•toilet•15h ago•233 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
179•bookofjoe•3d ago•131 comments

Unauthorized alert sent to cell phones across Brazil

https://www.cnn.com/2026/06/20/americas/brazil-hackers-unauthorized-alert-latam
179•zdw•21h ago•128 comments

DOS Game "F-15 Strike Eagle II" reversing project needs DOS test pilots

https://neuviemeporte.github.io/f15-se2/2026/06/20/needyou.html
271•LowLevelMahn•1d ago•70 comments

SMPTE Makes Its Standards Freely Accessible

https://www.smpte.org/blog/smpte-makes-its-standards-freely-accessible-openingstandards-library-t...
282•zdw•1d ago•96 comments

UHF X11: X11 Built for VisionOS and Apple Vision Pro

https://www.lispm.net/apps/uhf-x11/
221•zdw•1d ago•49 comments

Rare medieval bookmark exceeds expectations at auction

https://www.thehistoryblog.com/archives/76314
33•speckx•4d ago•13 comments