Readit News logoReadit News
Lvl999Noob commented on Go’s race detector has a mutex blind spot   doublefree.dev/go-race-mu... · Posted by u/GarethX
jimbo808 · a month ago
My guess is that next the language gen will be languages that AI generates, which are optimized to be readable to humans and writable by AI. Maybe even two layers, one layer that is optimized for human skimming, and another layer that actually compiles, which is optimized for AI to generate and for the computer to compile.
Lvl999Noob · a month ago
For the current category of LLM based AI, "AI optimised" means "old and popular". Even if you add a layer that has much more details but may be a lot more verbose or whatever, that layer would not be "AI optimised".
Lvl999Noob commented on Generic Containers in C: Vec   uecker.codeberg.page/2025... · Posted by u/uecker
serbuvlad · a month ago
My problem with C++, and maybe this is just me, is RAII.

Now, Resource Aquisition Is Initialization is correct, but the corollary is not generally true, which is to say, my variable going out of scope does not generally mean I want to de-aquire that resource.

So, sooner or later, everything gets wrapped in a reference counting smart pointer. And reference counting always seemed to me to be a primitive or last-resort memory managment strategy.

Lvl999Noob · a month ago
Instead of reference counting, consider having two types. An "owner" type which actually contains the resource and the destructor to dequire the resource. And "lender" types which contain a reference (a pointer or just logically (e.g., an fd can just be copied into the lender but only closed by the owner) to the resource which don't dequire on destruction.

Same thing as what Rust does with `String` and `str`.

Lvl999Noob commented on The Tabs vs. Spaces war is over, and spaces have emerged victorious   xn--gckvb8fzb.com/tabs-vs... · Posted by u/ChiptuneIsCool
rkomorn · a month ago
So are we also going to have team themes, team syntax highlighting colors, team fonts, team dark/light mode, team screen resolution, etc?

Why not bikeshed the bikeshedding?

Lvl999Noob · a month ago
FWIW, team screen resolution is pretty much already there when the company provides the laptops (+ screens).
Lvl999Noob commented on Nullable but not null   efe.me/posts/nullable-but... · Posted by u/efeoge
codingdave · a month ago
How would the database know whether the other app layers depend on that value or not? You could absolutely have an app that does not require data in a specific field to function, yet all records happen to have data. This is actually fairly common in single-tenant apps, where some tenants populate a field and others do not. You need to look at how the data is used across the entire stack to know whether or not it should be nullable, not whatever the current data happens to be.
Lvl999Noob · a month ago
The script example in TFA is just a starting point. I believe you would still manually go through all the columns it finds and decide which ones are actually supposed to be nullable and which ones don't need to be. As the article said, nullable fields that don't contain null could be a sign of incomplete migrations and such.
Lvl999Noob commented on Nullable but not null   efe.me/posts/nullable-but... · Posted by u/efeoge
nlitened · a month ago
> you need a concept of absence that's different from null

Could you give an example? Null _is_ absence, the way I see it

Lvl999Noob · a month ago
What they are saying is that the field is always present in the domain model but we don't have the information to backfill it. For example, say you have a customers table. Originally, it just stored their name and internal ID. But now you are adding in their government ID as well. Except that you already have thousands of customers and you don't have their government ID. So you either make the column nullable and slowly backfill it over time. Or you find some default value which isn't null but the code understands it to still be empty. And again, you slowly backfill over time.
Lvl999Noob commented on Bus Bunching   futilitycloset.com/2025/0... · Posted by u/surprisetalk
Lvl999Noob · a month ago
1. Frequent service (<5 minutes between buses, ideally) 2. Enough capacity to support rush hours (so each bus can straight up refuse to take extra passengers) 3. Education campaigns and police / fines / other external factor for the short term (to break existing habits) 4. Separate public transport lanes so buses don't get stuck in traffic or behind red lights.

IMO, these are sufficient for a good public transport system. Skipping stops is the worst since it makes the whole network unreliable.

If the above points are too high of an investment and skipping stops is the only viable solution then a proper digital interface is needed. If the schedule is dynamic then the information about it also needs to be dynamic. I need to be able to know that the bus I am on is going to skip my stop and plan my next steps while I am sitting in the bus itself.

Lvl999Noob commented on Thunderbird: Fluent Windows 11 Design   github.com/Deathbyteacup/... · Posted by u/skipnup
pbmonster · a month ago
> Having a widescreen monitor is irrelevant to me unless I fullscreen my browser (which I don't and I assume most don't).

Are you kidding? I'm willing to bet 99% of users run their browsers fullscreen.

Using the drag-and-drop feature that splits the screen between two GUIs already marks the office power user, a third windows on a single screen brings us into the territory of the hardcore nerds running tiling window managers.

Lvl999Noob · a month ago
FWIW, I run my browser full screen. I run most apps full screen. By full screen, I don't mean that weird macos thing where it removes everything and locks you into a single app in a single workspace but the more standard one where the window is just expanded to fill the screen space.

The only time I run an app without fullscreen-ing it is if I don't have to do much in it or it doesn't have enough content to use up all the space anyways. Like system settings. Otherwise, I am using the app -> I am focusing on it -> I want it to take all the space it wants and show me everything going on inside it. My browser and my text editor are apps where I spend 99% of my time so they are always full screen.

Lvl999Noob commented on Some bits on malloc(0) in C being allowed to return NULL   utcc.utoronto.ca/~cks/spa... · Posted by u/ingve
xenadu02 · 2 months ago
Because zero-size types exist which you might want to take the address of. Possibly as a result of macro substitution or templating mechanism that only appears in certain build configurations.

It means you don't need a bunch of special-case handling if one out of 27 types ends up with zero size in some situation. It just all works the same way. Especially the unique address part because that would be an annoying source of difficult to track bugs.

Lvl999Noob · 2 months ago
Yes. I believe zero sized types should be possible and they should all have the same address. Trying to deref the pointer is UB right away because you do not have the byte under that pointer. As it is, the malloc implementation now needs special casing for 0 sized allocations and different implementations special case it differently. C is supposed to be low level so surface this confusion up. Let the programmer decide if they want a unique address and reserve a byte or a non unique one with no overhead.
Lvl999Noob commented on Some bits on malloc(0) in C being allowed to return NULL   utcc.utoronto.ca/~cks/spa... · Posted by u/ingve
Lvl999Noob · 2 months ago
Can someone tell me a usecase where you want multiple allocations of size 0, each one with a unique address, and each one unique from any other allocation (hence necessarily removing that pointer from being allocated to anything else) but can't use malloc(1) instead?

I think it would be much better if malloc(0) just returned 1 or -1 or something constant. If the programmer needs the allocation to have a unique address, they can call malloc(1) instead.

Lvl999Noob commented on Self-Host and Tech Independence: The Joy of Building Your Own   ssp.sh/blog/self-host-sel... · Posted by u/articsputnik
bluGill · 3 months ago
I didn't mean the two paragraphs to imply that they are somehow opposites (though on hindsight I obviously did). There are tradeoffs. a single binary is between docker and a library that uses shared libraries. What is right depends on your situation. I use all three in my selfhosted environment - you probably should too.
Lvl999Noob · 3 months ago
If you are using docker, do you save anything by using shared libraries? I thought docker copies everything. So every container has its own shared libraries and the OS running all those containers has its own as well.

u/Lvl999Noob

KarmaCake day238August 25, 2019View Original