Search Results: "ag"

25 December 2005

Enrico Zini: drezza - Get a picture collection ready for publishing

I've been having three wishes since some time:
  1. Lean Ruby
  2. Find an easy and fast way to find digital camera shoots that need an invocation of exiftran, and invoke it
  3. Find a comfy way to code user interfaces. In particular, I've always dreamed of sticking closures into event handlers.
I've recently managed to fulfill these three wishes in a single shot by coding dr zza, a minimal picture browser with quick links to invoke exiftran. If anyone is wondering, "dr zza" means "make it straight" in Bolognese. It is simple, it is easy, it does all I need: you invoke it and it will show all the pictures in the current directory. If you invoke it with a directory as commandline argument, it will show all the pictures in that directory. It will display the pictures in a list together with their thumbnail. The thumbnail is taken from the EXIF thumbnail. If a JPEG file has no EXIF thumbnail, it invokes exiftran to generate it. Clicking on an image in the list shows it in detail. In the toolbar there are buttons to rotate the image with exiftran, which uses a lossless transform and respects exif data. The tool comes in a single file, no need to install. The source code is clean and commented, and is also a nice demo of various Ruby/GTK2 and Ruby/Gnome2 features and programming tricks, including:
  • subclassing GTK widgets
  • creating custom signals
  • reacting to widget resize
  • processing GTK events during long computations
  • updating the Gnome status bar
  • embedding pixmaps in the source code
  • using custom pixmaps for the toolbar
You can get it from here. If you play with it, let me know and I'll keep it up to date.

Enrico Zini: Including inline images in Ruby GTK2

Including inline images in Ruby GTK2 I'm making a simple application and I'd like to keep it self-contained into a single file; however, I'd like to use some custom icons in it. I tried storing a pixbuf in a string:
ICON = <<EOT
/* XPM */
[...]
 ;
EOT
icon = Gdk::Pixbuf.new ICON
but it tried to open a file called "/* XPM */\n....". I tried with an array:
icon = Gdk::Pixbuf.new ICON.split("\n")
But I kept getting GdkPixbuf-WARNING **:Inline XPM data is broken: Invalid XPM header. Note that trying to write that data to a file and loading the file, worked. This worked:
icon = Gdk::Pixbuf.new "pippo.xpm"
This didn't:
tmp = IO.readlines "pippo.xpm"
icon = Gdk::Pixbuf.new tmp
I finally managed using csource:
  1. gdk-pixbuf-csource --raw --name=antani image.png > /tmp/antani

  2. insert /tmp/antani in the Ruby source code, strip away the comments, concat the various strings:

    ICON = ""+
      "GdkP"+
      "\0\0\4\30"+
      "\1\1\0\2"+
      "\0\0\0@"+
      "\0\0\0\20"+
      "\0\0\0\20"+
      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"+
    [...]
    
  3. load the data with icon = Gdk::Pixbuf.new ICON.unpack("C*"), true

A possible improvement could be using --rle in gdk-pixbuf-csource: raw is good for avoiding to copy the image data, but I don't feel comfortable in doing it since the image data is an integer array temporarily generated by unpack. As usual, if you know of better ways please send me a mail and I'll update the blog entry.

24 December 2005

Steve Kemp: The evolution of a shell script

The script starts out small and does a single job. You realise that you can do so much more, so it gets bigger and more arguments get added to it. Passing more than four parameters, in the correct order, gets painful so you add some option parsing code. Suddenly the number of options grows, so you add a manpage to try to explain the parameters and what they are used for. Other people start using the script and wish to change the behaviour, so you add yet more command line switches and complexity. Gradually you realise your once-tidy script is now a complete mess, so you remove 50% of the code and move it into external “plugins”, or helper scripts. The small script is now much neater, but suddenly users cannot find the code they wish to change - they have to grep through all your helper scripts and plugins to find the code to change. Beacuse users cannot find the right code they submit patches making your script bigger and more complex. Repeat indefinitely. p.s. xen-tools 0.6 is out. It has plugins ;)

Adam Heath: Merry ChristmasHappy Holidays

