Search Results: "mt"

6 March 2007

Enrico Zini: why-free-software

A reminder on why we do Free Software Some months ago I needed to find out if proper forward-only cursors were implemented in the ODBC driver for MySQL. I didn't go very far with the documentation, but I've been diving in its source code and within 30 minutes I knew everything there was to know about the subject. Now, after years I haven't touched proprietary software at all, I've been asked to port dballe to use the Oracle ODBC driver. I had a similar problem: find out how to use scrollable cursors with Oracle's ODBC driver. The release notes (a file called ODBCRelnotesUS.htm that I probably can't put online without their consent) say that they're implemented since ages, but SQLSetStmtAttr always tells me that the driver does not support it. Maybe I have to enable it somewhere? Maybe it's a bug? I could have found out with one hour browsing this driver's source code, but that wasn't available. Instead, I had to spend a whole day of trial and error, google searching with all sort of keyword combinations, looking at strings output on the .so libraries, and in the end I still don't know. That porting project is now stuck indefinitely, and my customers had to pay for a full day of fruitless work. So, here's the reminder: If you base on 3rd party proprietary software, you can't provide a serious service.

Marc 'Zugschlus' Haber: DPotW: swaks

Description: SMTP command-line test tool
 swaks (Swiss Army Knife SMTP) is a command-line tool written in Perl
 for testing SMTP setups; it supports STARTTLS and SMTP AUTH (PLAIN,
 LOGIN, CRAM-MD5, SPA, and DIGEST-MD5). swaks allows to stop the SMTP
 dialog at any stage, e.g to check RCPT TO: without actually sending a
 mail.
 .
 If you are spending too much time iterating “telnet foo.example 25”
 swaks is for you.
A very important tool which makes debugging e-mail a breeze. A must for every mail admin.

5 March 2007

Andrew Pollock: [tech] MythStream

I like to listen to Nova 96.9's stream, and I'd been doing it really sloppily at home by quitting the MythTV front-end running on the TV, and just running mplayer with the URL of the stream. I really wanted to be able to play the stream through MythTV. So a few weeks ago I did a spot of searching and up came MythStream, which appeared to be just the ticket. I'd already done a few sloppy unpackaged installations of things on the MythTV machine, and I wanted to stop this, so I held off installing it until I had time to make a package of it. Today I finally had time to make said package (which is here if anyone else is interested) and it works a treat for what I want to do. It looks like it has plenty of other features that I don't really need but will explore anyway. MythStream screenshot

2 March 2007

Gunnar Wolf: Say no to petroleum-powered vehicles - Make Mexico a better place!

