9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions
comment 4y ago · link · parent
(Edit, since some respondents seem to miss this, explanations about efficiency or ISAs might justify promoting to u32 (though even that's debatable), but not i32. A design that auto-promotes an unsigned type, where every operation is nicely defined and total, into a signed type, where you run into all kinds of undefined behavior on overflow, is simply crazy.)
comment 4y ago · link · parent
comment 4y ago · link · parent
The difference could be that the technical foundation was more sound, and also, Google is institutionally capable of large refactorings in a way that I think few other companies are.
People forget this, and it’s solved now, but it took Android several years and quite a few iterations of the rendering layer to get smooth scrolling working to the level of the iPhone 1. Look up “Project Butter” if you’re interested.
Smooth scrolling is hard, but important for touch to feel perfectly right. I’m convinced that this is one of the places where it mattered that touch screens were an afterthought in the original architecture.
comment 4y ago · link · parent
I wonder, who was the “they” that successfully made such a decision? In most places, there wouldn’t be any senior leadership that isn’t “tainted”, so to speak, by the previous business model. Even a freshly appointed CEO is ineffective if not supported by the bulk of the organization. I wonder how Netflix managed to solve this.
comment 4y ago · link · parent
Having said all that, your encoding is a bit wasteful, so let's optimize. ;)
First, there's really no need for the encoded states to end on bit boundaries. To give an example, to encode 9 numbers between 0 and 9 (inclusive), you don't need 9*ceil(log2(10))=36 bits, you only need ceil(9*log2(10))=30 bits by treating the digits as a large decimal number and converting that to binary.
Second, if you're going to halt anyway, there's no need (at least for the BB problem) to write a symbol and move the tape on the last transition, so we can simply treat that as an alternative to encoding a transition.
Armed with both of those, the size of an encoded machine goes down to ceil(2 * 6 * log2(2 * 2 * 6 + 1)) = 56 bits. (In general for n states and k symbols, ceil(k * n * log2(2 * k * n + 1)). The 2 is for the directions, the + 1 is the halting transition.)
comment 4y ago · link · parent
It's not "just" that this is uncomputable, given the halting problem. Lots of things in mathematics are uncomputable. What's special about this function is that it will eventually blast through the limits of what any given formalization of mathematics can prove at all, no matter how powerful -- like ZFC + CH + whatever other axioms you come up with.[1]
To be honest, I can't fully wrap my head around what this means. Given that some of these powerful set theoretic axioms are independent from each other, I'm not sure whether ZFC+CH could have a different idea about BB(8000) than ZFC+notCH would. That wouldn't make much sense to me at least, because a Turing machine halting or not halting feels like a concrete fact that shouldn't depend on assumptions about weird infinite sets. But I don't know.
[1] Also from Scott Aaronson's blog, BB(8000) and above are independent from ZFC: https://scottaaronson.blog/?p=2725
comment 4y ago · link · parent
I have no reason to doubt that your credentials as a constitutional lawyer are impeccable.
> The further a block gets away from the initial block, then the less imminent the illegal action becomes.
This very plausible legal theory inspires incredible confidence.
comment 4y ago · link · parent
Having said that, I know great, intelligent programmers, sone of who worked on compilers, who are simply bad in a whiteboard setting. Having a filter is necessary, I’m just not convinced a Google-style interview filters exactly the right thing.
comment 4y ago · link · parent
So thanks for the link, I guess. I’ll keep this as ammunition for the next time someone quotes Uncle Bob.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
That's been my experience as well. With Arch, everything is exposed. There are usually no wrappers or layers of abstraction or weird modifications added to the upstream components it ships. That makes problems so much more straightforward to troubleshoot and fix.
comment 4y ago · link · parent
Other than that, and this may sound very strange given the last paragraph, Arch is fantastic. It's the most usable and useful system for general software development I've ever owned. Basically, you follow the wiki, and everything just works, sound, graphics, wifi. I never had that with Linux, not with Ubuntu, not with SuSE.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
That's a somewhat specific list -- at least I didn't read that as a general "the program can assume that the input is only ASCII".
But then, the author seems to have accepted solutions that crash on non-UTF8 sequences and ones that byte-compare them, so probably either behavior was meant to be fine. I just don't get that from this rule.
comment 4y ago · link · parent
* It uses byte strings instead of UTF-8 strings. In my opinion, that’s not an optimization, that’s changing the problem. Depending on the question you’re asking, only one of the two can be correct.
* It uses a faster hash algorithm. It’s not the first time this came up in a benchmark article. Rust’s decision to use a DOS-safe hash by default (and not provide a fast algorithm in the std, like other languages do) really seems to hurt it in that kind of microbenchmark.
* It uses get_mut+insert instead of the more convenient HashMap::entry method, because the latter would require redundantly allocating the key even in the repeat case. I’ve hit this problem in the past as well. Maybe the upcoming HashMap::raw_entry_mut will make this kind of optimization cleaner.
comment 4y ago · link · parent
comment 4y ago · link · parent
* The "interbreeds with" relation isn't transitive: population A may interbreed with B, B with C, but A not with C. Examples are observed in nature today, and must have existed many many times historically. This makes any attempt at building tree arrangement of species inherently logically suspect, purely from a data structure point of view.
* There are some cultural expectations around the term "species" that seem to thwart attempts at coming up with a clear definition. For example, we really seem to want to classify dogs as a species distinct from wolves, whether that logically make sense or not. This seems similar to people really wanting to classify Europe as a continent, regardless of plate tectonics or land masses or any other objective criterion. For a counter-example, the physics community at some point went "fuck historical precedent, we need a precise definition of 'planet'" and excluded Pluto.
* We also want to use the term "species" for organisms that don't sexually breed at all, necessitating different definitions for these cases.
All of this leads to Wikipedia defining the word "species" in this hilarious way: "A species is often defined as the largest group of organisms in which any two individuals of the appropriate sexes or mating types can produce fertile offspring, typically by sexual reproduction. Other ways of defining species include their karyotype, DNA sequence, morphology, behaviour or ecological niche. In addition, paleontologists use the concept of the chronospecies since fossil reproduction cannot be examined."
That's all fine, but with definitions like that, apparent contradictions shouldn't be a surprise, and formulations like "breaking the tree of life" are clear hyperbole.
PS: I'd love for actual biologists to correct any misunderstandings I might have!
comment 4y ago · link · parent