March 14th, 2010
Jemand bringt für den Bundesparteitag der Piratenpartei den Antrag ein, die allmächtige Aktiven Mailingliste in Syncom aufzunehmen (d.h. sie auf einen Newsserver zu spiegeln).
Sofort springen die ersten Elemente auf den Zug auf, die Angst davor haben, es könnte tatsächlich mal dazu kommen, dass sie zu dem stehen müssten was sie dort produzieren. Ugh.
Dabei kommt man an folgenden logischen Argumenten nicht vorbei:
- Der Bundesparteitag ist dafür nicht zuständig.
- Es soll gefälligst eine ordentliche Abstimmung geben (in Richtung Wahl).
- Wahlen kann man nicht übers Internet machen, da sind wir ja dagegen.
- Alles bleibt so wie es ist!
Ich finde wir müssen nicht immer das Meinungsfreiheits-Fähnchen hochhalten. Im Grundgesetz steht nirgends, dass man Trollen zuhören muss oder ihnen sogar eine Plattform bieten muss. Immerhin gibts da nicht den Rest des Internets und Bild. Zumindest Letztere bringt doch sonst auch jeden Mist.
Posted in Nettalk | No Comments »
February 17th, 2010
I recently Ding!ed committer for Unladen Swallow
I’m currently trying to teach Unladen to recompile functions. This turned out to be more complicated than I anticipated.
There is one especially obscure ‘bug’. Enabling recompilation makes the subprocess module tests hang, but only if it is executed after the pickle tests. The hanging test tries to start a none-existent program around 2000 times. The subprocess module forks and tries to exec the command in the child process. If an exception occurs, it is pickled and send back to the parent via pipes.
Executing the pickle tests makes two functions considered hot and some command in the child process triggers a recompilation of these two functions.
Apparently the invocation of the JIT leads to a lot of memory being duplicated, which slows down the child process considerably. Ugh.
Posted in Use The Source | Tagged: python, unladen swallow | No Comments »
October 19th, 2009
I was quite happy to notice, that my favourite VCS, Mercurial, was released in version 1.3.1! And I’m still using 1.1.2 out of the Ubuntu repository.
Eagerly I updated from the release PPA, but what did I know back than. First thing I noticed was the half done translation. German technical terms just suck.
More importantly they broke the zeroconf module. As most of my hg pulls are within my network, this is pretty serious for me. A fix is already committed, but not yet released. So back to 1.1.2 for me, as I like my VCS stable.
Posted in Use The Source | Tagged: mercurial, python | No Comments »
July 26th, 2009
While studying for my exams, I tried to implement some examples from a book about virtual machines.
The result was a nice little program which can compile simple functional programs into python bytecode!
The only thing you need is the ply parser generator. To compile a function just use:
import topcompiler
@topcompile.compile
def func(x, y):
"""let i = x*x in y*i"""
pass # Compiles the docstring into a function
func(2, 3) == 12
Update:
TOPCompiler now also understands recursive definitions!
@topcompiler.compile
def fac(x):
"""
let rec fac = fun i ->
if i > 1 then
fac (i-1)*i
else
1
in fac x
"""
pass
There is a working quicksort in tests.py.
Check out the code at http://bitbucket.org/ebo/pyvm!
Posted in Use The Source | Tagged: programming, python | 1 Comment »
May 16th, 2009
If you want to enhance your TG2 app with some tech, like .. say a RPC-XML Interface, you can use the special Controller provided by Pylons: XMLRPCController. Unfortunately you can not just mount this controller as any other Turbogears Controller, because it does not support object dispatch.
Instead you have to use the Pylons function forward to dispatch requests to your controller.
@expose()
def xmlrpc(self, *args, **kw):
return forward(XMLRPCServiceController())
Posted in Use The Source | Tagged: python, turbogears, web 2.0 | No Comments »
May 10th, 2009
While playing around with Sprox and TG2, I found a little bug for which a fix is commited to Sprox, but not yet released. I had to a bit until I found a nice and easy workaround. I just copied the changed code into a Mixin class, which can be patched into the declarative Sprox classes.
class ValidateMixin(object):
def validate(self, params, state=None):
"""A pass-thru to the widget's validate function."""
return self.__widget__.validate(params, state)
It can be used with any Formbase class. Just inherit from ValidateMixin first:
class PostEditForm(ValidateMixin, EditableForm):
pass
This works until a new version of Sprox is released and should continue to do so afterwards, even if it can be removed than.
Posted in Use The Source | Tagged: python, turbogears, web 2.0 | No Comments »
April 24th, 2009
While surfing around I discovered a nice little Mercurial Extension: hgkeychain. Unfortunately it’s only for Mac. As Gnome has password management of it’s own, I looked there is someway to access it via Python. And there is!
So I wrote a quick extension myself: hggnome-keyring
It uses the usual yadda yadda for installing (see mercurial docs). Only drawback: Access to the keyring is determined by executable name, so any python programm is allowed to access those keys
There are two first in this post:
- I used bitbucket.org to host the repo. It’s quite nice and very free.
- This post is relayed to my twitter account.
Posted in Use The Source | Tagged: mercurial, programming, python | No Comments »
March 5th, 2009
If you do not know perl, don’t fret.. it’s extremely easy to learn.
Found in a programming forum from non-coders for non-coders…
I lol’d!
Posted in Use The Source | Tagged: programming | No Comments »
February 14th, 2009
I created a little video with the md simulation, I’m working on for my diploma thesis. It simulates condensing Argon atoms using 8 cpus and around 130 cpu hours. Parallelization was done with Space-Filling curves. I used around 500 thousand particles … try that with your standard O(n2) algorithms.
Condensing Argon
Of course I used some fanciful coloring.
Posted in Uni | Tagged: c++, molecular dynamics, numeric | No Comments »
February 12th, 2009