Artist: Mr. Garrison Lyrics
Song: Merry Fucking Christmas Lyrics
Mr. Garrison: I heard there is no Christmas
In the silly Middle East
No trees, no snow, no Santa Claus
They have different religious beliefs They believe in Muhammad
And not in our holiday
And so every December
I go to the Middle East and say… “Hey there Mr. Muslim
Merry fucking Christmas
Put down that book the Koran
And hear some holiday wishes. In case you haven’t noticed
It’s Jesus’s birthday.
So get off your heathen Muslim ass
and fucking celebrate. There is no holiday season in India I’ve heard
They don’t hang up their stockings
And that is just absurd! They’ve never read a Christmas story.
They don’t know what Rudolph is about
And that is why in December
I’ll go to India and shout… Hey there Mr. Hinduist
Merry fucking Christmas
Drink eggnog and eat some beef
And pass it to the missus. In case you haven’t noticed
It’s Jesus’s birthday
So get off your heathen Hindu ass
and fucking celebrate! Now I heard that in Japan
Everyone just lives in sin
They pray to several gods
And put needles in their skin. On December 25th
All they do is eat a cake
And that is why I go to Japan
And walk around and say… Hey there Mr. Shintoist
Merry fucking Christmas
God is going to kick your ass
You infidelic pagan scum. In case you haven’t noticed
There’s festive things to do
So lets all rejoice for Jesus
And Merry fucking Christmas to you. On Christmas day I travel round the world and say,
Taoists, Krishnas, Buddhists, and all you atheists too,
Merry Fucking Christmas, To You! (Clapping) Thank you Mr. hat

Randall Donald: 8178 and other nvidia stuff

Sorry folks but I won't be getting around to the new drivers until next week. Work (which I have been enjoying) has kindly given us next week off so I intend to work on many packaging issues like nvidia-xconfig, 2.6 modules, bugs etc then.

Philipp Kern: Source-only uploads to Debian

I did some investigation (which was very little, dak’s source is very helpful) upon the possibility to do source-only uploads to Debian’s ftp-master. In short: It’s not possible. Jennifer rejects uploads which do not contain a single binary Debian package:
if not has_binaries and Cnf.FindB(“Dinstall::Reject::NoSourceOnly”):
    reject(“source only uploads are not supported.”);
But well, there’s a way to trick it: If the package contains an arch:all binary independent package and if you upload it together with the source (the binary-indep target of debian/rules will help), Jennifer thinks that the upload contains indeed a binary package and ignores the fact that there are no real architecture dependent binary packages. The autobuilders will do the work for you.

Wouter Verhelst: Barok and Newwave

I just finished setting up barok, and newwave is now doing in its final stages. barok.nixsys.be is a Macintosh IIci, featuring a 68030 processor. The machine has 10MB of RAM, and only had 40MB of disk space. To that, I added one of the 2G-disks of the AS/400 RAID array I have at the office, which is doing nothing there anymore anyway; I lowleveled that disk, and now barok runs its Debian installation on that one. It's on my desk, at the office. newwave.grep.be is a Quadra 700, which externally looks as if it is the same machine; however, this one has a 68040 processor, and 20MB of RAM, so is a bit faster. It also originally had 250MB of disk space, which is a lot for the time, but by far not enough for today. The problem of installing both of them was that neither of them has enough RAM to perform a d-i based installation (you need at least 20MB of RAM to do so, so technically the quadra has enough; but to do so comfortably (i.e., to have it finish within 24 hours), more is recommended). So I installed them using the woody installer, then upgraded their installation to sarge, then to unstable (which is what I'm really after). That took quite some time, not in the least because I wasn't always there to babysit them and make sure they weren't waiting for input. Oh, and the fact that I sometimes tripped over their power cables or accidentally hit their reset button didn't help, either. But now they're mostly up and running, and I'll be testing EMILE on them; the Quadra 950 isn't really supported, which was getting problematic...

Aigars Mahinovs: It just came to me that if we accept the definitio...

It just came to me that if we accept the definition of "industry" (from the text of the software patent directive that EP had in first reading where it it was said) that industry basically is mass production of material goods, then there is no need for neither software industry not movie industry nor music industry - the production and distribution of copies is very efficiently achieved via the Internet. These industries are no longer needed by the society - they have no reason to exist.
Some might object - but where will the first copy come from? Well, that is not product of an industry, but a product of an artist. If originally said industries were created merely to copy and distribute works, now they are morphed into structures "supporting" artists. That is a clutch, that is not needed. There are other ways for artists to make a living off their art. Fanart and free software movement clearly shows that. Patents and copyright are just clutches for the falling industries. The clutches must go and giants must fall for progress towards knowledge society.
I would be glad if we could have professional musicians getting a minimal wage from the government. If your art has been downloaded by 10 000 people last year, you can get government pro-artist payroll. If you want more then minimal wage - do tours, sing in clubs, do advertisements, work in more then one art or get another job. I would be very glad to pay a tax for that if I could have free and unrestricted (copyright-free) access to all art of all artists. Call it art tax, device a maximum number of pro-artists the country can support via the tax, make qualification competitions, whatever. There is art without copyright. It is just not that expensive.
However, while the society will allow industries to suck their money, it will be very hard to change the situation as the very same money will be used to prove that said industries are worth supporting.
There are two ways: kick the crutches out (abolish patents and copyrights) or just move forward and ignore them and their crutches as we step through them towards freedom (develop free software, free media, free ... movements). Of course we can do the second until the first becomes viable.

