Programming thread

  • 🔎 If you see an alert for analytics.usips.org, this is a self-hosted system I am running as a test. It is GDPR compliant and collects no invasive information.
  • 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
Last time I read about Go it was when they didn't have generics.

What's the real advantage of Go over C besides "lifetimes/malloc/free & genearl pointer shit"?
None. C is standardized by ANSI and ISO, and is widely used. Go is controlled by Google, and we all know what eventually happens to every Google project. Google's flagship product, Google Search, probably isn't going to be shut down any time soon, but it's constantly getting worse and they're doing nothing to fix it, so even it clearly has one foot in the grave.
 
None. C is standardized by ANSI and ISO, and is widely used. Go is controlled by Google, and we all know what eventually happens to every Google project. Google's flagship product, Google Search, probably isn't going to be shut down any time soon, but it's constantly getting worse and they're doing nothing to fix it, so even it clearly has one foot in the grave.
It is under a BSD licence. It is used extensively by many people, and development would be moved elsewhere if Google were to ever drop it, which they won't be as they use it internally.
 
Grim. It doesn't even have sum types.

All projects should have script for autoformat. If there is none, it's a sign it is lead by retards.
At this point, I consider sum types to be mandatory for any language for me to enjoy. Along with first class functions.
 
Grim. It doesn't even have sum types.
Historically, that's been one of the great crimes of OOP: you can't define a sum type but instead define a base class and a number of subclasses with the ability for the user to define additional subclasses. The OOP cult thinks this is great because it's open-ended and extensible, but it denies that there are situations where the number of cases are logically restricted to a fixed set (e.g., Haskell's Ordering type has constructors LT, EQ, and GT, which exhaust all possible cases) and is inconsistent with mathematics, where definitions include one or more basis clauses (e.g., "Zero is a natural number."), zero or more inductive clauses ("The successor of a natural number is a natural number."), and some sort of closure clause ("Nothing else is a natural number.").
 
Best type system in mainstream usage. Pretty great concurrency model as a built in.

Edit: well and in that vein, I don't use Go generics and I feel they're unnecessary. Go's interfaces are fine and if they aren't, your idea is too muddled. Think it through a bit more or maybe python would be a better choice.
imo generics can be really handy for cutting down on expensive type assertions. And effective use of type constraints (and the idea of type sets in general) can be way more concise than having to implement methods of a certain interface for every relevant type.

Also, with shit like constraints.Ordered, you can do stuff like implement a BST for any ordered/comparable type:
C-like:
type BST[T constraints.Ordered] struct {
    left, right *BST[T]
    value       T
}

func (t *BST[T]) Lookup(x T) *BST[T] {
    switch {
    case t.value == x:
        return t
    case t.right != nil && t.value < x:
        return t.right.Lookup(x)
    case t.left != nil && t.value > x:
        return t.left.Lookup(x)
    }

    return nil
}
and constraints.Ordered is (or was) simply defined as
C-like:
type Ordered interface {
    Integer|Float|~string
}
nice and concise.

Plus, you have probably noticed a bunch of useful stuff like functions from the slices package are implemented as generics.
 
Last edited:
Historically, that's been one of the great crimes of OOP: you can't define a sum type but instead define a base class and a number of subclasses with the ability for the user to define additional subclasses. The OOP cult thinks this is great because it's open-ended and extensible, but it denies that there are situations where the number of cases are logically restricted to a fixed set (e.g., Haskell's Ordering type has constructors LT, EQ, and GT, which exhaust all possible cases) and is inconsistent with mathematics, where definitions include one or more basis clauses (e.g., "Zero is a natural number."), zero or more inductive clauses ("The successor of a natural number is a natural number."), and some sort of closure clause ("Nothing else is a natural number.").
Extensibility also heavily breaks exhaustiveness. So when you add another subtype, the compiler can't help you properly deal with it. (for example, having to run some piece on code whenever an element gets added to a collection, that has to decide based on the type, without it being a method on the object itself, as that piece of code would be a violation of that objects responsibility, like calculating some measurement total over the collection)
 
Why not just do data oriented? Branch on a property instead of a type.
That's kind of orthogonal to the other stuff. Data oriented grouping like data together, rather than grouping logical units (for example, group all movement data into one collection to handle movement, rather than having each enemy store that position in itself, so with an enemy that can't move, like a wall, you'd just not have the movement data for that enemy)
I can't tell if it's good or bad I always thought OOP was just some BS you had to do when people made you.
I consider OOP to be one of the biggest poisons to software devs these days, because it seems to work great until it doesn't. And by then, you already got poisoned into thinking the OOP way about everything.
 
That's kind of orthogonal to the other stuff. Data oriented grouping like data together, rather than grouping logical units (for example, group all movement data into one collection to handle movement, rather than having each enemy store that position in itself, so with an enemy that can't move, like a wall, you'd just not have the movement data for that enemy)

I can have a list of shapes and have a property on them be circle, square, triangle.

But I'd also just "ECS that shit brah" instead of OOP at all. Sparse arrays are great. Entity is just an id is just (ultimately) an index.

In this case you'd have a system to move what can move and if a thing doesn't move the system just doesn't do anything. 🤷

I consider OOP to be one of the biggest poisons to software devs these days, because it seems to work great until it doesn't. And by then, you already got poisoned into thinking the OOP way about everything.

