Thursday, February 28, 2008

Ox Liver and Steroids for Pharaoh Ants?



A local newspaper wrote about someone who got pharaoh ants in the kitchen and are fighting them with ox liver and growth hormons (it apparently stops ant reproduction).

Not the most obvious solution, and I seriously doubt it is generalizable to other situations.

Saturday, February 23, 2008

Compiling Python through Lisp?













Several articles have described the similarities between Python and Lisp, e.g.
From my perspective Lisp compilers seems mature and produce relatively high performance code (about 10 times faster than Python), and if Python is compiled to Lisp it can probably be done without any restrictions to how the Python code is written (which doesn't seem to be the case with Shedskin and RPython that compile to C/C++ code).

A possible approach could be to to use the Antlr Python 2.5 grammar and rewrite to a tree grammar (which looks very similar to Lisp), and with the forthcoming Antlr version you can rewrite the tree grammars to another tree grammar which happen to be Lisp?

It is probably not as simple as suggested, but let me know if you try :-)

Vault of greater value than Fort Knox?









On Tuesday 2008-Feb-26 the Svalbard Global Seed Vault opens. Its purpose is to (physically) store millions of types of seeds to contribute to biological diversity (e.g. of food crops) for future generations, and I am quite sure that they will appreciate it sometime into the future.

Svalbard Global Seed Vault has 3 chambers capable of storing 1.5 million seed samples each, i.e. 4.5 million seed types in total. Since seeds have a limited lifetime (high variance though) they will be incrementally replaced. This replacement process is done by selecting a few seeds from each sample and grow the plant to provide new seeds of that type.

The replacement process seems sustainable, but I would guess there are interesting challenges in growing all kinds of seeds. Probably not very hard for them to find gartners or plant biologists :)

Some pictures of the Vault (also called the Global Crop Diversity Trust):


Entrance (click to zoom)


Building Plan (click to zoom)

Hm, this reminds me of my startup-that-never took-off which was sort of an acronym for "Agent-Based Simulation for Biological Diversity"

Wednesday, February 20, 2008

Para 2008 in Trondheim

Prof. Anne C. Elster is chairing Para 2008 - 9th International Workshop on State-of-the-Art in Scientific and Parallel Computing here in Trondheim.

Coding in Academia

Interesting opinions about coding in academia presented here.

My opinion on coding is that code should read like prose, but instead of verses (~code paragraphs) one should use function calls. Kent Beck's books implementation patterns and test-driven programming are good reads (e.g. his thoughts about symmetry in code). Hm, perhaps it could be a thought to learn test-driven programming before object-orientation?

Have you ever thought about that precise naming of methods (or comments for code paragraphs) increases in difficulty with number of lines (i.e. harder to name something that does a lot of stuff)?

Tuesday, February 19, 2008

Greenlet Python is concurrently alive and kicking


As I mentioned before I am a big fan of the Python programming language, and for good reasons, in particular support for thousands of simultaneous lightweight threads (tasklets) with Stackless Python (which requires a modified Python interpreter).

Greenlet and Eventlet
What I recently discovered was Greenlets. It is a spinn-off library from Stackless Python but as opposed to Stackless it is supported by the standard Python interpreter. There are also some interesting additional libraries based on Greenlets, e.g. the Eventlet networking library.

(Hm, maybe using Greenlets with Parallel Python could be a thought)

Concurrency seems to be getting increasingly more attention, and it is great to see that Python is not falling behind, actually far from it. Maybe Python can be used to solve some of the challenges in concurrency.