Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions

Submissions

comment 7y ago · link · parent

What do you mean, it’s not all heat — of course it is, that’s kind of the definition of efficiency.

comment 7y ago · link · parent

I agree about the article, I just want to mention that improving motor efficiency would also help with some of the other losses you mention. Going from 80% to 90% means that you need half as much cooling, batteries may be more efficient when you draw less power from them, etc. That might it worth it even if the motor efficiency gain alone doesn’t look like much on paper.

comment 7y ago · link · parent

That attempt at a Venn diagram makes my head hurt.

comment 7y ago · link · parent

The point is that Protobuf has variable length ints by default. That’s an optimization for many common use cases, but slower and larger for random data, including GUIDs. Use Protobuf’s fixed ints for those.

comment 7y ago · link · parent

In some sense, departments in a large company develop an institutional resistance to IT centralization efforts as a defense against the inevitable next reorg. Or rather, departments that don’t have this resistance didn’t survive the last one.

Though I wonder, if large companies are routinely this inefficient (which matches my limited experience as well), how do they survive? Naively put, why isn’t every large company killed by a startup next week?

comment 7y ago · link · parent

It's not impossible, just increasingly expensive. Modern software practices tend move a lot of the things that used to be done at compile time to initialization time or runtime. A lot of modern tooling is built around that idea. You gain a lot programmer productivity in exchange for increased memory usage, startup time and battery drain. Is that worth it? The market seems to says yes. As much as people complain about the battery life of their devices, in aggregate, they prefer apps with even the slightest usability improvements over apps with great performance. In the battle of delivering more tiny little features, programmer productivity trumps all other concerns.

comment 7y ago · link · parent

Everyone's experience is different here, but I've grown to hate these all-encompassing frameworks -- somehow I always run into their limits. As far as I understand, Angular has its own module system, its own dependency injection, its own test framework. If you have any special requirements for any of those, you usually can't rely on the vast JavaScript ecosystem because Angular doesn't play well with many common JavaScript techniques. React also has a precompile step with JSX, but that's simple syntactic sugar, and besides that, React is really just a well-behaved library with a surprisingly small API surface. It doesn't try to do everything and it plays well with non-React libraries, at least in my limited experience. I usually find that in any context, taking such a mix-and-match approach is a lot more flexible in the long run than using a large framework.

comment 7y ago · link · parent

That's really interesting. But how does it actually work, in practice, to find an optimal TSP path given a SAT solver? I know there's a reduction proof, but if I remember correctly, the proof I learned involved transforming TSP from an optimization problem into a series of multiple decision problems of the form "Is there a path with length less than k?". That would mean running the SAT solver multiple times to get the right path length. Is that efficient enough, or is there a better way to do this?

comment 7y ago · link · parent

Maybe, but how does that square with the widespread assumption that UWP and the store are basically dead? Do you expect WinUI to be available in desktop apps eventually? There’s something called “XAML Islands” to integrate UWP components into desktop apps, but that’s technically ugly, incomplete, and very explicitly targeted at legacy applications. Beyond that, they didn’t announce anything as far as I can tell.

comment 7y ago · link · parent

I watched the videos for every session from the current Build conference I could find on this topic, but still don’t understand the strategy. Like at all. Listing the GUI toolkits that Microsoft is currently investing in, there’s UWP, WPF, React Native and also a new thing called WinUI. Not all of them will survive (by which I mean will continue to get significant new feature releases say three years from now).

So it’s not clear to me at all why I should bet on any of them and not just use Electron, which is in a lot of ways worse, but at least guaranteed to stick around.

comment 7y ago · link · parent

I know what you describe is common, but the purpose of the daily really isn’t to boast about your heroic achievements of yesterday, or give a status report to management. That part should be cut out entirely much of the time.

A better idea is to plan the current day, identify where someone could use help, where two people need to coordinate more closely or on what issues further discussion is needed and with whom. If there’s nothing to discuss because everyone is already on the same page, that’s great, cut the meeting short and start working.

Also, depending on your setup, people who can never usefully work together on anything probably shouldn’t be part of the same daily standup. I’ve seen several cases where this meeting was way, way too large.

comment 7y ago · link · parent

I think you're being too generous. The usability of AMP sites on an iPhone is utter garbage with their extra address bar and broken scrolling. It's not necessary to break scrolling in order to create fast loading websites, in fact, quite the opposite. It's clear that users were a very low priority here.

comment 7y ago · link · parent

Because the final consonant is actually pronounced softly in related forms ("Rad/Räder" vs. "Rat/Räte"), German speakers tend to "hear" a difference, purely by association, that isn't there phonetically.

comment 7y ago · link · parent

I wonder how Makefiles got such a bad reputation. After decades of reading how bad Makefiles are, I recently tried writing one for a moderately complex build, just for fun. I was pleasantly surprised: make is very fast, it's well-documented, and the execution model is so simple that I found it very easy to figure out how to script the things I needed to do. I'm not saying it's great, but there are a lot worse build systems around that people still actively advocate (cough msbuild).

comment 7y ago · link · parent

