Archive for February 17th, 2007
About a month ago, I wrote an implementation of RFC 4627, the JSON RFC, for Erlang. I also implemented JSON-RPC over HTTP, in the form of mod_jsonrpc, a plugin for Erlang’s built-in inets httpd. This makes accessing Erlang services from in-browser Javascript very comfortable and easy indeed.
Continue Reading February 17th, 2007
tonyg
I’ve installed Firefox 2.0 on most of the machines I work on daily now. Its use of google suggestions surprised me when I first saw it, but I’ve grown to find it somewhat useful on occasion now. It suggested the following experiment (not in so many words, of course): assuming that the suggestions it supplies are based on popularity of search terms (presumably filtered by google’s safe-search feature!), then the suggestions ought to reflect the zeitgeist to a certain extent - what does it suggest for each letter of the alphabet? The results weren’t exactly surprising. No philosophy, very little science, technology, literature or art; nothing but wall-to-wall Britney, Ebay and “U tube” (!). The A-to-Z follows below.
This list was taken from the top results from the google search suggestion box in Firefox 2.0 on 30 Jan 2007:
- A is for Amazon
- B is for Britney Spears, Best-Buy
- C is for Circuit City, Craigslist
- D is for Dictionary, Dell
- E is for Ebay
- F is for Facebook
- G is for Google, Gmail, Google Earth, Google Maps, …
- H is for Hotmail
- I is for IMDB, iPod
- J is for John Lewis, JCPenney and Jobs
- K is for Kohls, K-Mart
- L is for Lyrics, Limewire
- M is for Myspace
- N is for Nintendo Wii
- O is for Office Depot
- P is for Paypal
- Q is for Quotes
- R is for Runescape
- S is for Sears, Staples, Skype
- T is for Target, Toys-R-Us, Tesco
- U is for U Tube (sic), UPS
- V is for Video, Verizon Vodafone and Virgin
- W is for Wikipedia, Walmart
- X is for Xbox 360
- Y is for Yahoo, Youtube
- Z is for Zip Codes (and after a few places, oddly, Zilog)
February 17th, 2007
tonyg
RFC 1982 defines a “Serial Number Arithmetic”, for use when you have a fixed number of bits available for some monotonically increasing sequence identifier, such as the DNS SOA record serial number, or message IDs in some messaging protocol. It defines all its operations with respect to some power of two, (2^SERIAL_BITS). It struck me just now that there’s no reason why you couldn’t generalise to any number that simply has two as a factor. You’d simply replace any mention of (2^SERIAL_BITS) by, say, N, and any mention of (2^(SERIAL_BITS-1)) by (N/2). The definitions for addition and comparison still seem to hold just as well.
One of the reasons I was thinking along these lines is that in Erlang, it’s occasionally useful to model a queue in an ETS table or in a process dictionary. If one didn’t mind setting an upper bound on the length of one’s modelled queue, then by judicious use of RFC 1982-style sequence number wrapping, one might ensure that the space devoted to the sequence numbering required of the model remained bounded. Using a generalised variant of RFC 1982 arithmetic, one becomes free to choose any number as the queue length bound, rather than any power of two.
February 17th, 2007
tonyg