Search Results: "ag"

30 December 2007

Joey Hess: haskell baby steps

Since early August, I had forgotten about my plan to learn haskell. Today I refreshed my memory from the docs I read back then, and started writing some very simple programs. Reading a lot of docs and letting it gel for a few months seems to have worked fairly well, I was able to throw this program together in short order, and I think it's not too horrible.
putStrs = putStr.unlines
x s n = unwords $ take n $ repeat s
plot x s = (take (x-1) s) ++ "  " ++ (drop (x+1) s)
f x = truncate(40 + 38 * sin(x / 9))
line = "JOEY HESS"  x  8 
main = putStrs [ plot x line   x <- map f [1..]]
If you're wondering what it does, the equivilant perl is:
#!/usr/bin/perl -lisubstr($_,39+38*sin++$y/9,2)=$s
for($s='  ' McQ;$_='JOEY HESS 'x8;print) eval$^I 
I suppose both demonstrate features of their language to some extent.
At first I assumed haskell would automatically convert the floating point value coming out of sin and I got a nasty suprise:
    No instance for (Floating Int)
      arising from use of  f' at foo.hs:17:21-26
    Possible fix: add an instance declaration for (Floating Int)
Adding the truncate fixed that, but figuring that out from the above error message and google took longer than figuring out how to write the rest of the program. :-(

29 December 2007

Wouter Verhelst: NBD 1:2.9.9-3

I just uploaded the Debian packages versioned 1:2.9.9-2 (almost immediately followed by 1:2.9.9-3, because I forgot to test part of it, and obviously that part turns out to be broken), containing some updates: The two combined should allow for running a root filesystem on an NBD device. Note that the initramfs scripts haven't received any testing beyond my system yet; it's not impossible that they're broken in some regard. Treat them with some caution. Having said that, testing would be welcome... Next, I've also started work on partman-nbd. This is in an even more experimental and unfinished state, but the eventual goal is to support installing to an NBD device. Wouldn't that be nice.

David Nusinow: Processing

I've been taking a little bit of time away from Debian and X to see what sort of fun stuff is out there that I've been putting off learning. Aside from finding what looks to be a good fitness training plan for the next year (and hopefully beyond), I've been looking at different programming languages. One that I found most recently is Processing.

This program is absurd amounts of fun to play with. I've long been interested in how to do display complicated data sets visually, and processing is really built to allow you to do that relatively easily. More and more often in my work lately I've been generating fairly large data sets, and I'm not really satisfied with the standard graphs that come with a spreadsheet. They work for basic data, but they completely fall down when you need something bigger. You can either add more graphs or just have a large table, both of which are suboptimal. Processing is centered around the concept of sketches, quickly where you quickly type some java code in to the IDE, hit the play button, and have it run. The API is very simple and should be intuitive to anyone who's done any coding before. This lets you play around with how to visualize your data at very low cost.

The software is GPL'ed, and while it relies on java, this shouldn't really be a problem in the near future. Unfortunately, java is java, and to be honest I'd rather be writing something like python or ruby. Options for those seem to be forthcoming (nodebox is apparently being ported to linux and scribble is out there in some form now) but processing has an impressive and easy setup as it is. I'll definitely be picking up one of the new books when it's available.

Steve Kemp: You are the witness of change

As I wrote yesterday I've recently ordered, and now received a new desktop machine. For completeness I've now finished juggling machines around and installed etch twice - so now I have two working desktop machines:
gold.my.flat (unstable)
This is my personal machine, fitted with 4Gb of RAM. It is currently running 6 xen instances of 256Mb each leaving me with more meory free than I have ever had upon my desktop machine - so the upgrade was definitely worthwhile!. (The previous machine had bad sockets and couldn't take more than 1Gb of RAM - hence the replacement rather than mere upgrade.)
vain.my.flat (etch)
This, reinstalled, machine is now running only backuppc and those programs that Meg/random guests wish to run.
In terms of networking I've now split things up into three well-defined ranges. Knowing how things develop I'll not expect this to contining, but right now I'm pleased with: All in all I'm very happy with the work of the day even if I did have to rsync stuff all over the place, juggle power cables and install Etch upon both the new machine, and the re-purposed backup machine. (Since that was previously my mahcine and was running sid.) The following links were helpful. All being well tomorrow will be spent tidying the flat, drinking with my erstwhile cat-sitter, and getting ready for work on Monday.

Lior Kaplan: Getting motivation from other people work and cooperation


Recently, I found it hard to contribute to open source in general and Debian in particular. There are several reasons for that: beginning with less free time to contribute and continuing with feeling my contribution becomes more and more routine and thus less interesting / challenging. Yesterday I found the time and motivation to upload fixes to 6 of my packages. I thought it might be interesting to share the reasons for this motivation burst, as it can demonstrate how each of us can affect others. The final trigger was seeing (= getting svn diffs) Baruch Even working on the libhdate package (which is co-maintained as part of debian-hebrew). Prior to that I had people showing interest in my packages, helping with solving bugs, sending patches and even one guy becoming a co-maintainer of a package of mine. Oddly, most of them are ubuntu users. I’m not looking for others to do my work or do it for me, but getting help is always fun and motivating. Also, working with other people creates commitment as they wait for something you should do, or waiting for you to use what they’ve done. For me this starts a positive snow ball which ends with better packages for me and happier people after receiving credit for their work (usually a changelog entry and a thank you mail). So go on, and inspire people (:

Joerg Jaspert: SSH &#8220;triggers&#8221;

Following my post about SSH jumphost I have another SSH feature to share with you, which IMO isn’t known or used enough. Imagine you have some data on one host which gets regenerated every now and then and you also need this data on other hosts too. There are multiple ways to sync the data to other machines. You can The problem of the first option is that you need to make the data available via http/ftp, which needs an extra daemon to run. And then you need to cron a script fetching it, which wastes resources if the data is updated infrequently. The problem of the second option is that you need some daemon available which allows you to write to the host. Depending on what you chose that might be with passwords transferred unencrypted. Or you aren’t able to set it up yourself, as you are not the admin of the machine. So, lets take the third solution. Its safe to assume that SSH is available on the hosts you login to (don’t tell me you still use telnet/rlogin on remote machines), so lets use SSH features. I assume that usage of basic SSH public key authentication is known, if not you first want to google for it and learn about that. Using SSH keys to trigger actions on remote hosts is basically the same as a login to the machine and manually running a command - except you don’t need to do it yourself, a script is doing it. Which leads to one big difference for a “trigger” key compared to a “login” key: You do not set a passphrase for that SSH key! As a consequence of that you use such a key only for exactly one purpose, nothing else. Generate a new key for another trigger. Never, ever, use such a passphrase-less SSH key for normal logins to other machines… Having generated a passphrase-less key on host a (let it have IP 1.2.3.4) we copy the .pub file over to the target host b and put it into the authorized_keys file (usually in ~/.ssh/). The difference to normal login keys is the large line of options we put in front of it:
command="rsync --server -vlHogDtprz --delete --delete-after --ignore-errors . /org/backup/something",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from="1.2.3.4" ssh-key-here
or
command="/var/mirror/ftpsync &",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,from="1.2.3.4" ssh-key-here
Both commands allow to use the SSH key from host a with its IP 1.2.3.4 and will run the command thats defined here. No matter what command or options are are specified on the commandline on host a, host b will only do the above. There wont be any port, X11 or agent forwarding and due to the forced command there also wont ever open a shell. With the first command we trigger the remote hosts rsync to write the data we send into that path, using the given options. Of course that means we send data using rsync from our host. The SSH connection stays available for the whole time the command runs. The second command instead runs the given binary, a shell script in this case, in background. As we also forbid tty allocation the SSH connection is closed right after the script is started. To avoid DOSing the remote machine such a script should have some kind of lockfile check and abort if a second copy is already running. SSH also allows to use such limited SSH keys for the root user, while disallowing normal root logins: Change PermitRootLogin in sshd_config from no to forced-commands-only and you wont be able to login to the remote host as root but you can trigger actions that should be run as root. If you want to know what else you can do using options specified in the authorized_keys file then read its man-page, it has some details how you can use it to limit port forward requests, use more than just one IP in the from= parameter, … Some users of the above way of automating tasks on remote machines are

Jeff Licquia: Christmas Gadgets: Creative Zen, LCD Monitor

So it’s a few days after Christmas, and like most of us tech-heads, I’ve got a few more gadgets to play with. First up: the Creative Zen 4GB. This one was a little bit of a saga. Last year, we got the kids no-name MP3 players, on the theory that we didn’t want to spend megabucks on something they wouldn’t use. They made valiant attempts to use them, but the little machines just weren’t up to the job. So, it seemed prudent to buy them iPods this year. Well, except for Apple’s attempts to break all non-iTunes iPod software, which had the side effect of making the devices unusable under Linux. Still, this was what they wanted, and they had been good this year, and very patient with my ever-more-convoluted schemes to get the old players working. So, iPod Nano 3Gs for both of them. My heart sank as I watched some of my hard-earned money go to reward such behavior. As part of the deal, I vowed to find a non-Apple player that would be good for when the iPods gave up the ghost or became “uncool”. And my dear wife, upon hearing this, went online, did some research, and bought me the aforementioned Creative Zen 4GB. From a Linux perspective, it’s in the “not quite ready for prime time” mode. Rhythmbox and Banshee are working on support; I tried a prerelease of Rhythmbox, and found its support to be very unstable. The only usable app is Gnomad2, which has a terrible UI and also occasionally crashes, but can manage to upload audio, video, and photos without too much hassle. Still, this is a problem of fine-tuning, and not of a hostile hardware vendor; I’m confident that these devices will be well-supported in the near future. The Zen is picky about what video files it will play, but I managed to figure it out: DivX or XviD video, 320×200 or smaller image size, encoded at a 480 kbit/sec video bitrate or less. Other video files might work, too, but you’ll have to find them on your own. My Zen has a little problem with the button locking feature: after unlocking, the screen comes up to all-white, and you have to power-cycle it to get the display back. I’m assuming this is a firmware bug, as the screen is still visible for a short time after engaging the lock. Other than this, the Zen is a delight, and every bit as functional as the iPod. The other nice gadget: a 24-inch LCD from Envision, bought after Christmas with a combination of gift cards, exchanges, and some of my own money. It was an open-box, and I saved about $80 for that; the only problem turns out to be a single dead pixel in the corner of the screen which is barely visible. It does 1920×1200 in very nice, bright color. Here, too, an improvement on my life only came after some effort. Debian 4.0’s drivers for the Intel graphics chipset are not capable of driving a widescreen LCD; the best I could get was 1600×1200, a normal-width resolution stretched across the wide display. I booted an Ubuntu Gutsy live CD to verify that the problem wasn’t with the monitor, and then set to the task of backporting everything I needed from lenny. Happily, before I started, I found that someone (Holger Levsen, to be exact) had done the work for me. Things are now about 90% there. The new drivers still don’t have everything figured out for running both Compiz desktop effects and XVideo acceleration at the same time, so I’ve had to turn XVideo off. My computer can render video without hardware support, but the quality isn’t as high. But, I have my nice wide screen, with crisp fonts and lots of room. I figure I’ll live with what I have until lenny releases, and then see what progress has been made.

Enrico Zini: eeepc

Meet the EeePC Being in Taiwan, we swiftly got hold of an Eeepc. Instead of installing Debian into it, we decided to keep the original system and see how it works. It's a Debian derivative, and the feeling inside a terminal window is quite familiar. The boot is very fast. Two seconds after the video bios quickly shows on the screen, the X cursor appears. It's definitely worth having a look at how this devil boots. The "Asus Launcher" is worth a look. IMHO it's nicer and more useful than the usual launcher menu that we get in Gnome or KDE 3, although it probably only makes sense on a small display. It replaces the desktop background, has tabs, no clutter and allows to launch applications. Turns out it's customisable as well. What's on the system KDE 3.4.2, with some applications renamed so that their names are more human. For example, konsole became console. vim! \o/ But not emacs :) mc! Someone out there wanted to make my life easier. fbreader. I had never heard of it, but it's a very good discovery that I've now started to use it on my laptop as well. Little howtos To get to a terminal, hit Ctrl+T in the file manager, or Ctrl+Alt+T elsewhere. The root password is the same as the user password. To change the system language, I managed with a simple dpkg-reconfigure locales. Ways they simplified the unix system It's single user: I didn't find a way to create multiple users besides the terminal, and the login program does not ask for a username, only for the password. The "win" key has a house painted on it, and it's used as "hide/show all applications" key. When all applications are minimised, the Asus launcher is visible instead of the X background: this behaviour basically turns the key into a sort of "run application" key. The key still works as a kind of shift, although it probably was not intended to. The repository management is interesting. /etc/apt/sources.list contains:
deb http://update.eeepc.asus.com/p701 p701 main
deb http://update.eeepc.asus.com/p701/tw p701 main
which means they have a repository per eepc model and a subrepository per localised version. The "Internet" group of applications has a Wikipedia toplevel application: it's nice to see the ecosystem of free software / free culture coming together to provide a nice user experience. An extra link to the SD card mount point (besides the one in /mount) appears in the home directory automatically when the SD card is inserted. This means that when you do "save as" from all sorts of applications, the SD card is there, easy to reach. This helps if one decides not to use the internal flash for data, and just save everything in the SD card: I like doing this, as it allows me to quickly move the SD card with all the data between the EeePC and other computers. Changes I made so far Activate en_GB.UTF-8 via dpkg-reconfigure locales. Add en_GB.UTF-8 to /etc/scim/global, to get SCIM input methods to work. Little flaws Virtual screens are enabled, so W+arrow switches virtual screen. The feeling you get if you hit W+arrow is that all your applications disappeared. This could be improved by having the vm keep the asus launcher at the bottom of the current virtual screen, instead of just at the bottom of the first screen. Or, to disable virtual screens by default. It is possible to drag the lower panel around, maybe accidentally: that's another of our fancy default "features" that should be disabled by default. It is also possible to remove applets from the applet bar by mistake: for example I wanted to disconenct the wireless, and I instead ended up quitting the wireless applet. Luckily, the next time I started the computer it magically came back. ~/.xsession-errors is continuously getting the useless stdout/stderr debugging flood of GUI apps. Noone bothers usually, except that in this case the file is on flash, where unneeded writes are also very much unwanted. I'm considering symlinking it to /dev/null, but ideally we should get GUI apps to only write out what is really important. Battery charging doesn't show how long it is going to take until the battery is fully charged. No capslock or numlock leds. This probably calls for disabling or remapping of capslock. Numlock is very hard to hit by accident, but capslock is. Random thoughts If you buy an eeepc, I really suggest you think of it a mass consumption appliance and stay on the original OS for a while. Most of what's in here is what we use everyday, just on a different context. Try to use it as an appliance and see if it is perfect, and if it isn't, try to find out what is missing. It is a fantastic way to find out important bits that are missing in Debian as well. Also, if you're used to tailoring everything to yourself before starting to use a Linux system, this is a great way to try the usage experience that we can offer by default. The Firefox welcome page the first time you connect, for example, is surprisingly nice. Everything we know as doable comes a bit as as a surprise because this time someone has done it for us. I wish that that someone can be invited to talk at the next Debconf: the possibility of having a look at the work that has been done in bending Debian to this nice little device is to me one of the most valuable things so far about the eeepc. Help/About KDE/Credits It's reachable by most applications, and says:
The development team would like to thank the following people and organizations for their contributions:
  • the Debian Project,
  • the GNU Project,
  • the KDE Project,
  • the Mozilla Project,
  • the OpenOffice.org Project,
  • the SAMBA Project,
  • the X.Org Foundation,
Linus Torvalds and the other Linux kernel developers, and Free software developers around the world.
I'm using an appliance that is thanking me, and others like me: priceless!

Christian Perrier: eeepc and the French keyboard

Enrico's post about the EeePC made me look closer to this thing. Wow. I actually didn't know that this PC is not only designed to be cheap and small and running Linux....but *also* has a custom Debian distribution pre-installed. Given the various explanations given by Enrico, that seems to be a killer CDD, indeed. It's been a while since I want to install a machine for my father in law, who's 85 without any computing skills. I was about to install a light Debian system on a small laptop but I was really fearing that some quirks we (geeks) never notice would be blockers. Apparently, Asus managed to polish everything to a level that's suitable for the average user (making compromises, of course, such as the user management system but, hey, when one knows about the "user management" in Windows XP Home, that's still a huge improvment). So, the last blocker for /me to buy such a beast is the damn keyboard. I can't imagine giving a machine without our beloved French AZERTY keyboard (even to a non computer-skilled person: we have tons of appliances around here, including the (in)famous Minital that do use this keymap). So, do Asus sell these for exotic countries? :-). Of course, any hack like putting stickers on a crappy QWERTY keyboard is out of question.

28 December 2007

Lior Kaplan: conffiles, newer packages and purging


Earlier this month Kumar Appaiah opened a bug against the culmus package as part of the stable -> unstable piuparts upgrade tests. First, I’m proud in Debian to have these tests. Thanks for the people involved with running them, parsing the log files and reporting the bugs. I really feel the lake of such checks in commercial distributions I work with. After finding the time to get to the bottom of the bug, and talking with Kumar, it seems most of the bugs found in the test are similar. I think this might indicate something wrong in a more basic level of the package handling. The source of these bugs is how to handle files which were conffile in version x, but aren’t included in version x+1 (as a regular file). In the common situation, the conffiles are removed only during the purge process and not during upgrade or removal. But if a conffile doesn’t exist in the x+1 package, no one will “own” it after the upgrade, and no will purge it in due time. This is why changing conffiles can result in extra files on our system, which is the problem discovered by the recent piuparts test. One solution will be that each package maintainer will add the necessary code to the maintainer scripts to remove the file on upgrade. A second solution is to decide the wanted behavior in such a case and to have dpkg handle it for all packages. The behavior can be to remove the old conffile during the upgrade (postinst script) or to dynamically add it to the list of files owned by the package. Although technically possible, I’m not sure if the second method is “legal” with the debian policy. I thought it would be better to hear others’ opinions before submitting a wishlist bug about this.

Philipp Kern: Digicam wanted... any suggestions?

My wish to buy a digicam or to receive it as a birthday or Christmas gift is quite old actually. Exactly a year ago I already looked out for suitable models at Amazon and had trouble finding something satisfyable. Just like now. I really don't want to dig into the whole market of cams to get an overview of what's available. My parents own an older 5 MP Canon PowerShot, which is just fine. It uses standard rechargeable batteries and has a turnable display. Now the latter is not really available anymore and the reviews of Canon cams on Amazon are not too promising, neither, i.e. they claim that the quality got worse in the last two years since we buyed that old cam. Does anyone have some recommendations of cameras in the 100 < x < 200 Euro range which get along with standard batteries? Preferably it would use SD cards as my laptop happens to provide a reader for it. A finder is not really required, as I use the display for almost all pictures anyway, but the display should have a sensible resolution (something people also critisised when looking at Canon cams). The lens should provide a bit of wide-angle and should obviously be good. As my blog does not provide any comments facility (yet), I appreciate emails at pkern (at) debian.org with suggestions, especially if you made some personal experiences. (Although I know that people here prefer digital mirror reflex cams, but those are just too expensive for me.) Thanks in advance, dear Lazyweb!

Martin-&#201;ric Racine: O: planner -- project management application

While looking at outstanding bugs against my Debian packages, I noticed that an RC bug had crept in against Planner. The bug itself isn't new. In fact, Ubuntu had experienced it already and simply decided to build their package without SQL support to resolve the issue. Planner is a fairly well-matured piece of software, with very few bugs remaining. It remains quite usable in everyday use. However, it has fallen behind in terms of keeping its code up-to-date against the latest versions of some optional dependencies. Tonight, I was just sitting here pondering what to do and it occurred to me that I'm simply no longer interested in maintaining the package. I have done a fairly good job of overhauling the build scripts and of upgrading them for the Python transition but, at this stage, I feel that I've accomplished as much as I could do. Besides, I no longer have the time to maintain so many packages, so I have decided to focus on maintaining those I actually care for and Planner isn't one of them. The package already is assigned to Debian's GNOME team, so no need to actually orphan it, since anyone from the team can pick it up. If you're a member of the GNOME team and feel like taking over, perhaps even submitting patches to upstream to close a few more bugs, go right ahead and jump in.

Margarita Manterola: Argentina changes timezone

In a sudden rush of stupidity, the Argentinian government decided that we should change our timezone to include DST. For those that don't know, Argentina lies almost completely in the GMT-4 zone. 20 years ago we used to have DST, switching between GMT-4 and GMT-3. But since 1990 we've been using GMT-3 as the permanent timezone for our country. Thus, noon happens at 13:00 (or even later in more western parts of the country). Now, since we are in energetic crisis, our government decided that we should go back to DST, but instead of GMT-4 and GMT-3, we are going to be GMT-3 and GMT-2. This means that during the summer noon will happen at 14:00 or later. Not only this, but they decided to do this on December 21st, passed the law on December 26th, and published it on December 28th. And the day of the switch is December 30th!. Thanks to the quick work of Clint Adams, a patch was provided, applied and uploaded to unstable today, and it's already available. After the package was uploaded, I patched Etch's version so that we could upgrade all our servers. So, in case you need to take Argentina's stupidity into account, you can currently download tzdata_2007j-3 from unstable, or download tzdata_2007j-1etch2 from:
deb http://volatile.debian.org/debian-volatile stable/volatile main
Updated to reflect current situation of the package

Holger Levsen: 24C3 day two - 8h to complete a blog post

It's noon now and half the attendees or so the day hasn't really begun. Sure, some people here at the 24C3 in Berlin are having lunch already, but most are having breakfast or not even that yet. As the Debian booth is set up (mugs are sold out, bags almost...) and there are no interesting talks for me at the moment, I'm having a second breakfast in the smokers lounge is the cellar. Officially, this is the third non smoking congress and inofficially it's the third time there is an official smoker place ;-) This time, it's a lounge with comfortable sofas, ambient light and loud music...

About four weeks ago I was contacted by Martin Michlmayr and asked if the video team could make use of some hardware donation a company wanted to sponsor. I said yes, and so last week two boxes arrived at my house: a small audio mixer, a Behringer XENYX 1202 with 12-channels and XLR and chinch inputs, which is supposed to help us improve the audio quality in small venues. The second box contained a TwinPact100, which is a video converter box. It has an SVGA-input (supporting up to 1600x1200), an SVGA-output (sending the same signal out) and DV (firewire) output (and more features we don't really care about). So for us it's basically a SVGA-passthrough box which also outputs a video stream (of a speakers laptop in our use case) over firewire. So no more capturing of slides with a normal camera, yay! Yesterday Ben Hutchings and me tested this box and found it working, then Ben also fixed an issue with dvswitch, which we use to mix different firewire video streams together, probably even as soon as FOSDEM again! Many thanks to hitflip.de for this nice donation!

When I arrived here this morning I hoped to see the BabelBox I set up last night to be still running, and it was, yay! BabelBox is a d-i setup which loops through an installation of Debian etch in 36 languages, mostly using the graphical installer. And this will be running here for approx 72 hours non-stop resulting in 289 installations without a single keystroke :) IMO it shows real nicely two of the three major strengths of d-i: internationalisation and automatisation.

I guess it's pretty unlikely that I'll find some time during the last two days of the congress to take Andre Salomons packages for the OLPC laptop and demonstrate d-i's third major feature: it's modular design. It's more likely to be an excercise for next year though (I'll arrive home on the 31st..), here is too much stuff happening. Installing babelbox was just following a good howto. In any case, there is a OLPC.de meeting planned tomorrow at 12.30 noon at the Debian booth or in the Embedded Corner. Just come along and look out for the green cluster of XOs :)

