sus

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

Davy jones couldn't step on land, and the dirt in the jar symbolizes land in the same way as the bucket here supposedly counts as land

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

getting the picture to perfectly replicate the image on the screen without it being noticeable that it's just a picture of a screen would be so difficult it would probably be easier to modify the camera instead

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

blockchain is a totally useless extra bit glued on there. All the real evidence will be the cryptographic signatures added by the hardware manufacturer (which can be faked, but requires extracting the keys from the "security chip" in the camera which may be very difficult)

all the blockchain does at that point is provide a timestamp of "signed hash of the picture+metadata was uploaded on x date" which can easily be done without blockchain too

[–] sus@programming.dev 2 points 3 days ago

You can still be snobby by instead insisting on "fold, scan, iterate"

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

the czech republic has over 40 thousand police officers and singapore routinely executes drug dealers
So while it may be technically true in that no actual violence was involved in the latest changes of government system, the threat of violence is always there

[–] sus@programming.dev 2 points 4 days ago (1 children)

Apparently it's specifically "Players can avoid sequences of precisely timed inputs ("quick time events") or button mashing"

[–] sus@programming.dev 4 points 1 week ago

Anon confused a tap water filter for a camping filter

[–] sus@programming.dev 11 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

I love the implication that a "rational actor" would choose death over losing money

[–] sus@programming.dev 3 points 3 weeks ago* (last edited 3 weeks ago)

When you get to the informing policy stage, much "harder" sciences like pharmacology also get the same treatment of using completely disproven crap to inform drug policy. If you look hard enough, you can almost always find a study that agrees with your wildest biases and a PhD (often even in "good standing") who stands behind it and agrees with you.

That there are 500 papers that find the exact opposite of your conclusion is not much of an issue when you're acting in bad faith and have a friendly media outlet to voice your views

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

It's a technicality about the pointer type. You can cast the type away which typically doesn't change the actual value (but I'm pretty sure that causes undefined behavior)

For your example, int x = 0xDEADBEEF; signifies the integer -559038737 (at least on x86.)

char *p = (char*)0xDEADBEEF; on the other hand may or may not point to the real memory address 0xDEADBEEF, depending on factors like if the processor is using virtual or real addressing, etc

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

Lots of em-dash usage

Service goes down after emitting an event but before persisting internal state—causing partial failures that are hard to roll back.
Subscribe to an existing event and start processing—no changes to publishers.
Helps track a request across multiple services—even through async events.
We once had a refund service consume OrderCancelled events—but due to a config typo, it ignored 15% of messages.
Takeaway: fire-and-forget works—until someone forgets to monitor.
Use it when the domain fits—fan-out use cases, audit logs, or workflows where latency isn't critical.

combined with other chatgpt-isms like the heavy reliance on lists, yeah safe to say it's mostly AI generated

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

what kind of psychopath even came up with int a[ROWS][COLS] = { 0, 1, 2, 3, 4, 5, 6, 7 };

it's even obviously caught by -Wall (-Wmissing-braces) for both clang and gcc

(oh, actually, g++ fails to recognize it even though gcc and clang do recognize it)

sometimes the latter part is also caught by -fsanitize=undefined, though that goes away if you wrap the array access like so:
printf("%d\n", ((int*)a[0])[i]); (which I'm unsure if that's still undefined behavior, not that it's any more sane even if it isn't)

 
 
 
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.

 
 
 
 
 
 
 
view more: next ›