-
March 18, 2010 07:19 PM
-
The other day I was playing around my Fedora 12 box to check some widget alignments and came across this interesting ‘bug’ related to the updation of the default directories in the user’s home. The directories ‘Desktop’, ‘Downloads’, ‘Templates’, ‘Public’, ‘Documents’, ‘Music’ and ‘Pictures’ are automatically present in the user’s home directory and these names can be translated in the xdg-user-dirs module. If the xdg-user-dirs-gtk module is installed, everytime a user logs into a new language interface from the gdm a dialog is presented prompting the user if she would like to rename these directories to the translated version. If she chooses to rename, then after logging in she would get these folders in the language she chose for the current session. Next time, when the same or another user chooses a different language while logging into another session, the prompt reappears and the user can again choose to rename the folders into their choice of language for the session. Rinse repeat.
The catch here is that the translation of these folders have to be present for this dialog prompt to be displayed. In the earlier example, if there were no translations of these folders in user2’s choice of language, the dialog prompt would not have been displayed. This would result in user2 being stuck with (in all probability) incomprehensible folder names from user1’s session. The solution here is to revert back to the more conventionally accepted standard English names. The process of reverting involves, logging out from the session and logging into the English session, choose to rename the folders into English from the displayed dialog prompt and then logging back again into a session with the preferred choice of language.
A probable solution to avoid this situation, is perhaps to display the dialog prompt for languages that do not have translations, with an option to rename them back to English. The other probable solution can be, to automatically rename them to English if there are no translations. The latter is the standard procedure for untranslated portions of UI messages.
This is particularly important for languages that are written in non-latin scripts like the CJKI languages. Since the folders are actually moved, writing their names would become difficult from the console. On the other hand, if they choose to not translate then renaming them back to English would require an user to go through the hoops mentioned earlier.
Since blog is not a bug, so one exists here (would have helped around if I had the skills). I hope I am not missing any existing solutions that are already present for this issue. Thoughts?
March 18, 2010 06:13 PM -