And by now it's 8 PM - time flies when you're having fun. I just noticed that my wireless connection is up since seven hours uninterrupted! Wow.

Enrico Zini: bluetooth-headset-for-presentations

Using a bluetooth headset for giving presentations While looking for ways of flipping slides while not near the computer, I stumbled on this idea this idea, bought a cheap headset for like 10euros and started playing. Getting the headset to work with alsa It's supposed to just work, but bluez-utils in Debian has audio support disabled. I've rebuild the package with the patch found in the bug report, copied the extra configuration files as I mentioned in a followup to the bug report, and brought my Debian up to speed. Once the patched bluez-utils is in place, this is how to get the headset to work:
  1. put the headset into pairing mode
  2. hcitool scan (to get the address of the headset)
  3. put this in ~/.asoundrc (using the address you got with hcitool scan):
    pcm.bluetooth_hw  
       type bluetooth
       device 00:11:22:33:44:55
     
    ctl.bluetooth  
       type bluetooth
       device 00:11:22:33:44:55
     
    # No idea why this is needed, but it makes aplay complain a bit
    # less, and also it makes aoss work
    pcm.bluetooth  
        type plug
        slave.pcm "bluetooth_hw"
     
    
Now, forget hcitool cc: in order to pair with the headset, the command is:
mplayer -ao alsa:device=bluetooth moo.wav
This will trigger a funky chain of events that will eventually cause the bluetooth applet to ask you for the pin (0000 for the headsets), get things paired and activate super cow powers. Now you have an alsa sound card called 'bluetooth' that works only with some, but not all, alsa applications. mplayer works. aoss works, but not always. aplay seems to work. twinkle won't work; apparently, it's because it tries to open the device multiple times. Feeding synthesised speech to the headset Synthesised speech is done by festival. Festival works with oss. The headset works with alsa. aoss works, but not always. This is the script I'd like to run:
#!/bin/sh
warn()  
    echo -n "Attenzione: "
    if [ $1 == 1 ]
    then
        echo -n "manca un minuto"
    else
        echo -n "mancano $1 minuti"
    fi
    echo " alla fine."
 
