Root: CERN's scientific data analysis framework for C++
I&#x27;m a PhD student in physics, working on CAST [1], a small experiment at CERN. That fortunately means I don&#x27;t depend on other peoples&#x27; code too much.<p>With the C++ interpreter of ROOT you can run so called ROOT macros. They are basically just C++ files containing your code at top level in pair of `{}`. The &quot;funny&quot; thing is half the time you run a piece of code it&#x27;ll work the first time. But then running it again will cause the interpreter to segfault, due to the mess of global state and the half baked memory management of ROOT.<p>And don&#x27;t get me started on the usability of the ROOT classes. A huge amount of stuff is string based, so throw away your type checking guarantees. I mean why bother...<p>Since I really didn&#x27;t want to continue working with ROOT for my PhD (after having used it before), I decided to ditch the previous data analysis code and start from scratch [2].
I decided to use Nim for it, because it provides me with a powerful language (on par with python for my purposes - aside from admittedly certain libraries, which I had to wrap), yet still being as fast as the old ROOT code (in fact faster for my data analysis, but the comparison is problematic).<p>Yeah, it cost me a lot of time to get &quot;back to where I started&quot;, the code itself might also not be a shining example of perfection, but I learned a huge amount about programming and I understand every piece of it. It was totally worth it. The gains in efficiency thanks to Nim and due to the fact I know the codebase means I make up a lot of the lost time anyways.<p>So to any people out there who may be in a similar position, don&#x27;t be afraid to throw out what you don&#x27;t like. :)<p>[1] <a href="https:&#x2F;&#x2F;home.cern&#x2F;science&#x2F;experiments&#x2F;cast" rel="nofollow">https:&#x2F;&#x2F;home.cern&#x2F;science&#x2F;experiments&#x2F;cast</a>
[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;Vindaar&#x2F;TimepixAnalysis" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Vindaar&#x2F;TimepixAnalysis</a>