Import content from old blog, adjust theme

This commit is contained in:
Felix Suchert 2018-07-08 09:30:00 +02:00
parent d8a0fa6364
commit 4061f25678
Signed by: feliix42
GPG key ID: 24363525EA0E8A99
13 changed files with 200 additions and 2 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "themes/casper"]
path = themes/casper
url = https://github.com/feliix42/hugo-theme-casper

View file

@ -1,3 +1,53 @@
baseURL = "http://example.org/" baseURL = "https://dummyco.de"
languageCode = "en-us" languageCode = "en-us"
title = "My New Hugo Site" title = "Dummycode"
theme = "casper"
copyright = "All rights reserved"
paginate = 5
# pluralizelisttitles = false
[[menu.main]]
identifier = "home"
pre = "<h3>My World:</h3>"
name = "Home"
url = "/"
weight = 122
[[menu.main]]
identifier = "imprint"
name = "Imprint"
url = "/imprint/"
weight = 121
[[menu.main]]
identifier = "homepage"
name = "Homepage"
url = "https://felixwittwer.de"
weight = 120
[[menu.main]]
name = "Github"
pre = "<h3>Social:</h3>"
url = "https://github.com/feliix42"
weight = 109
[[menu.main]]
name = "Twitter"
url = "https://twitter.com/Felix_Wittwer"
weight = 108
[[menu.main]]
name = "Keybase"
url = "https://Keybase.io/feliix42"
weight = 107
[params]
author = "Felix Wittwer"
authorlocation = "Dresden, Germany"
authorwebsite = "https://felixwittwer.de"
authoravatar = "images/felix.jpg"
authorbio = "I am doing my Master's in computer science at TU Dresden."
cover = "images/banner.jpg"
description = "\"If you don't know where you are going, any road will get you there.\""
githubName = "feliix42"
hideHUGOSupport = false
logo = ""
twitterName = "Felix_Wittwer"
[permalinks]
post = "/:slug/"

17
content/imprint.md Normal file
View file