(
    for x in 5 4 3 2 1
    do
        warn $x
        sleep 1
    done
)   festival --tts --language italian
By tweaking the sleep times and numbers a bit, it's a useful prototype that sends updates on how much time is left for the presentation. This, under aoss, does not work reliably. An alternative is to replace the festival invocation with this:
echo string   text2wave tmpfile.wav
mplayer -ao alsa:device=bluetooth tmpfile.wav
However, I found no way to tell text2wave to use Italian instead of English. I did manage, however, to get some link between festival and the headphones. At a further stage, I can write a program for the countdown that keeps the audio device open and every once in a while gets a waveform out of text2wave and feeds it to the audio device. Keeping the audio device open seems a good idea, to avoid losing the beginning of the message while the connection is established (happens with my cheap headset) and to avoid the headset to go idle and switch off. Reacting to the buttons on the headset It's supposed to be possible, but I didn't manage to find out how to do this using the normal alsa driver, now that btsco is apparently deprecated. Once I find out how to be notified of button presses, I'll try to see how to send a Page Down keystroke to OpenOffice Impress or xpdf. Voice commands sphinx2-bin seems promising, but since everyone around me is now asleep, playing with voice commands has to be postponed. Further ideas

Adam Rosi-Kessel: MBTA On Time

After my many philippics against the MBTA, I should give the T credit for being nearly 100% on time this week (at least within five to ten minutes of target), so much so that I am often sprinting to catch the train because I had gotten used to it being late. That the trains are only half-full due to people’s vacations must be related. So maybe the long-term solution is to alienate enough riders that they leave the system? Technorati Tags: ,

