HNHacker News
TopNewBestAskShowJobs

chrchang523

591 karma · joined March 8, 2017

submissionscomments
chrchang523··on I use C when I believe in memory safety
Nit: struct padding and arithmetic promotion don't support this point. In practice, C compilers provide struct-packing extensions that cover the uncommon cases where default padding wouldn't yield the layout you want. And they'll let you opt-in to a style where arithmetic promotions are forced to be explicit as they are in e.g. Go. So it would usually be ridiculous to drop down to assembly for either of these reasons today.
chrchang523··on The Website Obesity Crisis (2015)
(2015)
chrchang523··on Sorting algorithms that don’t hate you
That's my usual approach, but there are clearly some programmers who don't want to always do this, and sometimes a stable-sort library function does in fact allow them to be more productive.
chrchang523··on Sorting algorithms that don’t hate you
Note that it is straightforward to modify an unstable sort algorithm into a stable one, when it’s okay to use O(n) extra memory: define an array that tracks each element’s original position, and when two elements otherwise compare equal, use the original position as the final tiebreaker.

(With that said, Timsort must be faster in practice than this kind of retrofitted unstable sort. I’m curious how large the difference is.)

chrchang523··on Ask HN: Strategies for working with engineers that are too smart?
Note that my advice, if followed, has the effect of giving the OP's engineers more space to develop efficient implementations than they would probably get if OP acts on their instincts.

This is not a coincidence. If you look at my own public work at e.g. https://github.com/chrchang/plink-ng/tree/master/2.0/ and https://github.com/grailbio/base/tree/master/simd , you can see that I play the role of the "not yet smart enough" engineer, not the manager.

chrchang523··on Ask HN: Strategies for working with engineers that are too smart?
As others have noted, part of the problem here is that the engineers in question are actually not yet smart enough. It usually takes substantial experience to identify simpler, more-maintainable ways to meet challenging performance goals. If you are not fortunate enough to have a veteran engineer who can lead the way in pushing back against unnecessary complexity, you'll want to try to grow your own.

This requires some luck, but there definitely are things you can do to help the process along. In particular, I recommend allowing some probably-unnecessary complexity -- I'd expect your engineers to innovate less and learn at a slower rate if you try too hard to stamp this out -- but be strategic in where you allow it. Software that is already load-bearing for your business should be subject to higher standards. Set an expectation that stable functionality becomes easier rather than harder to work with over time. When the backend has to become more complex to achieve performance goals, ask your engineers to do their best to encapsulate that complexity, and keep the higher-level interfaces simple.

chrchang523··on We're wasting money by only supporting gzip for raw DNA files
It addresses different bioinformatic use cases, but plink2 is an open-source tool that is widely used and makes extensive use of zstd. In particular, it accepts both gzip- and zstd-compressed text files as input, but output commands that can generate large text files often only have a zstd compression option.
chrchang523··on Gattaca draft script (1997)
No, there’s at least one scene in the movie where the DNA scanner does identify Vincent, so he is registered in the system.
chrchang523··on EABitTricks.h
Yes, this library is of uneven quality, and would benefit from a few hours of focused attention from a specialist. E.g. the various HighestBit functions below what you've called out also look inefficient relative to something using one of the builtin_clz intrinsics, even though there's an earlier use of builtin_clz...
chrchang523··on Paul Graham is leaving Twitter for now
I've deactivated the account that I created last month.

I agree that he may still salvage the situation, and I hope to reactivate or create a new account if/when that happens. For now, though, the best thing I can do is reinforce the signal that this was a major misstep, for a reason he should be well aware of: https://twitter.com/elonmusk/status/1533616384747442176

