What do I hate in Oracle VirtualBox

Written by Nensha. Posted in Development

I just want to build light seamless VirtualBox system for development:

Ok, let’s do it with great distribution Exherbo Linux it’s light and fast enough:

Unable to determine your Linux distribution what? Ok, let’s see what is supported, opening the script:

check_system_type() {
    if [ ! "$ro_SYS_TYPE" = "" ]; then
        return 0
    elif [ -f /etc/debian_version ]; then
        ro_SYS_TYPE=debian
        ro_INIT_TYPE=sysv
    elif [ -f /etc/gentoo-release ]; then
        ro_SYS_TYPE=gentoo
        ro_INIT_TYPE=sysv
    elif [ -x /sbin/chkconfig ]; then
        ro_SYS_TYPE=redhat
        ro_INIT_TYPE=sysv
    elif [ -x /sbin/insserv ]; then
        ro_SYS_TYPE=suse
        ro_INIT_TYPE=sysv
    elif [ -f /etc/lfs-release -a -d /etc/rc.d/init.d ]; then
        ro_SYS_TYPE=lfs
        ro_INIT_TYPE=lfs
    elif [ -f /etc/pardus-release ]; then
        ro_SYS_TYPE=pardus
        ro_INIT_TYPE=pardus
    elif [ -f /etc/rc.d/rc.local ]; then
        ro_SYS_TYPE=unknown
        ro_INIT_TYPE=bsd
        ro_RC_LOCAL=/etc/rc.d/rc.local
    elif [ -f /etc/rc.local ]; then
        ro_SYS_TYPE=unknown
        ro_INIT_TYPE=bsd
        ro_RC_LOCAL=/etc/rc.local
    elif [ -d /etc/init.d ]; then
        ro_SYS_TYPE=unknown
        ro_INIT_TYPE=sysv
    else  # Perhaps we can determine what we need to know anyway though?
        echo 1>&2 "Unable to determine your Linux distribution"
        log "Unable to determine the Linux distribution"
        return 1
    fi
    return 0
}

Fedora had sysv-compatibility enabled in systemd and vbox don’t support systemd. No, they will not support systemd. It’s not so mainstream, Oracle is serious organization and they don’t make additional work without point.

Ok, we can see Gentoo here, good, let’s go and try it, Gentoo even got their package in portage… interesting why and for what, It’s a bit outdated (I need exactly same version as my vbox) and on #virtualbox people suggest to use original drivers, they support gentoo anyways, good, let’s skip portage.

During install you can see some errors [!!] but there is no description and log contains just useless information and sometimes just header. I don’t know (still can’t say) why it fails to install xorg driver, vbox-install-x11 log contains header only, it’s so cool, if you will try to run /etc/init.d/vboxadd-service you will receive error message: there is no file /sbin/functions.sh, why? googling…

Ok there is a bug: https://www.virtualbox.org/ticket/2938

But it’s solved, let’s see…

if [ "$system" = "gentoo" ]; then
    if [ -f /sbin/functions.sh ]; then
        . /sbin/functions.sh
    elif [ -f /etc/init.d/functions.sh ]; then
        . /etc/init.d/functions.sh
    fi

Cool, solved even 3 years ago… wait, scrolling a page down to SAME FILE

if [ "$system" = "gentoo" ]; then
    . /sbin/functions.sh
    daemon() {
        start-stop-daemon --start --exec $1 -- $2
    }

Oh you are pretty… there is no ticket about this line, but even when I copied functions.sh to /sbin errors [!!] (with very helpful messages) has not disappeared so I think now I understand why gentoo got it’s own fork, I think I shell just unmask newer and emerge it…

The storm

Written by Nensha. Posted in Emotions

Sometimes fate is like a small sandstorm that keeps changing directions. You change direction but the sandstorm chases you. You turn again, but the storm adjusts. Over and over you play this out, like some ominous dance with death just before dawn. Why? Because this storm isn’t something that blew in from far away, something that has nothing to do with you. This storm is you. Something inside of you. So all you can do is give in to it, step right inside the storm, closing your eyes and plugging up your ears so the sand doesn’t get in, and walk through it, step by step. There’s no sun there, no moon, no direction, no sense of time. Just fine white sand swirling up into the sky like pulverized bones. That’s the kind of sandstorm you need to imagine.

An you really will have to make it through that violent, metaphysical, symbolic storm. No matter how metaphysical or symbolic it might be, make no mistake about it: it will cut through flesh like a thousand razor blades. People will bleed there, and you will bleed too. Hot, red blood. You’ll catch that blood in your hands, your own blood and the blood of others.

And once the storm is over you won’t remember how you made it through, how you managed to survive. You won’t even be sure, in fact, whether the storm is really over. But one thing is certain. When you come out of the storm you won’t be the same person who walked in. That’s what this storm’s all about.

― Haruki Murakami, Kafka on the Shore

Lucene.NET (Getting Started)

Written by Nensha. Posted in Development

Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users. The Lucene search library is based on an inverted index.

I’t my first time working with Document based NoSQL. It’s confused! And Here is C# example:

private void button1_Click(object sender, EventArgs e) {
        string filename = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\LuceneIndex";
        Directory directory = FSDirectory.Open(new System.IO.DirectoryInfo(filename));til.Version("1", 1);
    IndexReader red = IndexReader.Open(directory, false);
    for(int i = 0; i < red.MaxDoc(); i ++) {
        Document doc = red.Document(i);
        MessageBox.Show( doc.Get("postBody") );
    }
}