Russell Coker: Twilight of the Books?

I’ve just read an interesting article in the New Yorker titled “Twilight of the Books” [1]. It started with some depressing statistics about literacy. One comment that I couldn’t figure out concerned “the panic that takes hold of humanists when the decline of reading is discussed“. The decline in literacy concerns me because I want to live in a society where everyone can contribute as equals and where all voters have the possibility of becoming well informed about the issues that affect their vote. If literacy declines far enough then fascism seems to be the inevitable result. I’m not sure whether that makes me a humanist according to the author. Below in the second part of this post (not included in the feed) I include my dictionary definition of the word, #4 is the definition most commonly used today (which is a reasonable match for my beliefs). There is some interesting information regarding basic research on the mental abilities of literate and illiterate people which suggests that people who an read are better at handling abstract concepts and hypothetical situations. The article notes that spending time on the net increases academic scores for children. It also makes the interesting claim that visiting pr0n sites increases grades, I find that difficult to believe. I wonder whether there is a difference between readers and writers in this regard. Does the typical serious net user who averages writing more than 3650 messages a year for fun (in addition to whatever email may need to be written for work) plus some blog posts and writing other web pages have different mental abilities to someone who just reads what others write? Does blogging (and other writing on your choice of topic) change your brain? What about programmers, does spending 8 hours a day writing formal rules for hypothetical mathematical situations (which is essentially what programming is about) change your brain? Are programmers going to have greater abilities for managing abstract concepts and hypothetical situations than people who have not had such experience? NB It will be difficult to determine this as people who have such skills will find programming easier and more fun so therefore a career in programming computers is self-selecting for people with such abilities. Another interesting fact is the results of research into the comprehension of a PowerPoint presentation. People who read it without an audio-visual accompanying it learned more and rated it as more interesting. Based on this my plan is that in future when attending conferences I will try and read papers which are presented BEFORE attending the lectures. Unfortunately most conferences which have papers presented seem based on the idea that you give a lecture about a topic as a teaser for your paper and assume that the audience knows nothing about it (conferences which don’t have papers outnumber the ones that do). Most Linux conferences seem based on the idea that almost no-one reads papers at all, they attend lectures and visit web sites and IRC channels afterwards. NB this comment is based on talking to people who attend conferences and my observations on attending conferences - it is not a criticism of any conferences merely an observation on cultural attitudes. Based on this information it seems reasonable to provide copies of lecture notes to the audience before the lecture. For example for a typical talk that I give to a LUG I could blog the lecture notes before the meeting and email the LUG mailing-list with the URL, people who really want to learn would hear me talk AFTER reading the notes and hopefully get the best of both forms of learning. I had been considering producing some YouTube [2] videos with instructions on how to use SE Linux. But it seems that might not be such a good idea (at least not a good enough idea to justify the amount of effort I would have to spend). The author seems to misunderstand YouTube, it is NOT about making the Internet resemble TV (where millions of mindless drones watch content created for the lowest common denominator in the audience). The AtGoogleTalks on YouTube [3] and www.ted.com are examples of high-quality free content (comparable to the best TV documentaries - the type of content which is cited as increasing the academic results of children) and the culture of creation and discussion must be a good thing. Most TV is bad because it’s one-way communication and the quality of the content is low. YouTube videos are widely discussed in email, blogs, and other written forums. The creation of the best (and often most viewed) videos would surely involve some writing. I wonder whether the benefits attributed to reading can be obtained without reading fiction. The nature of work is changing to require an increasing amount of reading and writing. The most menial work requires reading instruction manuals. Most of the best paid jobs involve a lot of reading and writing. If reading fiction isn’t required then it seems that there is little risk in the immediate future. (more…)

