Readit News logoReadit News
const_cast commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
astrange · a day ago
> Yes this is why all competent libraries don't actually use string for path. They have their own path data type because it's actually a different data type.

What is different about it? I don't see any constraints here relevant to having a different type. Note that this thread has already confused the issue, because they said filename and you said path. A path can contain /, it just happens to mean something.

If you want a better abstraction to locations of files on disk, then you shouldn't use paths at all, since they break if the file gets moved.

const_cast · a day ago
A string can contain characters a path cannot, depending on the operating system. So only some strings are valid paths.

Typically the way you do this is you have the constructor for path do the validation or you use a static path::fromString() function.

Also paths breaking when a file is moved is correct behavior sometimes. For example something like openFile() or moveFile() requires paths. Also path can be relative location.

const_cast commented on What is going on right now?   catskull.net/what-the-hel... · Posted by u/todsacerdoti
rafterydj · a day ago
That sounds horrendously inefficient, no?

Is creating a giant wobbly world of unreliable AIs all talking to each other in effort to get their own tasks accomplished, is that leaving us much better off than humans doing everything themselves?

Better yet, if you have an application that does exactly what you want, why would you (or an AI representing you) want to do anything other than use that application? Sure you could execute this binary and get what you want, OR you could reach to the AI-net and make some other AI do it from scratch every time. With inherently less reliable results.

const_cast · a day ago
Sorry I should of specified, this is assuming a world with perfect AIs.

The world right now is pretty strict just because of how software has to be, which has a lot of upsides and downsides. But there's some wobblyness because of bugs, which break contracts.

But I think then in the future you have AI which doesn't make mistakes and you also have contracts.

Like the airline agent booking your flight (human or AI) has a contract - they can only do certain things. They can't sell you a ticket for one dollar. Before applications we just wrote these contracts as processes, human processes. Human often break processes. Perfect AI won't.

And to us, humans, this might even be completely transparent.

Like in the future I go to a website because I want to see fancy flight plans or whatever and choose something.

Okay, my AI goes to the airline and gets the data, then it arranges it into a UI on the fly. Maybe I can give it rules for how I typically like those UI presented.

So there's no application. It works like an executive assistant at a job. Like if I want market research, I don't use an application for that. I ask my executive assistant. And then, one week later, I have a presentation and report with that research.

That takes a week though, perfect AI can do it instantly.

And for companies, they don't make software or applications anymore. They make business processes, and they might have a formal way for specifying them. Which is similar to programming in a way. But it's much higher level. I identify the business flow and what my people (or AI) are allowed to do, and when, and why.

const_cast commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
adastra22 · a day ago
Even on Linux, you can't have '/' in a filename, or ':' on macOS. And this is without getting into issues related to the null byte in strings. Having a separate Path object that represents a filename or path + filename makes sense, because on every platform there are idiosyncratic requirements surrounding paths.

It maybe legacy cruft downstream of poorly thought out design decisions at the system/OS level, but we're stuck with it. And a language that doesn't provide the tooling necessary to muddle through this mess safely isn't a serious platform to build on, IMHO.

There is room for languages that explicitly make the tradeoff of being easy to use (e.g. a unified string type) at the cost of not handling many real world edge cases correctly. But these should not be used for serious things like backup systems where edge cases result in lost data. Go is making the tradeoff for language simplicity, while being marketed and positioned as a serious language for writing serious programs, which it is not.

const_cast · a day ago
> Even on Linux, you can't have '/' in a filename, or ':' on macOS

Yes this is why all competent libraries don't actually use string for path. They have their own path data type because it's actually a different data type.

Again, you can do the Go thing and just use the broken string, but that's dumb and you shouldn't. They should look at C++ std::filesystem, it's actually quite good in this regard.

> And a language that doesn't provide the tooling necessary to muddle through this mess safely isn't a serious platform to build on, IMHO.

I agree, even PHP does a better job at this than Go, which is really saying something.

> Go is making the tradeoff for language simplicity, while being marketed and positioned as a serious language for writing serious programs, which it is not.

I would agree.

const_cast commented on 4chan will refuse to pay daily online safety fines, lawyer tells BBC   bbc.co.uk/news/articles/c... · Posted by u/donpott
AuryGlenz · a day ago
Won’t it just be the UK telling Cloudflare to block 4chan specifically for the UK (or we’ll fine you too)?
const_cast · a day ago
Yeah that's option 3, for now. But they won't go after cloudflare in the general case because it's too risky IMO. And cloudflare will only comply to the absolute minimum they can get away with, because they can't burn money auditing every single customer behind cloudflare.
const_cast commented on 4chan will refuse to pay daily online safety fines, lawyer tells BBC   bbc.co.uk/news/articles/c... · Posted by u/donpott
GeoAtreides · 2 days ago
It's not elitist to remark that people tech skills are atrophying. The zoomers literally have memes about how bad are at tech stuff.

