215 results for "":
From Inkscape to poppler
What’s next? Well… poppler is the library Inkscape uses to import PDFs.
Yes, the name comes from Futurama.
Turns out, poppler comes with a bunch of CLI tools, including pdftocairo
!
Halfway through this article, I realized the “regular weight” on my system was in fact Iosevka SS01 (Andale Mono Style) (see Releases), but the “bold weight” was the default Iosevka.
An ooc quine
While preparing my next post about ooc documentation yet again, I stumbled upon an old ooc quine of mine. Here it is in integrality for your pleasure:
q := 34 as Char
l := [
"q := 34 as Char"
"l := ["
"]"
"for (i in 0..2) {"
" l[i] println()"
"}"
"for (i in 0..12) {"
" q print(); l[i] print(); q println()"
"}"
"for (i in 2..12) {"
" l[i] println()"
"}"
]
for (i in 0..2) {
l[i] println()
}
for (i in 0..12) {
q print(); l[i] print(); q println()
}
for (i in 2..12) {
l[i] println()
}
Pin and suffering
I’d like to think that my understanding of “async Rust” has increased over the past year or so. I’m 100% onboard with the basic principle: I would like to handle thousands of concurrent tasks using a handful of threads. That sounds great!
And to become proficient with async Rust, I’ve accepted a lot of things. There are blue functions and red functions, and red (async) functions are contagious.
Writing a Dockerfile for catscii
Now that our service is production-ready, it’s time to deploy it somewhere.
There’s a lot of ways to approach this: what we are going to do, though, is build a docker image. Or, I should say, an OCI image.
This is still a series about Nix, but again: because the best way to see the benefits of Nix is to do it without Nix first, we’ll use only Docker’s tooling to build the image.
A new website for 2020
Hi everyone. Has it been two months since I last posted something? Yes it has!
That seems like a nice round duration, so let’s break the silence with a few announcements.
I have a new website
If everything goes well, you’re on it right now.
Does it feel okay? Take a minute to accustom yourself to your new surroundings. Identify potential sources of fresh water. Gather some supplies with which to fashion a makeshift shelter.
I want off Mr. Golang's Wild Ride
My honeymoon with the Go language is extremely over.
This article is going to have a different tone from what I’ve been posting the past year - it’s a proper rant. And I always feel bad writing those, because, inevitably, it discusses things a lot of people have been working very hard on.
In spite of that, here we are.
Having invested thousands of hours into the language, and implemented several critical (to my employer) pieces of infrastructure with it, I wish I hadn’t.
Cleaning up and upgrading third-party crates
The bleeding edge of rustc and clippy
Typically, you’d want a production application to use a stable version of Rust. At the time of this writing, that’s Rust 1.65.0, which stabilizes a bunch of long-awaited features (GATs, let-else, MIR inlining, split debug info, etc.).
For every Rust release, Mara makes a wonderful recap thread on Twitter, on top of the official announcement.
Catching up with async Rust
In December 2023, a minor miracle happened: async fn in traits shipped.
As of Rust 1.39, we already had free-standing async functions:
pub async fn read_hosts() -> eyre::Result<Vec<u8>> {
// etc.
}
…and async functions in impl blocks:
impl HostReader {
pub async fn read_hosts(&self) -> eyre::Result<Vec<u8>> {
// etc.
}
}
Day 14 (Advent of Code 2022)
I like how the day 14 puzzle sounds, because I think it’ll give me an opportunity to show off yet another way to have Rust embedded in a web page.
But first…
Let me guess: parsing?
You bet your furry ass, parsing.
Parsing
The input looks something like this:
498,4 -> 498,6 -> 496,6
503,4 -> 502,4 -> 502,9 -> 494,9
And each line is essentially… a polyline: we’re supposed to draw lines between every point on the path, and that determines rocks on the map.
Dynamic linker speed and correctness
In the last article, we managed to load a program (hello-dl
) that uses a single
dynamic library (libmsg.so
) containing a single exported symbol, msg
.
Our program, hello-dl.asm
, looked like this:
global _start
extern msg
section .text
_start:
mov rdi, 1 ; stdout fd
mov rsi, msg
mov rdx, 38 ; 37 chars + newline
mov rax, 1 ; write syscall
syscall
xor rdi, rdi ; return code 0
mov rax, 60 ; exit syscall
syscall