Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
91.
▲
by
dzaima
9mo ago
Damn, what a funky "fix". Thanks! (luckily I can take the simplified version since I already use button navigation)
92.
▲
by
dzaima
9mo ago
That's an OxygenOS 16.0 bug; worked fine on 15.0, and broken on all (~five?) launchers I tested on 16.0. (currently on Octopi Launcher, and just live with that annoying delay until it Hopefully™ gets fixed)
93.
▲
by
dzaima
9mo ago
> people shouldn't be posting their location or sensitive information publicly if they don't want it exposed like that They shouldn't, but they still could: accidentally paste in the wrong browser tab; have been stupid whe
94.
▲
by
dzaima
9mo ago
Old scrapes can't have data about new things though; have to continously re-scan to not be stuck with ancient info. some scrapers might skip out on already-scraped sources, but easy to imagine that some/many just would not bother
95.
▲
by
dzaima
9mo ago
Sounds like it's probably emitting the machine code in a single pass (compilation speed matters for a browser JIT), perhaps even together in a single pass with lowering (so don't even know the amount of instructions beforehand), a
96.
▲
by
dzaima
9mo ago
And, even if not that, the 0x0000_0000_FFFF_FFFF constant could be generated via 2 instrs of li a0, -1 srli a0, a0, 32 That said, codegen of constants in RISC-V is a whole insane crazy art-form to do well (especially for a
97.
▲
by
dzaima
10mo ago
Or even just, have this also apply to the code produced by those using my code. But while that's not the case, copyleft licenses (especially GPL (not LGPL)) are a way to force it to be the case to at least limited extent.
98.
▲
by
dzaima
10mo ago
You have three different value cases (main value, main Err case for `?` to consume, and whatever early-return case). And the `?` operator fully taking up the Err result case means your main-result+early-return values strictly must both be w
99.
▲
by
dzaima
10mo ago
For the case where `try` is useful over the functional form (i.e. parent's situation of having a desired Result, plus some unrelated early-returning), that ends up with nested `Result`s though, i.e. spamming an `Ok(Ok(x))` on all the n
100.
▲
by
dzaima
10mo ago
> you just need to make sure that the system keeps a big enough buffer of contiguous-enough space somewhere. Similar to how many filesystems allow you to reserve space for root Said file system reserving can fill up (I've experience
101.
▲
by
dzaima
10mo ago
Storing the data in nodes doesn't work if the given structure may need to be in multiple linked lists, which iirc was a concern for the kernel? And generally I'd imagine it's quite a weird form for data structures for which b
102.
▲
by
dzaima
10mo ago
Alive2 does not handle loops; don't know what exactly it does by default, but changing the `shl i32 %and, 1` to `shl i32 %and, 2` has it still report the transformation as valid. You can add `--src-unroll=2` for it to check up to two l
103.
▲
by
dzaima
10mo ago
That only matters for things with side-effects; and changing the `&&` to `&` doesn't get it to optimize anyway. You can check - copy the LLVM IR from https://godbolt.org/z/EMPr4Yc84 into https:/&
104.
▲
by
dzaima
10mo ago
Both clang and gcc do optimize it though - https://godbolt.org/z/cGG9dq756 . You need -fno-builtin or similar to get them to not.
105.
▲
by
dzaima
10mo ago
> I've added a pointless strlen(). It seems like no compiler is clever enough to remove it. For that you could at least argue that if the libc's strlen is faster than strcmp, that improves performance if the programmer expects
106.
▲
by
dzaima
10mo ago
Actually, even finding a larger function that would by itself have a meaningful disassembly is posing problematic; basically every function deals with in-memory data structures non-trivially, and a bunch do indirect jumps (function pointers
107.
▲
by
dzaima
11mo ago
Those first two indeed look correct (third link is not public); indeed free chatgpt is understandably not the best, but I did give it basically the smallest function in my codebase that does something meaningful, instead of any of the actua
108.
▲
by
dzaima
11mo ago
The most difficult parts of getting readable code would be dealing with inlined functions and otherwise-duplicated code from macros or similar, and dealing with in-memory structure layouts; both pretty complicated very-global tasks. (never
109.
▲
by
dzaima
11mo ago
I believe the point was that iPhones don't even allow running custom code even if you have the code; whereas GPLv3 mandates that any conveyed form of a work must be replacable by the user. So unless LLMs easily spit out an infinite str
110.
▲
by
dzaima
11mo ago
In said hypothetical world, though, the whatever-driver would also have been written by LLMs; and, if the printer or whatever is non-trivial and made by a typical large company, many LLM instances with a sizable amount of token spending o
111.
▲
by
dzaima
11mo ago
A sanitizer or static analysis or any other tool can unconditionally give you a warning/error on signed integer overflow. Whereas that's invalid for unsigned integers as they have well-defined behavior, and things depend on said o
112.
▲
by
dzaima
11mo ago
Well, not really "you don't care about safe rounding behavior", more just "you have specified a specific operation order that happens to be more susceptible to being vectorizable". Implementing a float sum that way
113.
▲
by
dzaima
11mo ago
For vectorizing, that quote is only true for loops with dependencies between iterations, e.g. summing a list of numbers (..that's basically the only case where this really matters). For loops without such dependencies Rust should autov
114.
▲
by
dzaima
11mo ago
Scalable vectors as in RVV & SVE aren't available in rust corrently; see https://github.com/rust-lang/rust/issues/145052 (that said autovectorization should work, and fixed-width SIMD should map to R
115.
▲
by
dzaima
11mo ago
You can indeed use intrinsics to make a SIMD library in plain safe stable rust today to some extent; that just isn't what core::simd does; rather, on the Rust-side it's all target-agnostic and LLVM (or whatever other backend) hand
116.
▲
by
dzaima
11mo ago
The nightly built-in core::simd makes use of a bunch of intrinsics to "implement" the SIMD ops (or, rather, directly delegate the implementation to LLVM which you otherwise cannot do from plain Rust), which are as much if not more
117.
▲
by
dzaima
11mo ago
Linux of course does have an interface for RISC-V extension probing via hwprobe. And there's a C interface[1] for probing that's OS-agnostic (though it's rather new). [1]: https://github.com/riscv-non-isa/
118.
▲
by
dzaima
11mo ago
But that doesn't go into clipboard history. And severely restricts what you can do between copying and pasting in general (very importantly makes it a pain to do replace (i.e. select+(implicit-delete+)paste)) as any intermediate select
119.
▲
by
dzaima
11mo ago
Screw handedness is something that's basically always fine either way if planned for, and with largely no benefit for either option, so standardizing that is easy enough. But, like, even then, there's screw drive (JIS vs phillips
120.
▲
by
dzaima
11mo ago
It's of course a matter of perspective, goals, and assumed knowledge. Is it choosing to not follow best practices, or leaving outdated practices with unfixable downsides behind? Is it inventing new things or instead actually just takin
More ›