sus

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

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

[–] sus@programming.dev 1 points 5 days ago* (last edited 5 days 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 5 days ago* (last edited 5 days 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 week ago* (last edited 1 week 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)

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

My major version updates on 2 computers with linux mint in the past few years have been just one click, wait, reboot when prompted, everything works and you barely even notice that anything changed. Though maybe I've just been lucky

though the rest of the video's takes on the linux experience for new users seems pretty accurate to me (lol downloading an application and using it requires at least a manual chmod +x and that's the best case scenario. Maybe there's a distro that has a solution but I have doubts (and "have everything you could possibly need in the package manager" is obviously a nonstarter))

But the community parts seem odd to me:

Is "just disable secure boot" a bad take? Has someone been holding everyone out on a better solution?

and

The only way linux is going to change is when money and development power is given to major dekstop Linux projects. It's time to stop wasting time on customization or packaging

is just.. sure, herd all the cats into one place, make them all work together in harmony, and summon 500 million dollars out of thin air to wrap it all together. Instead of writing bash scripts everyone should be praying to gabe newell to save us lol

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

Someone brough up a theory that it's a "symbolic punishment" for a journalist:

remove the eyes so you cannot see
remove the brain so you cannot think
remove the larynx so you cannot speak (the larynx contains the vocal cords)

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

Capitalism isn't that nebulous, we can start with the basic wikipedia definition:

Capitalism is an economic system based on the private ownership of the means of production and their use for the purpose of obtaining profit.[a] This socioeconomic system has developed historically through several stages and is defined by a number of basic constituent elements: private property, profit motive, capital accumulation, competitive markets, commodification, wage labor, and an emphasis on innovation and economic growth. Capitalist economies tend to experience a business cycle of economic growth followed by recessions

Now what's the central problem here? I'd say it's definitely capital accumulation. The problem is that capital is power, and it has a strong tendency to grow exponentially. Once capital becomes concentrated enough, it will subvert the government via bribery and any democracy via privatized propaganda. From an anarchist perspective it's just another unjust power structure, but veiled behind layers of false meritocracy and false consent.

If you make it impossible for private individuals or organizations to accrue large amounts of capital, you effectively no longer have capitalism but you may still have a market economy.

[–] sus@programming.dev 6 points 4 weeks ago (1 children)

The earth is rotating, which is a non-inertial reference frame. Fido simply uses its own reference frame, which following the command is now inertial. The result is that Fido is no longer affected by gravity, and slowly floats away just as in the comic

[–] sus@programming.dev 15 points 4 weeks ago

Down here, salt is a way of life

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

So this is exploratory foundational research. It uses "2D materials" (eg. things similar to graphene) and nonstandard elements, and so far they have only manufactured a few individual bits, so "meeting the swelling appetite" is at least 10 years away, and that is probably optimistic

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

inverted totalitarianism

though it could also just be called good old oligarchy with a thin veneer of democracy

 
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 ›