Adeodato Sim : omg, DEBCHANGE_RELEASE_HEURISTIC=changelog

Until today, my workflow for handling debian/changelog was:
  % dch -i -D UNRELEASED
    (or dch -v X -D UNRELEASED)
  % dch -t
  ...
  % dch -t
  % dch -r
The first call opens a new changelog entry with distribution set to UNRELEASED, then each dch -t call adds successive changelog lines (the -t makes dch leave the trailer line untouched, which I find very useful, since it reduces noise in diffs, particulary in multi-maintainer packages), and finally dch -r changes the distribution from UNRELEASED to unstable, and updates the trailer line. While preparing this blog entry, which was about dch -t only, recommending it for everybody, I found that the above workflow is nicely automated for you if you use --release-heuristic changelog, or set DEBCHANGE_RELEASE_HEURISTIC=changelog in ~/.devscripts. Automated as in, just running dch will open a new entry if appropriate (that is, if the latest entry is not UNRELEASED), or will add new lines defaulting to -t. So the workflow now is:
  % dch
    (or dch -v X)
  % dch
  ...
  % dch
  % dch -r
Kudos to Guillem and Joey for #435980 and #448795, and the devscripts maintainers, of course.

Dirk Eddelbuettel: Internet NON-Service Provider: Yet another Comcast saga