Where will you succeed today?
My school’s motto was “Better Everyday“. I kept screaming “Better Everyday, Better Everyday” during Friday morning school assemblies for over six years, but did not really understand what it meant.
I have been overwhelmed with work (happens every 3 months, it’s been a pattern, but more about it some other day). And while I was reflecting on this pile of work, I realized I did get at least one solid item off my list almost every day. But I was stressed as that list kept getting longer.
What if I focused on my successes, rather than failures? What if I could succeed in just one thing everyday?
I reviewed the work I did get done last week and felt very happy. That’s when I twitted:
Nothing motivates more than success. Where will you succeed today?
I wrote it, was proud and went to sleep. But when I booted up my MacBook this morning, I noticed it again.
And I stopped. Thought about where do I want to succeed today. Made a mental note of it. And began working.
This is how my day went:
- By 10.30, I had one client happy. Work was moving slowly on that project, but today we nailed it.
- Around 11.30, I had another client happy. Solved an annoying bug within minutes and the client said “Wahoo! That’s brilliant!”
- One major customer called before noon, complaining about a mail server issue. I talked to my team and gave an update in an hour. By the end of our day, we had a good enough solution in place.
- Shown stick to a project team in our standup meeting at noon. They completed pending work before signing out.
- Worked on cleaning up some malformed XML files in afternoon. This project was facing lot of technical challenges. But I had a working prototype ready at 6.45pm when I left work.
- And I even fixed an annoying bug in PlannerX just before I started this post.
Amazing how much happened by focusing on where I want to succeed today.
And I could say:
Satisfying day. Progress on projects. Made 5 customers happy!
Incremental improvements carried out daily can make transform your life in three months. Focusing on small successes can bring you big victories. I understand that’s what our school wanted us to learn from “Better Everyday”.
Did you get better today?
What are you going to succeed at tomorrow?
Related posts:
March 17, 2010 07:00 PM -
पुस्तक मेले में विचरते हुए इस एक अलग, विशिष्ट किताब पर नजर गई. 21 वीं सदी का व्यंग्य कोश.
उत्सुकतावश पन्ने पलटे कि आखिर इस कोश में क्या संकलित है, तो विषय वस्तु को देखकर लेखक के नायाब विचार और प्रयास को देखकर आनंद आ गया. यह कोश कुछ कुछ टेन-वर्ड-विकि जैसा है. एकाध पृष्ठ पर आप भी नजर मारें -
---.
विवरण-
व्यंग्य कोश
लेखक - सरन माहेश्वरी
प्रकाशक एवं वितरक
राजस्थानी ग्रन्थागार
सोजती गेट, जोधपुर (राज.)
द्वितीय संस्करण - मूल्य 200.00 रु.
आईएसबीएन नं. 81-86103-00-7
http://rgbooks.net
March 17, 2010 11:17 AM -
I wasn’t able to spend too much time at GNUnify10 – a weekday came in and, then there wasn’t enough time to do anything. A couple of things did strike me though.
- The profile of the attendees was different from last time. If the organizers talk about the demographics, this observation might be validated but I got the feeling that the crowd was more of professionals than students
- The event has introduced diversity and, that is a good thing to have
- There have been new speakers as opposed to the “same old faces” talking
- There were elements of avid interest in things Fedora where the speakers were enthusiastic and participated in rapid Q/A
I liked what I saw. Including Shreyank’s enthusiasm to not get off-stage till the “download link came up”
One of the things that I’d hoped would happen at the event is that the group of Fedora folks who met would sit down and discuss their goals for this year. By goals I meant the stuff they would be focussing on and, more importantly, how they would be measuring their achievements. I don’t know how much was discussed along these lines but it is a good time to start doing it. Keeping the focus on a few important things and then creating easy-to-visualize ways of looking at the achievements allow the contributors to assess themselves. Self-assessment goes a long way in removing any perceptions of anonymity that might be lingering on. And, it also creates a sense of involvement – of belonging.
The other important bit this would achieve is that it would make the developers more visible and approach-able. For too long I have seen developers have an aloof or, stand-offish approach to their projects. And, it isn’t because they are arrogant but perhaps it is their trait. Unfortunately, “they will contribute if they figure out that the project is good” isn’t a nice approach. Going upfront and talking about goals, plans and in general doing advocacy allows potential contributors the confidence to tinker with the code and, start contributing. Building up the confidence to tinker not because it is “good for the nation” but because it is “good for oneself” and, is profitable is a concept that needs to be repeated over and over again. The students aren’t rolling up their sleeves enough and, it is an urgent need to exhort them to do it. The world is moving forward at a fairly fast clip and they cannot take comfort in the “learn-by-rote-to-join-TWITCH” way of life in the various colleges across the country. In money terms as well as in time and effort an enormous quantity is invested in students, that shouldn’t go to waste.
The others have already blogged about the event, I’m waiting for Hiemanshu’s writeup.
Posted from GScribble.
March 17, 2010 09:22 AM -
The fonts that can be obtained from the site here display the following information. Now, how is one supposed to package (there isn’t a defined upstream as much as I could fathom) and redistribute (especially Bangla Akademi.ttf) them ? The fonts by themselves are fairly nice and, that’s a sad aspect as well.
And, an evaluation version of the BitRock Installbuilder seems to be used for creating the font installer.
$ otfinfo -i Vidya.ttfFamily: Vidya
Subfamily: Normal
Full name: Vidya
PostScript name: Vidya
Version: Version 0.6
Unique ID: PfaEdit : BanglaTem�plate : 30-3-2003
Designer: NLTR
Manufacturer: NLTR
Copyright: Copyright NLTR License: GPL
version 2 (or later, at your option).
and,
$ otfinfo -i Bangla\ Akademi.ttf
Family: Bangla Akademi
Subfamily: Regular
Full name: Bangla Akademi
PostScript name: BanglaAkademi
Version: 1.0 2008 initial release
Unique ID:
SocietyforNaturalLanguageTechnologyResearch(SNLTR),Kolkata,India.DesignedaccordingtoPaschimBangaBanglaAkademiStandardbyBiswarupBhowmik:
Aangla Akademi: 2008
Description: Society for Natural Language Technology Research
(SNLTR),Kolkata,India. Designed according to Paschim Banga Bangla
Akademi Standard by Biswarup Bhowmik, 24B Lake Road, Kolkata 700029
Designer: Biswarup Bhowmik, 24B Lake Road, Kolkata 700029
Manufacturer: Society for Natural Language Technology Research
(SNLTR),Kolkata,India. Designed according to Paschim Banga Bangla
Akademi Standard by Biswarup Bhowmik
Trademark: Bangla Akademi is a trademark of Society for
Natural Language Technology Research (SNLTR),Kolkata,India.
Designed according to Paschim Banga Bangla Akademi Standard by Biswarup Bhowmik.
Copyright: Copyright (c) 2008 by Society for Natural Language
Technology Research (SNLTR),Kolkata,India. Designed according to
Paschim Banga Bangla Akademi Standard by Biswarup Bhowmik. All rights
reserved.
March 17, 2010 07:41 AM -
Was going through older posts searching where to people land up with the weird search terms that I so often keep seeing in the analytics screen I felt the urge to do an LJ style update post (Take that Twitter!! You just don’t make the cut).
Things which are dominating my free time? TV serials: Started watching LOST completed the 5 seasons and now up to sync with season 6, season 1 and 2 really held my attention but after that it was mostly watching something while I read thing. The serial which has really caught me up is Caprica. If you are a sci-fi buff or more specifically BSG then you should not miss it! Tells the story of 58 years before the War. Oh yes! You probably guessed it right I have picked up a WDTV.
The most recent books that I finished were “Raiders from the North” by Alex Rutherford, “Goddess of the Market” by Jennifer Burns and “Spectacular India” by Shobha De. The selection doesn’t really represent my likings but since I have gotten better reading glasses I am enjoying reading anything I can get my hands on
The bird photography has slackened a bit but last Sunday we drove around in the non-protected areas of the Bor wildlife Sanctuary, an almost 230km trip. No we did not see any big cats, though it would not have been unlikely we did see a good number of birds. A photo lifer for me was Green Heron. Meanwhile I have been updating my Flickr account fairly regularly. Have a conceptual photo-shoot planned with a Painter for tomorrow, let see how that goes.
Have been coding on a few itches – basically Wordpress plugins for better Flickr integration. Wordpress code is a nightmare but it gets the job done very well and that is what ultimately counts – Interested? Have written about them here
Originally published at http://tariquesani.net/blog/. Please leave any comments there.
March 17, 2010 05:30 AM -
Old favorite German word: weltschmerz
New favorite German word: lustmord
March 16, 2010 06:06 PM -
व्यंज़ल
क्यों करें काम
काम है आराम
काम में आराम
गुठलियों के दाम
काम बिना दाम?
सरकारी है काम
काम बिना नाम!
सरकारी है काम
रवि तेरा काम?
कुर्सी पे आराम
---.
(संबंधित प्रविष्टि – आओ आराम फरमाएँ भी देखें)
March 16, 2010 08:00 AM -
കേരളത്തിലെ താപനില കഴിഞ്ഞ ചില ആഴ്ചകളായി 35 ഡിഗ്രി സെല്ഷ്യസിനു താഴെ വരുന്നതായി കാണുന്നു. താപനില 35നു മുകളില് നിര്ത്താന് ഇതാ ചില കുറുക്കുവഴികള് :
- പറമ്പിലോ വഴിയോരത്തോ നില്ക്കുന്ന മരങ്ങള് ഇനി ഒരിക്കലും വളരാന് കഴിയാത്തവിധം വെട്ടിക്കളയുക. മരമുത്തശ്ശിയായാലും മുത്തശ്ശനായാലും അതുമല്ല ശിശുവായാലും ശരി, അതിനെ വെട്ടി, തായ് വേരു് തോണ്ടി അപ്പുറത്തെ പറമ്പിലോ അല്ലെങ്കില് റോഡിലോ കൊണ്ടിടുക. വികസനത്തിന്റെ എറ്റവും വലിയ ശത്രു മരമാണു, അതുകൊണ്ടു അതിനെ വച്ചു പൊറുപ്പിക്കരുതു്.
- മണ്ണുകൊണ്ടുള്ള മുറ്റമോ നടപ്പാതയോ ഉണ്ടെങ്കില് അതിന്റെ നാലു വശവും കരിങ്കല്ലു കൊണ്ടു കെട്ടി മിനിമം 6 ഇഞ്ച് കനത്തില് കോണ്ക്രീറ്റ് ചെയ്യുക (ഇനിയെങ്ങാനും മഴ പെയ്താല് കാലില് ചെളി പറ്റാതെ നടക്കാല്ലോ).
- എത്രയും ഉയരത്തില് കെട്ടിടങ്ങള് കെട്ടാമോ, അത്രയും ഉയരത്തില് കെട്ടി, അതിന്റെ നാലുവശവും അലൂമിനിയം ക്ലാഡിങും ചില്ലും പിടിപ്പിക്കണം.
- കുന്നുകളും ഉയര്ന്ന പ്രദേശങ്ങളും ഇടിച്ചു നിരപ്പാക്കി തരിശാക്കണം. ഇടിക്കുന്നതിനു മുമ്പ് തന്നെ ചെറിയ കുളമോ തോടോ കണ്ടുപിടിച്ചാല് മണ്ണു വെയ്സ്റ്റാക്കാതെ ഉപയോഗിക്കാം (ഒരു വെടിക്കു ഡബിള് ചൂട്).
March 16, 2010 07:02 AM -
Wish you all A very Happy Ugadi. As most of you know, Ugadi marks the beginning of new year according to Hindu calendar. It marks the onset of spring, of new life and new beginning filled with Hope. May this “Vikriti” samvatsara bring lots of happiness, prosperity and good luck to you and your family. According to our custom, we distribute a mixture of “bevu-bella”(Neem – jaggery) which symbolizes that we have to treat happiness and sorrows in our lives equally. Ugadi is also considered to be the most auspicious day to start new ventures.
I have tried out a new style of Rangoli this Ugadi. Its called the “Sanskar Bharti” Style of Rangoli and is very popular in Maharashtra. I love the vibrant color effects and beautiful patterns of this Rangoli style.

Ugadi Rangoli

