Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

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

Submissions

comment 4y ago · link · parent

Again: How is adding a new, “bad” implementation any easier to maintain than simply calling the already existing optimized one that the GP linked to?

comment 4y ago · link · parent

“Avoid premature optimization” means to do the cleanest/clearest thing now, and only optimize later when you have the full picture. Arguably, that advice doesn’t apply to standard library functions anyway, at least not to the same extent. But if it did: How is adding a new, “bad” implementation any clearer than simply calling the already existing optimized one that the GP linked to?

comment 4y ago · link · parent

I even somewhat agree with that principle, but it don’t think it applies to using the standard library, which is (a) not little and (b) not a new dependency you add to the project.

If that’s the justification to keep an implementation bad on purpose (which I’m not sure is the actual intention, but is at least that’s what the referenced comment claims), then I’m not even sure I speak the same language as the people who made that decision.

comment 4y ago · link · parent

I’ve been wanting to learn Emacs for 20 years. Is now finally the time?

comment 4y ago · link · parent

Maybe not everybody cares about the wasted tick, but the response to such niche feature requests in open source projects used to be a simple “patches welcome”. I found that way more helpful and less aggressive than what seems to be the new default in Github projects, “won’t fix”. I don’t understand this shift.

comment 4y ago · link · parent

What do you mean by “require”? Complex numbers can be represented as a 2x2 matrix of real numbers (a scaled rotation around the origin), so transitively, that’s true for any equation involving complex numbers.

comment 4y ago · link · parent

Yes? What do you imagine games looked like in 2004? That was the year Half-Life 2 came out. Obviously, a game like RCT also has to run a simulation and can’t focus on graphics as much as a shooter. I’m just saying, if anything, RCT3 looked sub-par.

comment 4y ago · link · parent

Lots of scandals around DNA evidence as well. It’s not the science itself that’s wrong, but mistakes can be made and were made during collection and in interpretation.

comment 4y ago · link · parent

> I hope you understand that despite your hopes for me I cannot agree. Sorry to crush your hopes, I hope you can forgive me.

Honestly, I don't have the slightest idea what's going on with you.

comment 4y ago · link · parent

I’m not imagining anything, I’m arguing from logic. If the code is distributed via Git, then you have a normal programming language (with a particularly cool IDE/REPL). Which isn’t in any way a bad thing, but I hope you will agree that this is not how Smalltalk is usually advocated. You can’t have it both ways.

comment 4y ago · link · parent

> all that changes in practice is the text of log message

comment 4y ago · link · parent

> There is a curious hypothesis that the world arranges itself by the continued fraction powers of number e

Sounds intriguing. Do you have any references off the top of your head, or at least some keywords that I can google to learn more?

comment 4y ago · link · parent

Exactly. How are you supposed to code review something that lives in RAM?

comment 4y ago · link · parent

Underrated comment. I’m all for precisely modeling domain and I/O errors. But for “this is a bug” type of exceptions, what good do all those tiny variations (and the resulting philosophical debates about when to use which one) do, if all that changes in practice is the text of log message? You’ll never catch that one specifically or treat it any differently than an ArgumentNullException — or any other of the zillion already existing ones.

comment 4y ago · link · parent

I’m not from the US, and neither is the sun, of course. I do believe that the “clockwise” direction was established to match the direction of the shadow movement on a sundial in the Northern hemisphere. It’s not just maps, even clocks are Eurocentric. :)

However, the construction is easy to adapt to counterclockwise sun movement in the Southern hemisphere by flipping everything around: point the 12 (!) towards the sun and take half of the angle from the 12 to the hour hand. This angle points North.

comment 4y ago · link · parent

From some of the comments, I’m not sure people fully get this. It’s basically doing a geometric construction of the sun’s path across the sky, using the distance between the hour hand and the 12 on the watch face as one of the input angles in the calculation. That’s quick (important because you have to repeat it while you’re marching) and easy to remember (also important because you might need it in a situation without access to Wikipedia). Under the assumption that the sun rises at 06:00 in the exact East and sets at 18:00 in the exact West, the construction is almost perfect. Of course, that’s never exactly true in real life, but still a lot more accurate than “well I know the sun is roughly South”.

