Parsing custom datetime format in Rust using serde

Most of the date and time related crates like time or chrono already implement serde traits making date or datetime parsing quite easy. This applies just if the format is standard, but what happens if the format is not standard? Let’s say we want to parse datetime looking like this 2021-10-24T07:48:26.389646Z. There is no timezone information so I decided to try the PrimitiveDateTime type from time crate. I didn’t consider using chrono at the moment because of the RUSTSEC-2020-0159 problem....

2021-10-24 · 2 min · Boban Acimovic

Running stack of microservices using docker-compose and acim/go-reflex image

Go is very attractive language for microservices’ development, but using acim/go-reflex image and docker-compose you can run multiple microservices including your gateway on your local machine. This image can run virtually any Go server based application and also reacts on changes in the code and recompiles the binary on the fly. If you want to debug your microservices’ stack or develop a new feature where you have to touch multiple services, this is very good tool to do so....

2021-10-23 · 3 min · Boban Acimovic

Parsing JSON in Rust easily explained

Parsing JSON in a proper way requires representing the JSON data in a structured format so that the language can find out which fields have to be parsed and which type they are. The Rust way of representing the structured data are so called structs . We could make appropriate structs manually, but thanks to the great online converter, transform.tools , we can generate the structs very easily. In this article we will parse data from songsterr....

2021-10-20 · 7 min · Boban Acimovic

Firefox audio crackling and popping on Linux Mint

This problem was bugging me for quite a while and today I finally decided to address it. There are lot of advices online to try to run Firefox in safe mode and see if that fixes the problem, so I tried that first but it didn’t help. Safe mode actually just turns off extensions, but in my case it didn’t help. I found out that the easiest way to reproduce the problem was to run YouTube video in one window and after that open another window with eBay....

2021-10-02 · 2 min · Boban Acimovic

VSCode setup for Go developers

According to lot of online polls, Visual Studio Code is the most popular IDE among Go developers. You can start Go development immediately after installing Go extension for VSCode, but some tuning may make your life easier. First of all, you may want to format the source code and reorganize imports automatically on each file save or code paste. In order to do so, put the following JSON snippet in your settings....

2021-03-16 · 2 min · Boban Acimovic