About a week ago, our internet connection appears to have dropped around midnight. Not a biggie, one thinks. So on Friday morning between shower, breakfast, and leaving for work, I power-cycled the cable modem and router a few times which 'usually' helps. Not this time. Still no signal by the afternoon, and when Lisa called the help line, they confirmed that they could not see our cable modem. That could have given it away, but I didn't click. This being this time of year, we were actually out overnight on Friday so that I couldn't get to inspect matters at home. Also, friends and neighbours were out the next day so I couldn't get my hands on another cable modem to see if it was the line (my suspicion at the time) or the modem. All I could do was call, go once more over all possibilities with the tier-1 help person -- and schedule a technician to swing by on Monday afternoon, i.e. on Christmas Eve, or about 48 hours later (!!). So I made do over the weekend with two trips to the local library to consume some of their wireless signal to catch up on things. The big surprise came on Monday. The technician, was on time and rather friendly and knowledgeable, checked the signal strength at the box outside, and on two cable outlets in the house. All fairly well. So during the second call to Comcast, we turned our attention to the cable modem. A few years ago I returned the 'leased' modem and bought an inexpensive 3com cable modem. Only after checking that it was supported, of course. Well now it seems that Comcast decided that this (old) modem can only talk Docsys 1.0. And instead of telling me in advance, they just fscking dropped it cold. Unbefriggable. I must be getting two fliers a month informing me how great Comcast's so-called (and IMHO rather overpriced) 'Triple Play' is. You'd think that they use that mail-out infrastructure to let me know about the service change. Or use email, after all they are my ISP. Naaah. Rather just drop the service cold right before the holidays. That's the spirit. To clarify and repeat, I do not mind service updates. I do not mind improving standards and improved throughput. And as I am quite happy to buy a new modem on the spot on Tuesday afternoon -- yes, Christmas eve, because I then have nothing better to do than to troll in the mall to buy a new Motorola cable modem at full retail cost rather than somewhat more cheaply at Amazon or other places -- I could easily have done better if only they had told me in advance. I could go and use some choice terms , but as we're still in the holiday season I better stop... Maybe I should just go back to DSL and save a few bucks.

Erich Schubert: Spamtrap followup

A few days ago, I asked about how to properly embed spamtraps in web pages.Well, noone could tell me if using display: none is appropriate. I actually do not want Google to index the contents in that div. So as long as they don't punish me for using display: none at all, it's okay. And the page I placed the spamtrap on is a doorway-like page for others anyway; it's not part of an important site.It took the first spammer around 54 hours to send the first spam. Or try to send: all 10 retries with different zombies were rejected by my spam filter. Since then, I've been receiving another round of deliver attempts - around 5-15 per spamtrap address - almost every hour.Of the > 500 spam delivery attempts I've seen since, none made it through my initial spam filters (not to speak of the content filter behind that), but they were rejected at the SMTP level, even before the mail content was sent.I've now disabled some of my spam filters to allow the trap adresses to actually receive mail. After all, I want to use them to train my filter. :-)

Next.

Previous.