The curse of strong typing
...impl Display) {
println!("{v}");
}
fn main() {
show(get_char_or_int(true));
show(get_char_or_int(false));
}
$ cargo run --quiet
C
64
Whoa. Whoa whoa whoa, that could be its own...
Implementing "Log in with GitHub"
...the returned future is Send, and Unpin(since it's on the heap), a-:bearsaysWhoa whoa whoa you're not going to explain any of that?:amossaysAlready did....but its lifetime is...
A simple ping library, parsing strings into IPv4 address
...IcmpSendEcho = unsafe { iphlp.get_proc("IcmpSendEcho").unwrap() };
IcmpSendEcho(
handle,
dest,
request_data,
request_size,
request_options,
reply_buffer,
reply_size,
timeout,
)
}
Whoa. Okay, yeah, we're definitely going to need to come...
Day 11 (Advent of Code 2022)
...u64) -> u64 {
match self {
Term::Old => old,
Term::Constant(c) => c,
}
}
}
And then, whoa here we go:use nom::{
branch::alt,
bytes::complete::tag,
character::complete as cc,
character::complete::{one_of...
In the bowels of glibc
...0x082000 0x0000000000082000 0x0000000000082000 0x0275d0 0x0275d0 R 0x1000
LOAD 0x0a9fe0 0x00000000000aafe0 0x00000000000aafe0 0x005330 0x006b60 RW 0x1000
Whoa. Whoa!Does it run?$ ./what
[1] 631 segmentation fault ./what
Oh, right, permission denied.$ sudo ./what...
Between libcore and libstd
...assembly!!:bearsaysThat sounds cool actually, why don't we do that?Do th- in assembly? Whoa, whoa, bear, come on, this is just banter, I'm notabout to write the whole th...
Working with strings in Rust
...It does show line numbers in glibc's ".c" sources, because Iinstalled glibc debug symbols recently, for reasons, but yeah, whoa, lookat that output.So anyway, silly me, I freed upp right...
Consuming Ethernet frames with the nom crate
...ParseError<&'a [u8]>,
{
map(take(6_usize), Self::new)(i)
}
}
Whoa, that's a lot of use directives. Get used to those!Let's walk through these:Addr::parse is a parser...
Declarative memory management
...Nobody has complainedabout it in five years, which, as far as software goes, is admirable.But all good things come to an end (whoa, déjà vu anyone?), and, under newmanagement, Robin is...
Pin and suffering
...For now!Whoa. Thanks cool bear!:bearsaysDon't mention it 😎
Go back to the homepage.