Friday, October 31, 2008

Tutorial of the Week: How to Install OpenOffice.org 3.0 on Ubuntu 8.10


I guess everyone already knows that OpenOffice.org 3.0.0 will not be available  for the Intrepid Ibex (Ubuntu 8.10), because the developers did not wanted to include it could create new bugs
and delayed the release 

 What do I need to get started? Ubuntu 8.10 (32-bit or 64-bit)...

 
 Read the full tutorial here.

I like it to do it from the command line 

sudo gedit /etc/apt/sources.list.d/openoffice.list
add
deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main
sudo apt-get update
sudo apt-get dist-upgrade






Vote for a beautiful, usable Ubuntu

If you'd like to see this theme https://wiki.ubuntu.com/Artwork/Incoming/Intrepid/Wall-light instead of the current Intrepid theme, please let them know!

read more | digg story

How to make money with free software...

An awesome story of designing the new 5 euro commemorative coin with the theme 'Netherlands and Architecture', using free software.

read more | digg story

Thursday, October 23, 2008

Why pascal ?

it’s all the power of the simplicity (oo pascal follows the kiss philosophy and in a way is better than c++ for example)

Most of the time you have to rewire and damage your brain for c++

but pascal is focused to be an learning tool and it’s easier for the brain it seems close to pseudo code and the way brain works

Just go in an computer science class and ask students what they like:c++ or pascal
I’m not talking about the genius but the average guy
The same is with php or java script it’s easier to catch and learn them than java or c++

Check the tiobe index and you will see how the scripting languages take over the work

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

Wednesday, October 22, 2008

Frames in Lazarus

If you miss the Delphi frames now you can use them in Lazarus too if you are doing Delphi/pascal style programming

http://wiki.lazarus.freepascal.org/IDE_Development#Working_3

Tuesday, October 21, 2008

speeding up kernel/firebird compile on my home machines

cpu on laptop is a little bit slower (c7@1.2) so i started to use the cpu on the desktop too (athlon3000+) with the help of distcc

http://www.debian-administration.org/articles/112

http://code.google.com/p/distcc/

Here is the debian way to build the kernel with distcc
http://www.docunext.com/blog/2007/10/11/more-distcc-and-ccache-notes/

Also is good for building mozilla or other c++ programs (firebird)

http://www.docunext.com/blog/2008/02/06/swiftweasel-on-the-via-c7/

The Mono team has released their better version so far, including a number of huge improvements such us .NET 2.0 compatibility (yes, generics and everything), the initial Moonlight (Silverlight for Linux) and many more.

But the best is yet to come: they already have LINQ and lambda expressions (.NET 3.5) almost there, ParallelFX (the multi-core .NET library) and totally new stuff.

When people talk about Mono, they normally focus on its compatibility with the .NET platform and how good it is for a number of companies tied to the Microsoft stack. But let me look at it from a different perspective.

[I like their new C#shell, and the fact that it works ok with firebird 2.1 on all platforms:macosx,linux,windows ]

http://dobbscodetalk.com/index.php?option=com_myblog&show=Its-not-monkey-business.html&Itemid=29

I saw Delphi Developers Guide by Steve Teixeira and , Xavier Pacheco in an Book shop

and it is translated to Romanian language
I had tears in my eyes because I remember the days when I learned the Delphi/OOPascal/Interbase(Firebird) and all the examples are still fresh in my memory

This book I took it everywhere at school/at work /at home

Of course there are many other good books but today for me the free pascal docs are enough and the source

ps: also from the firebird conference I got the Marcu Cantu's book : Essential Pascal with his signature on it :)

Delphi/Free Pascal could be 2008 Language of the Year

It seems that Delphi Programming is an popular thing
and we must push it more (Delphi + Firebird)

http://www.delphi.org/2008/10/delphi-language-of-the-year-2008/
check the tiobe

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

I wonder when i will start an kernel module in pascal :)
imagine some kernel components on the components panel

Monday, October 20, 2008

Artport an good and beautiful idea

There are not many sites in Romania where you can buy art and combines the gallery idea with the bazar one

I like the religious paintings but i will look soon on the other items

http://www.artport.ro/index.php?mcategory=Categories&pn=search_res&category_id=17

Sunday, October 19, 2008

64M of memory used for kernel crashes !

[ 0.000000] Reserving 64MB of memory at 16MB for crashkernel (System RAM: 441MB)


so you need to remove that from /boot/grub/menu.lst


crashkernel=384M-2G:64M@16M,2G-:128M@16M

Saturday, October 18, 2008

i wish the changes to ubuntu repositories to be done faster
and i think the core distro can stay unchanged a little bit longer
but some apps should and must move faster than the rest of the distro
like:openoffice , firebird 2.1, lazarus , fpc

because stable releases are already there and the intrepid is already dated at the release

