Planet Larry

November 03, 2008

Roderick B. Greening

KDE-Nightly (Neon) - For the Thrill Seeker in You

Well, thanks to Harold (apachelogger) our resident packaging savant, we have the ability to test drive KDE 4.2 trunk daily. Remember, this is trunk we are dealing with and many things break, and possibly break quite often and maybe for extended periods of time. For this reason, you should never install this on your production machine.

I decided to give this a test drive, and figured the best way to do so was via a VM. So, I installed Virtualbox first and set it up. I won't go over all the details here, as there are a wide variety of docs available for setting up virtual box (aka google for it).

Once I had a VM drive all setup and installed with the latest Intrepid, added the KDE Nightly Neon repository (the PPA for KDE Nightly) to a new sources.list.d/neon.list file. The PPA is enabled by adding this entry:

deb http://ppa.launchpad.net/project-neon/ubuntu intrepid main

The next thing you need is to update your repositories package info. Either using your favorite package manager, and hit their update option, or from the command line execute the following:

sudo apt-get update

Now, you should have an updated package list which contains the Neon packages.

Next, using your package manager, locate the kde-nightly package and select/mark it for installation and apply it or execute the following from the command line:

sudo apt-get install kde-nightly

This will install the required files and setup a new kdm xsession for KDE Nightly (Neon). Once you logout and end up back to KDM, you can choose this new session (rather than the default KDE session).

Reference post can be found here.

Many thanks to apachelogger for this.

November 03, 2008 07:45 PM :: NL, Canada  

Jason Jones

New Song - "Hello"

Okay...  So about a month ago, I sat down at my keyboard and plunked out a few notes.  About 2 weeks later, I gave a rough copy of a mash of music to my friend, Ryan Phillips, and had plunked out some sweet riffs to it.

Two weeks later, I add some vocals and effects, and this is what you've got.

I hope you like it.  (press the play button in the top right corner to hear the song.)

Feel free to comment, and also feel free to copy and distribute the song to your heart's content!

Oh, and as always, all music recording, tracking, editing, mixing, and mastering - as well as all effects were done on gentoo Linux, using open source software.

  • Operating System - gentoo Linux

  • recording / tracking - ardour

  • mastering - jamin

  • MIDI sequencing - muse

  • Plugins - TAP Reverberator, Sigmoid Booster, SC4 compressor, and a few gates.



And there ya have it!

November 03, 2008 10:14 AM :: Utah, USA  

Steven Oliver

When I grow up…


Unlike the guy who writes the Linux Haters Blog I haven’t given up on this thing called blogging. Instead I started working for a living so I don’t always find it so easy any more to write here. Though I do still enjoy it. On to the post.

So, despite being 24, there is still a lot I want to be when I grow up…

I want to be that guy who is so good at computer programming, if the program doesn’t work the way he wants, he simply changes it. I know some guys like that and I don’t like them. Why? Because their better than me and I’m allowed too. Language here is irrellavent. It doesn’t matter if its C/C++, Java, or something odd like Python, Perl, or Ruby. I want to, at the drop of a hat say, I don’t like how this works, I shall change it. And then two, maybe three, days later, I have a diff file worthy of a king.

I want to be that guy who appears, by all visible means, to be the master of his favorite language. I have some favorites, but I’m a master of none of them. Is it my fault I’m not? Why hell yes. But at this point I haven’t done anything about it. Will I? Knowing myself like I do there is a good chance I will not. Just like there is a good chance I won’t finish the book I’m reading either.

But then again, being me isn’t all bad. When I first started using Linux I couldn’t write Hello World! in any language much less know what someone was talking about when they said they “Wrote Hello World.” I can now do things with computers other only dream about. My mastery of SQL is reaching a scary level (because of my current job). Its just my luck I suppose that I really don’t care for SQL at all. It bores me to a great extent, and no matter how much better I get at it, I still don’t like it any better. If I never wrote another “If… from… where…” statement I would probably not be bothered by it at all.

And one more thing that bugs me. Has anyone ever noticed how absolutely hard it is to teach yourself something “just because you want to.” I want to learn C#. But with no real reason to other than “I want to” its a very tedious process. I find it hard to keep interest in it. I get bored. I find myself desperatly seeking programs to write, only to become bored with those as well. What am I to do?

Enjoy the Penguins!

ps. Paludis has been updated quite a bit since my last post. Break yourself and upgrade.

      

November 03, 2008 03:09 AM :: West Virginia, USA  

November 02, 2008

Nikos Roussos

django wysiwyg admin editor

i'm already rewriting this blog on django framework (it will be updated soon), but i wanted to have a wysiwyg editor on my administration panel.

so i downloaded tiny mce, untared it on my /media/admin/ directory and i created textareas.js inside it:

tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,bullist,numlist,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,separator,image,separator,cleanup,code",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
});

the first line instructs tiny mce to convert all textareas to wysiwyg editor. the advanced theme is actually the full theme, with three rows of buttons. i filter it with the theme_advanced_buttons lines, keeping only the ones i need.

the last thing i have to do is to add the following lines to the models i want inside my admin.py:

class PostAdmin(admin.ModelAdmin):

    class Media:
	js = ('/media/admin/tiny_mce/tiny_mce.js', '/media/admin/tiny_mce/textareas.js')

admin.site.register(Post, PostAdmin)

which will enable tiny mce on my Post Model textareas.

November 02, 2008 05:33 PM :: Athens, Greece

Nicolas Trangez

Got to love the open source communities…

Hanging around in #coreboot@irc.freenode.net recently, this just passed by:

15:28  <eikke> is it possible in linux to access partitions in an losetup’ed raw image?
15:29  <carldani>  eikke: yes, I wrote a kernel patch for that
15:29  <eikke> ah, patch :p i did it using –offset now, but thats kinda hackish
15:29  <carldani>  eikke: the easiest way is to use kpartx
15:29  <carldani>  eikke: that was impossible back then
15:30  <eikke> i see
15:30  <carldani>  eikke: kpartx -a /dev/loop0
15:30  <carldani>  eikke: that will give you /dev/mapper/loop0p1 /dev/mapper/loop0p5 etc
15:30  <eikke> cool
15:30  <carldani>  eikke: are you the eikke responsible for ivman?
15:31  <eikke> a long time ago, yes
15:31  <eikke> dont start the flames please :p
15:31  <carldani>  eikke: thanks! I’m still using it on my laptop

A helps out B, B helps out A, A writes something useful for B, B wrote something used by A, etc. Got to love the open source movement.

November 02, 2008 02:16 PM

Thomas Capricelli

Activities gallery

While developing my recently released activity mercurial extension (and here too), I did a lot of tests on some quite famous/big projects. I’ve found the results to be quite interesting and decided to put up this gallery. Are you interested in the history of commits for kde, linux, django, portage(software), the portage tree, and others?

warning : this is just for fun (copyright Linus Torvalds), I’m perfectly aware that the number of commits is a very bad indicator for development.

The gallery : http://labs.freehackers.org/wiki/hgactivity/Gallery

November 02, 2008 12:46 AM

November 01, 2008

Brian Carper

Qt4 in Lisp?!

Imagine Qt4 bindings for Lisp that are:

  1. Officially supported
  2. Thoroughly documented, with tons of examples
  3. Cross-platform
  4. Consistently up-to-date

Keep dreaming, right? Your first thought might be to check CLiki for some Common Lisp bindings. There is indeed a Qt project there. Except at a glance, it's listed as working only for CMUCL. And the last update was 2003. And the download link is 404'd. Oops!

But there's a link to a some QT4 bindings, CFFI style. Much more promising. Except... last update: March 2007. "Project status: dead." Never mind. There's also this and maybe a few others you could Google up, but I haven't tried them and I'm not going to.

Kudos to the people who wrote the above; providing bindings for all of Qt4 is a daunting task and it's no wonder it's not done for Common Lisp. Doesn't change the reality of the fact that Qt4 (like many other libraries) is a no-go in Common Lisp. There's nothing stopping Common Lisp from having great libraries except lack of manpower; but lack of manpower and lack of mature, tested, up-to-date libraries is still a real problem when you want to write an application today.

Enter Clojure

Luckily, it turns out there ARE Qt4 bindings that you can use from Lisp. That Lisp is Clojure, and the bindings are Qt Jambi. Many people are excited about Clojure nowadays, and this is one big reason (of many). It's hard to beat Java when it comes to libraries, and Clojure gets them all for free.

Let's try to write one of the official Qt4 examples / tutorials in Clojure and see how it goes. Keep in mind that I'm still learning Clojure, so this may be far from ideal, but it should give you a bit of a taste of Clojure and Qt Jambi if you've never seen it before.

To spoil the ending a bit: It works! In Vista and Linux (I don't have an OS X box to try, but it'll probably work there too):

Clojure Qt4 demo Clojure Qt4 demo

Setup

To set up Clojure, follow the directions on the Clojure wiki. Be sure to get the SVN version of Clojure, because it's being developed very rapidly and is often updated many times per week. You can also check out some recent posts on Bill Clementson's blog, and this movie on LispCast which walks through setting up Clojure and Emacs/SLIME.

To make Qt Jambi available to Clojure, you may have some options. If you use Linux, your distro may make this available via your package manager. Otherwise go to the Qt download site and download "Qt for Java" for your OS. This is a freaking huge download, but it includes all the documentation and source code and plugins; all you need out of it are a couple of JAR files. There are two JARs you need, one cross-OS and one specific to your OS.

You have to put these JARs on your CLASSPATH so Clojure can find them. There are lots of ways to do this; one way is on the commandline:

java -cp qt-jambi-4.4.3_01.jar:qtjambi-linux32-gcc-4.4.3_01.jar:clojure-lang-1.0-SNAPSHOT.jar clojure.lang.Repl

There's also add-classpath in Clojure, which lets you edit the classpath while Clojure is running. I was unable to get this to work with Qt Jambi, but I didn't try very hard. In reality I just use a shell script so I can dump a bunch of JARs into a directory, and they will all be added to CLASSPATH automatically when I start Clojure.

That's it. Installing libraries in Clojure couldn't be much easier.

The Code

Here's the complete example code for download. Let's walk through it a bit. First we have to import the Qt Jambi apps into Clojure. Qt Jambi is on our CLASSPATH and available to Clojure, but we still have to explicitly import the bits of it we want:

(ns clojure-qt4-demo
  (:import (com.trolltech.qt.gui QApplication QPushButton QFont QFont$Weight)
           (com.trolltech.qt.core QCoreApplication)))

ns creates a new namespace, and provides convenience syntax to import Java classes at the same time. It can also import other Clojure files or Clojure libraries, among other things.

Note immediately how this is nicer than Java. In Java you would be writing something like

import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QPushButton;
import com.trolltech.qt.gui.QFont;
...

And so on, over and over. If you're lucky you have a bloated IDE to type those things for you. In Clojure, macros let us factor out the repetition; we name the big long path once, and pluck out the things we want. The other option in Java is to import com.trolltech.qt.gui.*, which pollutes your namespace unnecessarily; Clojure lets us succinctly take just what we want.

One thing I couldn't find documentation for is the way to import a static inner subclass of another class. To do this you have to use syntax like SomeClass$SomeSubClass. My first thought was QFont/Weight or QFont.Weight, but those don't work.

If you're typing all of this at a REPL, you now have to do:

(in-ns 'clojure-qt4-demo)

to switch to the namespace we just created. Next we set up some convenience functions:

(defn init []
  (QApplication/initialize (make-array String 0)))

In Qt4, the first thing you always do is initialize QApplication. QApplication is essentially a singleton class, and it has to be initialized via QApplication.initialize(), a static method call, before you do anything else. In Clojure this becomes (QApplication/initialize), which says to call the function or static method called "initialize" in the namespace called "QApplication". Static methods in Java become functions in a class-namespace in Clojure.

This function expects an array of Strings, which in a normal app would be commandline parameters. In Clojure we can make a native Java Array of Strings via make-array. I just pass in an empty one because I'm running this from a REPL. Note, a native Java Array of Strings is different from a Clojure persistent array, [ ]. This is a bit nasty, but necessary for Java interop. Most of the time you will be able to get by with [ ]. Next:

(defn exec []
  (QApplication/exec))

This function (again a static method call) is generally the LAST thing you do in a Qt application. It starts displaying widgets and fires up the event loop.

A gotcha here is that certain things must happen in a certain order. A Qt app looks something like this:

  1. QApplication.initialize()
  2. Initialize and set up all of your widgets etc.
  3. QApplication.exec()
  4. Either the program exits, or go to step 1 to start over.

For example if you try to exec() before you initialize(), it does nothing at all. If you call initialize() more than once, it dies with a RuntimeException. When I was playing around with this at the REPL, it was very common that I called initialize multiple times by mistake. It's often safe to swallow the exception though.

All of that bookkeeping really wants to be made into a macro. Here's a simple macro:

(defmacro qt4 [& rest]
  `(do
     (try (init) (catch RuntimeException e# (println e#)))
     ~@rest
     (exec)))

This kind of thing lets you avoid the insanity of Java, which forces you to re-type exception-handling code and other boilerplate code over and over and over. You can abstract that all away in Clojure.

Macros in Clojure are much like Common Lisp macros. ~@ is a splicing-unquote, like ,@ in Common Lisp. Another interesting thing here is e#, which is a shorthand way to create a gensym. It creates a unique symbol; this prevents our macro from stepping on the toes of any other symbol called "e".

Using this macro we can finish our simple example:

(defn hello-world []
  (qt4
   (let [app (QCoreApplication/instance)
         button (new QPushButton "Go Clojure Go")]
     (.. button clicked (connect app "quit()"))
     (doto button
       (setFont (new QFont "Deja Vu Sans" 18 (.. QFont$Weight Bold value)))
       (setWindowTitle "Go Clojure Go")
       (resize 250 100)
       (show)))))

The hello-world function is pretty straightforward. It makes a button, sets up an event handler that closes our app when the button is clicked, then sets its title and font, resizes it and shows it. Note how seamless this is. Aside from all the new's and .'s, you could barely tell this was Java. It's all tasty Lisp.

Clojure has a bunch of simple convenience macros that make writing Java less painful, two of which I show here. One of the biggest problems with Java is its extremely verbose and punctuation-heavy C-like syntax. Compare:

button.resize(250, 100);
button.setFont(new QFont("Deja Vu Sans", 18, QFont.Weight.Bold.value()));
button.setWindowTitle("Go Clojure Go");
button.show();

Look how much repetition there is in the code. button.blah, button.blah, button.blah. Repetition is bad. Clojure has the doto macro which says "take this thing, and do a bunch of stuff to it" without having to retype it every time:

(doto button
  (resize 250 100)
  (setFont (new QFont "Deja Vu Sans" 18 (.. QFont$Weight Bold value)))
  (setWindowTitle "Go Clojure Go")
  (show))

Another macro is .. which says "take these things and put dots between everything", chaining method calls. So instead of QFont.Weight.Bold.value(), you can say (.. QFont$Weight Bold value). Handy.

To run this from a REPL, type

(hello-world)


Verdict

This app of course is a silly toy and just scratches the surface. But in my opinion, Clojure already beats all other Lisps by providing access libraries like this one. This is one of its killer features for me. The fact that you can seamlessly and easily use any Java library from Clojure is pretty amazing.

Why would you want to run Qt4 apps from Lisp anyways? Java (and thus Clojure) already have other GUI frameworks, like Swing and SWT and AWT, so why bother with this? Well, a few reasons...

  1. Because I can.
  2. Qt4 has a lot of impressive features nowadays. Run this Qt Jambi example to see some of those features.
  3. Qt's design may appeal more to you than Swing's, which can be clunky at times.
  4. Maybe you want to integrate well into KDE. I first started exploring GUI programming in Clojure when trying to make an icon sit in the system tray, and while Swing can do this, it's a bit painful to get it to look just right. It's trivial to do in Qt4.
  5. If I'm forced to write a Qt4 app, I'd much rather write it in a highly interactive and iterative way using Clojure than struggle with a write/compile/debug/recompile/wait-for-hours cycle. At the very least Clojure would be ideal for prototyping.
  6. Because I can!

Verdict: Clojure rules. But Java interop is just one reason it rules. Clojure has native Perl/Ruby-like reader support for hashes/arrays/sets/regexes/etc., support for easy and safe concurrency, cross-platform-ness galore, and a much more modern feel than Common Lisp. It's being worked on by some very smart people and the community is vibrant, enthusiastic, and welcoming. It has all the strengths of Java and Common Lisp, and very few of their weaknesses.

November 01, 2008 12:31 AM :: Pennsylvania, USA  

October 31, 2008

Thomas Capricelli

Splitted activity for mercurial

Today I have added options to the mercurial activity extension and it is now possible the activity displayed for every author. It looks like this :

October 31, 2008 08:22 PM

Roderick B. Greening

Upcoming KDE 4.1.3 release.... Nov 5th



Well, the Kubuntu team has had a busy night/day, packaging KDE 4.1.3 in preparation for release into intrepid-updates. KDE tagged 4.1.3 on October 29th, in preparation for the November 5th release. I'm pleased to say we are way ahead of the game, after the last 24 hour stint in package building and testing.

It's not like we had an easy time either, what with this coinciding with the Intrepid release and all. The mirrors were completely bogged down, and a few of the team had issues finding a mirror suitable to download from. Luckily, I had a great up-link and a close east coast mirror to work with.

Anyway, the packaging is pretty much completed, we just need to build the stack, test and then deploy to the updates queue. This should coincide with the KDE release date of November 5th, if all goes according to plan. It's a lot to take in, a new Kubuntu release immediately followed by an update to KDE, and a great team to pull it all together.

October 31, 2008 04:15 PM :: NL, Canada  

Nirbheek Chauhan

GDM 2.24 aka SMB (Shoot Me Bloody)

That's the name of my proposed WorkOut for FOSS.IN/2008.

What is it about?
It's about getting GDM 2.24 in good enough shape to be considered for adoption by Ubuntu, Gentoo, Mandriva, Debian, *BSD; and not just Fedora and Foresight.

What's wrong with GDM 2.24?
Strictly speaking, there's nothing *wrong* with it. It works flawlessly on my system (except for the daemonisation bug/regression, which I had to patch up manually). I've been using it as my primary display manager since 2.23.1, and it has improved to the point of bug-free-ness.

However, there are reasons why most distros are shipping the older 2.20* series GDM instead. The aim of this WorkOut is to make inroads into fixing those problems.

That's all fine, but what *exactly* is wrong with GDM 2.24?
Oh, right. I should impose a hand-waving embargo on myself ;p

History: Sometime around the GNOME 2.18 release cycle, the GDM developers decided that it was high-time someone fixed all the problems with GDM and rewrote it from scratch. For this reason, a rewrite of GDM was started; aiming for the 2.22 release cycle.

However, during 2.22 cycle, GDM 2.20 was shipped due to several regressions. When GDM 2.24 was proposed, it caused intense debates involving the release team. However, it was included since the feature regressions were deemed minor enough.

Some of the regressions are listed below:
  • Lack of Themeing support: The architecture of the new GDM is very different from that of the old GDM. And hence, there is no way to "port" the older themes to the newer GDM, and there is currently no inbuilt support for themeing either.
  • No `gdmsetup`: The older gdmsetup had several security bugs, and hence was not ported to the new GDM. The configuration file is still the same however, so this is not a really large regression since there's no theming support anyway.
  • No XDMCP Chooser in the login screen: This is quite self-explanatory
  • No support for timed-logins: This is being worked on actively in-trunk
  • No support for backends other than PAM: This means that distributions like Slackware, *BSD, etc cannot use GDM 2.24

The aim of this WorkOut is to fix the above listed regressions, and some of the other regression bugs, TODOs, Visual Glitches, etc. And maybe even add some new features ;)

Details about the How, and When will be posted soon. Stay tuned!

~Nirbheek, hoping to see you during the discussions and @foss.in :)

October 31, 2008 11:27 AM :: Uttar Pradesh, India  

Thomas Capricelli

Activity extension for mercurial

example : activity of the mercurial "crew" repository

example : activity of the mercurial crew repository


This is something i’ve really been missing for long in mercurial : a way to display the activity of a repository. No, ‘hg churn’ is not the right answer, I want an idea of when the peaks of development happened. So I have written this small extension. It is based on matplotlib, so you’ll need that to be installed. It is tested with mercurial 1.0.2 and the current development version of mercurial (so-called mercurial ‘crew’ repository). I’m a big fan of this kind of information, and I’m sure to use this extension regularly, so you can count on it being maintained.

To use is, grab a copy :

hg clone http://sources.freehackers.org/hg.cgi/hgactivity/

and add a line in your ~/.hgrc under [extensions] with the full path to the activity.py (example on my computer, please adapt to your actual path:)

activity=/home/orzel/hg/hgactivity/activity.py

To use it, just do from inside a repository:

hg activity

The first example shows the activity for the mercurial.crew repository, and here’s another one representing the activity of the the ‘kdebase’ module from kde (I have a local mercurial mirror):


Activity of kdebase in the last month

Activity of kdebase during the last month


Homepage of the project: http://labs.freehackers.org/wiki/hgactivity

October 31, 2008 03:04 AM

October 30, 2008

Jürgen Geuter

The iPhone as a device to save money?

When I was younger I always had a lot of respect for reporters, I actually considered becoming one for a while, but nowadays that respect decreases with about every second article I read. Today I found another gem on Comscore:
In tough economy, lower income mobile consumers turn to iPhone as internet & entertainment device [...]
"As an additional household budget item, a $200 device plus at least $70 per month for phone service seems a bit extravagant for those with lower disposable income," said Jen Wu, senior analyst, comScore, the report’s author. "However, one actually realizes cost savings when the device is used in lieu of multiple digital devices and services, transforming the iPhone from a luxury item to a practical communication and entertainment tool."


I don't know what kind of education Jen Wu has or if there was some crack smoking involved, but let's pretend what was said there was meant seriously and look at it for a second.

The iPhone with its tiny screen replaces exactly which "entertainment tool"? A handheld console? Naaa, those are cheaper than the iPhone by far. It replaces with its contract your local internet provider? Naaa, iPhone doesn't want to be plugged into a computer to have that thing use it's internet connection. Oh right, it's used for your whole internet thingy and you don't even need a computer anymore, right? Naaa, it's too small, it doesn't have flash and you can't get your applications running on it (yes we linux people know that complaint!).

The iPhone is a status symbol first and a gadget second. There are some people who buy it just for its gadgety value: Play around with it, jailbreak it and whatnot. But those are not doing it to save money, it's typically "play money" that is used for it, money that would have been spent on another gadget if the iPhone wasn't available.

But for many the iPhone is just a status symbol telling the world that you can afford it: It's being inserted into many TV shows so that it is knwon well enough to be recognized. Macbooks are expensive but only give you reputation with a certain subset of the geek community, the iPhone is known in way bigger parts of the society. And from that point of view it does save money cause it's cheaper than buying a Mercedes.

But what the hell did that "senior Analyst" smoke to seriously tell us that the iPhone was being bought based on the will to save money? I mean we all do say stupid things once in a while (I probably even more often than most) but what about thinking for a splitsecond before opening that hole in your face and having sounds drop out?

There goes another bit of respect for reporters and journalists.

October 30, 2008 10:56 AM :: Germany  

Roderick B. Greening

Kubuntu Intrepid and Desktop Notifications

For those that aren't aware, Intrepid Ibex is just about ready to hit the streets (sometime Thursday). There have been a lot of changes in this release, and the Kubuntu desktop has had its share, including the switch to KDE 4.1. However, this post isn't about the new release, but rather a new application within this release, called update-notifier-kde.

The app was written by our friend Jonathan Riddell, and has been steadily improved upon by members of the Kubuntu team.

What is update-notifier-kde? It's a small python app that sits in your system tray and monitors your system for updates, crash logs, reboot requests, and other notifications. It integrates tightly with adept/apt, apport, and package update hooks.

Providing the user with useful feedback is very important to the whole desktop experience, and this app delivers.

Over the last few months, I have added a few tweaks here and there, and fixed a few bugs reported during the Intrepid alpha and RC testing. Currently, I am working on replacing the old KPassivePopup with the better KNotification.

It's a work in progress, but by using KNotification, the user is able to change how notifications are sent/received for any event update-notifier-kde generates, which was not the case with the KPassivePopup.

Configuration of these notifications is done via the system-settings. This can be seen in the following screenshot:


With KNotification, the user can completely disable the Popups, or add sounds, etc. This is important, because not all users are equal, and not everyone wants to see the Reboot Required Popup. There were a few bugs surrounding this very thing, and I'm glad to say, users will have the ability to finally turn this off if they choose to (not that I recommend disabling any of the default notifications).

So, I said it's a work in progress and that's for a couple of reasons:
  1. The code changes aren't yet uploaded (expect version 0.10 to have the change included)
  2. It needs some work on localization
  3. The KNotification isn't anchored correctly  (IMO) so I need to review that


Below is a shot of the current KPassivePopup. This is the KDE 3.5 bubble, and is non-interactive.


And here, we have the newer KNotification popup.


I hope to complete these changes within the next day or two, so this should hit intrepid updates in the near future.

October 30, 2008 02:33 AM :: NL, Canada  

October 29, 2008

Roy Marples

New dhcpcd versions out

Nothing major - the 4.0 branch gets a fix to send DECLINE messages correctly (basically we forgot to add the IP and ServerID to the message) and the ntp.conf file path is tunable by NTP_CONF=/usr/pkg/etc/ntp.conf in /etc/dhcpcd.enter-hook. 4.99.3 got released as well with more fixes, mainly for 4.0 features which were broken. I'm no longer hopeful about getting IPv6 support in by the end of the year as I don't see where I'm going to get the time from. Ah well, it's not that urgent yet.

On a side note, the new NetBSD server is working out well. It's very stable, the network throughput is better for downloading (as it's my router at home) and this site is more snappy Smiling

October 29, 2008 01:34 PM

October 28, 2008

Jürgen Geuter

An Office in the clouds

For some years now Microsoft has failed at modernising their own business strategy with Google eating their lunch when it came to webapps but in connection to their next Windows, Windows 7, Microsoft announced that they were releasing their Office package to the web:
"Your head was in the clouds, now those clouds are in your head"
dredg - Matroshka

After years of ignoring "the cloud" Microsoft starts to move many of the core apps online, is that a smart move?

We know that Windows 7 has the Vista Kernel and just a few updates when it comes to Vista's look'n'feel: Windows 7 ist more like Vista 2, but with a twist, with less functionality which is very smart.

Windows' biggest problem and benefit was always backwards compatibility: You can still run most Windows95 applications on a Vista system. This is good for customers who can continue to use the old program that they have gotten used to 10 years ago but it's a nightmare for Microsoft: All the old APIs that they'd love to deprecate have to be kept around so the old applications continue to work which does not just force you to update them in case of security leaks but also slows adoption of your new and fancy APIs cause developers continue to use the APIs they are used to.

Moving applications out of the operating system into "the cloud" makes sense for Microsoft because they know one thing: Most users will not install new software if their operating system comes with a tool to do the job. People want to read email and since Outlook Express/Windows Live Mail came with the OS they used it. They kept using Internet Explorer, they use MSN Messenger. Now all those apps have to be maintained, people have boatloads of different versions around, never update cause their version of Windows is pirated and whatnot. All in all a huge pain in the ass.

Moving things online makes sure that everybody has the newest version and, way more important, reduces the amount of code that can have security issues: It's just the browser. Keep the browser secure and all the rest is secure, too, because it's running within the browser. Huge benefit for Microsoft.

People use Office on their computers and while Openoffice.org might have grown, most people still want "the real office". Since it's really fucking expensive they pirate it of course (I mean who in his right mind pays 300 bucks for a bad text editor?). Problem solved by moving it to the cloud: People can use your official version and will continue to be trained using it, you can place a few links into your default installation and people automatically use your software and not Google's. Even more importantly: If you add functions that people have to pay for, they do not in fact have the code on their machines, it's online, which eliminates piracy or at least make it a lot harder.

Moving applications and functionality online makes a lot of sense, not just for Microsoft: Adobe is not just working on Air and Flash for fun, it's about moving your product "to the cloud" as in "away from people's workstations". The big software vendors have realized that as long as you give people binaries to run, they will be cracked. But with browsers getting better and new technologies like Adobe's Air and Microsoft's Silverlight you can build pretty rich applications based on the web without giving people too much of your code.

The cloud has benefits, everybody owning a netbook can tell you how small the installation on it can be while still offering great functionality, but it's also the trap that Richard Stallman talked about. But for Microsoft it's not just that, it's a way to move away from the legacy APIs and lock people in even stronger: Instead of installing annoying trials they can integrate their own apps deep into the system without really installing them, a nice way to fight monopoly claims.

Some people seem to think that Microsoft is just late to the game and Google has already won, but I think that is a view way too simplistic: Microsoft is late to the game but with their dominating market power they'll pretty much make it a whole new game by changing the rules. It's a way for them to slim down their bloated codebase, become leaner, faster, more deployable. It's a way to hook even more people into their products, people that might have used alternatives might now not even bother, if all the apps are integrated and just one click away. It's a very smart move that will hurt Google and others trying to compete in Microsoft's territory a lot.

October 28, 2008 08:51 PM :: Germany  

Office in the clouds

For some years now Microsoft has failed at modernising their own business strategy with Google eating their lunch when it came to webapps
"Your head was in the clouds, now those clouds are in your head"
dredg - Matroshka

October 28, 2008 08:51 PM :: Germany  

Matt Harrison

[pycon2008] Video of "Managing Complexity" up

I gave a talk at pycon 2008 dealing with testing, code coverage, complexity and how to know when you are "done" testing. Though the talk was given at a Python conference, and the examples are in python, the talk is actually a general discussion of d

October 28, 2008 08:05 PM :: Utah, USA  

Christoph Bauer

Blitzmeldung

Heute gibt’s was gratis: Codeweavers bietet deren CrossOver Office für 24h gratis an, da Bush mal wieder was geschafft hat, wo er wieder mal absolut nichts dafür kann…

Gefunden bei Toei Rei


Copyright © 2007
Please note that this feed is for private use only. All other usage, including the distribution or reproduction of multiple copies, performance or otherwise use in a public way of the images or text require the authorization of the author.
(digitalfingerprint: 0f46ca51d0fa4e6588e24f0bf2b80fed)

October 28, 2008 02:27 PM :: Vorarlberg, Austria  

Sander Knopper

QtMPC 0.4.0 released!

Hi all, just a quick promotion for QtMPC since it's been quite a while since there was something new to tell about it and besides, this blog has some advantages (planet... ahum)... ;)

Anyway, last weekend version 0.4.0 has been released with some rather nice improvements leading to better performance. Just as a reminder, QtMPC is a front-end for MPD.

For further information, have a look here: http://lowblog.nl/2008/10/26/qtmpc-040-released/

October 28, 2008 02:00 PM :: The Netherlands  

Christoph Bauer

Speeding up

“Don’t settle for ‘make boot faster.’ It’s the wrong question. The question is ‘make boot fast’.” - those are the words of two Intel developers rumbling the Linux scene: Arjan van de Ven and Auke Kok. Their idea is a quite uncommon attempt, disregarding the fact that Linus Torvalds dislikes it: They want to boot a whole system in a quite tiny and specified timeframe.

In other words, the time until cpu and disk are idle again waiting for user input without doing background work. But let’s look at the current state: An average Linux box takes about 45 seconds to arrive at the graphical login manager but still does various things in background. But our Intel guys are doing it within 5 seconds, which makes a difference of 40 seconds.

Changes done to the system are starting at the kernel, which should do more things asynchronous, as it wouldn’t have to wait that long for tasks to complete. Another speed gain is dropping the initrd - but that doesn’t bring us the huge boost required. X11 would need to get rid up of compiling the keyboard mappings and video mode probing on startup. Udev is another topic that needs some love. So it’s work in progress, but it’s on the way to mainline.

Regarding the kernel, I could spot the first fastboot patches in the changelog of version 2.6.28. But regarding the rest of the system, it might still take some time.


Copyright © 2007
Please note that this feed is for private use only. All other usage, including the distribution or reproduction of multiple copies, performance or otherwise use in a public way of the images or text require the authorization of the author.
(digitalfingerprint: 0f46ca51d0fa4e6588e24f0bf2b80fed)

October 28, 2008 07:41 AM :: Vorarlberg, Austria  

Brian Carper

Westinghouse: behind the scenes (the horrors of a call center)

Recently someone purporting to be a phone rep from a Westinghouse call center left me a comment. After the months of pain, I appreciate getting some more information from behind the scenes. Given how many times I called Westinghouse, chances are good I maybe even talked to this guy once or twice (so hello again, anonymous Westinghouse guy!).

The situation at Westinghouse is largely as I imagined. Here is the comment, and my response follows.

Heads up for everyone ever trying to deal with a Westinghouse RMA.

I “currently” work for the call center for Westinghouse. It is not our fault the service center will not ship you a tv, or even tell us why. Our database only lists information that has been typed in by other tech support reps, and occasionally things like a logged reciept, tracking number, or RMA number. And yes, it is true that we cannot transfer you to a manager, they do in fact have to call you back. Also, we literally do not have access to any contact information for the corporate office or the RMA center in any way, and even if we did, we are expressly forbidden from given it out. You'd have a much easier time searching for the contact on Google. We also have no way to change any of the Warranty policies, or give you free shipping labels for RMA. Those don't even come from a “manager” at the call center, that all is done through corporate.

Basically, 95% of all of the RMA issues arise from the fact that a)the Westinghouse corporate warranty policy does not allow us any deviation on our level and b)the RMA center is the slowest, shittiest facility I have ever dealt with. Last I heard, there were litterally 5 people working there. Also, the fact is, there are far more returned RMA tvs than there are available to ship back to customers, and that is causing most of the shipping problems. But please don't call us at the customer service and expect us to be able get you a tv faster. We are in NY and ME, and the service center is in TX, we cannot “walk downstairs” like some people would like to think.

If you do want to buy a Westinghouse tv for some reason, please PLEASE purchase it at Best Buy. We have an exclusive deal with Best Buy that if your tv breaks during the warranty period, you can call us to get a return authorization and bring it back to the store directly and get an exchange/store credit, even 11 months 3 weeks and 6 days after you bought the tv. Other than that, DO NOT buy one online, and I'm sorry to say it but, even at Woot, E-Cost, or any other online discount store. ESPECIALLY if it is a refurbished television.

And also, please, everyone, read the warranty policy on ANY expensive item you purchase, especially TVs. You'd be surprised what isn't covered under most electronics companies warranties. Almost every major TV manufacturer requires you to ship a defective tv back to them at your cost.

For all I know I can get fired for posted this online, but to be honest at this point, I could give a shit. Sorry everyone who has had to deal with a Westinghouse RMA, but please remember that if you have to call the tech support line, it really is not our fault, and there is almost nothing we can do.

I worked at a call center too (tech support and general billing/service for a residential satellite TV company); I lasted about four months. I remember very well the horrors of that job. Working at a call center should be classified as a form of torture by the Geneva Convention.

The main criteria of whether we were doing our job "properly" was how fast we finished the calls. Call volume mattered, not making customers happy. The second criteria was how closely we followed the scripts. We were told to never, ever deviate from the scripts, even when the scripts were completely bogus, redundant, or insulting to the customer's intelligence. And the scripts ARE insulting; they are written to appeal to the lowest common denominator of customer, by necessity. If I as a phone rep knew how to fix a problem and it deviated from the script, tough crap. Deviate from the script at your own risk. If someone was monitoring that call, you're in trouble.

At any given time, there was approximately one manager per 15-20 phone reps. If a customer asked to speak to a manager, s/he often got put on hold for a good 10-15 minutes by necessity; this is because I was 30 cubicles away looking for someone to take the call. And yet putting people on hold was a HUGE no-no, per company policy. It was a lose-lose situation.

The company under-staffed the center to save money, so the hold queue was always filled to the brim. By the time the customer got to us, they had been sitting and fuming on hold for 15 minutes or more. We also had an offshore call center in general vicinity of India, and those reps were only trained to take the most basic of calls. If there was a tech support issue or anything complex, it was transferred to us (resulting in another 15 minutes of hold before they talked to me). THOSE weren't fun calls.

We had to take calls non-stop for hours, until we got a specified 15-minute or 30-minute break. Breaks were measured DOWN TO THE SECOND. Aside from your breaks, you couldn't stop taking calls even to go to the bathroom or get a sip of water.

Phone reps are hated by customers, because they are the voice of the company for the customer. They are also abused by the company; the pay is terrible, the people doing it are desperate (few people take that job if they can find any other), and the company knows they're replaceable. Attrition rates at call centers are through the roof. Even people how stay at the call center aspire to become managers themselves as fast as humanly possible, so they can stop taking calls, so at any given time, the person you're talking to when you call a call center has probably only been working for 3 or 4 months tops. Phone reps are seen as little better than cattle by their employers.

So I definitely sympathize. In all of my lengthy dealings with Westinghouse, I was always polite, and the phone reps were generally polite back to me.

One thing that absolutely IS the phone reps' fault, though, is when I'm promised a call back, and then I never get one. This happened to me many times when dealing with Westinghouse, and there's no excuse for that. Or when someone says "Call back tomorrow and we'll have more information for you!" knowing full well that they won't. This also happened to me many times. Once the phone reps determined that they had no information for me, I was often told anything that would get me to hang up quickly.

If one girl at Westinghouse hadn't finally taken 15 minutes to somehow track down my first (lost forever) monitor, I'd never have known what happened. I don't know how they did it, but if a phone rep had done that sooner instead of two months of dodging my questions, I may have been able to get UPS to track down the first package.

If someone is unable to help me, they should say "Sorry, I'm completely unable to help you." A little honesty goes a long way. If I'd have contacted the corporate office sooner I could've gotten things done a lot faster, without all the run-around.

But yes, this comment reaffirms what I already suspected. Don't buy expensive electronics online; the price savings aren't worth the disaster you face when it breaks. And remember you're taking a huge gamble when you buy Westinghouse or any other "bargain" (i.e. cheap) brand.

(Read the entire Westinghouse saga, if you dare: The beginning, Update 1, Update 2, Update 3, Update 4, Update 5, Update 6, Update 7, Update 8, Update 9, VICTORY, aftermath.)

October 28, 2008 02:03 AM :: Pennsylvania, USA  

October 27, 2008

Jürgen Geuter

Web2.0 companies, venture capital, financial crisis and layoffs

Recently we are seeing many layoffs in the web 2.0 companies, even when those companies have just landed deals for venture capital. The reasoning is (to quote from the linked article):

"We expect a deterioration of overall ad rates, and a slowing of the economy in general."


What we see here is that there's still too much capital available to invest in failing "business ideas".

Now don't get me wrong: There's hardly anyone on this planet who enjoys the crashing stock market and the annihilation of banks more than I do. All those "successful" people that thought that their business degrees would not only make Adam Smith proud but also that his teachings of everything being based on "self interest" in combination with an unregulated market would allow everone of them to satisfy their greed. But all the whining about less money being available is just disproved by companies that rely on advertising as main source of income getting funding.

Yes, you can make money through advertising. If you are Google. Maybe one or two others. Not cause you are so smart but just cause you are so big that you also cover the tech-illiterate or at least less literate crowd: When people reach a certain level of tech knowledge they will remove your ads. Cause advertising does not only waste precious screen real estate and bandwidth but because the web is just better without ads. When I tell people about Adblock people wonder how they could ever use the net without it.

So if you are a little startup with some cool web tooodotohhh thingy, all ajaxy, probably built on top of Rails on Macbooks (cause what's a web developer without a Macbook, right?), you will only have a tiny portion of the whole web population: You will not have my mom, you will not have the less technically interested, you have the early adopters which are often (but not always) more tech savvy. Which means your target audience is probably very good ad avoiding ads.

So if your target audience is not that big and is probably blocking advertising anyways, how stupid has a bunch of venture capitalists to be, to give those guys anything except a shove out of the door?

Advertising is not a business plan. Advertising is like rain when you wanna go to the beach, it's the loud neighbour that won't let you find sleep, it's like the guy who scratches your car and leaves without leaving his name. Advertising is nothing people like, it's something people have been trained to live with, to accept, but that training is starting to wear off because it's now technically possible to remove it.

Basing your service on advertising, on banners and textads and layers just means that you still live in the past. You'll have to fight the battle that other companies try to solve with DRM: You have to fight your customer if you rely on advertising.

But still there's millions of cash available for those companies (Yeah I know it's pretty much just trying to generate enough hype so Google or Microsoft basically have to buy you) which can mean only one thing: There is still a lot of money around that people are dieing to invest. That money is of course not with the normal people who just lost their savings cause some bank screwed up. It's also not with the people whose taxes now pay for the screwups. But it's in the hands of those guys that screwed up. Good thing they have so much experience with good investments, right?

We'll continue to see millions over millions of Euros or Dollars invested in companies like Twitter, who either don't have a clue how to make money or hope to get advertising going, so don't let any layoffs scare you. For a few weeks we will see a little decrease in investments and after a while the same shit continues. Well maybe if we are lucky enough to see more banks crash that might stop, but it's still a long way to go.

October 27, 2008 09:25 PM :: Germany  

Linux needs the hate


The Linux Hater's Blog has closed shop and some people will probably be happy about it I guess: That blog, while often written in a very flamebaity way, pointed out some of the areas that need work in Linux and the free software desktop which was good.

While there were some people, especially those with a strong Windows background, that took every post there literal and as another reason why "Linux sucks", big parts of the Linux community were quick to dismiss the posts as complete flamebait not worth anyone's time.

You see, the problem with beliefs is the whole dogma thing: We all have beliefs but when we stop looking critically at them they become dogma and we basically retarded; this is what the Linux Hater's Blog produced: The "Windows rocks" crowd felt their dogma confirmed as did the "Linux rocks" people.

But what the Linux Hater's Blog gave those willing to listen were pointers at problems. Of course some of the posts were complete and utter crap, but others did in fact show areas that were problematic. "How to write a KDE Application", "How to write a GNOME application" and others do in fact point out some valid criticism (buried in some bullshit of course).

Linux needs more hate, more people writing about shortcomings. We can write all day about how Linux is ready for the desktop and how it's all shiny and whatnot without really bringing more people in (they do in fact come in, install Ubuntu, see Ubuntu fail on something that might or might not be that distros fault and then install a pirated XP/Vista), and guess what? Who cares about new people?

It's not that new users are not great but this is not a religion, this is not evangelizing, at least it shouldn't be. Which means that we need to get our platform better by looking at the things that suck, that annoy us, that need to get better and point them out. Work on them, file bugs, create mockups or code, and for that we need "the hate".

Time to get rid of selling Linux, time to start improving it, regardless of who might not use Linux cause he read a blog post outlining a problem: If the person does not want to use Linux because of some problem, hiding it won't help the guy cause he'll just waste hours on installing Linux, be unhappy and later install Windows again. We are all grown up here, we can deal with it. Bring on the hate.

October 27, 2008 03:45 PM :: Germany  

Roderick B. Greening

Intrepid - KDE 4.1 goes mainstream

With the new release of Kubuntu just 3 days away, many will be wondering if now is the time to upgrade from Hardy to Intrepid, and what will it mean for me.

One of the biggest visible changes between Hardy and Intrepid is the move from KDE 3.5 to KDE 4.1. Some have asked whether it will be possible to have KDE 3.5 instead (or along side) of KDE 4.1, and the response is no. This is a conscious and responsible decision to move forward with KDE 4, given that 3.5 is not going to be further developed, and all focus should be given to the promotion and development of the new 4.x series.

We have started a FAQ to answer users questions regarding the switch from KDE 3 to KDE 4. Please read it over if you have any concerns or questions regarding whether to switch from Hardy to Intrepid at this time.

We do encourage users to download and take the new Intrepid for a test drive. We believe that you will be pleasantly surprised at how well KDE 4.1 works, and it will continue to get better as more users and distros begin adopt KDE 4 fully.

October 27, 2008 03:23 PM :: NL, Canada  

Ciaran McCreesh

UIs for Parallelism


Getting the UI right for parallel execution is tricky.

Make, for example, doesn’t even try. It just displays output from all the children all mixed together, and relies upon commands prefixing their output with a filename or similar identifier. This generally works for what make needs to do, but it’s a bit too crude for some things.

For the secret “not supposed to use it” parallelism in Paludis, we’re currently using something slightly more sophisticated: each line of output from each child job is prefixed by the job’s name. So you’ll see things like:

sync unavailable> wget -T 30 -t 1 -O /var/tmp/paludis-tarsync-cvh9gX/exherbo_repositories.tar.bz2 http://git.exherbo.org/exherbo_repositories.tar.bz2
sync unavailable-unofficial> wget -T 30 -t 1 -O /var/tmp/paludis-tarsync-kvEzRZ/exherbo_unofficial_repositories.tar.bz2
sync unavailable-unofficial> --14:24:06--  http://git.exherbo.org/exherbo_unofficial_repositories.tar.bz2
sync unavailable-unofficial>            => `/var/tmp/paludis-tarsync-kvEzRZ/exherbo_unofficial_repositories.tar.bz2'
sync unavailable> --14:24:06--  http://git.exherbo.org/exherbo_repositories.tar.bz2

Something like this is necessary because the commands involved don’t do their own prefixing. But whilst it’s an improvement, the output’s rather cluttered and it’s hard to work out what’s going on. I’ve been experimenting with something more like this (slowdown induced artificially to make the point):

Starting sync

Repository                    Status                Pending Active  Done
-> alsa                       starting              16      1       0
-> ciaranm                    starting              15      2       0
-> ferdy                      starting              14      3       0
-> compnerd                   starting              13      4       0
-> arbor                      starting              12      5       0
-> compnerd                   success               12      4       1
-> gnome                      starting              11      5       1
-> alsa                       failed                11      4       2
    ... fatal: The remote end hung up unexpectedly
-> hardware                   starting              10      5       2
-> ferdy                      success               10      4       3
-> media                      starting              9       5       3
-> gnome                      success               9       4       4
-> mozilla                    starting              8       5       4
-> hardware                   success               8       4       5
-> pioto-exheres              starting              7       5       5
-> media                      success               7       4       6
-> python                     starting              6       5       6
-> pioto-exheres              success               6       4       7
-> rbrown                     starting              5       5       7
-> mozilla                    success               5       4       8
-> texlive                    starting              4       5       8
-> ciaranm                    active                4       5       8
-> python                     success               4       4       9
-> unavailable                starting              3       5       9
-> texlive                    success               3       4       10
-> unavailable-unofficial     starting              2       5       10
-> rbrown                     success               2       4       11
-> unwritten                  starting              1       5       11
-> arbor                      active                1       5       11
-> unwritten                  success               1       4       12
-> x11                        starting              0       5       12
-> ciaranm                    active                0       5       12
    ... Initialized empty Git repository in /var/db/paludis/repositories/ciaranm/.git/
-> unavailable                active                0       5       12
    ... Literal data: 0 bytes
    ... Matched data: 0 bytes
    ... File list size: 749
    ... File list generation time: 0.001 seconds
    ... File list transfer time: 0.000 seconds
    ... Total bytes sent: 771
    ... Total bytes received: 26
    ...
    ... sent 771 bytes  received 26 bytes  1594.00 bytes/sec
    ... total size is 57557  speedup is 72.22
-> unavailable-unofficial     active                0       5       12
    ... Literal data: 0 bytes
    ... Matched data: 0 bytes
    ... File list size: 110
    ... File list generation time: 0.001 seconds
    ... File list transfer time: 0.000 seconds
    ... Total bytes sent: 132
    ... Total bytes received: 26
    ...
    ... sent 132 bytes  received 26 bytes  316.00 bytes/sec
    ... total size is 4013  speedup is 25.40
-> arbor                      active                0       5       12
-> unavailable                success               0       4       13
-> unavailable-unofficial     success               0       3       14
-> x11                        active                0       3       14
-> ciaranm                    active                0       3       14
-> ciaranm                    success               0       2       15
-> x11                        success               0       1       16
-> arbor                      success               0       0       17

 * Cleaning write cache for ebuild format repositories...
 * Done cleaning write cache for ebuild format repositories

 * No unread news items found

Sync results

* alsa:                       sync of '/var/db/paludis/repositories/alsa' from 'git://git.exherbo.org/demonstrate/failure/alsa.git' failed (paludis::SyncFailedError)
    Log file:                 /var/log/sync-alsa.1225118654.log
* arbor:                      success
* ciaranm:                    success
* compnerd:                   success
* ferdy:                      success
* gnome:                      success
* hardware:                   success
* media:                      success
* mozilla:                    success
* pioto-exheres:              success
* python:                     success
* rbrown:                     success
* texlive:                    success
* unavailable:                success
* unavailable-unofficial:     success
* unwritten:                  success
* x11:                        success

In particular:

  • Output is automatically logged to a file, rather than dumping everything to the screen. That file can be automatically removed if the job succeeds.
  • A summary of what’s going on is displayed every time a job starts or finishes.
  • Every ten seconds (for some value of ten), if a job hasn’t finished, we automatically display the last ten (for some other value of ten) lines of its output (but not any output we’ve already displayed) to the screen, along with a note that it’s still active. We also tail the log if a job fails.

This seems to be a comfortable balance between not showing anything except job statuses (which for jobs that can take an hour to run might well leave you wondering whether it’s hung) and just dumping everything to the screen. Now it’s just a case of finding appropriate values of ten…

   Tagged: paludis   

October 27, 2008 02:56 PM

October 26, 2008

Jürgen Geuter

Dumb security tips: Think before you follow online guides

A few days ago Bruce Schneier, the famous security guru, linked a paper on how to write injection-proof SQL. I'm a lot dumber that Mr. Schneier and a lot less experienced so usually I advise people to follow his guidance blindly but this time I have to disagree with him and the bunch of Oracle-developers that wrote the paper.

What's their advice for injection-proof SQL? Write your logic in stored procedures and PL/SQL, the limited language available to Oracle-sufferersusers fro writing triggers. Their logic is that in stored procedures the problem of SQL injection becomes null and void. This is a great example for a piece of advice that does in fact solve the problem, just not in a useful way.

Yes, you can start moving parts of your logic into the database, writing triggers and whatnot, it's something that especially Oracle-trained people will often tell you to do. The problem this brings is simple: You move your code to a place that is hard to maintain, is a pain in the ass to version properly and that requires a lot of knowledge about a bad language to write code in.

Things like that pop up quite often, people giving out security tips that sound quite clever but that are actually worse than the problem they try to solve: "Move your logic into the database" is in the same class of stupidities as "Throw this or that regular expression at your input to clean it" and "You have to keep all your source code closed so people cannot find your weaknesses".

SQL injection is a big problem but making all your code stored procedures makes your whole application a bitch to extend and maintain, locks you out of using many smart libraries to abstract data access and reduces the amount of people that might be able to help you.

When you try to solve a problem always make sure that your solution is not actually worse than the problem itself.

(A good sign for bad advice is if a company that develops a proprietary database management system tells you to port all your code onto their platform. You get more dependent on them and can't drop their software when you come to your senses.)

October 26, 2008 05:37 PM :: Germany  

October 25, 2008

Tonko Mulder

Preload [2]

I have Gentoo running with preload and it does it’s job just fine. At the moment I’m emerging vlc and eclipse-sdk and the system doesn’t seem to slow down. Except for the times my hard drive has trouble keepin up So as far as I’m concerned, preload is a good tool to use    Tagged: emerge, preload    [...]

October 25, 2008 11:20 AM :: Drenthe, Netherlands  

Clete Blackwell

Automatically Fetching Lyrics for iTunes

Andrew, who is a friend of mine, found out that the iPod Touch / iPhone can display lyrics as you are playing songs. I had no clue that this was possible. Andrew spent hours upon hours looking for songs on Google and copying and pasting lyrics into iTunes. He didn’t even manage to get through a quarter of the songs on his library.

So I began to look and ask around on the internet and on the Mac Rumors forums (link to specific thread). I found a few applications, such as Evil Lyrics (Windows), GimmieSomeTune (Mac), and PearLyrics (Google for download; was removed from author’s page due to legal concerns) (Mac). However, none of these met my needs. There was still the issue of manually copying / pasting. With over a thousand songs (and I have a “small” amount, at 1,144 songs), the task of importing lyrics is still incredibly long and tedious.

Then I found iTunes Lyrics. It can automatically (or manually) import lyrics for songs that are selected in iTunes. It is fast and it is generally accurate. It pulls lyrics off of LyricWiki. It’s a simple application written in C# (hence it’s Windows only). The great part about it is that it’s on Google Code and it’s released under GPL Version 2. This means that anyone can go on Google Code, use subversion (a CVS-like repository), and receive all of the code for it. Code can be re-released by anyone, with a few stipulations (rights clearly noted, etc.).

I found a problem with iTunes Lyrics. When it couldn’t find a song, it would set the lyrics in the song to “Not found.” When it was an instrumental song, the lyrics would read “Insturmental only; no voice” or something of that nature. I don’t want anything to pop up on my iPhone when songs are played that don’t have lyrics. So I decided to use Subversion through Microsoft Visual Studio 2008 to grab the C# source for iTunes Lyrics.

I then read the code through and decided that I would add a simple clause to remedy this problem:

if (result.lyrics.Length <= 60)
{
result.lyrics = “”;
}

Basically, for those who have no experience in computers, this line says “If the length of the lyrics that were received from LyricWiki is less than 60 characters long, then it must be either “Not found” or some other message stating that there are no lyrics. So we will set the lyrics to be blank.” Setting the lyrics to be blank will stop the iPod Touch / iPhone from displaying lyrics for songs that do not have lyrics.

I then compiled and packaged it. Here is the link to the files. Just run “iTuneslyrics.exe.” I give full credit in the README.txt file to the author. I provide no warranty. If anyone tries it, please post a comment here telling me if it works or not. It might need the installer so that it can install the plugin into iTunes.

All I did after I modified the program was press Ctrl+A in my iTunes library to select all of my songs, then I checked the two boxes in iTunes Lyrics and I clicked the button. Now I have lyrics for all of my songs in a matter of minutes.

October 25, 2008 04:07 AM

Brian Carper

Ignorance is bliss

I remember the good old days of web-browsing, when I'd just zoom around the internet without a care in the world. The first time I got a small whiff of something foul was in college one day, when a professor yelled at the class because someone was using telnet to connect to remote machines. "Are you crazy? It sends everything in plaintext! Use SSH!"

Then eventually I put together a website where I had access to the server logs, and oh boy, it was not fun reading those the first time. Line after line of bots in Ukraine, trying to access vulnerable scripts that may or may not exist on my server. Then I checked some of my SSH logs, and saw the same thing. Thus my innocence was destroyed forever.

Nowadays all of my email traffic is SSL-encrypted, and FTP is disabled on every server I have root access to, in favor of SFTP. I cringe every time I set up a wireless network (even WPA is being cracked nowadays). My passwords are long, nearly impossible to remember, and legion. My browser cache is cleared daily. I reject all cookies by default, and Javascript is run on an as-needed basis.

One day I read on Slashdot about Flash cookies. So I had a really bright idea:

ln -s /dev/null ~/.macromedia

That'll teach them! No more flash cookies. (Note, don't do this if you like watching Flash movies in your browser. They stop working on certain websites. Annoying. Next best thing is a plugin to let you delete them.)

The bad thing is that I still don't know very much about network security and privacy. If I knew more, I'm sure I'd worry more. On the other hand, if I was a locksmith, I might feel bad with the quality of the lock on my front door. And yet my house has never been robbed (yet) and my computer has never been hacked (yet). People tend to worry about what's right in front of them. Maybe what you don't know can't hurt you.

But I still cringe when someone sits down in an airport or a Starbucks and logs into their bank account or work email.

October 25, 2008 03:54 AM :: Pennsylvania, USA  

Nikos Roussos

django startproject

i wanted to learn a good (aka mvc) framework in order to build my web applications, so i decided to take a look at django.

this post is not about my first impressions. it's just a quick deployment guide. i found the corresponding djangobook chapter a little confusing, especially if lighttpd+fastcgi is what you want.

you can install django from your distro's package manager. here are the steps on gentoo.

first unmask it, then install it:

echo "dev-python/django" >> /etc/portage/package.keywords
emerge -v django

flup is also required for fcgi:

echo "dev-python/flup" >> /etc/portage/package.keywords
emerge -v flup

django has bash-completion capabilities. so i suggest you enable them:

eselect bashcomp enable django

we create a directory for our projects (not web accessible) and starting our first project:

mkdir /home/user/django
cd /home/user/django
django-admin.py startproject blog

this will create our project directory and the initial files:

blog/
    __init__.py
    manage.py
    settings.py
    urls.py

now let's set the public directory of our project:

mkdir /home/user/public_html/blog
cd /home/user/public_html/blog

and create the fcgi script (blog.fcgi):

#!/usr/bin/env python
import sys, os

# Add a custom Python path.
sys.path.insert(0, "/home/user/django")

# Set the DJANGO_SETTINGS_MODULE environment variable
os.environ['DJANGO_SETTINGS_MODULE'] = "blog.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(["method=threaded", "daemonize=false"])

and now it's time for lighttpd configuration:

$HTTP["host"] =~ "(^|\.)example.com$" {
    server.document-root = "/home/user/public_html/blog"
    fastcgi.server = (
        ".fcgi" => (
            "localhost" => (
                "bin-path" => "/home/user/public_html/blog/blog.fcgi",
                "socket" => "/tmp/blog.sock",
                "check-local" => "disable",
                "min-procs" => 2,
                "max-procs" => 4,
            )
        ),
    )
    alias.url = (
        "/media/" => "/home/user/public_html/blog/media/",
    )

    url.rewrite-once = (
        "^(/media.*)$" => "$1",
        "^/favicon\.ico$" => "/media/favicon.ico",
        "^(/.*)$" => "/blog.fcgi$1",
    )

}

in order to test it, let's make a simple view and template. first we create views.py inside /home/user/django/blog/:

from django.shortcuts import render_to_response

def base(request):
    return render_to_response('base.html', {'name': world})

and then base.html inside /home/user/django/blog/templates/:

<html><body>hello {{ name }}!</body></html>

finally we edit out urls.py:

from django.conf.urls.defaults import *
from blog.views import base

urlpatterns = patterns('',
    (r'^$', base),
)

and don't forget to restart lighttpd :)

October 25, 2008 02:12 AM :: Athens, Greece

October 24, 2008

TopperH

A better way to use mutt + gMail's IMAP

Imap is cool and gMail's imap is really cool. It allows users to have their mail clients syncronyzed and always up to date. The only issue with imap is speed.
On slow connections messages take some time to load, and attachments too. Evolution and kmail can use "offline imap" fetching locally all the messages and giving you a fast response.

Unfortunatly I don't feel confortable with neither of those clients, the only one I find really usable (I'm a mailing lists addicted) is mutt.

Mutt has imap support and can cache the headers of the messages, and the alredy read messages in local files, but that's not enough. Fetching messages still slow.

The idea is to reproduce the behavior of kmail or evoultion "offline imap" in mutt.
Offlineimap can do what I'm looking for:

# emerge -av offlineimap
Now we need to configure offlineimap for gmail, the file to edit is ~/.offlineimaprc:

[general]
accounts = ANameOfChoice

# Gives you a nice blinky output on the console so you know what's happening.
# ui = Curses.Blinkenlights

# If uncommented, this would show nothing at all. Great for cronjobs or background-processes
ui = Noninteractive.Quiet

[Account ANameOfChoice]
localrepository = mylocal
# Profile-Name for the remote Mails for a given Account
remoterepository = Gmail

[Repository mylocal]
# Way of storing Mails locally. Only Maildir is currently supported
type = Maildir

# Place where the synced Mails should be
localfolders = ~/Mail


# fetches your mails every 5 Minutes
autorefresh = 5


[Repository Gmail]

type = Gmail

# Specify the Gmail user name. This is the only mandatory parameter.

remoteuser = myusername@gmail.com
remotepass = mypassword

# Deleting a message from a Gmail folder via the IMAP interface will
# just remove that folder's label from the message: the message will
# continue to exist in the '[Gmail]/All Mail' folder. If `realdelete`
# is set to `True`, then deleted messages will really be deleted
# during `offlineimap` sync, by moving them to the '[Gmail]/Trash'
# folder. BEWARE: this will deleted a messages from *all folders* it
# belongs to!
#
# See http://mail.google.com/support/bin/answer.py?answer=77657&topic=12815
# See http://mail.google.com/support/bin/answer.py?answer=77657&topic=12815

realdelete = no

# The trash folder name may be different from [Gmail]/Trash
# for example on german googlemail, this setting should be
#
# trashfolder = [Google Mail]/Papierkorb
#
# The same is valid for the spam folder
#
# spamfolder = [Google Mail]/Spam
We don't want other users to know our password, so:
$ chmod 600 ~/.offlineimaprc
$ mkdir ~/Mail
For mail sending I use msmtp:
#emerge -av msmtmp

You can still use ssmtp (gentoo's default) or postfix or whatever, but you can't have two sendmail programs installed at the same time.

My ~/.msmtprc looks like this:

account default
host smtp.gmail.com
port 587
protocol smtp
auth on
from username@gmail.com
user username@gmail.com
password mypassword
tls on
tls_starttls on

Again I don't like people to read my password:
$ chmod 600 ~/.msmtprc

The first time offlineimap is launched can take a lot of time, specially if you keep ALL your mail since 1999 stored in your gmail account, so we will start it manually
$ offlineimap

Once done we can create a cron job to sync our folder every 10 minutes:
$ crontab -e

*/10 * * * * /usr/bin/offlineimap
You will need a cron daemon that supports users crontabs, such as vixie-cron.

And here is part of my ~/.mutt/muttrc
## ~/.mutt/muttrc
set mbox_type=Maildir
set folder=$HOME/Mail
set spoolfile=+inbox
set header_cache=~/.hcache
set sendmail="/usr/bin/msmtp"
set edit_headers=yes
set record=+SENT
set postponed=+DRAFTS
mailboxes +INBOX
set pager_context=1
set pager_index_lines=6 #show a mini-index in pager
set menu_scroll
set pgp_verify_sig=yes #dont show pgp in pager
set status_on_top #put status line at top
set sort=threads #sort by message threads in index
set from=username@gmail.com
set realname="My Name"
set reverse_name=yes
set reverse_realname=no
set certificate_file=~/.mutt/certificates
set move=no
set delete=yes
set include
set reply_to
set abort_nosubject=no
set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
hdr_order From: Date: User-Agent: X-Mailer To: Cc: Reply-To: Subject:
ignore *
unignore From: Date: User-Agent: X-Mailer To: Cc: Reply-To: Subject:
my_hdr Reply-To:

set editor="vim"
set alias_file=~/.mutt/mail_aliases
#source ~/.mutt/mail_aliases
source ~/.mutt/gpg.rc

###
send-hook . 'set signature=~/.signature'

That should make the trick :)


October 24, 2008 05:28 PM :: Italy  

Rodrigo Lazo

Documenting a Django project with Sphinx

Sphinx is a documentation tool written for python (but could be used on other circumstances). I've learning how to used and I wanted to document a django project I've been working on, but when you try to import your modules you get an exception

 autodoc can't import/find module '<yourmodule>', it reported error:
 "Settings cannot be imported, because environment variable
 DJANGO_SETTINGS_MODULE is undefined.",please check your spelling
 and sys.path

This happens because django do some enviroment settings before using your app, so I wanted to do the same with. It was easier than I tought, just put the following snippet in your sphinx conf.py

from MYPROJECT import settings
from django.core.management import setup_environ

setup_environ(settings)

of course, for it to work you need to modify your path, in my case was:

sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../../'))

October 24, 2008 04:15 PM :: Arequipa, Perà  

Ciaran McCreesh

Paludis is about Choices


Paludis 0.32 will include a new mechanism called ‘choices’. Examples of choices on Gentoo include use flags, the various USE_EXPAND settings (linguas, video_cards and so on) and a shiny new setting called build_options. For use flags and the USE_EXPAND settings, there’s no change from a user perspective, and you can carry on using use.conf as normal — choices are merely a more general mechanism for handling package settings.

On Exherbo, things do change a bit, and if you’re one of those naughty people who ignored the “Exherbo has no users” warning you’d better have been paying attention.

So what’s this build_options thing? You’ll see it cropping up for most packages:

* net-print/cups::gentoo [U 1.3.8-r1 -> 1.3.8-r2] <target>
    Reasons: app-text/ghostscript-gpl-8.62:0::installed, net-print/foomatic-filters-3.0.20080507:0::installed, 2 more
    X acl -avahi -dbus -gnutls -java jpeg -kerberos -ldap pam perl -php png ppds python -samba
    -slp ssl -static -tiff -xinetd -zeroconf LINGUAS: -de en -es -et -fr -he -id -it -ja -pl -sv
    -zh_TW build_options: -optional_tests split strip

Packages using 0-based EAPIs will usually have three build options:

  • optional_tests. This handles what --checks used to do. If this choice is set, src_test will be run.
  • split. This used to be --debug-build split.
  • strip. This used to be --debug-build internal.

Packages using kdebuild-1 or exheres-0 will have recommended_tests instead of optional_tests, which defaults to being enabled rather than disabled.

Despite what you might expect from older Paludis versions, these are not use flags. You can set them in use.conf, though — this means you can select whether to run tests or whether to keep debug information on a per-package basis, which was tricky to do with the old commandline options.

   Tagged: choices, exherbo, gentoo, paludis