@ -0,0 +1,17 @@
---
title: "Imprint"
date: 2018-07-08T09:11:05+02:00
draft: false
share: false
noauthor: true
image: images/imprint.jpg
type: page
slug: "imprint"
---
This blog is proudly published by Felix Wittwer and powered by [Hugo](https://gohugo.io).
For more information, look at the [imprint on my homepage](https://felixwittwer.de/imprint.html).
Unless otherwise stated, the header images on this blog are shamelessly stolen from [Unsplash](https://unsplash.com), a wonderful website, providing images under the [Creative Commons Zero](https://creativecommons.org/publicdomain/zero/1.0/) license. 🙈
The [cover image](https://unsplash.com/photos/a5XN1f09_ek) from my front page for instance, was shot by [Nacho Rochon](https://unsplash.com/@nacho_rochon?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge).

View file

@ -0,0 +1,30 @@
---
title: "Hand Me the Ricer"
date: 2016-02-15T00:31:52+01:00
image: content/images/2016/feb/5w6BJGF.png
slug: "hand-me-the-ricer"
tags: ["apple", "linux", "design", "reddit"]
draft: false
---
A few months ago I found this subreddit - `unixporn`. I'm not sure what I expected, when I clicked that link. Everyone who frequents [Reddit](https://reddit.com) more or less often knows that this is a place where you can find almost everything you can think of and - even more often - can find things you didn't even want to find.[^1] And since the suffix _porn_ didn't sound very promising, I was very sceptical.
But I was wrong. When I clicked this link, I was positively surprised. The truth is: Unixporn is a community full of people who bear a relation to their UNIX system.[^2] This subreddit is a place for all those humans to share their self-hacked config files or screenshots of their in hours or days of work beautifully customized systems, the catwalk for UNIX systems, so to say.
What these people do is called __ricing__. Normally, this verb describes the process of passing food through a food mill _("ricer")_ to make it smoother and mash it up. In terms of _"ricing a UNIX system"_ this simply means to customize your system to step out of the crowd and look special.
For the next few hours I sat there, browsing through all these beautiful screenshots and starring a number of GitHub repositories containing some smart configurations and programs, like [iTerm2-borderless-padding](https://github.com/jaredculp/iterm2-borderless-padding), [kwm](https://github.com/koekeishiya/kwm), [herbstluftwm](https://github.com/herbstluftwm/herbstluftwm), [i3](https://github.com/i3/i3), [i3-gaps](https://github.com/Airblader/i3) and so on.
I was overwhelmed by the sheer amount of possibilities to customize my system, especially since OS X has a reputation for being poorly customizable because it's closed source and most of the time you just see the vanilla OS X while Linux is well-known for it's nearly infinite amount of options and the wide range of programs, distributed as packages.
And this is how I spent the rest of the night: Building and installing things like _iTerm2-borderless-padding_, messing around with my configuration and customizing my own system.
After a lot of trial and error and a lot of new browser bookmarks later, I finally found a configuration I loved.
![My Desktop](https://i.imgur.com/SGWtryl.jpg)
But this was just the beginning. Since then I've been constantly experimenting with my systems' settings and [my .dotfiles](https://github.com/Feliix42/dotfiles) [^3] are growing since then. I have always been more of a terminal person and try to avoid using the Finder as often as possible, but now - since my terminal became so adorable - even more!
So if you have a faible for tinkering around you definitely shouldn't spare your system! The own PC or laptop is primarily defined by the sum of its dotfiles and its UI. With each line of code and every little UI adjustment you breathe more life into it.
Not everything has to remain at status quo. Sometimes you should be a little hipster.
[^1]: I know, _4chan_ is even better at blowing your mind with things you didn't expect. But for beginners, [/r/WTF](https://reddit.com/r/WTF) is usually enough mindfuck.
[^2]: Yes, OS X __is__ a Unix system.
[^3]: Dotfiles are small configuration files that most commonly live in your home folder.
[^4]: The Header image is from [this](https://www.reddit.com/r/unixporn/comments/44nhdl/wmutils_decently/) reddit post.

View file

@ -0,0 +1,97 @@
---
title: "I'm Corroding"
date: 2016-07-04T21:17:00+02:00
image: content/images/2016/jul/photo-1416424312427-baefa7707d85.jpeg
slug: "im-corroding"
tags: ["rust", "programming"]
draft: false
---
No, I'm not getting old. I mean - yes, technically Im aging and getting older in this very minute. But this blog entry is not about me getting old and senile. Its about a programming language I recently started to learn: **Rust**.
About three months ago, right after the new semester started, I was looking for a new programming language to learn. I was getting tired of writing every project in _Python_. I wanted a language that has a strong type system, is fast (yes… "fast" is relative) and compiled. Two friends of mine ([Hendrik](https://twitter.com/hoodie_de) and [Kilian](https://twitter.com/kiliankoe)) hinted me towards Rust which they claimed to be a really nice language with beautiful syntax.
## First Steps
So I chose Rust over Go (which I might look into later) and started to learn it by reading **the book**[^1], a piece of literature written by the (who? Rust Community or Devs?) which carries the name _"The Rust Programming Language"_. After a brief overview you are directly being thrown into a relatively practical example by writing a small random number generator to get to know a few basics about the program structure and see some things that you will learn in the following chapters.
It felt really good to see something practical before diving into theory. And even though it was a little bit overwhelming to use the Rust Package Manager (`cargo`), `match` statements and error handling right in my first program in that language it felt so much better than writing a plain _“Hello World“_. Not just because every single step towards the final Guessing Game is being explained in detail.
This is what Rusts interpretation of a "Hello World" _(aka guessing game)_ program looks like:[^2]
```rust
extern crate rand;
use std::io;
use std::cmp::Ordering;
use rand::Rng;
fn main() {
println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101);
loop {
println!("Please input your guess.");
let mut guess = String::new();
io::stdin().read_line(&mut guess)
.expect("failed to read line");
let guess: u32 = match guess.trim().parse() {
Ok(num) => num,
Err(_) => continue,
};
println!("You guessed: {}", guess);
match guess.cmp(&secret_number) {
Ordering::Less => println!("Too small!"),
Ordering::Greater => println!("Too big!"),
Ordering::Equal => {
println!("You win!");
break;
}
}
}
}
```
The following chapters of the book are each dedicated to a certain characteristic of Rust. These points interested me the most:
- Every variable is by default _immutable_. At first, this sounds a little bit stupid. Even though other popular languages like Swift encourage you to use immutable values, enforcing it like this seemed a little bit over the top for me. But it makes sense, when you think about it: One of Rusts primary goals is safety. Having immutable values by default minimizes the risk of accidentally overwriting a value you wanted to keep or never intended to change.
- Rust uses a system called the _"Ownership System"_ to achieve Memory Safety. Therefore, every variable binding in Rust has a so called __Ownership__: It can be bound exactly once, when you write something like `let x = y`, y is being moved to x and no longer available.
If your binding is going out of scope, Rust will free the bound resources.
To make this system work, Rust has introduced the possibility to "borrow" a variable binding to another function and keep the binding even if the function you called returned. This is perhaps one of the most difficult things in Rust and from time to time I found myself "fighting the borrow checker", who checks at compile time if your code is valid in terms of the Ownership System. You can read more about the (in)famous _Borrow Checker_ [here](https://doc.rust-lang.org/book/ownership.html).
## Further Progress
After I had read half way through the book, I started to write some small programs to get some practical experience. I tried something I did several times in Python: Writing a parser for our canteen using [OpenMensa](https://openmensa.org). But it turned out that deserializing the returned JSON message was harder than I thought since this required either a lot of hand work or the use of Compiler Plugins, which required (at least back then) _Rust Nightly_.
So I tried some other things.
So far I've written some small things like a [bitly link shortener](https://github.com/feliix42/bitly-rs) and a program that uses `hyper` (a http library for Rust) to get the [status](https://github.com/fsr/buerostatus) of our student representatives office and display the status as an [AnyBar](https://github.com/tonsky/AnyBar) dot.
![One of my first Rust projects: Anybar](/content/images/2016/jul/anybar-rs.png)
I also wrote my first crate (that's what libraries in Rust are called - and yes: they are being shipped via Rust's package manager: _Cargo_): [`anybar-rs`](https://crates.io/crates/anybar), which communicates with the AnyBar dot in your status bar to display whatever you want. Which brings me to my next point:
## The Community
Probably one of the most fascinating things for me was the Rust Community itself. Rust has such a healthy and friendly community, it surprised me! After I published my first crate to _crates.io_, I tweeted rather proud of myself what I had done and the reaction was terrific.
![Quite a nice community](/content/images/2016/jul/tweet_rust.png)
I know that a few replies and stars (those are called hearts now) are not that special. But I was not used to that kind of community. I expected nothing when I sent out the tweet. I never tweeted about Rust, neither am I some kind of well-known person in the Community and so I didn't think that anything would come out of this. But the encouraging reaction from other Rustaceans felt really good and someone even took the time to look over the few lines I wrote and gave me feedback.
This was just overwhelming.
## So, how's it?
All in all, Rust is a really cool language with a damn cool community and really nice syntax. It gives you the impression of being developed by following a well thought-out concept because it is just so organized! [^3]
Even though Rust's still a little bit rough around the edges, I'm looking forward to dive deeper into it! You will sooner or later be hearing more from me about Rust. ;-)
[^1]: You can read _the book_ [online](https://doc.rust-lang.org/book/) or offline via _multirust_.
[^2]: You can read more about it on the [tutorial page](http://doc.rust-lang.org/book/guessing-game.html)!
[^3]: I know, that's an advantage every new language will have compared to languages like _C++_, which have been out there for quite some time now. But still!

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
static/images/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
static/images/felix.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
static/images/imprint.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

1
themes/casper Submodule

@ -0,0 +1 @@
Subproject commit 35b5e614dde14318817c1ba3586f0c2e8e6ee813