[ Yes, entry written for my Mexican fellows. My blog is in English. Don't rant about that, your pleads won't be listened ]
Damog just ranted (in Spanish) about too many people coming to Mexico City. I completely agree with him, but not with his conclusions. We are a ~25,000,000 people city, in a ~100,000,000 people country. The inequity we face every day is huge (Cd. Nezahualc yotl, among the poorest in the city, is the most densely populated region in the whole world, but you can easily spot over 2000 sq mt houses in Bosques de las Lomas or similar regions - And the whole Santa F region just scares me, it is an unknown planet I don't even want to think of). But what's really terrible is how living in this city changes our collective moods.
Sometimes it strikes me to understand how people in other countries can live in one town and work in another, over 40 minutes away. Well, for many years I worked at places over one hour away from home - and I didn't even cross the city. Mexico City is, or was last time I checked, 40x70km, and without enough adequate main ways. Of course, people get grumpy and aggressive while driving.
What's my answer?
Don't drive.
Seriously.
Yesterday, for example, I chaired three talks at Linuxworld Mexico. In friggin' Hip dromo de las Am ricas, a convention center located in one of the worst-connected pieces of land in Mexico. Usually, it would take me 40-90 minutes to get there by car, depending on the time of day and phase of Deimos against Fobos. Of course, it took me 70 minutes to go by metro+bus. I took two nice books (La regi n m s transparente, a beautiful book by Carlos Fuentes no Mexico City inhabitant should skip, and Laurence Rosen's Open Source Licensing). And I didn't get bored, and I didn't hate the people I was riding with. Even though I crossed the most crowded metro stations. Not only I saved a fair amount of money (MX$6.50 each way against probably something close to MX$120 between the gas and the parking fee of that unholy convention center), but I used my time much better. Some years ago, when I regularly travelled one hour back and forth to work, I learnt most of what I know today of Computer Science during the long time I spent sitting on small microb s seats. Not the most luxurious way of travelling, but still a very good way of moving around our messy city.
Of course, today I have learnt even more, and I want to advocate it: don't work far from your house, or at least, don't work far from a place reachable by Metro. Sometimes it sounds impossible, but really... How much do you value your time? Do you think that it's better to get MX$20,000 a month in a Santa F office than to get MX$15,000 in an office in Insurgentes? Do you think nobody will pay you decently if the offices are in Ermita Iztapalapa? Good work done brings a good salary. And seriously, the extra MX$5,000 in my first example is not worth the daily anger you will get by crossing the city to get to Nowhere Land and work for the corporate overlords.
I might be extremely lucky, but I work 3Km away from home. I come by bike every day. And yes, I was scared at first - Even in Ciudad Universitaria people drive aggressively. You have to take care where you drive. Taxi drivers are among the worst, as they are always in a hurry. And, yes, my elbow has an ugly scratch, as I prefered to stop and fall off my bike than to land over a car whose driver was in a hurry. I've just had my bike for ~6 weeks (after over 10 years of not riding one, and back then, just for a bit), but I'm confident enough to get off the safety of a protected University with no cafres driving their microb s as they damn well please. Last weekend I had a ~6km drive (Copilco-Miguel ngel de Quevedo-Loreto-Alta Vista-Copilco) using several high transit vialities (Universidad, Revoluci n, Insurgentes). I crossed three times the San ngel bus hub, which scared my ass as I approached - But it's perfectly doable, far easier than what I expected. It was fun. It is a decent excercise. And we need more people to take the streets with their bikes.
This morning I heard on the radio that Marcelo Ebrard (Mexico City mayor) is pushing a plan to boost bycicle usage in the city. Something similar to what has been done inside Ciudad Univeritaria, but -of course- in a larger scale: Useful ciclov as along the main roads, city-owned bike rental places (where you can rent your bike at one and drop it at another spot), all this well connected to the main Metro stations. In this interview (in this morning's 98.5 FM news program - sorry, I don't know who heads it... Mart n something IIRC) they said that today, ~0.7% of the trips outside home in Distrito Federal (where only 8 out of our 25 million people live) are carried out on bycicle, and they expect to raise it to 5% over the next six years. We will see about that, I can only wish this program best luck.
Damog complains that we drive like shit because dealing with too many people for too long pisses us off - Ok, Damog, here is the recipe: Don't get pissed off. Each of us will make a minor but tangible contribution. Don't drive so much. Quit your job so far away, get a decent (even worse paid) job closer to your house, closer to the university. You will be happier. Get a bike. Use it, you live close to UNAM as well. You will be happier. And we will be one step closer to total world domination. (yes, we the bikers, not we the Debianers ;-) )

26 February 2007

MJ Ray: OpenWRT

Now, more on those network problems I mentioned - it looks like one device on our inbound route is hiccoughing and dropping packets. That royally screwed up a suboptimal OpenVPN and all VoIP traffic. I've changed some settings on the OpenVPN (made the various MTUs fit neatly, for example), but I'm still waiting for a response from the network engineers about the broken device. While I was investigating, I discovered that the router really doesn't tell me much useful information, but it should be able to run OpenWRT - I think I'll try it because being able to sit on the edge of my network and watch the traffic going past would be helpful for debugging things So, has anyone got tips/tricks/warnings about OpenWRT they'd like to share?

24 February 2007

Adam Rosi-Kessel: Skiing Dream