chrchang523··on SBF Arrested by Bahamian Authorities
Nit: Madoff was faster, but that's because he confessed everything to his children.
chrchang523··on FTX’s collapse was a crime, not an accident
We'll see. From my perspective, this could still go either way: he could be put in prison for a long time partly as a consequence of how much is on the record, or he may still be protected regardless of what is on the record.
chrchang523··on Ask HN: Alternatives to The Economist?
Just a personal opinion, but I'd characterize Noah Smith as "uneven", not "laughingstock". He hits enough high notes that I would be quite sad to see him go, even though I find him very unreliable.
chrchang523··on Ask HN: Alternatives to The Economist?
He believes that Trump should have the same broadcast rights that other political figures do, but he prefers DeSantis to Trump: https://www.nbcnews.com/politics/politics-news/elon-musk-ron...
chrchang523··on The Buy and Hold Mindset
Yes, you're correct about geometric brownian motion. The model must include some mean-reverting component (implied by "short time fluctuations") for DCA to come out ahead, and such a component would violate standard no-arbitrage assumptions.

This is a reason I haven't made active use of DCA. But DCA doesn't give up much, either, so I'm fine with "passively" engaging in DCA-like behavior by haphazardly dumping spare money into index funds after min("significant" drop, time limit) instead of purely maximizing time in market.

chrchang523··on AVX 512 will be the future
I'd probably use Highway in a new project; thanks for your work on it! In my main existing project, though, Highway-like code already exists as a side effect of supporting 16-byte vectors and AVX2 simultaneously, and I'd also have to give up the buildable-as-C99 property which has occasionally simplified e.g. FFI development.
chrchang523··on AVX 512 will be the future
We'll see.

There's now another game in town, exemplified by Apple's switch to ARM chips for its Macs. I'll keep an eye on the AVX2 vs. AVX-512 performance gap on Zen4+, but my working hypothesis is that my SIMD-handcoding time will be better spent on improving ARM support than upgrading AVX2 code to AVX-512 for the foreseeable future.

chrchang523··on Bankman-Fried being invited to speak at a New York Times event alongside Yellen
Protect our Future PAC is just one of several donations that were enormously larger than the $286k R / $283k D total direct candidate donations.

Meanwhile, just because a donation is received during the primary season doesn’t mean it can’t be spent during the general election period, when the candidate in question wins the primary.

chrchang523··on Bankman-Fried being invited to speak at a New York Times event alongside Yellen
You were only looking at the ~$570k assigned to specific candidates at the top. Look further down on the page: there's a $28000k donation to the Democratic "Protect our Future PAC", a $15000k donation to the Republican "American Dream Federal Action", ...
chrchang523··on Bankman-Fried being invited to speak at a New York Times event alongside Yellen
Source? I agree with the "bases covered" big picture, but all the numbers I've seen so far have D > R.
chrchang523··on Bankman-Fried being invited to speak at a New York Times event alongside Yellen
They've confirmed that he will still be showing up: https://twitter.com/andrewrsorkin/status/1595517635441090565
chrchang523··on FTX’s ownership of a U.S. bank raises questions
Note that they aren't pulling him: https://twitter.com/andrewrsorkin/status/1595517635441090565
chrchang523··on Effective Altruism Is about Getting Rich with a Clean Conscience
People are not forced to treat EA as an all-or-nothing package. If some of their claims are more convincing than others, and acceptance of only the more-convincing claims leads to SBF-like behavior with much-higher-than-background probability, it is important to strengthen some arguments, and/or withdraw community support for ideas that are currently too unsafe in practice.
chrchang523··on FTX’s Sam Bankman-Fried cashed out $300M during funding spree
Yeah. I see a fork in the road here:

