from __future__ import *
Ad Serving in Erlang @ CUFP 2008
September 29, 2008 at 01:56 PM | categories: mochiads, mochiweb, erlang, Mochi Media | View CommentsSlides from my Ad Serving in Erlang talk at CUFP 2008 are available here: http://undefined.org/cufp2008/
I had a great time at ICFP and CUFP and it was really inspiring to see what other people are doing with functional programming. I look forward to attending in the future! I think I'll have to write an app in Haskell first though, so I can understand more of the ICFP talks ;)
If you're interested in Erlang I also recommend that you check out my other erlang posts particularly the video and slides from my Exploring Erlang @ C4[1] talk!
simplejson 2.0.1
September 29, 2008 at 01:37 PM | categories: python, simplejson | View Commentssimplejson (documentation) is a simple, fast, complete, correct and extensible JSON (RFC 4627) encoder/decoder for Python 2.3+. It is pure Python code with no dependencies, but features an optional C extension for speed-ups.
simplejson 2.0.1 is a minor update:
- Fixes long encoding regression introduced in 2.0.0
- Fixes MinGW build regression introduced in 2.0.0
I didn't manage to do a simplejson 2.0.0 release notice here but that was a MAJOR update!
- optimized Python encoding path
- optimized Python decoding path
- optimized C encoding path
- optimized C decoding path
- switched to sphinx docs (nearly the same as the json module in python 2.6)
Even without the C speedups, it's several times faster. With the C speedups, it's WAY faster. I highly recommend that everyone update their frameworks to use the latest code.
For the primary benchmark I was concerned with (some internal data structures that Mochi uses) encoding is about 4x faster than cPickle (!), and decoding is just a tiny bit slower.
There's little excuse to use other libraries now. The fastest alternative I'm aware of is cjson 1.0.5, which is currently a little faster than simplejson 2.0.0 when decoding but is actually slower than simplejson 2.0.0 at encoding (the more important path for people vending web services). In both cases, simplejson provides more flexibility (e.g. the decoding object_hook), so a slight speed cost when decoding is probably to be expected.
There aren't really any API breaking changes, but when decoding a str input it will return str objects instead of unicode if the str is all ASCII with no escaped characters. I'm not aware of any scenario other than doctests where this could be a problem.
simplejson 1.9.3
September 23, 2008 at 12:14 AM | categories: python, simplejson | View Commentssimplejson is a simple, fast, complete, correct and extensible JSON (RFC 4627) encoder/decoder for Python 2.3+. It is pure Python code with no dependencies, but features an optional C extension for speed-ups.
simplejson 1.9.3 is a minor update:
- Decoding is significantly faster (for our internal benchmarks)
- Misc. bug fixes