also i think the gentoo ideea with continuous upgrade to be good
at least for me is better to have latest stable applications and kernel

also backports in ubuntu is completely broken so is better to use the next release or debian experimental to be up to date with all apps
building process for free pascal compiler

http://www.stack.nl/~marcov/buildfaq.pdf

it's amazing how much work is done behind compiling your applications
Also this is an amazing team that progressed from an simple compiler
to an truly cross platform one (arm/x86,windows,x64,macosx,linux) and is really fast.
Howto use Lazarus 0.9.26 in Ubuntu Hardy/Intrepid
You can install the new version and you don't need to wait another 6 months to be included
in next Ubuntu release
if you have an "old" stable lazarus 0.9.24
you can install/upgrade to latest stable by using
the official lazarus repository

In my case i created an getlazarus bash script with this content


#!/bin/sh
gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
gpg --export 6A11800F | apt-key add -
echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \
>/etc/apt/sources.list.d/lazarus.list
apt-get update
apt-get install lazarus


then
$chmod +x getlazarus
$sudo ./getlazarus

also you must be sure to have te fpc source so here is how i usually install

sudo apt-get install fp-units-db fp-units-gfx fp-units-gnome1 fp-units-misc fp-units-net fpc-source fp-compiler fp-docs fp-utils lazarus



then start it with
$lazarus-ide in console or from the menu
Applications -> Programming -> Lazarus




To update all free pascal related packages from the new repository (I had old fpc2.2.0 and lazarus from intrepid repository)

$sudo apt-get dist-upgrade

In my case I got this message

The following packages will be upgraded:
fp-compiler fp-docs fp-ide fp-units-base fp-units-db fp-units-fcl
fp-units-fv fp-units-gfx fp-units-gnome1 fp-units-gtk fp-units-gtk2
fp-units-misc fp-units-multimedia fp-units-net fp-units-rtl fp-utils fpc
fpc-source lazarus-doc lazarus-ide lazarus-src



What is next ? Try to use it with firebird

And seems that works without problems.

Saturday, October 11, 2008

My quote for the Firebird conference Ending

"In the early days of my career, I wondered why software engineers and their managers occasionally traveled when we had email, instant messaging, wikis and video conferencing. Gradually, I've figured out that face-to-face meetings facilitate trust, collaboration and unity more effectively.

For me, the success of this conference re-emphasizes the value of face-to-face communication."

http://lwn.net/Articles/300306/

I can repeat the same for the conference , why I went there and when i could use emails/gtalk/skype ? Maybe is another sense that we have developed and you can't trust people if you don't see them , also the communication is better when you are not in the office . My problem now is going back to normal stuff or
routine doing stuff that usually must be done it's like going from heaven to earth . Going back to daily work . Now i understand better what is the future of firebird and maybe i understand better what core developers are thinking and what is on their roadmap and maybe i can help with that.
Installing flash plugin on debian
Here is an nice howto

Testing Firebird 2.1 on Debian experimental

Testing Firebird 2.1 on Debian experimental

Update: There is now Firebird 2.5 final in experimental
also if you want 2.1 is already in testing and unstable (no need for experimental repository)

Here is my sources.list
cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian/ unstable main
deb-src http://ftp.us.debian.org/debian/ unstable main

Add:

deb http://ftp.us.debian.org/debian/ experimental main
deb-src http://ftp.us.debian.org/debian/ experimental main

Then:
# apt-get update -t experimental
# apt-get install -t experimental firebird2.1-classic
or install super-server
# apt-get install -t experimental firebird2.1-classic
Install examples and flamerobin
apt-get install -t experimental firebird2.1-examples flamerobin

follow the examples extaction procedure from this page [Scrooll down and ignore the apt sources.list lines]
https://help.ubuntu.com/community/Firebird2.1


With firebird2.1-classic i have this error when i try to connect to employee.fdb

Engine Code : 335544653
Engine Message :
cannot attach to password database


This is a caveat with classic server and not a bug in Flamerobin.

