-
posts
-
Graphviz
Just played a bit with graphviz and made some simple graphs. Graphviz is an open source suite of programs for generating graph diagrams from a number of text formats, the simplest of which is the dot format. Dot format is a simple language that is used to describe the graph that will be generated. Here I created a very simple directed graph (that’s a graph with arrows) using login ids for some friends on Twitter: digraph G { a2c -> IanMLewis -> Voluntas; a2c -> jbking -> IanMLewis; } Essentially the parser will look over all of the strings of...
-
Bob's Talk on Erlang
Update (2023-10-02): The video is no longer available.
I just watched this video of Bob giving a
presentation at C4[1] about
Erlang. It’s about a year old and Bob had been using
Erlang for almost a year at that point. Bob always seems to have his hands in
things just before they become super popular. Erlang seems to be one of those
things. JSON was another. He’s even the guy that coined
the term JSONP
before that was really popular. Anyway, highly informative. I might give Erlang
a try a little later on.
-
Wanted: Dictionary program for Windows/Linux
I have wanted a good dictionary application that supports a number of dictionaries/dictionary formats for studying Japanese but I’ve been sort of frustrated that there is no single application that does what I would like. I have looked mostly at stardict and epwing because they are closest to the type of dictionary I want. Specifically I have the following requirements: It must work in Linux (epwing and stardict) It must work in Windows (epwing and stardict) It must support epwing format (epwing) It should ideally support an open dictionary format like stardict. (stardict) It must support lookup via a popup...
-
jsonschema mentioned on json.com
Kris Zyp (the author of the JSONSchema proposal)
mentioned
jsonschema
on his blog at
json.com. Thanks Kris!!
-
JSON Schema Validator 0.1a for Python
Update (2025-01-27): Many of the links no longer work. I just released the first version for a project that I’ve been working on since the Python Onsen. It’s a validator for JSON Schema written in Python. It’s based on the JSON Schema Proposal Second Draft. The source tarball is jsonschema-0.1a.tar.gz. The source itself is on Bitbucket. JSON Schema’s purpose is to allow validation of JSON documents much like XML Schema, DTD. You can use it to define what kind of data should be present in the document as well as the structure of the data. You might have some JSON...
-
Django Views
I was thinking about using Django for one of my projects on App Engine because it seems like a popular project and somewhat easy to use, but I’m not quite understanding yet why it’s better to have helper functions rather than controller/handler classes like Pylons or GAE’s normal WSGI handling has. With handler classes my controller might look like: from google.appengine.ext.webapp import RequestHandler class MainHandler(webapp.RequestHandler): def get(self): # Read data from BigTable here self.response.out.write(outputhtml) def post(self): # Write data to BigTable here #redirect back to the url self.redirect(self.request.url) Whereas the Django helper function might look like: from django.http import HttpResponse,...
-
Protocol Buffers
A few days ago Protocol Buffers was released by Google as an open source project. Protocol Buffers is a way to generate code for objects that can be serialized to and de-serialized from the Protocol Buffers binary format. An implementation of the Protocol Buffers compiler which reads a .proto file and can output Java, Python, and C++ code. Because the format is a binary format and the compiler can output in several languages, this would allow for fast message passing between applications that may or may not be implemented in the same language. I went ahead and created two simple...
-
Javascript Interpreter
I wanted a convenient way to test out some javascript by running it in a browser and being able to play with it via an interpreter like python has. As it turns out the almighty Bob created a nice interpreter for playing around with Mochikit but I wanted something a bit more generic that would allow me to import any kind of javascript and play with it. It turns out this is really easy so I added one simple function to the interpreter.js file called importjs. You just call importjs like so: importjs(url); This will import a javascript file from...
-
Python Onsen
This weekend I went to the Python Onsen (Japanese) organized by voluntas. Python Onsen is an event where people who like or are interested in python get together at a Japanese Ryokan Onsen and program/mingle/study together. The event started Friday but I had to work so I joined everyone yesterday. If you aren’t familiar with the Ryokan experience check out the Ryokan link. Essentially you have a traditional style room and traditional meals are served twice a day (with generous proportions). In between meals there was a lot of programming and talk about programming. I was received pretty well considering...
-
Twitter Page Code
I took a look at the code of a Twitter page as an example of a site that gets lots of traffic and noticed a couple of things. They use Amazon S3 to store images They split the JavaScript, favicons, and CSS up across 3 or 4 subdomains (assets0.twitter.com, assets2.twitter.com, etc.) They include prototype and a version of jQuery as well as a version of script.aculo.us. <script src="http://assets3.twitter.com/javascripts/prototype.js?1213829093" type="text/javascript" ></script> <script src="http://assets1.twitter.com/javascripts/effects.js?1213829093" type="text/javascript" ></script> <script src="http://assets0.twitter.com/javascripts/application.js?1213829093" type="text/javascript" ></script> <script src="http://assets0.twitter.com/javascripts/jquery-1.2.3.min.js?1213829093" type="text/javascript" ></script> It kind of surprised me that they include a version of prototype AND jQuery AND script.aculo.us since they...