Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gergo_barany
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
gergo_barany
2y ago
Note that LEA (load effective address) doesn't load from memory either. Intel also uses "load" in the descriptions of register-to-register moves: https://www.felixcloutier.com/x86/mov-2 . Although confus
32.
▲
by
gergo_barany
2y ago
Kalray's MPPA does that, and it's really refreshing: https://gcc.godbolt.org/z/8Wch4MfMq
33.
▲
by
gergo_barany
2y ago
I'd agree that there is no strong inherent benefit to either ordering, except that it would be good not to needlessly violate expectations about mathematical operations. AT&T also permutes the order of operands of comparisons, whic
34.
▲
by
gergo_barany
2y ago
This is called superoptimization: https://en.wikipedia.org/wiki/Superoptimization There are people applying synthesis techniques to superoptimization. So something like this would possibly apply.
35.
▲
by
gergo_barany
2y ago
I see. Yes, deliberately ignoring the result and error might be a problem. Of course the same novice programmers could write: try { failableCall(); } catch (Throwable t) { /* Ignore. Stupid Java, always forcin
36.
▲
by
gergo_barany
2y ago
> Yes, you will be able to get the compile-time safety by immediately using switch on the return value, but what if you don't? Then you switch on the value at some other point in time. It's still AsyncReturn<V>. Why do
37.
▲
by
gergo_barany
2y ago
> The compiler knew next to nothing about the memory model before we started annotating lifetimes. Compilers for garbage compiled languages have always had to reason about the memory model. Compilers for languages with obligatory bound
38.
▲
by
gergo_barany
2y ago
Cool stuff! A suggestion: Avoid the term "dead code elimination". Yes, it is an established term, but it is established as a term for two distinct optimizations. One form of "dead code" is code that can never be executed
39.
▲
by
gergo_barany
2y ago
Your loop has the effect of mutating the counter. It's not an effect that leaks out of the function, but it is an effect of the loop , which was what your parent was asking about, I think.
40.
▲
by
gergo_barany
2y ago
So you want to add new builtin types for vectors? Yes, building on a parser sounds like a good approach. Otherwise, Frama-C would give you a nice detailed AST, but it might be complicated to extend this way. Sounds like a cool project, good
41.
▲
by
gergo_barany
2y ago
__FILE__ and __LINE__ are not extensions, they are standard C constructs. They are typically resolved by the preprocessor, just like #include and whatever, so the actual CompCert compiler should never see them. Maybe you're doing somet
42.
▲
by
gergo_barany
2y ago
What would you want to use it for, and why not use an existing solution? My first choice would be Frama-C (frama-c.com), which has served me well in the past.
43.
▲
by
gergo_barany
2y ago
Works for me with Firefox's PDF reader. (mapcar function list+) → <list> function
44.
▲
by
gergo_barany
2y ago
We shouldn't have the word "transpiler" at all.
45.
▲
by
gergo_barany
2y ago
Hello, visitor from the future coming across this old discussion! In case you're wondering, marginalia_nu did come up with a usable reproducer for the bug, filed a bug report, and the problem is fixed: https://github.com
46.
▲
by
gergo_barany
3y ago
You are still making things up about the API. If you're actually interested, look at the VectorShuffle class, its docs will tell you all about how illegal indices are handled and how to legalize them. But I doubt that you're actua
47.
▲
by
gergo_barany
3y ago
Not sure what you mean by "get me the 17th byte (from this 16-byte lane)". Do you have a concrete example of a vpshufb that you would like to model?
48.
▲
by
gergo_barany
3y ago
vpalignr is called "slice", vpshufb is "rearrange". The latter is easy to find if you search the page linked above for "shuf". The former is a bit harder, but I found it by searching for "concat" whil
49.
▲
by
gergo_barany
3y ago
The user didn't have a point, they just made something up about an API that they know nothing about.
50.
▲
by
gergo_barany
3y ago
> AOTs consistently do much more inlining & unrolling than JITs do. Nonsense. What evidence do you have for this claim? > JITs often have preset heuristics for figuring out where to split the code that's practical to imple
51.
▲
by
gergo_barany
3y ago
The compress operation being missing is not a blocker, since the compress operation is not missing: https://docs.oracle.com/en/java/javase/19/docs/api/jdk.incub...
52.
▲
by
gergo_barany
4y ago
This started a bit of a competition, some other versions of the same proofs in Agda and Lean are linked from here: https://mastodon.online/@nomeata/110004145921681756
53.
▲
by
gergo_barany
4y ago
> It's much harder to detect a bad unsigned value. You can think of the sign bit as a bad value bit for values that are supposed to be positive. You can also think of NaNs and infinities as bad value markers for values that are al
54.
▲
by
gergo_barany
4y ago
> As Stroustrup's document says, this is an inevitable result of allowing arithmetic on unsigned integers (i.e. subtracting an unsigned int variable with the value 2 from an unsigned variable with the value 1 has the same effect as
55.
▲
by
gergo_barany
4y ago
> E.g. C++ is very unhappy with the mistake they made of representing sizes with unsigned types [1]. 95% of that unhappiness seems to be due to mixed signed/unsigned expressions with implicit conversions. Java wouldn't be for
56.
▲
by
gergo_barany
4y ago
> As far as I understand the backslash is a mark of a variable. The problem that it looks like the escape symbol and this is really confusing. No, it is the escape symbol and works just like the escape symbol because it is the esca
57.
▲
by
gergo_barany
4y ago
A lot of seemingly primitive Java syntax already expands to method calls: autoboxing, string conversions, string concatenation. Similarly, primitive arithmetic operators on unsigned integers could expand to calls to the corresponding Intege
58.
▲
by
gergo_barany
4y ago
Ah, that makes sense. Thanks! It should still not be the default name for this construct.
59.
▲
by
gergo_barany
4y ago
> Prolog always evaluates through unification (at least in theory). What do you mean? The actual "computational" part of Prolog lies more in resolution than in unification. Unification does not "evaluate" in any se
60.
▲
by
gergo_barany
4y ago
This definitely isn't Prolog, but in some ways it seems to be closer to Prolog than some other things. One thing you can do in Prolog is build partial data structures: `X = tree(Left, Right)` builds a tree node with two "holes&quo
More ›