Brad Lucas

Programming, Clojure and other interests

Reading Files In Clojure – Part 1

February 20, 2012

There are a few ways to read files in Clojure.


If you want to simply read a small file into a string then you can use slurp. This function works with local files as well as URLs.

An example:

Continue reading →

S3cp Now On Github

February 8, 2012

To make it easier for others to work on I've moved my most popular open source project to GitHub.

Already, I've had one pull request with some fixes to allow s3cp to run under Windows more easily.

See the project at

Continue reading →

Debugging S3 Authorization Issue

May 24, 2011

Recently found an issue with some code running against Amazon’s S3 service. All of a sudden the application, s3cp, was not working as part of our downloader service. The app has been working flawlessly for over a year and suddenly stopped working.

As I tried to debug it I found that the system worked fine locally but not on the server. It was giving an error message around not being able to find one of my accounts buckets. That was odd. First I tried updating the jets3t library used underneath to communicate with S3. The I noticed the server’s Java as bit old but still 1.6. After upgrading both of these still no go.

After taking a break from this I turned on debugging and saw that the authorization interaction with Amazon was returning a 403 error.

To make a long day’s session short for others here is the punch line. Turned out the server’s date was off and Amazon will reject the call if it is too far from the correct time. After setting the servers date and time to the proper value my issue went away.

Continue reading →

Error NT_STATUS_BAD_NETWORK_NAME printing from Mac to Linux Printer

May 11, 2011

Just fixed. Was getting


when printing from my Mac to a printer hanging off a Ubuntu machine.

Having recently upgraded Ubuntu that was probably the culprit.

Continue reading →

Blog up and running

February 22, 2011

Getting the blog up and running after a long hiatus

Continue reading →