220 results for "":
The HTTP crash course nobody asked for
HTTP does a pretty good job staying out of everyone’s way.
If you’re reading this article, there’s a solid chance it was delivered to you over HTTP. Even if you’re reading this from an RSS reader or something. And you didn’t even have to think about it!
“Not having to think about it” is certainly a measure of success for a given technology. By contrast, I think about Bluetooth a lot. I wish I didn’t.
The curse of strong typing
It happened when I least expected it.
Someone, somewhere (above me, presumably) made a decision. “From now on”, they declared, “all our new stuff must be written in Rust”.
I’m not sure where they got that idea from. Maybe they’ve been reading propaganda. Maybe they fell prey to some confident asshole, and convinced themselves that Rust was the answer to their problems.
Open sourcing the home CMS
What's in a Rainbow table?
In Veronica Mars and password hashes, from my new Tech As Seen On TV series, we’ve explored “cracking passwords” using brute-force methods, and then using rainbow tables, which was much, much faster.
But how do rainbow tables actually work? Let’s start at the beginning.
What’s a password hash?
A very simple design for an authentication system is to store passwords in
clear text, say, in a file named password.txt:
*andfall
Welp, I did it again - I released an album: it’s named *andfall, a play on the word “landfall”, and I wrote it in one week-end, for @McFunkyPants’ entry in the Ludum Dare 33 game jam.
It’s my first solo album, the previous ones were collaborations with @bigsylvain and @geckojsc. It feels a bit weird to release an album alone - there’s nobody to blame for the flaws, and nobody to praise for the good parts!
Using the Shipyard private crate registry with Docker
Wait wait wait, so we’re not talking about nix yet?
Well, no! The service we have is pretty simple, and I want to complicate things a bit, to show how things would work in both the Dockerfile and the nix scenario.
And because I don’t like contrived examples, we’re going to do something somewhat real-world: we’re going to geo-locate visitors, and track how many visits we get from each country.
The rest of the fucking owl
NO! No no no.
What?
WE WERE DONE!
Well… yes! But also no. We still shell out to a bunch of tools:
$ rg 'Command::new'
src/commands/mod.rs
126: let variant = if let Ok(output) = run_command(Command::new("wslpath").arg("-m").arg("/")) {
src/commands/cavif.rs
29: Command::new("cavif")
src/commands/imagemagick.rs
25: Command::new(&self.bin)
src/commands/cwebp.rs
25: Command::new("cwebp")
src/commands/svgo.rs
25: Command::new("svgo")
Understanding Rust futures by going way too deep
So! Rust futures! Easy peasy lemon squeezy. Until it’s not. So let’s do the easy thing, and then instead of waiting for the hard thing to sneak up on us, we’ll go for it intentionally.
That’s all-around solid life advice.
Choo choo here comes the easy part 🚂💨
We make a new project:
$ cargo new waytoodeep
Created binary (application) `waytoodeep` package
A dynamic linker murder mystery
I write a ton of articles about rust. And in those articles, the main focus is about writing Rust code that compiles. Once it compiles, well, we’re basically in the clear! Especially if it compiles to a single executable, that’s made up entirely of Rust code.
That works great for short tutorials, or one-off explorations.
Unfortunately, “in the real world”, our code often has to share the stage with other code. And Rust is great at that. Compiling Go code to a static library, for example, is relatively finnicky. It insists on being built with GCC (and no other compiler), and linked with GNU ld (and no other linker).
Next power of two
While looking to write a pure ooc version of ftgl, I was reading the source of ftgl-gl3 and I stumbled upon this piece of code:
static inline GLuint NextPowerOf2 (GLuint in )
{
in -= 1 ;
in |= in >> 16 ;
in |= in >> 8 ;
in |= in >> 4 ;
in |= in >> 2 ;
in |= in >> 1 ;
return in + 1 ;
}
This is needed because dealing with power-of-two textures (32x32, 64x64, 128x128, etc.) is more efficient with OpenGL (some implementations don’t even support non-power-of-two textures!).