In that context it is nice to see some funny lawmaking in France (a law project for "copy all you want for 5 /month") or WIPO saying that copyright is not really a right and it is quite a shame that word "right" is part of "copyright". Even reading about each new patent horror of USA court system becomes fun, because them worse it gets, the closer is the end. (Same with Bush :P)

Philipp Kern: Meme: Who needs what?

This meme is really silly, but ya know, I can’t resist... When looking for “Philipp needs”:
Obviously from an other incarnation of this meme:
Last but not least something which stuns me (softly edited):

Philipp Kern: Apple Laptops

I get tired of this laptop on my desk called iBook G4. It’s now the second time I receive “I/O error(s)” from the harddisk drive. So I’ll have to call up Apple just again and beg for a send-in to fix it. This will take several hours on the phone because the support guy can’t decide that on his own. How nice and time consuming level based services are. But could somebody please tell me why I needed a replacement after seven months of use, when the errors were just weird and only Linux refused to do something with the harddisk, and now again after three months when OS X can’t even repair its own filesystem because of bad blocks. The last time I sent it in I even had to go to the nearest Apple Support Provider to get my Airport card replaced because it broke. The whole repair at Apple took three days, the WiFi repair three weeks. And yes it’s true what you could probably read between the lines... My knowledge of English is vanishing... *cough*

Uwe Hermann: 10 + 100 Creative Commons Christmas Songs

Christmas Tree So, it's Christmas today (or it will be tomorrow, depending on where you live). Wouldn't it be nice if you had a bunch of freely and legally available Christmas songs you could listen to all day? Burn on CDs and hand over to your relatives? Share with your friends without the fear of being sued to death by big record labels? Well, here's a list of 110 128 songs which are all explicitly released under a Creative Commons license (no, I did not consider songs which are merely "podsafe"!) and thus can be shared, listened to, and sometimes even modified freely. There's a great variety in style, mood, and genre of the songs: some traditional, some contemporary, some happy, some sad, and some just plain funny. So here's the list: Single MP3s: Compilations: This list is by no means complete, I'm sure. So if you happen to know some more Creative Commons licensed Christmas music, please leave a comment! I'd love to hear about it. (Btw., the nice image on the right is taken from the Wikipedia. The author is Malene Thyssen, and the image is dual-licensed under the GNU Free Documentation License 1.2 and the Creative Commons Attribution-ShareAlike 2.5 license) Merry Christmas everyone! Update 2005-12-24: Added "We Three Kings".
Update 2005-12-25: In the press: Boing Boing, Creative Commons Blog, netzpolitik.org, Technorati, digg.com, del.icio.us and lots more. Added "How George Stole Christmas". Added "Winter Rose". Added "Still, Still, Still".
Update 2005-12-26: Added "Homeless Babe". Added "Christmas Impro".

Aigars Mahinovs: Learning TurboGears now. True MVC separation. Nice...

Learning TurboGears now. True MVC separation. Nice and powerful. Templates are valid XHTML documents (and not a mess of gibberish). Not much magic. I hate magic. Especially when it fails. I look forward to writing a task tracking system for a very special project in this framework. More about the project when it is launched. You're gonna love it ;)

Also I am going to visit my family - they still have no Internet, so I'll be mostly offline 'till the New Year (except for this and this). So I wish you all a Merry Christmas (note: there is absolutely nothing christian about Christmas - it existed like 2000 years before that character from Bible is born according to that book and in Latvian this day is called "Ziemassv tki" - "ziema" = winter, "sv tki" = celebration) and a Happy New Year (if you are really an orthodox christian, why do you count years the new, non-christian way? you should be celebrating New Year on 13th of January like Christ did and the Orthodox church still does, because it uses Julian Calendar more then 420 years after it has been denounced)!

Oh, the fun of touting religious people ... of any religion ... :D Have fun everybody!

Footnote: in October I noted that there have been 11000 spam mails in my GMail spam box at that point (it stores only spam that has arrived in last 30 days). Today I am pleased to say that I can only see 4300 spam mails there today. It could be that GMail has implemented some procedures so that some spam does not even reach that folder, but I shall be very optimistic and say that amount of spam has declined! Maybe spammers are on holidays? If so, I wish they stay there :D

