« first day (1803 days earlier)
← previous day
next day →
last day (1906 days later) »
Sébastien Renauld
11:03
I dropped a comment asking for more info on the close event question
feel like it might actually be a good question once there's more detail in
1 hour later…
Sébastien Renauld
12:18
@LukasKalbertodt dude already had his answer - thanks for pointing out the crosspost
should probably voteclose
4 hours later…
trentcl
16:09
Writing this sieve of Eratosthenes (ish) made me feel pretty smart.
Stargateur
16:49
@trentcl should be an iterator
your code is not very readable
trentcl
@Stargateur yeah
@Stargateur but it made me
feel smart
joking aside, I'd be interested to see how you adapt it.
Stargateur
17:05
@trentcl
play.rust-lang.org/…
meh
I don't understand how your algo work so I can't really make it differs :p
But I least my code will work if limit is u32::MAX
your work too but I think there is still a performance impact with ..=
trentcl
@Stargateur Still pretty tight. I think the
..=
difference washes out to the same thing, but I'm not sure.
This was the context btw
.
Stargateur
@trentcl yeah I saw the question
maybe
let (ac, p) = &mut counter.0;
look better
trentcl
@Stargateur I had that at first, actually. Matter of taste, I reckon
ofc you have to change
p
to
*p
then
trentcl
17:23
The main implicit thing going on is that
peek_mut
lets you mutate the root of the heap, but when
counter
is dropped, sifts the new value down if it no longer belongs at the root
« first day (1803 days earlier)
← previous day
next day →
last day (1906 days later) »
all rooms
Transcript for
Sep
20
Sep '19
21
Sep
22
Rust
In Rust we trust! Rust is a systems programming language focus...
4
borrow-checker
const-generics
cursed-unsafe-blocks
fearless-concurrency
generic-associated-types
inherited-mutability
rust
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile