The Pittsburgh List

A life full of activity is a fulfilling one. So the saying doesn't go. I made it up. And now that I have a car in the City of Steel I can fill my days with activities beyond food festivals and coffee shops. Here is a list of adventures now …

more ...

Debugging concurrent requests, for simple cases

This is a simple strategy for confirming that some values are shared between requests. There must be a more 'correct' way to inspect values in concurrent requests, but I was unable to find it. I normally use a debugger to set breakpoints, but there was no way to set a …

more ...

Chaco Canyon

I'm writing this post several months from when I visited Chaco Canyon. I visited Chaco Canyon in the first week of February on my drive up from Albuquerque to Monitcello. This was a beautiful drive.

I was listening to Brave New World as I passed valley and mountain. It just …

more ...

Prolog Exercise: A Min and Max predicate in CLPFD

Yesterday I implemented a predicate to compute the min and max of a list. Today I'm doing the same, but now with constraints.

The code looks pretty much the same thanks to the handy min and max constraints.

:- use_module(library(clpfd)).

min_and_max([V], A, B) :-
    V #= A, V #= B.
min_and_max …
more ...

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 …
more ...

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 …

more ...

Redwoods

Here are some photos from Redwoods National and State Parks, an hour and a half north of Eureka, CA.

more ...

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 …

more ...

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 …

more ...

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 …

more ...