23 December 2005

Marc 'HE' Brockschmidt: The differences between Christmas and Chanukah

If anyone asks you what the difference is between Christmas and Chanukah, you will know what and how to answer!

1. Christmas is one day, same day every year, December 25. Jews also love December 25th. It's another paid day off work. We go to movies and out for Chinese food and Israeli dancing. Chanukah is 8 days. It starts the evening of the 24th of Kislev, whenever that falls. No one is ever sure.
Jews never know until a non-Jewish friend asks when Chanukah starts, forcing us to consult a calendar so we don't look like idiots. We all have the same calendar, provided free with a donation from the World Jewish Congress, the kosher butcher, or the local Sinai Memorial Chapel(especially in Florida) or other Jewish funeral home.

2. Christmas is a major holiday. Chanukah is a minor holiday with the same theme as most Jewish holidays. They tried to kill us, we survived, let's eat

3. Christians get wonderful presents such as jewelry, perfume, stereos... Jews get practical presents such as underwear, socks, or the collected works of the Rambam, which looks impressive on the bookshelf.

4. There is only one way to spell Christmas. No one can decide how to spell Chanukah, Chanukkah, Chanukka, Channukah, Hanukah, Hannukah, etc.

5. Christmas is a time of great pressure for husbands and boyfriends. Their partners expect special gifts. Jewish men are relieved of that burden. No one expects a diamond ring on Chanukah.

6. Christmas brings enormous electric bills. Candles are used for Chanukah. Not only are we spared enormous electric bills, but we get to feel good about not contributing to the energy crisis.

7. Christmas carols are beautiful...Silent Night, Come All Ye Faithful.... Chanukah songs are about dreidels made from clay or having a party and dancing the hora. Of course, we are secretly pleased that many of the beautiful carols are composed and written by our tribal brethren.

And don't Barbara Streisand and Neil Diamond sing them beautifully?

8. A home preparing for Christmas smells wonderful. The sweet smell of cookies and cakes baking. Happy people are gathered around in festive moods. A home preparing for Chanukah smells of oil, potatoes, and onions. The home, as always, is full of loud people all talking at once.

9. Women have fun baking Christmas cookies. Jewish women burn their eyes and cut their hands grating potatoes and onions for latkas on Chanukah. Another reminder of our suffering through the ages.

10. Parents deliver to their children during Christmas. Jewish parents have no qualms about withholding a gift on any of the eight nights.

11. The players in the Christmas story have easy to pronounce names such as Mary, Joseph, and Jesus. The players in the Chanukah story are Antiochus Judah Maccabee, and Matta whatever. No one can spell it or pronounce it. On the plus side, we can tell our friends anything and they believe we are wonderfully versed in our history.

12. Many Christians believe in the virgin birth. Jews think, "Joseph,you shmuck, snap out of it. Your woman is pregnant, you didn't sleep with her, and now you want to blame G-d. Here's the number of my shrink".

13. In recent years, Christmas has become more and more commercialized. The same holds true for Chanukah, even though it is a minor holiday. It makes sense. How could we market a major holiday such as Yom Kippur? .....

Forget about celebrating. Think observing. Come to synagogue, starve yourself for 27 hours, become one with your dehydrated soul, beat your chest, confess your sins, a guaranteed good time for you and your family.
Tickets a mere $200 per person.

[Stolen from $unknown]

Julien Danjou: Kheb is not anymore

Kheb, my old Pentium machine hosted in my parents' house, just died.
I think the CPU is dead. I will replace it with another Pentium II box I have in my flat. Because they are going to get a DSL access in the next days (yeah, we finally got DSL connection in this 700 inhabitans village). I just updated my history page, just for fun!

Wouter Verhelst: Aptitude's killer feature

I didn't like aptitude. Its user interface wasn't much better (IMO) than that of dselect (for the full-screen interface) and apt-get (for the command-line one); and it did not offer any features that I absolutely needed and couldn't get with (e.g.), debfoster. But it did require quite a bit more time to do stuff, since it maintains its own package databases, on top . When installing rock again, I accidentally used aptitude one time, and found out about it's new feature (that only exists since 0.4.0, IIUC) which allows one to more detailedly specify what to do in case of an upgrade conflict. This is really great. I've since completely switched to using aptitude, on all my systems—even the stable ones, which do not have that feature yet; the latter is mainly because it allows me to have a similar interface on all my machines, rather than having to remember how something is done on this box again. Thanks, Daniel!

