Vitavonni

Sun, 28 Dec 2008

Enumerating audio devices in GStreamer

Since it took me more than one hour to figure out (and the documentation wasn't too helpful), here's how to enumerate audio devices in GStreamer:

import gst
sink=gst.element_factory_make("pulsesink","mysink")

sink.probe_property_name("device") devs = sink.probe_get_values_name("device")

Note that for some drivers (such as pulse) you explicitely need to call probe first, before you can get values. Also note that the ALSA module apparently only enumerates hardware devices, which probably is a bug in the module (according to Lennart's blog, you should use snd_device_name_hint which seems to be the only function to get all the ALSA devices, including software devices such as dmix or the pulse linking module).

[category: /en/linux | Permalink]

Fri, 26 Dec 2008

PyGTK on OS X?

Can anybody point me to a beginners tutorial for running PyGTK on OS X?

I've written this little BPM tap program in PyGTK, that gives you a speed plot and confidence interval, works well for me.

A friend of mine would like to use it, but is running OS X, and doesn't know much about computers. I know next to nothing about OS X. I know it already has Python2.5 installed, and that's about it.

So anyone got a tutorial that doesn't require previous knowlege about using fink, ports or whatever? Something that I can point a real novice user to?

Via email please, my blog intentionally doesn't have comments. Erich AT Debian DOT org.

[Update: so far, I've only had requests about my bpm toy and about the same kind of instructions, but no links to refer people to...]

[category: /en/linux | Permalink]

Mon, 22 Dec 2008

Das Märchen vom gestohlenen Weihnachtsstollen

Es kursierte groß durch die Presse: der vermeintliche Datendiebstahl durch den geheime Bankdaten war in Wirklichkeit nur ein Weihnachtsstollen-Diebstahl?!?

Da wird uns ein sehr halbschares Märchen verkauft:

So mal zum langsam mitdenken: Damit der gestohlene Stollen nicht auffällt, haben sie das Etikett auf ein anderes Paket geklebt?

Was für ein Paket wird den eher vermisst, ein Stollen oder Bankdaten?!?

Sorry, aber das Umkleben des Etiketts ist mit die dümmste Idee wie sie den Diebstahl haben vertuschen können... statt dass ein unwichtiges Paket fehlt, fehlt jetzt ein Paket und ein anderes kommt beim falschen Empfänger an - damit machen sie doch nur noch mehr darauf aufmerksam!

Für wie dumm halten sie uns eigentlich? Bloß weil Weihnachten ist und die Geschichte niedlich sollen wir blöd genug sein sie zu glauben?

[category: /de | Permalink]

Wed, 10 Dec 2008

Four months in job review

I've been at my new job for almost four months now. After I had completed my degree, my advisors at the university quickly offered me a position. When I heard back e.g. from Google where I had submitted an application, I had already started my new job.

So from my current point of view it was the best thing to do:

  • Challenge. It's a total brain job, which makes it lots of fun. I'm not fixing peoples computers or broken PHP hacks, but I'm bending my mind on new algorithms pushing the limits of science. Before I started I was like "actually I'd like to make new things work for everybody, get them out into to wild". But I can be just as happy with getting things work in a lab context, actually.
  • Learning. I keep on learning. Not only on the science level, but writing articles, advising people for their thesis, teaching, ... they all contribute to personality.
  • People. The colleagues and my "boss" are fantastic. No infighting, competitions for certain positions or so.
  • Little stress. University work is quite regulated, but that also means it basically is a 9-to-6 job. In internet startups, consulting, IT administration, etc. you often have irregular working hours, 24h standby and such things. Here I can reliably plan my evenings (dancing!) and I'm not taking my work home, but when I'm home all I have to do is relax for the next day. Of course there is the occasional exception when a conference deadline is coming up.
  • Reasonable deadlines. Conference deadlines are different than product deadlines. They're just there, but not pushed in a way to make them unachievable without overtime.
  • Payment. It's regulated, so it's not as much as the high tech companies would pay or I could probably earn freelance, but it's reliable and definitely enough for me to live on (I don't spend much anyway, I don't have expensive hobbys. So I end up saving a large share of it.)
  • Degree. In three years, I should end up with a PhD degree.
  • Office. The university offices are good, and centrally located. We can get some good food nearby, have a nice huge park, a Biergarten, ...

[category: /en | Permalink]

Sat, 06 Dec 2008

On Facebook

I've become a Facebook user. Caused by many of my dancing friends and lots of collegues from university being there: Facebook is a convenient and easy way to keep some contact with all those people that aren't like your core friends, but still friends, and that are all around the world.

I've also toyed around with the Facebook API, and actually written two small applications for it. From a technical point of view, I'm actually quite impressed by Facebook.

Yes, Facebook seems to have quite some load trouble these days. Sometimes it's very slow. Sometimes it just malfunctions (with being kicked out and having to re-login being just the least). These days, messages were distorted every now and then, some app messages were always missing the last few words.

What seriously does impress me is the architecture they use with third party applications. It's designed around cachability (so profile pages aren't slowed down by slow or broken third party applications) and they do jump some hoops to allow application writers do a lot of things while preventing them to disturb other applications or the core functionality.

For all I know, Facebook is the first major thing to do CSS and JavaScript rewriting. Data produced by third party applications is fed through a very smart parser and rewriter that allows an impressively large subset of CSS and JavaScript to be used without the developers having to pay attention to not producing conflicts. In CSS, rules are prefixed with a selector to restrict them to their applications scope. In JavaScript, object references are uniquified, and the convenience functions you have for interacting and accessing nodes (including functions to do common things such as modify CSS class assignments) take care of all that. Access to the raw JavaScript methods is filtered, so you can't e.g. use parentNode to get access to objects outside of your scope. At least in theory.

Much of this is for the benefit of users: applications are not allowed to do annoying animations unless the user has just interacted with them; apps also can't modify or disturb others, or read data from other applications via DOM.

Well, of course there might be one or another security issue still there; some of these things might also be related to the performance issues of Facebook recently. And of course there are bugs. Lots. A couple of things still need to be thought through properly (e.g. aggregation of feed messages with multiple targets, localization functionality for applications, finer grained control of data access). But their CSS and JavaScript rewriting is really cool.

[category: /en/xml | Permalink]
Menu
[planet.debian]
[planet.xmlhack]
[planet SELinux]
[munichblogs]
[email]
[RSS 2 feed]
[English RSS 2]
Categories
< December 2008 >
SuMoTuWeThFrSa
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
28293031   
Archives
2010-Mar
2010-Feb
2010-Jan
2009-Dec
2009-Nov
2009-Oct
2009-Sep
2009-Aug
2009-Jul
2009-Jun
2009-May
2009-Apr
2009-Mar
2009-Feb
2009-Jan
2008-Dec
2008-Nov
2008-Oct
2008-Sep
2008-Aug
2008-Jul
2008-May
2008-Apr
2008-Mar
2008-Feb
2008-Jan
2007-Dec
2007-Nov
2007-Oct
2007-Sep
2007-Aug
2007-Jul
2007-Jun
2007-May
2007-Apr
2007-Mar
2007-Feb
2007-Jan
2006-Dec
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jul
2006-Jun
2006-May
2006-Apr
2006-Mar
2006-Feb
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
Other links:
Swing and the City - Lindy Hop in Munich