Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sapiogram
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
271.
▲
by
sapiogram
3y ago
None of the examples in the article would cause UB in analogous C code. A C compiler could still optimize away the useless check itself, but that's true for every language.
272.
▲
by
sapiogram
3y ago
I don't think the author was looking for this kind of example. Everything in your code is useful , so this category of linter would not complain. Other linters might complain about `==`, though ;)
273.
▲
by
sapiogram
3y ago
> You can still write the same bug in Rust I honestly don't think you can. If you try to iterate over values instead of references, you'll take ownership of the vector and not be able to use it again.
274.
▲
by
sapiogram
3y ago
Does thread per core necessarily imply message passing? I don't see why the two need to be related.
275.
▲
by
sapiogram
3y ago
Could you be more specific about your bottlenecks? Were you not able use the multithreaded scheduler for some reason, or did it not work properly?
276.
▲
by
sapiogram
3y ago
I had an absolutely awful experience when I tried using Sqlite through the sqlx crate. The work was mostly cpu-bound, but I didn't mind blocking the event loop for a few seconds here and there, so I thought I would just run it on Tokio
277.
▲
by
sapiogram
3y ago
Rust does not protect against deadlocks, that is correct. It also doesn't fully prevent mistakes related to ref counting. But I don't get the impression that the post is claiming either of those things?
278.
▲
by
sapiogram
3y ago
It's only 25% speedup in actual Python code, in domains like data science this won't matter much, because your cpu cycles are mostly spent inside numpy.
279.
▲
by
sapiogram
3y ago
Does compiling the Linux kernel really scale to that many cores?
280.
▲
by
sapiogram
3y ago
Thanks! Do you know if the Rust compiler is able to pass this information to LLVM somehow?
281.
▲
by
sapiogram
3y ago
> Pokemon Red isn't a huge game if you have access to the state (not just pixels) and prune it properly. I think the whole point of this project is to let the AI do the pruning
282.
▲
by
sapiogram
3y ago
> Naively we might see games like Go, Chess, StarCraft, and Dota as more "complex" The strong AIs made for those games had access to some crucial human "help" though. * AlphaStar (For StarCraft) was trained on a massi
283.
▲
by
sapiogram
3y ago
Your example changed the type of the function, though. I'm assuming there is no `&T` in the function's output type.
284.
▲
by
sapiogram
3y ago
Does anyone know what guarantees Rust functions have regarding escape analysis? In particular, is the `x` reference in `fn foo(x: &T)` guaranteed to not outlive the function, or would it be legal for `foo` to `transmute()` it into a `
285.
▲
by
sapiogram
3y ago
Do you have a source? I would expect the first pounds of muscle to affect metabolism more than the 100th pound, but that's my immediate intuituion.
286.
▲
by
sapiogram
3y ago
The standard answer is cost, but I'm not sure how significant that actually is in this day and age. Maybe it's just artificial market segmentation at this point.
287.
▲
by
sapiogram
3y ago
This is only true for generational and/or compacting garbage collectors, right? So not Go, for instance?
288.
▲
by
sapiogram
3y ago
You're confusing atomicity with sequential consistency. The former guarantee is perfectly compatible with caching.
289.
▲
by
sapiogram
3y ago
Interestingly, the Go memory model[1] does in fact guarantee atomicity of word-sized reads/writes: > Otherwise, each read of a single-word-sized or sub-word-sized memory location must observe a value actually written to that locatio
290.
▲
by
sapiogram
3y ago
Oof
291.
▲
by
sapiogram
3y ago
I'd say Apple got there with their M1 and M2 chips. But it took 10 years of incrementally improving on an already commercially viable cpu, unlike what tensortorrent is claiming.
292.
▲
by
sapiogram
3y ago
Given the choice between exaggerating the performance and getting funded, and not exaggerating and running out of money, I think everyone ends up choosing the former.
293.
▲
by
sapiogram
3y ago
I assume you're also still limited to dual-channel in both scenarios?
294.
▲
by
sapiogram
3y ago
> Rust's where each variant is its own type. Is this... right? You can't use enum variants as types in function signatures, variable declarations, etc.
295.
▲
by
sapiogram
3y ago
The answer is always "it depends", which is exactly why I prefer the median in most cases. Once you choose to use the median, there are no more choices/degrees of freedom - it's just the median. On the other hand, "
296.
▲
by
sapiogram
3y ago
1W is honestly not that great, though. A smartphone will do 10x that out of the box, and still pling for Facebook notifications.
297.
▲
by
sapiogram
3y ago
> If you must use average, then you should remove the top 5% from the average. 5% is too arbitrary, just use the median.
298.
▲
by
sapiogram
3y ago
> Like everyone sane before them they figured N:M scheduling is not the way forward and they ripped it out before going stable. Why do you think Java recently went from N:M scheduling? Surely there's something to it?
299.
▲
by
sapiogram
3y ago
> And well she had some seriously disappointing and eronious views on the subject. You have to get specific if you want to convince anyone.
300.
▲
by
sapiogram
3y ago
> I wouldn’t recommend for production but it will get you to 5mb image sizes. Former co-worker did this, and we still have tons of docker images in production that lack basic debugging functionality like... a shell. Alpine Linux is only
More ›