Belenix Planet
OGB Candidacy Details
On the lines of the excellent bio by Peter Tribble I am posting my own bio here as required by the OGB candidacy rules.
DECLARATION OF INTERESTS
- I am Platforms Engineer cum OS and apps Developer presently employed with Goldman Sachs. Goldman uses SUN Solaris and Redhat Linux among other platforms in the firm. However my engagement with the OpenSolaris community is a hobby activity that I do outside of my work with my employer’s consent. As such all my views and actions are entirely my own done using personal resources and time and not related in any way to my employment.
- I have been a user and developer on Solaris and Linux platforms for the last 12 years (of a total industry exposure of 13.5 yrs) and have been participating in the OpenSolaris community from it’s early days. I have previously been employed by SUN in the Solaris Sustaining engineering group working on various aspects of the OS from userland to the kernel.
- I am also the creator of the BeleniX distribution of OpenSolaris: http://www.belenix.org/. It was the second distribution of OpenSolaris that came out after SchilliX borrowing some concepts from SchilliX. It was the first non-SUN OpenSolaris distro to bring a full-fledged GUI desktop based completely on the X.org OSS stack and eventually matured into a stand-alone desktop distro. It brought in several innovations to OpenSolaris and formed the foundation for the OpenSolaris distro from SUN.
- I am a core contributor in a few OpenSolaris communities like X-Windows, Distribution etc. I contribute to the Fully Open X project off and on and have recently started another project called libtaskq (http://sourceforge.net/projects/libtaskq/) based on the TaskQ kernel framework from OpenSolaris.
- I co-lead one of the oldest and very active OpenSolaris user groups, the Bangalore OpenSolaris User Group with another OpenSolaris community member Sriram Narayanan.
BRIEF BIO
I live and work in Bangalore, India’s Silicon capital. However I was born in the eastern city of Calcutta which was once the capital of the British rule in India. I did my studies in Calcutta at Asutosh College under the auspices of the University of Calcutta. However I do not come from an Engineering background. My majors in Graduation were Geography, Geology and Economics while I studied Economics, Statistics and Maths in high school. I had a deep interest in Biology and Geomorphology till high-school and actually wanted to do Biotechnology as a career!
However I developed an interest in Computing as a hobby during the March of 1990 (thanks to my mom) and my first exposure was on the BBC Model B microcomputer which I hacked to death at my Mom’s office – Birla Industrial and Technological Museum. After that I completed all the typical topics of a Computer Enginering course as a hobby while studying Geography and moved from the BBC to a PC-AT and all the subsequent Intel processor models.
After hacking around with Borland Pascal, C/C++, Win32 etc. my first introduction to *nix was on Slackware Linux 0.1. By that time I have completed a PG diploma course on Software Engineering and my first job had me working first on FoxPro and then on Oracle on WinNT.
My second job provided me a big break when I joined HCL Technologies in the southern tropical city of Chennai where I started working at the dedicated Cisco offshore development center. That was the time when I came into touch with Solaris 2.5.1 logging onto large engineering servers via big-screen TektroniX X-Terminals. That experience at HCL – Cisco provided me with a wealth of resources and expertise. I later started having my first SPARC desktop and SUN Ultra 5. I worked across various Cisco groups including Test Automation group, Network simulators, Network Management group with my work touching a vast array of computing technologies starting from router chips and OS platforms and continuing till Java and webservices frameworks. I played with the guts of routers costing hundreds and thousands of dollars apart from a variety of SUN Servers.
After my 5.5 yr stint at HCL – Cisco I decided to accept an offer at SUN Microsystem’s Solaris Sustaining Engineering group and worked there for 4.5 yrs till the middle of 2008 when I jumped ship to Goldman Sachs in their Platforms Engineering group. In SUN I worked on various pieces including, commands, libraries, systems management and a few kernel components as part of my OpenSolaris dabblings.
I have been a voting member of the OpenSolaris community from some time.
First Ever RubyConf in India - Organized by ThoughtWorks India
Sidu is our point man here.
Visit http://rubyconfindia.org !
Musing in the SUN – Set
Now with the EU approval coming the curtains have started coming down on the acquisition soap opera that has been going one for the past year or so. There are still a couple of regulatory approvals pending from Russia and China but the major hurdles have been crossed so that the assimilation process by Oracle can begin in earnest. This is good news for all SUN customers and users as the uncertainities end and roadmaps start to be delivered.
With this a decades long fantastic story of innovation and technical brilliance comes to an end, SUN as we have known it begins to set. Hopefully Oracle will keep the core essence alive and we will continue to see great developments happen on the most popular SUN platforms, Solaris, Java, Systems etc. Hopefully we will continue to see the opensource efforts continue and OpenSolaris community, source bases continuing to flourish.
It is both a time of relief and sadness for me seeing the acquisition process finally moving forward. I am proud to have been among the privileged denizens of the hallowed portals of this great organization. I worked for SUN for 4.5 yrs leaving it in the middle of 2008. Those years were probably the most exciting and fulfilling years of my career that I have had till date and will shine in my memories till the end of my days.
Leaving SUN has been one of the most excruciating decisions I was forced to take till date. It is akin to what an old Oak or Pipul tree might feel if it is transplanted. I was literally torn from my roots. I still cherish the teams and the people I had worked with. The experience at the SUN workplace was so rewarding for me in a host of ways that I essentially regarded it as my second home. I will probably never get to experience such a fascinating workplace again: amazing people, exciting technology and projects, culture of innovation, work life flexibility, efficacy of people management, lack of hierarchy in perception and behavior of management, boundless opportunity to learn, freedom to define and create your own projects and work boundaries. These were some of the unparalleled qualities that I am yet to see anywhere else. My frustrating experience around lack of recognition of my BeleniX work (that provided the foundation for the OpenSolaris distro), towards the fag end of my SUN career was but a tiny fly in an otherwise spotless ointment.
Many will of course will have their own views and ideas on why SUN failed in spite of having some of the best technology talent in the industry. Since I have experienced the place first hand, let me put down a few pet views of my own:
- SUN has been and still continues to be the crucible of brilliant technology innovations but it lacked in business acumen and leadership. In this context I came across this thought-provoking article: http://blogs.harvardbusiness.org/anthony/2009/03/what_makes_a_company_the_world.html. I am hopeful of the future of the core SUN technologies under Oracle’s business acumen that SUN direly lacked.
- Pointless acquisitions.
- The OpenSolaris distro and the way some of the community matters have been handled. While the distro has been great for visibility and adoption I personally fail to see the justification of putting crucial time, money and effort into developing an opensource distro without a proper business model. Why would one put their business and top engineering resources into developing something without a revenue model ? Which enterprise customer will be willing to deploy a software from a development trunk into their data centers where they host business critical applications ? I am hopeful of Oracle here again. SUN customers would really like to lay their hands on Enterprise Solaris 11. Of course an opensource distro is needed so SUN should have followed the Fedora -> RHEL model. Empower the community and let it deal with distro things and focus your business resources in doing, ahem, business. There were efforts out of the community like BeleniX, SchilliX and others that could have fit the bill. Obviously BeleniX being my creation I am biased towards it. However BeleniX indeed provided the full foundation of OpenSolaris distro so it could have evolved, at that time, into the community distro variant like Fedora. However it was ignored after the benefits were extracted.
There are many obvious others I have skipped here. Anyway I am looking forward into the future with an expectation that Oracle can recover the market that Solaris and OpenSolaris lost in recent times. Solaris today is probably the most mature and technically capable OS out there in the wild and it deserves to be more widely adopted than it is today. While people only look at the blockbuster ZFS, Dtrace and Zones stuff, it is really full of compelling technologies that together make it a compelling platform: MDB/KMDB, Proctools, Truss, Apptrace, CTF, Resource Management, CIFS, Seamless Real Time extensions, Crossbow networking, I/O Multipathing, SMF and so on. Joerg Moellenkamp has an excellent brain dump of all these “other” features in his open book “Less Known Solaris Features“.
Rich copy-paste from a webpage using a firefox extension and saving it to a .doc file
Background;
I’ve been spending some time writing trivial XUL extension for my own needs.
XUL is a weird way of doing things – for me al least. I’ve been writing thick client applications using various toolkits ( Gtk/ Qt / Jambi ) for nearly 6 years now and using JavaScript , XML and CSS to write a desktop application seemed .. weird.
There are plus points to learning XUL:
- The “applications” themselves are lightweight and can be deployed using XULrunner as standalone applications – eg ChatZilla!
- The applications pretty much guaranteed to run on Windows, OS X and Linux ( and other OSes supported by Mozilla Firefox )n- as long as you dont use native code inside your applications.[1]
- This is great for building small utilities that you want – though full fledged applications like SongBird and Thunderbird have been built using XUL technology
- You can get a lot done using your web development skills
Using your web development skills to write desktop applications is cool in a weird way , IMO :)
Where XUL helps you:
XUL allows you to write simple desktop applications / firefox plugins just like you would write a web application. You use JavaScript for all the logic, XML for all the UI and CSS to theme it. If you are interested, going through the XUL Tutorial might be a good starting point. There are IRC channels and mailing lists to help you out , of course
Problem Statement:
I want to be able to extract rich text + markup from a web page so that I can put it into something else ( a Word document for example)
The Solution:
The code for that is simple, as long as you are familiar with Mozilla’s DOM API.
The code is pretty self-explanatory': I’ve hyperlinked some API calls with the documentation for your reference:
getSelectedRichText: function () {
//this method extracts out the rich text from the selection
// refer:https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/55f148ad19d6/ubiquity/modules/contextutils.js#l60 for more
var range = this.getFirstRange()
if (!range) return "";
var newNode = document.commandDispatcher.focusedWindow.document.createElement("div");
newNode.appendChild(range.cloneContents());
range.detach();
return this.absolutifyUrlsInNode(newNode).innerHTML;
},
// A couple of helper methods
absolutifyUrlsInNode: function (node) {
var attrs = ["href", "src", "action"];
for each (let n in Array.slice(node.getElementsByTagName("*")))
for each (let a in attrs)
if (a in n) {
n.setAttribute(a, n[a]);
break;
}
return node;
},
//this method returns us the range of the selection
getFirstRange : function () {
var win = document.commandDispatcher.focusedWindow;
var sel = win && win.getSelection();
if (!sel || !sel.rangeCount) return null;
var range = sel.getRangeAt(0);
var newRange = win.document.createRange();
newRange.setStart(range.startContainer, range.startOffset);
newRange.setEnd(range.endContainer, range.endOffset);
return newRange;
},
Saving the selected text to a .doc file:
Create a simple xhtml file – fill out the sections in blue with your data.
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word">
<head>
<xml>
<o:DocumentProperties>
<o:Author>Your name</o:Author>
</o:DocumentProperties>
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>100%</w:Zoom>
</w:WordDocument>
</head>
<body>
Your text goes here
<p> a new paragraph </p>`
</body>
</xml>
</html>
Save this with a .doc extension and voila! MS word can open this as a .doc file. This is very cool stuff.
Taking this into account lets write our saveToDoc() method:
SaveToDoc: function() {
//lets initialize a simple prompt here for debugging purposes
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
//lets constuct the doc string here.
var initialSectionStr = "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\">";
initialSectionStr += "<head>";
initialSectionStr += "<xml>";
initialSectionStr += "<o:DocumentProperties>";
initialSectionStr += "<o:Author>Your name</o:Author>";
initialSectionStr += "</o:DocumentProperties>";
initialSectionStr += "<w:WordDocument>";
initialSectionStr += "<w:View>Print</w:View>";
initialSectionStr += "<w:Zoom>100%</w:Zoom>";
initialSectionStr += "</w:WordDocument>";
initialSectionStr += "</head>";
var bodyStr = "<body>" + this.getSelectedRichText() + "</body></xml></html>";
var finalStr = initialSectionStr + bodyStr;
//prompts.alert(null, "foobar!", finalStr);
//writing the file
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath( "C:\\output.doc" );
file.createUnique( Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 600);
// file is nsIFile, data is a string
var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"].
createInstance(Components.interfaces.nsIFileOutputStream);
// use 0x02 | 0x10 to open file for appending.
foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
// write, create, truncate
// In a c file operation, we have no need to set file mode with or operation,
// directly using "r" or "w" usually.
// if you are sure there will never ever be any non-ascii text in data you can
// also call foStream.writeData directly
var converter = Components.classes["@mozilla.org/intl/converter-output-stream;1"].
createInstance(Components.interfaces.nsIConverterOutputStream);
converter.init(foStream, "UTF-8", 0, 0);
converter.writeString(finalStr);
converter.close(); // this closes foStream
},
We plug this in and thus we have a firefox extension which can take stuff from any web page and render it almost exactly onto a word document. Cool isnt it?
An nice distribution for my netbook – help!
I've a Acer Aspire D250
It's got WinXP SP3 + Android in a dual boot configuration ( preloaded / factory option )
My review of it -> http://manish-chaks.livejournal.com/103322.html
My usage:
This netbook is going to be my travel machine. I use the "reliance netconnect broadband+" datacard to remain connected to the matrix.. err. the internet while I'm travelling.
While XP SP3 was fine initially, I'm beginning to miss Linux on this machine.
The Android OS is pretty good, but it lacks
- anyway to recognize and dial the data card - so no connectivity in places without WiFi - the biggest deal breaker
- Apps for organizing / editing photos
- other native apps that I use less frequently but would be good to have while travelling
XP SP3 has pretty much everything I require, but
- As I install more software, it seems to be slowing down ( Standard windows problem)
- Lack of a good CII
- It's windows.
What I want:
I want to install a nice, "lightweight" distro , which
- works flawlessly with all the hardware I have - sound, wifi , datacard and hibernate/sleep are a must
- doesn't hog too much RAM.
- a good-to-have would be that the distro is compiled specifically for the Atom CPU, so that I can extract the maximum out of this netbook ( I'm open to cross-compiling Gentoo for this , if that helps )
- KDE4 would be a good-to-have, although I can live with fluxbox + some basic apps as well.
- Good power management - I'm not sure how good/bad linux is with power management as I mostly use it on my desktops or inside a VM on my mac.
- Please dont suggest Kubuntu - anything Debian or RHEL/CentOS based would be desirable - I dont mind not have the bleeding edge software - I can compile what I want - I want stability above all else - irritated with breakages in the Ubuntu/Fedora world. [1]
Any suggestions?
( posted from my notebook from the train - from somewhere in the middle of nowhere )
[1] - I've had Ubuntu and fedora kernel upgrades breaking sound, VMWare modules and Wifi amongst other things. Used Debian for a year on another laptop ( till mid 2009 ) and never faced any problems
1262325600
Happy New Year !
Its been a fantastic few weeks of Haskell so far. I had hoped to write about it more frequently, but that hasn’t happened.
In terms of theory, discovering the magic of Curry-Howard Isomorphism has been a great experience. The idea that the program is the proof when you have a sufficiently strong type system combined with side-effect free, lazily evaluated, functional programming is very seductive. Of course there is no point programming without side effects. But the idea is to use Monads for IO-like operations and keep side-effect inducing code away from purely functional code.
As far as practice goes, i find it ridiculously hard to design and think in Haskell. Having a day job that involves imperative code in C++ and Python doesn’t help at all when you want to switch to FP after 8pm.
Complicated things can be written in a simple and profoundly beautiful way:
-- Generate the first 100 primes module Main where primes :: [Integer] primes = eratosthenes[2..] where eratosthenes(p:xs) = p : eratosthenes[x|x <- xs, mod x p > 0] main = do putStrLn $ "Primes = " ++ show(take 100 primes)While simple things might be surprisingly hard because you take recursion for granted:
-- Sum the first 1 million integers module Main where main = do putStrLn $ "Sum = " ++ show(sum [1..1000000]) [ananth@turing]:~/code/haskell $ ./a.out Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize' to increase it.The bottomline: Haskell is a demanding mistress. You need to devote a lot of energy to it. Especially if you are new to FP. Writing performance critical production code is probably going to take me a year from now. But that is what new years are for.
As for Books, I found these two to be best suited to my style of alternate days of theory and practice:
Real World Haskell
Yet Another Haskell Tutorial
And Finally, Remember Earthlings:
ALL THESE WORLDS ARE YOURS EXCEPT EUROPA. ATTEMPT NO LANDINGS THERE.
Review: Acer Aspire D250 Netbook with Andriod
Since I am travelling a lot, I bought I needed a light netbook – bought the Acer Aspire D250 for slightly less than 18k INR
Tech Specs:
- Intel Atom Processor N280 – 1.66 Ghz, 667 Mhz FSB
- 1 GB Ram ( will upgrade it to 2 GB Shortly 0
- 6-cell Li-ion battery ( has been giving me 5+ hours of backup )
- 160 GB HDD
- Card Reader
- Android OS as a standard dual boot option - more on this later
Initial Feel;
- The keyboard felt nice – I am very particular about keyboards and this one seems to be pretty nice initially. The laptop itself is pretty small though and your fingers will cramp up after long hours of usage ( I started having problems after 4+ hours)
- The 6-cell battery gives me 4-5 hours of backup on my usage ( more on usage below ) – I’m more than happy with it.
- Atom processor is powerful enough for my usage on this machine
- The display is glossy and nice. The area around the display is prone to fingerprints though
- The laptop is really light – around 1kg and thin, Though nowhere as thin and light as the Macbook Air, it’s pretty good and light for my needs and it’s in my budget :)
How I use it
I made a conscious decision to keep the software stack on my machine as light as possible. I use windows XP SP3 on this ( came preloaded ) along with Android OS ( more on this below).
Firefox is the primary application that i use on my machine. I try and use web applications where ever possible. Which means I used GMail and Google Apps (for my TW Mail ) instead of using a Outlook 2007 as my mail client. I did try using Windows Live Mail , but I found the web interface the best deal.
I use Pidgin for all my IM needs – it’s got all my accounts ( my Y!, Google Talk and TW Jabber account) linked to it. Sometimes I use meebo as well. The heaviest application that I use on this machine is Eclipse – it’s way slower than my Macbook Pro – but then netbooks are really not meant for heavy development work. Java6 + Eclipse do really drain this machine – also because it’s got just 1 GB of RAM.
The only other development that I’ve been doing on this laptop is Firefox extension development – the laptop seems more than adequate for this task - Notepad++ being my editor of choice for this work.
I also have Emacs for windows installed on this machine – though I’ve been rarely using it.
The machine did not come with the windows XP Home CD/media with it. Acer provides a software for backing up the laptop into disks/DVD’s. I havent bothered with it cause I am going to get rid of windows and install Linux on it once I get back to Bangalore anyway.
The Android OS
When I bought the netbook, I noticed the “Android ready” logo on the right palm-rest area. I thought it was marketing shill till I installed/activated the Andriod OS ( you can do this from within windows – very cool ) and booted into it. Android asks your for your Google Account credentials and then syncs with it. All your Contacts / Calendar / GTalk friends list etc are automatically synced. It lacks some essential (for me at least) apps such as Twidriod but I assume you can install it somehow – need to explore more once my travels end and I get back to Bangalore.
Acer supplies its own ‘flavour’ of Android. I didnt use the word ‘distro’ – the Android world has not yet seen the kind of fragmentation the Linux world has, which is a good thing. I plan to install the vanilla Android OS once I get back – hardware support being a non-issue as everything seems to run well anyway
It’d be interesting to try out Chrome OS on this once it comes out – I've a gut feeling that it should work on this machine too many issues.
Verdict
If you are looking for a netbook which gets the job done and lets you play around – go for this one – I’m positively in love with this once I bought it.!
Building Packages on BeleniX #1
Several people have been asking me to detail the steps I use to build packages for BeleniX, so here is an overview of what needs to be done and what are the gotchas to be kept in mind.
BeleniX uses the Pkgbuild utility to build packages. Pkgbuild is similar to Rpmbuild and uses Spec files to store the build recipes. However instead of generating RPMs it generates SVR4 packages. Since we are actively considering a move to RPM from the venerable but somewhat dated SVR4, having spec files that need a little massaging is an advantage. Though this is still being discussed a bit. If you are not familiar with Spec files I’d recommend you to go through some of the excellent resources and howtos available on the net regarding writing Spec files and generating RPM packages. In addition Pkgbuild has some OpenSolaris – specific extensions that are documented in the Pkgbuild manual page.
However you should Not use the standard Pkgbuild utility from the original website. We have a slightly modified older version of Pkgbuild that supports the “Conflicts” directive among a few other tweaks. This is packaged via the BELpkgbuild package available in the BeleniX package repo.
If you have installed BeleniX 0.8 Beta1 using the install_belenix Network Installer mechanism, you will find that the installation lacks various headers, compilers and other files needed for development. To ease the task of getting a baseline development environment the package repo provides a group package called “devel” that pulls in all the necessary stuff. Consider this as the Debian “build-essential” thingy.
In BeleniX we primarily use the Gcc4 compiler since in the spirit of opensource we much prefer an opensource toolchain even though SUN Studio can provide some benefits over Gcc in terms of performance. In addition it is much easier to port and build third-party software using Gcc as compared to Studio since FOSS developers tend to use Gcc themselves. Since we are a resource-constrained small team we would prefer not to spend all our time chasing down compiler related build issues. The “devel” group package pulls in Gcc4 as well. However in addition to Gcc4 you will need Studio for certain things like building OpenSolaris from source. In that case I’d recommend you to download and install the latest tarball version of the SUN Studio compiler by visiting this page.
Next you will have to checkout the BeleniX spec files from the SVN repo and setup the initial Pkgbuild environment.
So preparatory steps are:
- Install development packages: pfexec spkg install devel
- Install SUN Studio(optional)
- Checkout spec files from BeleniX SVN: svn co https://belenix.svn.sourceforge.net/svnroot/belenix/trunk/spec_files belenix_specs
- The above command may give an error due to an issue older locale packages on the beta1 release try setting the C locale explicitly: export LANG=C
- Now create some directories that Pkgbuild expects. By default Pkgbuild expects a directory structure within the user’s home directory. The following directories need to be created: ~/packages/SPECS, ~/packages/SOURCES, ~/packages/BUILD, ~/packages/PKGS
- Now copy the needed files into these directories:
- cp belenix_specs/base-specs/* ~/packages/SPECS
- cp belenix_specs/include/* ~/packages/SPECS
- cp belenix_specs/patches/* ~/packages/SOURCES
- cp belenix_specs/ext-sources/* ~/packages/SOURCES
Now you are ready to play around further. Typically Pkgbuild provides two utilities called pkgbuild (aka rpmbuild) and pkgtool a higher-level wrapper around pkgbuild that can automatically download sources files and execute all the pkgbuild steps to generate a package and also install it. You can read more about pkgtool and pkgbuild commands by executing them with the ‘–help’ option or read the online manual. i am not going to repeat the details here.
In order to correctly use pkgbuild however certain environment variables and PATH must be set. At the minimum CC and CXX variables must be set to point to the C and C++ compilers. To simplify things a wrapper script is provided that sets up things properly for SUN Studio or Gcc4. It can be found at belenix_spec/run-build assuming belenix_specs is where you have checked out the spec files. So to build a spec file using Gcc the incantation will look like this: cd belenix_specs; sh run-build SFEfoo.spec gcc
The above invocation will automatically download the tarballs, apply patches, build, package and install the package. The SVR4 packages are kept under ~/packages/PKGS. During the build process the build output is sent to a log file having the package name. So for SFEfoo.spec the log file will be /tmp/SFEfoo.log. However pkgbuild first sends the logs to a temporary file and then appends those to SFEfoo.log. In order to monitor a running build the following simple script can be used:
#!/bin/sh PID=`ps -ef | grep pkgb | grep " /bin/bash " | awk '{ print $2 }'` LF=`pfiles ${PID} | grep "/tmp/pkgbuild.out" | head -1` echo "********************" tail -f ${LF}This completes a brief intro into the initial preparatory steps. The next step is to actually look at a spec file and prepare a new one. There are various gotchas and things to keep in mind when doing that. I will briefly go through the stuff that one should do when preparing a new spec file on BeleniX in the next post. In the meantime one can look at existing spec files to check how things are done. Two suggested sample spec files to look at will be SFEpth.spec and SFEmrxvt.spec. Pth is the GNU portable threads library. It shows how to write a single spec file to build both 32Bit and 64Bit versions of a library. Mrxvt is a multi-tabbed terminal emulator. To look at typical cmake invocation that I have been using one can look at the KDE4 spec files in belenix_specs/kde4.
The loyal Dog on my PS3
I had got a PS3 a few months back with a multitude of objectives. Blu-Ray player for my planned Home Theater setup, general media center, watching Youtube on the big screen, Gaming of course and to hack on the Cell. For the last one piece fortunately I have the 80GB Fat/Phat model.
I had been holding out on the actual Linux installation and hacking since we experience power cuts and a power loss during a system update or Linux installation can leave me with an expensive brick that my wife will probably be prone to break on my head!
So I had to invest on a UPS. I already had an APC Back-UPS RS 1000 with additional battery backup for my PC. I decided to get a beefier Smart-UPS 1000UX with 100AH external batteries for my PC and hook up the PS3 to the Back-UPS. However the LCD TV is on line power and when power goes it goes dark naturally and I can’t switch off the PS3 without having a working display. I can hook the TV to the UPS but I do not want the UPS to be always powering the TV. So I whacked together a double-pole 2-way switch. I put 2 modular single-pole 2-way switches side by side and stuck 2 pvc pieces with superglue on either end. The common lines from these switches go to the TV. One set of poles connect to UPS power and one set to mains. Ordinarily the switch connects to mains. When power goes while PS3 is in use I can flick it to put the TV on UPS battery power. Admirably the Back-UPS can take a sudden load surge while on battery without tripping. The UPS has already saved me once.
Then I went about the process of formatting the PS3 for Linux and installing the kboot loader. Initially I decided to go with Ubuntu. Version 9.04 did not work with the latest 80GB console models so I tried 9.10. The GUI came up with that and it hanged trying to sync with NTP servers. After googling I decided to pull out the Ethernet cable from the PS3 while installing (I have a concealed CAT-5 cable running from PS3 in living room to a switch in another room). The installer proceeded beyond NTP server sync and hanged again. I decided to give up on Ubuntu and go with Yellow Dog Linux 6.2. I had avoided YDL initially since it is a large 3.4GB download. The experience with YDL was extremely smooth. It installed flawlessly and works quite fast. I have a happy puppy yapping on:
Impressive Fedora
I use Linux as well apart from my obsession with OpenSolaris. I have used several distros in the past and came to like Mandriva for general use. I was also once the biggest critic of Fedora. Having had bad experiences with FC3 and FC4 I cursed it and simply ignored it till recently when I started stealing spec file recipes and patches from FC 11,12 CVS repo for building packages on BeleniX
During the course of that usage I now stand to take back my earlier criticisms of Fedora. In fact I am thoroughly impressed with the quality of the work they are doing. The quality of the spec files and patches speak for themselves. Many of the conventions they follow align with how things are laid out on OpenSolaris as well. I am now going around and recommending Fedora 12 to anyone who is using Linux. The only issue that one will see is from a desktop use perspective. Out of the box Fedora has very few customizations and tweaks, so it takes a while of manual work to tune it to your liking.
Reading List and Rewiring
I am in the middle of rethinking my personal research and to that end debating about how much of my current reading list I should stick to. Here is what I have planned for the next couple of months:
Surreal Numbers by Donald Knuth: A mathematical novelette that the Don used as an introduction to John Conway’s fascinating concept of Surreal Numbers.
On Numbers and Games by John Conway: The Game Theoretic concepts whose solutions led Conway to discover Surreal Numbers. I have been told this is an extraordinary book full of insight.
Sphere Packing, Lewis Carroll and Reversi by Martin Gardner: The usual collection of Martin Gardner’s columns from the Scientific American. I chanced upon the book in a random bookstore here in Seattle and couldn’t resist getting it after reading the chapter on Polyominoes.
I am a Strange Loop by Douglas Hofstadter: Stopped reading this half way through because I found Hofstadter’s explanations redundant and his tone patronizing. This is nowhere close to Godel, Escher and Bach. But it had some fascinating ideas nevertheless and is probably worth completing.
The reason for the rewiring being that my free time research has drifted so so so far away from what i studied in college, what i used to do for a living and what i do for a living, that I have a hard time keeping up with all of them. While I still find operating systems and programming interesting, I figured it might be a good idea to learn some Haskell and investigate some Linux and Plan 9 internals. I am finding it tough to convince myself about it though: Transfinite Ordinals are infinitely more interesting (note and excuse the pun) than the fact that a bunch of people cannot agree on what O_DIRECT means.
Posted in Books, Computer Science, DEK, Google, Mathematics, RantsHaskell ?
I have been looking at various options for learning a new secondary programming language (Primary still being “C”) in the past few weeks. The main intent is having a lot fun, exploring new concepts and maybe switch to it in the very distant future. Python was a LOT of fun, powerful, partly gives me a day job and so on, but I haven’t been able to do anything profoundly new with it in the last few months. I have looked at Erlang, Haskell and Scala so far (Functional Programming and Concurrency were big motivators).
Scala is at the bottom of my list because the documentation and the community seem to be interested in attracting “Java Programmers”. Good luck trying to do that with a FPL and an arbitrarily different syntax. The JVM is a tempting option but being in a community of Java programmers is not.
Erlang is a powerful and practical language. Its very good at concurrency even if message passing is a one trick pony. I was very annoyed by its syntax though – Did anyone think of refactoring as a legitimate use case ?
Haskell is slightly academic but quickly evolving into a practical language. The syntax is just beautiful. It reads like a mathematical poem and that is a crucial factor for me. Writing high-perf programs seems to require magical knowledge. But I am completely willing to invest time in something that is a pleasure to work with. Also, it has multiple choices for concurrent programming, including Software Transactional Memory.
The vague associations in my brain are: Scala <=> Java, Erlang <=> Perl, Haskell <=> Python. Haskell seems to be the emerging choice, but that option is not set in stone yet. Clojure and Ocaml are definitely out of the question. I already know a little bit of Scheme and LISP and they aren’t very exciting for me. What other languages should I be looking at ? Do people who read this have useful insights to share ?
Posted in Computer Science, ProgrammingBelenix 0.8 Alpha - with KDE 4.2.4
.
That's Belenix 0.8 Alpha running KDE 4.2.4 compiled with GCC 4.4. I backed up my data, installed OpenSolaris 2009.06, and then ran the install_belenix script after modifying it to point to my local Belenix mirror. Install took 20 minutes, and I now have OpenSolaris as well as Belenix 0.8 Alpha in my GRUB boot menu.
I've taken Wine from Triskelios' builds since we need to patch GCC 4.4.1 in order to get it to compile Wine on Belenix. This is good enough to run Lotus Notes 7.0.1. I do face two errors at startup related to z:\, which I've not got around fo fixing yet.
Also, I've taken rdekstop from www.sunfreeware.com since I needed to get rdesktop running first and didn't have time to set up a GCC 4.4 based dev environment (which I now have).
Some bugs that I've noticed so far:
- The KDE Lock tool doesn't let me unlock ! This is a critical bug which need some investigation.
- The cursor in Konsole is offset by a fre characters from the point of actual character entry.
- KWin sometimes thinks that the Alt key is continuously pressed. I "solve" this by either restarting KDE (Control Alt Backspace), or I SSH into my box and kill the startkde4 process. I've had to do this four times during the past week.
We have core dumps for the above and are considering either investigating further, or simply moving to KDE 4.3
Other bugs that I've noticed include:
- Okular doesn't support PDFs due to some issues with how poppler has been built.
- On a colleague's laptop, the CPU fan started to run at full speed. This is the first time that I've notived this issue.
There may be other issues too, but I've not made time to test them yet.
We've ofcourse had a number of bugs with the install_belenix script, each of which has been fixed.
We welcome you to try out Belenix 0.8 Alpha and report issues. Even if you have OpenSolaris already installed, you can go ahead and install Belenix since it'll neither damage your existing data, nor format anything. The script will ask you for a user name, and will create a separate user account for you.
wget http://www.belenix.org/binfiles/install_belenix
chmod +x install_belenix
pfexec ./install_belenix
A presentation on culture
Let's make the web fast
What many may not know, is that having great disk i/o and a good file system can help in certain situations.
So also with an excellent network stack.
Non-IE browser support -> Important for non-IE users
There are also sites like www.cisco.com which are not Firefox friendly at all.
I recently wrote to the marketing team at Promise (the SATA Controller company), pointing out that their website is not usable by non-IE users. They wrote back stating that the website will be revamped soon.
At my company, the marketing team tests all functionality to ensure that mose browsers that we can think of work fine. This includes IE 6/7/8, Safari (OSX/Windows), Firefox (OSX/Windows/Belenix). We don't test with Konqueror or with Webkit yet, though I think those two should be included too.
As a developer, I know that web standards compliance requires a bit of diligence but that this can be achieved.
Quote -> "ZFS is the most amazing technology I've seen in recent times"
We had a look at creating a snapshot, deleting files, and then recovering files from the .zfs folder as well as by rolling back to the snapshot. I also cited some disk performance numbers (5 mins for a full SVN checkout of a particular project on my laptop, vs 30+ mins for others who use Windows on the same laptop model). I also mentioned the notion of pools, of how one can transparently add storage, etc.
I will be showcasing ZFS sometime this week to the entire office.
While we were leaving, my colleague remarked "ZFS is the most amazing technology I've seen in recent times".
Reflecting on it a bit, I couldn't agree more !
Some links on Cloud Computing
The Open Cloud Consortium has as list of software related to Cloud Computing. There may be others too.
According to the statements on Sector listed at that page, Sector is supposed to be twice as fast as Hadoop .
Though I consider myself too old to understand the medium, I'm intrigued by the effort needed to keep Facebook running. Facebook's cloud computing related software, called Thrift , is available for download too.
Matt Asay asks Cloud computing: A natural conclusion of opensource ? . This is an informative read, because Matt provides perspectives on how users are no longer interested in the underlying technology, but in how they access that technology, and how inter-operable the data is.





Recent comments
2 weeks 2 days ago
6 weeks 3 days ago
6 weeks 6 days ago
6 weeks 6 days ago
7 weeks 1 hour ago
7 weeks 1 hour ago
7 weeks 11 hours ago
7 weeks 13 hours ago
7 weeks 4 days ago
7 weeks 5 days ago