Posts

Screen magic possible only on Linux

Recently xssfox posted that xrandr is able to do incredible things, for example render the image diagonally on the screen.


What if you could do the same, but automatically, in real time?


What have I just seen


You saw a computer monitor on a pivot that levels the displayed output when the monitor is turned. It's not much different than what smartphones do when set to alternate between the portrait …

Read more...

Dragit goes to production!

Dragit logo


Quite recently Dragit, the local file sharing app written in Rust, GTK and libp2p, was positively reviewed and joined Flathub. On that occasion let's see what is Dragit and why it can be a useful tool.


What is Dragit and why one would use it


If you ever tried to send a file from one computer to another, perhaps you've noticed that this task is more …

Read more...

Gtk-rs: how to have mutable object in a closure?

In the previous post The Ulam spiral in Rust I described application that generates prime numbers spiral. I have chosen gtk-rs to write the user interface, because of the pretty good documentation and examples in the repository. If something is not documented there, you can easily check the original Gtk library written in C, which was a base for the Rust version. Also, I just like Gtk, no big story. …

Read more...

The Ulam spiral in Rust

I'd like to share some thoughts about a specific mathematical phenomenon related to the prime numbers and tiny piece of software to generate visual representation of it.

What is specific about prime numbers?

Prime numbers are special subset of natural numbers. A prime number (or a prime as we'll call them) can be divided by 1 or by itself only, leaving no remainder. This simple definition is what most people …

Read more...

LEGO Mindstorms infrared mapper robot

For the long time I was curious about the LEGO Mindstorms EV3 set, because it's the low entry toolkit for beginning your journey with robotics. What I didn't know is that Mindstorms contains ARM-based computer device, which can run Linux without any complications and make your own experiments with servo motors and sensors.

I decided to build a robot that is capable of driving around and making 2D scan map …

Read more...

Kafka messages are eternal

Kafka is wonderful tool for building event driven systems and it's becoming more and more popular every year. Many companies use Kafka as just message bus, but some use Kafka as source-of-truth for event sourced platforms.

If you are playing with event sourcing, there is a good chance that you have topics that have very long retention time - maybe months or more. It means that the message once pushed …

Read more...

Implementing Huffman algorithm in Rust 🤔

Well, in the beginning I have to confess that I thought that this task will be easy enough to complete it within few hours max. It turned out that I spent a way more. Really a lot. Enough to say that I discovered what is all this hassle with "fighting borrow checker" about.

What was my goal?

My goal was to implement Huffman coding algorithm as in this example: https://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.html …

Read more...

Thougths about HTTP status codes for REST API

Recently I've been working on an API based system, which used HTTP as protocol for communication. It's nothing really unusual, everyone use it, because it has a lot of beneficial features and it's quite mature.

Yet when applying HTTP for purpose of API calls in frontend-backend or backend-backend calls you face some fundamental (well, not so fundamental in the live-death sense, but still) questions.

405

What was the problem?

In my …

Read more...

How to organize tests in Rust?

rust

Recently I begun to play with Rust - a promising, multi paradigm programming language, that looks similar to C family at first glance, but turns out to be something way more interesting.

At the same time I was obsessed with TDD (test-driven development) methodology and wanted to write used it in a Rust project. However, I encountered some problems with organizing the test directories in my Rust. We'll be investigating …

Read more...

PAN Kreator bot

Now in english. ᕕ( ᐛ )ᕗ

Check what we have created on Hackaton Kulturalny in Warsaw!



Bonifacio portrait


PAN Kreator github

This is something that we made for our friends from PAN Biblioteka Gdańska (library of Gdańsk). It's an internet bot used to fish out some interesting things from library, analyze them using simple machine learning algorithm and publish to Twitter and Facebook.

Check them!

https://twitter.com/PAN_Kreator
https://www.facebook.com/pankreatorbot/

Read more...
more