diff options
author | mms <michal@sapka.me> | 2023-12-05 23:07:58 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-12-05 23:07:58 +0100 |
commit | ac180f2d20bc811b662b55b7b0da62a8a42d7d40 (patch) | |
tree | 5113fd1f0dfd310b5a13f2b478a0997020d836c9 /content/blog/2023 | |
parent | 1da8a6b4f0983ec7ba45c5dd705feccf69896e58 (diff) |
chore: general tidy yp
Diffstat (limited to 'content/blog/2023')
-rw-r--r-- | content/blog/2023/mastodon-activity-pub.md | 112 | ||||
-rw-r--r-- | content/blog/2023/rocking-portale-music-like-its-2005.md | 75 |
2 files changed, 0 insertions, 187 deletions
diff --git a/content/blog/2023/mastodon-activity-pub.md b/content/blog/2023/mastodon-activity-pub.md deleted file mode 100644 index d65dff5..0000000 --- a/content/blog/2023/mastodon-activity-pub.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: "Mastodon and ActivityPub" -category: -- blog -abstract: Digging into Mastodon and Activity Pub -date: 2023-06-09T21:16:39+02:00 -year: -draft: false -tags: -- Mastodon -- ActivityPub -- W3C -- Social-Media ---- -After lengthy deliberations, I joined Mastodon. This website still has an auto-posting account on Twitter[^twitter], but I don't read anything there. Mastodon, on the other hand, is an open-source set of communities without Elon. May be interesting -[^twitter]: [Michal Sapka's blog on Twitter](https://twitter.com/d_s_blog) - -I was not sure which instance I wanted to join, but in the end, the list was limited to: -https://bsd.network/ -https://emacs.ch - -The question was, am I more of an Emacs type of person or more of a BSD one? Well, I spend hours in Emacs daily, and I tinkered with it much more, so without further delay, you can find me under - -https://emacs.ch/@ms - -However, I am still against social media, as it warps the mind and steals time. I don't want Mastodon to take too much of my time and mind, so I have decided: -- I will not use Mastodon on mobile -- On the desktop, I will use it via an Emacs package[^emacs] -- I will regularly evaluate if I get anything valuable from this service. -[^emacs]: [mastodon.el code repository](https://codeberg.org/martianh/mastodon.el) - -For now, you can find me there, and I will respond to messages. We will see what the future brings. - -This is also an excellent opportunity to learn about the underlying technology. - -### What is a Mastodon? - -Mastodon is a decentralized social media platform. Instead of a central server (think twitter.com), anyone can spin up their Mastodon instance. You can easily create one for bread bakers, Emacs users, or your neighborhood. - -What is cool and what makes Mastodon interesting is the fact that a user exists on a given instance (like me on emacs.ch), but he can follow and communicate with any other user having an account on any other server (like Ruben on bsd.network[^ruben]) -[^ruben]: https://bsd.network/@rubenerd - -This intercommunication is called **federation**. In fact, Mastodon can communicate not only with other instances of Mastodon but any other service implementing ActivityPub standard[^activity-pub]. Such services are sometimes referred to as *fediverse*[^fediverse]/ -[^activity-pub]: [W3C ActivityPub Standard text](https://www.w3.org/TR/activitypub/) - -[^fediverse]: There's even a [website](https://fediverse.party/) listing services on the Fediverse. - -Yeah, open standards! - -Though it's worth mentioning that in its current form, Fediverse is dominated by Mastodon. - -### Activity Pub - -ActivityPub is a protocol for decentralized social networks based on ActivityStreams vocabulary and syntax[^activity-streams] supported by W3C organization. -[^activity-streams]: [W3C Activity Streams 2.0 standard text](https://www.w3.org/TR/activitystreams-core/). - -The standard defines two layers: -1. A server-to-server protocol. This is what makes the federation work, as it allows instances to exchange data. -2. A client-to-server protocol. This, on the other hand, allows a client application, be it web, mobile, or Emacs, to communicate with the server so a user can actually use the service. - -An implementation may support one or both of those layers so that we may create a complete set of a server with a UI, but it's also completely valid to have an entirely automated instance without any human interaction. - -I won't dissect the entire standard; I only want to grasp the general mechanics. - -#### Actors - -In ActivityPub, a "user" is represented as an Actor on a given server. The same person may have identical accounts on multiple servers, but each of those accounts is a separate Actor[^impersonation] -[^impersonation]: I have yet to learn about any mechanism preventing abuse here. Anyone can create an account with the same username on a server I don't use and pose as me. Some Web of Trust here would be very beneficial. - -Servers in ActivityPub communicate via simple REST requests. - -Each Actor has unique endpoints representing: -- an inbox -- an outbox - -#### Delivery - -When a User wants to send a message to the world: - -{{<svg-full-width "activitypub-w.svg" "Public message sendout">}} - -1. User A's client sends a POST message to their own outbox. The message has left the client and is ready to be delivered to a different server. -2. Any server can call the outbox with a GET request. This is how public messages are delivered between servers. -3. Users on that server can then read the message in their own inbox. - -When User A wants to send a message to User B: - -{{<svg-full-width "activitypub-pm.svg" "Private message exchange">}} - -1. User A's client sends a POST message to their own outbox. The message has left the client and is ready to be delivered to a different server. -2. User A's server sends a POST message to the inbox of User B. The message is delivered to the Actor. -3. User B can then call GET on their inbox to read it. The message is delivered to a Client. - -Those requests are authenticated as a given Actor so that we can read only messages addressed to this user. The messages are addressed via "collections" - an Outbox is a collection, an Inbox is a collection, or a follower list is a collection. - -The server knows who a given Actor is following, so only messages accessible by any user on this server will be fetched. - -There is also a special "Public" collection, void of permissions. Any user on any server can fetch any message sent to "fPublic" without any authentication. This is how federated messages in Mastodon are propagated - someone follows a user on a different instance, so the person's server knows about the outbox collection and can fetch messages. Since it's aimed at the public, it will be available to each user on this server. - -We now know how private and public messages are propagated. - -### Activities - -Outbox and inbox don't contain the messages, but rather *Activities*. An activity is a request to Create a message, Edit it, Delete it, and so on. This mechanism allows users to edit their messages; in time, all servers should display the latest version. - -### Impressions - -ActivityPub is interesting as it allows for a decentralized social network closer to how Email works than something like Twitter. However, with this comes two downsides: -- Chattiness between servers. So many requests! -- Disregard for space. Servers contain copies of messages. With thousands of users, this may become a problem. - -There's much more to unpack here, but this is something for people developing software using ActivityPub. I am not yet one of those brave folks. diff --git a/content/blog/2023/rocking-portale-music-like-its-2005.md b/content/blog/2023/rocking-portale-music-like-its-2005.md deleted file mode 100644 index de1859c..0000000 --- a/content/blog/2023/rocking-portale-music-like-its-2005.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "Rocking Portale Music Like Its 2005" -category: -- blog -abstract: I have upgraded my setup to cheap mp3 player and wired headphones -date: 2023-03-27T22:09:47+02:00 -year: 2023 -draft: false -tags: -- portable-music -- Koss -- Sansa -- Rockboxed -- Bluetooth -- Wires ---- -Recently, I have significantly upgraded my portable music experience. - -### Headphones - -Despite multiple attempts, I am unable to use any IEMs I've tried. They simply fall out my ears. I tried low-end IEMs, and I've tried mid-range IEMs. I've tried all the ear tips I could find. I tried to learn how to insert them properly (rotate the ear counter-clockwise, breath-in, insert the monitor clockwise while chanting and sacrificing a cow). But still - every few minutes, I need to readjust them, or they are out of my ears. Over-ear for me! My new mobile headphones are Koss KPH30iH. - -{{<img-center "koss-1.JPG" "front view of the Koss">}} - -{{<img-center "koss-2.JPG" "top view of the Koss">}} - -I grew to hate Bluetooth. Even if we ignore the audio quality (and I do as I fail all audio-quality tests I take), removing wires comes with a few huge covenants. - -I've used AirPods ever since they came out. From one point of view, their connection quality is excellent. If they connect, mostly everything tends to be ok. But they are [Apple](/tags/apple/)-only, even if you can connect them to a different device. Once you want an audio source from another company, the magical auto-switching is lost. The way they are designed, all modern BT improvements are ignored in favor of apple-centric shenanigans. But let's assume the best-case scenario. How do you switch devices? Not via a handy button but from the phone UI. How do you change the source device on a wired gear? You just switch the plug to another player. And voila - we had an excellent standard just a few years ago. And it worked much more straightforwardly than modern, wireless ones. When was the last time you wondered why the hell your wireless headphones don't connect? Are you even able to debug that? In wired headphones, they either work, or there is a hardware fault. - -And since those are just wires, you can easily get them repaired. Yes, repaired. Headphones tend to last for years if they are taken care of. You may break any random part, but in most cases, it's easy to get it fixed. So how do you repair an Airpod? Easy, you buy a new one! And they will break, as batteries don't last forever. This is the common problem of all modern gear - producers make them as hard to repair as possible. If you go to a random junkyard and find a working set of headphones from 20-30 years ago. - -And even if they break, portable wired gear tends to be much easier on the wallet. My KPH30iK cost 30 USD, about the price of cheap, no-brand wireless IEMs. Try to get similarly priced over-ear headphones with BT. Mine don't have active noise cancellation (or any noise cancellation, to be precise), but that's a plus for me. ANC gives me nausea, unfortunately. If this feature was more important, I'd choose something that still supports wired communication. - -But ANC comes with the most socially annoying feature I've witnessed - the so-called "transparency" mode. I am old enough to take off my gloves when shaking hands and take off my sunglasses when I talk with someone. I consider it nothing more than a common courtesy. So why wouldn't I take my headphone off? And yet it seems that producers race who can make it more obnoxious - you press, cover, and push. You do Everything but what you should, which is to take the goddamn things off/out of your ears. - -Enough about old-man-yelling-at-air; how do they sound? Really great! Not audiophile-level quality, but still great. They are roomy and have decent bass that's not overpowering everything, like [Bose](https://untruesounds.com/no-highs-no-lows-must-be-bose/) tend to. And they are comfy. Not having to adjust them is one thing, but I often choose them for listening to music at home. They are much more laid back than [Sennheiser 6XX](https://drop.com/buy/massdrop-sennheiser-hd6xx), and they don't sound much smaller. - -### DAP - -I want to use something other than my phone as a portable music player. My iPhone 13 Mini has attritus battery life, and the lack of physical play control buttons makes it a chore to control. Also, the lack of a jack is a nuisance. DAC on iPhones was always ok at best, but using an external one just to play music is too much for me. I know. I've tried. - -So I bought a dedicated device. My requirements were simple: - -- Physical buttons to control. The lack of touch screen is a plus -- Ability to play OPUS, as mp3s are a thing of the past. -- Not powered by Android. I want something simple. -- Jack. This is non-negotiable -- Support for MicroSD -- Not sounding terrible -- Small form factor -- A small price -- A sane connector (USB-C?) - -As it turned out, that's one hell of a list. Older players have the correct form factor but lack modern codec support. Modern ones usually use Android, and I won't have that. The goal is to have a dedicated device and not pay for a general-use computer. And if I went premium, what would be the limit? I am not in a place of [having more money than brains](https://www.astellnkern.com/product/product_detail.jsp?productNo=138), but maybe someday. - -{{<img-pull-right "rockbox.png">}} -Luckily, the Open Source community has me covered! [Rockbox](https://www.rockbox.org/) is an alternative operating system for a wide range of older devices. So I could buy a gray-beard device with the hardware I want and flash it with Rockbox to have all the software features I crave. - -And so I got myself a Sansa Clip+. - -{{<img-center "sansa.JPG" "Look at how small it is compared to Airpods Pro 1G case">}} - -It checks all the boxes now: -- It's small. I have it clipped to my jacket for easy access. As the name implies, it has a clip, so attaching it is not a problem. -- It rocks a great SD port. Take that, Tim Apple! I have become a firm believer that every portable device should support it, and any excuse for not having one is customer-hostile. I can [rsync(1)](https://rubenerd.com/rsync-on-freebsd-with-a-modern-walkman/) all the data I want and have my entire music collection on me at all times. Just freeing myself from paid streaming services is a gain in itself. -- It has physical buttons for control. The device is soo small that they are not the best, and the layout sucks - someone was riding the iPod mania of the day. But they work without a flow, and I can pause playback without looking at the device. -- It's a single-use case device. RockBox allows for running Doom, but still, this device is to run music. Everything else becomes a chore. -- It has a jack. The audio output is far from audiophile level, and I couldn't power my [6XX](https://drop.com/buy/massdrop-sennheiser-hd6xx), but this was never the point. The audio quality is good enough. -- It was cheap. Mine cost just shy of 40 USD. The battery is terrible, and I need to replace it - I am the type of person wholdero could burn a house just by looking at soldering iron, so it will come with a cost. But except that the device is pristine. Guess plastic housing has its merits. -- It supports whatever file I throw at it. Thanks to Rockbox, I can use my mp3s, Opuses, or Flacs without a problem. -- It also hosts the worst kind of USB. I don't even know which version it is, but one that's long forgotten. - -Recapitulating, I now have a mobile audio setup that ticks all my boxes, allows me to listen to music I own, and costs less than a pair of AirPods. - |