musicmatzes blog

blog

I will fly to iceland tomorrow. I'm really excited about this and I really hope I will have the opportunity to take great pictures while there.

But vacation also means no activity on my open source projects. This post is mainly for your notice that there won't be any updates on imag or other projects in the next weeks, until I'm back.

I guess I have to set a photo gallery up when I'm back, so I can share the pictures I take in iceland.

Have a nice summer, you all!

tags: #blog #life

This blog is now hosted via ipfs as well.

What does this mean?

This means that you can access this blog via this IPNS name directly. As it is hosted in a distributed manner, a node which has the content must be online, else the retrieval fails. I try to keep nodes online which host this content, though I cannot promise anything, of course.

Old versions (starting today) of this blog can be found here, also hosted via IPFS. So you can see all typos I correct now and then.

How can I help?

You can help hosting this very blog by installing ipfs and pinning the latest hash (which is QmefDSDRcNyQUzNaVJnazQ7GpynjyEzPrdo1sdEk8ZLt8a as of writing, but might be changed by now).

hash=$(ipfs name resolve QmX95tkM6em8MP1SDs9Qae1G9YscqwozQJbX5rWTTYcJea)
ipfs pin add -r "$hash"

The newest version will be published under this name:

/ipns/QmX95tkM6em8MP1SDs9Qae1G9YscqwozQJbX5rWTTYcJea

So you can poll the newest version of this blog by re-resolving this name and pinning the contents via ipfs pin add -r.

How is it done?

Well, that's rather trivial. I have an ipfs daemon running on my machine and a bash script for adding the contents of this blog to ipfs. Each time I run this script, it adds the blog contents to ipfs and writes the last hash to the “old-versions” file. After that, it publishes the name.

So my workflow is like this:

  1. Run hugo to update the blog sources locally
  2. Run my ipfs publish script to publish the site in ipfs
  3. Run my publish script to publish the site on beyermatthias.de

You really should host your things with IPFS as well!

Additional notes

What I had to do before this worked with “hugo”: I had to ensure hugo did not generate absolute URLs. Because if each link links to the full URL of the blog (beyermatthias.de/yaddayadda), each link in the IPFS-checked-in-version links to this URL as well. Instead, each URL has to be relative to the current location, then, the IPFS versions link correctly.

tags: #blog #server #tools

I just wrote my very first bit of racket code which actually runs somewhere. Want to find out what it is?

Well, it is a rather simple piece of code, and it helps me generating this very blog. If you visit this blog frequently, you may have noticed that the layout changed a bit. Chaning the layout was a thing I wanted to do for months and the adaptions I just did are exactly what I wanted to do all the time: Move the content in the center of the page, the lines are now shorter as the div in which the content lives got reduced in its width.

I also moved the tags and dates on the left of the articles, both on the index page and on the article pages. I really like that style. It wasn't that easy (for me as racket-newbie), because the blog engine I use (frog) has no method to insert a html-list of tags somewhere. So I coded it myself, right in the templates for the article and index pages.

Here's how I did that:

  1. First, I put everything into a subcontainer of the bootstrap layout. The date and tags (lets call it metadata) lives in a two-column-container to the left of the ten-column-container which holds the content
  2. I wrote a bit of racket code to generate a html-bullet-list out of the comma seperated list of tags frog gives me:
@(string-join
  (map (lambda (str)
        (string-append "<li>" str "</li>"))
       (string-split tags ",")))

What it does is simple: It splits the string in tags, which holds a list of tag-links by the seperator, the comma. Then it maps a lambda over the list of strings, which appends the string to "<li>" and "</li>" to that. Afterwards, the whole list gets joined together, so we have one big string left.

The template itself contains the <ul> and </ul> tags around the list. This way, I generate a nice bullet list for both the index pages and the article pages.

Unfortunately, the solution is not very DRY, as both templates contain the same code. There is no possibility to pass custom code to frog, yet. But I opened a feature request on github to include such an option (providing a pull request would be much nicer, I know – but as you already know, I'm a racket newbie and I'm not sure I can figure out such a thing myself).

tags: #blog #racket #programming

As you might have noticed, I'm about to switch to NixOS, the purely functional Linux distribution ™. Here are some toughts on Racket on NixOS.

First, why Racket? Well, my blog here is written using frog, the frozen blog tool which is written in Racket . It actually works really well for me and was not that much effort to setup – I'd recommend it to everyone.

But this isn't about frog, this is about racket. So, I need Racket for my blog. But I also like Racket, I played with it some time ago and it is a neat language, really!

Because of my switch to NixOS I wanted to try whether I can compile my blog on NixOS, so I installed Racket on my NixOS-testing machine. And you know what is awesome?

It. Just. Worked.

When installing racket, the racket language distribution ships everything you need. It ships the racket interpreter, it ships DrRacket, the Racket-IDE, the REPL, the package manager for racket. I was able to install frog and compile my blog in 3 steps.

  1. Install racket
  2. Install frog using the racket package manager
  3. Compile the blog

Well, you actually do not use the nix package manager when doing the upper steps, which is, of course, impure. But I wanted to focus on whether it works or not here, not on purity. Of course it would be much better to be able to install frog via the nix package manager, keeping everything in the nix store. But that's not possible (yet), I guess. tags: #linux #nixos #nix #blog

