This is Joe Gregorio's writings (archives), projects and status updates.

IPython and Curves

So I've been impressed with IPython so far, it can be a little fiddly to install, but given the power I'm not going to complain. I'm now working on graphics and in trying to get up to speed going back and learning, or relearning, some basics. Today was Bézier curves, and thus this IPython notebook. Note that the content there isn't actually educational, you should follow the links provided to really learn about these constructs, I just wanted an excuse to try out LaTeX and plot some interesting graphs.


The shiny parabolic broadcast spreader of vomit

Due to suspected food poisoning I checked into the local emergency room last night around 2 AM, trusty 13 gallon plastic garbage bag in hand, because, I've been throwing up. Once they get me into a room the nurse offers me a shallow pink plastic pan in exchange for my plastic garbage bag, and I'm thinking to myself, "Really, have you never seen anyone vomit in your entire life?". Why on earth would you offer me a shallow round bottom plastic pan as an alternative to a 13 gallon plastic garbage bag? This is vomit we're trying to contain here. This reminds me of a previous visit to the same ER with my son when he had appendicitis, this time we came in with a kitchen garbage pail and the nurse laughed at us and handed him a small metal kidney dish. My son held it in his hands, looking at it perplexedly for about five seconds before he started vomiting again, turning it from a kidney dish into a shiny metal parabolic broadcast spreader of vomit.

I don't know what to make of this phenomenon, as I thought that working in an ER would expose you to a lot of puking people, and thus you'd know better than to give someone a kidney dish to throw up in. I can only come up with two possible conclusions, the first that the ER folks are just aren't quick learners and haven't picked up on the association:

    kidney dish : vomit :: broadcast spreader : grass seed

The other possibility is that my family is unique, maybe my wife and I are both descended from long lines of projectile vomitters, a long and honorable tradition of high velocity emesis, and that the rest of population is filled with polite, low volume, low velocity vomitters. If so, you people make me sick.



Reilly has been learning Javascript, and one of the projects he wanted to do was a snow simulation. I guess growing up in the south snow is a rare and wonderous event for him.


Internet of Things

So while everyone was losing their minds over the addition of the word twerk to the Oxford Dictionaries Online, I'm actually more upset that the Internet of Things was added with the wrong definition, or at least an incomplete definiton.

a proposed development of the Internet in which everyday objects have network connectivity, allowing them to send and receive data

The first definitions of the Internet of Things I heard was from Bruce Sterling and it went beyond just having network connectivity, it was about lifecycle management, tracking objects from cradle to grave. Now I understand that the ODO tracks popular usage of a term, and that literally everyone is using the term wrong, so the wrong term gets added to the dictionary (did you see what I did there?). I'm OK with the simpler definition being added to the ODO, but it unfortunately means that we don't have a word for the richer definition of the Internet of Things, which is an important concept that we shouldn't lose sight of.


Platonic Programs

One of the important types of open source that doesn't get talked about is what I call Platonic Programs, which are small programs that exhibit the base level of functionality for some domain, but no more, and have small, clear, and consise code. These projects have outsized impacts on the ecosystem and yet aren't talked about that much.

For example, look at MicroEmacs, which not only has a string of variants that are all named a variation of "MicroEmacs", but also EmACT, Jasspa emacs, NanoEmacs, mg, and vile. My contention is that there's a pletora of child projects of MicroEmacs not only because it was eventually open source, but because the source code was simple and clean enough, and the base set of functionality small enough that many people would look at the code and think, "that would be my perfect editor if only they added X, Y and Z, and the code is simple enough that I can see exactly how to add all those features."

I ran into the idea of Platonic Program shortly after I wrote Robaccia, which was an example of the rudiments of a Python web framework. I was shocked by the uptake, including ports to Groovy, and inclusion in academic class coursework. I'm not saying Robaccia is a quintessential example of the Platonic Program, but after the experience I had with Robaccia, I started to see similar patterns in other projects.

As for the future, I think Fogleman Minecraft has a lot of potential, it takes a wildly popular paradigm and boils it down to less than 1,000 lines of Python. I just scroll through the code and think to myself, I could add X, Y and Z, and it would be so easy...


Driving and kids these days.

This NYTime article on The End of Car Culture very mich rings true for me, none of our kids look forward to having a car like we did. It felt like we had to push the oldest one to get his learners permit. Made even odder by the fact that we don't live anywhere near any sort of useful public transportation.


Screencast recording under Ubuntu

I'm sure this evolves over time, but for today, the best command-line incantation I found for recording screencasts is:

$ avconv -strict experimental -f x11grab -r 25 -s 1024x768 -i :0.0 \
 -pre medium -f alsa -ac 2  -ar 22050  -i pulse cast.webm


Piccolo in Go

Piccolo has been ported to Go. The original Python script is still in place, but will no longer be updated. This entry is the first one published with the new picc.go.

Here's a speed comparison between the Python and the Go code for a full republish, i.e. every HTML file needs to be rewritten. First for the old Python code:

$ ./bin/piccolo
real  0m57.491s
user  0m46.415s
sys 0m1.312s

And now the Go code:

$ ./bin/picc
real  0m4.460s
user  0m1.588s
sys 0m1.096s

And incremental publishing is under a second:

$ ./bin/picc
real  0m0.476s
user  0m0.404s
sys 0m0.068s

Note that incremental isn't a very good description since the program is still parsing close to 1,000 XML files in that last run. I obviously have some performance improvements I can make.


Back on Twitter

I'm giving Twitter another shot, this time at


APIs Discovery

The APIs Discovery Service launched today. This has been in the works for a while, but probably not a secret if you've been following checkins to the google-api-python-client library. The announcement went out on the Google Code blog, and has been covered in other venues.

Two things to add that haven't been covered so far, the first is that if someone besides Google were to build an API that could be described by the Discovery format, then potentially some of these libraries would work with that API. Secondly, check out that patent license. While the obvious questions will be raised, instead let's fill the comments with your theories of why we didn't use WADL.