Igor Bubelov
About Blog Notes Photos

July 2021

Notes ยท Jul 31, 2021

Table of Contents

On Ethics

People keep asking unanswerable questions since the ancient times, and we tend to label such questions as “philosophical”. One of the fundamental puzzles of our lives is ethics. Every living being acts, but humans are a bit more introspective. How do we know what to do? How do we make sure we’re doing the right things? What’s the difference between good and bad actions? Is this “goodness” objective or subjective?

My own understanding of ethics is pretty simplistic, but that simplicity makes it practical. If we assume that avoiding suffering is more important than seeking pleasure, it’s not hard to infer consistent set of rules for judging actions. Here are a few examples:

  • Should I steal? No, it harms other people, and it can harm you if you get caught.
  • Should I seek knowledge? Yes, knowledge of causes and effects helps us prevent suffering.
  • Should I help others? It depends. If there are people in need who suffer a lot, and you don’t see helping them as a huge personal sacrifice, you should help them. If people are doing OK without your help or if your help can lead to unintended long-term harm, it may be unethical to help others despite their wishes and even proven short-term relief. Consider some welfare programs or rent control. They might look as a good thing aimed to eliminate suffering, but you can easily do more harm than good, if you don’t examine the data carefully and critically enough. Good actions tend to rely on cold reason, so we should prefer reason to emotions when the stakes are high.
  • Should I work at Facebook? No, absolutely not. Companies of this kind promise to add pleasure but end up causing a lot of suffering. This also applies to monopolies in general. Concentrated power also concentrates the potential to abuse it, so it’s no good.
  • Can I be rude with some people? If you feel it’s the best way to prevent them from harming you or themselves. Otherwise, no.
  • Should I have debts? Borrowing money allows us to buy nice things here and now, but we should be confident of our ability to pay back our debts. Little debt on good terms can be good, but it’s very important not to underestimate the “worst case” scenario.

This little rule helps me answer many polarizing and difficult questions.

Async Webserver in Rust

I spent a few evenings getting up to date with Rust, especially the async side of things. My first task is not very ambitions, I’m making an exchange rates service:

https://github.com/bubelov/rocket-rates

The goal is to cache the exchange rates provided by different third parties, starting with European Central Bank. I also created a simple database migration tool, and I’m planning to focus on speed and correctness, keeping the scope relatively narrow.

In the future, I might extend this project with asset price endpoints and an auth system, transforming it into a high performance portfolio tracking backend.

Tor Switches to Rust

Writing software is hard. There are many variables you should keep in mind in order to get a satisfying result. We want our software to be cheap, safe, fast, reliable, easy to use, and that’s just a few things to start with. There is also a reason why we have so many tools and languages: different software projects have different sets of priorities.

What do we want from a project like Tor? Well, we want everything, but, if we have to prioritize, safety comes at the top of the list. That’s why I’m very excited to hear that Tor devs have decided to embrace Rust.

Here is what they’re saying:

For us, these problems mean that programming in C is a slow and painstaking process. Everything we write takes more code than we’d like it to, and we need to double-check even the safest-looking code to make sure it doesn’t fall prey to any of C’s list of enormous gotchas. This slows us down seriously, and increases the cost of adding new features.

Rust seems like the clearest way out of our bind. It’s a high-level language, and significantly more expressive than C. What’s more, it’s got some really innovative features that let the language enforce certain safety properties at compile-time. To a first approximation, if the code compiles, and it isn’t explicitly marked as “unsafe”, then large categories of bugs are supposed to be impossible.

That’s a huge win for us in programming and debugging time, and a huge win for users in security and reliability.

https://blog.torproject.org/announcing-arti

Steam Deck

I’m not a fan of mobile gaming, mostly because touch controls are awful and the average business model is a kind of scam. There is nothing wrong with mobile gaming per se, and Nintendo Switch is a good example of an amazing mobile gaming platform, both hardware and software-wise. I own a Switch and my only problem with it is the fact that it’s a closed product. Nintendo did a good job with Switch, but we can do better.

Steam is probably the biggest game distribution platform, but it’s not a monopolist, and it has a good track record of fair play. It looks committed to openness and interoperability, and its actions speak better than its words. This month, Valve presented its unique take on mobile gaming hardware, and I like what I see. Steam Deck will have a conventional x86 architecture, it will run Linux, and it will be able to run pretty much any game from your Steam library. Crucially, Steam Deck won’t force you to use Steam software. You don’t need to own a Steam Deck in order to be able to enjoy what’s coming. The technology which is responsible for running all Windows games on Linux is open source, so you can use it in any way you find suitable, on any hardware.

