Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
renox
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
121.
▲
by
renox
2y ago
You don't remember "normal" bugs, you remember the hellish one.. I'll never forget the bug where a function took by copy a mutex (instead of passing it by reference) so locking the mutex didn't work which triggered
122.
▲
by
renox
2y ago
I remember coding a Reversi as a school project: players liked my project because it was so weak that they could beat it!
123.
▲
by
renox
2y ago
I don't find it bizarre: even assembly language don't have much control over the memory hierarchy, there's prefetch load and nothing else...
124.
▲
by
renox
2y ago
Which string exactly? I don't use Facebook.. What data are they going to sell?
125.
▲
by
renox
2y ago
u0?? Why?
126.
▲
by
renox
2y ago
Not by much?? You're exaggerating..
127.
▲
by
renox
2y ago
Well Zig has ReleaseSafe for this.. ReleaseFast is for using these UBs to generate the fastest code.
128.
▲
by
renox
2y ago
-fwrapv is for signed integer overflow not unsigned .
129.
▲
by
renox
2y ago
I wonder if someone will make a git/Unison hybrid VCS for a "normal" language (C++, Java, Python..), this could be quite interesting.
130.
▲
by
renox
2y ago
You'd be surprised: Zig has one UB (Undefined Behaviour) that C doesn't have! In release fast mode, unsigned overflow/underflow is undefined in Zig whereas in C it wraps. :-) Of course C has many UBs that Zig doesn't hav
131.
▲
by
renox
2y ago
Unfortunately this is an exception not the rule..
132.
▲
by
renox
2y ago
the RISC example in the article is a bit weird: on one hand, it may take even more instructions to load an address in a RISC, on the other hand all the RISC I know have an 'addi' instruction, no need to do 'li r2, 1; add r3,
133.
▲
by
renox
2y ago
> By choosing what to measure in the present, we participate in the creation of the past. Not everybody accept this interpretation of this experiment!!
134.
▲
by
renox
2y ago
Thanks for the information. I'm relieved that they decided to remove this trap as it could really have been a nasty one (worse than integer overflow because you can just use ReleaseSafe)
135.
▲
by
renox
2y ago
> Zig doesn't provide any rationale for why it picked UB rather than wrapping There's no need to provide a rationale because it's obvious, from a performance POV: 1) (a) UB on overflow > (b)wrapping on overflow 2) (b)wr
136.
▲
by
renox
2y ago
> integer overflows panic Not in all the ReleaseFast mode where both signed and unsigned overflow have undefined behaviour. And there's also the aliasing issue, if you have fn f(a:A, b: b:*A) { b = <>; which value has '
137.
▲
by
renox
2y ago
That's funny but given the normal result of buying a lottery ticket, bravery == stupidity.
138.
▲
by
renox
2y ago
>ties stopped you spilling food on your shirt Uh?? Given the size of normal ties, their "use" as a protection for a shirt is dubious!
139.
▲
by
renox
2y ago
> smoking,[]. are much worse Sure smoking effects are worse but there's a easy solution: never start smoking. But you can't stop eating..
140.
▲
by
renox
2y ago
It's exactly like other media (TV, movies, books), most of it is uninteresting but from time to time there's a jewel.
141.
▲
by
renox
2y ago
Not really comparable. Flying cars are not technological fiction, they're just called helicopters, it's just that from a economic/ecology POV they make no sense. Space travel between worlds is SF.
142.
▲
by
renox
2y ago
> The universe could be full of black holes in the asteroid mass range the size of hydrogen atoms. ? Not if there's Hawking radiations.
143.
▲
by
renox
2y ago
Thanks, I didn't know about her which is a shame because her discovery is Nobel worthy..
144.
▲
by
renox
2y ago
While I agree with the first part of your post, I disagree with your second part, there are a few rich people who don't need to work.. > Work in any way shape or form cannot be avoided. Not because it is physically necessary, but be
145.
▲
by
renox
2y ago
> 30M SLOC in the Linux kernel is largely stuff like device drivers, autogenerated headers, etc. And? These drivers matter otherwise you have Haiku, Redox, etc OSs that seems promised to an "eternal" beta status because they
146.
▲
by
renox
2y ago
Best? Sorry but I think that's a poor one because if someone else drink your milkshake, you don't have it anymore which isn't the case here.. Of course if someone copies your data, while you still have your data their value h
147.
▲
by
renox
2y ago
The thing is: In large codebase the tool may become slow or crash, in a new language you may not have such tool.. Grep is far more robust!
148.
▲
by
renox
2y ago
Except that any coding 'rule' not enforced by a tool is likely to be ignored once a team is big enough. We have such kind of checker at work, it is a good thing provided you can add (justified) exceptions
149.
▲
by
renox
2y ago
>2. nobody uses it on mips either, so it is likely of no use. Sure but at the time Rust, Zig didn't exist, these two languages have a mode which detects integer overflow..
150.
▲
by
renox
2y ago
Whoa, someone else who doesn't believe that the RISC-V ISA is 'perfect'! I'm curious: how the discussions on the bitfield extract have been going? Because it does really seem like an obvious oversight and something to ad
More ›