D

David Madore

madore.org/~david · Personal blog · on HN since 2008

David Madore, a French mathematician and programmer, writes on quines, esoteric languages like Unlambda, Unix quirks, and linguistics.

What HN saysCommenters repeatedly cite his quine page as the best explanation of self-replicating programs, and link his Unlambda page when discussing esoteric languages.
48HN people shared it
35linked it in comments
21stories submitted
493story points
11 months agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Quines: self-replicating programs (2005)
    16 people · 216 points · first shared 2008 · 28 comments on HN
  2. 2
    The Unlambda Programming Language
    11 people · 31 points · first shared 2009 · 2 comments on HN
  3. 3
    The Unix leap-second mess (2010)
    5 people · 1 points · first shared 2016 · discussion on HN
  4. 4
    Kerr black holes images and videos (2012)
    4 people · 35 points · first shared 2014 · 13 comments on HN
  5. 5
    A page about call/cc (2002)
    2 people · 39 points · first shared 2008 · 21 comments on HN
  6. 6
    The joy of English pronunciation (2002)
    2 people · 1 points · first shared 2015 · discussion on HN
  7. 7
    GCFS: a Garbage-Collected Filesystem for Linux
    1 people · 83 points · first shared 2011 · 30 comments on HN
  8. 8
  9. 9
    A first introduction to p-adic numbers [pdf]
    1 people · 2 points · first shared 2017 · discussion on HN
  10. 10
  11. 11
    2011 03
    1 people · first shared 2011
  12. 12
    Metro.tgz
    1 people · first shared 2015
  13. 13
    Unitest
    1 people · first shared 2018
  14. 14
    Freespeech
    1 people · first shared 2012
  15. 15
    2012 10
    1 people · first shared 2012

What HN people wrote when they linked it