Open platform is good, but why would anyone buy a Steam Deck and use it for something other than playing Steam games? Here is a real world use case I’m actually looking forward to. It looks like nothing will stop me from installing something like RetroPie on a Steam Deck, which can make it an ultimate retro meta-console able to play thousands of classic games at least up to PS1.

Aside from more exotic use cases, bringing all Windows games to Linux is no small feat, I’m looking forward to buying this thing.

https://www.steamdeck.com/en/

Self-Hosting and WireGuard

I’ve been self-hosting my Nextcloud instance for a few years and the longer I kept it public, the more uneasy I got about the fact that it’s accessible to anyone. There are no reasons to suspect that Nextcloud login system is vulnerable, but it’s better to be safe than sorry. Nextcloud isn’t security-first software, and I don’t want any of my home computers to be freely reachable from the Internet.

That said, I often need to access my Nextcloud instance when I’m not at home, so making it completely unreachable is not an option. I’m already familiar with WireGuard, so I decided to create a private virtual network and share it between the hosts which use Nextcloud. I had to part ways with LetsEncrypt certificates since I stopped using domain names, but it didn’t affect anything in any disruptive ways.

Having your home network exposed to host in the Internet host was a dumb idea, and I don’t recommend doing that.

Framework Laptop

One of the things I learned the hard way is the importance of having easily repairable hardware, especially when it comes to laptops. It’s also nice to be able to upgrade some of their parts. I’m currently using Dell XPS 13, and I bought it precisely because it’s very easy to examine and repair. I already replaced a battery once, and I’m planning to equip it with a latest-gen SSD in the near future. Dell did a good job with this laptop, but we can do better. Framework Laptop looks like it takes extensible and repairable hardware to the next level.

Removable RAM looks radical compared to the rest of the market, I wonder if it’s going to backfire. Some initial reviewers point that the battery life isn’t that good, at least for now. Maybe it’s a price of non-soldered RAM? I’m not a hardware expert, but I hope that this product succeeds and sets the trend for the whole market.

https://frame.work/

AMD RX 6600 XT

I can’t wait for this GPU shortage craze to be over. so I can buy a decent AMD GPU. Nvidia isn’t Linux-friendly, and I’d prefer to get rid of it as soon as possible. AMD RX 6600 XT is the newest addition to the high-end line of AMD GPUs. It’s kind of the lowest-end model of a highest-end product line, to be precise, which makes it a sweet spot for my desktop. I don’t use my desktop for gaming, but I may play a game or two in the future, so I have no objection to having all the latest and greatest GPU features on the market for the lowest possible price.

https://www.amd.com/en/press-releases/2021-07-29-amd-radeon-rx-6600-xt-graphics-card-sets-new-standard-for-high-framerate

Game: Red Dead Redemption 2

This game feels like a low-effort TV series in a sense that it’s too stretched and artificial. The story is OK, the graphics is good, but the only truly great thing about this game is the atmosphere of Wild West. RDR 2 motivated me to look up a lot of stuff relevant to that period, and the game progresses is so slow with so little action that it was possible to look things up comfortably right on the spot. I wouldn’t recommend this game unless you want to look at an expensive attempt to portray United States circa 1899.

Game: Final Fantasy VII Remake

Full disclosure: I’m a huge Final Fantasy fan.

One of my favorite games of all times is Final Fantasy X. I also played parts I, II, and Tactics, all of them are on the top of the list of the best games I ever played. It is no wonder that I fell in love with Final Fantasy VII Remake pretty much instantly. The game is very well-made: the story is solid, the graphics is beautiful and the gameplay is addictive. This remake squeezes every bit of performance it could from my PS4, making it roar like a jet engine (putting on headphones helps with that issue).

I had a book called “World of Final Fantasy” when I was a child. That explains why some scenes feel oddly familiar. I probably read about this game, but I didn’t have a chance to play it. I’m not even sure if it was available on PS1. Anyway, this game is awesome, and I enjoyed every single moment of its gameplay.

Ethics   Rust   Tor   Steam   WireGuard   Nextcloud   GPU   Games