February 25, 2018

Concurrency made easy(easier) with coroutines

Coroutines can be looked at as lightweight threads that enables us to write simple concurrent code in kotlin. It enables us to execute concurrent code without much effort and write async code in a sequential style, hiding the noise introduced by explicitly handling async events and callbacks. The result is readable, high-performant code. Instead of the dealing with callbacks and synchronisation, the developer can focus on real, value-adding code and let the runtime handle callbacks transparently. ... Read more

February 23, 2018

Using griblib for Meteorology

Griblib is a library written in go to read grib2 files and do some filtering on the content. This post describes some details about how griblib is built and intended usage. GRIB2: a binary format for meteorology GRIB: G eneral R egularly-distributed I nformation in B inary form Grib2 is a binary file-format used to store forecasts and historical data. The content can be meteorological, space-weather, sea-conditions etc. In this post I will only focus on meteorological data. ... Read more

September 26, 2017

Converting an android project to kotlin

This is a small write-up of my experiences from converting a native android-app from java to kotlin. TLDR; Convert the project using android studio Handle nullability-compilation errors Android annotations build script apply lateinit on @ViewById Convert your data-objects into small classes, go for immutable classes Kotlin is cool, and immutability rocks. Bugs in android-studio shows that it is still early days for kotlin-development on android. Convert your project! ... Read more

July 3, 2017

Using your tensorflow model with go

This post will serve as a simple end-to-end example of how to use your own tensorflow-model to do inference in your go-application. You will need to train your own model with tensorflow in order to make it work properly. If you are doing inference in java (or any other language) the blogpost will still be useful since the principles are the same for languages with bindings to tensorflow. TLDR; Name your tensors and operations in the tensorflow graph before exporting the model. ... Read more

April 9, 2017

Comparing sizes of protobuf vs json

update: now comparing gzipped json vs gzipped protobuf Google Protobuffer is a binary format claiming to much more compact than json and other text-formats, but just how much less space does it require? Does it hold for large arrays of data? In this blogpost I will compare the sizes of the two formats. Test-data with array of tickers I will generate test-data with a home made tool, you can find it on github: https://github. ... Read more

March 14, 2017

Hello hugo on github.io

This blog is built using hugo. So my first blogpost is dedicated to how I set it up on github. installation install the bleeding edge hugo version by running go get -v github.com/spf13/hugo verify the installation by typing hugo -h this should display the help screen for hugo create hello world create blog hosted on github.io On github, create a repository “<yourusername>.github.io”, e.g. “nilsmagnus.github.io” . Clone the repo and cd into the directory. ... Read more

© Nils LarsgÃ¥rd 2017