shachaf

3.3K posts

shachaf

shachaf

@shachaf

@[email protected]; @shachaf.net

London, England Katılım Mart 2009
0 Takip Edilen1.2K Takipçiler
shachaf
shachaf@shachaf·
It's funny, I never noticed that strong induction doesn't need an explicit base case.
English
0
1
5
224
shachaf retweetledi
Adam Scherlis
Adam Scherlis@ascherlis·
I added a y-axis to the latest xkcd.
Adam Scherlis tweet media
English
2
2
11
621
shachaf retweetledi
Gappy (Giuseppe Paleologo)
Gappy (Giuseppe Paleologo)@__paleologo·
I did not know that, for any random variable x, | mean(x) - median(x) | <= stdev(x) Direct proof:
Gappy (Giuseppe Paleologo) tweet media
English
52
200
2.8K
242.3K
shachaf
shachaf@shachaf·
@reubenbond But also I think it's impossible to get a quorum of accepts with ballot n and also a reject with accepted_ballot>n in the first place (but highest_ballot_seen might be >n, of course).
English
0
0
0
29
Reuben Bond
Reuben Bond@reubenbond·
@shachaf Yeah, it's safe either way. We can learn that a value was previously committed even if we don't get a quorum of ACK votes, so we are leaving less info on the table by also considering those NACKs when they're available
English
1
0
1
70
Reuben Bond
Reuben Bond@reubenbond·
Arguing with GPT 5.4 about why the Paxos algo change you're suggesting is safe is better than second-guessing yourself after yet another "You're absolutely right!"
English
2
0
11
965
shachaf
shachaf@shachaf·
@reubenbond I guess the argument is that if you have a quorum of success responses, the other responses don't matter, because you're permitted to behave as if you never received them (which would have still let you proceed).
English
1
0
0
37
Reuben Bond
Reuben Bond@reubenbond·
@shachaf The toy impl was ignoring the (accepted_ballot, accepted_value) returned in Prepare rejections, only considering the values returned in success responses.
English
1
0
0
65
shachaf
shachaf@shachaf·
@jamesacowling I'm surprised at how successful a compression algorithm with no entropy coding has been! I wouldn't have expected that.
English
0
0
1
110
James Cowling
James Cowling@jamesacowling·
We experimented with various compression schemes for Convex data and settled on LZ4. Getting around 50% space savings when persisting new Convex documents internally
James Cowling tweet media
English
6
1
41
2.5K
shachaf
shachaf@shachaf·
@TommyYesItsMe I mean, I think it's a reasonable name for either of these things, it's just funny when people say things like "you think your CPU has 16 registers, but actually it has hundreds" when they're comparing two different things that happen to have the same name.
English
0
0
3
90
Tom Miller
Tom Miller@TommyYesItsMe·
@shachaf I'm aware of register renaming and the register file, but does the ambiguity matter in practice? 99% of people aren't designing a new CPU, so when normies say "register RBP" it seems good enough to me.
English
1
0
3
122
shachaf
shachaf@shachaf·
It's funny that people say "register" to mean both an aspect of encoding an instruction graph and a physical place in the CPU where data is stored. These are really very different things!
English
4
1
33
8.2K
shachaf
shachaf@shachaf·
@TimSweeneyEpic Not uniquely! (0, ℕ) represents the same number as (1, {}) in this scheme.
English
3
1
6
1.7K
Tim Sweeney
Tim Sweeney@TimSweeneyEpic·
This is a misconception. A real number can be uniquely described as a pair of an integer part, and an infinite set of natural numbers each standing for the index of a nonzero bit.
MatLab crashes@memecrashes

English
28
10
122
29.5K
shachaf
shachaf@shachaf·
@machinamentum Smaller reproduction: godbolt.org/z/bzEYoc8jT I don't know if MSVC claims to support C23, which I think was the first version that supported {} initialization (and I'm not sure what the standard says about {} initialization for unions?).
English
0
0
2
76
shachaf
shachaf@shachaf·
@FelixCLC_ @corsix @AravindSitham As a US citizen who moved to the UK last year, I'm really not looking forward to dealing with having two overlapping tax years.
English
1
0
2
76
Aravind Sithamparapillai
Aravind Sithamparapillai@AravindSitham·
Alright so who woke up and thought "Ah the first thing I must do is fund my TFSA/RESP"? (And FHSA where eligible) If that was you - Happy New Year's you disciplined animal. I love it. If that wasn't you - Happy New Year's you regular person. I love it as well 😂
English
5
0
27
2.1K
shachaf
shachaf@shachaf·
@svat I didn't know about this algorithm! From the permutation perspective it's very straightforward -- if you have a cyclic permutation of [0,n), you can splice in n at any point. But with the sampling version it seems trickier.
English
1
0
1
42
shachaf retweetledi
Shreevatsa R
Shreevatsa R@svat·
In hindsight I came close, when I tried to derive Sattolo's algorithm but ended up with the “other” variant: news.ycombinator.com/item?id=149716…—noticed the difference but hand-waved it away; did not think to relate it to the shuffle. A reminder that paying attention is usually worthwhile :)
English
2
2
4
415
Shreevatsa R
Shreevatsa R@svat·
This is such a cool observation! I must have coded this shuffle dozens of times, but the permutation variant/idea never occurred to me AFAIR. It's even easier to prove and reason about IMO.
shachaf@shachaf

This is interesting: dotat.at/@/2025-12-25-s… In one shuffle algorithm, on step i, you have a sample (without replacement) of i elements. In the other algorithm, on step i, you have a permutation of the first i elements. I've only ever thought of the sampling-based algorithm!

English
1
1
4
299
shachaf
shachaf@shachaf·
This is interesting: dotat.at/@/2025-12-25-s… In one shuffle algorithm, on step i, you have a sample (without replacement) of i elements. In the other algorithm, on step i, you have a permutation of the first i elements. I've only ever thought of the sampling-based algorithm!
English
0
0
5
632
shachaf retweetledi
Jeff Dean
Jeff Dean@JeffDean·
Performance Hints Over the years, my colleague Sanjay Ghemawat and I have done a fair bit of diving into performance tuning of various pieces of code. We wrote an internal Performance Hints document a couple of years ago as a way of identifying some general principles and we've recently published a version of it externally. We'd love any feedback you might have! Read the full doc at: abseil.io/fast/hints.html
Jeff Dean tweet media
English
106
1.1K
7.7K
2.1M
shachaf
shachaf@shachaf·
@GrantSlatton Wait till you hear about the Primate of All England!
English
0
0
2
107
Grant Slatton
Grant Slatton@GrantSlatton·
disappointed to learn this has nothing to do with gorillas
Grant Slatton tweet media
English
3
0
19
1.5K