Well, I am switching my blogging tool again. But I guess, this time, everything will be fine the way it is now.

The new tool is called “frog”.

And it is written in Racket, the programming language I'm learning at the moment. It has some nice features and targets bloggers, so it's the right tool for me, I guess. It generates static sites, so yay! No more update hell, at least not on the server! Racket uses a special versioning policy to prevent the dependency-hell, maybe this works also well for updates? I'd love it!

So, I'm using frog now. I converted my old entries to its format (which is Markdown, but it wants a specially formatted header at the beginning of each Markdown file) and it generates it really fast (hopefully it scales...).

So, I hope you like it. Some of you have requested a atom/rss feed, it's integrated, so here you go...

tags: #blog

As this blog is the only resource you can find information about me, I decided to write some stuff about me!

I'm a (at this time) 22 year old guy, living and studying in Germany, in the Black Forest. I'm studying Computer Science and successfully finished my second semester at the moment.

I'm a free software and open source enthusiast since 2008 (ca.). My favourite operating system is Linux, Archlinux as distribution. But I also like Debian (not Ubuntu!) and other distributions. I'm a free software contributor, contributed to various open source projects, including the linux kernel [C], OSv [C, Java] (a VM-Operating system), tig [C] (a console frontend for git), agendav [PHP] (CAL-dav web client), davical [PHP] (CALdav and CARDdav server), nanoc [Ruby] (static site compiler), hashtable [C] (hashtable implementation) and much more smaller projects.

My favourite languages are C and Ruby, but I'm also very interested in functional languages like Haskell or Scala (but I don't like the JVM).

Besides this I like listening to music, cooking or contributing talks or other stuff to my local linux user group.

I think, that's it! If you have questions or ideas, you want me to know of... send me an email!

tags: #blog

I wrote this article before, but it vanished somehow. So I write it again.

The deal is: I removed ghost as a blogging platform and switched back to a static site compiler, compiling the contents on my local machine and publishing the generated html.

For generating the contents, I use “vee”. This is a bash script for doing blogs. There's nothing more to say about this, expect that the old articles from my ghost blog were imported here. They were all imported on one date, that's why they all have the same date (which is a bit funny if you look at the “Happy New Year” post – which is dated somewhere in the middle of the year now).

So, ... I hope this one will last longer than just some months. I really like it because it is so damn simple. And that's all I want: Publishing thoughts. No fancy stuff around, but human-readable blog raw material.

Licenses for the entries will follow, of course.

tags: #blog

As I already wrote, I'm using ghost as blogging platform in here. I want to collect some initial thoughts on it in here.

Ghost vs. ...

I used Wordpress, jekyll and nanoc before. And I want to compare them with ghost. You may think they are not comparable, as Wordpress is a content management system, jekyll and nanoc are static site compilers and ghost is a simple blogging platform, but I think they really are!

Wordpress

Wordpress is the most known CMS out there, besides Drupal and Typo3. It is really user-friendly (or was when I used it, which was almost 3 years ago). I really like Wordpress as content management system, and maybe I have to deal around with it at the beginning of next year, but I don't like some things which it is related to... First of all, I really don't like that it is written in PHP. PHP as is, is a terrible language. I even would say it is a cruel language, as it allows things which are absolutely not sane at all. For example, this is absolutely valid PHP code:

php $nothing = NULL; $nothing-&gt;foo = "foo";

Not to mention that PHP is slow. I don't want a slow blog. I want a fast blog! The second thing is that Wordpress is big. It became just to big for normal blogging. The whole infrastructure is a mess. I wrote a wordpress theme some day, and I struggled figuring out what exactly to do and why and so on.

jekyll / nanoc

jekyll and nanoc are static site compilers. They compile content into static html files, which are much faster at loading speed (static html can be served in so much less time, you can't imagine)! Also, plain html is much more secure than some running code on your web server, as it is not hackable. The negative thing on this is: you have to do some setup. I know, there is octopress, which is really good at “click and play” and so on, but it is still too much effort for me. Ruby is slow, too! But I don't have to care, as the site compiles on my own device. It can take hours (which would be really annoying, but fortunately these static site compilers are really good optimized), I would never mind, as the pages are still served in nearly no time by the web server.

ghost

Well, ghost is not as much click-and-play as octopress or wordpress. But it is almost. And I can start submitting content to my page in almost no time. It took me one hour to figure out how to get it running on my system. I'm not familiar with this node.js stuff and everything, just read through one or two tutorials I found at google. And it works. It is not as fast as static web pages, but it is also not as slow as Wordpress. I think it works good for me in manner of speed. It is not really as much as nerdy as I usualy prefer my software to be, as it has a neat graphical interface and everything. But it works really well for me. It is not “What you see is what you get” but it has a preview for the markdown I wrote, which is really nice (I sometimes wish I would have this for the latex stuff I write)! It is really much point-and-click stuff, but I never said I wouldn't use such a thing. I just said I don't like this kind of stuff. But I think I will stick to ghost, as I really like it by now!

tags: #blog #ghost