-
toStr – A small C++ utility function.
This can be used as string(“bob”) + toStr(5) without declaring the type, presuming that the type can correctly be inferred by the compiler. Obviously, T must support operator
-
Emacs Mode for Protobuf editing
I like using Google’s Protocol Buffers (aka protobuf). It is faster and more bandwidth/disk efficient than JSON, but perhaps not quite as simple or flexible. In protobuf you have messages. In messages, everything is a key/value pair. Keys are tagged to show the type of the value (int, float, string, sub-message), then followed by the…
-
RESTful message queuing in Python
Alright. Pass 1 is done. Here is a link to it. The server is in Python. Clients in PHP and Python are provided. It follows this design document. On a quad Opteron, it gets about 600 short messages a second. It isn’t threaded. Next step on this project is to redo this in Erlang. And…
-
A new message queuing system
First, why a new one? Because I haven’t found any that do what I need and look simple and well supported. Besides, it seems like a reasonable learning experience. The initial summary of what I need is a light weight method for PHP (in the form of scripts running in mod_php) to send messages to…
-
Thread Worker Pooling in Python
The worker pool pattern is a fairly common tool for writing multi-threaded programs. You divide your work up into chunks of some size and you submit the to a work queue. Then there is a pool of threads that watch that queue for tasks to execute, and when complete, they add the jobs into the finished queue.…
-
Braided Cinnamon Bread
Preheat oven to 400 degrees. Follow a basic milk bread recipe (flour, sugar, salt, yeast, water, milk, shortening) through the first kneading and rising stage. Split dough into three equal portions Roll out each portion, into a roughly 4:3 shape. Cover with a mixture of sugar, butter, and cinnamon, then roll into a tube. Fan…
-
Making Miro work with USB sound devices on Ubuntu
On Ubuntu (and possibly other linux distributions) Miro refuses to work with a secondary sound card, it will only work with the primary one despite what the ALSA default is set to, unlike most programs which offer some way to override the default. Potentially, the second sound card in question could be a PCI card…
-
Seeking
I am now looking for a new job and am no longer with Sigma Electronics. My first preference would be a position writing software for post production or visual effects at either a software company or a post production or visual effects company. Other than that, I am also interested in positions or contract work…
-
A few Solaris 10 notes
Actually, these are primarily Solaris 11 notes, but they will probably all apply to Solaris 10 when the next release comes out, which I understand to be scheduled for sometime later this month. First, recently a lot of SCSI hard drives I’ve gotten have been a little mysterious about being used by the Solaris installer…
-
Flash on Ubuntu 8.04 AMD64
I run Ubuntu 8.04 AM64 on a laptop at work. I’ve been doing this since Ubuntu 6.10. This has not been a smooth ride. Ubuntu 6.10 i386 on my old laptop (I only “upgraded” because the old one was stolen from the plane on a busines trip) worked flawlessly for me. Things have gotten a…