Readit News logoReadit News
Kwantuum commented on The Grug Brained Developer (2022)   grugbrain.dev/... · Posted by u/smartmic
frollogaston · 3 months ago
It's not a realtime system kind of thing where the debugger would change the behavior too much... It's possible with enough engineering work, but nobody has put that work in, in fact they had a debugger for some staging envs that they deleted. Lately they keep adding more red tape making it hard to even run something locally, let alone attach a debugger.

I guess you can attach a debugger for unit tests, but that's not very useful.

Kwantuum · 3 months ago
> I guess you can attach a debugger for unit tests, but that's not very useful.

That is in fact incredibly useful

Kwantuum commented on Unexpected ways memory subsystem interacts with branch prediction   johnnysswlab.com/unexpect... · Posted by u/r4um
codebrrr · 2 years ago
I'm pretty sure the following optimization is invalid, since a is not a bool array, but one of positive/negative numbers (see top of article):

> You can use arithmetics to go branchless.

    if (a[i] > 0) {
       cnt++;
    }
> Rewriting using arithmetic takes advantage of the fact that the expression a[i] > 0 has an arithmetic value 1 if true and 0 if false. So the whole expression can be rewritten as:

    cnt += a[i]

Kwantuum · 2 years ago
Surely this was meant to be cnt += a[i] > 0
Kwantuum commented on Don't kill my app   dontkillmyapp.com/... · Posted by u/tentacleuno
sebtron · 2 years ago
I think many commenters supporting the "kill my app" behavior do not understand how bad using the affected devices can be.

The reason I first discovered "don't kill my app" is that my apps would close as soon as I switched to another one, in most cases. For example if I used maps and switched to a call / browser tab / Telegram chat, when I got back to the map the app would reload. My search would be gone, and I would have to set my destination again.

I hope you can agree that this is terrible user experience. If I wanted to save battery, I could have just closed my apps manually, I don't need my phone to take the initiative.

Kwantuum · 2 years ago
The most egregious problem caused by this that I've encountered is an almost complete inability to use email 2FA on websites because my phone will kill the browser as soon as I switch to my inbox, and when I go back to the browser I'm back on the login screen which will generate a new one-time-password and make the one I have in my clipboard worthless. I've also encountered the exact same problem with 2FA using an authenticator app, though since the codes are valid for ~30 seconds or so, if I manage to enter my credentials fast enough or they auto-fill, at least the code I copied is still valid.
Kwantuum commented on How to rewrite classes using closures in JavaScript   gaurangtandon.com/blog/ja... · Posted by u/gaurang_tandon
Kwantuum · 2 years ago
There are several points in the article which are just plain wrong:

- no private properties (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...)

- no readonly properties: You can use a getter. Or define the property as non-writable, the syntax isn't nice but in my opinion it's still much nicer than what the article proposes.

Some of the points are just a matter of taste ("this" is awkward)

There's the implementation itself which forces you to use non-idiomatic code for no good reason or benefit (Class.init instead of new, just why? You can absolutely return a constructor function there while preserving everything else)

Doing what the article proposes also destroys the ability to do instanceof checks because the prototype of instances is not set (can be fixed), and inheritance is severely limited if you want to preserve any of the purported benefits. You might say that inheritance is actually not a good thing and so it's a feature, not a bug, but if that's your opinion why are you trying to mimic a class?

Kwantuum commented on Minecraft Wiki has decided to leave Fandom   minecraft.wiki/w/Minecraf... · Posted by u/unleaded
codetrotter · 2 years ago
I remember in 2009 or 2010, when I first came across Minecraft. It was not hugely popular yet, but it already had quite an active community.

I played quite a few hours of the game, both alone and together with a couple of friends.

One day, after a couple of weeks or something, I learned about a crafting wiki that told you how to craft different items.

At the time, at least for me, it was not clear how you figure out what items you can craft and what items need to be combined in what patterns to craft those new items.

So for me, that crafting wiki became quite essential.

Maybe other people were figuring out how to craft things by trial and error? Or maybe there was something in the game that told them how to craft specific things?

Kwantuum · 2 years ago
There was not. There is now but for the better part of a decade it was just... Something you were supposed to have learned from a youtube video or a friend or something.
Kwantuum commented on N guilty men (1997)   www2.law.ucla.edu/volokh/... · Posted by u/emmelaich
giantg2 · 2 years ago
I'm mot sure why you're replying this to me. Did you mean to respond to someone else? It seems to be formed argumentatively but follows what I was already saying.
Kwantuum · 2 years ago
Pretty sure they're just replying specifically to

> you still have guilty parties going free anyways since the wrong person is convicted

which is a non sequitur.

Kwantuum commented on Reddit comments and submissions collected by Pushshift   academictorrents.com/deta... · Posted by u/Lammy
MAGZine · 2 years ago
yeah... but jurisdiction. i'm publishing a new law, in my own jurisdiction: the following usernames are prohibited:

dgellow

...so what now?

Kwantuum · 2 years ago
Now you impose sanctions in your jurisdiction to violators and nobody cares because you're not the EU and your sanctions have no weight.
Kwantuum commented on Diff Models – A New Way to Edit Code   carper.ai/diff-models-a-n... · Posted by u/sadiq
Kwantuum · 3 years ago
A lot of the comments seem to talk about the inevitable AI event horizon but unless I'm misreading this article the results are flat out bad. Even the 6 billion parameters model barely scratches a 50% success rate on a tiny problem that is trivial to fix for any human with basic knowledge of programming. Note the log scale of the graph.
Kwantuum commented on     · Posted by u/avinassh
Kwantuum · 3 years ago
> (damnit, of course calculating the permutations of a list is n-squared, but this is an interrogation of the random trivia I can manage to recall and I feel like a deer in the headlights)

With this statement I'm inclined to believe the title. Last I checked there are (n-1)! permutations for a list of length n. Not knowing this off the top of your head is fine, but making this kind of comment is an unforced error and it doesn't reflect well on the author.

Kwantuum commented on When splines were physical objects (2016)   core77.com/posts/55368/Wh... · Posted by u/pncnmnp
Kwantuum · 3 years ago
Website is completely broken in firefox when javascript is enabled.

u/Kwantuum

KarmaCake day337December 7, 2019View Original