Rangoli : Closer look
With Best Wishes,
Netra
March 16, 2010 05:42 AM -
I'm afraid that in the end I failed the challenge. As the last minutes of Saturday night ticked down, I was still mired in the minutiae of C++ Run-Time Type Identification (RTTI.) Sunday was my 12th wedding anniversary and I know from past experience that this is one day when it is advisable to step away from the computer. So I have to concede defeat for now. But I only actually spent about 48 hours on this project this week so if you really think about it, I still have 120 hours available. That's what I choose to believe anyway.
The galling thing is in theory I know how this is supposed to work. A.L.F.s model (in the model-view-controller design pattern) is a class called World. World has an array of Rooms which represent rooms in the dungeon. In my original almost working version of a few days back, this Room class had all manner of verious members for different objects in the dungeon but I decided to redesign it the right way by consolidating all the redundant bits into an abstract base class called Item which would have concrete subclasses: Potion, Treasure, Monster etc. Room now only has to hold a pointer to the Item associated with that room. (Later on I will consider allowing multiple items per room but for now there can only be one.) A factory function creates Items and assigns them to each Room (or leaves them empty) It returns a pointer to an object of the appropriate class but we can access that object through the Item* because they are derived from Item.
So far so good. The fun part happens when we want to know what the Item* really is. For example, combat makes sense for Monsters but not for Treasure. I only want to activate combat if the Item* is a Monster*. It's easy in theory:
if(dynamic_cast<Monster*>(contents)) return FIGHT;...but it didn't work. Problem number 1. C++ RTTI only works on polymorphous classes. (Ones that contain atleast one virtual member.) So a little redesign of my classes was necessary. Problem #2, once you start slinging pointers around, segfaults soon follow. I had to go back and make absolutely sure I wasn't double-deleting objects and things of that nature. As I write this, I think I have finally got it all sorted out. So I am going to persevere and finish this game, its just going to take a bit longer than 7 days.
March 15, 2010 07:13 AM -
फ़ेसबुक पर मित्र निवेदन साज-संभाल रहा था. एक कड़ी को क्लिक करने पर यह बटन प्रकट हुआ – निवेदन दुर्लक्षित करें. हे! भगवान!! इसका अर्थ क्या है? कोई बताएगा? वर्षों से कम्प्यूटर अनुप्रयोगों व वेब सामग्री के हिन्दी अनुवादों में सक्रिय हिस्सेदारी के बावजूद इस बटन पर लिखे का अर्थ मुझे तो समझ में नहीं आया. किसी को आया हो तो बताएँ, ताकि आगे मित्र निवेदन की साज-संभाल की जा सके. अभी तो अपनी गाड़ी दुर्लक्षित (?) हो गई है…
March 15, 2010 02:40 AM -