I dreamt that I brought my laptop on a downhill ski trip. Before putting on my skis, I booted up and used my EV-DO connection to get online. I spent the rest of the day blogging about skiing, but never actually got to ski. Can anyone explain what this dream could possibly mean?

23 February 2007

James Morrison: Crazy friday

Wow, today is nuts, I've gotten 3.75 invites to parties for only tonight. That's 3 real invites, an invite to crash a games night and critical mass. So 3 events in the city and 2 in mtn view. Well, the christmas tree that's still up and a huge bottle of Jaeger have made my choice. Why did I move to the city again?

22 February 2007

Holger Levsen: OLPC questioned

Tuesday I gave a talk about debian-edu to members of the Emma s community, who are - among other activites - refurbishing old computers, make them usuable again by installing debian-edu and (keep or) send them to Africa. They looked quite puzzled when I mentioned our cooperation with OLPC and what OLPC intends to do: send new computers to developing countries! I resolved this by saying that I think both approaches are useful, as this will spread access to technology and knowledge faster ;-)

While fixing my slides after the talk (which btw are based on the same talk held at LCA and were now translated to french) I discovered this interesting critisism to OLPC. After reading them, I still think both approaches are useful, but recycling should definitly not been forgotten over this "new toy" :-) TMTOWTDI!

21 February 2007

Christian Perrier: fr: 99.877%, cs: 93.5604, de: 82.521%, sv: 80.250%, vi: 78.060%

No much progress on today's stats. Bump expected tomorrow because of: Today's uploads: portsentry, esmtp, php4-idn (switch to po-debconf), openslp, xbanner, uw-imap, twiki, gom (switch to po-debconf), wacom-tools, discover (switch to po-debconf), fontconfig...:-)..About 50 l10n bugs closed in 1 day, not that bad. As a consequence, the official stats should improve soon. I also sent patches to some maintainers who prefer uploading themselves such as mysql-dfsg-5.0 and mixmaster (switch to po-debconf).

14 February 2007

Gerfried Fuchs: Localized XMMS-SID

ccr has uploaded a new beta version of his fabulous xmms-sid extension for the X MultiMedia System which now also supports localization. I have prepared a package so you can test it, start localizing it for your language, or just enjoy it. I have noticed some possible wrong implementation of the i18n infrastructure, I had to do the msgfmt for the de.po myself — if you know what goes wrong here any input is absolutely welcome.

11 February 2007

Antti-Juhani Kaijanaho: Announcing darcs-monitor

There aren’t many features I grew fond of with CVS that I haven’t yet found a satisfactory solution for in Darcs. One of them was, until today, sending commit mails to mailing lists. There are a number of more or less ugly hacks floating around the net, but I never found them very satisfactory, so I wrote my own. Darcs-monitor will send email to a specified recipient about new changes added to a specific darcs repository. It can be run as an apply posthook (resulting in near-instantaneous “push” emails), or periodically from Cron, or occasionally by hand, whatever seems most convenient. You can get it by darcs at http://antti-juhani.kaijanaho.fi/darcs/darcs-monitor/ (darcsweb available), or as a tarball at http://antti-juhani.kaijanaho.fi/software/dist/. It depends on mtl and HaXml and is written in Haskell, naturally. It has been tested only with GHC 6.6 so far. For installation and usage instructions, refer to the README. Please note that this software is very new and thus can be buggy. As with any email-sending software, bugs can result in major annoyance; user caution is warranted.

9 February 2007

Benjamin Mako Hill: Title

I've been taking the train frequently lately so decided to sign up for the Amtrak Guest Rewards Program -- kind of like a frequently flyer program but without the flying. When filling out their online join form, I was asked to select a title from what turned out to be a rather extensive list:
That will be Princess Benjamin Mako Hill to you, Mr. Conductor.

6 February 2007

Mark Brown: In plain sight

