23 results for "whoa":

Truly headless draw.io exports
poppler --export-plain-svg --export-text-to-path --export-filename /tmp/elf-file-header.pdf.svg $ ls -lhA /tmp/elf-fil* -rw-r--r--. 1 amos amos 110K Nov 17 11:39 /tmp/elf-file-header.pdf -rw-r--r--. 1 amos amos 538K Nov 17 11:47 /tmp/elf-file-header.pdf.svg -rw-r--r--. 1 amos amos 65K Nov 17 11:35 /tmp/elf-file-header.svg Whoa, that's much
Between libcore and libstd
in assembly? Whoa, whoa, bear, come on, this is just banter, I'm not about to write the whole th- I mean, nah, there's still a bunch of logic in there that using a higher-level language could be justified, because- Right, right, because having an Addr type with a write method so you can just write anywhere in memory is very much in the spirit of
Using the Shipyard private crate registry with Docker
version; \ exit 251; \ # (etc.) $ just deploy (cut) #20 0.120 + rustc --version #20 0.156 rustc 1.66.0 (69f9c33d7 2022-12-12) #20 0.156 + exit 251 AhAh! It's not using the right version of Rust inside Docker, because......because rust-toolchain.toml is not part of the build context. Whoa, these are easy to miss, you weren't kidding! Yeah
Working with strings in Rust
If we built our program with -g, it'd even show us line numbers in our ".c" sources. It does show line numbers in glibc's ".c" sources, because I installed glibc debug symbols recently, for reasons, but yeah, whoa, look at that output. So anyway, silly me, I freed upp right before printing it, my fingers slipped, luckily this never happens in real
Consuming Ethernet frames with the nom crate
IResult<&'a [u8], Self, E> where E: 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 - it takes an input and returns an IResult<I, O, E> take(N) returns a parser - that takes 6 bytes and returns them as
Frustrated? It's not you, it's Rust
b: T) -> T where T: Add<Output = T>, { a + b } Whoa hey, that escalated quickly. What's all that syntax? Don't worry about it for now. Now that we've followed directions, it works, finally: $ cargo run --quiet ten = 10 So - you're smarter than Rust. Rust only knows exactly what you tell it. And you better be clear about what you mean, too
Declarative memory management
style guide checker has served Overbook well. Nobody has complained about 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 new management, Robin is asked for one last change. This change would make the style guide checker into the ultimate checker. Dear Robin
What's in a Rainbow table?
144, 199, 219, 227, 67, 157, 231, 77, 12, 155, 11, 23, 103 ] } } Oh that's... Oh whoa. Yeah, JSON doesn't really have a "byte slice" or "raw data" type Yeah I suppose you could plug base64 in there, but... Yeah. Better switch to something else. We don't really care what
I am a Java, C#, C or C++ developer, time to do some Rust
and then: $ cargo check Finished dev [unoptimized + debuginfo] target(s) in 0.00s ...then it works! Did we do it? No, you did it. Whoa. I feel smarter already. Okay but, uh, aren't we still mutably borrowing self twice? No, you're, uh... no, you're borrowing different parts of self mutably. That's perfectly okay. So splitting state is good
Pin and suffering
never accidentally use self.sleep or self.reader unpinned(without unsafe code). And it still works. $ grep "unsafe" -Rn src $ cargo run --quiet Read 131072 bytes in 393.9761ms Of course, that's a fairly simple case of pin-projection. It gets hairier. A lot hairier. Partially-pinned state machines are... not fun. For now! Whoa. Thanks cool bear