Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,663 karma · joined Jun 14, 2010 (16y ago) · 1,502 submissions

Submissions

comment 3y ago · link · parent

I get that, but that's just stupid given how the story actually played out. When people talk about flat organizations and mean it, they also mean transparent, cross-functional teams that understand the full context. If that had been allowed at Theranos, every employee would have puzzled together the fraudulent behavior in 5 minutes. Someone would have leaked it years earlier.

comment 3y ago · link · parent

From the documentary I've watched, Theranos was a very dictatorial organization that had strictly enforced knowledge silos and spied on its employees. Their fraud wouldn't have been possible otherwise, but the article's "expert" claims the opposite. Also, quoting what Elizabeth Holmes said as evidence for anything is really beyond stupid at this point, yet it's exactly the logic of the article.

comment 3y ago · link · parent

Half a day to get something running that's a "one off" for you is insane. With a compiled language project, I'd download a binary. In Python, I need to reproduce the developer's setup. And I've yet to find two different Python projects where the official build instructions are compatible -- each one recommends a different environment virtualizer, a different runtime, different settings, and different C libraries that aren't part of the virtualized environment.

comment 3y ago · link · parent

I hate slide decks like these, where every page in the PDF contains one more bullet point than the last one. Maybe I'm particularly bad at this, but I spend way too long scanning each page for the new information. Is it impossible to configure LaTeX to only produce the final animation step as a completed page and skip the intermediate ones?

comment 3y ago · link · parent

Well, I’m also the sort of person who wouldn’t. Similarly, I also never copy&paste example code when reading documentation, instead, I immediately jump into writing my own variation. It took me a while to realize that’s not typical.

comment 3y ago · link · parent

It's possibly an unpopular take, but it's not completely clear to me what community-driven programming languages gain from a standards process anyway. (At least if the intention is to really standardize the complete thing, bells and whistles included, not just some tiny core, as R5RS did.)

If you have multiple adversarial commercial implementers for something, a standard makes perfect sense. It's still a lot of work, but necessary because otherwise, you wouldn't get things to interoperate at all. That's true for things like HTTP, or Bluetooth, or JavaScript, or C++.

But for a community project, having one blessed implementation and iterating quickly has proven to be the most successful model, in my opinion. I can point towards Python, Rust, even PHP for examples. Even Haskell, which started out with a written specification, has at this point de facto been forked into the much richer language called "whatever GHC understands".

comment 3y ago · link · parent

While that’s true, isn’t part of that due to Microsoft having enterprise-friendly licensing nailed down? I’d think that doing the equivalent of industrial espionage would remove Microsoft’s offerings from some industries extremely fast. (Corporate legal departments do read licensing terms!)

comment 3y ago · link · parent

Or perhaps more likely: Giving users a more prominent way to filter by time didn’t improve ad clicks and was thus A/B tested out of the product.

Just like it was A/B tested that the best background color to contrast the ad area against the organic results’ #ffffff is #fffffe.

comment 3y ago · link · parent

It's interesting that this works in the time domain (instead of frequency domain), and I wonder what the resulting quality limitations are, if any. The sound samples on the demo page, at the least the dozen I clicked on, didn't seem all that challenging. Few, mostly synthesized instruments, low dynamic range. My ears aren't good enough to evaluate audio codecs anyway, however.

comment 3y ago · link · parent

What do they do about the SID?

For younger folks, the SID is the sound chip of the C64. It's infamous for being partly an analog circuit. That is, it uses transistors in states between 0 and 1, as you would in a transistor-based amplifier, or an analog radio. This gave the sound of the C64 its unique texture.

My understanding is that this behavior is impossible to reproduce with modern chip fabrication techniques, so what's the solution? Digital emulation?

comment 3y ago · link · parent

The Haskell one is not that spectacular if you understand that operators are just functions in that language:

    λ> let 2+2=5 in 2+2
    5
This simply defines a new local function that happens to be called "+". It's no different than something like this in JavaScript:

   let Math = { sqrt: (x) => 42 };
   console.log(Math.sqrt(16));

comment 3y ago · link · parent

Wait for the influx of HN comments to disagree with you, citing specific prompts that they found working. It may be obvious to you and me that it’s smoke and mirrors, but a lot of smart people fall for it.

comment 3y ago · link · parent

I wonder about this. Is ML just plugging together prebuilt blocks because that covers the entire solution space, or are we limiting the solution space to that because that’s the only thing you can realistically do in Python?

comment 3y ago · link · parent

When I last looked at this -- admittedly years ago at this point -- all Unicode operators had an ASCII alternative. So maybe you could enter the code as Ascii and prettify it into Unicode?

comment 3y ago · link · parent

That would lead to weird behavior since the OEIS is sorted by number of references, which I think prefers "interesting" solutions over straightforward ones. For (1, 2, 3), the positive integers are only ranked 5th -- the top hit are the Fibonacci numbers. It's funny to think about.

comment 3y ago · link · parent

I once worked with a PhD who claimed that basically any novel bit of coding was a "research problem", and thus not worth bothering. Using a hashtable to speed up an algorithm? Research problem. Using raw TCP instead of HTTP for a long running connection? Research problem. Implementing a graph algorithm you could read up on Wikipedia? Research problem. I think it was only when I solved three of those "research problems" in one week that he finally shut up.

comment 3y ago · link · parent

The article has a link[1] to a discussion between the blog author and the paper author that I find revealing.

