Benjamin Mako Hill: An App For That
SeeClickFix makes a mobile application you can use to report
Boston drivers using their smartphones while driving, while
driving.
SeeClickFix makes a mobile application you can use to report
Boston drivers using their smartphones while driving, while
driving.
I stopped my story in early 1994, after my Big Switch to the
mysterious and new world of Linux.
My home server, kheops, is now running Debian and is fed with news and
mail by FrMug, formerly French Minix Users Group and now run by AFAU,
the "Association Fran aise des Amateurs de Usenet".
As I'm still console-challenged, I'm reading mail and news on another
machine I have at home, named "khephren", which is running an, ahem,
beta copy of Microsoft Windows 95. Yeah, I know...:-)
These 1994-1999 years were mostly the Usenet years, for me. I
gradually became more and more involved in several fr.* newsgroups,
either related to the Linux world...or to the Windows world. The
latter was professionnally a bonus for me as 1994 is also the year
where I switched from the Material Science department at Onera to the
Network and Computing Department. My mission there was to accompany
the increasing prevalence of personal desktop workstations in the
daily life of what was formerly the Big Castle of Computing at Onera,
hosting various generations of Cray computers, most of which being in
the Top500 world supercomputers (we even had one in the Top10, very
briefly, at somepoint).
So, I was "the PC and Windows guy" in this world of supercomputing,
Unix and network wizards. But my hobby at home helped me keeping and
growing skills in both "worlds" which, over the years, has proven to
be a not so common profile..:-)
Meanwhile, at home, I was spending hours and nights reading those
newsgroups...or getting involved in fr.* hierarchy management..or
expanding my friends network to many people in the news, Linux, BSD
worlds.
That lasted for about 3 years with ups and downs (with three young
kids at home, you end up having slightly less time...). I was
gradually improving my home server use, adding more functionalities to
it, for instance setting it up as a file and print server with Samba
1.9.something (this will be the beginning of a long story with
samba!).
Unfortunately, my dear Ren had
passed in the meantime. Ren did so
much for Linux in France that he'll be the only link I give in
this article. If you happen to go through P re Lachaise cemetery in
Paris, go to its Memory garden instead of visiting Jim Morrison's
grave and drink a whisky bottle in memory of Ren .
Or just install one of the most funnily named Debian packages: le-dico-de-rene-cougnenc
and, again, drink something to his memory (whisky is highly preferred).
We then reached 1997 and a specific event: my father (who was very
sick for years) passed during summer, some time after my grand-father
passed too. As it apparently happens for
many people, it triggerred me into the interest for family
history. After all, those people who are going away are family
memories. And, in some way, I wanted to keep track of this memory.
As a consequence, I started collecting family memories, interviewing
my close relatives (the oldest ones) and ending, of course, in
tracking all this with my computers. That was the start of a long
genealogy research that sent me on the track of the Perrier family (of
course), but also all other branches, on my mother and father side, as
well as reconstructing the tree of cousins we have, etc, etc.
As anybody who did that knows, this is quite an endless task but I
went very committed to it. I quickly ended up in joining research
groups that were using the recent growth of personal access to
Internet communication. Those groups were, in these 90's, building
elaborated systems where people can help together in their research
instead of having to travel to places where archives are stored. I
participated to many such groups and even ended up animating one who
was doing research in archives of the "Yvelines" "d partement", my
place of living (even though I have no family branch there). At the
same time, other groups were sending me research results for my own
family in the French region where my roots are.
Collective effort, help others for free, you can recognize things that
are a constant all over these years, indeed.
It actually helped me in tracking my Perrier ancestors up to about
1680, with 11 generations of men holding that name (from
Jean-Baptiste, my son, up to tienne Perrier, who is born about
1640-1650, in the small village named Briant in Sa ne et Loire, in
France). Or even climbing up to Laurent Polette, born circa 1510,
mentioned in a document date February 1562. He his my oldest known ancestor.Those folks being 15 generations
before me. My oldest ancestor is born under Fran ois the First, King
of France, protector of Leonardo Da Vinci, at the time La Joconde was
painted or the Chambord castle was built. Doh.
Unfortunately, genealogy software, at that time, was quite poor for
Unix systems. Lifelines was a quite strong development but wasn't that
user-friendly and I ended up using a Windows-based "shareware"
software written by an individual. Still, my Linux machine was used
quite intensively: databases were stored there, and saved there, all
important informations were there, my mail was received there, along
with dozens of mailing lists I was reading. I even hosted a few
mailing lists on my home server.
Still, in the meantime also, again in 1997, in October, another event
happened. We had a pollution peak in Paris area and October 1st was
the first (and as of now the only ever) day where driving restrictions were applied.
Up to that moment, I was driving to/from work (30 kilometers one way).
I decided to use this opportunity to really test public transport, for
one full month. As
I knew it would take me much more time than driving, I tried to
imagine a way to use that time.
How about reading mail and news on a laptop instead of only at home?
Done... In a few days, I found a used Compaq Aero laptop (486 16MHz),
I installed Debian "bo" on it, switched my mail and news workflow to
console programs (mutt and slrn) and here we go!
So, finally, in October 1997, I was using Linux nearly all time long,
the only exception being genealogy data handling.
That laptop was named "mykerinos" (the small pyramid) and....my laptop
is still named mykerinos, though it's now the 5th mykerinos I have..:-)
Ah, and since then, I nearly always use public transport to go to/from
work. Debian addiction is good for the planet!
At some point (I don't remember exactly when...about 1999, I think), DSL connections
appeared and one of the first DSL FAI emerged on France: Free. I was already
using their services for dialup access, but DSL was then a revolution:
persistent connection! And nearly immediately, static IP!
I became one of their first DSL customers (and I'm still
one). Moreover, I had then friends working there...and they had many
Debian machines to host their services.
So, with the help of my Freenix friends, some DNS hosting on their
machines and the still tireless eu.org entirely free domain, perrier.eu.org was born.
Immediately, this gave me opportunities for doing many interesting
things with my home server: setting up www.perrier.eu.org and use
it....for learning web things and sharing genealogical data. For
instance, I ended up hosting some data sent by other genealogists such
as digital copies of archives for some French regions, all served
through my 512/128kbps DSL line (quickly upgraded to 2Mb, IIRC).
And, very quickly, I felt the need to share my family tree, of course!
And here comes Geneweb.
Written (in Ocaml) by Daniel de Rauglaudre, Geneweb was (and still is)
by far one of the best tools to share genealogy data over the Net. So,
I ended up installing it on my home machine. Guess how I did that?
"apt-get install geneweb", of course. Yes, it was packaged. Indeed by
Brent Fulgham who did the initial release on July 22nd 2000.
Here, my memory is a little bit vague. I think I actually packaged
Geneweb for my own use and sharing it on upstream FTP site, forking Brent's package as a start, but updating
to latest upstream release. Then I quickly ended up having discussions
with Brent about this new upstream release, and that lead to:
geneweb (3.10-3) unstable; urgency=low
* Merging with unofficial package from Geneweb ftp site
(in preparation of new maintainer [Christian Perrier] takeing
over responsibility). Note that all of this work is from
Christian.
* Default database dir is now writable by members of geneweb group
* New geneweb group added at installation
* Package tries to properly handle former installations of the
unofficial Geneweb package available on Geneweb ftp site
* Debconf dialogs translated in french
* More languages available
* Creation of /var/geneweb/etc, /var/geneweb/cnt, /var/geneweb/images
with proper permission so that authorised users may use these also
* When de-installed, all databases are exported with gwu (should allow
smooth upgrades when the databse format changes)
-- Brent A. Fulgham <bfulgham> Mon, 22 Jan 2001 19:30:47 -0800
See? Already "debconf translation to French"! "More languages
available". Here we are.
As discussed with Brent, he propsoed me to take the package over. So,
on January 11th 2001, I had applied in the New Maintainer Process.
I'm amazed how quickly it went indeed: there was a tool I needed, it
needed to be packaged, I could handle the packaging...and then I
decided to be involved.
Here we are: bubulle is on his way to become one of those magicians
who are building the best universal operating system. Yes, me, the
clueless material scientist..:-)
How did it go? You'll know this in next episode, of course...
for the second
time, I'm at Steve's for his yearly barbecue.
After I'd done my waffles back at Banja Luka, I off-hand suggested to
do them again at the barbecue, which people replied to with an
enthousiastic 'oh yes!' from multiple mouths. So that's what
happened.
I did overdo it on the amounts, though since after I'd baked 750g
flour worth of dough, everyone still awake had already had a waffle; and
I still had 500g flour worth to go. Since the dough can't be conserved
overnight, I had to finish all of them. Which meant that I was still
making waffles at 2AM, and no-one was eating them anymore. Bummer. Oh
well, some people (including myself) had waffles this morning
instead.
Speaking of waffles, and by popular demand: A few years ago I blogged the
recipe of my waffles (hidden in a blog post about a large number of
other things).
The rest of the barbecue was fairly nice, too. I mean, obviously it
is: good food, good beer, good people to talk to, what more would you
want? Exactly.
Right now I'm waiting for food that is being prepared, after which
I'll probably get in my car and start driving home again. But that's not
for now just yet.
Yet another useful tool of which at least I heard quite late in my
Unix career is watch . For a long time I wrote one-liners like this
to monitor the output of a command:
while :; do echo -n " date "; host bla nameserver; sleep 2; doneBut it s way shorter and less error-prone to use watch from Debian s procps package and just write
watch host bla nameserverThe only relevant difference is that I don t have some kind of history when the output of the command changed, e.g. to calculate the rate with which a file grows. You can even track the output of more than one command:
watch 'ps aux grep resize2fs; df -hl'Also a nice way to use watch is to run it inside GNU Screen (or tmux or splitvt) and split up the terminal horizontally, i.e. show the output of watch in one window and the process you re tracking with the commands run by watch in the other window and see both running at the same time. Update, Sunday, 28th of August 2011, 17:13h I never found a useful case for watch s
-d option which
highlights changes to the previous run (by inverting the changed
bytes), but until now three people pointed out the -d
option in response to this blog-posting and weasel also had some nice
examples, so here are they:
Keep an eye on the current network routes (once per second) of a host
and quickly notice when they change:
watch -n1 -d ip rWatch the current directory for size or time stamp changes of its files:
watch -d ls -lThe option
-d only highlights changes from the previous run to the
next run. If you want to see all bytes which ever changed since the
first run, use --differences=cumulative.
Thanks to Klaus Mowgli Ethgen, Ulrich mru Dangel, Uli youam
Martens and Peter weasel Palfrader for comments and suggestions.
This is a direct followup on my previous blog posting about calculating IPs and netmasks with the tools
netmask and prips. Kurt Roeckx (via e-mail) and Niall Donegan (via
a comment to that blog posting) both told me about the package sipcalc, and Kurt also mentioned the package ipcalc. Thanks for that! And since I found both useful, too,
let s put them in their own blog posting:
Both tools, ipcalc
and sipcalc offer a get all information at once mode
which are not present in the previously presented tool netmask.
ipcalc
ipcalc by default outputs all information and even in ANSI colors:
$ ipcalc 192.168.96.0/21 Address: 192.168.96.0 11000000.10101000.01100 000.00000000 Netmask: 255.255.248.0 = 21 11111111.11111111.11111 000.00000000 Wildcard: 0.0.7.255 00000000.00000000.00000 111.11111111 => Network: 192.168.96.0/21 11000000.10101000.01100 000.00000000 HostMin: 192.168.96.1 11000000.10101000.01100 000.00000001 HostMax: 192.168.103.254 11000000.10101000.01100 111.11111110 Broadcast: 192.168.103.255 11000000.10101000.01100 111.11111111 Hosts/Net: 2046 Class C, Private Internet(Coloured Screenshots done with ANSI HTML Adapter from the package aha.) You can suppress the bitwise option or directly output HTML via commandline options. For example
ipcalc -b -h 192.168.96.0/21
outputs the following content:
Yes, that s an HTML table and no preformatted text, just with a monospaced font. (I just removed the hardcoded text color from it, otherwise it would not look nice on dark backgrounds like in Planet Commandline s default color scheme.) Like netmask, ipcalc can also deaggregate IP ranges into largest possible networks:
Address: 192.168.96.0 Netmask: 255.255.248.0 = 21 Wildcard: 0.0.7.255 => Network: 192.168.96.0/21 HostMin: 192.168.96.1 HostMax: 192.168.103.254 Broadcast: 192.168.103.255 Hosts/Net: 2046 Class C, Private Internet
$ ipcalc 192.168.87.0 - 192.168.110.255 deaggregate 192.168.87.0 - 192.168.110.255 192.168.87.0/24 192.168.88.0/21 192.168.96.0/21 192.168.104.0/22 192.168.108.0/23 192.168.110.0/24(
ipcalc -r 192.168.87.0 192.168.110.255 is just another
way to write this, and it results in the same output.)
To find networks with at least 20, 63 and 30 IP addresses within a /24
network, use for example:
Address: 192.0.2.0 Netmask: 255.255.255.0 = 24 Wildcard: 0.0.0.255 => Network: 192.0.2.0/24 HostMin: 192.0.2.1 HostMax: 192.0.2.254 Broadcast: 192.0.2.255 Hosts/Net: 254 Class C 1. Requested size: 20 hosts Netmask: 255.255.255.224 = 27 Network: 192.0.2.128/27 HostMin: 192.0.2.129 HostMax: 192.0.2.158 Broadcast: 192.0.2.159 Hosts/Net: 30 Class C 2. Requested size: 63 hosts Netmask: 255.255.255.128 = 25 Network: 192.0.2.0/25 HostMin: 192.0.2.1 HostMax: 192.0.2.126 Broadcast: 192.0.2.127 Hosts/Net: 126 Class C 3. Requested size: 30 hosts Netmask: 255.255.255.224 = 27 Network: 192.0.2.160/27 HostMin: 192.0.2.161 HostMax: 192.0.2.190 Broadcast: 192.0.2.191 Hosts/Net: 30 Class C Needed size: 192 addresses. Used network: 192.0.2.0/24 Unused: 192.0.2.192/26sipcalc sipcalc is similar to ipcalc. One big difference seems to be the IPv6 support:
$ sipcalc 2001:DB8::/32
-[ipv6 : 2001:DB8::/32] - 0
[IPV6 INFO]
Expanded Address - 2001:0db8:0000:0000:0000:0000:0000:0000
Compressed address - 2001:db8::
Subnet prefix (masked) - 2001:db8:0:0:0:0:0:0/32
Address ID (masked) - 0:0:0:0:0:0:0:0/32
Prefix address - ffff:ffff:0:0:0:0:0:0
Prefix length - 32
Address type - Aggregatable Global Unicast Addresses
Network range - 2001:0db8:0000:0000:0000:0000:0000:0000 -
2001:0db8:ffff:ffff:ffff:ffff:ffff:ffff
(Thanks to Niall for the pointer to RFC3849. :-)
It can also split up networks into smaller chunks, but only same-size
chunks, like e.g. split a /32 IPv6 network into /34 networks:
sipcalc -S34 2001:DB8::/32
-[ipv6 : 2001:DB8::/32] - 0
[Split network]
Network - 2001:0db8:0000:0000:0000:0000:0000:0000 -
2001:0db8:3fff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:4000:0000:0000:0000:0000:0000 -
2001:0db8:7fff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:8000:0000:0000:0000:0000:0000 -
2001:0db8:bfff:ffff:ffff:ffff:ffff:ffff
Network - 2001:0db8:c000:0000:0000:0000:0000:0000 -
2001:0db8:ffff:ffff:ffff:ffff:ffff:ffff
-
Similar thing with IPv4:
sipcalc -s27 192.0.2.0/24 -[ipv4 : 192.0.2.0/24] - 0 [Split network] Network - 192.0.2.0 - 192.0.2.31 Network - 192.0.2.32 - 192.0.2.63 Network - 192.0.2.64 - 192.0.2.95 Network - 192.0.2.96 - 192.0.2.127 Network - 192.0.2.128 - 192.0.2.159 Network - 192.0.2.160 - 192.0.2.191 Network - 192.0.2.192 - 192.0.2.223 Network - 192.0.2.224 - 192.0.2.255sipcalc also has a show me all information mode with the -a option:
$ sipcalc -a 192.168.96.0/21
-[ipv4 : 192.168.96.0/21] - 0
[Classfull]
Host address - 192.168.96.0
Host address (decimal) - 3232260096
Host address (hex) - C0A86000
Network address - 192.168.96.0
Network class - C
Network mask - 255.255.255.0
Network mask (hex) - FFFFFF00
Broadcast address - 192.168.96.255
[CIDR]
Host address - 192.168.96.0
Host address (decimal) - 3232260096
Host address (hex) - C0A86000
Network address - 192.168.96.0
Network mask - 255.255.248.0
Network mask (bits) - 21
Network mask (hex) - FFFFF800
Broadcast address - 192.168.103.255
Cisco wildcard - 0.0.7.255
Addresses in network - 2048
Network range - 192.168.96.0 - 192.168.103.255
Usable range - 192.168.96.1 - 192.168.103.254
[Classfull bitmaps]
Network address - 11000000.10101000.01100000.00000000
Network mask - 11111111.11111111.11111111.00000000
[CIDR bitmaps]
Host address - 11000000.10101000.01100000.00000000
Network address - 11000000.10101000.01100000.00000000
Network mask - 11111111.11111111.11111000.00000000
Broadcast address - 11000000.10101000.01100111.11111111
Cisco wildcard - 00000000.00000000.00000111.11111111
Network range - 11000000.10101000.01100000.00000000 -
11000000.10101000.01100111.11111111
Usable range - 11000000.10101000.01100000.00000001 -
11000000.10101000.01100111.11111110
[Networks]
Network - 192.168.96.0 - 192.168.103.255 (current)
Thanks again to Kurt and Niall for their contributions!
Now listening to the schreimaschine and fausttanz submissions for the interactive competition at the B nzli/DemoDays in Olten (Switzerland)
On Day 0, we were at my favourite Jugoslawian restaurant, and
during eating and verpeiling, Andi took some pictures:

