D

David Mazières

scs.stanford.edu/~dm · Personal blog · on HN since 2011

David Mazières, a Stanford computer science professor, writes about C++20 features, systems research papers and security topics.

What HN saysHN links it for his C++20 coroutines tutorial, which commenters find useful despite its code overhead, and his paper on spam, "Get Me Off Your Fucking Mailing List".
38HN people shared it
22linked it in comments
18stories submitted
807story points
6 months agolast shared
2011people per year2026

Most-shared posts

  1. 1
    Get Me Off Your Fucking Mailing List (2005) [pdf]
    12 people · 384 points · first shared 2011 · 65 comments on HN
  2. 2
    My tutorial and take on C++20 coroutines
    6 people · 224 points · first shared 2021 · 136 comments on HN
  3. 3
    Recursive Macros with C++20 __VA_OPT__
    4 people · 28 points · first shared 2023 · 1 comments on HN
  4. 4
    C++20 Idioms for Parameter Packs
    2 people · 74 points · first shared 2024 · 51 comments on HN
  5. 5
  6. 6
    My rant on C++'s operator new (2006)
    2 people · 13 points · first shared 2014 · 3 comments on HN
  7. 7
    Waldman:tangler large.pdf
    2 people · first shared 2020
  8. 8
    Papers
    2 people · first shared 2011
  9. 9
  10. 10
    Simplified SCP (David Mazières et al.)
    1 people · 2 points · first shared 2019 · discussion on HN
  11. 11
  12. 12
  13. 13
    Losa:stellar instantiation.pdf
    1 people · first shared 2021
  14. 14
    Corodemo.cc
    1 people · first shared 2021
  15. 15
    Bittau:tcpcrypt.pdf
    1 people · first shared 2019

What HN people wrote when they linked it

