Biella Coleman: Rage against the Machine
Actually, granny rage against the machine….
$ command arg1 /long/path/to/file
$ command2 arg2 /long/path/to/file
$ command3 arg1 arg3 /long/path/to/file
Try using !$ to get the right-most argument on the previous line (you can also use !:2 to get the second argument, etc.):
$ command arg1 /long/path/to/file
$ command2 arg2 !$
$ command3 arg1 arg3 !$
The day before yesterday I uploaded ack to Debian Unstable. Currently it is awaiting the ftp-masters acceptance. Due to a name confilct with an existing package both the package and the util is named ack-grep. Not quite optimal…
Instead of maintaining dependencies and some of my other perl modules I have decided to join the Debian Perl Group. So this evening I have spend injecting (and re-injecting) my current perl modules into the subversion repository.
Later I might inject my other packages to collab-maint’s subversion repository.
Now that through black magic, voodoo, and a working network driver I have
Avahi working on my NAS and UPnP working on my SoundBridge, I can
get back to the task of learning a bit about GUPnP, a GObject-based library for UPnP. My
first hack is a simple tool that pops up notification bubbles when the
currently playing track changes, and it was surprisingly easy.
First, wecreate a Control Point for the service we want to
control. This object will emit signals when devices on the network are
discovered which provide this service, so by connecting to that signal all
of the discovery is handled for us.
GUPnPContext *context = gupnp_context_new (NULL, NULL, 0, &error);
GUPnPControlPoint *cp = gupnp_control_point_new (context, "urn:schemas-upnp-org:service:AVTransport:1");
g_signal_connect (cp, "service-proxy-available",
G_CALLBACK (service_proxy_available_cb), NULL);
gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE);
Now in service_proxy_available_cb we are passed a Service
Proxy object to which represents a device providing the service we
asked for. Service proxies can have actions invoked on them,
or we can be notified when a State Variable change. There
is a state variable in AVTransport called CurrentTrackMetaData
but don't let that fool you: for reasons too boring to detail that doesn't
cause notifications. The only interesting state variable in AVTransport
is LastChange, which is basically a meta-variable which contains
the name and value of the last variable which changed. Madness, I agree.
This is where we come to the problem with GUPnP: it makes the protocol
seem so clean and simple that when warts like this become obvious, they
stand out.
Anyway, we want to listen for changes to the LastChange state
variable. This involves adding a notify and then subscribing to the proxy.
Luckily state variables emit their current value when we subscribe to
them, so we never need to fetch the current value.
static void
service_proxy_available_cb (GUPnPControlPoint *cp, GUPnPServiceProxy *proxy)
gupnp_service_proxy_add_notify (proxy, "LastChange",
G_TYPE_STRING, notify_cb, NULL);
gupnp_service_proxy_set_subscribed (proxy, TRUE);
Believe it or not, we're actually nearly finished. Now to implement
notify_cb. This is passed the variable name and a
GValue containing the new value. A basic implementation is
pretty simple.
static void
notify_cb (GUPnPServiceProxy *proxy,
const char *variable,
GValue *value,
gpointer user_data)
g_print ("%s changed to %s\n", variable, g_value_get_string (value));
And we're done! When the program starts it discovers any devices on the
network, creates proxies and watches the variables, printing them as they
change. Devices can come and go, GUPnP handles that automatically. Easy
as pie.
Well, sort of. The string is an XML document which could contain any
variable, so we need to parse it looking for a
CurrentTrackMetaData node. On that node the val
attribute contains an escaped XML document describing the metadata in the
(and I kid you not) DIDL-Lite format. The saving grace here
is that at least its partially Dublin Core, but that needs to be parsed
for the title and artist information. This is all standard XML mojo, and
quite boring. The end result is that my first hack application is 150
lines long, the first 100 of which are entirely devoted to XML parsing.
The next step is to write a convenience library around DIDL to avoid
having to parse it manually. It's not exactly a complicated task, but
quite tiresome.
For the curious, the full source is in this Bazaar branch.
NP: Directions EP, Variou (from Acroplane I think)