This is the recipe to reproduce it:
* install Debian classic-server package
* (before anything else) connect to any database using a direct path
to the database, not server:/path/to/db using any program linked
with libfbembed, for example the firebird-supplied tools (sql,
gfix etc)
- this starts the lock manager as the currently running user
(let's name it 'X', which most probably is *not* 'firebird')
* try to connect to any database either using the server:/path/to/db
connection string, or using an utility that is linked with
libfbclient (which preepends localhost: on raw connection
strings), for example flamerobin
- you can't as that utility would connect via the fb_inet_server,
which runs as user 'firebird' by default and cannot open the
lock files created by the user 'X'.

To avoid this

* always use localhost: in front of any paths. this way the lock
files and the shared memory segment will be owned by the
'firebird' user.


Testing debian installer on windows box

I had at Lechinta an wubi installer but the cpu is too slow for ntfs-ng
so i decided to install debian/ubuntu on an native partition

So i installed the debian on windows and after it finished it rebooted and started
the classic debian installer (graphic mode)

I installed the base system then i dist-upgraded to lenny (testing)
and then to sid(unstable)

Just replace etch with testing in /etc/apt/sources.list
#apt-get update ; apt-get dist-upgrade
#reboot
Just replace testing with unstable in /etc/apt/sources.list
#apt-get update ; apt-get dist-upgrade
#reboot




so now i have an modern distro
The space is small on this p3 machine @500Mhz so i had to install an lightweight window manager
so i installed xfce4 from command line

#apt-get install xfce4 xorg gdm
#/etc/init.d/gdm start

Then i needed an browser so i typed
#sudo apt-get install iceweasel

That is firefox3.0.x under debian , they didn't accepted mozilla firefox restrictions and EULA so they decided to name it that way


Next install synaptic and it should give you an starting point to installing packages
#sudo apt-get install synaptic

Here is how to install flash player under debian

Friday, October 10, 2008

Here is how the libdbi example should look for firebird

I have installed libdbi and libdbi-driver for firebird
http://mapopa.blogspot.com/2008/10/installing-and-libdbi-for-c-and-libdbi.html

Here is the example i try to test for firebird

http://libdbi.sourceforge.net/docs/programmers-guide/quickstart-code.html



gedit employee.c

#include
#include

int main() {
dbi_conn conn;
dbi_result result;

double threshold = 4.333333;
unsigned int idnumber;
const char *fullname;

dbi_initialize(NULL);
conn = dbi_conn_new("firebird");

dbi_conn_set_option(conn, "host", "localhost");
dbi_conn_set_option(conn, "username", "SYSDBA");
dbi_conn_set_option(conn, "password", "masterkey");
dbi_conn_set_option(conn, "dbname",
"/var/lib/firebird/2.1/data/
employee.fdb");
dbi_conn_set_option(conn, "encoding", "UTF-8");

if (dbi_conn_connect(conn) < 0) {
printf("Could not connect. Please check the option settings\n");
}
else {
result = dbi_conn_queryf(conn, "SELECT EMP_NO, FIRST_NAME FROM EMPLOYEE");

if (result) {
while (dbi_result_next_row(result)) {
idnumber = dbi_result_get_uint(result, "ENP_NO");
fullname = dbi_result_get_string(result, "FIRST_NAME");
printf("%i. %s\n", idnumber, fullname);
}
dbi_result_free(result);
}
dbi_conn_close(conn);
}

dbi_shutdown();

return 0;
}

gcc -lm -ldl -ldbi employee.c

for the moment it crashes
Installing and libdbi layer for c api and libdbi-driver for firebird

I wish firebird was more simpler to use similar to dbi api for example that i use in perl world

You can see more about libdbi C api in the bacula manual


The according to libdbi (http://libdbi.sourceforge.net/) project:
libdbi implements a database-independent abstraction layer in C,
similar to the DBI/DBD layer in Perl. Writing one generic set of code,
programmers can leverage the power of multiple databases and multiple
simultaneous database connections by using this framework.

Here is how the Firebird libdbi driver is implemented and you can see how the layer is made over the standard
firebird api

sudo apt-get install libostyle-dev libfbembed2.1 firebird2.1-dev

wget http://heanet.dl.sourceforge.net/sourceforge/libdbi/libdbi-0.8.3.tar.gz
tar -zxvf libdbi-0.8.3.tar.gz
cd libdbi-0.8.3/
./configure --prefix=/usr
make
sudo make install
cd ..


wget http://heanet.dl.sourceforge.net/sourceforge/libdbi-drivers/libdbi-drivers-0.8.3-1.tar.gz
tar -zxvf libdbi-drivers-0.8.3-1.tar.gz
cd libdbi-drivers-0.8.3-1/
./configure --with-firebird --with-firebird-dir=/usr --prefix=/usr --disable-docs


make
sudo make install
make check
libdbi-drivers test program: $Id: test_dbi.c,v 1.46 2008/02/06 16:22:44 mhoenicka Exp $
Library version: libdbi v0.8.3

libdbi driver directory? [/usr/lib/dbd]
1 drivers available: firebird
test which driver? firebird

database administrator name? SYSDBA

database administrator password? masterkey
database directory? [.] /var/lib/firebird/2.1/data

database hostname? [(blank for local socket if possible)]
database name? [libdbitest]

Driver information:
-------------------
Name: firebird
Filename: /usr/lib/dbd/libdbdfirebird.so
Desc: Firebird/Interbase database support
Maintainer: Christian M. Stamgren
URL: http://libdbi-drivers.sourceforge.net
Version: dbd_firebird v0.8.3-1
Compiled: Oct 10 2008
Use CONNECT or CREATE DATABASE to specify a database
CREATE DATABASE '/var/lib/firebird/2.1/data/libdbitest';

...