Subscribe to a Google Group with your non-gmail email

You can subscribe to any Google Group with your non-gmail email. If you try to subscribe through the web interface, you’re typically forced to use a gmail account. The solution is quite simple, but few people know about it.

For a Google Groups group, send an email to groupname+subscribe@googlegroups.com.

For a Google Apps group, send an email to groupname+subscribe@domain, for example, chromium-dev+subscribe@chromium.org.

You’ll receive a reply if you’ve successfully subscribed. Note: when I did this, my first email to a +subscribe@ address was delayed by ~10 minutes.

Reference: How do I subscribe to a group?

Monoclock: Access the monotonic clock from Python

Python’s time.time() jumps around if the system time changes. The monotonic clock doesn’t, and climbs steadily upwards. Unfortunately, Python doesn’t give you easy access to the monotonic clock. A 50-line Python module may help you out, at least if you have a POSIX-like OS that has librt (I tested only Linux).

Get it at: https://github.com/ludios/Monoclock

Let me know if it works, or doesn’t. Please contribute, especially if you’ve implemented Windows or OS X support.

Protojson: JSON serialization for Protocol Buffers

Google’s Protocol Buffers serializes to and deserializes from a compact binary format. As of this writing, there’s an open ticket for JSON serialization support. JSON is very useful when transporting data to web applications, or if you want human-readable bytes on the wire.

I recently wrote Protojson, a protobuf Message<->lists encoder/decoder in Python. You can get it at github.

Protojson requires the google.protobuf Python module, because it works with google.protobuf.message.Messages. Right now, Protojson only supports the PbLite (PbJsLite) format. You can use Protojson to send and receive Messages from web applications with Closure Library’s goog.proto2, or even use it for non-webapp purposes. If you’re interested in goog.proto2, see this thread, which links to a .proto->.pb.js compiler.

I haven’t benchmarked Protojson, but I wouldn’t be surprised if Protojson+simplejson was faster than the binary serialization (at least for Python).

Try it out and let me know how it works.