The fact is, all languages optimize for particular problem domains and I don't think that a universal programming language exists that would perform well on all tasks. Bray rapidly found out that Erlang isn't optimized for doing line-oriented I/O and it's regex library sucks. So what? While those problems could be eliminated from Erlang, the fact that Ericsson has deployed large telecom gear without having to fix those issues means that Erlang is ideally suited to its original programming domain.The problem is that learning new languages is difficult for many people. They're not going to bother starting from 0 with a new language if what they've got is only 10/20% worse than the other guys. For companies, developing expertise (and trying to maintain it) in lots of languages is probably less productive than picking a few (Google only has four: Java, Python, Javascript and C++, and they're not exactly lacking in brainpower or cash). This is why "the right tool for the right job" works for things like saws and hammers, but not for complicated, idiomatic things like programming languages. Therefore, it's important that languages that aim to be widely used do lots of things pretty well, and try to avoid doing anything really badly. This is something I've always admired about Python, even if I don't use it anymore. It's a language that you can do a very wide variety of tasks with, and you can be sure there's probably some code out there already, and that Python will be ok for your task, even if it's not the best thing. Performance is a weak point compared to compiled languages, but even there, get the libraries right and things aren't *so* bad. In any case, my point isn't to bash Erlang (which I like), or put Python on a pillar (I prefer Ruby and Tcl), but to say that a widely used programming language doesn't need to be the best at everything, but it should aim to make people comfortable using it, safe in the knowledge that they can probably do most things *ok* if needs be. That's a far better situation than being able to do one thing realy well, and perform poorly at many other tasks, forcing its users to look elsewhere for solutions to those tasks. Personally, I think that for concurrency, Erlang is in a bit of a race right now - they're pretty far ahead in terms of concurrency (and also fault tolerance, but fewer people care about that), but behind in other areas (less library code). Other languages don't have as good a tools for concurrency, which isn't an easy problem. So, what will happen first - Erlang catches up elsewhere, other languages get "good enough" concurrency solutions, or a new language (like Scala) comes along and takes the lead?
I was at the September meeting of the
Cooperatives SW
steering group a couple of weeks ago.
We had two new members (Alex Lawrie from
Upstart
and Alan Bonner from RadCo) and a guest from
Co-operative Futures.
Unfortunately, we seem to have lost our only
member from a
Credit Union.
Our guest told us about how important it is
to put information about co-operative
business models into
Business Link
and offer paths from BL "Information and Diagnostic Brokerage" to co-operative
development bodies (CDBs).
I agree with that - by and large, BL were
hopeless about anything other than a sole
trader business when I used them (in 2000
and again in 2002/3) and knowing more about
co-operative development would have saved me
about a year of confused administration.
(However, my then-local CDB was also a
competitor, so they weren't much help even
once I found them.)
There are also some other ideas to connect
CDBs to funding better, which the CDBs
are going to develop with our blessing
and bring back later.
Related yet different, we were told that the
Regional Infrastructure for Social Enterprise
is
about to launch a trade association
and may exclude all co-operatives from it by
mistake.
Other than that, it was mostly about getting
promotional materials and plans in place
for the
Co-operatives SW Annual Meeting
in Exeter on Monday 22 October
(
places available
to all co-operative members).
Intellectually, I mean. According to some
Media outlets
Ballmer (once again)
declares war on the Free Software community. The technical “we are
better” argument is apparently completely dropped (honesty, at last) and
replaced by the pure “we have more money and patents”, this time
not even thinly veiled in marketing speak.
But I don't think PJ is right when she sais that “FOSS can't survive
in an IP regime such as Ballmer has laid before our eyes.”. We've all
seen how successful the sue your own
customers business model is. At this time, I think it's safe to say that
most big Linux users are also big Microsoft customers because Linux in the
enterprise still means primarily Linux on the Server, Windows on the Desktop,
so going after the big Linux users will be exactly that. Going after the small
Linux users is just not interesting. Going after hobbyist FOSS developers will
not work because only using patented works commercially actually violates the
patent, as far as I understand patent law. Going against the commercial Linux
developers will work to some degree, so let's look at this closer: Software
patents are strongest in the U.S., so in Europe it will be much harder for MS
for one thing. And, Novell and Red Hat excluded (and IBM, who should be big enough to take
on MS, especially since their lawyers by now have had extensive training in
what Linux is abaut), the commercial Linux space is still dominated by small
companies, so MS would have to overload the judges with thousands of small
lawsuits all over the world, and since no two companies do exactly the same
thing I doubt the lawsuit templating technique adapted by the RIAA for music
downloads will work. And, finally, the nice thing about Open Source Software
(using this term here on purpose): it's out in the open. So kill one company,
its former employees will found three new ones because the former customers
(even if they're scared and would like to get rid of their Free Software) will
still need support because they can't all switch (back) to MS based
environments immediately. And I haven't even talked about public opinion and
what antitrust offices might have to say, because those are extremely hard to
predict and their effects are uncertain.
Disclaimer: I am 100% newbie on SELinux, so any inaccuracies, mistakes or fallacies are almost sure due to this fact.
OK, changes in dpkg-dev 1.14.7 have forced my hand a little and dpkg-cross 2.0.0 has now been uploaded to Debian unstable (not experimental).Everyone: please note - cross-building support in Debian will be "fragile" for the next week or so. The rewritten packages are being uploaded against experimental dpkg support I expect bugs.![]()
emdebuild: ERROR /usr/bin/ contains files for the wrong architecture!
Curse you Debian! Your programs are too secure...
So I was looking over some setgid binaries last night, seeing if there were any obvious security bugs.
Up popped omega-rpg - a fun game I've recently been playing. Unfortunately it is mostly OK:
| Temperature, F | Time, 5D kill | Time, 6.5D kill |
| 130 | 86.42 minutes | 112.34 minutes |
| 135 | 27.33 minutes | 35.53 minutes |
| 140 | 8.64 minutes | 11.23 minutes |
| 145 | 2.73 minutes | 3.55 minutes |
| 150 | 51.85 seconds | 1.12 minutes |
| 155 | 16.40 seconds | 21.32 seconds |
| 160 | 5.19 seconds | 6.74 seconds |
| 165 | 1.64 seconds | 2.13 seconds |
Good new everyone, new version of Photo uploader has been just
born. If you don't know this tool yet, it is helper to upload photos (or
images) over net. It was created when I became too lazy to upload
hundreds of photos to digilab, but generally it can support any service
which allows you uploading of whatever using HTML forms.
News in this release:
Good new everyone, new version of Photo uploader has been just
born. If you don't know this tool yet, it is helper to upload photos (or
images) over net. It was created when I became too lazy to upload
hundreds of photos to digilab, but generally it can support any service
which allows you uploading of whatever using HTML forms.
News in this release:
Logically, Argentina won against Scotland tonight after a.....quite boring
match.
Scotland, as expected for them unfortunately, wasn't able to put speed in
their game, the only way to beat Argentina this year. Even with that poor
game (Lamont, their rear player, was a disaster), Scotland finished quite close to ARG, who didn't play brilliantly with
many approximations (Hernandez being a bit arrogant, trying to kick too many
drop goals) and a bit of luck.
So, nothing really impressive in that match. Does that mean that South
Africa has better chances to qualify for the final: who knows? Argentina can
be unpredictable...but it seems they are a little bit burned out (they don't
really have 30 top players and some of their key players appear tired).
The semi-finals will feature France-England (about 50-50 chances from what
we saw up to now) and South Africa-Argentina (60-40, in my opinion). Next
week-end, Stade de France.
Next.