1. They can band together to save the EA brand by demonstrating an unusually high commitment to accountability. The simplest way I see to do this is to contribute 2x what they received from FTX (as a group, it's impractical for them to do this on the individual level) to making the financial fraud victims whole.

2. They could "declare bankruptcy", switching to less ambitious but epistemically safer approaches to philanthropy. I wouldn't blame them for doing this, (1) is a big ask.

chrchang523··on Ask HN: What is the most impactful thing you've built?
Adopted an orphaned open-source project that was still widely used in the genomics community, despite no updates in ~4 years. Used SIMD instructions, careful memory management, and other strategies to speed up most operations by 1-4 orders of magnitude and support the current generation of biobank-scale genome-wide association studies (https://academic.oup.com/gigascience/article/4/1/s13742-015-... ).
chrchang523··on FTX used corporate funds to purchase employee homes, new filing shows
Yeah, I feel bad for admitting this because people I know were significantly harmed, but the entertainment value of this is off the charts.
chrchang523··on Sam Bankman-Fried tries to explain himself
This is further evidence that he was thinking of this in terms of all-or-nothing coin flips. In case you haven't seen it:

COWEN: Okay, but let’s say there’s a game: 51 percent, you double the Earth out somewhere else; 49 percent, it all disappears. Would you play that game? And would you keep on playing that, double or nothing?

BANKMAN-FRIED: With one caveat. Let me give the caveat first, just to be a party pooper, which is, I’m assuming these are noninteracting universes. Is that right? Because to the extent they’re in the same universe, then maybe duplicating doesn’t actually double the value because maybe they would have colonized the other one anyway, eventually.

COWEN: But holding all that constant, you’re actually getting two Earths, but you’re risking a 49 percent chance of it all disappearing.

BANKMAN-FRIED: Again, I feel compelled to say caveats here, like, “How do you really know that’s what’s happening?” Blah, blah, blah, whatever. But that aside, take the pure hypothetical.

COWEN: Then you keep on playing the game. So, what’s the chance we’re left with anything? Don’t I just St. Petersburg paradox you into nonexistence?

BANKMAN-FRIED: Well, not necessarily. Maybe you St. Petersburg paradox into an enormously valuable existence. That’s the other option.

https://conversationswithtyler.com/episodes/sam-bankman-frie...

(See the first paragraph of https://www.lesswrong.com/posts/BZ6XaCwN4QGgH9CxF/the-kelly-... for the outline of an explanation of why his reasoning was not applicable to most real-life scenarios. This is pretty subtle; >95% of the explanations on the Internet I've seen over the past week as to why SBF is "obviously wrong" don't actually work.)

Maybe I'm speaking too soon, but he does seem ready to accept that he lost this flip. It would obviously be insane to trust with him anything big at this point, but I'm optimistic that he won't fight to the bitter end.

chrchang523··on The good delusion: has effective altruism broken bad?
Wow, these guys are really lost.

I used to respect them, and even during the past few days I thought this crisis was a major opportunity for them to reflect and find their way again.

So I posted a comment on their forum with (i) an observation that they could regain trust by doing their share (I suggested twice the money they received from FTX) to make financial fraud victims whole before resuming their regular program, and (ii) a link to https://www.lesswrong.com/posts/BZ6XaCwN4QGgH9CxF/the-kelly-... , the first paragraph of which might have stopped SBF from making the big wrong turn in his reasoning (note that almost all other arguments on the Internet against SBF's reasoning don't actually work). Nothing but downvotes.

I recommend against any further association with these people in the strongest possible terms. (I'll retract this if it turns out that the downvoters were the exception and the EA community actually proceeds to demonstrate good citizenship in something like the manner I suggested, but I'm not holding my breath.)

chrchang523··on SBF posting 1 letter tweets to evade delete detection bots?
No criminal knows everything. Just because it "wouldn't even make sense" doesn't mean a criminal wouldn't try it. Caroline Ellison did delete her Tumblr accounts a few days ago. (Though if she actually wants more attention and is trying to exploit the Streisand effect... well played, Caroline, well played.)
chrchang523··on SBF posting 1 letter tweets to evade delete detection bots?
Does not explain https://twitter.com/AutismCapital/status/1592344609912672256 .

EDIT: suspending judgment again after seeing https://news.ycombinator.com/item?id=33605431 .

← PreviousPage 2 of 9Next →