HNHacker News
TopNewBestAskShowJobs

anatoly

2,243 karma · joined April 22, 2008

Anatoly Vorobey (avorobey@gmail.com)
submissionscomments
anatoly··on The Y Combinator (no, not that one) – A Crash Course on Lambda Calculus
Has the Y combinator been useful to anything? Has it been used in any software in a role other than pedagogic?

It's a beautiful way to make a recursive call without binding the function to an identifier, but has it actually proven useful? It would seem that languages that allow that make it easy to use the Y combinator also typically make it easy to use named recursion with a permanent or a temporary name.

anatoly··on Game about squares
Everything you said, plus - in the last levels I usually tried to find "the difficult thing" first. After looking at the push directions a bit, it becomes obvious that the difficult thing is going to be to position the red square, say. Then imagine possible solutions to the difficult thing, and go both forwards (after it's done the end is usually close) and backwards (how to set up the solution).
anatoly··on Conspiracy and an off-by-one error
Very nice writeup!

To finish the puzzle, consider the following comment in one open-source mp4 library: https://github.com/l-smash/l-smash/blob/master/core/box.h

"According to ISO/IEC-14496-5-2001, the difference between Unix time and Mac OS time is 2082758400. However this is wrong and 2082844800 is correct."

MP4 stores timestamps by Mac epochs. The wrong value of the difference between Unix and Mac epochs is wrong exactly by 24 hours and is hardcoded in the MPEG-4 reference software, from which it made its way into a number of libraries.

(I work for Google and have contacted the right people in the attempt to address this bug soon).

anatoly··on Harry Potter and the Methods of Rationality
It's chapter 8 (or "arc" 8 as the author calls it).
anatoly··on Harry Potter and the Methods of Rationality
I was undecided about it right up until the big fight with the big L in one of the early chapters. That was so emotionally captivating, so epic and detail-rich at the same time, I was just walking around in disbelief afterwards going "What the hell did I just read?! How... but how...?!"
anatoly··on Harry Potter and the Methods of Rationality
I honestly don't understand how it's not published yet. Yeah, it's extremely lengthy, and may need to get slimmed down in editing, but it's just so good, better by far than most current published SF out there.
anatoly··on Harry Potter and the Methods of Rationality
Worm by Wildbow is also very much worth a try: http://parahumans.wordpress.com/

Not a fan fiction, like HPMoR, but rather a lengthy novel about superheroes and supervillains that takes the subject seriously and with an incredible amount of inventiveness. It may sound lame, but just try it for a chapter or two.

anatoly··on Strongest chess player, ever
Can anyone comment on what makes stockfish different from other chess engines? If I'm curious about state of the art in computer chess, is it worthwhile to study its source? What interesting ideas should I expect to see there beyond what I vaguely know to be the standard approach from introductory AI courses, i.e. some sort of alpha-beta pruning search?
anatoly··on Check your Google history
66k. Aww, I'd have guessed something like 100k. Weirdly disappointed.
anatoly··on Why bad scientific code beats code following "best practices"
They keep saying that drinking lots of sugary drinks is bad for your health.

But I've seen people who drink lots of sugary drinks, and I've seen people who eat greasy burgers and nothing else, and let me tell you, the people who eat greasy burgers are much worse off.

It is therefore important to understand that drinking lots of sugary drinks beats eating only greasy burgers.

anatoly··on The slow death of purposeless walking
It also works with most comments here!

Whoever thought this up is a genius. Thanks for brightening my day.

anatoly··on Uncle Bob on DHH: Monogamous TDD
While this is true, DHH in his article largely dismissed not merely testing first, but unit tests altogether, explaining that he prefers to focused on system tests. This set the tone to many subsequent reactions.

But there's no reason to tie TDD and unit testing together. Many people who dislike TDD swear by unit tests and most of their testing code is unit tests. They merely prefer to think of TDD as a much too extreme form of unit testing that turns out to harm more than it helps.

From that point of view (which I share), DHH's rant is puzzling. It's like that meme with Michael Phelps' mom. He's against TDD! Yay! Down with unit-testing! Wait, what?

"Less emphasis on unit tests, because we're no longer doing test-first as a design practice, and more emphasis on, yes, slow, system tests." Huh? How does that follow? How about, let's not do test-first as a design practice, and _still_ retain emphasis on unit tests? Because they catch plenty of bugs, because they exercise more functionality than system tests will, because in dynamic languages they protect you from silly type errors, because they make refactoring merely unpleasant instead of a horror show...

anatoly··on Division By Three (2006)
(cont'd)

OK, so who needs this? Well, this paper is beautiful on its own, but it's not particularly important to many other mathematicians. The reason is that in set theory there's something famously called an "Axiom of Choice" that basically allows you to handle infinite sets and their pairings much more easily than without it. The Axiom of Choice used to be somewhat controversial in the beginning of the 20th century. What happened during that time was that people realized they could look at set theory (and in fact at all of mathematics) much more rigorously than before by coming up with some basic axioms and showing how everything else follows from them. This is something that had been practiced in geometry ever since Euclid, but not really in other parts of mathematics, and around the beginning of the 20th century people started doing the same thing not just with points and lines, but also with numbers and sets and functions. When they tried to _formalize_ set theory - that is, take the usual stuff people have been doing with sets and figure out how to bring it all down to a handful of very obvious axioms - they discovered that all the axioms were completely obvious (as wanted!) except one, the Axiom of Choice, that sort of seems necessary to do all kinds of advanced math, but is not as obviously true as others. See, the Axiom of Choice is not _explicit_: it says something like - under certain conditions - "a matching in pairs between these two sets exists, but I'm not showing you what it is explicitly, I'm just telling you it exists". When it tells you that, it kinds looks reasonable that these two sets should be of the same "size", intuitively, so you're glad that the Axiom of Choice settles the matter by just claiming that a matching exists; but at the same time you may feel a little uneasy about the fact that the matching is not described with some formula or algorithm or anything, you're just told it exists and that's it.

Anyway, with time mathematicians pretty much accepted the Axiom of Choice as a vital part of their mathematical toolkit. Even though some very non-intuitive things can be proved using it (look up the Banach-Tarski paradox if you're interested), it's much better to have it than not. And with the Axiom of Choice, the whole problem of proving that bags of marbles B1 and R1 are of the same size becomes trivial, even when they're infinite. You don't need to carefully engineer a B1-R1 matching out of the larger one between all the six bags; the Axiom of Choice sort of gives you the firepower to just claim that this B1-R1 matching exists, and call it a day. Nearly all mathematicians are satisfied with this, because for them set theory is no more than a convenient tool to carry out their investigations into _other_ things, like numbers, geometric spaces and what not. It's only people who study _set theory itself_ (and call themselves, appropriately enough, set theorists) that are still interested in understanding just how much the Axiom of Choice is needed. These people appreciate much more than other mathematicians a proof of some fact in an _explicit_ way, not requiring the Axiom of Choice, even if it's trivial when using the Axiom. So the paper about "dividing by 3" is an example of this sort of investigation: do we really need the Axiom of Choice to prove that B1 and R1 are of the same size? Turns out we don't, and we can do this explicitly with a rather complicated, yet beautiful, construction. To mathematicians as a whole, this result is largely meaningless; to set theorists, it's a minor theorem of some interest, though even they, I think, probably would look at it more as an interesting puzzle with a beautiful solution. And that, by itself, is nothing to sneer at.

anatoly··on Division By Three (2006)
Say you have three identical bags of blue marbles (same number of blue marbles in each one), and three identical bags of red marbles (same number of red marbles in each one, but maybe not the same as blue, you don't know yet).

Now you empty all 6 bags onto a large table, and you try to pair off blue marbles with red ones, and you discover that after you're done there're no extra red or blues left. So you know that the total number of reds is the same as total number of blues.

It's then obvious to you - just because you can divide this "total number" by 3 - that _one_ bag of blue marbles you started out with has the same number as one bag of red marbles. This is completely trivial so far.

But what if you didn't understand very well what "numbers" and "division" are. Or you know what, let's say you understand it, but _I_ don't. I don't trust all these numbers, I was never good at math, when I divide the same two numbers I get a different answer every time. Spare me all that. I just want you to prove to me that one bag of blue is the same as one bag of red by _matching_ them in pairs.

I already believe you that three bags of blue are the same together as three bags of red, because we matched them off in pairs. Let's say that each marble has the number of its bag etched on it: 1,2,3, besides the color (Blue or Red). So B1 is a blue marble from the first bag, etc. Right now on the table we have all the B1,B2,B3 paired off with R1,R2,R3. If you could just take them and somehow turn it into a matching of just all B1 with all R1, that would convince me that one bag of blue is the same size as one bag of red.

Maybe when we were matching all the blues with all the reds we were lucky, and B1's just got matched with R1's by chance. But probably not! Easy to fix though, right? You just try to change the pairings a bit to make it easy to convince me. Look at some B1 marble, what's it paired with? If R1, it's already good to go. But maybe it's paired off with say R2. Then find some spare R1 and exchange the R2 with R1. But actually, there's no "spare R1", they're all in pairs already. If that R1 you found was paired with B2 or B3, then by exchanging you just made things better by making a new B1-R1 connection. But if it was paired with another B1, all you did was make a new B1-R1 connection and destroy an old one.

So it's not _completely_ trivial, but it's still pretty easy for you to convince me that there's the same number of B1's as R1's. You keep rearranging pairs, trying to create new B1-R1 pairs but not destroy old ones. If you think about it a little bit, you'll see that you're guaranteed to succeed and eventually pair off all the B1's with all the R1's, because after all you know there's the same number of each, because you _can_ divide by 3. Only I can't, and want to see this very explicit demonstration.

So far so good. Now we go to set theory, where bags of marbles may be of infinite size, and then they're called "infinite sets". Contrary to what your intuition may tell you, it turns out that infinities come in different shapes and sizes, and one infinite bag of marbles may be larger than another. What does it mean to say that it's larger though, if you can't count them? (they're infinite, if you try counting, you'll never stop). Although we can't count infinite bags of marbles, we can still "pair them off" by showing some formula or algorithm that says which marbles go in pairs with which ones. Suppose you have one bag of blue marbles, and each is marked with some odd number: 1,3,5,7... all the way to infinity. And you have a bag of red marbles, each is marked with an even number: 2,4,6,8... all the way to infinity. Then it's easy to see that even though they're infinite and you can't "count" each bag, they're the same size: you can pair 1 with 2, 3 with 4, 5 with 6... all the way to infinity, and you'll have no extra left in either bag.

Sometimes though you could have an infinite bag of blues and an infinite bag of reds, and no matter which way you try to pair them off with each other, even after all the blues found their partners, all the way to infinity, there're still reds left without a partner. If this happens, you say that the infinite bag of reds is larger than the infinite bag of blues. You can't match them in pairs, reds are always going to remain in surplus. The first person to find such different infinities was the German mathematician Cantor. About 140 years ago he proved that if blues are all the natural numbers 1,2,3... and the reds are all the real numbers (all the possible decimal fractions, including the ones where the decimal digits just never stop), then you can't pair them off - the infinity of reals is larger than the infinity of naturals.

Coming back to the marbles... if our B1,B2,B3 and R1,R2,R3 could all be infinite, what does it make of the "problem"? We can still say that the three blue bags are the same in size (because for infinite bags of marbles "same in size" just means "can be matched in pairs"), and so are the three red bags. We can still say that when we mix all the six bags together (well, with infinite bags this becomes more like a metaphor) we can match all the blues with all the reds. And it still kinda looks reasonable that if that happens, then just B1 and just R1 can also be matched in pairs.

But we can no longer prove this just trivially by dividing by 3, because we can't really count the marbles in any of the bags, they're infinite. The other method of proving this though, the one where I asked you to explicitly engineer for me a B1-R1 pairing out of the larger pairing of all the six bags... that can still work. It's much trickier to carry out with infinite sets. You can't just say - take any B1 nor paired with R1, look for another R1 not paired with B1, now exchange the reds in these two pairs, and carry on in this fashion until you're done. With infinite bags, it becomes much trickier to prove that you can do this every time, and you need some way to ensure that "carry on until you're done" actually carries you to the end of the task, instead of getting you stuck in some sub-infinity of pairings without finishing all of them. But it _can_ be done. It requires some intricate arguments and constructions, but it can be done, and this paper shows how. First, it looks at a much easier case when you only (metaphorically) "divide by two": that is, you start with B1,B2 and R1,R2, and a match in pairs of the mix of them all, and out of that mix you isolate just a B1-R1 match. Turns out that with infinite sets, it's much easier with two bags against two bags than with three against three (with normal finite bags, it's about the same). After it shows you how to do that, the paper proceeds to prove the much trickier case of three bags against three.

OK, so who needs this? (cont'd in the next comment)

anatoly··on Mozilla CTO: Andreas Gal
Oh really? Do you suppose many VCs will want to invest in his startup, knowing that a crowd of zealots will be chomping at the bit to protest them and boycott their other investments?

I'm afraid he may be effectively blacklisted in this industry now.

anatoly··on Gabriel García Márquez, Literary Pioneer, Dies at 87
Julio Cortázar, for his majestic _Hopscotch_, but also and especially for his short stories.
anatoly··on Brendan Eich
That seems likely.

I appreciate your continued efforts to bring clarity to the issue.

anatoly··on Brendan Eich
I was glad to read this, but then today I noticed a new comment by Eich clarifying that no one tried to convince him to stay as CEO.

http://dutherenverseauborddelatable.wordpress.com/2014/04/07...

Perhaps your understanding is a little off. Maybe it's a prudent position to go back to not really knowing what happened between Eich and the board.

Anyway, I'm done being angry at Mozilla. You guys are doing an important thing. Calls for a boycott are counterproductive and will only hurt us all. What's done is done.

I just can't quite find it in my heart to support you anymore.

anatoly··on Brendan Eich
I appreciate your efforts to set the facts straight. The FAQ, while straightforward on some points, is vague on one in a way that I can only see as unfortunately intentional.

> Q: Was Brendan asked to resign by the Board?

> A: No. In fact, Board members tried to get Brendan to stay at Mozilla in another role.

You can read this in two ways:

1. The board didn't want Eich to resign as CEO, and when he did, tried to at least get him to remain in another role. 2. The board did want Eich to resign as CEO (but formally it was his decision), and when he did, tried to get him to remain in another role.

My impression, when I read the FAQ, was that it tries to create the impression of 1, but 2 is more likely to have happened. I'm saddened to have confirmed with by reading the NYTimes article which quotes board members precisely to that effect (that they agreed with Eich he should step down as CEO).

The fact that this issue is muddled in the FAQ in a way that seems intentional does not boost my confidence in Mozilla. It isn't as bad as "they plain fired him" which I thought before, but it's still pretty bad.

anatoly··on Brendan Eich, We’ve Failed You. I’m Sorry.
Do you then support the legitimacy of the Hollywood blacklist during the McCarthy era? It was a purely private sector action with no government enforcement. Furthermore, communist sympathizers were widely reviled and feared in the society as a whole.
anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
Massive economic and trade sanctions. Get Russia out of the global financial system, prevent Russian oligarchs and state corps from having foreign holdings and investments. Halt all trade except that essential to the West (oil and gas to Europe). Speed up US export of energy to Europe, to get Europe off its dependency on Russian energy (this is happening already, but very slowly and uncertain to finish).

A real economic and financial isolation would weaken Putin's regime immensely, and probably topple it quickly. One thing which is very different from the Cold War is that almost everything Russians consume is manufactured outside its borders (and if China doesn't play along, that would only reduce the pressure so much).

There's real and very high economic cost to implementing such sanctions. Europe is only just now slowly recovering from its depression, and the US has plenty of problems with its "jobless recovery". Real sanctions might hurt a lot. But if you really, truly want to stop a new Reich in process of ramping up, and I do not use that word lightly, that might be the price you should be willing to pay.

The above is the most extreme version, but even much weaker sanctions would be way better than the pathetic travel bans on a dozen-odd individuals.

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
Again, I'm talking about territorial wars, which the Iraq invasion was not. The Iraq invasion is relatively mundane on the scale of things that happened in the last 60 years. Do you think the USSR ever got the UN approval for invading Afghanistan in the 80s?

Territorial wars, not just any invasion or a military op or a coup or installing a friendly regime. The very fact that you don't see much difference shows that the world has forgotten how terrible they used to be.

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
You're right, and thanks for correcting me. The not tolerating is the important thing though, I think you'll agree.
anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
You're not saying anything new to me. I realize the average American doesn't care. The average American (or Briton) didn't care when Hitler carved up Czechoslovakia either. Nobody cared about some Eastern European country back then.

And that's why history judges Chamberlain the way it does, and that's why history will judge Obama.

(I'm not saying the outcome will be the same. Nothing repeats exactly. We might not get WW3. Maybe we'll get lots of local territorial wars slowly ramping up, as the international order that held firm through the worst years of the Cold War broke down in the time of stupid, lazy, weak US and European leadership. Circa 2014 is when it started, the books will say).

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
Russia and Ukraine weren't sovereign states when it happened. It's not relevant to the international principle I'm talking about.

It's true that the majority of Crimeans are Russian, but the majority of people in Sudetenland were Germans, too.

The whole point of territorial integrity is that state boundaries are frozen to prevent territorial wars, even if they don't happen to coincide exactly with ethnic boundaries (they never do).

If there's no threat of territorial land-grabs, there's no motivation for the sovereign power to do ethnic cleansing. In Crimea, for example, Russians were and remained the majority since Ukraine declared independence in 1991. Ukraine never tried to settle a huge mass of Ukrainians in Crimea, or induce Crimean Russians to move out. In the bright new world we've now arrived at, states will be very motivated to "smooth out" their populations by ethnicity, so that neighboring powers don't invade and annex lands with "their people".

The 19th and 20th centuries were rife with such ethnic cleansings and mass resettlements; ever since the fallout of WWII we had very few. Not anymore.

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
Exactly; it wasn't tolerated, it made Iraq a pariah state, and it was quickly corrected.

See anything like that happen with Russia's annexation of Crimea?

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
The principle of territorial integrity, enshrined among other things in Chapter 1 of the UN Charter.

The US didn't stop invading, and neither did the USSR. But the one principle was that waging war for territorial gain is no longer acceptable.

After WWII, the major countries understood that while it's impossible to completely outlaw war - states will find real or imagined reasons to attack each other - if we agree to freeze borders, most of the motivation for waging war will go away.

And it worked. After 1945, no developed country started a war against a peaceful neighbour to perform a land grab. The very few exceptions where annexations did happen were in the context of pre-existing state of war, and even so were not recognized by the international community (e.g. the Golan Heights).

But actually invading a country which doesn't threaten you and annexing part of its territory? Didn't happen after 1945.

Until 2014. Welcome to the new era.

anatoly··on History Will Remember Obama as the Great Slayer of Patent Trolls
History will remember Obama as the weak President who did nothing to stop Russia from destroying the one principle that held the world back from territorial wars ever since WWII.

As we enter the new era of land grabs and might-makes-right, history shall record that what the American President did to stop it was order travel bans on a few minor flunkeys.

anatoly··on A brief introduction to Haskell, and why it matters
Is it, though? How do you know?

Don't get me wrong, I think so too, it's just that I've begun doubting myself. I've always thought it worthwhile to learn very different languages for the mind-opening effects of their paradigms. But it's become clearer to me that beyond the warm and fuzzy feeling of understanding ways to package and handle state in pure FP languages, I lack any specific evidence that learning Haskell helped my programming style or effectiveness in mainstream languages.

How would I go about finding such evidence?

To put it in a brutally reductive form: I looked at my C++ code before and after I learned Haskell and played with it a fair amount. I didn't see much difference, though maybe I didn't look at the right things?

anatoly··on The myth of the fall
I may dislike esr as much as the next fellow, but your response is degrading noise. It wasn't esr who upvoted the link here to the point of your visibility, it was people who found it interesting. If you're annoyed by that, flag, filter, stop reading the site, whatever, but this sort of armchair psychoanalyzing says more about you than esr.
← PreviousPage 4 of 14Next →