Conversation
Every time a programmer uses global mutable state God kills a puppy
2
0
1

@scathach sorry but im gonna keep using it in my scripts you can't stop me

0
0
0
@scathach wait until you learn about how literally all state is global and "local" and "immutable" are high-level restrictions that won't work on the lower levels
4
0
4
@mold @scathach just because it's a microkernel doesn't mean the kernel couldn't access anything it pleases it's just isolation for drivers (same with exokernels)
1
0
1
Edited 10 months ago

@lucy @scathach need an os where the components are on separate microcontrollers talking over i2c brain4

1
1
2
@mold @scathach no more AAA gaming akkothumbup
0
0
1
@lucy @scathach even in assembly you can have these on most cpus thanks to mmu or not?
1
0
0
@lucy @scathach and learn that immutable consumes extra memory and generally is slower, all while nobody really cares.

>mutable is bad
I'm gonna mutate your DNA into that of a fucking cabbage
3
0
2
@snacks @scathach kernel doesn't care about mmu. it can just disable paging, or jump into any processes page tables.
1
0
1
@hj @lucy @scathach
>>mutable is bad
Every time a Rust programmer types mut, God kills a puppy.
1
0
0
@lucy @scathach you can also just figure out where locals are in forth and access them that way. Point still stands that the feature is there even if you can get around it if you really want
1
0
0

@lucy @scathach @hj immutable strings are a dumbass brainworm that’s just causing memory fragmentation all over the place

1
1
4
@lucy Duh that's why we have nice things like compilers
0
0
2
@snacks @scathach it's not about figuring it out in a hacky way, the kernel literally just does that
1
0
0
@phnt @lucy @scathach >Every time a Rust programmer exists
>God kills a puppy.
0
0
2

@lucy @scathach @hj fuck the sensitive mathbrains tbh, the hardware is nothing but mutable state so that’s what you gotta work with if you want to write real software that doesn’t run like absolute dogshit

1
0
1
@lucy @scathach yeah, but you can also use the mmu to get immutable and hidden data, even when writing assembly
0
0
0
@mia @scathach @hj FP has nice ideas but this fear of global state is the dumbest thing about it
2
0
0

@lucy @scathach @hj i mean global mutable state in something like a library is pretty horrible though because it prevents reentrancy

1
0
1
@lucy @hj @mia Global state is fine as long as it's not mutable
1
0
0

@lucy @scathach @hj i mean just look at libc, it’s nothing but hateful shit you can’t or don’t want to use because of global state nonsense

2
0
0

@scathach @hj @mia do you consider something like

static uint64_t myvar = 0;

in a file to be global? it’s only accessible (on source level) within that file

1
0
0
@mia @scathach @hj libc is terrible not using it already makes C a much more tolerable language
0
0
0

@lucy @scathach @hj people literally copy and paste musl code for some string conversions because they want a locale-invariant version and in libc you cannot have that. you can’t even generate or parse a string with floats without some other code in a different thread changing your decimal point into a comma while you’re in the middle of it

1
0
2

@lucy @scathach @hj i cannot BELIEVE that it’s 2025 and we are still deploying this kind of garbage code written by some mouthbreathing unix retard in the 70s

0
0
1
@lucy @hj @mia Yes, because it makes every function in the file a pain to test
2
0
0

@scathach @lucy @hj so you’re more worried about side effects than global state

0
0
2
@scathach @hj @mia some things have side effects by design. you're only considering functions that compute and pass a result, the kind of stuff mathematicians want out of FP. what if by design your code modifies something on the hardware level? for instance, set up paging? or activate an additional cpu core? or write to the harddrive?
1
0
0
@lucy @hj @mia Obv with really low level code you have no choice but most programs are much better structured as mostly pure functions
1
0
2
@scathach @lucy @mia I strongly disagree when you have "pure function" world you run into nonsense like "state is actually infinite loop that awaits command to return/write it's value" that's hard to understand and inconvenient to work with. Immutable is handy for debugging intermediate states but otherwise it's not really beneficial.

T. JS dev
T. Zachtronics enthusiast
1
0
2
@hj @lucy @mia Yeah trying to functionally manage side effects through monads is just dumb
1
0
2
@scathach @lucy @hj @mia immutabilty seems like a good idea when working with big codebases mostly. When you understand all the code you interact with it becomes less useful
0
0
1