Dan Mouse
dangermouse.net · Personal blog · on HN since 2007
Dan Mouse (Dangermouse) runs a site of esoteric programming languages, including Piet, Ook, and Chef, and joke algorithms.
What HN saysHN links it for Piet, where programs are abstract images; commenters find the sample programs amazing, including one painted by an artist that ran.
128HN people shared it
88linked it in comments
45stories submitted
1.2Kstory points
3 months agolast shared
2007people per year2026
Most-shared posts
- 1Piet: Programming language in which programs look like abstract paintings (2002)41 people · 772 points · first shared 2007 · 71 comments on HN
- 2Sample programs in the Piet programming language24 people · 187 points · first shared 2008 · 27 comments on HN
- 3Ook is a programming language designed to be understood by organutans13 people · 4 points · first shared 2008 · discussion on HN
- 4LenPEG (2017)11 people · 83 points · first shared 2009 · 44 comments on HN
- 5Bogo-bogosort8 people · 71 points · first shared 2011 · 32 comments on HN
- 6Intelligent Design Sort8 people · 22 points · first shared 2010 · 1 comments on HN
- 7Chef: a programming language in which programs look like recipes5 people · 5 points · first shared 2008 · 2 comments on HN
- 8Esoteric Programming Languages (Piet, Chef, Ook, and more)5 people · 2 points · first shared 2008 · discussion on HN
- 9Petrovich4 people · 4 points · first shared 2009 · 1 comments on HN
- 10Dropsort3 people · 5 points · first shared 2010 · discussion on HN
- 11Whenever3 people · 3 points · first shared 2013 · discussion on HN
- 12Chef fib3 people · first shared 2014
- 13Hq9plusplus2 people · first shared 2012
- 14The art of programming, and when I say art, I mean it1 people · 3 points · first shared 2010 · discussion on HN
- 15A Hello World which look like cooking recipe1 people · 2 points · first shared 2014 · discussion on HN
What HN people wrote when they linked it
Izkata · 2025-12-04
Piet is mine - the programs are 2D images: https://esolangs.org/wiki/Piet
Primarily because of the note on the "calculating pi" example program:
> Richard Mitton supplies this amazing program which calculates an approximation of pi... literally by dividing a circular area by the radius twice.
> Naturally, a more accurate value can be obtained by using a bigger program.
https://www.dangermouse.net/esoteric/piet/samples.html
shagie · 2025-07-31
Piet: Programming language in which programs look like abstract paintings (2002) - https://news.ycombinator.com/item?id=40141777 https://www.dangermouse.net/esoteric/piet.html
In the sample programs there's a big red one... https://www.dangermouse.net/esoteric/piet/samples.html
There's also the IOCCC classic https://www.ioccc.org/1988/westley/index.html
mellonaut · 2024-04-24
The last program on the examples page⁰ truly is amazing:
A guy (called Piet!) saw an artwork that reminded him of Piet (the lang) and tried executing it¹.
> It ran! [...] This is probably the first time in history that a graphic artist has painted a functionally workable computer program by accident.
[0]: https://www.dangermouse.net/esoteric/piet/samples.html [1]: https://gitlab.fabcity.hamburg/hofalab/piet-get-together
bocytron · 2024-04-24
The samples page is amazing. You can see the evolution of the canvases, becoming more and more sophisticated and beautiful to took at.
https://www.dangermouse.net/esoteric/piet/samples.html
matanyall · 2023-09-14
Easy! Write a compression algorithm that works as follows: if you detect the input is the first gb of Wikipedia, return nothing. Else return the compressed artifact of your compression algorithm of choice. To decompress, running the decompression algorithm on an empty input returns the first gb of Wikipedia, if else you use whatever algorithms you used earlier :)
This is inspired by HQ9++: https://www.dangermouse.net/esoteric/hq9plusplus.html
uvnq · 2021-06-13
That's amazing. They made an image with a blank editor, put a textarea element over it, and then transformed it and filtered it to achieve the tilt/scale/blur.
The code also changes every time you refresh the page. First time I got it, it was some php. Then C++. Then a recipe for... Fibonacci numbers with caramel sauce?
Edit: After looking up the title, the "recipe" is actually an executable program written in some esoteric programming language.
The "recipe": https://www.dangermouse.net/esoteric/chef_fib.html
Info page for the Chef programming language: https://www.dangermouse.net/esoteric/chef.html
Wow. Definitely did not expect this
jsheard · 2021-01-09
The LenPEG algorithm can compress images down to 0 bytes in the best case
https://www.dangermouse.net/esoteric/lenpeg.html
nemo1618 · 2018-01-02
This article missed a great opportunity to mention Piet, an esoteric programming language that you write by creating Mondrian-style paintings: http://www.dangermouse.net/esoteric/piet/samples.html
The Pi calculator is particularly brilliant: "Naturally, a more accurate value can be obtained by using a bigger program."
the_duke · 2017-01-28
Some of the sample programs are kind of amazing: http://www.dangermouse.net/esoteric/piet/samples.html
Hilarious idea.
pygy_ · 2016-03-23
http://www.dangermouse.net/esoteric/piet/piet_pi_big.png
> Richard Mitton supplies this amazing program which calculates an approximation of pi... literally by dividing a circular area by the radius twice. Richard says:
The output is printed without the decimal
point after the 3.
Naturally, a more accurate value can be
obtained by using a bigger program.
Zombieball · 2013-12-29
My favourite is still Intelligent Design Sort:
http://www.dangermouse.net/esoteric/intelligentdesignsort.html
O(1) run time!
jerf · 2013-01-11
The winner is a foregone conclusion, it's the person who submits the solution in Piet: http://www.dangermouse.net/esoteric/piet.html
It'll be a worthy victory, though.
ph0rque · 2012-11-02
You don't even need aerographite for that: http://www.dangermouse.net/gurps/zeppelin/vacuum.html
However, you need a material strong enough not to implode due to the outside pressure of air. Not sure how good material tech is for that.
Even if it were strong enough, you would have constant "leaks" of air into the vacuum cells. So you would need a vacuum pump working all the time. Still might be worth it, though.
nuclear_eclipse · 2012-10-25
The most obvious "useful" ability of Piet comes in calculating Pi: http://www.dangermouse.net/esoteric/piet/samples.html
Of note from the sample program, emphasis mine: "... this amazing program which calculates an approximation of pi literally by dividing a circular area by the radius twice. ... Naturally, a more accurate value can be obtained by using a bigger program."
jazzychad · 2011-04-10
Awesome, I love Piet! I wrote the "Alpha" example program on http://www.dangermouse.net/esoteric/piet/samples.html as an exercise to learn Piet while solving Card #234 of Perplex City - http://perplexcitycardcatalog.com/1/234/
All of DM's esoteric languages are pretty interesting: http://www.dangermouse.net/esoteric/
boothby · 2024-10-23
I'm a lover of esoteric languages, and Piet[1] captured my imagination more than any other. So, I wrote a compiler[2] for the language, eventually writing a backend that re-targets Piet itself.
And since I love code golf, I wrote most of the compiler in the extremely tortured form that only fellow golfers can love. But I balanced the golf with extensive comments, as a bit of an experiment on the varied advice that we programmers receive about comments. Do they help? Can I keep them current as the code beneath them changes? (Jury's still out on both, but I find the juxtaposition aesthetically amusing).
Just recently, I made a friend! And by "friend" I mean that another human has written another Piet compiler[3] and it's a beautiful project and we were delighted to discuss our tortuous projects that we wrote for pure fun! So I've gotta plug his compiler too -- it's written in safe Rust! Too cool!
[1] https://www.dangermouse.net/esoteric/piet.html
[2] https://github.com/boothby/repiet
[3] https://github.com/pwang00/pietcc/
ThaddeusQuay2 · 2011-10-19
Here's my partial list, of what I can remember at the moment, and in no particular order.
1) Opa
"Opa is a concise and elegant language for writing distributed web applications." - http://opalang.org
"Opa is an open source programming language for web applications." - http://en.wikipedia.org/wiki/Opa_(programming_language)
There is much to say about Opa. I recommend going through the references in the Wikipedia article.
2) BaCon
"BaCon is a free BASIC to C converter for Unix-based systems. BaCon intends to be a programming aid in creating tools which can be compiled on different platforms (including 64bit environments). It tries to revive the days of the good old BASIC." - http://basic-converter.org
BaCon is interesting because: 1) all you need is a shell and a C compiler, 2) it was created by Peter van Eerten, who also made GTK-server, and 3) it converts lazily, effectively making a BASIC-like wrapper for C, thereby allowing easy access to some of the more interesting aspects of C, which would not normally be available in BASIC.
3) Spin
"Spin is a multitasking high level computer programming language created by Parallax's Chip Gracey, who also designed the Propeller microcontroller on which it runs, for their line of Propeller microcontrollers." - http://en.wikipedia.org/wiki/Parallax_Propeller#Built_in_SPIN_byte_cod…
4) Agena
"Agena provides you with all the means you need to implement your ideas quickly: fast real and complex arithmetics, efficient…
elblanco · 2010-01-01
> I understand -- I think we are just here for very different reasons...
True, but there's an obvious intersection of the things we are interested in. We just have to figure out how to play friendly concerning the other things in our interest sets.
> Taking a "tolerant" approach without a big redesign to allow some kind of filtering means that the result will be simple majority rule, leading to a lot of very general interest posts about politics, current events, business, and technology.
Well, the good news is that HN has posting guidelines http://ycombinator.com/newsguidelines.html
> Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off-topic.
Despite what certain members of the HN community would have you think, these aren't "rules", but they do serve a useful function in focusing the site on a core set of topic areas. I don't think there is much danger of HN becoming reddit in that sense. HN effectively acts like 2 or 3 narrowly focused subreddits on reddit.com.
> Is it ethical, then, for me to flag articles which I think are not worthwhile posts? I'm not sure. Your comments make me reflect on whether that's an OK thing to do or not. I do wish there were a downvote button on posts, that means "I don't think this should be highly rated, but I don't think it should be killed either." I would…
vok · 2026-08-07
The examples:
https://www.dangermouse.net/esoteric/piet/samples.html
The last one is astonishing: "Okay, this one is really wild. Piet J. (yes, that's his real name) was browsing art in a small gallery and saw a work which reminded him of a Piet program. He spoke to the artist, who claimed to know nothing about the language. Piet took a photo of the artwork (left), converted it into a clean image file using close colours from the Piet palette (right), and tried running it.
It ran!..."
Sniffnoy · 2026-06-27
I like this explanation of cricket for Americans: https://www.dangermouse.net/cricket/baseball.html
kragen · 2025-11-02
I prefer Piet, but it has some real drawbacks when it comes to readability: https://www.dangermouse.net/esoteric/piet/samples.html
5- · 2025-07-15
before the current ai craze, there was this: https://www.dangermouse.net/esoteric/petrovich.html
> imagine a Petrovich layer over another operating system, such as Microsoft Windows (TM). Every time Windows does something you don't like, you could punish it, and it would never do it again...
dwattttt · 2025-04-13
I really hoped this was about https://www.dangermouse.net/esoteric/whenever.html
RafelMri · 2024-08-10
Implementations of Brainfuck and Piet (https://www.dangermouse.net/esoteric/piet/samples.html) interpreters in the Wolfram Language.
remram · 2024-04-24
Or in-place radix sort maybe.
I agree with you, the name is ridiculous, reminds me of miracle sort or intelligent design sort: https://www.dangermouse.net/esoteric/intelligentdesignsort.html
Probably those two flag sort algorithms were named before the joke algorithms were popularily known.
p4bl0 · 2024-03-04
Strange: I submitted this more than 24 hours ago and it still says so on my list of submissions here: https://news.ycombinator.com/submitted?id=p4bl0
But it's the same submission as this one which says it was submitted by me 4 hours ago.
I've been contacted a few times by HN moderation and was asked to re-submit some interesting link that didn't get traction on the first try, but it's the first time that I see a link be re-submitted on my behalf. Is that common on HN now?
Anyway, concerning Velato, I stumbled on it yesterday. I find this kind of esoteric languages (like Piet [1]) quite fun, and thought that others here may enjoy it!
[1] https://www.dangermouse.net/esoteric/piet.html
sargstuff · 2022-12-31
Perhaps thing outside the tool/app along lines of default app/program values?
aka utilize different 'software' abstraction levels to acomplish something is one definition of 'software art'
X11 configuration files to make xwindows resemble a PC os ( https://zorin.com/os/ )
.login / .logout or dot file to customize how use/interact with ?? shell, xwindows, program(s)
does using unicode / ascii character set to 'redo' graphic format count as software art?
Is abusing a programming language to do something language was not setup/intended to do count as software art? ( https://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest )
Does writting a working OS in piet count as 'software art' ( https://www.dangermouse.net/esoteric/piet.html )
Getting multiple programs on the voyager 1 & 2 space craft to run in few k of available memory count at 'software art'?
DarmokJalad1701 · 2022-12-15
Maybe next up is a model that generates Piet code
https://www.dangermouse.net/esoteric/piet.html
GuB-42 · 2022-08-29
And there is Ook!, a language for Orangutans.
It is a joke language that is equivalent to brainfuck, and doesn't contain the word "monkey".
https://www.dangermouse.net/esoteric/ook.html
Sohcahtoa82 · 2021-10-21
I like Intelligent Design sort:
> The probability of the original input list being in the exact order it's in is 1/(n!). There is such a small likelihood of this that it's clearly absurd to say that this happened by chance, so it must have been consciously put in that order by an intelligent Sorter. Therefore it's safe to assume that it's already optimally sorted in some way that transcends our naïve mortal understanding of "ascending order". Any attempt to change that order to conform to our own preconceptions would actually make it less sorted.
https://www.dangermouse.net/esoteric/intelligentdesignsort.html