Why can't we map tuples on arguments in Rust?

Why can’t we do fn foo(i: i32, j: i32) -> i32 { i + j } fn main() { println!("{}", foo((1, 2))); } in Rust? The idea First of all: I don’t know much about what is going on in rust-compiler-land, hence I don’t know whether this is technically possible or even in progress already. I’m simply writing down some thoughts here. The idea, or rather the question, is: Why can’t we map tuples on arguments in Rust?

TIL: Don't use C++ for new projects

Today I learned that the new C++ standard (C++17) has std::variant - but no pattern matching. Variants and how they work Variants or “tagged unions” are a special form of data type. They describe an abstract thing which could be one concrete thing or another concrete thing. Variants are available in a lot of languages, including and not limited to ML, Haskell, Algol 68, Pascal, Ada, Rust and even C.

Developing a Query-API for toml-query

For one of my other projects (yes, imag), I developed a query library for TOML. I currently am planning a new feature for it: A query API which can be used to execute prepared queries on a given TOML document. But let me start with the basics! What is TOML? “TOML” stands for “Tom’s Obvious, Minimal Language” and is somewhat similar to JSON, though is highly readable and easy to understand.

How to improve your open source code (6) - Version control

This post was written during my trip through Iceland and published much later than it was written. Version Control is one important aspect when developing software as a whole, and especially when developing open source software. Here are some thoughts about it. Technology First of all, technology wise it doesn’t matter which version control system one uses. For the sake I’m using git here as an example VCS, though others might do as well.

Extending an Iterator in Rust

A common thing one has to do in Rust to leverage zero-cost abstractions and convenience is to extend types. By “extending” them I mean adding functionality (functions) to the type which make it more convenient to use and “improve” it for the domain at hand. From time to time, one needs to extend generic types, which is a difficult thing to do. Especially when it comes to iterators, where extending is often tricky.

musicmatzes veggie chilli

Because I get asked a lot about the recipe of my veggi chili, I decided to write an blog article about it so I can link to this instead of explaining it again and again. This chilli is veggie (or even vegan, I’m not sure). I call it “Chilli” but I guess it is nowhere a real Chilli. Either way, it is delicious. Ingredients What you need: Red beans (I use canned beans, 400g/Can) Corn (half or a bit less than half the number of cans of beans, 400g/can) Carrots (if you like them a lot, but in 200-300g for each can of corn) Onions (one small one for each can of corn, maybe a bit less) Chilli (depending on how spicy you like it one or more) Cooking Oil Tomato paste (up to one tube) Red and/or yellow Paprika (optional) And, of course, water, a stove, a bit pot and knifes and so on.

Maybe it's time for a crates team

After reading another post in the users.rust-lang.org forum where a crate author is looking for a maintainer for his crate, I started thinking. Do we need a “crates-team” in the rust community? Incentive The Rust community has a lot of great teams. Each of these teams has a different goal: The Core team, for example is responsible for steering the design and development process, overseeing the introduction of new features, and ultimately making decisions for which there is no consensus […]

git-dit github import

So I started developing an importer for importing github issues into git-dit - the distributed issue tracker build on git. Turns out it works well, though some things are not yet implemented: Wrapping of text. This is difficult because quotations are wrapped, but the quotation character is not prepended to the new line - which results in broken format Importing only issues. Right now, PRs are imported … which is not exactly what we want.

Panorama Photography is hard

As the cautious reader might have noticed, I got myself into photography lately. Well, I’m by no means a professional, but it is a nice hobby and I get myself out into the nature (not right now, because weather really sucks here in south Germany right now, but in general) to take pictures. In the summer, during my trip to Iceland, I took a lot of pictures - and also panorama pictures.

2017 in Rust

Inspired by the Call for Community Blogposts I want to summarize my experiences and thoughts on Rust in 2017 and what I am excited about for 2018. Reflecting 2017 2017 was an amazing year for Rust. We got 8 releases of rust itself! We got basic procedural macros allowing custom derive (also known as “macros 1.1”) in the first release last year (1.15.0). This made serde 1.0 possible, if I’m not mistaken?