Even worse than the usual multipart/alternative messages with a contentless text/plain part are messages like that when there quite clearly is a text/plain version of the message (for example, as another option when you sign up for a list) but it’s not been included and this unhelpful “error” has been included. This annoys me: my text mode mail reader is perfectly capable of coping with both multipart/alternative and (via whatever run-mailcap gives it) text/html messages; the error here is entirely in the sending software. It should either include the text/plain version which the sender is already going to the trouble of producing as an alternative in a multipart message or just not bother with the alternative at all. Given the general quality of implementation one finds the reasoning behind providing the alternative is probably that there’s some widely deployed piece of software out there which explodes horribly if it sees HMTL outside of a multipart/alternative wrapper. There are probably some users who are sufficiently keen on seeing the HTML version of the message to mean that they would actively wish to avoid using a plain version of it but there can’t be many - I expect the actual reasoning behind not putting it in is ease of implementation.

2 February 2007

Amaya Rodrigo: Sender verify callouts *are* evil

Steinar H. Gunderson wrote:
> Who the heck is uceprotect , and should anyone care?
> At least they obviously don t have much idea how sender verify works,
> as you can see from their page on the issue...


Well, as I can t properly or reliably communicate with the Debian project via email anymore, I was about to allow sender verify probes on my side, but after reading what the Postfix project has to say about it, together with the uceprotect people, who look quite harsh, but otherwise reasonable to me... I say no way. Who the heck is postfix , and should anyone care? At least they obviously have a clue about how sender verify works, as you can see from their page on the issue...

I am sick of changing configuration in my (otherwise) almost perfectly working smtp server, specially if I am opening my postfix server to a potential DoS. From the link above:
The sender/recipient address verification feature described in this document is suitable only for low-traffic sites. It performs poorly under high load and may cause your site to be blacklisted by some providers.

Is Debian a low-traffic site? I am feeling cut out from the project, as I can no longer email certain (not all) developer@debian.org accounts, bug numbers in the BTS (control still works), and Alioth mailing lists. I refuse to misconfigure my email server because of this. This is plain stupid!

Greylisting was a minor nuissance. This is $FILL_IN_WITH_CURSE_OF_CHOICE:
~-root@aenima>mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
A57EB890041 1173 Fri Feb 2 19:52:34 xxxxxx@amayita.com
(host lists.alioth.debian.org[217.196.43.134] said: 451 Could not complete sender verify callout (in reply to RCPT TO command)) xxxxxx-pkg-base-maintainers-request@lists.alioth.debian.org

Spammers have already won. I hereby proclaim email officially dead.

27 January 2007

Martin F. Krafft: Prog bands worth checking out

Via Porcupine Tree and in close cooperation with Hanspeter, I've spent a large part of the past couple of months listening to not-so-well-known progressive bands. Here's a list of bands worth checking out if you're into this kind of music. I'll refrain from attaching bla bla to them. There's no order other than a trend from rock to metal. Contact me if you're looking for specific album recommendations, or have any band/album recommendations to offer! NP: Katatonia / Viva Emptiness Update: multiple people have recommended King Crimson, a band that I know very well in fact (it was the only band I've ever followed on a tour). I guess the above list is about not-so-well-known bands. I did not include Gensis, Yes, Emerson Lake Palmer, Jethro Tull, etc. either. And I think I am leaning more towards progressive metal these days. Update: as Alexander Wirth points out, Dream Theater is not unknown, and he's right. So be it. :)

25 January 2007

David Pashley: Ogg Player Recommendations and Upcoming Gigs.

Dear Lazyweb, I'm after recommendations of a portable music player, which is small and can play ogg vorbis files. I'm not sure I need something with a large capacity; 2GB should be fine. Basically want something I can use in the gym, so I don't have to listen to the god-awful dance music they keep playing on MTV Dance. Reasonable audio quality a bonus. Last.fm support would be amazing. I would be tempted by something that could run Rockbox, but I suspect they are going to be on the top end of the size scale. Spent some time checking upcoming gigs and I've settled on And You Will Know Us By The Trail Of The Dead, The Killers, 65daysofstatic, and The Barfly's Great Escape mini-festival, 3 days of gigs over 20 venues. Trying to decide if I want to go to see Inspiral Carpets and Electric Six in the world's dirtiest club.

