A blog about programming, Rust 🦀, typography, language and stuff. I'm programming on GitHub and I try to occasionally answer questions on StackOverflow.
  • Solving the Generalized Streaming Iterator Problem without GATs

    Generic Associated Types (GATs for short) are a long awaited extension to Rust’s type system. They offer a way to work with higher kinded types – a necessity in a couple of situations. A common example is the streaming iterator: an iterator able to return items borrowing from self (the iterator itself). Unfortunately, GATs haven’t even landed in nightly yet. So while are waiting, we can try tackling the streaming iterator problem without GATs. In this post we explore three possible workarounds for situations where an associated type depends on the lifetime of a &self receiver.

    Continue reading
  • New faces for our lovely bots in #Rust2018

    If you are somewhat active in the Rust community, chances are you have already met Rust’s lovely bots, bors, highfive, and rfcbot. Without these bots, the Rust project couldn’t be developed nearly as quickly or with the same level of confidence as it is now. As a way to acknowledge this and as a #Rust2018 community project, I propose to give them awesome new avatars!

    Continue reading
  • Using the Borrow Checker to make Tic-Tac-Toe safer

    This week’s task of the lecture “Programmieren in Rust” (German) is to build a tic-tac-toe game. After implementing the required features, I tried to use the borrow checker and strong typing to avoid some bugs at compile time – with partial success.

    Continue reading
  • Developing a game with Rust beginners – some thoughts on tools and libraries

    Like last summer, I oversaw a three week programming practical at the University of Osnabrück, Germany – this time focussed on computer graphics. My group created an open-world exploration game called “Plantex”, in which all content is procedurally generated. This means, our game doesn’t need any static assets: the terrain, textures, plants and other objects are generated from a single integer seed. Only one of the 23 students knew Rust before, everyone else learned it during the first few days. In this post, I will share experiences and thoughts from the practical.

    Continue reading
  • Rustfmt and yet another opinion on code style

    In the last few weeks I was extensively using rustfmt in a medium sized project at my university, so I really got to know it. In this post I will describe my impression of the quality of auto-formatting and my experiences with using rustfmt in continuous integration. I will also share some opinions on code style that emerged from working with an auto-formatter.

    Continue reading
  • Building an SQL database with 10 Rust beginners

    This summer I was overseeing a three week university programming practical focussed on the topic of databases. My group’s task was “simple”: build your own SQL database. Considering the complexity of database systems (with SQL parser, network interface and storage engines), one might say that this was already an insane idea. But wait, there’s more! We used the language Rust for every part of the software although none of my team had even heard of the language before. This post describes what happened and what my students think of Rust after working with it for three weeks.

    Continue reading
  • I don't even programming

    Exactly 8 pm. Exactly at 8pm the online sign-up form would be activated, the professor had said. And exactly then his students, including my girlfriend, would be able to sign up for their favourite time slot. This is precisely the level of accuracy you would expect from a German university professor. And this is precisely what did not happen that evening.

    Continue reading