comment 4y ago · link · parent

There’s also a whole “the really smart among the rich people are actually smart enough to recognize the importance of my work” marketing pitch, if you know that (AFAIK at least) he actually lives off of donations to his research project.

comment 4y ago · link · parent

That by itself only explains the initial decision. It’s still interesting that they’ve stuck to it for 20 years after LLVM’s release. Lots of technical details of GHC changed during that time, it’s not like the architecture is set in stone.

comment 4y ago · link · parent

From an engineering point of view, it’s interesting they chose to implement their own intermediate language, as opposed to just sticking to LLVM IR and “outsourcing” the problem of code generation.

I actually researched this some time ago, and was a bit surprised to learn that modern GHC’s intermediate representation seems to differ from what the C-- paper describes quite substantially, in ways that are only described in the source code. They’re still using the same name though.

One observation is that GHC has been somewhat slow to adopt new CPU targets (M1, WebAssembly). I wonder if the reliance on C-- played a role in that.

comment 4y ago · link · parent

Stable Diffusion is simply fantastic, we live in great times to have such a thing as open-source to play with. And however justified the skepticism expressed in other HN comments might be, I truly hope they figure out a business model that’s compatible with continuing to make these releases. Otherwise, it’s forever going to be DeepMind’s “we actually have much better models, no you can’t see them, they go to a different school”, or alternatively, OpenAI’s insane prices and restrictions. For this field to become a game changer, the public needs access.

comment 4y ago · link · parent

Needs (1986) in the title. But if you add references to deep learning and metaverse, replace the font with Helvetica, and add a few flatly shaded hand-drawings of a cute animal mascot, this could actually be printed today.

comment 4y ago · link · parent

So, to summarize: Both Reddit and Discord force transfered seemingly officially named communities to the trademark owning entity. That sucks, but it’s also something that social media companies have been doing 10 times a week since forever. Is there something special about this instance that makes it news?

comment 4y ago · link · parent

In my opinion that was a very clever naming scheme to target the TeamSpeak crowd. In gaming communities, having “your own server” has always come with a sense of pride.

comment 4y ago · link · parent

If you look very closely, the model does have wrists. (Most noticeable on the models left arm — that is the viewer’s right.)

Either way, the shoulder and elbow joints don’t move much during rope skipping, and no matter how it’s recorded, the motion capture data that was used for training should reflect that.

My best guess is that the model has picked up on the tiny arm motions that are present in rope skipping and wildly exaggerated them for some reason.

comment 4y ago · link · parent

Weren’t both Easter and Christmas non-Christian holidays originally?

comment 4y ago · link · parent

Type erasure is a specific compilation technique, it means more than a lack of introspection capabilities.

In most languages, a function taking a float and a function taking an int end up producing different compiler output (because they need to use different CPU registers). More to the point, this extends to generic/template functions with signatures like “void foo<T>(T arg)”, which then need to be monomorphized, that is, copied for each instantiation.

Languages with type erasure simply drop the type argument instead of instantiating it.

comment 4y ago · link · parent

Perhaps TypeScript is a very clean example of the duplication phenomenon you mention in that article, because unlike in most languages, static types are completely erased during compilation. It’s literally a typecheck-time functional programming language bolted onto an existing dynamic runtime language. For some complex object manipulations, the cleanest thing to do is to write two independent recursive functions: a runtime one to compute the value, and a typelevel one to compute the resulting type.

comment 4y ago · link · parent

Maybe what's meant is that the blitter allowed the machine to practically deal with the amount of data that so many colors required. The C64 could display more colors in static images than in animated sprites.

comment 4y ago · link · parent

I guess a lot can be done to force the model to create properly connected 3D shapes instead of these thin protruding 2D slices. But I noticed something else. Some of the angles “in between” the frog faces have three eyes. I wonder if part of the issue might be that those don’t look especially wrong to Stable Diffusion. It’s often surprisingly confused about the number of limbs it should generate.

comment 4y ago · link · parent

> i.e. it's what high-level functions get compiled down to in actual code

Yes, the Command pattern is what I vaguely alluded to in my message. The thing is, using a lower-level representation in something that’s meant to be an abstraction of the actual code makes zero sense to me.

1
212223
51