Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    D

    David Bau

    davidbau.com · Personal blog · on HN since 2009

    David Bau, a software engineer and researcher, writes on math, programming, teaching kids to code, and AI.

    Visit blogRSSHN submissions
    MathProgrammingAI & Machine Learning
    What HN says

    HN commenters link his math visualizations, his pi approximation posts, and his stories about teaching a child to program.

    Stats for nerds
    28HN people shared it
    19linked in comments
    607story points
    Aug 2024last shared
    2010people per year2024

    Top posts on HN

    1. 1
      The Mystery of 355/113 (2010)
      4 people · 393 points · first shared 2012 · 106 comments on HN
    2. 2
      Two kinds of vibe coding
      1 person · 135 points · first shared 2025 · 100 comments on HN
    3. 3
      Someday we will all program in Python
      2 people · 55 points · first shared 2009 · 77 comments on HN
    4. 4
      Conformal map visualizer
      3 people · 7 points · first shared 2015 · 1 comments on HN
    5. 5
      Global Catastrophizing (2021)
      1 person · 3 points · first shared 2024 · Discussion on HN
    6. 6
      Dario's Weird Race to the Top
      1 person · 3 points · first shared 2026 · Discussion on HN
    7. 7
      Does Computer Science Still Exists?
      1 person · 2 points · first shared 2026 · Discussion on HN
    8. 8
      Local Variable Debugging with see.js
      1 person · 2 points · first shared 2013 · Discussion on HN
    9. 9
      In Defense of Curiosity
      1 person · 2 points · first shared 2025 · Discussion on HN
    10. 10
      Random Seeds, Coded Hints, and Quintillions
      3 people · 1 points · first shared 2011 · Discussion on HN

    What HN people wrote when they linked it

    • magikarpAug 2011

      It is ridiculous that even in light of the COMODO HTTPS hack, the writer would go as far as to say that SSL/TLS is a better solution.

      The writer also ignores that there are potential solutions to many of the problems pointed out:
      In case of random number generation, check out seedrandom: http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html
      And while it's true that the server may always send "poisoned" JavaScript code, projects that heavily depend on such code, such as Cryptocat, now ship browser plugins that perform integrity checks on the code for you: https://chrome.google.com/webstore/detail/dlafegoljmjdfmhgoeojifolidmllaie

      Furthermore, and most importantly, by using SSL/TLS, the data being sent by the browser to the server is encrypted as it passes through the network, but however remains readable by the server when it reaches it. Whereas with client-side JS crypto, the server cannot read the sensitive data. If the writer does not trust the server to send correct JS code, how can he trust it with the sensitive data itself, in plaintext, which is what he is doing by using SSL/TLS? As I mentioned above, there exist browser plugins for a few projects to verify the integrity of the JS crypto they use.

    • quadhomeAug 2011

      I'll wait for the cryptographers to weigh in; but, it's in Javascript.. already a language that's going to be hard to Do It Right in. (The first third of the code is a BigInteger implementation)

      Then, I looked to see if the standard constant-time comparisons were in there to resist timing attacks. No dice there.

      So... cool. He put a nice wrapper on JSAES[1], jsSHA2[2] by way of webtoolkit.info[3], RSA and ECC in Javascript by Tom Wu[4], and seedrandom.js by David Bau[5].

      But then then says it's "New BSD license"[6] when it should be GPL[7].

      I didn't start this comment sound negative. But, I think a few things are important:

      * Credit authors.

      * Respect their licenses.

      * Put a big fucking notice on top of your slick webpage: "FOR DEMONSTRATION PURPOSES ONLY-- NOT REAL CRYPTO"

      [1] http://point-at-infinity.org/jsaes/
      [2] http://anmar.eu.org/projects/jssha2/
      [3] http://www.webtoolkit.info/javascript-sha256.html
      [4] http://www-cs-students.stanford.edu/~tjw/jsbn/
      [5] http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html
      [6] http://code.google.com/p/cryptico/
      [7] http://code.google.com/p/cryptico/source/browse/trunk/aes.js

    • bokchoiMar 2014

      I agree. This is something that XMLSchema got both right and wrong. The XMLSchema basic datatypes [0] are well defined and for the most part fit nicely in host languages. However, they really screwed up with the complex types making it difficult to map onto programming languages for multiple reasons (sequence/choice can't be easily modeled in most programming languages without intermediate types, extension versus restriction, derivation versus substitution groups.) For a good write up of the design philosophy behind XMLBeans, see:

      http://davidbau.com/archives/2003/11/14/the_design_of_xmlbeans_part_1.html

      [0] http://www.w3.org/TR/xmlschema-2/

    • chriswarboJun 2021

      Here is pi, written as a number to infinite precision (from http://davidbau.com/archives/2010/03/14/python_pipy_spigot.html ):

      def pi_decimal_digits():
      q, r, t, j = 1, 180, 60, 2
      while True:
      u, y = 3*(3*j+1)*(3*j+2), (q*(27*j-12)+5*r)//(5*t)
      yield y
      q, r, t, j = 10*q*j*(2*j-1), 10*u*(q*(5*j-2)+r-y*t), t*u, j+1

      If you mean that pi can't be written as a number to infinite precision using place-value notation (as opposed to a more useful notation like Python) then I agree that only a finite prefix can ever be observed.

    • PebblesRoxJan 2021

      My kids aren't quite old enough, but I recently enjoyed the following stories:

      "Haaarg, world!" (writing a vampire-themed number-guessing game with a six-year-old): http://davidbau.com/archives/2005/07/29/haaarg_world.html

      Madlibs with a 13-Year-Old: https://nedbatchelder.com/text/madlibs.html

    • cfuegosAug 2012

      David Bau's seedrandom.js is quite interesting:

      [It] defines a method Math.seedrandom() that, when called, substitutes an explicitly seeded RC4-based algorithm for Math.random(). Also supports automatic seeding from local or network sources of entropy.

      http://davidbau.com/encode/seedrandom.js

    Related

    Simon Willisonsimonwillison.net957 people

    How to succeed in MrBeast production (Leaked PDF)

    Simon Willison
    Personal · last shared 2026
    Drew Breunigdbreunig.com43 people

    DuckDB is probably the most important geospatial software of the last decade

    Drew Breunig
    Personal · last shared 2026
    Joel Grusjoelgrus.com58 people

    Hacking Hacker News

    Joel Grus
    Personal · last shared 2026
    David Givencowlark.com94 people

    Live coding a vi for CP/M from scratch

    David Given
    Personal · last shared 2026
    Gödel's Lost Letterrjlipton.wordpress.com185 people

    Mihai Pătraşcu 1982–2012

    Gödel's Lost Letter
    Personal · last shared 2021
    Google Research Bloggoogleresearch.blogspot.com303 people

    Announcing SyntaxNet: The World’s Most Accurate Natural Language Parser

    Google Research Blog
    Company · last shared 2017
    Towards Data Sciencemedium.com/towards-data-science90 people

    Audio processing in TensorFlow

    Towards Data Science
    Publication · last shared 2025
    Salesforce Research Blogblog.einstein.ai25 people

    Talk to Your Data: One Model, Any Relational Database

    Salesforce Research Blog
    Company · last shared 2021