Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
svat
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
451.
▲
by
svat
3y ago
Most dictionaries list only the standard form PROPRIETARY, so it is arguable whether a word list should contain "PROPRIETORY": although Merriam-Webster and Wiktionary (unlike most dictionaries) list it as an alternative spelling,
452.
▲
by
svat
3y ago
That video is actually great! The last time this formula came up, I added some references to the Wikipedia article (current version: https://en.wikipedia.org/w/index.php?title=Formula_for_prime... about the "worth
453.
▲
by
svat
3y ago
Wow this is a great optimization! You're under-selling it :) It changes the memory requirement from O(π(n)) to O(π(√n)), e.g. after processing numbers up to 100, the internal state in the OP's algorithm is: q = 101 D = {
454.
▲
by
svat
3y ago
This adds two things over the OP's initial version, both mentioned in the post: wheel factorization (with 30), and the "linear probing" to avoid lists. It's possible to keep improving (up to a point) by using e.g. wheel
455.
▲
by
svat
3y ago
This is really elegant! To make the explanation more concrete, here's a snapshot of the algorithm's state (the dict D) after it has processed numbers up to 10 (inclusive): 12: [3, 2] 25: [5] 49: [7] So each prime
456.
▲
by
svat
3y ago
I guess “studying” would be a good word: it's close enough to “reading”, while also having an educational connotation and no expectation of being a linear process. Although I'd encourage everyone to consider “reading” already as n
457.
▲
by
svat
3y ago
Yes. (As in both: yes I agree with your way of getting to know a codebase, and yes you misunderstand what at least some people mean by "read code".) See the "Code Is Not Literature" 2014 blog post that was discussed here
458.
▲
by
svat
3y ago
Wordle programs often start with a similar bug in their (similar) scoring function. Apart from tracking positions and consuming them as you suggested, there's also another approach to writing the scoring function, suggested by Knuth&#x
459.
▲
by
svat
3y ago
The Knuth approach said to be implemented in this post is described in: > The computer as Master Mind. Journal of Recreational Mathematics 9 (1976), pp. 1–6. Reprinted with an addendum as Chapter 25 of Selected Papers on Fun and Games
460.
▲
by
svat
3y ago
For the continued-fraction convergents, instead of Mathematica, here's a web page of mine that does the same thing: https://shreevatsa.net/fraction/best (try it with the 3.213432 from the post, and a large limit f
461.
▲
by
svat
3y ago
A great companion read to this piece, diving deeper into one of the anecdotes mentioned, is "Reading Programs with Donald Knuth" (2018) by Dylan Lederle-Ensign: http://www.dlederle.com/2018/11/25/rea
462.
▲
by
svat
3y ago
Software that does not run in the browser can do even worse things (that are not possible in a browser): it could access (and upload) arbitrary files other than just the PDF file(s) you gave it access to, it could set up things that stay ru
463.
▲
by
svat
3y ago
Big fan of the idea of offline in-browser tools: works on any device, and "installing" the program is as simple as visiting a webpage or opening the saved HTML file. This one uses WebAssembly, but even that isn't necessary: I
464.
▲
by
svat
3y ago
Indeed, Knuth writes in TAOCP Vol 4A (in section "7.1.3. Bitwise Tricks and Techniques", previously pre-fascicle 1a: https://cs.stanford.edu/~knuth/fasc1a.ps.gz ): > Early machine designers provided fullwor
465.
▲
by
svat
3y ago
That the curvatures are integers is proved (noticed by Soddy in 1936 as "a fairly straightforward consequence of Descartes’ equation", as the article mentions), and a lot more is also proved about the integers' distribution;
466.
▲
by
svat
3y ago
> other areas like number theory … In case you didn't notice: the article is about a discovery in number theory. The primary mathematician in this story (search the article for "Stange is a number theorist…"), the ones re
467.
▲
by
svat
3y ago
> There was a study a while back A couple of posts about how poor that paper was: • https://lemire.me/blog/2015/01/14/knauff-and-nejasmic-recomm... • https://blog.cr.yp.to/20201206-m
468.
▲
by
svat
3y ago
Good joke :-) This is already very tangential, but just for the benefit of anyone who may miss the humour and take the above comment seriously: - re “couldn't afford professional typesetting”: Knuth was happy when Addison–Wesley approa
469.
▲
by
svat
3y ago
He means both. From his 1974 Turing lecture ("Computer Programming as an Art" http://www.paulgraham.com/knuth.html ): > To summarize: We have seen that computer programming is an art, because it applies accumula
470.
▲
by
svat
3y ago
`pdfinfo` on the file says: Creator: Acrobat PDFMaker 23 for Word Producer: Adobe PDF Library 23.3.247; modified using iText® 7.1.6 ©2000-2019 iText Group NV (Administrative Office of the United States Courts; licen
471.
▲
by
svat
3y ago
Stirling's approximation carried out to more terms gives: b = n/e + ln(2πn)/2e + (3(ln(2πn))^2 + 2)/(24en) + o(1/n) which becomes a good approximation for large n: https://colab.research.google.c
472.
▲
by
svat
3y ago
I was thinking of this again this weekend, after spending a couple of hours reading some literate programs again, in light of Knuth's recent (via https://twitter.com/ksmeel/status/1661890306370072576 ) note h
473.
▲
by
svat
3y ago
I missed this conversation earlier, but see my response to that post here: https://news.ycombinator.com/item?id=29871047 (also see https://news.ycombinator.com/item?id=30762055 ) — in short, literate program
474.
▲
by
svat
3y ago
The story, as a dialogue: Knuth: I've come up with an idea I like, called literate programming, and a system called WEB. I wrote TeX in WEB. Bentley: I took a look, and I love it! But TeX is 600 pages long; could you give me a WEB e
475.
▲
by
svat
3y ago
Nice post. Blog posts on TeX's internals are rare; see also Graham Douglas's posts on his blog ( http://www.readytext.co.uk/?cat=14 ) and on Overleaf: https://www.overleaf.com/learn/latex/A
476.
▲
by
svat
4y ago
Run `texdoc errorlog`, or visit http://mirrors.ctan.org/info/knuth-pdf/errata/errorlog.pdf — published as Chapter 11 ("The error log of TeX") of the book (collection of papers) Literate Programming
477.
▲
by
svat
4y ago
I ran into some videos on this channel (Dr Geoff Lindsey) a few weeks ago, and they are really good IMO. If you glance at the video thumbnails they appear like low-quality clickbait, but the content inside is solid linguistics and very info
478.
▲
by
svat
4y ago
This is from long ago (1989+), but I read it recently: "A Carnatic Music Primer" by P. Sriram ( https://sanskritdocuments.org/english/carnatic.pdf / http://www.ae.iitm.ac.in/~sriram/k
479.
▲
by
svat
4y ago
All disagreements are about "weights", and it's instructive to ponder what this one is about. IMO giving people a process/documentation does help to some extent, so the dichotomy the author presents here is between tho
480.
▲
by
svat
4y ago
I see your confusion. The thing is that “trigonometric proof” is not a well-defined mathematical object (even in this HN thread, you can see a lot of discussion about whether the trigonometry is really essential to the proof, ways to remove
More ›