A blog about random things and sometimes about my work translating and developing KDE and anything
Sunday, August 24, 2008
KHTML rocks
'nuff said. Keep it rocking guys!
Sunday, August 17, 2008
Maemo scratchbox on amd64
So it seems the maemo scratchbox refuses to install on amd64, has anyone succeded in doinng so? Can i fool the script, or do i need to run a virtual machine with linux i386 inside and then run the scratchbox inside that?
Sunday, August 03, 2008
KDE 4.1 adoption seems high
KDE 4.1.0 was released this very same week and already 17% of Konqueror users of the last month to my blog are using Konqueror 4.1, seems quite high to me
Catalan Summer of Code
So Catalan government decided to run a project similar to Google's Summer of code program. That's cool, the bad news is that the law that grants the money was approved as of May 30th and i just discovered the site because i was doing some random browsing.
So if you can read catalan go to http://www.lafarga.cat/beques/bases-de-la-convocatoria and start thinking what to do for Free Software.
Actually it seems like it's non-published on purpose so either:
a) It fails and politics can say "See Catalonia has no interest for Free Software" and they can go on paying Microsoft for doing sucky and patchy translations of their products to Catalan (yes they pay twice, license and translation)
b) Someone's son needs to make sure he is the chosen one, so the less publicity the better.
So if you can read catalan go to http://www.lafarga.cat/beques/bases-de-la-convocatoria and start thinking what to do for Free Software.
Actually it seems like it's non-published on purpose so either:
a) It fails and politics can say "See Catalonia has no interest for Free Software" and they can go on paying Microsoft for doing sucky and patchy translations of their products to Catalan (yes they pay twice, license and translation)
b) Someone's son needs to make sure he is the chosen one, so the less publicity the better.
Saturday, August 02, 2008
Bug your distro to package OpenJPEG
The new poppler major version that will come out in a month or so, sports a new JPEG2000 decoder based in OpenJPEG that is better than the current one, for example, it renders Google scanned docs, that is good. Yay! The problem is that actually not much distros package OpenJPEG (i could only find Debian), so go to your distro bug tracker and bug them to include OpenJPEG.
And BTW:
And BTW:
Monday, July 28, 2008
Poppler 0.8.5 released
Available from
http://poppler.freedesktop.org/poppler-0.8.5.tar.gz
Changes since 0.8.4:
Core:
* Fix crash on PDF that define a page thumbnail but it's not a Stream
* Fix crash when Annots object is not of the desired type
* Fix crash when obtaining fonts in PDF where XObjects link themselves in loops
* Fix crash on documents with an IRT object
* Saving should work much better now
* Plug some memory leaks in Annotation handling
Utils:
* pdftohtml: Don't crash on documents that specify an invalid named dest for a link
* pdftohtml: Make html output to keep all the spaces with
* pdftohtml: Improve a bit text layout
* pdftohtml: Make xml output valid xml
Testing, patches and bug reports welcome.
As a side note, one of the four crashes was a CVE while the other three where not, of course the four are as critic as the other.
http://poppler.freedesktop.org/poppler-0.8.5.tar.gz
Changes since 0.8.4:
Core:
* Fix crash on PDF that define a page thumbnail but it's not a Stream
* Fix crash when Annots object is not of the desired type
* Fix crash when obtaining fonts in PDF where XObjects link themselves in loops
* Fix crash on documents with an IRT object
* Saving should work much better now
* Plug some memory leaks in Annotation handling
Utils:
* pdftohtml: Don't crash on documents that specify an invalid named dest for a link
* pdftohtml: Make html output to keep all the spaces with
* pdftohtml: Improve a bit text layout
* pdftohtml: Make xml output valid xml
Testing, patches and bug reports welcome.
As a side note, one of the four crashes was a CVE while the other three where not, of course the four are as critic as the other.
Saturday, July 19, 2008
kpovmodeler looking for help
Andreas Zehender wrote
So if you are interested mail him!
I'm looking for a skilled KDE developer with some knowledge in povray and 3D stuff, who will follow future KDE technology changes and keep kpovmodeler compilable and stable.!
So if you are interested mail him!
Thursday, July 03, 2008
Away from the internet
I'll be without internet connection until the 19th/20th of July so if you mail me, no i'm not ignoring you, i'm just cycling around sardinia :-)
If you need a quick answer for anything i might now, just write the appropiate mailing list for that question, i'm not that special i'm the only one that can asnwer your questions.
If you need a quick answer for anything i might now, just write the appropiate mailing list for that question, i'm not that special i'm the only one that can asnwer your questions.
Sunday, June 29, 2008
On football, national feelings et al
Be warned, this is not a KDE nor Free Software post, if you don't want to read it, don't do it.
Be warned 2, this post is going to be controversial, please don't write saying "You idiot" or similar/worst things, i'm trying to be as respectful as i can when dumping my brain into this post.
So it seems Spain just won Eurocup 2008, lots of people in the streets making noise and using firecrackers/fireworks leftovers from Sant Joan that was just a few days ago.
The ones that know me well know that i don't have a big Spanish feeling, i feel more Catalan and European, but to tell the truth i have mixed feelings about this Spain win.
On the good side, the spanish team is formed by young talented players, that don't act like if they were gods and that do a rather good football. And most of that players feel sympatic and someone you might empathize with, so they winning feels good.
On the other side, looking at the flags spanish followers waved at the stadium you can find three types at very similar rates of use:
* Normal Spanish flag: Nothing to say
* Spanish flag with a bull: Mixed feelings again, the bull is a animal that i probably would say i like if you ask me, but that bull flag is most of the times used either to support bullfighting or to support a rancid view about Spain. And i disagree with both
* Franquist flag: Yes, you might wonder why around one third of people supporting Spain soccer team wave a flag that means you don't like democracy nor any kind of personal rights. I do wonder too.
And then you have people like someone in my neighborhood that play cara al sol, a semi-official franquist song, each time Spain wins.
And that makes me wish Germany did win.
Sadly, i have to agree with what a coworker says: "EspaƱa es un pais de pandereta" (not sure if makes sense translated but that'd be "Spain is a country of tambourine")
Be warned 2, this post is going to be controversial, please don't write saying "You idiot" or similar/worst things, i'm trying to be as respectful as i can when dumping my brain into this post.
So it seems Spain just won Eurocup 2008, lots of people in the streets making noise and using firecrackers/fireworks leftovers from Sant Joan that was just a few days ago.
The ones that know me well know that i don't have a big Spanish feeling, i feel more Catalan and European, but to tell the truth i have mixed feelings about this Spain win.
On the good side, the spanish team is formed by young talented players, that don't act like if they were gods and that do a rather good football. And most of that players feel sympatic and someone you might empathize with, so they winning feels good.
On the other side, looking at the flags spanish followers waved at the stadium you can find three types at very similar rates of use:
* Normal Spanish flag: Nothing to say
* Spanish flag with a bull: Mixed feelings again, the bull is a animal that i probably would say i like if you ask me, but that bull flag is most of the times used either to support bullfighting or to support a rancid view about Spain. And i disagree with both
* Franquist flag: Yes, you might wonder why around one third of people supporting Spain soccer team wave a flag that means you don't like democracy nor any kind of personal rights. I do wonder too.
And then you have people like someone in my neighborhood that play cara al sol, a semi-official franquist song, each time Spain wins.
And that makes me wish Germany did win.
Sadly, i have to agree with what a coworker says: "EspaƱa es un pais de pandereta" (not sure if makes sense translated but that'd be "Spain is a country of tambourine")
Monday, June 23, 2008
Installed OpenSuse 11.0
Just installed OpenSuse 11.0 in the laptop. They've done an good job in overall putting KDE 4 in a distro but i had two important problems, so i'm going to blog about them so that if someone has the same problem can find it.
First, the installer misdetected my monitor resolution, then i told him the good one, but that ended up in a messed xorg.conf that applied zoom onto the desktop, i had the remove the Option "PreferredMode" line from the file.
Second, knetworkmanager won't connect to my wifi network, i had to update (using a wired connection) and then it worked like a charm.
First, the installer misdetected my monitor resolution, then i told him the good one, but that ended up in a messed xorg.conf that applied zoom onto the desktop, i had the remove the Option "PreferredMode" line from the file.
Second, knetworkmanager won't connect to my wifi network, i had to update (using a wired connection) and then it worked like a charm.
Friday, June 13, 2008
KDE, plugins, GPL and closed source applications
Here i was today, thinking about this stuff (yeah you can say i'm weird).
In KDE all of our core libs are LGPL so if someone owns a Qt commercial license he can write closed source applications using kdelibs.
In KDE we also have this nice technology called KParts that let's you load plugins for lots of things on runtime. One of the KParts possibilities is to load a KPart for a specific mimetype.
Let's say the above closed source application uses KParts to preview things, and the user of that closed source application decides to preview a PDF.
In that moment, the KPart system will lookup and load the OkularPart that is able of viewing PDFs.
And there is where my mind broke, OkularPart is GPL and is being used by a closed source application.
"NO! VIOLATION!" Does my mind shout, but how can the closed source developer prevent it? All he did is use a LGPL library, so, maybe this is not a violation? And if it is, what are we doing in the KDE project to help the closed source developer be a good citizen? Maybe we should tell the kpart system what kind of Parts are acceptable?
Can someone highlight me?
In KDE all of our core libs are LGPL so if someone owns a Qt commercial license he can write closed source applications using kdelibs.
In KDE we also have this nice technology called KParts that let's you load plugins for lots of things on runtime. One of the KParts possibilities is to load a KPart for a specific mimetype.
Let's say the above closed source application uses KParts to preview things, and the user of that closed source application decides to preview a PDF.
In that moment, the KPart system will lookup and load the OkularPart that is able of viewing PDFs.
And there is where my mind broke, OkularPart is GPL and is being used by a closed source application.
"NO! VIOLATION!" Does my mind shout, but how can the closed source developer prevent it? All he did is use a LGPL library, so, maybe this is not a violation? And if it is, what are we doing in the KDE project to help the closed source developer be a good citizen? Maybe we should tell the kpart system what kind of Parts are acceptable?
Can someone highlight me?
Etiquetes de comentaris:
closed source,
gpl,
kparts
Sunday, June 08, 2008
Dead monitor (again)
On wednesday, my Benq FP937s+ died again, it does not want to power on, the same thing that happened 15 months ago. Not good to have the most expensive Benq monitor at the time it was bought to die twice in less than 3 years :-(
Luckily i've still 3 months of guarantee so i'll be getting a new^Wrepaired one for free.
Luckily i've still 3 months of guarantee so i'll be getting a new^Wrepaired one for free.
Saturday, June 07, 2008
Looking for PDF with JPX streams
I'm currently working on a patch for poppler that makes use of OpenJPEG to decode JPX streams instead of the xpdf inherited code because the inherited code does not work for some PDF and i think that there's no reason not to use an already existing solution if it works. And that's the question, i need more PDF with JPX streams to be sure my 170 lines of code + OpenJPEG can replace the 3200 of xpdf code without any regression.
So if you could
or as said in the comments
and send me (aacid@kde.org) a link to the pdf or the file pdf itself of all the files that match.
So if you could
cd /
find -name "*pdf" -exec grep -H JPXDecode {} \;
or as said in the comments
locate -0 .pdf | xargs -0 -n 1 grep -H JPXDecode
and send me (aacid@kde.org) a link to the pdf or the file pdf itself of all the files that match.
Tuesday, June 03, 2008
Poppler 0.8.3 released
Available from
http://poppler.freedesktop.org/poppler-0.8.3.tar.gz
Changes since 0.8.2:
Core:
* Fix crash when reading some PDF with annotations
* Fix crash on PDF that reference Optional Content elements that don't exist
* Fix leaks on error conditions
* Do not limit CharCodeToUnicodeString to 8 characters
* Support for surrogates outside the BMP plane
Qt 3 frontend:
* Fix crash when reading PDF with password
* Fix leak when calling scanForFonts()
Qt 4 frontend:
* Fix the text() method
Splash renderer:
* Fix compilation with --enable-fixedpoint
Version 0.8.4 is scheduled for July 3rd
Testing, patches and bug reports welcome.
http://poppler.freedesktop.org/poppler-0.8.3.tar.gz
Changes since 0.8.2:
Core:
* Fix crash when reading some PDF with annotations
* Fix crash on PDF that reference Optional Content elements that don't exist
* Fix leaks on error conditions
* Do not limit CharCodeToUnicodeString to 8 characters
* Support for surrogates outside the BMP plane
Qt 3 frontend:
* Fix crash when reading PDF with password
* Fix leak when calling scanForFonts()
Qt 4 frontend:
* Fix the text() method
Splash renderer:
* Fix compilation with --enable-fixedpoint
Version 0.8.4 is scheduled for July 3rd
Testing, patches and bug reports welcome.
Tuesday, May 20, 2008
GDB hidden gem
Well at least it was hidden to me :D
Sometimes it's difficult to keep in view the surrounding lines of code when you are using GDB. list command helps but it's not that user friendly. So the other day a coworker told me about GDB TUI. You can enable it with Ctrl+X A and voilĆ you get the full listing of the code in a nice browseable view on the top :-)
And a screenie for your viewing pleasure:
Sometimes it's difficult to keep in view the surrounding lines of code when you are using GDB. list command helps but it's not that user friendly. So the other day a coworker told me about GDB TUI. You can enable it with Ctrl+X A and voilĆ you get the full listing of the code in a nice browseable view on the top :-)
And a screenie for your viewing pleasure:
Monday, May 12, 2008
KDE and strigi analyzers
If you are compiling kde strigi analyzers and installing them into a different path where strigi is installed on, you should be aware that strigi won't find your kde analyzers unless you instruct it to.
Let's say your strigi is in /usr, so it is looking for plugins in /usr/lib/strigi and your kde is in /home/kdesvn/installed/ so the KDE strigi analyzers are on /home/kdesvn/installed/lib/strigi.
You should define the environment variable STRIGI_PLUGIN_PATH to /home/kdesvn/installed/lib/strigi:/usr/lib/strigi
That in case you use strigi 0.5.9 that supports more than one path to be defined in STRIGI_PLUGIN_PATH, in case you are using 0.5.7 like Ubuntu users, you are out of luck as STRIGI_PLUGIN_PATH can only be one path, so you might want to define STRIGI_PLUGIN_PATH to /home/kdesvn/installed/lib/strigi and then go there and create symbolic links from all the ones in /usr/lib/strigi.
Anyway if you are using Ubuntu strigi your analyzers won't work because what seems to be a packaging bug.
Let's say your strigi is in /usr, so it is looking for plugins in /usr/lib/strigi and your kde is in /home/kdesvn/installed/ so the KDE strigi analyzers are on /home/kdesvn/installed/lib/strigi.
You should define the environment variable STRIGI_PLUGIN_PATH to /home/kdesvn/installed/lib/strigi:/usr/lib/strigi
That in case you use strigi 0.5.9 that supports more than one path to be defined in STRIGI_PLUGIN_PATH, in case you are using 0.5.7 like Ubuntu users, you are out of luck as STRIGI_PLUGIN_PATH can only be one path, so you might want to define STRIGI_PLUGIN_PATH to /home/kdesvn/installed/lib/strigi and then go there and create symbolic links from all the ones in /usr/lib/strigi.
Anyway if you are using Ubuntu strigi your analyzers won't work because what seems to be a packaging bug.
Tuesday, May 06, 2008
KUbuntu KDE 3.5.9 kded lock fixed
So this is the great thing of Free Software, people care about their programs/distributions/wathever and we got a relatively quick fix for the ugly problem about kde locking on Kubuntu. Cheers to Jonathan for fixing it.
Saturday, April 26, 2008
Poppler 0.8.1 released
Available from
http://poppler.freedesktop.org/poppler-0.8.1.tar.gz
Changes since 0.8.0:
core:
* Do not call FT_Done_Face on a live cairo_font_face_t as it might cause crashes
* Do not take into account Colorspace resource subdictionary for image XObjects
* Downsample 16 bit per component images to 8 bit per component so they render
build system:
* Link to pthread when the system needs it
windows:
* Fix comparing against NULL instead against INVALID_HANDLE_VALUE when calling FindFirstFile
0.8.2 version is scheduled for May 26th
Testing, patches and bug reports welcome.
http://poppler.freedesktop.org/poppler-0.8.1.tar.gz
Changes since 0.8.0:
core:
* Do not call FT_Done_Face on a live cairo_font_face_t as it might cause crashes
* Do not take into account Colorspace resource subdictionary for image XObjects
* Downsample 16 bit per component images to 8 bit per component so they render
build system:
* Link to pthread when the system needs it
windows:
* Fix comparing against NULL instead against INVALID_HANDLE_VALUE when calling FindFirstFile
0.8.2 version is scheduled for May 26th
Testing, patches and bug reports welcome.
Thursday, April 24, 2008
Q_FOREACH is your friend
It's real, foreach makes writing loops much more convenient, but you have to know how to use it, see the following code:
There are two problems in the usage of foreach in this code.
The first problem is serious, it is trying to use foreach to modify the values of vector. The code compiles, but if you run it, you'll notice nothing was changed, why oh why?! may you ask. Because Foo f is a local variable to the foreach, so what you are doing is modifying a variable that exists in this very same line and nothing more.
The second problem is that you are constructing far much more Foo objects than needed, if you look at the output the copy constructor is called each time in the foreach, so the correct way for the debug line would be
So remember, always that your foreach iterator is not a basic value like an int, double or pointer, use const &, it will be faster and will protect you against the try to use foreach to modify values problem, because
will not compile.
#include <QList>
#include <QtDebug>
class Foo
{
public:
Foo()
{
qDebug("Empty constructor");
}
Foo(int aa, int bb, int cc) : a(aa), b(bb), c(cc)
{
qDebug("Constructor");
}
Foo(const Foo &f)
{
a = f.a;
b = f.b;
c = f.c;
qDebug("Copy constructor");
}
int a, b, c;
};
int main(int /*argc*/, char ** /*argv*/)
{
QList<Foo> list;
list << Foo(1, 2, 3);
list << Foo(4, 5, 6);
list << Foo(7, 8, 9);
list << Foo(10, 11, 12);
list << Foo(13, 14, 15);
foreach(Foo f, list)
f.a = f.b = f.c = 0;
foreach(Foo f, list)
qDebug() << f.a << f.b << f.c;
}
There are two problems in the usage of foreach in this code.
The first problem is serious, it is trying to use foreach to modify the values of vector. The code compiles, but if you run it, you'll notice nothing was changed, why oh why?! may you ask. Because Foo f is a local variable to the foreach, so what you are doing is modifying a variable that exists in this very same line and nothing more.
The second problem is that you are constructing far much more Foo objects than needed, if you look at the output the copy constructor is called each time in the foreach, so the correct way for the debug line would be
foreach(const Foo &f, list)
qDebug() << f.a << f.b << f.c;
}
So remember, always that your foreach iterator is not a basic value like an int, double or pointer, use const &, it will be faster and will protect you against the try to use foreach to modify values problem, because
foreach(const Foo &f, list)
f.a = f.b = f.c = 0;
will not compile.
KUbuntu 8.04 released with rock solid 3.5.9 goodness...
...unless you try to automount USB devices, because that'll give you a deadlocked kded! HORRAY! It's quite interesting to see how a bug caused for a patch to use LUKS is not fixed or the patch reverted when such an used feature has such a big bug like deadlocking kded...
Subscribe to:
Posts (Atom)