I keep drifting away from the abstraction the language designer wants me to think in and just thinking "type is just a property on a
struct saying what it is and how big it is overall and giving you a way to look up the sub-parts of it."

I guess my type of Autism is "it's fucking data, operate on the fucking data."
 
Happy September, O dead programming thread. Welcome back to the real part of the work year.

I got hooked on a glm-5.3 free promo, and I'm planning to buy a legit LLM subscription to one of the services. As I'm a weirdo who has been working primarily with local models and the ubiquitous web chat interfaces, I'm out of my depth here. Anyone with more experience care to toss me a few pointers? Even 32-bit will do. uwu

I don't need much. I'm not pushing the boundaries, just writing small cogs that scratch my itches and probably will scarcely see publication, much less usership.
 
Happy September, O dead programming thread. Welcome back to the real part of the work year.

I got hooked on a glm-5.3 free promo, and I'm planning to buy a legit LLM subscription to one of the services. As I'm a weirdo who has been working primarily with local models and the ubiquitous web chat interfaces, I'm out of my depth here. Anyone with more experience care to toss me a few pointers? Even 32-bit will do. uwu

I don't need much. I'm not pushing the boundaries, just writing small cogs that scratch my itches and probably will scarcely see publication, much less usership.
Deepseek-v4-flash is still pretty cheap during US business hours and you can juice it with paypal, so there's no ongoing subscription. $10 is more than enough to try it out and do some experimenting.

On the front-end, reasonix aggressively manages the context to reduce input tokens. opencode is also nice and it has built in language servers (LSP), so you don't have to setup tree-sitter/roslyn/clangd MCP's. Avoid Deepseek Code, it burns tokens like mad.

If you're wondering what to tell the AI to do once you have the CLI harness setup and running in your project directory, here's a few to try:

- Give me an overview of this project.
- Review unit test code coverage and make recommendations.
- Review the project code and propose next steps.
- Propose next steps.

Note: the frontend's have a PLAN mode that *often* prevents the AI from making changes. I think it's TAB on opencode and SHIFT-TAB on reasonix.
 
Happy September, O dead programming thread. Welcome back to the real part of the work year.

I got hooked on a glm-5.3 free promo, and I'm planning to buy a legit LLM subscription to one of the services. As I'm a weirdo who has been working primarily with local models and the ubiquitous web chat interfaces, I'm out of my depth here. Anyone with more experience care to toss me a few pointers? Even 32-bit will do. uwu

I don't need much. I'm not pushing the boundaries, just writing small cogs that scratch my itches and probably will scarcely see publication, much less usership.
What are you actually asking us to give you? Am I just drunk or did no actually-answerable question get articulated here?

If you're just asking "which LLM should I use?" I've had good results just using Hermes Agent and qwen3-coder-next on local hardware for banging out scripts here and there (and scaffolding up a Qt6 C++ application in impressively short order). I don't think I'll ever pay for a Claude-style coding agent. For all their boasts about "1 million token context window!" and similar flexes, almost none of it's actually necessary. No, you really don't need to be able to load the entire Linux kernel repo into the context in one shot to write a device driver or figure out a performance bottleneck.

Also:
You should be shot. You'd better not be wearing pink/white/blue striped programming socks.
 
What are you actually asking us to give you? Am I just drunk or did no actually-answerable question get articulated here?

If you're just asking "which LLM should I use"?
No, I'm asking specifically about the large, frontier models. I'm looking to pay money for one of the large ones. I've done all the free/local shit. I'm finishing up a free week of GLM-5.3 which is a different beast entirely. Free/small models require a lot more tending, and I'm very busy with my day job right now. The "provide some guidance at breaktime" model of LLM collaboration is working for me.

You should be shot. You'd better not be wearing pink/white/blue striped programming socks.
I was getting kicked off Reddit for arguing that transgenderism was bogus before the phrase "cancel culture" had been invented, not long after Obama was first elected. Scary close to 20 years ago now. I guess I was in a bit of a mood when I wrote my last post. Don't worry about it. I try to avoid taking myself too seriously, that's all.
 
Last time I read about Go it was when they didn't have generics.

What's the real advantage of Go over C besides "lifetimes/malloc/free & genearl pointer shit"?
I'm a big fan of goroutines and concurrent processing in Go. It took a little bit of time to wrap my head around it, but once I got the hang of it I found that I could do a lot of really useful things with goroutines and channels.
 
People talk about Jeet-ware a lot on here. But I don't think they really know what it means. Most people mean React Native bullshit in Windows and other enshittified stuff. I would say that isn't Jeet-ware and is in fact just Atwood's law taking place.

What is Jeet-ware then?

Two weeks ago I asked for a bunch of repeated instructions in several CI workflows to be put into a bash script and have it pass params for the bits that are different. The only bits that were different were the names of the artefact it was building.

The guy I am working with has cut and pasted the bash commands into a JS file and put them as a string and then used string interpolation as the params to basically execute them via node.
 
I used to roll my eyes at the jeet comments more often than not, because I've worked with some smart Indians in my career.

But fuck, the caliber of these guys I see on LinkedIn, Facebook and other places has made me understand. That and the jeetisms I am seeing with some of my Indian colleagues lately when it comes to AI.
 
Back
Top Bottom