HN user

ethan_g

129 karma
Posts0
Comments40
View on HN
No posts found.

No the gp is correct, references in c++ can't be null. Your code invoked undefined behavior before you did anything with a reference, namely *a which is a null pointer dereference.

I don't know why this was getting downvoted, because it's correct. All the banks repaid their TARP loans from the Fed at a significant profit (https://en.wikipedia.org/wiki/Troubled_Asset_Relief_Program).

Even QE, which is not a direct bailout but certainly helped banks' profits, was substantially profitable for the treasury the last I heard.

(edit) Let me add, I was no fan of the bail-outs when they happened. But I can't deny they were, in retrospect, really profitable.

stable of smart people operate in the stable of the corporations writing arguments for newspapers and magazine

I'm not sure if you're suggesting Matt Levine is "in the stable of corporations", but if you read his article history, he's clearly not. One reason (among many) it's fun to read him, is his incisive criticism of his previous jobs in finance and law.

To be clear, regulatory capture is when the regulator advances the interests of the industry rather than of the public. Revolving door is a separate issue.

There's an interesting argument that the revolving door actually prevents regulatory capture through encouraging regulators to be more strict. The idea is that the more onerous the regulations, the more desireable it is for corporations to hire former regulators who know the system. "Keep your friends close, and your enemies closer."

Matt Levine's take on it: https://www.bloomberg.com/view/articles/2014-06-26/strict-re...

Certainly the first thing that's apparent when watching pros play is their speed. However, after playing years of Tetris myself (though nowhere near pro level), I've really come to appeciate that speed is only a small fraction of what makes pros pro.

* Many multiplayer games give bonuses for combos (multiple consecutive line clears), T-spins, and Tetrises. Setting these up efficiently can require reading several pieces ahead and takes a ton of practice. An example where both players do a fairly elaborate setup, one with combos and the other with T-spins: https://www.youtube.com/watch?v=mASSHXLTuU4

* 20G mode, made famous by games like TGM, drastically reduces the ability to manipulate the pieces. Even surviving takes new strategies (you're forced to play a lot of strange moves), much less making tetrises like the pros do. https://www.youtube.com/watch?v=aoU0DQh7zdU

* Some multiplayer games give difficult garbage, I'm thinking of Cultris 2 specifically. Clearing garbage efficiently, known as "downstacking", requires much more careful piece placement than regular play. It's hard to appreciate from video, but if you compare pros downstacking to a normal person, you can see they use fewer pieces to clear the same amount of garbage, which is a real competitive advantage. https://www.youtube.com/watch?v=OgK4aJ_3zCw

Keep in mind weightlifting has weight classes, so getting bigger muscles by taking lots of steroids is partially offset by moving up a weight class. Steroids can make small guys big, but big guys are expected to lift that much more.

Given the limits of what the human body can do within a weight class, a 10% boost in your total for the same weight class is huge. The article saying it's "modest" I think is misleading: while it's true 10% is small on an absolute scale, it's huge on a competitive scale.

To give an idea how overwhelming doping is on weightlifting performance, the IWF reset all the records in 1992 and again in 1998 as the old world records were essentially unbeatable as drug testing got better.

(Edit) If you're interesting in a very detailed essay on the topic, I enjoy reading Greg Nuckols: https://www.strongerbyscience.com/steroids-and-strength-diff...

I tend to agree with GP that this is suspiciously simple. I've only skimmed it, but the novel part of the proof appears to only be Thm 5-6 which is less than 10 pages, and it's not especially dense writing. So this would be a relatively simple proof. Moreover, the technique used appears to be rather incremental over known techniques, so it's surprising it would be strong enough to prove PvNP which is so far away from the frontier of known techniques.

Interesting that this is the second P!=NP proof from a University of Bonn researcher. Other one, by Mathias Hauptmann, is here: https://arxiv.org/abs/1602.04781

I never did hear the status of Hauptmann's proof (I'm not connected to academia so only know what I've read on the internet), but given it's been over a year without word, presumably there's something flawed.

I might not get too excited over this proof, either, until another member of the TCS community can vouch for it. There have been many serious-looking attempts at PvNP that turn out to have fundamental flaws.

Learning to Squat 9 years ago

If I could go back in time to my teenage self and give one piece of advice, it would be to do heavy squats. They're that good.

Though I'm not athletic by any competitive standards, being physically active has always been important to my health and well-being. I've tried a pretty good variety of sports and activities, and of everything I've tried, strength training--squats in particular--have had the best cost/benefit. Doesn't bother my joints and very few (if any) injuries. Doesn't take much time to get an intense workout done. Good for maintaining flexibility, especially after programming at a desk all day long. Fills my body with youthful hormones.

YMMV, but for me, squats are the best thing I've ever discovered for exercise.

No, this is not the approach at any of the large banks.

It's not the fine that kills you. It's when your customers lose your trust and no one trades with you any more. Goldman has a ton of competitors in all their businesses that would pounce on any angle they could use to lure away customers. Committing fraud, etc, is a quick way to lose all your customers.

Plus the SEC and other regulators have a lot of political pressure to nail the big banks for any misbehavior.

Big banks are paranoid about these things and have huge compliance departments to minimize the chance of anything going wrong with a regulator.

The thing about this approach--where you learn by assimilation rather than structured study--is that it you need to have amazing intuition for it to work. One of the benefits of structured study is gradually building intuition of the definitions and theorems. For someone of Scholze's caliber, the intuition is already there before any study. Structured study of linear algebra probably wouldn't have done much for him other than assigns names to theorems and definitions that he already intuitively understands.

I might make an analogy to studying music: for the majority of people, it takes a lot of structured study to develop a good ear (i.e. being able to write down melodies and harmony after hearing it). For example, you'll study intervals, chords, and inversions, and extensive practice identifying them on hearing--just as you learn theorems and definitions in math class and do problem sets to practice applying them. But some people innately have a very good ear (e.g. perfect pitch) and don't need a course to teach them to identify intervals and chords. Even though they might not yet know the names of chords and intervals, they already "understand" them.

While I generally agree with your point, it's hard to make this into law. Do you think it should be illegal to have a company with only 1 programmer? If not, how do you prevent them from making catastrophic mistakes?

Whether you can give real-world questions depends a lot on the domain. If you're using popular open-source tools, you may be able to test a candidate on the ability to complete standard tasks with them. But what if you're using tons of proprietary software and working in a specialized domain where you expect people to learn on the job? That was the case where I used to work (quant finance). We need programming questions that assess candidate's general ability rather than anything domain-specific. The linked-list question is a perfectly fair non-domain-specific question.

Your example of rewrite rules reminds me a lot of expression templates in C++, though there's no direct support by the language and it's done through the type system instead. Some libraries (e.g. eigen or the boost library for linear algebra) use expression templates to produce optimized code for a chain of functions or operators.

The specialization example is the same as template specialization in C++.

The top-rated answer is either defeatist, or just rationalization for the sentiment "I had to go through this and figure out everything myself, so you should too".

Yes, I agree this MO answer (and several others) seem to be rationalizing the situation rather than acknowledging how suboptimal it is.

I think I'm a good example of the system's failure. Coming in to college, I was something of an ideal candidate for becoming a mathematician. I had some success in Olympiads and already had decided I wanted to study math. My goal in life was to be a math professor. I enrolled in a top college and took many graduate-level classes. However, by my senior year, when it was time for me to decide the next step in life, grad school or industry, I had become somewhat disenchanted with theoretical math. Math was so abstract I started losing interest: all this commutative algrebra (for example) I learned wasn't making me feel like I had any new insights into solving math problems, outside commutative algebra problem sets.

And so I went into industry.

However, I can't help but think that if I had more knowledge of the motivation behind all the abstract math, I wouldn't have lost interest. All that machinery of commutative algebra was invented for specific reasons, such as solving polynomial equations in the rationals through algebraic geometry. Years later, through casually reading math on the internet, I've been getting hints as to what power these highly abstract frameworks give you for solving concrete problems. But without seeing the end goal, and having some idea why I should be learning this in the first place, I felt like I was just getting lost in abstract nonsense.

Most of that foundational information is lost when it's not written down somewhere accessible; contrary to the answerer, only a small fraction is reconstructed by students as they learn the subject.

This is exactly right. I personally failed to reconstruct enough to keep myself interested in the subject.

I'm not an expert in logic, but I can help a bit here.

For reference, here is the theorem in the blog post:

There is a Turing machine program e, such that (1) PA proves that e accepts only finitely many inputs. (2) For any particular finite subset A of N, there is a model M of PA such that inside M, the program e accepts all and only the elements of A. (3) Indeed, for any subset A of N, including infinite sets, there is a model M of PA such that inside M, program e accepts n if and only if n is in A.

What you call the "loose" definition of finite is indeed what's being used here. The way (1) is stated, it implies the definition of "finite" must be within PA itself (otherwise PA couldn't prove it). Your "loose" definition is the only way to define "finite" within PA itself.

You are correct that in the presence of non-standard numbers, a set that PA proves is "finite" could actually be infinite in the model. Indeed, that explains how (3) is even possible!

As for whether A can contain non-standard numbers, the answer is no. Note that A is a variable defined in the meta-theory, since it is in the statement of the theorem (2) and (3). Therefore the "standard" versus "non-standard" label doesn't apply to A. The trick here is that there's an implicit "conversion" that needs to happen when going from A in the metatheory (where it is a subset of N) to A as a set of numbers in M. When that conversion happens, all the elements will be standard. This is a more precise way of phrasing (2) that might help, where I've used quotes to indicate exactly what's a statement in PA (as opposed to meta-theory):

(2') For any particular finite set A in N, there is a model M of PA such that the statement "e accepts n" is true in M iff n is in A.

Soylent has 20% of calories from protein - good luck with that if you do any physical activity.

20% calories from protein is fine. Even for a strength athlete, if you are trying to gain muscle mass, 20kcal/lb and 1g protein/lb is a reasonable set of macros, which indeed is 20% calories from protein. A lot of bodybuilders will go up to 25% or even 30% from protein, but that's on the high end and certainly not something that would make sense for non-strength athletes.

It's not just the fool's problem if they lose their money. It becomes society's problem. Someone has to take care of them.

And it's not a small problem, there are a lot of "fools" out there. That's why these laws got made in the first place.

This is why I still enjoy listening to recordings from the earlier half of the 20th century, despite the reduced sound quality. Musicians seemed a lot more adventurous back then. Today, many of the top performers sound very similar.

How to Build Muscle 10 years ago

I was a bit suspicious when he claimed 20 lbs in 3 months; usually 1 lb/week is considered the upper limit for beginners. Then I saw he was suggesting a high creatine intake, which for many people will cause them to retain water. I imagine a significant fraction of that 20 lbs is water weight, meaning it's easily lost when you stop taking supplements and working out for a little while. That said, the water is stored in your muscles, so it does make them look bigger. It's just not a permanent kind of gain.

The Math Myth 10 years ago

If you define "really make it" as making millions every year, yes that's rare. But if it's making 300k+ per year, there are multitudes of math-types doing that, and not much luck is involved.