On Windows, do you edit and debug your code in Visual Studio, or some other editor and just use the MSVC command line tools for building? Because one of the (very few) things I actually like about CMake is that it produces project files that Visual Studio can open directly.

comment 7y ago · link · parent

I don't think so, and even where it would be, GCC's IR can evolve. But GP was talking about the limitations of C, not GCC. C's memory model puts some limits on what a compiler can do that other languages might not. Fortran is usually given as an example of a language that can be faster than C, because the compiler is allowed to do more. Rust might get there as well, at least in very specific circumstances. Given that GCC also has a good Fortran frontend, I'd assume that their IR is already more powerful than what's needed to compile C alone.

comment 7y ago · link · parent

There's a rock-paper-scissors like aspect to StarCraft openings where you essentially have to randomize your strategy so that the other player can't blindly counter what you're doing. I assume each of their agents learns one particular strategy; in that case, they could simply create a "meta-agent" that acts like one of their trained agents at random (probably using some weighted distribution).

comment 7y ago · link · parent

I'm excited. :)

comment 7y ago · link · parent

With Protoss, he's not remotely near that. And that does matter if you intend to make huge a press release in the shape of "DeepMind AI beats top pro player". We'll see in an hour if that's what they're going for.

comment 7y ago · link · parent

I'm starting to get annoyed with these DeepMind publicity stunts. They don't release any code, and don't let anyone verify their results. Their chess AI beating Stockfish involved some at least a bit questionable setup. And here? I'm a big fan of TLO, but he's currently not even in the top 50 even with his main race. With Protoss, he's clearly making amateur-level mistakes. Why choose this setting to show off your supposedly superhuman AI?

(Edit: This comment was made during the stream and it just looks like my point will be addressed before the stream's even finished, they'll let the AI play against a true top Protoss. Yeah!)

comment 7y ago · link · parent

Oh, the Google fanboys. “Didn’t you read the article? This is purely for privacy reasons.” Nevermind that this makes it harder to actually keep your privacy. Nevermind that this is exactly what people warned would happen in a browser monoculture controlled by an ad company. That’s just a coincidence. It must be, because Google are the good guys, am I right?

comment 7y ago · link · parent

I think very soon, "low-level programming" will mean writing JavaScript directly without a transpiler.

comment 7y ago · link · parent

What's actually happening is a bit more subtle: The compiler is allowed to assume that the programmer in fact made no mistake and there's a reason why the UB is never actually triggered at runtime. Reasoning backwards from that can open up large optimization opportunities elsewhere, like not loading a value from memory twice, or not actually checking a condition. A good article about this that was recently discussed on HN: https://news.ycombinator.com/item?id=18575383

comment 7y ago · link · parent

What you're suggesting is actively harming users to put pressure on NVIDIA to become a better citizen in the Linux ecosystem. I don't find this very ethical, but I don't think this would work anyway. When Chrome crashes, users blame Chrome. But when Chrome runs slower on NVIDIA, users blame NVIDIA.

comment 7y ago · link · parent

You're not wrong, but I think this is a case where knowing the reason for the rules is easier than remembering the actual rules. This is just from personal experience, but for me, remembering what is and isn't initialized in C++ seemed completely arbitrary and insane until I learned more about linking and process startup. YMMV of course.

comment 7y ago · link · parent

FP numbers are (roughly) stored in the form m×2^e (m = mantissa, e = exponent). When numbers can't be represented exactly, m is rounded. My guess is that these numbers end up being encoded as 4999999999999999×2 and 4999999999999999.5×2, where the latter is rounded up to 5000000000000000×2.

comment 7y ago · link · parent

I’m not convinced this works so great for Google. Some rewrites are very noticeable as a user, and things in the UI frequently shift around for no discernible reason. Perhaps worse, they seem unable to get below a certain level of bugginess in products like Google Maps and Gmail. Perhaps because a new round of rewrites always introduces new bugs before all of the old ones ever get fixed.

Perhaps their metrics tell them that all of this is fine, I don’t know. But then, you have to realize Google has so much money they don’t really have to spend it very efficiently. For everyone else, this approach to rewrites seems like an extremely expensive way to produce software that’s not even all that great.

comment 7y ago · link · parent

At this point, it's probably safe to assume that every feature in Windows that hasn't been touched for the last decade has severe security problems. And it's not only Microsoft -- maybe their approach to backwards compatibility makes them especially vulnerable, but similar things have happened in the free software ecosystem as well. It's basically a very insidious form of bitrot.

So what's the lesson here? Aggressively remove old features, as you suggest? Rewrite everything every few years? Software has become way too complex to closely audit everything forever...

comment 7y ago · link · parent

Yeah, that was a well-known technique at the time. 8-bit optimization was really something special. It’s crazy how much performance people got out of those tiny machines by figuring out all of these little tricks.

comment 7y ago · link · parent

Well, in classical GR, which is still our best and most accurate theory of gravity, gravity is only an apparent force and thus isn't (or can't be) mediated by anything. Stating as fact that a graviton must exist or otherwise GR "would be wrong" is a bit of stretch IMHO. The graviton is plausible speculation, backed by some theoretical justifications, but nothing more yet.
1
424344
51