23 January 2007

Martin F. Krafft: Haunted by a password

I restarted my laptop last night only to discover that I could not piece together the password I used to encrypt my harddisk, and it did not help that I knew it was pwgen-generated (a sequence of random digits or letters which try to be "pronouncable"). I had left my palm pilot with the password database at home, and the emergency key I created for such cases was on a USB medium with a read error. I beat my head on the table and tried and tried and tried, but to no avail. So I started pondering how to convince my friend Hanspeter to walk to my flat again and help me out, having resigned myself to the idea that I'd have to do more reading tomorrow (today) at the office. As it turned out, Hanspeter would stay at my flat that night anyway and switched on my machine at home to allow me to fetch the emergency key. But I didn't end up needing it. I slept and dreamt and suddenly had some sort of a nightmare in which a string of letters came haunting me, tormenting my consciousness in much the same way that the Guitar Hero notes come flying at you. I woke up and had ten characters in my head, and I was confused. It took me at least two minutes to remember that I had been scrambling for the harddrive password, and when I figured it out, I wasn't surprised that the string I dreamt would decrypt my drive. I really should gain some distance to these frickin' computers! NP: Man on Fire / Habitat

Zak B. Elep: Smarty enough for Smart Bro, and 3G

Finally, I’m now on broadband! :D I made the move today to Smart Bro as they have been touting a promotion offering free installation and a 384 Kbps connection via their Canopy system. As I’ve been mostly offline (or slightly online, counting the occasional GPRS modem connection on a GSM network) I figured that this is the best way at the moment to get broadband connectivity, as the only DSL choices available locally have been either seriously damaged (due to the last supertyphoon) or excessively priced (with unpredictable foreign-currency adjustments.) So, needless to say, I’m now enjoying myself with this new investment. Adding to this, I also got a new Netgear WGR614v7 wireless router so I can share the connectivity with perlis. While not exactly as flexible as the famous WRT45G from Linksys, it surely does the job to sharing the Net, so I’ve no complaints about it. And I’ve no complaints about the service offered by Smart Bro, either; the installer did an absolutely good job of making sure that the Canopy SM is on the most receptive direction and even gave me some pointers on what to expect with such a connection. Actually, I’ve already made arrangements about the peeves experienced by other Smart Bro users by taking a cue from Joey Hess by setting up the right service caches and by being not too abusive with my expectations. But, I still have a lot to expect with this new connection. After all, I still have a few more items on my TODO that needs doing, namely writing about what the hell happened to me since last month until now, and my future directions (erm, resolutions) for this new year. Ah well… … but first, I need to do some monster dist-upgrades… :P BTW: a UMTS (3G) signal has finally been broadcast in Daet, giving me a reason to also have smart-3g as a backup service in case the Canopy goes down. Yipee!

Ross Burton: Drink The Lemonade

Dave Cridland posted to maemo-developers again today, spuring me to spend my lunch time checking out his email client instead of doing something productive like eating. It's very interesting. Basically he edits the RFCs for Lemonade, which is a IETF standard for email on mobile devices. Basically it is a set of extensions for IMAP and SMTP that improve their performance over high-latancy low-bandwidth connections (like bad wi-fi or GPRS), such as forward-without-download and efficient re-synchronisation commands. Existing extensions such as a useful IDLE implementation are also used to push new mail notifications to the client. To test the ideas in the real world there is Polymer. Polymer is a simple IMAP client that uses the Lemonade extensions as much as possible, so is ideal for mobile use. There is more: it uses ACAP to store the settings on the Internet (Dave also provides free ACAP accounts) so it's configure once, run anywhere. I've just tried it on my laptop, and it works nicely. But it gets better. There is also Telomer, an email client using Lemonade and designed for Maemo. I've just tried it out, it may be seriously lacking in features at the moment, but it works. Features can be written over time, but it takes serious thought to get something as fast and usable as Polymer on mobile devices. I'll quote Dave:
That all said, once it's started, it connects to the mailserver over GPRS in about 10 seconds and pulls up the summary listing in 15, with a mailbox size of 2,882 messages. With a mailbox with 33,732 messages in, it's a little slower at around 25 seconds. That's still way faster than a desktop client on a LAN, of course, unless that desktop client is Polymer - in which case it'll seem remarkably slow.
This is what we need for a mobile email client. I know I've found my email client of choice on my new N800. NP: Wish You Were Here, Pink Floyd