Fun in the sun
Originally uploaded by Dalfry
Awesome weather after months. Simi loved it too. Did not want to sit
Originally posted at http://vsharma.net/617.
in her chair and made us take her around the garden in the backyard.March 15, 2010 12:07 AM -
The title is significant, since I’ve been off blogging for quite a while. It’s positive since it shows that I’ve gotten quite a lot of work on my head.
Here’s what I’ve been up to with respect to Fedora :
- Working on fedora-tour.
- Packaging maintaining.
- Helping out at #fedora and the other channels.
- I participated in the webcam test day!!
- other stuff
Other than that, I’ve gotten stuff from college to do. Exams, assignments, (
) internship project etc.I started working with the LUG again after a dormant period. I forward fedora announcements to the lists apart from the general discussion.
I think a short post’s good for a comeback. Hope to post more frequently!
March 14, 2010 12:52 PM -
I was invited to give a talk on Fedora and security in a IT conference about emerging trends in security in COEP, College of Engineering in Pune and I talked about our upcoming Fedora Security Spin for Fedora 13. I started out with a video of Truth Happens and that got such a overwhelming response with even a request for a rerun during the Q&A session which I was happy to oblige.
I reused Joerg Simon’s slides from FOSS.In 2009 with some minor modifications and talked primarily about the nature of free and open source software and it’s impact on security. I discussed some features like SELinux, Fedora, Spins and some details about what we are attempting to do with Fedora Security Lab.
Questions and answers were many but here is a sample:
* How can I propose a project to Fedora and what qualifications do I need and whom do I contact?
While we do some development, development for Fedora usually happens elsewhere with Fedora acting as a integration point. So usually you will be developing a free and open source project and be the upstream. You don’t need to be a Red Hat employee to contribute and all you need is some interest and you can learn the skills over time. Feel free to email me [insert email id]
* You mentioned NSA and SELinux. Why are they interested?
In short, because they are interested in doing research into OS security and they themselves or associated divisions are consumers of such technology and wanted it to be part of a mainstream operating systems.
* Can I download Fedora Security Lab?
Not yet but we have a six month release cycle and this spin is part of our upcoming Fedora 13 release. Get it from http://spins.fedoraproject.org/security/ in a few months.
* Loved the video. Where can I get it?
Truth Happens and more is available publicly at redhat.com/films
* I want to contribute to the Linux kernel and I don’t know C?
Then you don’t want to contribute to the Linux kernel. Start with something more simple. Kernel is a highly technical project and has a naturally higher barrier to entry and while you might eventually learn the skills to contribute, it is always better to start with something much simpler.
* We have a Free software users group and we have done the usuals (install fests etc) to get started. What can we do going forward?
Focus on contributions. Learn a easy to learn programming language like Python. If you are interested in Fedora, learn RPM packaging. If you need help in getting started, drop me a email.
* Can I get RHEL for educational or development purposes. I am doing a clustering project based on it?
Red Hat does have a special subscription for educational institutions which is cheaper but if you don’t need a support contract, you might download a free rebuild like CentOS.
* I am interested in being a sys admin. What certification would be useful for me?
More than certifications, practical knowledge is going to be more useful and Red Hat does offer a hands on certification called RHCE focussed on sys-admins. We have training centers from partners. Go to Red Hat website for more details but do your homework first.
* What about internships?
We have a few projects that you might want to get involved with. Email me for details.
March 14, 2010 11:52 AM -
Notes for self:
* Keep the talks generic and have a good number of slides. Show demos if possible of tech features. Remember that much of the audience is students especially if you are a alloted a morning slot.
* Packaging workshop requires a simple clean example, slides with few points describing which channel to login, which packages to install etc. Random fonts are not necessarily easy to package or get started with
* Spin or remix demos require a offline repository with group information (comps) and createrepo with –update argument is very useful when package content in a repo hasn’t changed or changed much.
* Give away goodies to attract the audience. Going from there to getting contributors is a tough deal. Live with it.
* Everything must be simple and straight forward.
March 14, 2010 11:22 AM -
- #nowplaying Sweet Caroline by Neil Diamond #
- @achitnis Yes it is a great deal – got mine today morning http://www.macheist.com/ in reply to achitnis #
- I bought the Mac Heist bundle. 7 Top apps worth $260+ for only $19.95 and got 3 sweet bonus apps free! http://bit.ly/heist-it #
- @AishwaryaMB Considering that snook wrote that post in 2007 most of it is very outdated in reply to AishwaryaMB #
- SANIsoft: blog : [Wordpress plugin] Flickr foto info http://bit.ly/amWnvP #
- Hmm….. WDTV Live is now available at ebay.in – wonder if Networking is worth the extra 3k
Originally published at http://tariquesani.net/blog/. Please leave any comments there.
March 14, 2010 07:49 AM -
It is miniproject time for every Sixth semester B Tech students. I would like to update about my miniproject.
I am implementing a Wireless Linux Terminal Server project, Which is an extension to LTSP project.Basically LTSP as quoted from wikipedia “Linux Terminal Server Project (LTSP) is a free and open source add-on package for Linux that allows many people to simultaneously use the same computer. Applications run on the server with a terminal known as a thin client (also known as an X terminal) handling input and output. Generally, terminals are low-powered, lack a hard disk and are quieter than desktop computers because they do not have any moving parts.”
LTSP facilities to use a powerful machine shared by many users from different terminals or thin clients. Thin client machines actually don’t do any processing rather than setting up a minimal system to run an X server. Basic principle of an LTSP system are as follows.
There will be a server machine which is having considerable ram, processing power and attached to a network. The client machines are low end machine with few megabytes of ram, low processing power and attached to the same network over LAN through ethernet card. Ethernet cards come with a special chip socket. We can actually flash a chip / ROM containing a minimal OS. We flash a minimal OS in it and call it PXE ( Preboot Execution Environment).
This ROM will setup a Linux kernel and an initial ramdisk atmost of 10MB. Thus the minimal OS will boot and detect the required devices, like ethernet card. The it loads nfs kernel module and establishes network connection through DHCP and remote root filesystem is mounted via NFS as read only. It places symbolic links to the core parts of root filesystem structure like /bin , /sbin, /lib, /usr and other directories are created in the ram and copies from the readonly directory. The system switches the root to the new root filesystem, sets up a minimal system that can run X. Now it remote login to the server machine using XDMCP.I am implementing a similar version of LTSP with wireless support. The limitation of Wireless card is that it does not have a facility like PXE to boot the minimal OS. So we have to look at some other ways to boot the minimal OS. So I decided to use either a CDRom or USB pendrive to make an equivalent setup like PXE. I am basing Pardus 2009 for my project though Pardus 2009.1 has recently released.
I have been hacking around Linux distros over 4-5 years. My first tryst with hacking a distro was with Knoppix in 2005.
My first task was to hack around the Pardus initial ramdisk scripts. Basically to boot a Linux OS, we need Linux kernel and a filesystem to support it. We use a bootloader like GRUB, Lilo, Syslinux. GRUB is the most advanced one among them now. I will be using syslinux as my client bootloader since we need something very light weight.A custom compiled kernel or native Pardus 2009 kernel ( 2.6.30-123), an initrd file to act as base filesystem for the WLTSP client. My aim is to implement wireless support and reinventing LTSP with Pardus. I was more enthusiastic to see how it would work such that a client boots from a 10MB ROM and runs a full fledged OS. I wrote a small script to decompress and compress the initrd.img file.
#!/bin/bash if [ "$1" == "extract" ]; then mkdir fsroot; cp initrd.img fsroot/ cd fsroot mv initrd.img initrd.gz gunzip initrd.gz cpio -i < initrd rm initrd ; elif [ "$1" == "bake" ]; then cd fsroot; find ./ | cpio -H newc -o > ../initrd.cpio cd .. gzip -c initrd.cpio > initrd.img rm initrd.cpio rm -rf fsroot fi
I customized the init script to add few more features, I cut off some of the unnecessary things from the script. Basically an initrd.img file consists of a Busybox filesystem. Busybox is a commonly used initial ramdisk base. There are a lot of interesting things about Busybox. Busybox looks a small real Root filesystem as most GNU/Linux operating systems has. Firing an ls inside initrd would look like this.
slynux@slynux-laptop:~/miniproject/initrd_bake/fsroot$ ls bin bootsplash dev etc init lib newroot proc sbin sys
/bin and /sbin contain lots of binaries. There are many common utilities that comes along it including ifconfi, grep, sed, awk etc. I thought they are similar to real elf files, like they are individual binaries. Interestingly, in Busybox there is only one elf file. All other binaries are hardlinked to the same
It actually checks for argv[0] and finds its name and does its function. That is, suppose if i rename /bin/ls to /bin/ifconfig. It will work as ifconfig rather than showing ls ouput. It is done to keep the system really small. You can also put your own binaries to the busybox environment. But it should be noted that dynamically linked binaries won’t work. You have to compile as static. For that, use -static option for gcc while compiling.The initrd that came with pardus had no wireless extensions since no kernel modules required to fire up the drivers were present. I looked to to /lib/modules/2.6.30-123 and went through .ko files, modprobe.dep, modprobe.alias. The device probing and corresponding module loading is handled by coolplug, an excellent program written by Pardus developers. Kudos to them. I went to my Pardus 2009 installation, looked into lsmod and figured out some of the required modules and their dependencies. I hacked the initrd again and added the dependencies, required kernel modules. I booted from the minimal system I had. I am using intel wireless card, so I tried to load manually modprobe iwl3945. It worked fine, but no wlan0 interface comes up. I looked into dmesg and found some errors related to crypt auth etc. I troubled me a little to figure out what was happening around. Finally I understood that some more kernel modules are required to make it work. The culprit were “arc4 and ecb”. I added those modules. The wlan0 interface came up. Next task was to port some of the wireless utilities to busybox environment. I decided to use klcc, which klibc compiler to make it small and simple. I tried to port iwconfig first. I failed to do it since it required lots of changes to make it suit for klibc. After trying out for some days, i left it and went through new set of wireless utils called iw. After few tweaks with Makefile, I got iw compiled with klcc. But the problem is that I couldn’t make it static. I fired up ldd to check the dependencies and found that it is dependent on lib-nl (netlink lib). So in order to make it static, lib-nl is also made to be static as libnl.a. So went tweaking libnl Makefile also. Finally i got iw as static bin having huge size around 1MB. It was the first time I was encountering with iw. A funny thing happened, I found iw being very experimental so it was not working as I expected :P. I went back to iwconfig and tweaked the Makefiles to get a static version. I placed iwconfig and iwlist in /bin of initrd and executed a shell to check the wireless. Everything went fine. But when I used ifconfig to set IP or making the wireless interface up, it hangs up. I got clueless. After going through enough googleing and mailing lists, I learned that it was problem with firmware loading. Devices like wireless cards require firmware to work, when they are first used, the kernel will look for a specific location, /sys$DEVPATH/data for firmware data. It is to be made available at request time. Usually, it is handled by Linux hotplug daemon. Currently in most distros, udev is the device node creation and management backend. udev handles the firmware loading. In busybox environment, there is no udev available, so I have to manually do the firmware loading somehow. /proc/sys/kernel/hotplug can be manupulated to run a hotplug application so that, when the kernel does some requests it executes the file that is set as hotplug with some environment variables like $SUBSYSTEM,$ACTION,$FIRMWARE.
So I setup a script to handle the firmware loading to act as firmware loader.
if [ "$SUBSYSTEM/$ACTION" == "firmware/add" ]; then [ -e "/sys$DEVPATH/loading" ] || exit 1 DIR=/lib/firmware [ -e "$DIR/$FIRMWARE" ] || exit 1 echo 1 > /sys$DEVPATH/loading cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data echo 0 > /sys$DEVPATH/loading exit 0 fipassed it path to /proc/sys/kernel/hotplug
# echo /bin/hotplug > /proc/sys/kernel/hotplug
Required fimware are placed in /lib/firmware. For iwl, its iwlwifi-3945-1.ucode.
Now everything went fine. iwconfig and ifconfig tuned well and wireless connectivity is up.
I setup another machine with Pardus-2009 to act as the server. Installed NFS server.
Next thing to be done is to get connectivity from client, mount an NFS share from the server. Build the newroot and switch to it. I needed to build a small and custom version of Pardus that just requires to run an X server. Pardusman, my GSOC-2009 project came for the help. Oh. I didn’t upload any videos of Pardusman yet ? I will do it in a couple of days. Using pardusman, I built a small iso having size around 130 MB. I extracted the pardus.img squashfs and exported via NFS share. The client could now mount the share using mount -o nfs, nolock, ro 192.168.1.100:/opt/pardusroot /newroot/mnt/client. Now some of the required directories to be writable are copied from the ro filesystem. The init script is setup to handle all things. I added a little configuration parser so that init script will read a .conf file and perform the actions like wifi ip, nfs server etc.
After a couple of days of effort i could setup the minimal system with X server support. I used XDMCP to remote login. So the remote login worked pretty well. Now the client can login to a beatiful KDE 4 desktop
It wasn’t that slow as I expected through wifi. It was working considerably well. Now it does everything from the server. Now as the final task, I need to forward the sound and device discovery. Since it logs into the server, once you play some music, it plays it at server. No sound comes out of client. Similarly devices plugged in the client are not shown, it shows the storage devices from the server only. Pulse audio came to help for sound forwarding. Pulse server is an awesome sound server that can be used to reroute sound. I also added pulseaudio server to the base pardus.img. Pulseaudio is very advanced so that it can run in session mode and system wide mode. We need system wide. Enough configuration tweaks are to be done in /etc/pulseaudio/system.pa to allow the tcp via authentication over a network. In the server side, /etc/X11/ a script is added to setup the PULSE_SERVER env variable to IP address from $DISPLAY. Now the X will be started by passing the environment variable PULSE_SERVER=client_ip:port. Hence sound will be rerouted.
Next and final thing to be done was forwarding devices
~/Drives directory is created in user home directories. lbuscd and ltspfs came to help. ltspfs is a fuse extension like sshfs which and remotely mount a filesystem. lbuscd can handle a pseudo fstab so that it can listen and mount,umount devices as it comes. lbuscd is a daemon that listens to /tmp/lbus.fifo, which is a first in first out file. A udev rule is setup such that once devices like [sh]d[a-z] or [sh]d[a-z][0-9] appears their dev path is notified to another script so that it can update the fifo. The lbusd which listens to it handles the mounting and umounting. ltspfs updates the availability of devices in ~/Drives and synchronises the changes.Finally the 11MB Client is ready it boots to a full fledged KDE 4 powered desktop in a couple of minutes. I check out the free -m and found that it is taking atmost 150 MB ram usage for caching all the remote readonly filesystem.
Right now I am tweaking it more to make it lightweight. Probably using desktop like XFCE4 will scale down the memory usage to very minimal level. KDE is a heavy desktop environment.
I will push the WLTSP code to github soon.
Happy Hacking.
March 14, 2010 12:44 AM -
@paritoshZero yes, that was such a long time bk. We shifted to a proper office three years ago and now an additional one is being made in reply to paritoshZero # http://twitpic.com/188y2n – #sanisoft 2nd office shaping up well. # I follow someone because I like their blog and the next thing I notice the [...]March 13, 2010 11:00 PM
-
- There is no mathematics in relationships. It's not Give & Take. It's Give & Give. #
- PlannerX gets a bookmarklet – opens right on your Basecamp page http://goo.gl/fb/1q3t #plannerx #basecamp #bookmark #
- @_kartik Yes.. May be my over working brain too generates a lot of heat that makes hair roots weaker. You've "n" number of whites. Beware! in reply to _kartik #
- @kunalbharati Not giving up on Flex any soon! It's way too cool to give it up yet. in reply to kunalbharati #
- @rbhavesh Magnet is still largely services. Apps Magnet is products. Products have been successful. My experience building 2 dozen paid off! in reply to rbhavesh #
- Have had so many hair pulling experiences with Flash / Flex over the last decade. That explains why I have little hair left
# - Twisted. Hair pulling experience printing WYSIWYG from Flex. Need vector for high quality, text selectability. No luck yet. #
- Stock Market Secret: How much can you make in trading with 50k portfolio? – Nothing. Only Experience. http://bit.ly/aOTmI7 #
- Migrated my blog and AppsMagnet to MediaTemple cloud hosting. They load faster now. One item off my "long-pending-todo-list". #
- Migrated my blog and AppsMagnet to MediaTemple could hosting. They load faster now. #
- #activeCollab says Reports Module is most successful related product. Read our story on how we launched & success factors http://is.gd/a3AiS #
Related posts:
March 13, 2010 09:10 PM -
Testing the upcoming version of lekhonee-gnome frontend.
Status:- One can write post in the direct view mode
- Still one can edit the html by clicking the view source button
- Spell checking is only working while working with raw HTML source
- Supposed to work properly with any unicode string like কুশল দাস
The post is brought to you by lekhonee v0.8.1
March 13, 2010 05:51 PM -
Someone, who probably has no idea of what it takes to maintain a large codebase, suggested that Canonical/Ubuntu should fork Evolution. He also sensed a non-existing Microsoft conspiracy. These days we seem to hear more about conspiracies by evil corporations than about technology/user-needs ;-)
Interestingly, it has generated some replies from my engineering inspirations - NotZed and Fejj. Fejj's comments in the original post here. The reply blog post of NotZed, in his typical to-the-point-style here. (There is a section about India as well, which I found interesting to read)
For Enterprise Desktop users on Windows, Outlook is the single-most indispensable and attractive software, that slows/stops people from migrating to Linux. The reason why it has so many passionate users, is because MSFT invests a lot of people for this product development/QA. For Evolution to seamlessly replace Outlook, what it needs is not-a-fork but more-resources (people not resources like memory ;-)).
A saner and practically more useful suggestion, to Canonical, would have been, to sponsor for few programmers to work for Evolution; Just like how RedHat has increased their contribution to Evolution, in the last two years or so. Copyright assignment is a stop-energy. To make it is easier to contribute to Evolution, it is LGPL, for a while now.
There are people on Canonical who are far more business-aware than me, who will just laugh and ignore at this fork-suggestion. But this post and the replies rekindled some old memories and thus this post.
On an unrelated note, I believe IMAP4 has outlived its time. I wish to see something on the lines of reMAP to gain popularity and interest. A new, open protocol that is REST-driven, conversation-based, http-cacheable/shareable, internal-cloud-host-able etc.March 13, 2010 01:12 PM -
This blog is not dead, it’s just me who doesn’t post.
I still get an occasional thanks for a very old post and am happy that I could help someone looking desperately for an answer, like I once did.
Life has changed a bit but priorities have changed a lot, what I found curious then have become the way-it-is now and hence my attention have turned towards other things, especially those which have come new into my life. Those who know get the clue, and those who don’t I just hope that I’ll be able to come back in sometime, may be not as much as I was but better than what am.
Till then, singing off…
March 13, 2010 12:08 PM -
The new release of ExMan – 0.4.5 – is packed with shiny new features. Source code, RPMs and DEB for Ubuntu can be found at the sf.net project page.
Features added in this release are:
- Support for Formula: I’ve been looking for a simple expression evaluator which could do the purpose. I looked into KOffice source code et al, and they were all complex because they were supposed to handle such complex things. I had a pretty old expression tree evaluator C++ class which I had written when I was in college, but it was literally building a tree of expression and then evaluates it. So I had this option if I couldn’t find anything simpler and cleaner. Thanks to the dvisvgm program which is also part of the LaTeX source code, found a simple expression evaluator implemented as a Recursive Descent Parser (which I guess is the most suitable one for arithmetic expressions), and the credit goes to my friend Deepak Lukose for pointing me to dvisvgm.
Note: The grammar rules of a recursive descent parser is pretty simple and straight forward, and it is appropriate for the expression evaluation.
expr: [+|-] term {+|- term}
term: prim {*|/ prim}
prim: [ident|number|(expr)] - Status Bar: Well, it took me a while to get this incorporated, because the main window of ExMan is not a QMainWindow class, but a QWidget. And there’s no option to drag and drop a QStatusBar in QtCreator. So, just edit the exmanwindow.ui file to add the tag <widget name=”statusBar”/> inside the ExManWindow QWidget. This will make the status bar to appear in the ui design section of QtCreator, and then it can be arranged appropriately.
- What’s Next? I couldn’t find a way to make the QFrame to adjust its size automatically when the parent QWidget is resized, even though the sizePolicy is set to {Preferred, Preferred}.
Tagged: deb, hacking, linux, rpm
March 13, 2010 08:54 AM - Support for Formula: I’ve been looking for a simple expression evaluator which could do the purpose. I looked into KOffice source code et al, and they were all complex because they were supposed to handle such complex things. I had a pretty old expression tree evaluator C++ class which I had written when I was in college, but it was literally building a tree of expression and then evaluates it. So I had this option if I couldn’t find anything simpler and cleaner. Thanks to the dvisvgm program which is also part of the LaTeX source code, found a simple expression evaluator implemented as a Recursive Descent Parser (which I guess is the most suitable one for arithmetic expressions), and the credit goes to my friend Deepak Lukose for pointing me to dvisvgm.
-
आपकी हिन्दी भले ही अच्छी खासी अच्छी हो, पर लंबे व बड़े पाठों की वर्तनी पर निगाह मारने के लिए व गलत वर्तनी को पकड़ने के लिए कम्प्यूटर आधारित वर्तनी जाँच का कोई सानी नहीं है.
एमएस ऑफ़िस हिन्दी 2003 / 2007 के संस्करणों में वैसे तो हिन्दी की वर्तनी जाँच अंतर्निर्मित है, मगर वर्तनी जाँच की सुविधा हेतु प्रयुक्त हिन्दी शब्दों का डाटाबेस बेहद ही अपूर्ण क़िस्म का है (क्या कोई कम्प्यूटर आधारित हिन्दी वर्तनी जाँचक कभी परिपूर्ण बन भी सकता है? और व्याकरण जाँच?), जिससे यह आपको वर्तनी जाँच के समय हिन्दी के सही शब्दों को भी लाल रेखा से रेखांकित कर गलत बताता है और कई मर्तबा अच्छे जानकारों को भी धोखा हो जाता है. कई मर्तबा गलत सुझाव देता है (चूंकि डाटाबेस में सही शब्द शामिल ही नहीं हैं).
ऐसे में अपना स्वयं का हिन्दी शब्दकोश डाटाबेस बनाना व उसे जोड़ना बहुत ही आवश्यक व महत्वपूर्ण हो जाता है. इसके लिए सही हिन्दी शब्दों पर दायाँ क्लिक कर शब्द कोश में जोड़ें का विकल्प चुना जा सकता है. आप देखेंगे कि कुछ दिनों के प्रयोग के उपरांत आपके पास एक अच्छा खासा डाटाबेस तैयार हो जाता है. तो यदि आपके पास ऐसा अच्छा डाटाबेस है तो आपसे आग्रह है कि उसे साझा करें. कुछ दिनों पहले तकनीकी हिन्दी समूह में यह बात मुखर हुई थी और सुधी जनों ने अपने कस्टम डिक्शनरी को साझा करने का वादा भी किया था.
इसी वादे के मुताबिक मैं अपना एमएस ऑफ़िस हिन्दी 2003-2007 में काम करने वाला हिन्दी का कस्टम डिक्शनरी अपलोड कर रहा हूं, और आपको इसे अपडेट करने का तरीका भी बताता हूं.
इस डिक्शनरी (custom.dic) को आप यहाँ - http://cid-60eace63e15a752a.skydrive.live.com/self.aspx/.Public/CUSTOM.DIC से डाउनलोड करें. इसमें सामान्य प्रयोग के कोई 4 हजार शब्द हैं.
इसे नोटपैड में खोलें. देखें कि कहीं कोई गलत वर्तनी वाला शब्द तो इसमें शामिल नहीं कर लिया गया है, यदि ऐसा है तो उस शब्द को मिटा दें, या सुधार दें. अन्यथा यह आपके दस्तावेज़ के गलत शब्दों को भी ठीक बताने लगेगा.
अब आपको अपने एमएस ऑफ़िस हिन्दी के कस्टम डिक्शनरी में इस डिक्शनरी की सामग्री को जोड़ना होगा. इसके लिए आपके ऑपरेटिंग सिस्टम और ऑफ़िस के संस्करण के मुताबिक भिन्न डिरेक्ट्री में जाना हो सकता है. आमतौर पर कस्टम डिक्शनरी नाम की फ़ाइल (custom.dic) इन डिरेक्ट्री में मिल सकती है – (ध्यान दें – यूजर नाम यहाँ पर है – RaviRatlami, तो आपके कंप्यूटर के यूजर नाम भिन्न होंगे )
$\Users\RaviRatlami\AppData\Roaming\Microsoft\UProof
$\Documents and Settings\RaviRatlami\Application Data\Microsoft\Proof
आप इसके लिए विंडोज सर्च का सहारा भी ले सकते हैं. अब आप इसमें से किसी भी डिरेक्ट्री में उपलब्ध custom.dic फ़ाइल को खोलें व डाउनलोड की गई custom.dic की सामग्री को अपनी फ़ाइल के अंत में कॉपी पेस्ट कर दें, व इसे सहेज लें. ध्यान दें कि कॉपी पेस्ट करते समय पाठ एक लाइन में एक शब्द हो, अन्यथा मामला बिगड़ सकता है. इस फ़ाइल को एमएस वर्ड अपने अगले प्रयोग के समय स्वयं ही दुरुस्त कर लेगा, शब्दों को छांट लेगा व दोहरे शब्दों को निकाल बाहर करेगा. तो इस तरह से आपकी कस्टम डिक्शनरी बन गई है अब पावरफुल.
यदि आपके पास एमएस ऑफ़िस हिन्दी की बढ़िया, और बड़ी कस्टम डिक्शनरी है तो आपसे आग्रह है कि कहीं इसे अपलोड करें व हमसे साझा करें.
---
डिस्क्लेमर (अस्वीकरण) – उपर्युक्त कार्य करने से पहले अपने कार्य सहेज लें तथा अपने कार्य, डाटा व custom.dic का बैकअप बना लें.
अद्यतन: # फ़ाइल का नया संस्करण जिसमें कोई 1.2 लाख शब्द हैं, तकनीकी हिन्दी समूह में अपलोड किया गया है. इनमें निहित शब्दों में कुछ वर्तनी की गलतियाँ हो सकती हैं. फ़ाइल यहाँ से डाउनलोड करें -
http://groups.google.com/group/technical-hindi/web/CUSTOM.zip?hl=hiMarch 13, 2010 07:14 AM -
Ubuntu 10.04 is to to be released with a new brand – logo.


