Other articles


  1. Prolog exercise: Min and Max of a list

    As a fun exercise I implemented a predicate to calculate the minimum and maximum element of a list.

    min_and_max([A], A, A).
    min_and_max([H|R], N, X):-
        min_and_max(R, RN, RX),
        N is min(H, RN),
        X is max(H, RX).
    

    Next I wrote a version with last-call optimization.

    min_and_max_2 …
    read more
  2. One thing I miss from Mercury

    It's been a year since I've written any Mercury (the purely logic/functional programming language), but there's one feature I miss. It's nothing fancy, and certainly one of the less interesting features Mercury has to offer.

    The Problem

    To understand this particular feature let's look at where other languages fail …

    read more
  3. Driving to Flagstaff

    A storm rolled in before I left Apple Valley.

    One thing the West has that the East doesn't is independent drive-thru restaurants and beverage stands. Ever since New Mexico I've been seeing coffee trucks and smoothie wagons. I've also seen a good number of drive-thru Mexican restaurants. All of them …

    read more
  4. Kanab, UT (round 2)

    We headed out for a casual day of hiking in the Kanab region. We visited the Toadstools Hoodoos, the Belly of the Dragon, and Coral Pink Sand Dunes State Park.

    The first is a short hike, with just a few cool rock formations. I was really hoping for more of …

    read more
  5. Bryce Canyon, UT

    I traveled to Bryce Canyon the 21st of February. I don't have much to say right now so here are some photos.

    We went on a hike down into the canyon. It was pretty icy. Here you can see some wonderful colors between the red stone and the white snow …

    read more
  6. Kanab, UT

    Friday evening we stepped out to take in the foggy full-moon. I'm not one for superstition but the previous full moon claimed SOPHIE, this one was to claim its own victim, albeit mechanical. Unsuspecting, we spent a good half-hour watching the local cats play tag in the moonlight.

    Saturday

    The …

    read more
  7. White Sands, NM

    I woke up today in Carlsbad, NM. I was to drive west through the Lincoln national forest and across the Sacramento mountains. I began the day late since I was waiting for my Airbnb's dryer to finish its task.

    So I headed out to La Patrona to grab a breakfast …

    read more
  8. My Experience with Xonsh

    Since January I've been using Xonsh as my main shell on both my work and personal machines. In this post I will describe what I liked and what I didn't. TLDR; I liked that I found myself scripting more under Xonsh, but it can be slow and inconvenient as a …

    read more
  9. Page 1 / 7 »

social