Tuesday, October 8, 2019

Namespaces and the inevitability of Docker

Today I learned something that I thought I'd share. I was doing some research on sandboxing certain processes in linux for a project that I'm working on when I found out about linux namespaces. These are a kernel feature that allow isolating of resources from the rest of the system. Namespaces usually govern resources that are traditionally shared over the entire system, such as users and groups, the network stack and process identifiers.

The first thing that went through my mind as I read all that was that it all sounded like the things I needed. It will be a definite amount of work to get everything working the way that I want it to, but it sounds like a better than using a sandboxing or containerization tool that isn't made for what I'm trying to do and has other functionality I'll have to work around. Besides, these other tools are usually built on top of the namespaces anyway.

The second thing that went through my mind was that this makes the appearance of Docker a couple of years nothing less than inevitable. The first namespace was added to the linux kernel all the way back in 2008, but it all becomes clear when you read that a pretty hard and very important namespace (the one governing users and groups) was added in 2013. That's the very same year that Docker was started.

Isolating processes from other processes has been something that people have been aiming for for a very long time. One can at the very least trace it back to chroot in the late seventies and early nineties. This was a very limited and perhaps even flawed approach, but it shows that the drive has long since been there. So, then seeing that in the same year that the kernel provided one of the most important pieces of technology this software was created, would seem to imply that if it hadn't been Docker, it would have been someone else who started a similar project with similar functionality under a different name.

Given that the project needed some time to get to a more or less stable state and that it needed good adoption of the kernel that provided the required features, even the sudden popularity explosion of Docker makes a whole lot of sense. After all, this was a technology the world had been looking for decades...

Thursday, October 3, 2019

What DuoLingo taught me about Buffy

I am currently learning Danish on Duolingo. Why Danish? Well, that's a weird story.

My first introduction to the language was when I was watching Angel (you know, the Buffy the Vampire Slayer  spinoff). The version I was watching came with subtitles in somewhere near fourteen languages and the only way for me to turn them off was to cycle through all of these. Soon enough, I just gave up on turning them off and stuck with the first one, which was displayed by default. So you could say that Danish's proximity to the beginning of the alphabet is why I am learning language.

The second time I learned some Danish was due to a band (dance act? pop duo?). They're called Infernal and they usually sing in English. They had one hit (From Paris to Berlin) and that's approximately when I started listening to all their music. At some point, though, I found out that they had some songs in Danish under another name (Paw&Lina) as well. I liked two of these songs rather a lot and also looked up the meaning of what I was listening to. So you could say that Infernal is the reason I am learning this language.

Ultimately, though, the reason that I started learning the language is just that I liked it a lot. That's why I started watching a tv show in Danish and started doing Duolingo lessons. I stopped watching the tv show after a while and I also didn't continue putting the time into Duolingo. And then a year or so later, I picked up the app again and dropped it not too long after. My current attempt to learn the language is my third one.

