Adding Empty Lines in Vim: Redux
Why I Chose Ruby over Python
This year I spent a bit of time playing with Python, after having mostly ignored it since 2005 when I was learning it originally. I did like Python back then, but a few years afterwards I discovere...
Wayward Predicates in Ruby
Recently I’ve been wondering how to name Ruby methods that have predicate looking names (e.g. foo?), but don’t behave like predicates - namely they return other values besides the canonical true an...
How to Vim: Fixing Typos
Here’s another small Vim tip - how to deal with typos quickly. Generally, most people do something along those lines: enable :spell (the built-in spell-checking) use [s and ]s to move between...
How to Vim: Take Control of Split Positioning
One of my pet peeves with Vim is that by default the buffer splitting behaves a bit weird: horizontal splits (:split) appear on top vertical splits (:vsplit) appear on the left That’s exact...
Printing Data Structures in OCaml
One of the first things developers want to do in any language is print out the value of a variable. In languages with dynamic typing or extensive reflection, this is often a trivial, built-in opera...
Learning OCaml: Having Fun with the Fun Module
When I started to play with OCaml I was kind of surprised that there was no id (identity) function that was available out-of-box (in Stdlib module, that’s auto-opened). A quick search lead me to th...
Working with OCaml Records
Records are one of the most common and useful composite types in programming. They are equivalent to structs in many C-family languages and provide a way to group named fields together into a singl...
Learning OCaml: Numerical Type Conversions
Today I’m going to cover a very basic topic - conversions between OCaml’s primary numeric types int and float. I guess most of you are wondering if such a basic topic deserves a special treatment, ...