Jordi Mallach: A unexpected defeat

Last week, one of the pedals in my bike broke severily after some weeks of problems. One day, it suddenly fell off the crank, nearly making me fly in the middle of Blasco Ib ez, a big avenue with dense traffic. Anyway, since Friday I can't cycle until I find a replacement pedal and crank for my old bicycle, so I had to go back to the annoying Metro. On Monday, I used the magic card as usual, and so I did on Tuesday. When I left office and headed back home, something terrible happened, though. I went down to the Metro station, and introduced the Blue Gold. Instead of the usual processing sound, I was greeted with a loud beep, and my card went out through the "rejected" hole. The display read very clearly: BILLETE AGOTADO Surprised, I tried again. Oh no! I heard the train coming, so I used the emergency ticket and went in. A feeling similar to despair mixed with fear started to form in my chest while I ran down the stairway. During the travel, I thought this was just temporary, and other cancelling doors would accept the Blue Gold as usual. When I got to the Arag n station, I tried going out with the magic card, with the same sad result. Defeated! As I suspected, the card wasn't infinite at all, it just had an awesome number of rides on it (I think, in the end it must have been something like 270 or so), and I ran out on Tuesday, after 13 months of use. On Wednesday, with my bicycle still broken, I had to go to the Metro again, and instead of just going through the gates, I had to go the vending machine to get one of those normal, ridiculous 10 ride ticket for 5.40 . Today, I've already used half of it, and the value of the Blue Gold is showing very clearly. Ah well, I guess a lottery like that could not last forever...

Edd Dumbill: Paul Graham, XTech and holidays

Just a quick pre-holiday update on the state of XTech 2006. We've had, as usual, some amazing paper submissions so far, so please keep them coming. Don't forget, too, that we're also asking for tutorial submissions. These should be half-day or full-day and, as well as the free conference registration all speakers get, we pay an honorarium to tutors. Deadline is 9 January at the latest. One very exciting bit of news I have is that Paul Graham has agreed to deliver one of the keynote sessions at XTech. I'm very pleased about this, and it follows in the tradition we've established of having interesting and challenging speakers, rather than putting plenary sessions up for sale to sponsors. Amsterdam. 16-19 May 2006. What could be better? As for the holidays, I hope to be spending some time catching up on my open source work, and also carrying on my work with Rails. A busy couple of months at work, combined with no fewer than two bad server hardware issues, has eroded free time considerably. So to anyone waiting on me for something, I do apologise. One final pointer: IBM developerWorks have published the first part of my examination of the future of HTML, focusing on WHATWG. Look out very soon for the second part, looking at the various activities underway at the W3C. I know that my editor at least awaits this eagerly! Thanks to everyone who's read this blog during the year, and for the many interesting and helpful conversations that have come from it. Happy Christmas!

Jean-Michel Kelbert: Internet is back !

After two months without Internet at home, my access is now back. This is a nice Christmas present, isn’t it. I’ll be able to participate again to Debian ! :-)

Christian Perrier: DADVSI: see you on Jan 17th

Yesterday evening, the Ministry of Culture has deciced to report the discussion of the DADVSI bill after the reopening of the French Parliament, on January 17th. The debates yesterday have been featuring different representatives from the majority (UMP party) coming to explain that que "global license" amendments, adopted yesterday, are severely critized by the "artists". Indeed, it turns out that the major artists feel themselves in danger with the disposals of the "global license" while artists will a less wider diffusion are mostly OK with it. Who would be surprised? :-) Debates around this will be very hot again on January and we can expect an active lobbying by the "official artists" and the major entertainment companies. About the parts of the bill which were highly criticized by the Free Software community, it seems that all concerns about the copy protection schemes are on their way for being removed. The debates clearly show that the Free Software community has been heard, even by several representatives who are in favor of several other parts of the text. In short, I'm now confident that this bill will in no way be able to lead to an illegal Videolan Client, for instance. The transcription of the debates shows that all representatives are very motivated in trying to limit the influence of the major software companies (Microsoft is explicitely mentioned several times). I'm in no way saying that we shouldn't stop being very careful and stop following what will happen. But, again, all things I have read from the debates shows me that the free software community is heard in France, even by our representatives and even by the current majority parties, which I don't share many things with. I consider this a victory for our community even if "we only won a battle and we now have to win the war".

Matt Brown: Firefox Flicks

If you’re a bit bored I would highly recommend heading over to Firefox Flicks. I haven’t had time to look through all of them yet, but of the 5 minutes I spent I found these, which range from: The Good through to the The Average and finally The UGLY

Next.

Previous.