Thursday, April 30, 2009

lazarus.on.ubuntu.jaunty.64bit

Being a big fan of Delphi I've been wanting to port my apps to Linux...unfortunately Kylix (Borland's RAD tool for Linux) is no longer supported since...well years ago, the obvious path would be to use free pascal and Lazarus. Free pascal is an open-source Pascal compiler with two notable features: a high degree of Delphi compatibility and availability on a variety of platforms, including Windows, Mac OS X, and Linux, Lazarus on the other hand, is an open-source development system that builds on the Free Pascal compiler by adding an integrated development environment (IDE) that includes a syntax-highlighting code editor and visual form designer, as well as a component library that's highly compatible with Delphi's Visual Component Library (VCL).

In Intrepid, I found that Lazarus and fpc is best compiled from the svn repo, however this is not the case with Jaunty (9.04) or at least with Jaunty 64bit. I have not installed Lazarus or fpc on Jaunty's 32bit edition so I can't say for sure but in the 64bit version it won't compile, I'm pretty sure its a dependency issue but as of the moment I don't have the time or the patience to trace all of it, enter CodeTyphon (shouldn't it be CodeTyphoon?) a distribution of FPC and Lazarus with a nice graphical build tool that makes building (to any OS) easier. Until the Lazarus wiki reflects a nice howto here's an easier way to install and build fpc and lazarus.

  1. Download CodeTyphon here
  2. Extract CodeTyphon zip to a folder of your choice
  3. Double-click CodeTyphon_ln64.ex (a CodeTyphon window should show up)

  4. Go to main menu FreePascal -> FPC Extract Source (it should automatically extract the FPC source to its own directory...usually /usr/share/fpsrc)
  5. Next select FreePascal -> FPC 64bit Build Compiler (could take a few minutes)
  6. Go to main menu Lazarus -> Lazarus Extract Source(it should automatically extract the Lazarus source to its own directory...usually /usr/lib/lazarus)

  7. *Step 7 actually failed in my first attempt, I found out that later after looking at the error logs that a few dependencies have to be satisfied first (so much for no time and patience hehehe). So fire-up your terminal and type this:

    sudo aptitude install libX11-dev libgtk2.0-dev

  8. Next select Lazarus -> Lazarus 64bit Build IDE
  9. Create a link or launcher that points to /usr/lib/lazarus/startlazarus
  10. Start coding!



Hope this helps! :)

Saturday, April 25, 2009

Jaunty.Jackalope.arrives

I decided to shift to 64bit Ubuntu 9.04 (Jaunty Jackalope) yesterday and installed it over my existing Ubuntu partition, now you might ask why I bothered with a clean install when I already upgraded to Jaunty a day before...To be honest, I really don't have a concrete reason except this weird feeling that the distro upgrade I performed was half-baked, notifications didn't work and it still has a sluggish feel. I might have been too excited about the whole thing that I didn't even notice that the automated installer did not wipeout the existing swap partition so I actually ended up with two swap files! Again the obsessive-compulsive in me was triggered and I performed the installation again, this time wiping out both my swap and root partition (using gparted) before installing Jaunty to disk. Ext4 is not the default filesystem for Jaunty btw and if you want that to happen you'll have to use manual partitioning. I chose ext3, deciding to shift to ext4 only if I find Jaunty slow the after installation. So after a few minutes I finally got it up and running and was immediately impressed by how fast it boots...22 secs! (cold booting) and thats not even ext4 yet!

This time my notification system finally worked. Everytime I receive a message in pidgin or a wifi signal is detected, I get a nice unobtrusive message that tells me what just happened. Jaunty is quite polished and has a very stable overall feel, not a very objective observation I know but Jaunty does live up to its name, its fast and the user experience is definitely improved. The wallpaper and theme hasn't changed much but thats what customization is for. Firefox is more responsive this time and flash support(flash64bit beta) has definitely improved. With Intrepid I experienced flash movies suddenly turning white and stopped playing or crashed the browser without warning...so far I haven't experienced that in Jaunty. If you want to install the 64bit version of flash make sure you removed the 32bit version first using synaptic then download here. I got the tar.gz version extracted libflashplayer.so and copied it to ~/.mozilla/plugins (create the folder if it doesn't exist).

Compiz worked fine after I upgraded Intrepid to Jaunty but curiously did not function once I did a clean install. I read somewhere that the devs explicitly blocked Intel graphics controllers because of stability issues with the driver (mine was GM965 Integrated Graphics Controller) however once I disabled the checks, Compiz worked fined without a hitch (however I'd still want the devs to fix whatever issues they find and add that later to the repos). If you have a GM956 like me you've been warned but if you like to make it work here is how I did it.

mkdir ~/.config/compiz/compiz-manager
echo "SKIP_CHECKS =yes" > ~/.config/compiz/compiz-manager

This is strictly a workaround folks...up until a real fix is given. Also you can install fusion-icon via synaptic(or add/remove) and reload the window manager, that should trigger compiz.
I'm still rebuilding my system right now, installing some of my favorite apps like gnome-do and vlc so I'll be a bit busy, you guys should try it out for a spin...again you can use the live-cd or better yet wubi (ubuntu installer for windows) if you're new to Linux and just want to have a feel for it. Otherwise forget about your current Intrepid installation and start upgrading :)






Tuesday, April 21, 2009

because.I.can't.wait.another.day

I've been testing Ubuntu 9.04 RC for two days now and it seems to live up to my expectation. So I've decided to upgrade to the latest release just because I can't wait another day...It's that good :)
Wish me luck and I hope I don't break things.

Thursday, April 02, 2009

OpenStreetMap on Linux & Kape


DabawenGNU's Linux & Kape (coffee) or L&K sessions has always been my favorite avenue for tech talk, conceptualized by a few years back it has given local FOSS advocates a powerful tool for spreading their advocacy or simply mingle with other people and be enlightened with what new FOSS related technology can offer. Its intended to encourage everyone to talk about their area of interest and expertise without the baggage of preparing formal and time consuming presentations.
I enjoyed every L & K session I've attended, that is why when Marloue and I were invited to talk about OSM and GIS I did not hesitate so set a schedule. Finally we can spark the interest of DavaoeƱos and get more local contributors to the OpenStreetMap project.
Due to time constraints we decided to focus more on OSM and clear up a few misconceptions as well. We also discussed some of the online services that made use of OSM as well as an overview of the Cloudmade's API and showed a sample application written in Delphi. Andrew was kind enough to document the session and even snapped a few photos while he's at it. Most of the participants were from the academe and we hope they will impart what they learned back to the classrooms so we'll have even more contributors.
OpenStreetMap is an amazing project its not just a simple online map but there is a wealth of information that can be derived and put to good use. Do take time to listen to the discussion, if you don't understand some of the words (as this is an informal session after all) feel free to shoot me an email. We'd like to thank Emmanuel Sambale for the presentation, he has done a lot for the OSM movement in the Philippines and we'd like to support that effort as well. (Videos on Andrew's blog)