How to use Diesel ORM in Rust

Diesel is a framework for Object Relational Mapping and Query Building. It’s goal is to get rid of alot of boilerplate code usually needed for interacting with a database. It should feel like Rust, so that the developer does not need to write SQL and instead can focus on coding. Great examples of SQL statements … [Read more…]

Extending C with Rust – 101

In this article I’m gonna show how to extend C code with a function written in Rust. For the sake of simplicity, let’s do it by writing a simple “hello world!”. Setup Initialize a new project with Cargo. I’m gonna call this one crust: cargo new crust Edit your Cargo.toml to make it look like … [Read more…]

My 5 Stock Picks for 2018

This is not a financial advice. It’s just me mumbling about my picks for the next year and writing them down, so that somebody can come and say “yeah, rememba when tesla stock?” and laugh at me. So without further due.. 1. ADVANCED MICRO DEVICES, INC. (AMD) 2016 EOY Price: 11,34$ Current price: 11,38$ AMD’s … [Read more…]

Calculate average color of an image in Rust

The easiest thing to do with images is to calculate their average color. Every color can be created by combining together so called primary colors – red, green and blue (RGB). RGB is a mathematical model for representing colors as a tuple of numbers. Many computer vision tasks use greyscale (a one dimensional representation of … [Read more…]

Writing simple addon for The Elder Scrolls Online

Intro World of Warcraft, The Elder Scrolls Online and many other games allow users to write scripts to modify and extend the user interface of the game. This is allowed, because the underlying logic is not being changed nor abused. Abusing the underlying logic would be cheating (if you want more about this, check one … [Read more…]