Search Results: "will"

27 March 2008

Jordi Mallach: Interview in El Pa s

Today's edition of El Pa s, the most read Spanish newspaper, celebrates the 10th anniversary of it's weekly technology section Ciberpa s with a special edition which takes a look back at the last 10 years of computing, and also looks forward to what the future will bring us. Merc Molist interviewed Carlos Atar s, my mate at Softcatal Jordi Mas and myself, on what happened during the last 10 years of Free Software and where we are heading. The paper edition features a *gasp* half page picture of me laying on the grass, but is otherwise identical to the online version. I need to add, this feels a bit strange. :) It's the first time I see myself refered to as just Mallach , but I realise I'm getting old...

Julien Danjou: PHP applications code quality

Ah, Erich, that IS so true. I never found a well written PHP application anyway, or it was only 10 lines long. I guess that's primarily the language fault. It permits to do a lot of stuff and does not simplify, help nor force the simplest implementation methods like MVC which should be the base in Web developement. Well, take as example what we would do with Python and GTK+ if they were like PHP and HTML (I do not have the API reference so it will be somewhat improvised):
#finally we do not need this module I wrote everything myself
#import somemodule
def main():
    # Well we want to do some printing
    window = GtkWindow()
    # Connect to the database without any abstraction, that sucks
    db = mysql.connect()
    data = db.query("select RANDOMLYTYPEDDATA from MYONLYTABLE");
    while data:
        # Ah, we do not have include() so we cannot reuse code
        # I'm a PHP developer, I do not know functions
        import somestuff
    window.print(somestuff.result)
    # Obviously, forgot to close db connection, etc.
    if form.data.field == "hello":
        # The user asked for hello, print hello
        window.print("hello")
    # debug
    print data[0]
    if form.data.anotherfield[0] == "morning":
        data = db.query("select anotherdata from MYONLYDATA")
    else:
        sys.exit(42)
    label = GtkLabel()
    # Yes know we construct the view!
    window.add(label)
    label.print(data)
That is typical PHP code: we just take randomly typed data from our DB eng... no wait, from MySQL (remember that's LAMP!!! Not LAPP or anything else, bitches!), then we print some HTML code with data, and we do tests on environment, forms, etc, and we get back data, reprint them, do not use functions but include() multiple times thousand of files and then do not close/free anything. It's so easy to do bad code that lot of people coming from nowhere and who did not learn anything from other languages are doing it. Another hypothesis coming from my experiment: PHP is a language which can be developed under any OS since it's server-side executed. A link between mostly brain dead "developers" from the Microsoft world and whose from the Free Software world. A clash. I apologize to some of my coworkers doing better PHP all the day. :-)

26 March 2008

Jeff Bailey: Update of the moment

Hey - here's an update:

* I'm off the steroids. Last one was last Friday, spent the weekend enjoying the withdrawal symptoms, and already enjoying the benefits, like my skin is clearing up even more, I'm starting to get my voice back, and I'm less inclined to be angry at the vacuum cleaner when it runs into me. Angie tells me I'm a lot more fun to have around. Which is encouraging when one is totally dependent on another person for food. =)

