Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ohr
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Let Them Write RFCs
(ohadravid.github.io)
5 points
by
ohr
1mo ago
|
1 comments
2.
▲
The Exhaustion of Talking to a Tool
(ohadravid.github.io)
3 points
by
ohr
3mo ago
|
0 comments
3.
▲
The Best (Query) Plans of Mice and Men
(ohadravid.github.io)
5 points
by
ohr
5mo ago
|
0 comments
4.
▲
by
ohr
9mo ago
(Author here) yes! I also wrote about this (specifically in Python->Rust FFI) in another article: https://ohadravid.github.io/posts/2023-03-rusty-python/#v2--...
5.
▲
by
ohr
9mo ago
(Author here) thanks! Even as an experienced Rust developer, this is a lot of syntax which is part of what makes it archaic I think. As usual with Rust most of it is due to inherent complexity: for example, when you deal with raw pointers,
6.
▲
by
ohr
1y ago
But if you let it run the tests, it’ll just do that on its own (or delete the tests, but usually it won’t), which is very useful and seems to match the article’s sentiment.
7.
▲
by
ohr
1y ago
Used the Save Page WE Chrome extension to capture the html (after cleaning up with inspect element + delete), and added a bit of custom JavaScript to scroll everything to the right place. Needed the extension for the styling to be captured
8.
▲
by
ohr
1y ago
(Author here) I'm a huge fan of the "How to speed up the Rust compiler" series! I was hoping to capture the same feeling :)
9.
▲
by
ohr
1y ago
I think that since the 1.5% one is only for aarch64 it's a bit unfair to claim the full number, more like 1/2 if you consider arm/x86 to be the majority of the (future) deployments
10.
▲
by
ohr
1y ago
Thanks! Would be interesting to see if Rust/LLVM folks can get the compiler to apply this optimization whenever possible, as Rust can be much more accurate w.r.t memory initialization.
11.
▲
by
ohr
1y ago
(Author here) Thanks! That's useful feedback. I also agree - the final article isn't skim-friendly enough, which drives away some readers.
12.
▲
by
ohr
1y ago
In WMI, the fields are lazy loaded when you do a `*` query, but the real crate [does use the same Serde reflection tricks]( https://github.com/ohadravid/wmi-rs/blob/main/src/query.rs#L... ) to create
13.
▲
by
ohr
1y ago
> don't you have to get your version's struct data member type correct No, since Serde will happyly fill a `u64` field with any other `u{8,16,32}` value, and even with signed types (as long as the actual value is non-negative)
14.
▲
by
ohr
1y ago
That's understandable, but I think it depends on how many different structs like this you have and how many fields you need to work with (for our usecase, we had tens of structs with tens of fields each). There's also an Alternati
15.
▲
by
ohr
1y ago
(Author here) I needed to do a bit of "reflection" in a Rust crate but didn't want to implement a procedural macro, so I used Serde (which is a (de)serialization crate) instead. This is also a deep dive into Serde internals -
16.
▲
by
ohr
1y ago
Thanks, I hate it! Jk, but would you consider this a good solution overall?
17.
▲
State of the Crates 2025
(ohadravid.github.io)
2 points
by
ohr
2y ago
|
0 comments
18.
▲
by
ohr
2y ago
well yes! also calling an answer which mentions c++ as well “off-topic”, it’s not like I wrote a haiku about marmalade. And why insist on deleting if people found it useful? It’s literally at the bottom of the page, so it’s not a public m
19.
▲
by
ohr
2y ago
The magic for HN! Added this link to the post as well, thanks!
20.
▲
by
ohr
2y ago
(author here): on the contrary, my point is that I was wrong(ish), and I often think about that before I get angry at other people on the internet. The other point is that there's (usually) no need to choose between good moderation and
21.
▲
by
ohr
2y ago
author here: but do you find the article helpful in making you less angry? also: > I'd be angry all the time if I was coding C or C++ or C/.C++ or C-- or anything to do with C lol
22.
▲
Winning the fight against the Rust compiler (Coherence, feat. rustc sources)
(ohadravid.github.io)
3 points
by
ohr
3y ago
|
1 comments
23.
▲
by
ohr
3y ago
Author here: actually, in this analogy (as this is just a demo library), the polygons change each time so we couldn't use this type of optimization (at least not in a straightforward way).
24.
▲
by
ohr
3y ago
Author here: For the original library we did all the numpy tricks we could think of, but we really needed to do this type of exhaustive search for some of the data. If someone wants to open a PR with a "fully optimized" numpy code
25.
▲
by
ohr
3y ago
Author here: I agree, that's a great perf advice (esp. when you can restructure your code). I couldn't get into a this in the article (would be too long), but this is a great point and the original library does this in a lot of p
26.
▲
Making Python 100x faster with less than 100 lines of Rust
(ohadravid.github.io)
9 points
by
ohr
3y ago
|
2 comments