Python Generators - My Notes

Generators facilitate lazy evaluation in Python. They can be used to reduce computaional stress as well as memeory requirements. Python sucks a little bit less because of them.

Read More

nohup vs &

I’ve gotten a lot of questions in my time about firing off a long running process in an ssh session and having them stop after logging out. This is because every command you run in a bash sessions (via your local terminal or ssh) has an associated hangup signal. When you log out of the sessions (i.e. close your terminal or kill an ssh session), the shell will terminate all of the sub-commands associated. This can be problematic for people who want to log in, run a script to start a server, and log out.

Read More

Bashrc Vs. Bash Profile

Dotfiles are the greatest thing ever. They are the king of facilitating protable configuration. Both at start up and runtime. They can be very confusing if you don’t know what each one is for though.

Read More

Proper Web Servers in Clojure

Bad web application server setups can waste days of your life over even a short period of time. Taking some time to set up a proper work flow will improve your work flow and maybe even earn you a long weekend.

Read More

Another Useful If Macro

I’m working on a project now that requires a lot of lines like,

(let [c (get-coords :New-York)]
  (if (seq c)
    (connect-coords c)
    nil))

Unfortunately, I couldn’t really finagle the current if- macros, if-let and if-some, to work the way I need. I really liked the built in binding you get with those macros though, it’s very easy to read. So like any engineer, instead of just living with it, I dedicated a ridiculous amount of my time to learn how to fix it. It was abolutely worth it.

Read More

Clojure @

Of all the weird symbols in the clojure language, one of my favorites is @. Good ol’ deref. It’s necessary, but for reasons that weren’t intuitive to me.

Read More

Queues in Clojure

Without the idea of a first in, first out (FIFO) queue, maintaining order would be very difficult. Or maybe, it’s the other way around. Six to one, half a dozen to the other. Either way, FIFO is necessary.

Read More

An Introduction to Map, Filter, Reduce

Higher order functions are a powerful tool for functional programmers. The idea of higher order functions/functions as data has given rise to three especially useful functions. Enter map, filter, and reduce.

Read More