Iowa County Sunset

January 25, 2021

Iowa County Sunset

A late sunset shot taken when out for an early evening walk with The Queen Of All She Surveys.

Continue reading →

Iowa County Sunset

January 21, 2021

Iowa County Sunset

A delightful side-effect of driving a school bus is that I am often out and about during sunrises and sunsets and if I am at a safe point to stop, then I can quickly and easily capture a picture. This picture was even more safe than many because I had returned to the depot and parked my bus.

Continue reading →

Quote: Heinlein - Specialization is for Insects

January 18, 2021

I had used this quote in Wash, Cook, Clean and Iron, but thought that it deserved to also be available in it's own right.

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

Robert A. Heinlein

Continue reading →

Cover Song - I'll Fly Away by Rev. Gary Davis

January 17, 2021

A blue's rendition of I'll Fly Away by Rev. Gary Davis. It's awesome. You need to listen to it.

Continue reading →

Learning Clojure - Implementing cat

January 16, 2021

As I wrote previously, I am learning the Clojure programming language as one of my personal Learning Projects.

Previously, I presented my implementations of echo, the classic Unix command-line utility. Next on the list is cat, a useful utility for writing information out to the screen from a file or the standard input. Well, technically it writes to the standard output, but the default destination for the standard output is the screen, so it works out the same in the end.

Now, let's take a look at the code:

(ns cat.core
  (:gen-class))

(use 'clojure.java.io)

(defn readAndPrintFile [name]
  (with-open [rdr (reader name)]
    (doseq [line (line-seq rdr)]
      (println line))))

(defn readAndPrintStdin []
  (doseq [ln (line-seq (java.io.BufferedReader. *in*))]
    (println ln)))

(defn -main
  "Simple implementation of the Unix cat utility."
  [& args]
  (if (= (count args) 0)
    (readAndPrintStdin)
    (doseq [a args]
      (readAndPrintFile a))))
Continue reading →