Gefunden in einem Computerforum bei der Recherche für RepairExpert.
Posted in Nettalk | Tagged: Stilblüten | No Comments »
February 9th, 2009
Endlich habe ich es geschafft mein neues ‘kleines’ Projekt fertigzustellen:
repair.4geeks.de
Wie jeder der sich irgendwie mit Computern beschäftigt, habe auch ich meinen Ruf weg. Das hat zur Folge, dass ich genötigt werden Computer von Freunden und Bekannten zu reparieren. Irgendwann kam mir der Gedanke, meine Erlebnisse in wiederverwertbare Form zu gießen. Erste Versuche mit Pyke waren zwar vielversprechend, leider war die Bibliothek nicht komplett kompatibel mit meinem Ansatz: Erstens kann man Regeln nur aus Dateien lesen und zweitens hatte ich Zweifel daran, dass ich einen Zustand ordentlich serialisieren kann wärend eine Frage beantwortet wird.
Kurzerhand habe ich mir meine eigene Inference Engine geschrieben. Dazu noch ein paar Regeln einfügen und fertig war RepairExpert.
Ich hoffe, im Laufe der Zeit noch mehr Probleme und Lösungen einzufügen, aber leider muss das erstmal vor meiner Diplomarbeit zurückstehen.
Posted in Use The Source | Tagged: python, turbogears, web 2.0 | No Comments »
January 8th, 2009
Finally my latest addition to Rawr got released with the new version: The TankDK module!
It’s a theory craft program that provides Death Knights with the possibility to optimize their gear to the best. It is not finished yet, so if you have any proposals or comments post them at Elitist Jerks.
Posted in English, Use The Source, WoW | No Comments »
January 5th, 2009
At UO-BaB we still use ThWBoard as forum software. While bots seem not be able to spam it, probably because of the low distribution, we get a lot of bogus registrations. These generate a lot of undeliverable mails which choke our support mailbox.
I finally decided to do something against this and implemented a reCAPTCHA check on the registration page. I have made a patch for anyone who still uses ThWBoard.
Posted in English, Use The Source | Tagged: php, reCAPTCHA, ThWBoard, web, web 2.0 | No Comments »
December 17th, 2008
Erster Hauptsatz über die praktische Bedeutung von Schul-/Universitäts-Mathematik:
Wenn man eine kubische Gleichung lösen soll, ist eine der Nullstellen immer -1, 0 oder 1.
Posted in Uni | No Comments »
December 14th, 2008
I just spent 2 hours to find a way to set the value of a tw HiddenField. Unfortunately the author did not think, it would be a good thing to mention such nonrelevant tasks in the documentation.
To save you searching for yourself:
options = {'form_name' : {'attrs' : {'value':'your_value'}}}
Later in the template to show your form:
${tmpl_context.form(child_args=options)}
Posted in English, Use The Source | Tagged: python, turbogears | 1 Comment »