Show more

Playing around with docopt[1], can't say that I'm a fan. There's no easy way to have global options that apply to all subcommands and no way to document the behavior of subcommand-specific flags (e.g. what --force will actually do when it depends on the action being performed).
1. docopt.org/

Performance vs. simplicity. Writing a server in Rust that creates two threads per connection is simpler than using Tokio, but Tokio is rather more efficient. Meh.

Just finished the book. The story was excellent, everything else was... okayish. The jokes and writing style got a tad tiresome after a while, and this book had nothing to offer in the way of interesting new insights or social commentary (which is what makes most SciFi extra enjoyable for me). It would have been a whole lot more interesting if humanity on earth got extinct while saving one man on Mars, but nothing so drastic happened. It still works fine as entertainment, though.

Hah. I just opened the sxiv man page in Firefox, and was surprised to see that Firefox suddenly jumped around on my screen. Then I remembered that I had the following line in my config:

for_window [title="^sxiv"] floating enable

Yeah, that criteria can be improved.

JPEG and PNG are more than two decades old, yet we're still stuck with it. I could save so much space with WebP or BPG or anything, but software support is lagging behind. :blob_cry:

I'll need to do some HTTP server/client stuff in Rust. Should I stick with easy to use high-level libraries or implement only the bare minimum functionality I need on top of the http and httparse crates?

I don't care for TLS, HTTP2 or other advanced features, but I do care a lot about the implementation being simple and auditable, so I'm inclined to go with the latter solution.

"One thing I have in abundance here are bags. They're not much different from kitchen trash bags, though I'm sure they cost $50,000 because of NASA.
[..]
Also, I have duct tape. Ordinary duct tape, like you buy at a hardware store. Turns out even NASA can't improve on duct tape."

- Andy Weir, The Martian

Christmas. The time of the year where I visit family and realize, again, that there are people who pay to have their homes infiltrated with horribly annoying advertising.

I just can't see any value in radio & television.

Nginx is an excellent piece of engineering: Reliable, performant and highly configurable. But its "Open core" nature is seriously making me consider alternatives.

"This directive is available as part of our commercial subscription."
- Nginx docs, every time I see an option than I need.

It feels so perverse to use one of the heavy-handed Rust collections (HashMap, BTreeMap) when I know there won't be more than 10 elements in it. But a Vec<(K,V)> just doesn't have the same convenience and it's not in the hot path to warrant an extra dependency.

Ayo boosted

I would have thought that the Direct Connect P2P filesharing network would be pretty much dead by now, but it looks like people are still discovering and using my obscure console client for it. That's pretty neat.

Just finished the book. That was absolutely brilliant. Fun writing style, realistic physics, intriguing characters, actually alien aliens and an epic (back)story spanning millions of years.

Quite in the same style as Cixin Liu's novels, but a bit less over-the-top. Similar to some of Stanislaw Lem's novels, too, but slightly less grim. I'm definitely going to read more from Alastair Reynolds.

"'I expect,' Volyova said, 'that you're one of those otherwise rational people who pride themselves on not believing in ghosts.'"
- Alastair Reynolds, Revelation Space

The most common reaction when I tell people I write software as a hobby: "You could make money with that!"

Do people even understand what "hobby" means?

Do you want to enable this useless thing?

[Yes]
[Ask me later]

:blobangery:

I want my tool to read useful file metadata.

Solution #1: Link against libmagic, ffmpeg and others, resulting in a large, inflexible and painful to build binary. But easy to use and deploy.

Solution #2: Let the tool run custom commands. Complicates deployment and configuration, painful to port to Windows.

Meh.

It's funny to see how my code is evolving the more I use it. Previously:

match some_option {
None => (),
Some(x) => {
do_stuff(x);
do_more_stuff(x);
}
}

After realizing that Option implements IntoIterator:

for x in some_option {
do_stuff(x);
do_more_stuff(x);
}

I'm blown away by the performance of BLAKE2. In (a not yet very optimized) parallel tree hashing mode I can get close to 2.6 GiB/s on my i5-4690K.

Show more
niu.moe

We are a cute and loving international community O(≧▽≦)O !