Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
clausecker
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
clausecker
4mo ago
Go had panic/recover right from the get go. Nobody “caved.” And indeed, you are free to use panic/recover for error handling in your code. That was always allowed. That said, the key insight of the exception craze is that error
2.
▲
by
clausecker
4mo ago
Really bad idea. Silently returning some (the wrong) value is always worse than catching the error right then and their and panicking. A panic is a noticeable symptom of something just having go wrong that is easy to chase after and debug.
3.
▲
by
clausecker
4mo ago
> No it really doesn't. It litters your code with if statements that are all just about the same, except that one that needs to be different, and you go blind looking at them all and can't spot the difference. If most of your e
4.
▲
by
clausecker
9mo ago
You can find the first set bit in an integer with a machine instruction, it's completely branch free. gcc has __builtin_ctz() for this. You'll either need to iterate over all set bits (so one branch per set bit) or use a compres
5.
▲
Hacking Washing Machines [video]
(media.ccc.de)
222 points
by
clausecker
9mo ago
|
49 comments
6.
▲
by
clausecker
9mo ago
So I've thought about it and I don't really feel like spending more time to convince you that this works. If you have questions I am happy to answer them, but please write your own code.
7.
▲
by
clausecker
9mo ago
This does track the state. If you want to track it across multple vectors of input, you'll need to carry it over manually.
8.
▲
by
clausecker
9mo ago
You can do it like this, assuming A is the mask of newlines and B is the mask of non-spaces. 1. Compute M1 = ~A & ~B, which is the mask of all spaces that are not newlines 2. Compute M2 = M1 + (A << 1) + 1, which is the first non-
9.
▲
by
clausecker
9mo ago
We do this with FreeBSD ports, but users don't have to clone the ports tree unless they want to modify ports or compile them with custom options.
10.
▲
by
clausecker
9mo ago
And the same reason NVRAM was dead on arrival. No affordable dev systems meant that only enterprise software supported it.
11.
▲
by
clausecker
10mo ago
That's more "load store architecture" than RISC. And by that measure, S/360 could be considered a RISC.
12.
▲
by
clausecker
10mo ago
You may enjoy the RISC deprogrammer: https://blog.erratasec.com/2022/10/the-risc-deprogrammer.htm...
13.
▲
by
clausecker
10mo ago
FreeBSD
14.
▲
by
clausecker
10mo ago
ARM already has most stuff required for this on board. Two proprietary extensions are used by Rosetta: one emulates the parity (rarely used) and half-carry (obsolete) flags, which can also be emulated conventionally. The other implementa
15.
▲
by
clausecker
10mo ago
It's very likely that there is some serious autovectorisation going on behind the scenes.
16.
▲
by
clausecker
11mo ago
Best one was when gedit had the option to syntax highlight for a language named “Los.”
17.
▲
by
clausecker
11mo ago
Had the same feeling browsing through the Haskell package collection. Felt like and almagamation of PhD theses, none of which were maintained after the author got his degree. Every single one a work of art, but most engeneered so badly th
18.
▲
by
clausecker
11mo ago
Such as?
19.
▲
by
clausecker
11mo ago
I'm talking about how they are able to integrate stuff that normally wouldn't fit into 32 bits (such as 3 operand simd with masking), not about getting the instruction set more compact. ARM knows how to do this (Thumb being the m
20.
▲
by
clausecker
1y ago
Also, the VAX instruction encoding is a class of horror above that of x86.
21.
▲
by
clausecker
1y ago
ARM64 has a trick up its sleeve: many instructions that would be longer on other architecturea are instead split into easily recognisable pairs on ARM64. This allows for simple inplementations to pretend it's fixed length while more c
22.
▲
by
clausecker
1y ago
LL/SC is performant, it just doesn't scale to high core counts. The VEX encoding is actually only rarely longer than the legacy one, and frequently it is shorter.
23.
▲
by
clausecker
1y ago
When I implemented SIMD-accelerated string functions for FreeBSD's libc, I briefly looked at Stringzilla, but the code didn't look particularly interesting or fast. So no surprise here.
24.
▲
by
clausecker
1y ago
If you give in to an unreasonable person's demands, that person will demand more and more until it all comes crashing down.
25.
▲
by
clausecker
1y ago
A famous fairytale from Germany.
26.
▲
by
clausecker
1y ago
My favourite museums are those that are a huge pile of old shit with some labels telling you what you are looking at. This whole "hundreds of screens with some odd artifact inbetween" style is just boring.
27.
▲
by
clausecker
1y ago
Skylake has the exact same optimisations.
28.
▲
by
clausecker
1y ago
In the US, isn't this partially the cause of zoning laws banning anything that is not single-family homes from being built?
29.
▲
by
clausecker
1y ago
Not entirely true. Jews willing to leave had to pay an exit tax so high that it basically meant leaving all your wealth behind. Later, they weren't permitted to emigrate at all.
30.
▲
by
clausecker
1y ago
The current meta game is the use of contraction hierarchies. Basically, you sinplify the network into hubs connected by trunk lines and then refine the routing close to start and destination.
More ›