New Splash Screen

Read more about it here.
https://wiki.ubuntu.com/Brand
March 12, 2010 08:11 PM -

Got the OpenOffice 3.2 Deb packages for the DVD given by Linux For You Magazine.
As the OpenOffice is improving drastically in every release, I wanted to try the 3.2.
My ubuntu 9.10 has already OO 3.1Uninstalled it from Synaptic.
Copied OOo_3.2.0_LinuxIntel_install_en-GB_deb.tar.gz from thew DVD.
Extracted it.The folder has many deb files and a folder called desktop-integration
Installed all the openoffice deb files.
To create the menu entries, have to install openoffice.org3.2-debian-menus_3.2-9472_all.deb
inside the desktop-integration folder.Oh My God. It throws error.
shrinivasan@shrinivasan-laptop:~/Desktop/OOO320_m12_native_packed-1_en-GB.9483/DEBS/desktop-integration$ sudo dpkg -i openoffice.org3.2-debian-menus_3.2-9472_all.deb
sudo: unable to resolve host shrinivasan-laptop
dpkg: regarding openoffice.org3.2-debian-menus_3.2-9472_all.deb containing openoffice.org-debian-menus:
openoffice.org-common conflicts with openoffice.org-debian-menus
openoffice.org-debian-menus (version 3.2-9472) is to be installed.
dpkg: error processing openoffice.org3.2-debian-menus_3.2-9472_all.deb (–install):
conflicting packages – not installing openoffice.org-debian-menus
Errors were encountered while processing:
openoffice.org3.2-debian-menus_3.2-9472_all.debGoogled for this and found the solution.
Go back into Synaptic and remove all traces of Openoffice.org. You’re previous menu integration apparently remained and so probably conflicted with the new installation. Double check you’ve removed all traces of any installed openoffice.org base packages and try again.
Yes. Now, the package installed peacefully.
Opened the brand new OpenOffice 3.2.
hmmm. It looks good. The speed also improved.http://www.openoffice.org/dev_docs/features/3.2/ has the new features in 3.2
Reading this and testing it now.
March 12, 2010 07:29 PM -
A few days back I came to know about this project :Text Prediction on GNOME based on GTK+ Input Method context. Basically it is an input method with text prediction feature.
I had a similar project idea during 2009 May and had done some amount of coding for that. The project was to have an IBUS input method which can do letter prediction as well as word prediction. The prediction is based on ngrams. Since it is based on ibus, it works on all desktop applications. You can see the screenshots of prototype from here, here and here
The core code was ready. It was written in python and use ibus-python. Unfortunately I did not get time to spend on this project for a long time and currently this project is not there in my top priorities. Since I see many people interested in auto-completion or predictive text entry, I uploaded the code here http://github.com/santhoshtr/ibus-sulekha . It is not in a working state as of now, but I would be happy if anybody interested in taking it forward. I wrote a small documentation on algorithm here, and feel free to contact me if any help is required.
March 12, 2010 02:39 PM -
I will be speaking in a panel at the HeadStart Conference, Hyderabad today regarding what is the funding that was granted by the Govt. of India to my ex-startup, and how you can apply.
I converted the content I had prepared into for-web-only slides for your perusal:
March 12, 2010 04:30 AM -
0.7.2 “Thursdays should not be free” – 2010/03/12
This is the third of the new 0.7.x series and has new features and minor bug-fixes.Gnote is a C++ port of Tomboy. It is a desktop note-taking application, which is simple and easy to use, but with potential to help you organize the ideas and information you deal with every day.
New Features:
- 551097 – Search for phrases
- 584789 – Allow user to decide if links are updated when renaming a note
Fixes:
- 603925 – Fix boost.m4 to work with Autoconf >= 2.64
- 609864 – Fix implicit linking
Translations:
- Arabic (ar)
- Bengali India (bn_IN)
- Chinese Simplified (zh_CN)
- Czech (cs)
- German (de)
- Hindi (hi)
- Lithuanian (lt)
- Malayalam (ml)
- Oriya (or)
- Polish (pl)
- Slovenian (sl)
- Spanish (es)
- Swedish (sv)
- Telegu (te)
- Thai (th)
Thanks:
- Ankur Sinha
- Aurimas Černius
- Daniel Elstner
Download, Home Page, Support:
- http://download.gnome.org/sources/gnote/0.7/
- http://live.gnome.org/Gnote
- http://bugzilla.gnome.org/enter_bug.cgi?product=gnote
March 12, 2010 12:37 AM -
This bird is rather plain looking, it not is endangered or rare but still getting a full frame photograph was a thrill!
Pale-billed flowerpecker (Dicaeum erythrorhynchos) is a tiny bird, 8 cm long, and is one of the smallest birds occurring in most parts of southern India and Sri Lanka. It is reportedly common in the southern India but in Nagpur we get to see them seldom and that too very high up in trees, so when last week in Pench I saw this individual a few feet away I was ecstatic.
Read more about the Pale-billed Flowerpecker
Originally published at http://tariquesani.net/blog/. Please leave any comments there.
March 11, 2010 09:53 AM -
I do not know
what I shud wish for
life and You
have given all that I vied for
But as I stand with
my eyes closed and hands folded
let me convey to You the images
that have now and then occured and faded
Let my friends know me as a nice man
as somebody who picked up the phone when they gave a call
let people who think of me as foe find me more forgivable
as somebody who was just frank not harmful at all
Let my dear ones when they have to go far
not go in hatred
let them remember that before they left
"I will always love you" I had said
Let me be in a position where I can
resolve conflict and not create
put me in a condition where I can
receive anger and not retaliate
Let me earn more
than what I can spend
and let me spend less on me
and more on loved ones and friends
I welcome all the opportunities
that You provide me to serve
but do pace it well and even
cos that lets my interest preserve
I ask not for a long life
for frail body becomes dependent
I ask though for a quite and quick death
whenever it happens without pain and experiment
I wudn't have listed all these
but then You might doubt me
have a look when You will
or You can just let it be.
March 11, 2010 08:04 AM -
So I've got combat, I've got basic potions that restore health and I've got items such as weapons or shields which can affect your combat stats. Try as I might, I cannot get ncurses to give me a yellow background for some unfathomable reason. It just comes out brown no matter what. Ironically, in the next Konsole over, I have the alpine ncurses-based mua taunting me with a yellow background. I'll look in its source (yay open source!) to see how its done sometime but for now brown will have to do.
C++ is proving a joy to work with as always. Ok It's probably just me; I use it so infrequently, I keep having to relearn how to do multiple inheritance and abstract base classes each time. I am rather proud of figuring out how to access class members from a signal handler without having to look it up.
Now if I can quickly tie up some loose ends, I can spend the last two days maybe making the dungeon generation more roguelike.
March 11, 2010 07:31 AM -
I had an itch – I wished there was a simple way of deciding whether to buy a book and where to buy a book. So I created http://isbn.net.in
The initial idea I had was to make a bookmarklet that will do everything – it will figure out the unique book number (the ISBN) from the current book page (whether a publisher’s site or any ecommerce site), and then search on all the potential Indian online book stores. I then realized that you can’t fetch from other domains because of the same-domain policy of AJAX (I could’ve used YQL or something like that, but I felt it was a slippery slope).
So I had to create a web backend that will do the searching on behalf of the bookmarklet and changed the idea to simply show a jQueryUI dialog showing the sorted list of prices.
Then I chanced upon http://isbn.nu and immediately said to myself: “I want that with Indian prices”. Since I was half-way there already, it took a few additional steps of buying a good domain name and configuring to use the simple URL format they used.
There was one major problem with the bookmarklet – on sites which already have jQuery, it used to conflict, and although jQuery itself can live with multiple versions side-by-side, I could never figure out if jQueryUI was loaded properly or not. I tried various things but had to give up in vain.
Finally, I decided the pop-up overlay thing was not important, and the bookmarklet can just simply take you to the correct isbn.net.in page directly.
So the “where” part of the question was answered.
I still had to answer the “whether” part of the question – that’s when a friend told me about Amazon ECS using which I was able to get the very useful Amazon ratings. Then I was able to get the image of the cover of the book and other details.
Then I came across bookseer.com which makes great book recommendations, so I included an automatic link to that on the book page.
So, after much ado, I present http://isbn.net.in to you. All the instructions are on the homepage.
If you have any feedback, please read the disclaimers on the homepage and the About page, and then send me feedback.
Implementation was a lot of fun – I used Ruby, Sinatra, HAML, Mechanize, amazon-ecs, jQuery, Blueprint CSS. It was the first time I had really used any of these.
Disclaimer: I created isbn.net.in because I needed a tool like this. This has nothing to do whatsoever with my employer. It is just a personal side-project.
Update: The site was down for a few minutes because I had to add caching to overcome the traffic
March 11, 2010 02:37 AM -
This post is as much as a tip as a demonstration on how beautifully simple it is to "look-neath-the-hood" when working with linux. This is the reason why linux programmers are happy programmers. Anyways, on with the details.
If you have ever seen errors like ...
error while loading shared libraries: foo.so: cannot load shared object file: No such file or directory
when you know that foo.so exists, or have see something like ....or
java.lang.UnsatisfiedLinkError: no foobar in shared library path
java.lang.UnsatisfiedLinkError: /some/module/soandso.so: libstdc++.so.6: cannot handle TLS data
you may use the LD_DEBUG feature to zoom-in on the problem.
The linux loader (/lib/ld-<version>.so) looks at the environment variable "LD_DEBUG" to print out interesting debug information as it loads libraries and resolves symbols. What exactly is printed out depends on the value that the variable is set to. You may get the list of valid values by setting LD_DEBUG=help. For example:
$ LD_DEBUG=help ls
Valid options for the LD_DEBUG environment variable are:
libs display library search paths
reloc display relocation processing
files display progress for input file
symbols display symbol table processing
bindings display information about symbol binding
versions display version dependencies
all all previous options combined
statistics display relocation statistics
unused determined unused DSOs
help display this help message and exit
To direct the debugging output into a file instead of standard output
a filename can be specified using the LD_DEBUG_OUTPUT environment variable.
What you make of this info. and how much it helps depends on the specific problems you are facing but all in all this is a useful thing to know when you are facing ^library issues^. More detailed information about working/writing libraries on linux is available at the Program Library HOWTOMarch 10, 2010 10:11 PM -
Well, I'm back to posting. Hopefully, I shall continue this. The next few posts, I plan on jotting down all the little tweaks and configuration changes I make after every linux install that I do. The first of these is adding the mount option 'noatime'.
To understand this, you need to first understand what 'atime' means. Traditional unix filesystems keep track of three 'time' attributes for every file on the system. These are:mtime - The modification time (The time the file was last modified, duh!)
These attributes (along with others) can be viewed using the command "stat <filename>". Among these three, having the system maintain the 'atime' attribute is by far the least useful.
atime - The access time (The time the file was last accessed)
ctime - The change time (The time the inode of the file was last changed)
Most applications that care about access times prefer to use the 'inotify' mechanism, instead of repeatedly polling the file. So, in other words, the system maintains a record that hardly anyone would look at. That, by itself, is not such a bad thing, however, if you consider the fact that the system has to write to the file's inode every time the file is accessed ! you'd agree that having the 'atime' record is not only useless but also quite expensive.
So, how do you stop the system from doing this ? Well, use the 'noatime' option:- Edit the file '/etc/fstab'
- Add the option 'noatime', separated with a comma, to the fourth field of every disk based filesystem entry
- Save the file and reboot (or remount all the filesystems corresponding to the modified entries (using the command: mount -o remount ))
I always knew it made a difference, I just never did realize, nor care to measure how much of a difference ! Well. now I know, so do you. Thanks for reading.March 10, 2010 10:11 PM -
I've been a vim user for a long time. I've always liked vim, because the modal interface fits my brain and the keybindings, my wrists (which never really liked emacs).
Now, although I have used vim for a long time, I often tend to use a small subset of the power that this awesome editor offers.
I would like to say that this is because "what I know, is all that I need to know", but the simple truth is it's because I am too lazy to read the docs.
That said, I *do* sometimes feel the urge to become more productive, which leads me to invest time into really understanding my basic tools (vim, firefox, thunderbird, pidgin, windowmaker, aterm/xterm/rxvt).
Today, I decided it was going to be vim. Here's what I learned:- Since version 7.0, vim has a builtin spell checker (":help spell"; I was using the vimspell plugin all this while).
- The '-x' option [1] ! Look it up !
- vimgrep (":help vimgrep")
Note that I'm not explaining any of these. This is more like a quick-n-dirty, see-and-do, reference. So, I'd suggest open up a decently large text file (something with more lines than your window size) and try out what's listed. If you like what you see, the vim doc is beautiful, just pull out the help topic mentioned to learn more.
Note also that most of these refer to 'command' mode, ie: You need to press 'Esc' before trying any of these out.- visual mode (":help visual") - Not spectacular, if you already know about it. If you don't, do a 'v' and move around the text, yank-n-paste, you'll get the idea.
- visual-block (":help visual-block) - Now, this one, I've seen a lot of 'old' unix guys didn't know about (which is a bit strange). Anyways, do a 'Ctrl-v' and move a couple of characters left/right and then up/down, yank-n-paste, you'll get the idea .....neat huh ??
- folding (":help fold"). In visual mode, select a few lines, do a 'zf'. To open, do a 'space' or 'zo' on the fold.
- Editing an entire block - Using a visual-block, select a set of lines. Now, without pressing Esc, try some editing commands, like type in 'I' followed by #. Now, press Esc.
- Inserting special characters in your search-and-replace patterns: An example is best for this one. Do this:
Create a file with the contents:
<HTML><HEAD><TITLE>42</TITLE></HEAD><BODY>The answer is</BODY></HTML>
Do a ":1,$ s/></>Ctrl-v+Enter</g"
See what I mean ?
Maybe, I'll post about vim again later. Till then though, here's something that you could possibly use -- My vim files. Just untar, rename the contents correctly (ie: mv {dot_,.}virc && mv {dot_,.}vim) and copy them to you $HOME. The .vimrc is written from scratch and mostly well commented.
Thanks for reading.
[1] wtf !! ...and I've been breaking my head over getting an nice, easy to use and small tool for storing sensitive stuff (like account numbers, login/passwords, etc) and was left unsatisfied with all the fancy GUI tools and the CLI one's I'd have to install separately on each new system)
UPDATE: The default encryption algorithm used for the -x option is breakable. It is the same as that which Pkzip uses (and has documented). So, -x is probably not a good idea for ultra sensitive stuff, but good enough and convenient enough for short lived files which don't need high level of security. For proper encryption support in vim, I would recommend using Noah Spurrier's OpenSSL vim plugin. . (Now included in the vim files link above).March 10, 2010 10:11 PM