Perhaps as a reminder, the issue is that the paper’s implementation of their 2-nearest neighbor secretly uses an oracle to break ties, which obviously inflates the accuracy compared to a real-world kNN classifier that has to choose heuristically. To be fair, this could be a weird implementation accident and not malice. But I think it does invalidate the results.

But rather than admit error, the author defends this choice, and does so using (in my opinion) dubious statistical arguments. Which leads me to believe that — at least at this point — they know they made a mistake and just won’t admit it.

They claim that instead of a real-world accuracy, they wanted to find the “max” accuracy that their classifier was statistically capable of. That is, the accuracy you get if the stars happen to align and you get the luckiest possible result. Well, not only is this creative new metric not described in the paper, it’s also not applied to the other algorithms. For example, I think a neural network is capable of achieving a “max” accuracy of 100%, if all the initial weights happen to perfectly encode both the training and test sets. But of course they just use standard training to give the numbers for those algorithms.

[1] https://github.com/bazingagin/npc_gzip/issues/3

comment 3y ago · link · parent

> Games are generally mass-market products so any feature that only helps a very small percentage of buyers is much less likely to get added.

Your point kind of proves the opposite. Many players will benefit from tutorials, of course. But if making them unskippable helps the bottom 10%, who otherwise can’t correctly judge if they would need them, then we get unskippable tutorials.

The same bullshit applies to dynamic (cheating) difficulty levels, another bane of modern game design where you can’t get ahead by doing well.

comment 3y ago · link · parent

The worst are multiplayer games that don’t let you join a party with your friends before playing a long single player tutorial. You arrive late, you want to join, your friends will teach you anything you need to know anyway. But a self-absorbed designer decided to spoon-feed you what each individual button does over the next 20 minutes.

comment 3y ago · link · parent

That doesn't work for me. It's not really holding together the reactor as the headline would imply, it's holding the plasma.

comment 3y ago · link · parent

I'm not sure what you mean. Presburger arithmetic is famously complete. What a system can't be is consistent, complete, and strong enough to perform a Godel encoding (which requires something multiplication-like). Drop any of the three requirements and it's possible.

Inconsistent: trivial, from falsehood follows anything.

Incomplete: Peano.

Weak: Presburger.

comment 3y ago · link · parent

    template <typename T>
    struct optional {
      // One version of value which works for everything
      template <class Self>
      constexpr auto&& value(this Self&& self) {
        if (self.has_value()) {
            return std::forward<Self>(self).m_value;
        }
        throw bad_optional_access();
      }
The fact that I can read this and don't even find it that terrible is proof that C++ has permanently damaged my brain.

comment 3y ago · link · parent

> You can't entirely rely on it to know a dereference is happening because references (e.g. `int&`) aren't subject to the `->` requirement.

To the extent that this is a problem, it's a problem with references as a language feature in general, not with the arrow syntax.

comment 3y ago · link · parent

I'm among the people who would have liked to eliminate even this special case and have a convenient postfix derefence for this. So instead of a->b() you'd have a*.b(), and if you need to dereference again, write a**.b() and so on. But as you said, lots of people really seem to hate this kind of thing. Zig is almost there with its dereference syntax, but still kept the magic dereferencing dot.

comment 3y ago · link · parent

That fixes the problem, but goes in the wrong direction IMO. I argue that you actually should only use MessageBoxW, ignore all the macros, and just use wide strings whenever you interact with the OS. An Ansi-only program is broken in 2023, and actually has been for two decades.

comment 3y ago · link · parent

> The pre-main runtime doesn't do much

This only applies to C++, but the CRT runs all constructors of global variables before main/WinMain. (Or rather, the CRT calls a special function that the compiler generates for this purpose and links into the executable.) In some codebases, that's quite a lot of stuff.

comment 3y ago · link · parent

I mean, you can do as small a change as adding a const somewhere, and cause an (almost) independent file somewhere else in your codebase to hit the wrong overload.

comment 3y ago · link · parent

I think I've hit the same kind of problem once. What I learned is that true smart pointers are types that (at least in Rust) aren't really supposed to have methods on their own, to avoid this type of ambiguity during method resolution.

For example, Box<T> implements Deref so that you can conveniently use T's methods. If you look at the documentation of Box, the things you can do with the Box itself, like Box::leak, are non-method functions. This means that you always have to qualify them, like Box::leak(my_box), and thus you can't get this type of conflict.

Using Deref for types like String or Vec doesn't really fall into this category. They implement something more analogous to an "is-a relationship" in OO. Even outside of those examples, I've seen people manually implement inheritance-like behavior, using Deref to delegate to a field that stores the "base class" instance.

If you do that, you're likely to have a name conflict between the two types sooner rather than later. That's fine as long as you're aware that Rust doesn't really do overload resolution -- AFAICT, the "outer" methods always wins regardless of the arguments at the call site.

comment 3y ago · link · parent

> The true magic lies not in the guitar itself, but in the virtuosity of the musician who brings it to life.

Arguments like these are often used to defend unpopular technology choices, like (insert disliked programming language here). "A true master can use any tool!" And yet, I've never seen a professional guitar player use a cheap shitty guitar.

comment 3y ago · link · parent

That's essentially what all the fast transpilers do -- esbuild, babel etc. They don't typecheck the code at all, they just parse it and strip out the type annotations.

This means that you can run and test code that doesn't typecheck yet -- very useful during development. Also, production builds can run the typechecker in parallel with other build steps. That's how we optimized our build system at work.

But essentially, it's a design choice by the TypeScript team. They've decided that TypeScript shouldn't add runtime features on top of JavaScript, but instead should simply type JavaScript, and I think this has contributed to the success of TypeScript.

1
131415
51