It’s been a while since I’ve posted. Busy winter break, and just now getting to a place where where I’m on top of things in the new semester. Yesterday, I wanted to get two things done (aside from real work):

1. Find some professional Math mailing lists to join.
2. Get posting on my blog again, and maybe even work on some of the design elements.

# Mailing Lists

So, I’m trying to learn to code. Aside from one semester of qBASIC in high school and one semester of Javascript in undergrad, I have no formal experience with programming, but I know I can learn and I want to demonstrate it. The languages I want to start out with are Haskell and C (I know, I’m a glutton for punishment).

So… any simple task, such as googling Math mailing lists, becomes a beginning programming homework exercise.

I found that I wanted to try about 60 different search phrases, and I found that they all had the same basic form:

I could make a double-nested loop in C… But this is the perfect time to use Haskell list comprehension! So, I made my first ever Haskell program:

Compiling gives an executable called search_terms. search_terms returns one search phrase per line (wrapped in quotes for some reason) which I could output to a plain text file and then copy and paste each line into Google. But why would I go to all that work if I could automate it in Bash!

A while ago, I made a crappy little Bash script that lets me google things from the command line. Here’s an abridged version:

Example: web_search.sh -w "hello world" will search Wikipedia with the search term “hello world”. It’s a little buggy: I’d like to be able to not wrap the search term in quotes, but that breaks it. However, search_terms returns strings pre-wrapped in quotes. Prefect!

Now, I just have to loop over the lines of search_terms’s output.

This will open 60 browser windows, each one with a different search phrase.
That was fun!

# Blogging

It’s been a while since I’ve edited this blog, so I had to relearn some Jekyll basics. In particular, jekyll build and jekyll serve don’t work the way I expected them to. jekyll build spits out a version error, in fact.

After some frustration and googling, I relearned that I needed to use Bundler to instance my Ruby environment. This will keep the versions of Ruby and Jekyll I’m using to build my site synchronized with the versions that GitHub Pages is using to build my site. A few of the common commands are recorded below, mostly so I can come back here two months from now when I’ve forgotten everything again:

1. Keep Bundler, Jekyll, and Ruby up to date.
1. Build site.
1. Run local development server.

Okay, now that that’s recorded for posterity, my next project involves some custom Jekyll plugins that GitHub Pages doesn’t support. In order to use them, I’ll need to turn off server-side Jekyll, build my site locally, and push the built site up to GitHub Pages. That’s a project for another day (read: another month).