Monday, July 1, 2019

Happy Canada Day!

Saturday, January 5, 2019

Hello Vancouver

Good bye Montreal
Hello Vancouver

Saturday, March 17, 2018

New tab homepage and firefox 59

It looks firefox 59 has a nice feature to kindly disable newtab homepage add-on in favor of their cool bookmark page.
If it's not working check the add-on manager.

Monday, August 28, 2017


A friend of mine has opened an online shop.

Vancouver based Latvian Lifestyle Shop
Latvian Zakka* + Original Handcrafts

Check out their crafts here!

Saturday, July 1, 2017

Canada 150

Happy Canada day!
Joyeuse FĂȘte du Canada!

Wednesday, March 25, 2015


Real example here.

Sunday, September 28, 2014

Kd-tree implementation

 I have implemented my own kd-tree library based on Accelerating kd-tree searches for all k -nearest neighbours (pdf), compared the result with ANN to confirm that it outputs the correct result. It was surprising my implementation was several hundred times faster (below graph, for the same queries, ANN gets 14728 samples while my code gets 15). I still doubt if there's something wrong with my code or profiling because it's too fast even after considering the fact that my kd-tree is specialized in finding nearest *one* point and uses Eigen::Vector4f for SSE optimisation.

 I tested several sampling profiler: perf, gperftools, oprofile, codeXL.  It took some time for me to get the correct call graph. Many profilers output a call graph where malloc/new has no parent, probably because libstdc++ is not compiled with no-omit-frame-pointer and cannot find the caller function. Newer profilers such as recent perf and gperftools can handle it correctly. I couldn't though find a way to make perf report's "-G" option work when I took a profile with

perf record -call-graph dwarf ...

so I used gperftools for it (above graph). It still took a while until I found pprof's 'callgrind' option (kcachegrind) could not output the result correctly. 'web' worked fine.