sus

joined 2 years ago
[–] sus@programming.dev 0 points 1 week ago* (last edited 1 week ago) (1 children)

Volksverthetzung is about specific protected classes, which don't include non-religious ideologies (and l'm not sure if "not american" is a specific enough identity either)

[–] sus@programming.dev 10 points 1 week ago (1 children)

That is what went over the line for you? what?

[–] sus@programming.dev 4 points 1 week ago* (last edited 1 week ago)

buffer overflows are critical for memory safety since they can cause silent data corruption (bad) and remote code execution (very bad). Compared to those a "clean" unhandled runtime error is far preferable in most cases.

[–] sus@programming.dev 9 points 2 weeks ago (1 children)

We can avoid expensive branches (gasp) by using some bitwise arithmetic to achieve the so-called "absolute value", an advanced hacker technique I learnt at Blizzard. Also unlike c, c# is not enlightened enough to understand that my code is perfect so it complains about "not all code paths returning a value".

private bool IsEven(int number)
{
    number *= 1 - 2*(int)(((uint)number & 2147483648) >> 31);
    if (number > 1) return IsEven(number - 2);
    if (number == 0) return true;
    if (number == 1) return false;
    throw new Exception();
}
[–] sus@programming.dev 87 points 2 weeks ago* (last edited 2 weeks ago) (9 children)

After working at blizzard for 51 years, I finally found an elegant solution by using the power of recursion

private bool IsEven(int number){
  if (number > 1) return IsEven(number - 2);
  if (number == 0) return true;
  if (number == 1) return false;
}
[–] sus@programming.dev 2 points 2 weeks ago* (last edited 2 weeks ago)

Up and until the rule applies to so many countries that the sites just make the requirement universal, this will do nothing to stop bots as the bots will all just operate from countries that are not under age restriction laws. Even after that it's likely the bot operators will just use fake IDs and similar, as it's unlikely website operators would setup reliable verification of identity for every single country they want to serve.

[–] sus@programming.dev 22 points 1 month ago (2 children)

Boybortion, now recognized by Wiktionary the free dictionary

[–] sus@programming.dev 2 points 1 month ago* (last edited 1 month ago)

though this pic is in winter, and there could well be a bunch of trees just to the right off-camera

(also the cars and the satellite dish give away that this is what a commieblock looks 50 years after being built)

[–] sus@programming.dev 71 points 1 month ago

funny how well this fits for both meanings

[–] sus@programming.dev 34 points 1 month ago* (last edited 1 month ago) (1 children)

this would actually be achieved by a team of 20 thousand oompa loompas with small shovels and 500 million tons of cocaine

[–] sus@programming.dev 15 points 1 month ago* (last edited 1 month ago)

these are probably trolls. At one point quora had a "partner program" where people would get paid to post questions, but only if the questions got enough engagement. The question generators realized that coming up with interesting questions was kind of hard, so they just started pouring out ragebait.

If it's too obvious people may realize it's a troll, so the ideal way to do it is phrase it in a vague way that leaves a lot to the imagination (here for example people can easily make the assumption that you're an idiotic and boneheaded parent)

[–] sus@programming.dev 8 points 1 month ago (1 children)

openAI tried to remove the mexico filter but they just can't. The AI is hopelessly addicted to that sepia tone

 
38
math (programming.dev)
 
 
class Node:
    def __init__(self, edges = set()):
        self.edges = edges


def main():
    foo = Node()
    bar = Node()
    quz = Node()

    foo.edges.add(bar)
    bar.edges.add(foo)

    assert(foo is not bar) # assertion succeeds
    assert(foo is not quz) # assertion succeeds
    assert(bar is not quz) # assertion succeeds
    assert(len(quz.edges) == 0) # assertion fails??


main()

spoilerMutable default values are shared across objects. The set in this case.

 
401
idiot (programming.dev)
 
 
 
 
 
view more: next ›