21 January 2007

Daniel Burrows: How to Breathe, Functionally (part 1)

David Welton writes that the problem with functional languages is that you don't get to mentally "catch your breath" between computations; piling function invocations on function invocations makes it hard to understand what's actually being calculated. He has an amusing summary of how functional code can become unreadable:


Do this with the result of this with what this produces when given this input that is derived from this function which takes the result of this other thing after calculating the result of something that is derived from the output of a function that ...


Indeed, I've seen functional code like this (much of it written by myself). Here's a particular gem:


f splitPoints = map fst $ tail $ scanl (flip ($) . snd) ([], toSplit) $
map splitAt splitPoints


I wrote this code a year ago, and I don't know what it does! It's hard to read and hard to understand. So, however, is imperative code that says


Add 5 to A, now if B is not zero we jump to where we subtract one from B and if C is less than 3 we add 4 to C otherwise we divide C by 2 and then add it to A, then we ...


The reason both pieces of pseudocode are hard to understand is that they don't use the abstraction features built into the language. Good imperative code uses meaningful variable names, uses the structured-programming primitives the language provides, and abstracts complex operations into functions.

My rule of thumb (which is, heh, not always religiously followed) is that a piece of program structure that does more than about 3-6 things is probably too complicated; it seems like that's about as much local context as I can hold in my head comfortably (and the number is more 3 than 6 these days, if you get my drift). As David puts it,


If you'll bear with a poor comparison, sometimes programming is like a song. You do the tricky section, then you go back to an easier section and catch your breath for a bit.


The problem seems to be that people trained on imperative languages, when they're tossed into the ocean of functional coding, can't find the guideposts and landmarks that would help them impose some structure on the water. Should I put this complicated expression inside a "let", or break it out into another function? When do I use a higher-order function to unify two dissimilar pieces of code? Should I write this code in terms of higher-order library functions or directly? It's easy to wander off down a chain of nested invocations of anonymous higher-order functions, or composed partially applied library functions, just "because you can" and end up forgetting what you were trying to do in the first place.

Luckily, some of the basic rules of keeping your code readable remain more or less the same: assign intermediate results to variables with meaningful names, and abstract complicated operations into separate functions. To tackle David's example:


You get sections with DoThisAndThisAndThatWithTheResultsOfSelectThisFromTableXYZ that you have to slow down to think through.

...

GoToTheNextTrickyBit where ManyThingsHappen.

All in all, you wind up with a sort of ebb and flow that works out pretty well if you're in tune with the code being written, going from intense calculations, to a line or two where you do no more than store things in a variable, take a breather, and prepare for the next important stanza.


The way to "take a breath" in a functional language is generally to assign an intermediate result to a variable, or to extract a complicated operation into a function and give it a meaningful name. One Haskell approximation to David's example is


do DoThis
AndThis
results - SelectThisFromTableXYZ
someVal - AndThat results
GoToTheNextTrickyBit someval


If you're writing pure functional code, you might write


let
results = SelectThisFromTableXYZ
someVal = AndThat results
in
GoToTheNextTrickyBit someVal


Of course, this will become unreadable if you write a huge complicated nested "let" expression in place of "AndThat". For a truly dreadful example of this kind of coding, check out the Gnucash Scheme code that generates the "Cash Flow" report (warning: read this in short bursts, or you WILL go blind). This is exactly analogous to writing too many nested loops and conditionals in imperative code, and the fix is the same: find logically distinct bits of code and extract them into separate functions.

I have a few more thoughts, but this post is getting too long, so I'll inflict them on the world in another post. The rule that short things are easier to understand applies to blog posts as well as code. :-)

Next.

Previous.