IshKebab · 2024-09-25
Yeah there aren't many good resources on it unfortunately. One thing to note is C++20's coroutine support is really low level. It's designed for library authors so that they can build the kinds of things "normal" people want - tasks, generators, futures, promises, etc. This video is the best intro I've found. It actually explains what is happening in memory, which is the only way to really understand anything in C++. https://youtu.be/aibjUHx7vew Also this is decent: https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html But don't try and write a coroutine library yourself. Use something like libcoro.
indigoabstract · 2023-09-24
Yes, in my (limited) use case with coroutines for a recursive descent generator I got it working by following this tutorial: https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html but I was unpleasantly surprised by much extra code it required to make it run. The Tiny Fiber library in the article looks pretty hacky right now and the amount of x64/arm specific code might cause trouble with portability, but the concept itself is intriguing. Thank you for the details.
toddm · 2022-07-26
Reminds me of one of my favorite meeting abstracts from David Mazieres and Eddie Kohler at Stanford: https://www.scs.stanford.edu/~dm/home/papers/remove.pdf
sitkack · 2020-01-15
Some of this might be possible with Dune, iommu or pointer tracking semantics. http://www.scs.stanford.edu/~dm/home/papers/belay:dune.pdf I had never heard of Aegis, how big is my blindspot and what do you recommend?
mrep · 2018-08-01
The type of spam which has inspired one of my favorite papers titled "Get me off Your Fucking Mailing List": http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
danielweber · 2014-07-31
David Mazières wrote one of my favorite papers ever, "Get Me Off Your Fucking Mailing List" http://www.scs.stanford.edu/~dm/home/papers/ July 2005
joshe · 2011-01-05
Great that it's listed in his official list of papers. From http://www.scs.stanford.edu/~dm/home/papers/ "Submitted to the 9th World Multi-Conference on Systemics, Cybernetics, and Informatics, Orlando, FL, July 2005... Note: We never received official notification of whether the paper was accepted or rejected."
SuperV1234 · 2026-05-13
To be honest there are ways to make that much nicer. I believe that if you use recursive macros using the VA_OPT feature, you should be able to provide enumerators directly to define enum as a list. The underlying machinery implementation is going to be much uglier and complex, though. See https://www.scs.stanford.edu/~dm/blog/va-opt.html
fuhsnn · 2025-11-07
Examples from this article[1] frequently yield inconsistent result across implementations, particularly the ones that put parenthesis in macros, it is indeed a very corner-case-y thing to do though. [1] https://www.scs.stanford.edu/~dm/blog/va-opt.html#c-macro-overview
senderista · 2024-09-27
There are several Multi-Paxos papers (some of them dating before Raft) that are intended as guidance for implementers: https://paper-notes.zhjwpku.com/assets/pdfs/paxos_for_system_builders.… https://www.cs.cornell.edu/home/rvr/Paxos/paxos.pdf https://www.scs.stanford.edu/~dm/home/papers/paxos.pdf
downut · 2024-04-05
Thank you for this pointer. I have been studying coroutines off and on for a while and my google/ddg foo is weak and did not find this. Or maybe google/ddg are getting weak. Sadness. I was using David Mazières' tutorial[1] but was still puzzled about the seemingly magical promise_type/coroutine_handle conversions that are nicely explained here. [1] https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html
corysama · 2024-02-27
Is the section on “Comma Fold” (right after the recursion section) not what you are looking for? https://www.scs.stanford.edu/~dm/blog/param-pack.html#comma-fold
pjmlp · 2023-05-05
You can find an explanation here, https://www.scs.stanford.edu/~dm/blog/decltype.html
CodesInChaos · 2022-11-28
Take a look at Tangler which takes this kind of ambiguity one step further: https://www.scs.stanford.edu/~dm/home/papers/waldman:tangler-large.pdf
mazieres · 2021-02-22
Oh, that must be a typo in the document, sorry. I just fixed it. The actual corodemo.cc file was correct, though: http://www.scs.stanford.edu/~dm/blog/corodemo.cc Also, here's a more authoritative source than stack overflow for the return type of main: https://timsong-cpp.github.io/cppwp/n4861/basic.start.main#2
daveFNbuck · 2018-10-05
There are much more egregious examples in computer science publishing. A paper that just repeated the words "get me off your fucking mailing list" over and over [1] was published in a journal. I also remember there being some automatic paper generators that resulted in several publications several years back. This is 100% an issue with bogus for-profit publishing, not with any particular area of study. [1] http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
ddrsurvivor · 2017-08-26
I know this doesn't really count, but the "Get me off your fucking mailing list" one made me giggle - http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
cozzyd · 2015-04-15
Not quite as seminal as one of his previous papers [0], but based only on taking his operating systems class, I have huge respect for Mazieres's competence. http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
giarc · 2014-07-31
maxtaco · 2014-02-25
At the time, there was an arms race within the systems community to see who could flip a bigger bird to the organizers of the SCI spamference. David Mazieres and Eddie Kohler started it off when they submitted "Get Me Off Your Fucking Mailing List" [1] for publication. We wanted to one-up them and figured we could do so by submitting a random paper that might be accepted into the conference, allowing us to give an in-person talk. The plan worked up to a point, but when we asked the internet for $3k to send us to Orlando, the press and then the organizers of SCI caught wind and revoked the random paper they had previously accepted. Everything since has been gravy. We're pumped that SCIgen is still a useful weapon against charlatans the world over (this now includes you, IEEE and Springer). [1] http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
lapinot · 2021-05-31
Taking away the money part you'll probably want to replace "distributed chained ledger" with "distributed database" or "state-machine replication". There's actually a nice academic literature on this topic of having distributed databases that have strong notions of "commit". This is never the case with stuff that gets called "blockchain". I've yet to encounter something that isn't a variation on "rate-limit the ingest so we have time to replicate operations world-wide" or "create internal monkey-money incentives for agents not to diverge from corretness", both of which are trivial hacks that don't advance anything from a scientific point of view. Not my field tho, so here's the few refs i know. https://en.wikipedia.org/wiki/Paxos_(computer_science) An old algorithm used for sharding big-data databases. https://en.wikipedia.org/wiki/Raft_(algorithm) A simplified version of paxos. http://www.scs.stanford.edu/~dm/home/papers/losa:stellar-instantiation… The new paper about SCP which allows replication with subjective notions of trust (no central participant-stake list like paxos/raft). ps: actually i remove "chained" from the idea. If you want to keep the whole authenticated linked-list thing and do it right you'll end up somewhere near https://irmin.org/ (a generalization of git), which is very useful, but doesn't tackle the "strong decentralized commit". You'll probably want to either centrally manage the "lastest-hash(s)" (like git is usually done), or pair it with a…

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