The other day, I was watching some episodes of Buffy with a friend. It also had Danish subtitles, but this was only one of four languages. Moreover, though, my Danish has gotten to the level where I got just enough of it for it too be rather distracting (which also doesn't happen when it truly doesn't take much effort to read what you see, which is not where I'm at at all yet). So, I turned them off. However, yesterday I was actually watching some episodes on my own and I wasn't too bothered by being distracted, so I left them on.

That gets me to today. Today I was doing a quick lesson in between things. And they taught me the very first Danish word that I had learned. One that I had figured out from just the subtitles that first time because it had kept recurring. And then a bit later, the app taught me another word. This time, it was a word that had stood out last night. That was quite the coincidence. Or was it?

The two words were "Boy/Girlfriend" and "friend". I had started on a new category: people. And that's just the thing. Buffy and Angel aren't about the monsters. The monsters basically just provide the backdrop. People - and the relationships between them - are what the shows are really about. So, it makes perfect sense that this was the moment that I started learning words that I already knew.

And at the same time, I realized just how much the show really was about the people...

Wednesday, September 11, 2019

The Pinebook

In the past, I have written about Single-Board Computers a number of times. Today, I want to do something similar. This time, though, it's a product by a SBC-manufacturer that is still more or less an SBC, but at the same is a lot more than just that. I'm talking about the Pinebook.

So, this manufacturer joined the SBC market with a strong offering: the Pine A64. It was on Kickstarter and it promised to do 4 cores for less money than the Raspberry Pi. Once you started looking at it more closely, you'd find that you probably wanted at least some of the extras and probably wouldn't end up paying less, but the idea was still there.

There was something else that made the Pine A64 stand out. That was that this wasn't going to be just another Raspberry Pi-clone. Most of the other SBCs were either quite a bit more expensive than this thing, or tried to be as close to the Raspberry as possible. Without the word "Pi" in the name and a brand-new form-factor, the Pine A64 made it very clear that it wasn't going to be another clone, which was a rarity for devices that weren't in a different price range all together.

However, it was something else that drew me to the device. It was the HEVC (aka x265) playback support that was promised. This was several years ago and the Raspberry only got HEVC support earlier this year with the RPi 4, so it was something really nice to look forward to. Unfortunately, this turned out to rely on proprietary drivers which basically meant that it only worked on Android, which wasn't really the operating system I wanted to run. I ended up finding this out before the end of the campaign, but decided not to cancel my pledge after all. In the end, though, this is the reason that my Pine A64 has basically been idle ever since I first tried it out just to see if it worked.

But then came the Pinebook. This was basically a Pine A64 (though they made a different board, the main components were all the same) put into a laptop. The whole thing cost only $99 which is incredibly cheap for a laptop. I read about it on a forum I frequented and decided to just go for it. After shipping and taxes, I was down quite a bit more money, but in the end it was still a good deal.

My Pinebook has served me well ever since I got it. It's all about expectations, though. The device isn't really going to play back video well* and it's not going to be flashy or let you have a bazillion tabs open. However, it does extremely well as a digital typewriter, which is what I've mostly been using it as. I've also done some simple GIMP (photoshop but open source, basically) work on it and I've even run some old games in DOSBox.

More importantly, though, I've never been careful with this laptop, which was largely possible because of its price. I've put it in bags I wasn't entirely sure would be handled carefully, I've taken it with me to the strangest places and I've stuffed it in lockers where it barely fit. The result is that the screen is damaged in quite a few places. Of course, the other result is that I've always had a laptop with me when I needed - or even just wanted - it.

In a way, this post may feel a little outdated. That's because the next big thing is the Pinebook Pro, which is a new version of the device that costs twice as much and is meant to be much more usable as a daily driver. I have ordered it and it's supposed to arrive somewhere next month. I might use it to write a sequel to this post at some time. However, I don't think it will completely replace the Pinebook that I currently have, so this piece still feels somewhat relevant to me. And besides, I felt like writing about this device and ultimately, that's what this blog is all about.

*: I should probably check if this is still as bad in newer versions of the software.

Saturday, August 24, 2019

Right back at ya!

Some two and a half years ago, I started a three-parter on discrimination on this blog. That was one of the last posts I wrote in a long time. That three-parter was something that had been brewing in my head for a very long time, so I still intend to get back to it eventually and write the remaining two parts. The second part is one that will be more or less the same no matter when I write it, except that I might learn a thing or two and change my opinion a bit. The third part is one that is much more related to the things happening in the world at the moment, so its content will largely be dictated by when I do actually write it.

Today I want to do something different, though. I want to comment on something that I wrote in the first part, and add to it the understanding that I have gained since I wrote it. Let's start by quoting what I wrote in the past.

However, there is this strange other side to [the word nigger], where it is accepted if a black person says it. I would understand this if it was about intention and sometimes a bit of it is about intention. However, the word is also considered racist if it is used by a white person without intending to insult. If anything, the fact that white people cannot use the word while black people can sounds like racism to me.

I don't really want to get into whether calling someone a nigger is racist. I do think that I can say without evoking any controversy that you generally shouldn't call someone a nigger. Black people generally don't like being called a nigger and that should be more than enough reason not to do so. I think that by extension, we can say that is often okay for one black person to call another black person a nigger. And by putting it like that, I think that we can clearly see that the idea that whites cannot use this term isn't actually racist. After all, it's not that they are actually not allowed to say the word, it's that they shouldn't.

Today, I want to look at why a white person shouldn't call someone a nigger while a black person can do this if they want to. When I wrote that, I didn't understand it at all, and I think that the quote above very much shows that. I think I understand it a bit better now, so that's why I'm writing this.

My understanding of this changed completely when I read something on the internet. I don't know where I read it or who wrote it, but what they had written was that when you can respond with "right back at ya", an insult is much more of a playful thing than an insult.

And that's basically all there is to it. It's basically that any insult doesn't really hit as hard when it could also be used against the one using it. For that, it doesn't matter what the insult itself is. It could be some way in which a person is not neurotypical, it could be related to a hobby that isn't considered normal by the mainstream, it could be almost anything else. The key is that when the one using the insult falls in the same category, they can't really mean it as an insult, so it's playful rather than truly an insult.

Of course, being a white male was the first thing that made it hard for me to understand the way this worked for a word like nigger. However, while I think that made it hard, I also think that nigger is also a more or less unique situation where we took things to the extreme. Just like how I think that for many people the main reason it's a "bad word" is because they have been taught it's a bad word, I think that for most people a black man using the word is accepted behavior because they have been taught it's accepted behavior. And we've taken things to a rather extreme point to begin with by basically saying a word is not okay regardless of context or intention, and making basically implying that it's always just in friendliness when a black guy says the word is a similar extreme to me.

At the end of the day, understanding where this difference in judgement of people based on their skin color helped me understand why this isn't actually a problem. I'm not entirely sure if I think this is a good way to tackle problems, but at least now I understand. And if you didn't before, maybe now you can too.