Installing Mono 5.2 on Ubuntu 17.04

Just a quick post to fill a gap on the Internet that was frustrating me, and which hopefully someone will find helpful as well. I don’t customarily work in Linux these days, but needed to set up a small Ubuntu 17.04 VM for some stuff I’m testing with F#. Since I wanted that fully working, I was trying to install Mono based on the download page instructions and was dismayed to find there were no instructions there for Ubuntu 17.04, and extensive Googling didn’t turn up anything.

After asking briefly in the Mono chat - where, I’ll add, folks were super helpful with a slightly stupid question - they informed me that everything past 16.04 should, currently, be able to use the 16.04 repositories and install instructions. I tested this out, they were right.

So, if you’ve been looking all over the place trying to figure that one out… there you go. Note that this may or may not change when Ubuntu 17.10 drops later this month.

Org Mode Rendering Test

I generally enjoy using Emacs, but have been mainly using Visual Studio Code for blogging since it supports syntax highlighting in fenced markdown code blocks without making me jump through annoying hoops. That said, I find certain editor tasks easier when I’m using Emacs, particularly with my evil-mode keybindings and extensions, not to mention being able to use magit for managing the repository. Accordingly, trying to figure out a way to get this working in Emacs has been something I’d been poking at off and on.

There’s mmm-mode but I found it more than a bit flaky and difficult to use.

After doing some digging, I found there’s an org-mode renderer for Hexo, the blog engine I use to generate this site. There’s also a really helpful post on getting everything set up, and that’s what I used for the model. Works great, correctly renders and highlights syntax blocks in org-mode, and lets me use the keybindings and git client I prefer… so I guess I’ll try punching out a few posts and see how I like working with it. The only downside I’ve found is I can’t seem to specify a filename for source code blocks, but it’s a limitation I can live with for now.

Update: I ended up ripping this out, for various reasons. Mostly that it’s easier to get things formatted the way I want in Markdown using Visual Studio Code, and the Markdown fenced code blocks functionality in Hexo allows you to specify filenames for a code block as well. Sometimes it’s the little things. :)

Flattening a List

Getting back to writing articles after spending the better part of a month fighting off a sinus infection and helping my wife get over a nasty cold. Normally I love northeast Ohio, but I’m so over winter right now.

I read a post a month or so ago asking why it’s so difficult for programmers to write code to flatten a list… so naturally, this got me thinking about it and I wanted to tackle it. To start with, let’s try tackling it in Javascript.

Read More

Parsing Bank Transactions with ramda.js

Recently, I’d wanted to sort through a bunch of transaction data from my bank to figure out what our spending trends were in a couple of areas. I suppose I could’ve done this quite effectively with Excel or Apple Numbers, but then I said, hey, that’s boring. :) I’ve been doing a lot of documentation and research stuff at work lately and really wanted to get my hands on a little toy project for a change of pace.

That said, I didn’t want to spend too much time getting bogged down in stuff, so I decided to do it with node.js; node 7.6.0 was released recently and has native async/await, so it seemed like a great choice for a couple hours of hacking.

Read More

Hello Hexo

Finally decided to get off of the Wordpress train here and move my blog over to a static site generator. After looking at a couple of different options, I decided to give Hexo a try and see how it worked out. Fairly happy with it so far - it seems to have very sensible defaults out of the box.

Could’ve gone with Middleman (used it on professional projects in the past) or Hugo, but I wanted to go with something a little different and something that didn’t require me to install Pygments to get working syntax highlighting. It’s a perfectly fine package to work with, but I currently do little or no Python and didn’t really feel like taking the time to get pip set up to install Pygments properly. Laziness is sometimes a virtue. :)

Installing a list of extensions in Visual Studio Code

I’ve been setting up a new OS X installation and wanted to quickly get Visual Studio Code set back up. Atom has a really handy command line utility, apm, that lets you do useful things like export a list of extensions and reinstall them elsewhere by passing in that list as a command line argument.

Unfortunately, while Visual Studio Code’s command line utility allows you to get a list of extensions with code --list-extensions which you can pipe into a text file, it doesn’t appear to have any way to automatically install the extensions to that file.

Fortunately, a minute with Google and Stack Overflow turns up this very helpful answer to run a command for each line in a text file. From there, some quick trial and error got me to this:

while read in; do code --install-extension "$in"; done < ~/vscode-extensions.txt

Not quite as convenient as Atom’s solution, but a nice way to make sure you don’t overlook anything.