Ozean Devlog #3.1: RSS and Go
In the previous devlog I wrote - in a somewhat negative way - about RSS. I also mentioned that I don't want to write anymore Go. With this not-really-a-devlog I want to talk, or even rant, about these things. Let's start with RSS.
The Nature of RSS Feeds
I've mentioned the nature of RSS feeds as a reason for why a feed aggregator can't be perfect. What I meant with that is that feeds are nothing else than user input that an application can't reject if it contains errors.
An application processing a feed must turn the data into usable information. Some examples I encountered are a URL starting with //
or the content of the post as the description. The last one is way to common and the reason why I only show the content or a description.
My approach works well in all cases. I either get the post that I expect to read, the actual description, or neither. In the last two cases the application informs the user about the circumstances and they can navigate to the actual source1.
These problems are only the tip of the iceberg. They made me consider moving to a link aggregator-ish implementation. But the advantage of the current implementation is the consistent design. I'd like to keep that.
One last flaw worth mentioning is that authors write posts for their platforms. They use JavaScript, CSS and what else and may or may not create a great piece with great interactivity. But it doesn't work well outside of their platform. Due to security and a post that spent many seconds requesting nothing for a total of 40MB, I block <iframe>
s and <script>
s. Doing so forces users to visit the actual post to get the whole experience, but it puts my mind at ease.
RSS and ATOM are awesome and they're the best alternative to social media there is. But this lack of consistency is a major downside.
Go or no Go
Saying that I don't want to write anymore Go might've been a little bit to harsh and requires some context. I want to go lower. I want to use a language without a garbage collector, managing memory myself. If I do that and only use such a language, I wouldn't be using Go anymore. That was my thought process behind my statement.
The reality is not so simple. Looking at such languages, there are not that many choices. We have C and C++. We have Rust. And then? Well, nothing, kinda. Looking at it, these three are the only languages where it's realisitc to find a job that uses them.
I've tried C and C++. I've used them in university and in private adventures. I don't like them. I don't like reading them, I don't like writing them, and I don't like working with them. I'm way to used to modern languages, like Go, that provide a CLI to work with and less weirdness. I'm happy to say that such languages also exit without garbage collection.
Of those, I've tried Zig and Odin. While I'm liking the idea behind Zig, I don't like the language. It's the same case like with C/C++, but not as bad. I know, I know, it's my lack of familiarity with the syntax or whatever. That may also be the reason why I see Odin in a different light.
Odin feels a lot like Go, without the quirks that Go has. As such, it appears to be a better Go. Odin also nails my main preference in a programming language: consistency. Creating a variable, constant, struct, enum, and procedure all follow the same formula.
name type value
Each of these constructs has a name followed by an optional type and value. If the type is missing, it requires a value, and vice versa. The result is very readible code and a flat learning curve. It's the best choice of the languages mentioned.
Okay, but if Odin is so great, why aren't I'm sticking to my words and ditching Go?
There are reasons I should've considered before putting my thoughts on the Internet. One is employability. I will need a job in the future and I prefer Go to everything else that is currently in use. Odin's adoption won't happen any time soon, if ever.
Another reason is Odin's maturity. While the language is almost done, according to its maintainer, it still lacks some things. Well, it lacks things that I'd need, like an HTTP server, HTML templating and manipulation, feed parsing, and more.
That leads to the last reason: I'm not good at Odin. I'd love to create these things myself. But that'd be too much for me. I'm learning Odin and how computers work at a deeper level. I'd like to focus on that instead of overwhelming myself. One step at a time. That's it.
I'm sorry, Rust.
-
Using the original HTML and not the one provided through the feed is something I need to look more into. ↩︎