Programming thread

  • 🔧 Chat is under maintenance.
    🧊 New server is in an office waiting on a mexican.
  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
I like optional variables in Common Lisp and Ada, so I'm assuming Python fucks it up in some pathetic way. I recall reading that the default values are evaluated once at function definition rather than each time the function's called, for one. The more I learn about programming and Python, the worse the latter looks in every respect, so may I have a link to read more about why it's secretly a good thing the dipshit who made this language refuses to mentor white men?
I'm talking about the ability to just say "x := 3" in the middle of a function body without having to declare that there is a variable called x. Common Lisp doesn't do this (except for some niche case with special variables that everybody tells you to avoid? not sure), and there's no way Ada does it.

Python does fuck up optional function parameters too though: by making their default values objects rather than expressions. This means that when your default value is mutable, and something modifies that object, future calls will see the changed value.
Code:
>>> def lol(x = {}):
...     return x
...
>>> lol()
{}
>>> lol(3)
3
>>> lol()["why, guido?"] = ...
>>> lol()
{'why, guido?': Ellipsis}
This is why Python code will typically declare such optional variables dict | None = None and then have stupid boilerplate code that translates None to {} or whatever in every single function. It's inane.
 
I'm talking about the ability to just say "x := 3" in the middle of a function body without having to declare that there is a variable called x.
Oh, that, a very common cause of fuckups that, yes. Yeah, Common Lisp makes it easy to make special variables that way, but I know at least some implementations will throw warnings in some cases, and it's not a problem in practice. Ada just doesn't allow anything like that, no.
This means that when your default value is mutable, and something modifies that object, future calls will see the changed value.
Yeah, that means default values act like those held in closures, which Guido would know if he'd read the copy of SICP someone sent to him in the mail.
:story:
 
What was the selling point behind OOP, again?
ooppromisevsreality.png
 
What was the selling point behind OOP, again?
View attachment 9859148
The only unique thing to OOP is forcing everything to be inside objects. Which almost forces you to noun-ify everything, so you can't just have standalone behaviour/data but rather have to tightly couple them together. (While promising to make it less coupled).
 
The only unique thing to OOP is forcing everything to be inside objects. Which almost forces you to noun-ify everything, so you can't just have standalone behaviour/data but rather have to tightly couple them together. (While promising to make it less coupled).
That was the idea of OOP when they were creating Simula in the 60s and programming was just about nerds nerding out about numbers on the screen representing something like a simulated rocket trajectory that they were imagining in their minds. Object oriented programming as a trend started getting pushed by industry giants for a completely different reason: the promise was that classes and objects would be these simple and reuseable blocks that almost any idiot would be able to stack together to build new software, leading to a cookie cutter production process with totally interchangeable (= expendable) programmers.
 
That was the idea of OOP when they were creating Simula in the 60s and programming was just about nerds nerding out about numbers on the screen representing something like a simulated rocket trajectory that they were imagining in their minds. Object oriented programming as a trend started getting pushed by industry giants for a completely different reason: the promise was that classes and objects would be these simple and reuseable blocks that almost any idiot would be able to stack together to build new software, leading to a cookie cutter production process with totally interchangeable (= expendable) programmers.

"Let's try MY mental model, surely it will fix everything!" At least GOF did it while high and in Aspen I guess.

Also I like interchangeable parts. Standard bolts are neat.
 
View attachment 9859369
The nuget listing is retardedly light on info so I looked at the github.

Why not make it a commercial product at that point?
well technically the project no longer even has a purpose since .net added that kind of compilation as a built in feature. But before .net did it, I think they knew that if i tried to make it a commerical project it would break a lot of already existing projects. So they were stuck the open source hell version of winrar.
 
What was the selling point behind OOP, again?
View attachment 9859148
Making state management easier. Which it does, but avoiding state is even better and lots of OOP stuff encourages you to put state all over the place, resulting in the spaghetti ball on the right. Doesn't help that a lot of OOP languages are also crippled in other ways.
 
Wccftech: Claude Fable 5.2 Creates Stunning Underwater World In Just 97 KB, Runs At 180 FPS On An RTX 5070 Ti Without A Game Engine (archive)

This caught my attention primarily because it uses WebGPU, which I don't think has gotten much use yet despite wide support since 2025. Some projects are still using WebGL.
webgpu is currently very iffy due to mixed browser support, eg you currently need to run a chromium browser and its entirely possible for it to not be supported on your flavor of linux, its currently only offically supported on windows and linux, and i think firefox has it disabled on windows as well.
 
Back
Top Bottom