* I seem to have gotten sick. It took me a bit to figure this one out, but the withdrawal symptoms seemed to be going on longer than expected. Then Angie started showing signs of them, after Leif was fussy for a day. Blech. =( Which explains why I can be cold under covers when the thermostat claims that it's 74 F (No idea in civilised measurements, sorry). Hopefully this passes quickly. Time for lots of breathing and napping. Like I could be sleeping any more during the day.

* My energy levels are getting better. I saw Andrew Pollock at noon today when he returned a CD to me, and he commented that from my walking you can barely tell I had surgery 3 weeks ago. Except for how slowly I'm going. And the full body turn in order to look to see if cars are coming when I cross the road. And the huge production to step up onto the sidewalk. A 5 minute walk no long requires me to sleep for 2 hours. Can't say the same for a 10 minute walk yet, though.

* Staples are out! I have two more days of antibiotics because the incision is still red and giving off more heat than they'd like so I'm back in next Tuesday for another checkup. Last week, the surgeon wasn't surprised by the healing rate given that the steroids are an immunosuppressant, though. So hopefully next Tuesday I get a clean bill of health and then just have to wait 2 weeks before getting some movement restrictions lifted and starting PT. And tomorrow I'll have a shower without fetish^WPlastic Wrap all over the incision. I can't shower unassisted yet, though, since getting most of my body would count as "reaching"

* Short-term disability finally approved my claim. For 6 weeks anyway. Then they want me to return to work or get better justification from my surgeon. I'm sure he'll be all professional, but I'd love it if the letter read "My client takes 10 minutes to get out of bed. He takes vicodin every 4 hours, and my nurse just recommended Oxycodone so that he can sleep more than 2.5 hours at a stretch. What do you think?"

* We have the biopsy results. And like every other biopsy result, we have... Inconclusive! Whee! At least they're no longer using the word "Sarcoma", but instead have settled on Osteoblastoma. But there's a catch - there are two types of Osteoblastoma, Aggressive and not. (I'm sure there's technical terms, but I'm tired and didn't catch them). The inconclusive bit is whether it's aggressive or not. During surgery, however, they treated it as aggressive because they didn't have the information and did what they'd do to minimize the chance of it coming back by taking out lots of extra tissue. I still get to see an Oncologist, in case there's something interesting through all of this still to learn.

* Otherwise, schoolwork extensions are all approved, our new bank likes us and is doing good things. Coworkers are popping in and saying hi, so I'm not feeling totally isolated. Heinlein is less good the fewer drugs I'm on. Or maybe it's because I'm reading "Friday".

Things are still getting better every day, even through all the sickness and such. I'm trying to catch up with people on Jabber. I still can't lift the laptop, so IRCs out until I figure out where I put the charger to the N810. It's somewhere out of reach, so as far away as the moon as far as I'm concerned.

I also want to take a moment to say thanks to Sandy and Jamu for their visits here - We're trying to arrange for people to visit us on the weekends and help us return the place to a clean state, with Kit starting the visits this coming weekend. Angie's got her hands full with Leif, and I get the joy of sitting in the corner wishing I could be useful. The result is that the house slowly falls apart over the course of a week, and hopefully weekend visitors will help us keep some measure of sanity here.

Peace and love, all.

Tks,
Jeff Bailey

Pierre Habouzit: [RC-Bug-A-Day] Day 11

Today saw the removal (from testing) of: All in all, that's 5 RC bugs that aren't in lenny anymore. Note: I've been pretty busy today, I've seen mails to ask NMU sponsoring for RC/RG bugs, I will have a look, don't worry.

Joey Hess: my anti-platform: followup

A year ago I posted an anti-platform with some things I wanted to work on over the next year or three. This is a followup to see what, if anything, has been accomplished. constantly usable testing CUT generated some discussion in the project, but I've done nothing toward it myself. The only real progress in this area over the last year has been increasing improvements in the testing security team, and the release team, both of which I'm not currently active in. deprecating www.debian.org This continues to happen organically, for example, Debian Weekly News stopped and http://wiki.debian.org/DeveloperNews took its place. Aside from pointing out that this is happening, I haven't done much to push it. double the archive sync frequency again Sadly, this has not happened yet. automated whole system testing HP donated a test machine, which I set up to run emulated tests of installations of i386, amd64, s390, mips, and mipsel. (Arm and armel should be added soon.) I don't always manage to keep all the tests working at all times by myself, but they have been valuable. developer (virtual) machines My test machine spits out disk images for 5 architectures that have debian pre-installed on them, but due to hosting issues I have not been able to share those images with others yet. find the next nslu2 I was pretty sure this would be OpenMoko's Neo phone, but I have only briefly had access to one, and it's not clear it will be easy enough to get the hardware to make it worthwhile to target it. Meanwhile, tbm has found a more nslu2-like next nslu2, the QNAP Turbostation NAS device, and there's work underway to fully support it from d-i onwards. Others have also worked on running Debian on various related AP hardware, including the ASUS WL-500g and Linksys WRTSL54GS, using OpenWRT to boot Debian. There's instructions and downloads on a wiki page. It would be good to get this fully supported without the hacks.

Erich Schubert: Measuring code quality by database support...

Do you know why so many (mostly PHP) developers have problems porting their applications to PostgreSQL?Because PostgreSQL actually enforces constraints on the data.MySQL, which can even have values that are NULL and NOT NULL at the same time (yes, this is not a joke, Details are found here), is not particularly good at that. And people get used to all kind of stuff they can throw at MySQL and it will try to make the best out of it, instead of forcing the programmer to correctly specify what he intends to do.That's the reason why I so far have been avoiding any application which only support MySQL: If it only supports MySQL, it probably means they can't get it to work with anything else. And that is a really bad sign.I was looking for some cheap WebCMS. The big names are Typo3, Joomla, Drupal. Joomla is MySQL only. Plus it doesn't support iCalendar. Typo3, I've had had a look on that one before, it was ugly, used things like line numbers for layouting. And Drupal was pretty much the only one I heard not just negative things about (I was mostly talking to tech guys, not "web designers"). So I thought I'd give it a try. With PostgreSQL, since I want a consistent database.Drupal (6.1) installation with PostgreSQL worked fine. Then I tried installing the add-on modules I was most interested in: Date and Event; since the web site I'm considering it for will be mostly around organizing events, so I do need some solid calendaring functions.Apparently, the Date module of Drupal currently does not support PostgreSQL, it failed creating or filling it's timezone table in the database.How come that pretty much all PHP stuff is broken on so many levels? I figure the Drupal people have spent a lot of time in getting their core working well, and I also believe that the cores of the other systems might all be okay. But when it comes to extension modules, it seems to be as bad as ever before with PHP...Some people might just say "well, run MySQL, and it would be working".If a module isn't capable of storing timezone information in other SQL databases, how can it be of good code quality?(Yes, I know that I'm not being entirely fair. Picking on Drupal or even on the not yet finished Date extension is probably not really fair. But you have to admit that an application which can work with multiple databases probably has received more attention to doing database things the proper way, right?The Date module is not yet "released". I'm not saying it's worthless, it just does not work for me yet. And it actually backs my first claim: working support for other SQL databases is a sign of code maturity.And in most (if not all) PHP web applications, extension modules with their varying code quality are known for introducing security issues again and again.)

Filip Van Raemdonck: Lilo LVM fixed root

One annoyance with the lilo bootloader that I've ran into a few times recently, is that it apparently turns any root configuration arguments into a device number. Which is then passed to the kernel at boot.
So if the kernel decides to assign a different device number to the supposed root device, your system may no longer boot.

Yesterday I once again ran into this: when I added an additional disk to a system, the LVM volumes which were on that new disk got assigned device numbers before the existing system LVM volumes.
Giving the problem a little thought, I realized that the solution though silly is really simple: add an append="root=/dev/yournode" directive to lilo.conf, and this boot-time argument will always override the root device set by lilo.

No more changing root devices for me

Nico Golde: streaming from your fileserver using mpd and icecast

My mobile music player is often missing the files I want to hear right now if I'm under way because my music collection is too big to fit on it.
Long time ago I used gnump3d which seems to be unmaintained in Debian for quite some time and then I often listened to some live streams, network connections are available nearly everywhere.
But I always wanted my own live stream with music I want to hear. There are several solutions out there for this task but they all require the creation of a playlist before the streaming starts.

Fortunately mpd provides the possibility to define different output targets and also one for streaming to a shoutcast or compatible server like icecast.

So after apt-get install mpd icecast2 (on a Debian box) you have to edit /etc/mpd.conf
There is not much to do, be sure to set music_directory to the place your music is located and the configure the output part.
Add the following to your mpd.conf and adapt some values:
  1. audio_output {
  2.         type "shout"
  3.         name "foobar stream"
  4.         port "8000"
  5.         host "localhost"
  6.         format  "44100:16:2"
  7.         mount "/stream.ogg"
  8.         password "somepass"
  9.         quality "2"
  10.         user "source"
  11. }

The type defines that this output will be streamed to a shoutcast target. The name will be displayed by the client you use to play your stream. 8000 is the port icecast2 will listen on host "localhost" (in this example the icecast2 server is on the same host). format specifies the audio format of the stream, the first number is the sample rate in Hz, the second number is the number of bits per sample and the last number defines the number of channels (2 is stereo here). Those values should work for most of you. mount specifies the path under which the stream is available later from the server root, in this example http://localhost:8000/stream.ogg.
quality defines the ogg encoding "quality". You can also specify the bitrate instead of it. The user and password values are used to authenticate mpd at the source input for icecast2.

There seems to be a bug in the 0.13 release (which is also in Debian) of mpd that prevents this from working. I don't know the details about this bug but adding
  1. audio_output {
  2.         type "alsa"
  3.         name "fake out"
  4.         driver "null"
  5. }
fixes it.

Make sure to set START_MPD=true in /etc/default/mpd to enable mpd.
That's all that needs to be done for mpd.

The next step is to edit /etc/icecast2/icecast.xml.
The default configuration nearly ready to use. Configure the authentication part:
  1. <authentication>
  2.       <source-password>somepass</source-password>
  3.       <admin-user>admin</admin-user>
  4.       <admin-password>someadminpass</admin-password>
  5. </authentication>

The source password is the one we specified in the mpd configuration. This is needed to authenticate mpd with icecast. source is the default user name icecast uses here. Additionally we define an admin-user that can be used to add users to icecast later because we want to protect the stream by a username and a password.
Then set
  1. <hostname>you.somehost.org</hostname>
.
This hostname is used to generate URLs in icecast that a user receives.

Because we want a very simple authentication for the stream we need to add some options for the mount (/stream.ogg):
  1. <mount>
  2.     <mount-name>/stream.ogg</mount-name>
  3.  
  4.     <max-listeners>1</max-listeners>
  5.     <authentication type="htpasswd">
  6.             <option name="filename" value="/etc/icecast2/htpasswd"/>
  7.             <option name="allow_duplicate_users" value="0"/>
  8.     </authentication>
  9.     <on-connect>/home/icecast/bin/stream-start</on-connect>
  10.     <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
  11. </mount>

I think the xml tags are pretty much self-explanatory. Keep in mind to set the filename to a location the icecast daemon has access to, that's why I used /etc/icecast2. Then you can add users with htpasswd or using the web interface on port 8000 and add a user there.

The last thing to do is to adjust the <alias source="/" dest="/status.xsl"/> setting. Change status.xsl to auth.xsl people need to authenticate if they connect to the web interface before seeing the stream information.

Now you can login via ssh on your home server and use your favorite mpd client to configure playlists on the fly, I use ncmpc for this. Of course the authentication is not secure, people who sniff your traffic can see your login data.
One thing to keep in mind is to restart mpd after restarting icecast otherwise mpd will hang and not continue to stream, this seems to be a bug.

After routing through your NAT, you should be able to play your stream via http://you.somehost.org:8000/stream.ogg.

MJ Ray: Debian Project Leader IRC Debate

As last year, I'll be trying to help with the Debian Project Leader IRC Debate tonight (2008-03-26 20:30Z until 23:30Z). This annual election is probably the biggest influence most developers have on the direction of the project, so please choose wisely. :-) Unlike last year (IMO), it's a more interesting field of candidates who are all strong in different ways. I feel even the weakest candidate is stronger than in previous elections. Anyway, I shan't write more until after the debate. If you can't make the debate, recordings will be posted promptly, among the rest of the debate that's on debian-vote. This old dog is probably going to use a new IRC client for the debate, to make it easier to watch everything and copy-paste audience questions, so I hope I control it properly!

Michal &#268;iha&#345;: Don't be impatient

I handle bug reports and email communication as soon as possible, but it does not mean that it may take month or even more to get reply. I'm not working full time on my free software projects, I do it only in my free time. Besides this I have regular job and I also have a real life with another hobbies. So if you wrote me something, just try to be patient, sending another emails to urge your issue won't help anybody. I will just have more unread mail to process until I get to real work.

25 March 2008

Ond&#345;ej &#268;ert&iacute;k: SymPy accepts Google Summer of Code applications

SymPy is a pure Python library for symbolic mathematics. Last year SymPy had 5 excellent students and this year we are accepting students again.
Why should you apply? And why to SymPy?

Well, let me give you some reasons:



Read also the current status and motivation of SymPy and it's relation to Sage. If you want to apply, all the necessary information is on our wiki page.

Nevertheless, if you decide SymPy is not for you, but still you'd like to do GSoC project in a similar area, there are other good options too - one is SciPy/NumPy, the other is Sage. Unfortunately Sage was not accepted as a mentorship organization, but it has several good projects too, some of which you can do for example under the umbrella of the Python Software Foundation.

One of them is improving the Sage notebook. If you've never seen that - download Sage, start it (./sage), type "notebook()" and a nice Mathematica like notebook will popup in the browser. It allows collaborative editing ala Google Docs and many other things. If you'd like to work on it, reply to the email on sage-devel.

Tollef Fog Heen: pkg-config, sonames and Requires.private

This post is both an attempt at replying to a bug against telepathy-glib, but also an attempt at explaining what Requires.private do (and don't). I am using Evolution as my example here, not to pick on Evolution or its authors in any way, but because it's a convenient example. Currently, on Ubuntu Hardy, evolution links against 75 different libraries. Amongst those, we find libz.so.1, libXinerama.so.1 and many more. I'll go out on a limb here and claim that Evolution does not call any of the functions in libXinerama directly. Let that be the assumption from here on. An obvious question then is, why does evolution link against libXinerama.so.1 if it doesn't use it? To answer that question, we need to go back in time to before we had dynamic linking. If you wanted to build a binary like evolution you had to have 75 -l statements when you linked and you ended up with the whole code for Xinerama embedded in your email and calendar client. For various reasons, we stopped doing that and switched to dynamic linking where the evolution binary just contains a reference to libXinerama. At some point we also grew the ability for libraries to contain those references to other libraries, so you don't have to hunt down all the dependencies of libfoo when you are linking with it. We also got tools such as libtool which try to abstract away a lot of the problems of building on older platforms which don't support inter-library dependencies. Now, since evolution still doesn't use anything directly in libXinerama.so.1 but just uses a library which in turn links against libXinerama.so.1, it shouldn't be linking against it. Then why is it linked with it? Again, we need to look back at history, and for this part I am at least partially responsible. pkg-config was originally written as a replacement for gnome-config and various other -config utilities. Lots of libraries and applications now ship .pc files and we have a standardised interface for querying those files. One of the problems the original authors of pkg-config faced was the problem of dependencies. They added dependencies so the authors of gst-python-0.10 could say "We need pygtk-2.0 too" and so the compilation flags needed for gst-python-0.10 would also include those for pygtk-2.0. Note that I'm using "compilation flags" loosely here, I am not just talking about CFLAGS. This did not fix the problem of inflated dependencies. Not at all. I talked with some of the Debian Release Managers back in 2004/2005 and we worked out a solution which should help us have correct, uninflated dependencies since the then-current way of handling dependencies caused big problems for migrations of packages between unstable and testing. The plan was to introduce a new field, Requires.private which would not show up unless you passed --static to the pkg-config invocation (since you need all libraries if you are linking statically). This definition of Requires.private was mostly useless since GNOME and GTK+ have a habit of including each other's headers. To make a long story short, I changed the semantics so the Cflags field from private dependencies were included even when not linking statically. A problem which pkg-config does nothing to guard against in this case is if you have libfoo.so.2 linking against libbar.so.1 and libfoo.so.2 exports some of libbar's types in its ABI (and not just as pointers, but actual structs and such). If libbar's soname is then bumped to libbar.so.2 and libfoo is rebuilt, libfoo's ABI has changed without a soname bump. This is bad and will cause problems. If your application is linked against both libfoo.so.2 and libbar.so.1, you'll still get problems since libfoo.so.2 then suddenly pulls in symbols from libbar.so.2. If you used symbol versioning, you would at least not get symbol conflicts and your application would continue to work, but you would have a spurious dependency and the package containing libbar.so.1 would be kept around until your application was recompiled. With this background, you might ask the question why we still have Requires since it is seemingly useless. For C, it is useless in all but the most special cases, just use Requires.private instead (and its sibling Libs.private). Other languages have different semantics. Some people use .pc files for other purposes such as gnome-screensaver having variables defining where themes and screensavers go. Hopefully this blog post has explained a bit about why we have Requires.private and what the difference between this and their regular counterpart is. If there's anything unclear, please do not hesitate to contact me.

Jonathan McDowell: Hacking the Wii

I hacked my brother's Wii this weekend. It was fairly painless (and pointless at present). All you need is a copy of Zelda: Twilight Princess (which I don't have, hence using my brother's Wii for this) and an SD card. You use the Twilight Hack as a Zelda saved game, which then causes a buffer overrun when you try to talk to the first character in the game. This is exploited to load a boot loader which loads and runs a boot.elf file off an SD card in the Wii's memory card slot. Pretty easy to do. There's not a lot out there at present. Wiibrew seems to be the main hub of activity. I tried the GameCube Linux Proof of Concept Linux port; once they add USB support it might actually be useful as that'll open up mass storage and input via a keyboard. There's a Sega Genesis emulator on Wiibrew which isn't too bad, but I found it a bit temperamental at reading ROM images. Still, it's a start and it's pretty nifty that you can do this without having to modify your Wii in any way. I expect more groovy homebrew will appear as the hardware of the Wii gets better mapped out.

Luca Bruno: Inkscape 0.46 released


The Inkscape community is really proud to announce the release of the newest version of its open source vector graphics editor: Inkscape 0.46 is out!
This version introduces a lot of new features and various improvements, and I’d suggest you to read the release notes.
Binary packages for most common platforms will be available soon.
Inkscape 0.46 released
Kudos to all the members working to keep Inkscape rocking!

Gunnar Wolf: Perl6 and sigils

Zack, Wouter: Yup, Perl 6's scheme changes to reduce confusion to the programmer and to make the language better Huffman coded. Why?
As for the programmer, it comes out of observation - Changing the sigil depending on what you are expecting to get back (i.e. a hash has a '%' sigil, but if you only want one value off it, you use the '$' sigil, as it indicates a scalar variable) confuses more often than it helps - Specially newcomers. Besides, it will be easier for the interpreter itself - The sigil will become an invariant but required part of the variable name itself. Hence, Martin will be happier, as there will no longer be different namespaces under which to store your variables. Oh, BTW, Martin: Not only Perl behaves this way. Ruby also uses that concept - There, you have local variables (no sigil), instance variables ('@'), class variables (ugly '@@') and global variables ('$'). I remember in old (Quick GW)BASIC you had numeric variables (no sigil) and string variables (postfix sigil '$') as well. Any others?
Now, about the Huffman coding part, WTF?
It is one of the design goals of Perl 6 to make the most often used operators be the shortest, so you, programmer, don't wear out your keyboard and lose your valuable fractions of seconds typing i.e. '->' for a method call when you can just type a '.' - Similarly, currently you have to type too many characters for the (too common) dereferencing - If you have a reference to a hash of arrays of arrays of objects on which you want to call methods, you have to do $something-> key [0][0]->boo - Whereas with Perl 6 you will only have to do $something key [0][0].boo
Anyway, I cannot elaborate much further, as I've been -at best- just a bystander. But yes, large changes loom in Perl's future. Let see what comes on...
And when. Sigh.

24 March 2008

Randall Donald: In case anyone wanted to know


My spare time has been quite limited this month and last. I've had to freelance work on a shopping cart, my alpaca farm website Alpacas of the Coast and keep up with my TV watching ;) I have been working on the Nvidia packages on and off. So far in the next release will be:

* New upstream.
* remove xserver-xorg-core dependency.
* add cuda files (closes: #463776)
* add bzip2 to build-depends. (closes: #466139)
* add uploaders field that went missing: (closes: #454999, #472448)


linux-modules-nonfree-2.6 support will be added too.


Then, hopefully I can catch up with the legacy versions. Anyone who would like to join the packaging team feel free to contact me.

Joerg Jaspert: SSH known_hosts for cluster environments

Something I always forget where it’s written in (sshd(8)), but which is pretty useful when you have a cluster setup where heartbeat manages failover and stuff. And you want to use ssh to connect to the cluster. Whenever heartbeat switches the cluster-ip to the second machine and you try to ssh to it, ssh will reply with a nice WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! - which isn’t helpful. But SSH knows how to deal with it, the user just needs to tell it about that. Imagine you have the two machines foo1 AKA 192.168.1.1 and foo2 AKA 192.168.1.2 and the clustername foo AKA 192.168.1.10. Adding the following to your .ssh/known_hosts will keep your ssh happy if you ssh foo, no matter on which machine the cluster-ip is:
foo1,foo,192.168.1.1,192.168.1.10 ssh-rsa AAAAB3Nsomething[...]
foo2,foo,192.168.1.2,192.168.1.10 ssh-rsa AAAAB3Nsomethingelse[...]

23 March 2008

Wouter Verhelst: Perl

Martin blogs about how the Camel book mentions the fact that scalars, arrays, and hashes have completely separate namespaces, as if this is a problem. Well, I disagree. As with anything in Perl: yes, obviously it's possible to confuse yourself with this feature, and yes, obviously it's true that if you do this, you will get to keep both pieces of your program. So don't do that then. However, when used properly, I find that it actually helps me improve readability of my programs. Let's say we have a subroutine which returns a reference to a filehandle to a bunch of data in a format that we know how to parse. We don't know what the filehandle points to (and we don't care, either), but we do know what the data is. So we store the filehandle in some scalar, and then proceed to parse the data into a hash. Now we could use variable names such as $fh and %hash, but I'll hope that everyone agrees with me that this is very bad practice. So, instead, we should name the variables after what they contain. Say our data file contains books:
$books = get_books_fh();
while(<$books>)  
	(... parse $author out of $_ ...)
	push @ $books $author , $_;
 
The filehandle to which $books is a reference, points to some useful data; and the %books hash table contains the exact same data, only structured in a different, more useful way. So why give them a different name? They're the same thing, call them the same way. Personally, I find this makes a whole lot of sense. And you can do the same thing with arrays vs hashes, or scalars vs arrays. Of course you can also write code that uses $somevar and @somevar, with no semantic connection between the two. That is stupid, so don't do it. The fact that you can do stupid things with Perl, however, should not mean the language sucks. You see, other than some other programming language I could think about, Perl does not assume its users are stupid, or inexperienced, or dummies, or whatever. Yes, that does mean that new users will get confused; but it also allows experienced users to Get Stuff Done in a proper way. And, well, I'm sure you can do stupid things with python, too.

Christian Perrier: Missing dependency on libc

Today, while working on an l10n NMU for a package (gnarwl), I got magic lintian complain about "missing dependency on libc". And, indeed, that package provides C binaries that are linked against the libc...but does not depend on it. This is because the package has "$ shlibs:Depends " in Depends but does not run "dh_shlibdeps" in debian/rules. That bug will soon be fixed by my NMU but aren't most of the package who have the same lintian warning in the same situation?

Francois Marier: Background compilation using ionice as a normal user

Most people know that you can run commands "in the background" on UNIX by prefixing them with "nice":
nice run_long_script.sh
What that does of course is reduce the priority of the process so that the CPU scheduler only runs it when nothing else (of a higher priority) wants to run. What it doesn't do however is run the process without any impact whatsoever on your other tasks. The reason is that the background process can still ruin the performance of your computer by monopolizing the hard disk.

It turns out that Linux 2.6.13 or later (with the CFQ scheduler) support a tool called ionice which is a "nice" command for I/O operations (like disk accesses). It works like this:
ionice -c3 command
The only problem is that you can only reduce the IO priority of a process as root. The reason being that if you're not careful you could have a high priority (CPU priority that is) IO-blocked by a lower-priority process.

But if you run your compilation like this:
sudo ionice -c3 make
it will run the whole thing as root, which is probably not what you want. So you could do something like:
sudo ionice -c3 sudo -u myusername make
to run the compilation as yourself. Though one problem persists: sudo strips out your environment. So things like distcc and ccache may not work anymore.

Here's how I solved these problems in my background compilation script for custom kernel Debian packages:
#!/bin/bash
nice fakeroot make-kpkg --revision=custom.1.0 kernel_image &
BACKGROUND_BUILD=$!
sudo ionice -c3 -p $BACKGROUND_BUILD
wait $BACKGROUND_BUILD exit 1

Next.

Previous.