Bryan's Blog

Bearded Code Warrior


I’ve been on-edge recently. The reason is because about two weeks ago Tecumseh got more water in one night than we typically do in an entire month. By about a factor of 2. Suffice to say my basement, though mostly unfinished, was ruined. I lost my office, as well as every major appliance that my wife and I owned. We can repair the furnace, but we lost our hot water tank, our washer and dryer, freezer and fridge.

Parsing JSON With Perl 6

Aside from my usual meanderings about in C++ land I’ve been playing with Perl 6. I used to use Perl 5 back in the day, so I’m not totally lost when it comes to sprinkling sigils around everywhere in my code. From first impressions, however, Perl 6 really does feel like a much cleaner, more consistent language than its older sister. It’s raining tonight in Windsor, Ontario (across from Detroit, Michigan for those of you who don’t know your Canadian geography), and I thought it would be a nice evening to build a program that interfaces with the Weather Underground Developer API.

Some Thoughts

I’m sitting here in my back yard on vacation from work (which means I’m actually quite busy working on other, non-work related projects, such as those for my PhD), just had my coffee, and I’m listening to some of the local wildlife chirp away. It makes me feel that I really need more of this in my life. I’ve blogged before about programming outdoors, but I think I really need to work toward cultivating a career where I actually can spend a good chunk of my time outside.

Creating New Blog Posts in Emacs

I use the Emacs thermonuclear word processor for everything in my life that has to do with editing text. It’s extensibility is unmatched by any other editor out there; if there’s a feature missing that would make your life easier, then pop open the hood and add it! While it’s not the prettiest language to work with, Emacs Lisp (or elisp) is a pretty straight forward, yet deeply powerful extension language.

Simulating Coin Flips in C++

Occasionally I have to generate random numbers in C++, and since C++11 was published the langauge now has a massively powerful, flexible library for generating quality random numbers. The only issue is that for the life of me I cannot remember the API. This would probably not be a problem if I used it more frequently, but anyways, this blog post is a reminder for me of how to generate a uniform distribution.

Burnt Out

Today I have homework to complete housework to start chores to complete a hyper puppy to placate Sigh.

Lighthouse Lemonade

I normally don’t do endorsement-type posts, but I just have to share this, even if just with my future self. Lighthouse Lemonade (site here) is the best damn Summer drink I’ve ever had. It comes in a bottle, and you mix in a bit of the stuff with water. The result is delicious lemonade that’s not too sugary, and not too lemony, but absolutely refreshing. I urge you to buy a bottle if you ever come across it during your travels.

Batch File Renaming The Lazy Way

When I first converted my blog over to hugo from hakyll, I neglected to put the date published onto the front of the blog posts file names. This resulted in URLs that were slightly less descriptive than desired, and also made it harder to scan through the markdown files quickly. Luckily in each file is a header, and within each header is a date field. Therefore, with my rusty old bash trickery I was able to spit out the following one-liner to do the job of renaming all the files.

End of Vacation 2016

It’s Sunday, the first of May, and I’m wrapping up my week-long vacation from work. It was nice to be out of the office for a few days, but with the amount of work I got caught up on for school, I still feel like I need a vacation. The positive side of this work-cation is that I no longer feel like I’m drowning in work, as I’m pretty much caught up with everything I need to do.