Posted on 10 Dec 2009
| Tags: [scala]
Ok, it is time to dustaway those cobwebs of my mind. After playing with Java for so long, I have been trying to learn something new(and useful). Java sometimes is too expressive/tedious/takes the fun out of programming.
I started playing with [Erlang](http://www.erlang.org) and found it to be very powerful: tail recursion, functional programming, OTP/supervisor trees 'n all but a little difficult on the syntax front(perhaps lack of familiarity/IDE's or blunted by java/IntelliJ Idea). Erlang libraries design are pure joy to see - wish I had chance to read about it before getting so used(corrupted) with Java. The whole message-passing-with-immutability paradigm is just **so much** simpler than sychronization in Java. IMHO the erlang bible [Programming Erlang](http://www.pragprog.com/titles/jaerlang/programming-erlang) should be a mandatory read for all programmers. On the flip side, string handling was as elegant as it is impractical, lack of GUI support, and the learning curve(more so to wean me away from the Java/OO style of programming) led me to drop erlang as something I would want to use in the near future. Sure, you cant beat the light weight actor model, true distributed processing support (include remote invocation), code hotswapping features, but it also has a learning/migration tax if you want to migrate java projects and developers to erlang.
Next up was [Groovy](http://groovy.codehaus.org) purely as a measure to ease the transition from Java. But I am not the biggest fan of the dynamic typing - there are some things which the compiler is good at and we should not wait for runtime for things to blow up. Though I loved how groovy had been used for building great frameworks like [Grails](http://www.grails.org/) and [Griffon](http://griffon.codehaus.org/)
While perusing Grails - I ended up playing with [Ruby](http://www.ruby-lang.org) and [RubyOnRails](http://rubyonrails.org) and found it to be very mature, easy and fast to learn and use. In hindsight, I could have skipped Groovy/Grails alltogether and directly gone to Ruby considering how much Groovy/Grails has been influenced by Ruby. For small agile projects Ruby is a very attractive candidate as the scripting language.
In the process of reading about erlang, groovy and ruby, it was hard to miss references, comparisons to [Scala](http://www.scala-lang.org). Scala seems to have assimilated the best from erlang **and** it is bytecode compatible with Java. It allows usage of Java libraries in scala apps(and possibly vice-versa), which alone is a powerful argument in support for migrating existing java based projects to scala, let alone the structural typing, functional programming flavors, actors, immutability and boilerplate code reductions. Not just for Java project migrations, but new app development using scala should(in theory) be faster/better when compared to Java.
So here I am starting on my learning-scala-by-examples quest. There is no dearth of scala tutorials on the web and people who have solved project euler's problems using scala. I plan to take a mixed approach - start with euler problems initially and then do some "real world" project(s).
Comments
Posted on 07 Dec 2009
| Tags: [VirtualBox, QNX]
Initially I had used VMWare Server to host my QNX 6.32 guest OS, but newer versions of VMWare server just became too bloated for my poor XP laptop and I started my quest for lighter alternatives to run QNX GuestOS. I tried [VirtualBox](http://www.virtualbox.org) and found its interface much simpler to use, and it was not starving my Host OS by starting multitude of never-used-services. Ubuntu and Windoze GuestOS setup was a breeze. But when I tried to boot the QNX 6.32 guest OS, it simply would not. It just kept crashing 3 seconds into the boot up. Looked at the VirtualBox's Guest OSes Supported [page](http://www.virtualbox.org/wiki/Guest_OSes) and found QNX in the red - not supported category. Googling around - found folks who had manged to get QNX 6.4 up but not 6.32 kernel. Here is what I did to get QNX Guest Os to boot up in VirtualBox.
### Round 1: Get QNX ISO Image to boot up: ###
After much trolling on QNX/Virtualbox forums - found one tiny nugget buried deep in the forums - Need to enable Intel Virtualization Technology (VT) support in the BIOS. After this at least the QNX ISO Image would boot and was able to install on the virtual disk. Also need VirtualBox version >= 3.0.10
### Round 2: Get QNX IP layer up: ###
Unfortunately each boot up would spew:
"Cant locate PNP Bios, unable to locate pci server"messages and ifconfig would reveal only the lo0 loopback interface. No LAN interface were detected, even with multiple permutations in the VirtualBox Network Adapter settings. Hmm...back to google.. Long story short - need to manually start pci-bios, io-net and use VirtualBox's PC-net Fast III adapter to get the LAN interface to work. My modified /etc/rc.d/rc.local file (also available [here](http://gist.github.com/247110)) is pasted below:
# Manually Start pci-bios /sbin/pci-bios # # wait for pci server to be available waitfor /dev/pci # # kill existing io-net slay -f io-net # # restart io-net for pcnet adapter /sbin/io-net -d pcnet vid=0x1022,did=0x2000 -p tcpip # waitfor /dev/socket # /usr/sbin/inetdOnce this is done, restart QNX - ifconfig now displays the en0 interface. Use the usual means to get manual or DHCP IP assigned to it. Thats it - I could ping in/out of the QNX Guest. Comments
Posted on 07 Dec 2009
| Tags: [Intro]
I have been using computers for a long time now. 1st brush was with a [BBC Micro](http://en.wikipedia.org/wiki/BBC_Micro) at highschool which allowed one to write programs using [BASIC](http://en.wikipedia.org/wiki/BBC_BASIC) programming language - lots of fun with GOTO statements. During undergrad - started with [Pascal](http://en.wikipedia.org/wiki/Pascal_programming_language) programs (graduated from using GOTOs to writing functions) using the 1st IDE - [Turbo Pascal](http://en.wikipedia.org/wiki/Turbo_Pascal) and moved on to C & C++(Theory only).
I have always been an early adopter, case in point - Java which learnt in college on my own using tutorials and the JDK Reference guide. Started from JDK 1.1 including GUI programming using AWT and later moved to Swing with J2SE 1.2. Initial programs where focused on GUI development but later on moved to Threads, Sockets with help from friends. Wrote my very own ICQ Messenger Chat clone using Java - for the final year project, but did not have a network to demo it ;-) - Demo'ed the Chat program using multiple windows on the same Windows 95 PC with loopback interface address.
Since then - I have mostly been dabbling in Java & a little of C/C++ - building network management systems in my day jobs. Focus slowly shifted from frontend/GUI programming to the backend - designing large multi-threaded apps with socket communications and DB layer.
I have always been fascinated with the scalability challenges associated with any large app, and used the net(blogs/forums/groups) extensively to learn from others to solve problems. But until now, I have never blogged. I never gave thought to it and was fine with reading others blogs. But lately have realized that value of blogging - it is a source of innovation and brings a sense of clarity when you start to describe something. So in spirit of pay-it-forward - here I am starting my blog with my obligatory Hello World! post.
The blog is hosted by [Github](http://github.com) and its setup is inherently geeky in nature - please see the [About](http://kverma.github.com/about) page for more details.
Comments