Tuesday, January 30, 2007

be careful when you are on #paludis

In my opinion, a good community should treat new comers well.
But some people think otherwise.

(zhllg) i think many people like the idea installation could resume automatically when failure occur, is it possible with paludis?
(mlangc) zhllg: http://www.paludis.org/faq.html#skipfirst
 mlangc maskd masterdriverz maxauthority midnite__ mzli
 mlangc maskd masterdriverz maxauthority midnite__ mzli
(zhllg) mlangc, i've seen that actually, just wonder why, is it difficult to implement technically?
(mlangc) i don't think so; as far as i know it is not implemented by __design__ - but you should better ask someone that actually works on paludis; i'm a simple user myself
(rbrown`) zhllg: er no. Too unreliable, too flaky and far too widely abused;
(zlin) zhllg: wouldn't it be much better to fix the packages that cause it to fail in the first place...
(zhllg) zlin, yeah, from a developer's perspective
* dleverton is now known as dleverton|class
(zhllg) but i remember there is a saying, "provide the mechanism, not the policy"
(edeca) To be fair, I often used skipfirst to ignore ebuilds with fetch restriction that I knew I didn't need
* chutzpah (n= chutz@gentoo/developer/chutzpah) has joined #paludis
(mlangc) zhllg: i guess this also makes some sense from a users perspective - you can do "--skip-first" by manipulating the resume command - but you have to be explicit and thus think about it; often it is better to just try another version of the package that fails inmo
 mlangc maskd masterdriverz maxauthority midnite__ mzli
(zhllg) mlangc, actually i use this script to update the system: "sudo emerge -tauvDN world || until sudo emerge --resume --skipfirst; do sudo emerge --resume --skipfirst; done
* jacekowski has quit (Read error: 104 (Connection reset by peer))
(rbrown`) then you're an idiot
(mlangc) i guess that it what the paludis devs are meaning by 'far too widely abused' ;-)
* jacekowski (n= jacekows@aaot198.neoplus.adsl.tpnet.pl) has joined #paludis
(zhllg) rbrown`, watch your tongue, please
(zlin) or just clueless..
 mlangc maskd masterdriverz maxauthority midnite__ mzli
 mlangc maskd masterdriverz maxauthority midnite__ mzli
(zhllg) rbrown`, zlin, mlangc how do you update your system?
(zhllg) may i ask?
(rbrown`) zhllg: or what? there's no policy against calling an idiot an idiot in this channel
(rbrown`) zhllg: paludis -i world
(spb) there's no real policy against calling anyone anything, really
(rbrown`) spb: I wanted to be clear that I was only calling him names that were appropriate
(zlin) zhllg: we tend to try to fix problems when we hit them rather than ignoring them without even noticing..
(zhllg) zlin, not everyone has the ability to fix problems, let's face this
(mlangc) zhllg: at least you should be aware of them so that another person might fix them for you
 mlangc maskd masterdriverz maxauthority midnite__ mzli
(mlangc) if your "update" script leaves your system unusable you would not even have a clue what went wrong ....
(zlin) zhllg: and actually the things you can do with emerge --skipfirst are far more limited than what you can do with the resume command from paludis.
(zhllg) mlangc, i can find which packages are broken
* beandog (n=sdibb@gentoo/developer/beandog) has joined #paludis
(zhllg) just run emerge -tavuDN world again immediately after running that script
(zlin) uhh..
(ciaranm) idiot is too mild a term for this one
(zhllg) idiot is not an appropriate term to call users
(rbrown`) but was that evident when I used it?
(zhllg) or potential users
(ciaranm) 'fucking retard'?
(zhllg) maybe for you ciaranm
(mlangc) well, i think there's no need to be unfriendly; if he breaks his system that is entirely his problem ...
(zhllg) mlangc, maybe, but my system runs well for nearly 3 years

Thursday, January 25, 2007

Interest and Open source

One of the great things about open source software is, of course, the fact that anyone can participate, so the pool of resources is limited not by an annual hiring budget, but by interest in the project. That means you can have any number of developers, but it also means that one person may be involved in several areas if he or she finds them interesting.


Tuesday, January 16, 2007



xmllint -valid -noout filename.xml



TW, you do not need to use the stand-alone web server, but if you want to, it
seems something changed in webrick (ruby's www server) and the default bound
address ( does not work anymore. Edit www.rb and add the :BindAddress

s = WEBrick::HTTPServer.new( :BindAddress => "",
:AccessLog=>access_log, :Logger => $Log, :Port => $Config["port"], :CGIPathEnv


错误的提示是sections tag不全,但这个文件里又没有sections这个tag

Tuesday, January 09, 2007


If your mp3's id3 tag conforms to id3v2.4, which means probably you have disabled chardet, then pay attention to your fallback encoding setting, leave it alone, don't set it. trust me!

Monday, January 08, 2007

the default brower of xchat 2.8

The logic to find default brower is changed from xchat 2.6.8 to 2.8.
The 2.8 xchat will call xdg-open to open brower, in KDE, xdg-open will call konqueror unless you have set KDE's default brower to others.
I like firefox, and older version of xchat used to call firefox for me.
So I set KDE's default brower in kcontrol: KDE components-> Component chooser -> Web brower.


upstream maintainer和ebuild maintainer为同一个人看来是有些问题……


Saturday, January 06, 2007

regexec(3)'s usage:Match Results with Subexpressions

An example program:
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>

/* 取子串的函数 */
static char* substr(const char*str,
                unsigned start, unsigned end)
        unsigned n = end - start;
        static char stbuf[256];
        strncpy(stbuf, str + start, n);
        stbuf[n] = 0;
        return stbuf;
/* 主程序 */
int main(int argc, char** argv)
        int x, z, lno = 0, cflags = REG_EXTENDED;
        char ebuf[128], lbuf[256];
        regex_t reg;
        regmatch_t pm[10];
        const size_t nmatch = 10;
        /* 编译正则表达式*/
        z = regcomp(&reg, "(reg|regular)[ ]?(ex|expression)", cflags);
        /* 逐行处理输入的数据 */
        while(fgets(lbuf, sizeof(lbuf), stdin))
                if ((z = strlen(lbuf)) > 0 && lbuf[z-1]
                                == '\n')
                        lbuf[z - 1] = 0;
                /* 对每一行应用正则表达式进行匹配 */
                z = regexec(&reg, lbuf, nmatch, pm, 0);
                if (z == REG_NOMATCH) continue;
                else if (z != 0) {
                        regerror(z, &reg, ebuf, sizeof(ebuf));
                        fprintf(stderr, "%s: regcom('%s')\n",
                                        ebuf, lbuf);
                        return 2;
                /* 输出处理结果 */
                for (x = 0; x < nmatch && pm[x].rm_so != -1; ++ x)
                        if (!x) printf("%04d: %s\n", lno, lbuf);
                        printf(" $%d='%s'\n", x, substr(lbuf, pm[x].rm_so,
        /* 释放正则表达式 */
        return 0;
Run the program
$ ./a.out
0001: regex
regular expresion
0002: regular expresion
 $0='regular ex'
regular expression
0003: regular expression
 $0='regular expression'

Monday, January 01, 2007


sed -i -e  '
/在这段时间内被修正或解决的bug/ {
/\n<\/ul>/ {
}' *