lukko · 2023-02-26
Oh, that is cool! I love that the code itself can be used in the sim - reminds me a bit of 'quines' from GEB: http://www.madore.org/~david/computers/quine.html
pyinstallwoes · 2022-12-04
Best page on quines I have ever found: http://www.madore.org/~david/computers/quine.html Somewhat related: http://cm.bell-labs.com/who/ken/trust.html Somewhat related: mRNA
unhammer · 2021-01-12
I use sakura, since it has great support for unicode (presumably through libvte, which also xfce4-terminal uses). See e.g. https://i.imgur.com/G6arkK9.png using some extracts from http://www.madore.org/~david/misc/unitest/ - xterm just gives up (tried uxterm as well as the .Xresources settings here) - st prints the arabic backwards (left to right, which I suppose you might prefer if you don't actually plan on reading it), has no colour on the emoji (which again you might prefer!), and completely fails to display the double-composed diacritics (this is a bad one, even if you prefer to KISS) - I don't know what kitty is doing with the arabic, all I see are some strange rendering artifacts - sakura (and xfce4-terminal) passes all the tests
nickpsecurity · 2015-07-17
That was hilarious. Especially the precedence section. The brilliance behind INTERCAL's design also inspired work in the functional programming domain: http://www.madore.org/~david/programs/unlambda/#what_is The lambda calculus without the lambda operation. Brilliant improvement! Now we just need a video of Wirth's reaction to a demo of these.
jlegoff · 2010-12-20
The following page gives a lucid explanation of how to make quines (including multi-quines): http://www.madore.org/~david/computers/quine.html
somat · 2025-12-04
Unlambda solves that problem. "What if we had the lambda calculus without the lambda forms?" asked no one. http://www.madore.org/~david/programs/unlambda/
psuedobrain · 2022-07-15
CEK[1] machines are very clean way of implementing continuations or other features that can be implemented in terms of them in a language with no support for lambdas or closures. they are also reasonably fast too. i implemented a simple unlambda[2] interpreter in haskell using the cek/cesk style and it was ~20% faster and more memory efficient than the fastest c interpreter i could find. [1] https://matt.might.net/articles/cek-machines/ [2] http://www.madore.org/~david/programs/unlambda/
anyfoo · 2022-04-07
It doesn’t actually support what I said I think, but you might like it anyway: http://www.madore.org/~david/computers/quine.html
sleepydog · 2022-03-30
I find this article to give a good overview of how leap seconds are handled on Unix: http://www.madore.org/~david/computers/unix-leap-seconds.html
lifthrasiir · 2022-01-11
David Madore's treatment [1] is my go-to introduction to quines. [1] http://www.madore.org/~david/computers/quine.html
ffhhj · 2022-01-11
By nesting Quines, this is the core concept: http://www.madore.org/~david/computers/quine.html
NelsonMinar · 2020-02-20
Do you have any more info on that chipset watchdog and how I'd use it in Linux? Is it this, the TCO Watchdog? http://www.madore.org/~david/linux/iTCO-wdt-test.html
fragmede · 2019-09-22
For the curious, this is called a quine, and it's a fun challenge in every language, to write on. http://www.madore.org/~david/computers/quine.html
karlhughes · 2017-01-01
This was shared a while ago, but it's relevant again: http://www.madore.org/~david/computers/unix-leap-seconds.html
JdeBP · 2016-12-01
There are actually two reasonable ways of handling leap seconds with gettimeofday(). The first, which is in actual use by a range of people, is to define that the kernel time is actually a TAI-10 count not a UTC count. Arthur David Olson's "right" timezone system does this. The second is to allow the microseconds count to go up to 2,000,000. * http://www.madore.org/~david/computers/unix-leap-seconds.html#tai-minu…
hexane360 · 2016-11-23
I just point them towards Unlambda. Turing completeness in three characters (plus one for output) http://www.madore.org/~david/programs/unlambda/#what_is
Certhas · 2015-11-28
In French, if you see the written word you can deduce with a few simple rules how it is pronouced. However, information is lost on the way, it's hard to reconstruct how the word is written based on the sound (and there are many homophones where this is just impossible). In English there is not such deterministic way of simply deducing how a word is pronounced based on how it's written. In fact there are many heteronyms. You have a tear in your trousers but a tear in your eye. http://www.madore.org/~david/misc/english-pronunciation.html
jbk · 2015-09-07
In a semi-related, semi-off-topic way, there was this challenge of going through all the subway stations of the Paris underground, during the same day (and if possible in the fastest way possible): http://www.madore.org/~david/misc/defimetro.html [FR] The funny part was that they wrote a program to calculate and optimize the time to do that, using the length of the lines and the little public info they had; and I thought it was pretty cool. http://www.madore.org/~david/misc/metro.tgz And of course, it was in 2002, so before the OpenData movements...
murbard2 · 2015-06-19
See also David Madore's hyperbolic maze: http://www.madore.org/~david/math/hyperbolic-maze.html
bandrami · 2015-05-04
Unfortunately "functional" is coming close to being the Next Big Idea, which means it stops meaning anything specific. If you look at unlambda[0] as the kind of Platonic ideal of functional languages you might see what GP is talking about. It lacks any facility for bindings because any binding is a storage of state. Roughly, since you can refer to every function and value literally, the idea behind unlambda is that you should. (Note that by this way of looking at things, closures are not "functional" at all and are in fact embeddings of imperative mini-languages.) Historically, closures were more or less developed by accident as LISP codified its scoping rules; in that sense their presence isn't particularly indicative of "functional ness"; it's just that using them requires a GC and 40 years ago only functional languages had one. [0] http://www.madore.org/~david/programs/unlambda/
a3_nm · 2012-10-29
As a general rule, using secret sharing protocols, for any choice of n and k, you can split any illegal piece of information a into n pieces such that k of these pieces together can reconstitute a but <k pieces will not give any information about a. It is hard to tell to what extent an individual piece is illegal or not. Related: http://www.madore.org/~david/misc/freespeech.html (does something similar using XOR, and discusses interesting uses of that kind of system).
saint-loup · 2012-10-18
Fun fact: David Madore, co-author of the conspiratorial contest, actually didn't mean to obfuscate his code. The winner page: http://www.ioccc.org/2012/grothe/hint.html The source in french: http://www.madore.org/~david/weblog/2012-10.html#d.2012-10-14.2083
Patient0 · 2012-05-09
I first encountered the term "intron" when reading about Quines: http://www.madore.org/~david/computers/quine.html which made me wonder if "introns" in DNA are similar. After all, DNA can also be viewed as a "program" that prints its own source code out...
finnw · 2012-02-09
> ... but that's probably an intractable cryptographic process. Not always. Algorithms that append a hash to a file, preserving the same hash, i.e. hash(s) == hash(s ++ hash(s)) http://stackoverflow.com/q/4823680/12048 A program that prints (though does not contain) a hash of itself: http://www.madore.org/~david/computers/quine.html (edited for formatting)
pom · 2011-06-17
Although I had stumbled upon the S and K combinators with Unlambda (http://www.madore.org/~david/programs/unlambda/) I didn't know about Smullyan's book and this related paper by Keenan (http://www.cs.virginia.edu/~cs655/readings/mockingbird.html) Sure seems like an interesting contest this year even though I didn't people still cared about Magic: the Gathering.
p4bl0 · 2011-03-09
Here is the corresponding blog post on David Madore's blog: http://www.madore.org/~david/weblog/2011-03.html#d.2011-03-06.1855 (sorry it's in french).
celoyd · 2008-09-26
Actually, given call/cc (http://www.madore.org/~david/computers/callcc.html), it's not a big deal. I think Termite (http://lambda-the-ultimate.org/node/841) is implemented in Gambit with call/cc.
burntsushi · 2024-04-12
> Possibly the most natural representation of a UTC instant would be an integer, because fundamentally UTC is a count of milliseconds It's not! It's a subtle point, but because of leap seconds, the correct representation of UTC is the tuple (year, month, day, hour, minute, second, ...), with the `...` being filled in with your desired precision. From: http://www.madore.org/~david/computers/unix-leap-seconds.html > Unlike TAI and UT1, the UTC time scale should not be considered as a pure real number (or seconds count): instead, it should be viewed as a broken-down time (year-month-day-hour-minute-second-fraction) in which the number of seconds ranges from 0 to 60 inclusive (there can be 61 or 59 seconds in a minute); during a positive leap second the number of seconds takes the value 60 (while a negative leap second would skip the value 59, but this has never occurred). ... > If we attempt to condense UTC to a single number (say, the number of seconds since 1970-01-01T00:00:00 or since 1900-01-01T00:00:00, or the number of 86400s-days since 1858-11-17T00:00:00, or something of the sort), we encounter the problem that the same value can refer to two different instants since the clock has been set back one second (negative leap seconds, of course, would cause no such difficulty). Most datetime libraries get this wrong. I know because I'm working on a new one that specifically doesn't get this wrong.

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