« January 2010 | Main | March 2010 »
Posted at 01:39 PM in Photos | Permalink | Comments (0)
Reblog |
Very cool presentation!
Posted at 12:46 AM in Clojure | Permalink | Comments (0)
Reblog |
So, first, care. Then, as you’ll happily and unavoidably discover, all that “focus” business has a peculiar way of taking care of itself.
Posted at 09:29 AM in Life | Permalink | Comments (0)
Reblog |
Posted at 09:21 AM in Photos | Permalink | Comments (0)
Reblog |
I'm not using the 1.1 features yet but I was planning on it. During the upgrade to clojure 1.1, I broke my emacs, slime and clojure setup. That's a good thing since the process has simplified since the last time I did it.
Here's what I did on my Mac (running Leopard). Git is a requirement. I installed mine through MacPorts.
First, I got myself an emacs starter kit. Since I'm using aquamacs, I went with an aquamacs variant of the starter kit. Aquamacs Emacs Starter Kit vs Emacs Starter Kit. Follow the instructions for installing the appropriate emacs starter kit. It should look something like this:
In this process I learnt a little about Aquamacs. The dot emacs file aka ~/.emacs are read after the preferences that are under ~/Library/Preferences/Aquamacs Emacs. Since I mostly used Aquamacs for hacking clojure, I didn't care and nuked all my emacs preferences. Your mileage may vary. Afterward your Preferences.el file should look like this:
Restart Aquamacs to ensure the new preferences get taken.
One of the important things the Emacs Starter Kit installs is the package manager for emacs (aka elpa). I used elpa to install the swank-clojure package. The starter kit also defaults Aquamacs to green text on a black background (changing that is left as an exercise to the reader).
You don't need to but I wanted to check out the packages available to be installed. The M key below is the meta key which on my Mac is bound to the Option and Esc key. Your key bindings might be set up differently but I would try the Option or Esc key to start with.
This is what the package list looks like.
To install a package, I used the package-install command.
You'll be prompted for the package to install.
You'll see some text scrolling by in a buffer. It looks like various emacs lisp files are being compiled. I got some errors. I ignored them. It seemed alright.
Once swank-clojure is installed, it's time to install clojure. To do this, I started up slime.
You'll get prompted about clojure not being installed. You want to say yes here.
You'll see some status messages about clojure getting installed. For reference purposes, this process installs clojure, contrib and swank clojure jars in ~/.swank-clojure
Once that's completed, restart Aquamacs and type 'M-x slime'. You should now be ready to hack clojure code.
If you need a custom classpath, you'll need to set the swank-clojure-classpath variable. I created a directory containing all my jar files (in ~/.emacs.d/clojure) and have all the jar files there available in my slime session. To do this, my ~/.emacs file contains the following lines:
(setq swank-clojure-classpath
(append
(directory-files "~/.swank-clojure" t ".jar$")
(directory-files "~/.emacs.d/clojure" t ".jar$")))
This approach of globbing jar files together is simple and pretty effective. Alternatively, leiningren appears to be the new hotness in terms of managing clojure dependancies. It's something I'll look at in the future.
Posted at 10:37 PM in Clojure, Programming | Permalink | Comments (0)
Reblog |
A couple of months ago, I started researching putting a homemade CCTV system on the cheap. I picked up a D-Link DCS920 Wireless-G Internet Camera to use as the initial prototype camera since it was the cheapest wireless camera I found.
The first approach I took was to setup an Ubuntu 9.10 box and install ZoneMinder. Ubuntu 9.10 has the ZoneMinder packages in the repository so installing it was not hard. There were some additional steps that I found here to get it up and running. On a scale of 1-10, getting ZoneMinder to run was a 6.5.
The trouble I faced was configuring cameras once ZoneMinder was running. ZoneMinder is a full featured application and multitude of configuration options was intimidating. I got it to run in a motion detection mode (where it will capture moving objects in the video stream) but was not satisfied with how fast it was capturing video. This was probably no fault of the software. The Ubuntu box was older box and may not have been able to keep up.
At this point, I was going to put this project on the backburner until I read a post on lifehacker. The Mac Mini that we use as our media server sits idle for parts of the day when we want a CCTV system in place. Thus there was no additional hardware costs. The resultant performance of the video capture with the Mac Mini was also leads me to believe that the Ubuntu box was too slow. The AMD CPU on the Ubuntu box is a couple of generations old where the Mac Mini has a more modern Core 2 Duo.
One nice feature of Vitamin D was the streamlined camera configuration process. It was able to auto detect the DCS920 wireless camera on our network and after clicking the "Continue" button a couple of times, we were ready to go.
By default, it records everything to the hard disk. It was straightforward to configure sending images of people to my email account.
The starter edition is free and so it fits perfectly into our budget. In the future, we might add additional cameras to our system (they have a compatibility list!) and upgrade to one of their more full featured editions.
Posted at 09:11 PM in Web/Tech | Permalink | Comments (0)
Reblog |
We were doing a trial deploy of our brand new java service to the production host yesterday. The service had started up everywhere else so far
Of course it didn't start up on this production host. In the logs was a stack trace that included this error message:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:broker'.
What caused this problem? This production host was firewalling off connections to activemq.apache.org. This host was serving a XSD file which was required to validate the XML namespace we have used.
I'm thinking WTF! Seriously? Why wasn't the XSD file deployed with jars?
The simplest solution/workaround was to take http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd and make it http://activemq.apache.org/schema/core/activemq-core.xsd in our XML file. When validating the XML file, it'll use a version of the file available within the activemq jars.
Dropping the version causes Eclipse to complain but that's another problem (and another google search).
Posted at 11:03 PM in Programming | Permalink | Comments (2)
Reblog |
Had this little snippet of code lying around my directory.
Didn't know what to do with it. It was somewhat useful. We were trying to compile unit tests written in jython for our java code. The jythonc tool had gone away in jython 2.5 but an ant task (JythoncAntTask) in 2.5 still did that. I did a little bit of code spelunking and extracted the code snippet seen above. I don't know the reasons for removal of jythonc but I suspect this usage is not generally supported by the jython maintainers. Please don't complain if this doesn't work for you. We went with another approach for getting our jython unit test to run.
One should be able to compile it from the command line. You'll need the jython.jar to compile it. To run this against a jython script, I threw together a little shell script.
This post was also a little experiment in embedding code samples into my blog posts. The trick is the script tags provided by gist do not work with the preview/rich text mode provided by typepad. They only work after the blog entry has been published. Other than this little gotcha, Gist is a nice tool for collecting code snippets.
Posted at 10:44 PM in Java, Jython, Programming | Permalink | Comments (0)
Reblog |
Published: February 1, 2010 Obama’s 2011 Budget Proposal: How It’s SpentRectangles in the chart are sized according to the amount of spending for that category. Color shows the change in spending from 2010.
via www.nytimes.com
Nice visualization of the budget. No surprise what makes up the biggest amount.
Posted at 08:26 PM in Current Affairs | Permalink | Comments (0)
Reblog |
