How I Work: Killer Libraries

Most successful langauges have a “killer” features that motivates In my previous post, I commented on the tools that I use for software development, but I didn’t talk about either the process of choosing a language or the libraries within a language that I use most frequently. This post expands on how I work within a language and specific “killer” libraries that I use most and how they compare to facililties that I know from other languages....

April 24, 2023 · 12 min · 2368 words · Robert Underwood

Refactoring CI/CD for a Moderately Large C++ Code Base

CI/CD is a critical, but difficult to get right part of software engineering. You often want to test multiple distributions, multiple compilers on each commit, and you want that to be as fast as reasonably possible. This gets more complicated when you have large dependency trees that you want to remain consistent. Recently, I adapted the CI/CD system for a project that I maintain LibPressio to use Dagger – a programmatic way to do CI/CD portable-ally across runner environments which made it easier to run our tests and verify correctness....

April 24, 2023 · 8 min · 1571 words · Robert Underwood

How I work: The Tools I Use

From time to time I get a question of what tools I use for what jobs. Here the tools I use to get things done: Language Specific Purpose C++ Python Julia Rust Compiler/Interpeter gcc/clang python:quick,ipython:long julia rustc,cargo Profiler perf/FlameGraphs + perftrace cprofile:function, line_profiler:line BenchmarkTools.jl cargo Debugger GDB + mpigdb *c++, pdb *c++ Debugger.jl:default,Cathulu.jl:metaprogramming *c++ rust-gdb Build System CMake,(meson, bazel) + m ?...

March 14, 2023 · 5 min · 877 words · Robert Underwood

External Clang-Tidy Modules! C++ Refactoring for the Common Project

Clang style refactoring has been something I’ve been admiring from afar for quite a while now. However for a user to actually use it, it has previously required forking llvm to be able to use it in a reasonable fashion because of things like the hack in clang used to locate the resource directory or other fragile hacks like LD_PRELOAD. Recently, the Clang/LLVM developers vastly improved the situation by allowing loadable clang-tidy modules and by installing all of the headers that you actually need to do something with clang tidy, and they are finally packaged on both Fedora and Ubuntu!...

March 10, 2023 · 2 min · 320 words · Robert Underwood

Refactoring With Clang Query

Have you ever wanted to identify a list of files that would need modifications to adopt a new API? Clang-Query can make this much easier. I recently wanted to introduce a set of helper functions to simplfy an aspect of compressor configuation in LibPressio. But first, I needed to know what modules were effected. Clang-query needs a compilation database which can be produced by tools such as bear (if you have a Autotools or Makefile based project) or more sophisticated build systems such as cmake, meson or bazel....

December 28, 2022 · 2 min · 289 words · Robert Underwood

Three Neat Things I Did With Julia

In the past, I’ve written pretty glowingly about Julia. It’s been a few years since I first used Julia in 2019, and it hasn’t completely replaced Python for me. However, I wanted to share a few neat projects that I’ve done using it which would have been much more painful without it, and share what I think now about what I wrote in 2019. Implementing a Statistical Metric on the GPU Being able to access heterogenous compute is important to be able to make the most of the availible hardware....

December 15, 2022 · 6 min · 1111 words · Robert Underwood

Learning to Learn: CMake

CMake is the de-facto C++ build system used by an overwhelming number of C++ projects. Even if you personally favor more modern alternatives such as Meson, Bazel, or Pants, if you ever pull in a 3rd party dependency, there is a good chance that it uses CMake so knowing enough about CMake to understand it is worth knowing. How to get started I recommend new users to CMake start with the following resources:...

November 15, 2022 · 5 min · 999 words · Robert Underwood

Thoughts on Dependencies for Scientific Software

Modern software does not exist in a vacuum, developers always rely on other developers or engineers to provide aspects of their systems. Even if you write hello world in your programming language of your choice you likely still depend on the standard library from your language. Even if you were to write hello world in the raw binary format of your assembly language, you still depend on the operating system. Even if you wrote your own uni-kernel to produce hello world on the console, you likely rely on vendor provided firmware to initialize the program or memory....

July 20, 2022 · 12 min · 2489 words · Robert Underwood

Spack: a Truly Useful Package Manager

So you are developing software, and you need the software to build for multiple difference machines, with different version of a library, or with just different compile time options. You can probably manage this by hand, but it very quickly gets out of hand. Spack is a package manager designed for high performance computing, but I would argue is more broadly useful for five reasons: It is explicitly designed to run as an unprivileged user....

August 27, 2020 · 5 min · 856 words · Robert Underwood

Julia: Could There be One Language?

There is a constant problem with programming language design: fast, generic, easy to write; pick two. The principle is that programming languages cannot be all three at once. Code that is Fast and Generic like C++ isn’t exactly easy to write. Code that is Generic and easy to write like Python isn’t always fast in the sense that C/C++ programmers mean it. Code that is Fast and Easy to Write isn’t always Generic in the sense that Python is....

April 4, 2019 · 10 min · 1922 words · Robert Underwood