How Rust Can be A Good Thing

20160820_135602_richtonehdrLast September I saw this article about a programming language I hadn’t heard about before. That language was Rust. At the time, I played around with it a tiny bit but saw no real compelling reason for me to invest the time into learning another language. Then, earlier this week I saw this article on arXiv, and decided to give Rust another look. Continue reading “How Rust Can be A Good Thing”

Installing Nvidia’s CUDA 8.0 on Fedora 25

UPDATE (March 28, 2017): I have found a way to use at least some of the C++11 features. See the end of the post for the changes.

It’s been a long time since I’ve posted anything. Since my last post I had to update the operating system on my work desktop as Fedora 23 went end-of-life. While it is possible to simply use dnf to upgrade your system, I have the proprietary Nvidia driver installed on my system for two reason. First, with my graphics cards (GeForce GTX 650’s), the Nouveau driver doesn’t seem to really work. Without fail, after about 30 minutes the screen no longer refreshes, making it seem as though the system is locked up. Second, I do some GPU programming with CUDA which requires the proprietary driver. With the proprietary driver installed, it’s a bit more difficult to upgrade, so I tend to just back everything up and do a clean install.

Having done that recently, I find myself this morning needing to re-install CUDA as I have a computational problem which could benefit from some massive parallelism. I figured I’d go ahead and post the procedure here for my future reference and in case anyone else might benefit from it. Continue reading “Installing Nvidia’s CUDA 8.0 on Fedora 25”

Things I’ve Learned About Programming

I may have previously mentioned how my days typically consist of programming. I have problems that I have to solve, I then have to think about how to solve them, then write some code to do just that. In my last post I mentioned how I was working on writing some MCMC code, and was finding it difficult to keep it very general so that it is highly reusable. Yesterday I got that code working and began doing so more intensive testing which revealed that there is another feature that I need to add, but it should only take a few minutes to do that thanks to the parameter file parsing library I’ve created. This got me thinking this morning about the things I’ve learned since I began programming, and I thought I’d share some of those as they may be useful to others. Continue reading “Things I’ve Learned About Programming”

It’s hard to write good code…

I’m sitting at my desk trying to write some very general Markov Chain Monte Carlo (MCMC) code. I’m aware that there are libraries out there which could be used, but when I investigated them they were all so difficult to use that it just made sense to write my own code. At that time, I just wrote some code that was very specific to one problem. Now, I’m trying to generalize that code to be applicable to any problem. That is where things get hard.  Continue reading “It’s hard to write good code…”

HARPPI: A HumAn Readable Parameter-file ParsIng library

Since becoming a post-doc, most of my days are spent writing code. I do the majority of my programming in C++, because as a compiled language, the compiler is able to make many optimizations to ensure that even my poorly written scientist code is reasonably fast. As is often the case, there are times I would like to change some values then re-run some code, and it is nice to not have to recompile each time you want to make a small change to some number, or change an input or output file name. Because of this, you want to have your code use parameter files which are read and parsed every time you start the code. Continue reading “HARPPI: A HumAn Readable Parameter-file ParsIng library”