For a (german) talk I ll be giving soon I was interested in a list of open source projects which use Jenkins. Jenkins is a great open source continuous integration server. I was wondering whether such a list exists but since it doesn t exist yet I created my own and Kohsuke Kawaguchi (creator of Hudson/Jenkins) suggested to blog about it. There we go.
There are two small CLI tools I need often when I m handling larger
networks or more than a few IP addresses at once:
netmask
netmask is very handy for calculating with netmasks (anyone
expected something else? ;-) in all variants:
$ netmask 192.168.96.0/255.255.248.0
192.168.96.0/21
$ netmask -s 192.168.96.0/21
192.168.96.0/255.255.248.0
$ netmask --range 192.168.96.0/21
192.168.96.0-192.168.103.255 (2048)
$ netmask 192.168.96.0:192.168.103.255
192.168.96.0/21
$ netmask 192.168.87.0:192.168.110.255
192.168.87.0/24
192.168.88.0/21
192.168.96.0/21
192.168.104.0/22
192.168.108.0/23
192.168.110.0/24
$ netmask --cisco 192.168.96.0/21
192.168.96.0 0.0.7.255
(The IP ranges in RFC5737 where too small for the examples I had in
mind. :-)
There s though one thing netmask can t do out of the box and that s
where the second tool comes into play:
prips
When I read the package name prips, I always think of
something like print postscript or so, but
it s actually an abbreviation for print IPs .
And that s all it does:
$ prips 192.0.2.0/29 192.0.2.0 192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4 192.0.2.5 192.0.2.6 192.0.2.7 $ prips 198.51.100.1 198.51.100.6 198.51.100.1 198.51.100.2 198.51.100.3 198.51.100.4 198.51.100.5 198.51.100.6 $ prips -i 2 203.0.113.0/28 203.0.113.0 203.0.113.2 203.0.113.4 203.0.113.6 203.0.113.8 203.0.113.10 203.0.113.12 203.0.113.14 $ prips -f hex 192.0.2.8/29 c0000208 c0000209 c000020a c000020b c000020c c000020d c000020e c000020fprips has proven to be very useful in combination with shell loops like these:
$ prips 192.0.2.0/29 xargs -n 1 host [ ] $ for ip in prips 198.51.100.1 198.51.100.6 ; do host $ip; done [ ]And since prips doesn t support the 192.0.2.0/255.255.255.248 netmask syntax, you can even easily combine those two tools:
$ prips netmask 192.0.2.0/255.255.255.248 [ ](Hah! Now I was able to use RFC5737 IP ranges! ;-)
As an enthusiast Open Hardware supporter, I regularly read the always brilliant Dangerous Prototype blog.
14:31 *<* Signoff: XTaran (*.net *.split)
doesn t prevent me from telling him
14:39 <mira AO> XTaran: n i e n i e n i e n i e n i e n i e n i e empfiehlt man k i l l a l l , i m m e r nur p k i l l !Now playing: Monzy kill dash good idea
By the way, you were probably looking for this
-x Require an exact match of the process name, or argument list if
-f is given. The default is to match any substring.
excerpt from the pkill(1) manual page, where you can see it stems from grep(1) clearly.
I already got mails like What a pity that your nice blog posting
series ended . No, it didn t end. As announced, I knew that I won t be
able to keep up a daily schedule. It worked as long as I had already
written the postings in advanced. But in the end the last postings
were already written just in time and then I ran out of leisure and
muse for a time. But as I said: It didn t end, it will be continued.
And this is the next such posting.
Oh, and for those who tell me further tools, I should blog about: I
appreciate that, especially because that way I also hear
about tools I didn t know about. But why just telling me and not
blogging yourself about it? :-) At least those whose blog is part of
Planet Debian or Planet Symlink anyway really should do this
themselves. I d really like to see also others writing about cool
tools. I neither have a right on the idea nor on the name of this
series (call it meme if you want :-), so please go on and publish your
favourite tools in a blog posting, too. :-)
And for all those who want to join me and Myon blogging about cool
Unix tools, independent if listed on Planet Debian or Planet
Symlink, I encourage you to offer a separate feed for this
kind of postings and join us on Planet Commandline.
Anyway, here s the next such posting:
As system administrator you often have the case that you have to kill
all processes of one user, e.g. if a daemon didn t properly shut down
itself or amok running leftovers of a GUI session.
Many use pkill -SIGNAL -u user from the
procps package or killall -SIGNAL -u user
from the psmisc package for it. But that s a) quite
cumbersome to type and b) is there a chance to forget about the -u and
then bad things may happen, especially with pkill s default substring
match, so I prefer another tool with a more explicit name:
kill itself:
slay -SIGNAL user [user ]But beware, slay is
sudo in front of some command is easier to forget than
doing an ssh root@localhost or su -
beforehand. They even seem to be so desperate about it that they forwarded the issue
from Launchpad to the Debian Bug Tracking System. ;-)
But to be honest even if I was very amused about those bug
reports isn t this issue grave , as it causes very likely
(unexpected) data loss?
Now playing: Monzy kill dash nine ( and your process is mine ;-)
Members of the public are advised not to panic at this time.
Twenty years ago today, Linus Torvalds posted to the comp.os.minix newsgroup about his new Free operating system, Linux.
Come celebrate 20 years of Linux at Ohio LinuxFest!
We all hate the A in ADSL, but most of us are stuck with it. So there
are any number of workarounds that keep our link to the Internet
working with a certain amount of perceived fluidity, by way of
"traffic shaping". Many of us use wondershaper for that purpose:
it's a magic tool that keeps the latency low for interactive traffic
by ensuring that the bulk traffic doesn't interfere too much with it.
We all hate the A in ADSL, but most of us are stuck with it. So there
are any number of workarounds that make the establishment of new
connections to external servers feel faster. Many of us use the SSH
"ControlMaster" series of options for that purpose: it's a set of
options that allow new connections to a server to reuse an existing
one if there is already a connection open (or if there was one until
not too long ago), so some time is saved becaused the handshake to
establish the connection is only needed once.
Now combine both. SSH to an external server, for instance, work on
it. Since it's meant to be an interactive connection, slogin will
set some appropriate flags on the IP packets, and wondershaper will
give these packets priority over whatever bulk traffic is happening at
the time. At some point, you realise you need to transfer a large set
of files to there, so you start an SCP transfer. scp, being part of
the SSH suite, will reuse the existing connection. Suddenly, your
bulk transfer will not only get priority over the other kinds of
traffic you might have, but also get intermingled with your keystrokes
in the slogin session to the same server. Which means your
keystrokes will be delayed significantly, and working interactively
becomes even more of a pain. In my case, the priority boost given to
the SCP transfer is sometimes enough to cause other unrelated sockets
to time out.
After reading some docs, I found my solution. It isn't much, but it's
going to change my way of working significantly enough that I'm going
to share it anyway.
Also, since I usealias scp='scp -oControlPath=none'
dput extensively, and it invokes scp in many
cases without reusing my shell aliases, part of my ~/.dput.cf file
reads:
This means I keep the advantages of traffic shaping for interactive sessions, but SCP stuff won't interfere anymore, and I can continue working on the server while the new version of the packages that I need to get there are in transit. One small improvement at a time, progress![DEFAULT] ssh_config_options = ControlPath=none [ ]
Dear Lazyweb,
since KDE4 is in unstable, the taskbar behaves very annoyingly when working with two monitors with different resolutions. I have a laptop. When I m at work, I put it into a docking station which is connected to a huge monitor. I m not working with dualhead or something, I m just using the huge monitor at work and the laptop s screen at home.
I always want the taskbar to be maximized. The problem is, that KDE s taskbar fails to adjust the size of the taskbar correctly: Starting KDE at work, the taskbar is always too small (as wide as the laptop s monitor) and my first task is to maximize the taskbar. Starting KDE when I m back home, the taskbar is too wide (as wide as the external monitor s size) for the smaller monitor and I have to (ironically) maximize it again to fit on the now smaller monitor.
Note that I m not using suspend or something. I m booting the laptop with the big screen connected or not.
I also had that problem with KDE3, but that was fixed upstream long time ago. Has anyone a solution how to avoid this problem?
So, we stopped our very boring story around 1992. Let's summarize
where I was at that moment:
User BobH asked
on StackOverflow about accelerating path-dependent loops. He provided a simple example in which a vector gets filled conditional on the value of
the preceding element. Simple to code, but hard to vectorise.
By the time I saw that question yesterday evening, Josh Ulrich had already posted a nice answer suggesting
to switch from ifelse to if to escape the overhead of a vectorised expression on simple scalars. I meekly added a comment
suggesting that Rcpp would likely do well on this and that someone should volunteer
such an answer. Well, it is still August and Mr. Someone is on holiday, so this morning I followed up with such an answer. And as it turns out to
work quite well indeed, we will repost it here.
Let's start with the general setup, and the two functions supplied by Josh. We also byte-compile these using the compiler package which
is the culmination of several years of work by R core member Luke Tierney. This package was added to R
during the last major release, and we assessed it
in this earlier blog post as well as several Rcpp-related
follow-ups. We also load the packages for on-the-fly 'inline' compilation and easy benchmarking:
We see that basic worker just assign to the i-th element based on the preceding element. Function two uses the aforementionedlibrary(inline) library(rbenchmark) library(compiler) fun1 <- function(z) for(i in 2:NROW(z)) z[i] <- ifelse(z[i-1]==1, 1, 0) z fun1c <- cmpfun(fun1) fun2 <- function(z) for(i in 2:NROW(z)) z[i] <- if(z[i-1]==1) 1 else 0 z fun2c <- cmpfun(fun2)
if statement, and both are also byte-compiled.
Writing the same code in C++ using both Rcpp (for the R/C++ integration) and
inline for the on-the-fly compilation, linking and loading of C++ code into R is pretty
straightforward too:
This single R function call takes the code embedded in the argument to thefunRcpp <- cxxfunction(signature(zs="numeric"), plugin="Rcpp", body=" Rcpp::NumericVector z = Rcpp::NumericVector(zs); int n = z.size(); for (int i=1; i<n; i++) z[i] = (z[i-1]==1.0 ? 1.0 : 0.0); return(z); ")
body variable, builds a complete function in temporary file,
and then compiles, links and loads it. We can now call funRcpp() just like the other four functions and do so via the
benchmark() function of the rbenchmark package.
We can focus on the columns labelled elapsed and relative. The C++ version is faster by a factor of almost one-hundred compared to the byte-compiled version of funtion2, and almost four-hundred times faster than the plain-R variant of function2. And function1 is even worse, coming at well over twenty-two-hundred times the run-time of the C++ version. Byte-compilation also helps little here. For comparison, we also ran the original example of a very short vector, called more frequently:R> z <- rep(c(1,1,0,0,0,0), 100) R> identical(fun1(z),fun2(z),fun1c(z),fun2c(z),funRcpp(z)) [1] TRUE R> R> res <- benchmark(fun1(z), fun2(z), + fun1c(z), fun2c(z), + funRcpp(z), + columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"), + order="relative", + replications=1000) R> print(res) test replications elapsed relative user.self sys.self 5 funRcpp(z) 1000 0.005 1.0 0.01 0 4 fun2c(z) 1000 0.482 96.4 0.48 0 2 fun2(z) 1000 1.989 397.8 1.98 0 3 fun1c(z) 1000 11.365 2273.0 11.37 0 1 fun1(z) 1000 13.210 2642.0 13.21 0
The qualitative ranking is unchanged: the Rcpp version dominates. Function2 usingR> z <- c(1,1,0,0,0,0) R> res2 <- benchmark(fun1(z), fun2(z), + fun1c(z), fun2c(z), + funRcpp(z), + columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"), + order="relative", + replications=10000) R> print(res2) test replications elapsed relative user.self sys.self 5 funRcpp(z) 10000 0.047 1.00000 0.04 0 4 fun2c(z) 10000 0.134 2.85106 0.13 0 2 fun2(z) 10000 0.328 6.97872 0.32 0 3 fun1c(z) 10000 1.080 22.97872 1.08 0 1 fun1(z) 10000 1.243 26.44681 1.24 0
if instead of the vectorised ifelse is second-best with the byte-compiled version being about twice as fast that the plain R
variant, but still almost three times slower than the C++ version. And the relative differences are less pronounced: relatively speaking, the
function call overhead matters less here and the actual looping matters more: C++ gets a bigger advantage on the actual loop operations in the longer
vectors. That it is an important result as it suggests that on more real-life sized data, the compiled version may reap a larger benefit.
All in all a nice demonstration of Rcpp, and a gain of almost one-hundred to the best
byte-compiled version is nothing to sneeze at---especially when it is so easy to write and load a five-line C++ function thanks to
Rcpp.
Before closing, a quick reminder that I will giving two classes on
Rcpp in a few weeks. These will be in New York on September 24, and San Franciso on October 8, see
this blog post as well as
this page at Revolution Analytics (who are a
co-organiser of the classes) for details and registration information.
Mike Waychison from Google sent fancy costum tailored enhancements to kinit. Thanks to new klibc capget and capset support kinit now understands "drop_capabilities=" bootparam. It specifies a list of capability names that will be dropped before switching over to init. dirent.h saw the addition of scandir() and alphasort(). Gentoo devs pushed a klcc enhancement. For details see klibc 1.5.25 release annoucement.
A lot of stuff is in work: current klibc patch queue.
This is my fifth and final report about dextools for the 2011 Google Summer of Code program. During the summer, I worked with Matt Zimmerman and Stefano Zacchiroli to create a replacement web dashboard for the Debian Derivatives Exchange (DEX). The dashboard displays a list of projects and their respective tasks and then allows users to easily update the status of these tasks. The dashboard also contains two graphs for tracking the progress of projects and providing instant recognition of all contributions to a project.
At the start of the summer, I knew that I wanted to to work on improving the DEX infrastructure. I had worked with the team on the ancient-merges project, and while a lot of good work was accomplished, the process for tracking our progress was a bit clunky and difficult to interact with. Anyone who read my initial proposal for the Summer of Code would probably agree that it was quite vague. I really did not have a solid plan for what I wanted to accomplish.
This began to change after my initial phone call with my mentor, Matt Zimmerman. We decided that the first thing I would work on would be a basic dashboard. Our plan was to have all of the data stored on the Debian BTS. This would allow Debian Maintainers to benefit from DEX without needing to learn about DEX s tools and workflows. The dashboard would support multiple derivatives and multiple projects for each derivative. Each project would be made up of a list of tasks, where each task is linked to a BTS bug.
I prepared a mockup and some initial code based on that plan. The dashboard was able to successfully display a list of BTS bugs and their information. It generated the lists by assuming that bugs would be usertagged with a user of debian-derivatives@lists.debian.org and a tag in the format of dex Next.