Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Dr_Emann
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
Dr_Emann
1mo ago
It's a little unclear, but it's a live updating number, if you follow the directions, you'll see the second number decrease.
2.
▲
The Java Story, the Official Documentary
(youtube.com)
7 points
by
Dr_Emann
2mo ago
|
1 comments
3.
▲
by
Dr_Emann
3mo ago
I don't think so, "while vacant" is an infinite amount of time, if you look infinitely far into the future.
4.
▲
by
Dr_Emann
4mo ago
"Participants got behind the wheel of a driving simulator equipped with everything you’d find in a real car – from the steering wheel to the pedals and dashboard. A large touchscreen, similar to those found in newer vehicles, allows fo
5.
▲
by
Dr_Emann
5mo ago
To be even fair-er, it wasn't actually memory unsafety, it was "just" unsoundness, there was a type, that IF you gave it an io reader implementation that was weird, that implementation could see uninit data, or expose uninit
6.
▲
by
Dr_Emann
11mo ago
Thats kinda the problem, there are concepts in rust that don't have equivalents in other common languages. In this case, rust's type system models data-race-safety: it prevents data races at compile time in a way unlike what you c
7.
▲
by
Dr_Emann
1y ago
Rust has access control. Fields are private by default.
8.
▲
by
Dr_Emann
2y ago
Wow the comments are.. Bad. Not all single instruction operations are the same.
9.
▲
by
Dr_Emann
2y ago
"The common ground is that I have absolutely no interest in helping to spread a multi-language code base. I absolutely support using Rust in new codebase, but I do not at all in Linux." https://lwn.net/ml/all&
10.
▲
Show HN: One Million Sliders
(onemillionsliders.com)
1 points
by
Dr_Emann
2y ago
|
0 comments
11.
▲
by
Dr_Emann
3y ago
Hi, I think even the remaining benchmark isn't showing what you're trying to show: https://rust.godbolt.org/z/r9rP6xohb Rust realizes the vector is never used, and so never does any allocation, or recursion,
12.
▲
by
Dr_Emann
3y ago
Rust optimizes factorial to be iterative, not using recursion (tail or otherwise) at all, and it turns `factorial(15, 1)` into `1307674368000`: https://rust.godbolt.org/z/bGrWfYKrP . As has been pointed out a few times,
13.
▲
by
Dr_Emann
4y ago
Honestly feels like a very, very different use case from utf8-ish strings, at a quick read?
14.
▲
by
Dr_Emann
5y ago
For simple cases, I'll do that, but for longer commands, I've taken to doing rc=0 long command || rc = $? if (( rc == 0 ))...
15.
▲
by
Dr_Emann
5y ago
Literally every file operation HAS to go through the kernel. This is implementing "what does it mean to read/write this special device file"
16.
▲
by
Dr_Emann
6y ago
I believe they're asking for "this function returns a function of the same type (Fn/FnMut/FnOnce) as its first argument, but with different arguments. A generic way to write something like `fn bind<T, F: Fn(T,...) >
17.
▲
by
Dr_Emann
6y ago
Yes it does exactly that. It returns an iterator over the removed items, but when that iterator is dropped, it modifies the collection. See https://play.rust-lang.org/?version=stable&mode=debug&editio...
18.
▲
by
Dr_Emann
6y ago
And for move to front, why not `a[..i+1].rotate_right(1);`, rather than moving to the back and then shifting everything?
19.
▲
by
Dr_Emann
6y ago
Expand does actually exist in the standard library, but it's a bit of a strange incantation... vec.splice(i..i, std::iter::repeat(0).take(length)); This replaces the values in range `i..i` (an empty range starting at i) with `
20.
▲
by
Dr_Emann
6y ago
_Implementing_ a variadic function in rust requires nightly. I'm guessing that's what they meant. Calling one has been available for forever.
21.
▲
by
Dr_Emann
6y ago
I would absolutely support something to replace ( ( ( ( a).b).c).d).e with a->b->c->d->e, regardless of how much code had been written without that feature. Do you not like the array subscript operator, either, since a[b] can be
22.
▲
by
Dr_Emann
6y ago
Of course. There should never be more than one way to do something in c, even if it makes things easier or less error prone. This is why the -> operator would never be included in c. You can already use (*x).y, it would be SILLY to intro
23.
▲
by
Dr_Emann
6y ago
Because there is no UB in the original program. It constructs a pointer to the "one past the end" element, but that is fine, and the original program never dereferences that pointer. Again: there is no UB in the original program.
24.
▲
by
Dr_Emann
6y ago
Your block of code can be (and absolutely is) optimized to output zero directly (in c, because the assembly is easier to read): https://c.godbolt.org/z/qe3f4K `*(&i+1)` dereferences the pointer "one past the e
25.
▲
by
Dr_Emann
7y ago
Because echo-ing into a file will make a file with 1 byte in it: a single newline character.
26.
▲
by
Dr_Emann
9y ago
The rules state you cannot die before the haunt.
27.
▲
by
Dr_Emann
9y ago
Yes, if you use the escape hatch from the type system, the type system won't help you. Do you also avoid the use of strong types since you can always cast to a *char?