Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jwilk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
601.
▲
by
jwilk
4y ago
Earlier today: https://news.ycombinator.com/item?id=33810755 (40 comments at the moment)
602.
▲
by
jwilk
4y ago
Quite popular misspelling: https://codesearch.debian.net/search?q=%28%3Fi%29%5Cbiso%5B+...
603.
▲
by
jwilk
4y ago
There's also json_pp(1), provided by Perl.
604.
▲
by
jwilk
4y ago
You can think of it as Knuth's unshuffle. :)
605.
▲
by
jwilk
4y ago
That probably works too, but it's even more awkard than the Knuth's one, and doesn't have the nice properties I mentioned. I meant just: for i in range(1, len(x)): r = randrange(i + 1) x[i], x[r] = x[r],
606.
▲
by
jwilk
4y ago
https://i.imgur.com/hTbvwR9.png
607.
▲
by
jwilk
4y ago
I know Knuth wrote it that way, but there's no good reason why the iteration should be downwards. That is, you could write: for i in range(1, len(x)) and you would still get an unbiased shuffle algorithm. The upwards iteration h
608.
▲
by
jwilk
4y ago
> You could try [T, T-1], but that's a bit clunky and it won't work if T is a decimal number. Huh? What do they mean by "decimal number"?
609.
▲
by
jwilk
4y ago
What do you mean by "extra headers"?
610.
▲
by
jwilk
4y ago
Discussed on HN: https://news.ycombinator.com/item?id=33667270 (2 days ago, 68 comments)
611.
▲
by
jwilk
4y ago
Archived copy that works without JS: https://archive.today/Hz81c
612.
▲
by
jwilk
4y ago
This can be downloaded with youtube-dl: https://tcmedia.akamaized.net/techchannel/11131/iPhone/AA120...
613.
▲
by
jwilk
4y ago
That's #15 on the list.
614.
▲
by
jwilk
4y ago
Kinda relevant, because [-] doesn't work with JS disabled. :-P
615.
▲
by
jwilk
4y ago
Better link: https://en.wikipedia.org/wiki/The_Farmer's_Market
616.
▲
by
jwilk
4y ago
> PDF was defined way back before Unicode was ever a thing. Unicode 1.0 was released in 1991. PDF 1.0 was released in 1993.
617.
▲
by
jwilk
4y ago
> lack of proper Unicode What do you mean?
618.
▲
by
jwilk
4y ago
Why 7?
619.
▲
by
jwilk
4y ago
> "git checkout" can is used for 3 different things: “switch”, “create branch”, and “revert a file” Git v2.23 (released in August 2019) added "git switch" and "git restore" commands to straighten this up.
620.
▲
by
jwilk
4y ago
> What about sorting them, by date. Sounds typical, common if you dare say... If you think it's in git-tag, your princess is in another castle. Since Git v2.0 (released in May 2014), you can do: git tag --sort=taggerdate
621.
▲
by
jwilk
4y ago
The wired.com link doesn't work me ("Sorry, something has gone wrong"). Archived copy: https://web.archive.org/web/20221116003941/https://www.wired...
622.
▲
by
jwilk
4y ago
Since September 2018 at least: https://discuss.python.org/t/welcome-to-discourse-say-hi/8
623.
▲
by
jwilk
4y ago
You linked to Python 3.13 removals. Python 3.12 removals are here: https://docs.python.org/dev/whatsnew/3.12.html#removed
624.
▲
by
jwilk
4y ago
If you're getting Access Denied, here's an archived copy: https://web.archive.org/web/20221115123055/https://www.kbb.c...
625.
▲
by
jwilk
4y ago
Non-AMP link: https://www.complex.com/pop-culture/2015/09/history-of-the-s...
626.
▲
by
jwilk
4y ago
How much do you pay for electricity?
627.
▲
by
jwilk
4y ago
https://archive.today/s7XLE
628.
▲
by
jwilk
4y ago
FWIW, it's a technical term defined as: > the process by which a value is reduced modulo 2ᴺ, where N is the width of the resulting type
629.
▲
by
jwilk
4y ago
As others pointed out elsewhere, as as you suspected, early calloc() implementations didn't zero memory or check for overflow. "Why is calloc useful?" would be probably a better title.
630.
▲
by
jwilk
4y ago
As a data point, C23 added explicit wording about overflow handling in calloc(): > The calloc function returns […] a null pointer […] if the mathematical product of nmemb * size is not representable as a value of type size_t. So appare
More ›