News for hackers. Stuff that matters.

renox

Re:Reducing undefined behavior in the C language on Tuesday October 13, 2026 @02:48AM (#50067730)
Nobody forces you to use unchecked build! And some people want maximum performances, I've read that bound checking can hurt SIMDification..
Re:Reducing undefined behavior in the C language on Monday October 12, 2026 @04:19AM (#50053106)
Or that reasonable people may disagree on when to make signed/unsigned overflow undefined: Zig didn't only make it an UB on unchecked build they also trigger an "abort on overflow" in checked build.
Re:Reducing undefined behavior in the C language on Friday October 09, 2026 @04:40PM (#50026312)
Zig disagree with you: they even made unsigned OV undefined (in unchecked mode)
Re:Dirty Optimization Secrets (C for Playdate) on Monday October 05, 2026 @04:01AM (#49961958)
> The same goes for its "Code Density" argument: nope, code density is very important.

Sure, but ARM's thumb has shown that you can get a RISC which has the same code density as current CISCs.

Of course, it's because current CISCs are bad due to backward compatibility but..

Re:A 40ms Go garbage collector pause caused by swap on Monday October 05, 2026 @03:29AM (#49961729)
> Unfortunately that's somewhat expected - regardless of implementation

Yes, that's expected and no not "regardless of implementation": the GC implementation CAN be improved.

See this discussion on reddit: https://old.reddit.com/r/programming/comments/1wf2fei/40ms_g...

Copy/pasted here: >>

I remember a research paper about swap and GC, where the GC cooperated with the OS to avoid this kind of issue. AFAIK it went nowhere, too bad.

[–]andreiross[S] 15 points il y a 21 jours

Are you talking about this one? https://cse.buffalo.edu/\~mhertz/bc-pldi-2005.pdf. If so, yes. Too bad. I don't know the repercusions this paper had in the past, though, in the sense of pros and cons of the bookmark collector. Don't know if anyone tried to actually implement it or design it at some point.

[–]renozyx 9 points il y a 21 jours

Yes, congratulations for finding it. And I don't know either,. Except that they did implement it on Linux (of course) https://plasma.cs.umass.edu/emery/cooperative-memory-managem...

<<

Re:The internet discovers TLA+. Now what? on Friday October 02, 2026 @02:00PM (#49936564)
It isn't a toy for sure, but I doubt that it has good scalability stories when using SMP.. I'd love to be wrong given that even phones are multicores, so feel free to correct me.
Re:Writing Efficient C++ Code on Monday September 28, 2026 @06:10AM (#49875770)
'data oriented' doesn't mean 'just use SoA' it means use data structures which correspond to your data access pattern. Which is quite difficult to know in complex applications and which can change..
Re:Socrates vs. the Written Word (2011) on Wednesday September 23, 2026 @03:10AM (#49812668)
> hands are wrung that communication will become rife with error and misunderstanding because unlike the telegraph, the newfangled telephone leaves no written record!

Well let's not forget that early phone communication quality was ahem not-very-good, so of course errors were an issue.

Re:Why isn't mutable a subtype of immutable, or vice versa? on Tuesday September 22, 2026 @12:10PM (#49803623)
> If you have a read-only variable and exclusive access to it, then you can rely on immutability as well.

The problem is the "exclusive access to it", most language aren't Rust.. Some Ada-implementation has the problem ( https://news.ycombinator.com/item?id=43001394 )

Re:The NX bit is not just about security on Monday September 07, 2026 @05:05AM (#49595879)
Why do you say this? The post is quite clear that marking the memory region as NX fix the issue caused by speculative execution.
Re:Static Allocation, Constant Work on Friday September 04, 2026 @08:21AM (#49563575)
> the OS _writes_ unused memory pages to the swap file

The OS write unused memory pages to the swap file by default. But the 'constant memory' design is usually done with locking in memory both the executable and memory pages (also pinning the process to CPUs, using realtime priorities etc).

Re:The Qantas A380 engine disintegration in 2010 on Wednesday September 02, 2026 @05:55PM (#49543102)
Read about the AF447 Rio-Paris crash. Input stick averaging?? That's a huge design mistake which contributed to the crash and AFAIK is still here..
Re:A curmudgeon tries a language server on Thursday August 27, 2026 @03:43AM (#49461274)
You're phrasing this as if using an IDE was always an advantage, but unfortunately this isn't always the case:

-IDEs are more resources hungry, I remember when trying to use CLion on a big C++ codebase, until increasing the garbage collector maximum heap size all I had was a blank screen, after it was just unusably slow...

-even when IDE work, LSP for C++ codebase aren't very good, for example the caller hierarchy is usually very incomplete..

-I remember having been asked quite a few times, about "how do I use the IDE's integrated debugger to debug a target which was available only through ssh and then you had to telnet from one board to another?" My answer? Use gdb.

That said, I use VSCode now because its multiple tab handling is very nice, but I use it mostly as a glorified text editor (not by choice but because C++ is really IDE's unfriendly).

Re:Malicious Rust crate Arrayref runs a build-time payload on Thursday August 20, 2026 @10:14AM (#49374874)
> It's a difficult coordination problem.

Well, it depends on the language: language which "capabilities" (both for the source code and for the building* ) could in theory really reduce a lot of the burden to identify supply chain attacks.

*: some research language have/had capabilities which would make supply chain attack "obvious" but for build systems I don't know if this exist.

Re:RISC-V: They should have known better on Sunday August 16, 2026 @12:20PM (#49321396)
One thing I noticed with your clever encoding is that you can avoid some nops: instead of having 2 15 bits instructions followed by two nops, you could have two 30 bits instructions, saving maybe a little decoding energy.

Also the 60bit format will really help for loading immediates..

That said I wonder why normal ISA do not contain a 'Load Immediate on Next PC'? And if you want to allow parallel decoding the first byte of the immediate would be a 'special noop' and the first immediate byte would be inside the Load Immediate Next PC instruction instead.

Re:RISC-V: They should have known better on Sunday August 16, 2026 @09:55AM (#49320115)
So a VLIW, interesting but usually compressed instructions are at most two-registers..
Re:What Garbage Collection Costs on Friday August 14, 2026 @05:30AM (#49296438)
If the language is Java which puts the GC in nearly everything you're f..., other languages have GCs and nonGC'd data so you go to the wonderfull world of manually managed objects with its use-after-free..
Re:Why vibe code in Common Lisp? on Thursday August 13, 2026 @03:52AM (#49282920)
> Do you really think current LLMs can implement a large application in C as securely as they can in e.g. Go?

That's not my experience: I've seen an LLM generate a C++ use-after-free (1.5 month ago).

Re:Show HN: Wyzer Programming Language on Friday August 07, 2026 @07:02PM (#49217266)
Congratulations your language is trying to solve an hard problem.

But .. your language mostly hide when you're doing an 'inside' function call or an 'external' function call. I'm not sure I like this; 1) the latency of both operation is very different so you want to minimise the number of 'external' function calls 2) what happens in case of 'timeout' for external function calls? I didn't see it in the doc, did I miss it?

> The car industry is constantly innovating trying to prevent accidents and make them less damaging to occupants

And at the same time, they make bigger and bigger cars which make more serious accidents for pedestrian, young children, etc.

Re:EYG: A Programming Language for Humans on Tuesday July 28, 2026 @04:11AM (#49080861)
This part is very bad, 99% of the time if you overflow a 64 bit variable it is because you did the wrong computation, not because you need BigInts..
Not the only one though: I remember what happened when we 'invaded' Lybia: not one criticism in the French news anywhere, total censorship, even though our media had widely and correctly criticised the US for the Irak war..

So I think the best thing is to get news from everywhere Russia, China, the US, Europe, but that's a lot of work..

Re:What If We Made Advertising Illegal? on Friday July 24, 2026 @07:20PM (#49042810)
> In France, there has been some ban on advertising alcohol, cigarettes.

So technically, it's possible but of course politician's corruption is a big issue..

> And, on the other end, C's warts, footguns and ancient quirks also matter less if you have an LLM plow through it.

'plow through it's?? An LLM can definitedly fall into these traps!

Happened to me a few months ago, I couldn't believe that an LLM would generate a use-after-free in not-so-complex code but it did.. Newer LLM seems better now but buyer beware!

> Human beings are rational animals as such

Really? Explain the success of advertising, superstitions (including religion) then.

Re:Every Frame Perfect on Saturday June 13, 2026 @11:26AM (#48518207)
Bah, each time someone say this they "forgot" that one side effect of 'every frame is perfect' is that it can increase latency.. Perfection or latency? That should be the user's choice not the developer's..
Re:The Ü Programming Language on Friday June 05, 2026 @01:32PM (#48415695)
1) the name is a discoverability issue for non-german people.

2) In the examples, the placement of & is incoherent: sometimes it's 'i64&', sometimes it is 'i64 &', pick one (I prefer the first).

3) constexpr is a long name for a 'base' concept. comp/<a special letter> would be better. Also conversion_constructor is huge.

4) In D, their static_if doesn't introduce a scope, Alexei Alexandrescu has made a very insteresting pitch about this.

5) zero_init is nice.

6) I don't like "hidden" overloaded operators, how about #+ for the overloaded variant of +?

7) you support i128 natively but integer literals are limited to 2*64-1?

8) I'm slowly reading "reference checking" ( https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/r... ) which seems to be an important part of the language, and I still don't know what's the integer overflow behaviour which is quite important..

I advocate Zig's behaviour: signed and unsigned have undefined behaviour in case of overflow for optimised build, trap in debug build and there are modulo operators.

Re:NPM packages from Red Hat have been compromised on Monday June 01, 2026 @11:05AM (#48357812)
Bah, I think that these kind of vulnerabilities exist in any "packaging ecosystem" where the base language offer "ambient authorities"(any library can access your filesystem) which is .. all of them! AFAIK only research languages do not provide these ambient authorities :-(
Re:Magnifica Humanitas (Encyclical Letter) on Monday May 25, 2026 @08:55AM (#48266268)
> In fact I think atheists should make more effort to learn about the vast diversity of other faiths. It's very narrow to be atheist only about the Abrahamic deity.

Your sentence doesn't really make sense, and there is a lot of deities..

> You end up incorporating a lot of Christian thought without realizing because it's so deeply ingrained that it seems like the only option.

Depends on the country, some Northen european countries have a very high proportion of atheists, so it happens probably less there.

Re:The Third Hard Problem on Sunday May 17, 2026 @08:47AM (#48168443)
Is there an OS whose primary FS is a taggedFS? It'd be interesting to hear from the users if this is nice to use or not..

Older »