Botan Used in Pirates of the Burning Sea
In the hey-cool category (at least for me), I am informed that my project Botan is being used by Flying Lab Software in their new MMORPG Pirates of the Burning Sea. I was told by their Directory of Community Relations that it is being used in their user authentication system.
I've even seen ads for it on Cartoon Network, which means now I've indirectly been on television! OMG
posted 2008/10/10 12:25 [category: bitbashing / programming]
I've been looking at Scala for the last couple of days. This is actually the first JVM language I've learned - I have not used Java since my freshman year of college, and never in anything like production code. What follows is basically a set of disconnected notes and thoughts about Scala that I've had so far:
posted 2008/07/31 00:23 [category: bitbashing / programming]
A Failure Case in a Linux Random Number Generator
The Linux kernel implements a random number generator called a Tausworthe generator, in the file lib/kernel32.c. The kernel uses this generator for a variety of non-cryptographic purposes, such as calculating network delays and random ports numbers, choosing a random element to drop from full caches, and many other places where a randomized algorithm is useful. While looking through this source, I found some cases where it could fail quite dramatically.
posted 2008/07/01 11:18 [category: bitbashing / programming]
Roman Proverbs Applicable to Software
Quod non est in actis, non est in mundo. ("What is not in the documents does not exist")
posted 2008/06/30 12:35 [category: bitbashing / programming]
A major part of C++0x is the addition of an explicit memory model, which will allow for safe multithreaded programming (C's memory model, which C++98 inherits, is really only sensible in single-threaded code). At the most recent C++0x meetings in Sophia Antipolis, an important change was voted into the working paper that assists garbage collection, based on the wording in N2586.
posted 2008/06/23 13:18 [category: bitbashing / programming]
Seen: multithreaded code that carefully allocates, but never uses, mutexes. It seems simply declaring them is sufficient for the compiler to figure out that the code needs to be serialized.
posted 2008/06/23 11:48 [category: bitbashing / programming]
I discovered yesterday that variables used in a Python list comprehension leak out into the surrounding scope:
$ python
Python 2.4.4 (#1, Mar 7 2008, 14:54:19)
[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = { 1:2, 3:4 }
>>> nothere
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'nothere' is not defined
>>> [nothere for nothere in x.keys()]
[1, 3]
>>> nothere
3
I find this both surprising and a little disgusting. I really wish I could at least say that PEP 202 or the Python reference manual describes this behavior, but they don't!
(Update 2008-06-18): Actually the current manual does specify that the variable leaks, I think I was originally looking at the 2.3 manual and then linked to the 2.5 manual without actually looking at it. Either that or I just missed the footnote. At least it is considered a bug, I would have been somewhat disapointed if that was intentional behavior.
posted 2008/06/18 11:39 [category: bitbashing / programming]
Thread Safety Annotations for C/C++ using GCC
Le-Chun Wu of Google has posted a patch to the GCC list that adds a set of thread safety annotations. After annotating your code, GCC can detect (and warn about) certain classes of thread safety errors, like shared variables being used without acquiring a lock. It doesn't handle some useful cases (including 'smart' pointers like shared_ptr), but it does a lot, and having it part of GCC means it can be easily run during regular builds.
There is an API/design doc describing the current interface here. Looks pretty decent and I hope it finds its way into a proper GCC release soon. Since GCC 4.4 is still in stage1, there may even be a chance of it being available in a release this year.
posted 2008/06/17 17:09 [category: bitbashing / programming]
Not Just Programming Languages Are Blub
A friendly reminder that it is not just programming langauges which are Blub. A non-comprehensive list (basically, things that I've seen people make Blub-like assumptions about in recent memory).
It's too easy to assume that the limitations of the tool you happen to be using are also the limits what is possible. As far as I can tell, this is never true.
I'm not going to suggest alternatives, because for a lot of these categories there is nothing but Blub (though, as always, some Blub is more equal than others).
posted 2008/05/23 11:33 [category: bitbashing / programming]
'JAR has a habit of writing code in such a way that he can amuse himself and maybe learn something, and about 75% of the time these experiments have rather awful outcomes.' - From a page about Scheme 48
Maybe it is just me, but that seems like a pretty decent way to write software. And a 25% success rate is significantly better than a lot of development methodologies I can think of.
Found while trying to find information about the W7 security kernel.
posted 2008/05/05 16:58 [category: bitbashing / programming]