Setting a VPN is 100% not trivial, I know that because I recently set up a wireguard vpn on a VPS. Not impossible, sure, but out of the reach for a normal person.

Sure, one can ask a techie friend (if one's has a techie friend capable of self-hosting a VPN). So now instead of the gov ban covering 90% of the population, it covers what? 85%? 80%?

All self-hosted tools will not make a difference. Selling turnkey tools will be banned.

You can't win against the government. Not in 2025.

const_cast · a day ago
I think there's a good chance that when normies have to upload a picture of their real life ID to watch a funny tiktok or read a tweet they might start looking into VPNs.

Right now most of the privacy violations are covert and everyone is dishonest. Nobody reads TOS or EULA, Google just say "pinky promise we're not mean!", etc.

But there's no way to automate scanning someone's face to view a Garfield comic.

Governments are getting far too cavalier. They're flying too close to the sun here. They've already gotten away with murder and then some, they should quit while they're ahead.

Their greed will be their downfall. People will eventually push back.

const_cast commented on 4chan will refuse to pay daily online safety fines, lawyer tells BBC   bbc.co.uk/news/articles/c... · Posted by u/donpott
ovi256 · 2 days ago
CF will cooperate with UK authorities because they're not in 4chan's business.
const_cast · a day ago
I doubt it heavily. CF has control over a large chunk of the global internet - they're not going to go thru their clients one by one and make sure they're doing age verification. That's absurd and far too expensive.

The alternative to that is either:

1. UK blocks cloudflare (unlikely, come on now)

2. UK gives cloudflare a pass (fairly common)

3. Somewhere in-between. Maybe UK cares about highly visible people behind cloudflare like 4Chan but not others.

const_cast commented on 4chan will refuse to pay daily online safety fines, lawyer tells BBC   bbc.co.uk/news/articles/c... · Posted by u/donpott
WillPostForFood · a day ago
The world is complicated, and normal to have conflicting ideas.
const_cast · a day ago
To an extent, but it's also priming, ie lying with statistics.

Obviously if you tell people you're doing something to protect children and that's its only for porn or whatever they'll say yes. You've primed them - you immediately put their minds on the focus of negative things like porn and children getting hurt. Nobody wants children hurt.

You need to ask the question more generically. "Do you support age verification to access certain categories of websites?"

Something tells me the numbers of agreeance will fall.

const_cast commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
adastra22 · a day ago
Not all text is UTF-8, and there are real world contexts (e.g. Windows) where this matters a lot.
const_cast · a day ago
Yes, Windows text is broken in its own special way.

We can try to shove it into objects that work on other text but this won't work in edge cases.

Like if I take text on Linux and try to write a Windows file with that text, it's broken. And vice versa.

Go let's you do the broken thing. In Rust or even using libraries in most languages, you cant. You have to specifically convert between them.

That's why I mean when I say "storing random binary data as text". Sure, Windows almost UTF16 abomination is kind of text, but not really. Its its own thing. That requires a different type of string OR converting it to a normal string.

const_cast commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
j1elo · 2 days ago
> People expect a map/filter method

Do they? After too many functional battles I started practicing what I'm jokingly calling "Debugging-Driven Development" and just like TDD keeps the design decisions in mind to allow for testability from the get-go, this makes me write code that will be trivially easy to debug (specially printf-guided debugging and step-by-step execution debugging)

Like, adding a printf in the middle of a for loop, without even needing to understand the logic of the loop. Just make a new line and write a printf. I grew tired of all those tight chains of code that iterate beautifully but later when in a hurry at 3am on a Sunday are hell to decompose and debug.

const_cast · a day ago
Just use a real debugger. You can step into closures and stuff.

I assume, anyway. Maybe the Go debugger is kind of shitty, I don't know. But in PHP with xdebug you just use all the fancy array_* methods and then step through your closures or callables with the debugger.

const_cast commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
remus · 2 days ago
That's a reasonable trade-off to make for some people, no? There's plenty of work to be done where you can cope with the occasional runtime error and less then bleeding edge performance, especially if that then means wins in other areas (compile speeds, tooling). Having a variety of languages available feels like a pretty good thing to me.
const_cast · a day ago
But go tooling is bad. Like, really really bad.

Sure it's good compared to like... C++. Is go actually competing with C++? From where I'm standing, no.

But compared to what you might actually use Go for... The tooling is bad. PHP has better tooling, dotnet has better tooling, Java has better tooling.

u/const_cast

KarmaCake day2267February 3, 2025View Original