The Lumber Room

"Consign them to dust and damp by way of preserving them"

Posts Tagged ‘software

A better keyboard layout for typing IAST on Mac OS X (based on EasyUnicode)

with 5 comments

To type IAST (English letters with diacritics, for Sanskrit transliteration) on Mac OS X, perhaps the easiest way, rather than to use transliteration tools, is to get a keyboard layout that does it. Just to be clear, this is the alphabet we want:

a ā i ī u ū ṛ ṝ ḷ ḹ e ai o au ṃ ḥ
k kh g gh ṅ
c ch j j ñ
ṭ ṭh ḍ ḍh ṇ
t t d dh n
p ph b bh m
y r l v ś ṣ s h

In other words, the special characters needed are:

  • Letters with macron above: ā ī ū ṝ ḹ plus it may be occasionally useful to have ē and ō as well
  • Letters with dot below: ṭ ḍ ṇ ṣ (the retroflex consonants), also the vowels ṛ ṝ ḷ ḹ, plus ṃ and ḥ (anusvāra)
  • Letters with other marks above: ṅ ñ ś

There is a keyboard layout that does this: It’s called “EasyUnicode”, created by Toshiya Unebe (Nagoya University), and is documented at http://ebmp.org/p_easyunicode.php (“EasyUnicode version 5″ it says) (PDF version), and you can download it from http://www.ebmp.org/p_dwnlds.php (EBMP) (=Early Buddhist Manuscripts Project, University of Washington) or also http://www.palitext.com/subpages/PC_Unicode.htm “Pali Fonts for PC and Unicode”. (Page in Japanese.)

This keyboard layout is just like the usual (US English) layout ordinarily, but when you hold down the Alt (Option) key and press a, you get ā, similarly Option+s gives ś, Option+n gives ñ and Option+g gives ṅ, etc. The full mapping is available along with other documentation in the download above.

This is very convenient. One issue with the layout is that also overrides a lot of keys for no apparent reason (Ctrl-A / Ctrl-E etc. stopped working for me), so I got Ukelele from SIL, and wrote my own keyboard layout. I’ve called it EasyIAST, and it is available here for now. I plan to add a README etc. and distribute it in some proper way later; for now you can use the instructions from EasyUnicode above. If you find it useful and/or make any improvements, please let me know as well.

If some time is available, it would be good to make a Devanagari keyboard layout along the same lines.

Written by S

Tue, 2013-01-22 at 11:28:55 +05:30

Posted in sanskrit

Tagged with , ,

A history of Microsoft Word, and an insight into the Microsoft outlook

with 2 comments

(Ok, couldn’t resist adding the accidental pun to the title.)

Fascinating article from 2004, from a Microsoft employee.

I plan to revisit this post and clean it up (as always?), but here are some interesting quotes:

After a year of distrusting the company somewhat, I began to gain an appreciation of how Microsoft worked, and to see it for what it was – a machine that was focused on building products that people wanted, as quickly and as well as they could. Note the “quickly” – this was what distinguished MS from Apple in the end – a focus on moving quickly, and beating the competition. Details like great design were simply not critical to most (business) customers, so that sort of thing didn’t really make it into most products, except where it mattered to the target customer. It’s hard to fault this logic really – it is pure efficiency from a business perspective…

This is illustrative of the Microsoft outlook on doing business: great design is a “detail”; the main goal is to beat the competition and gain market share.

Both Microsoft and Apple have very smart people as employees. The goal at Microsoft is to grab as much share as possible, even at the cost of shoddily designed software if necessary. The goal at Apple is to design software that is simple yet powerful, and a pleasure to use. And both have been phenomenally successful at what they want to do.

The Microsoft approach is to get a release out of the door, see what the main reasons people have for not using it (not necessarily what people most complain about), throw patches (or wizards!) to get those issues across the level of acceptability, add new things, move on, keep moving — the appropriate scenario is not software design, it is war: it is all Fire And Motion.

So, that in a nutshell is the Microsoft method. Understand the market, and the customers, and then go pedal to the metal, with release after release focused on what the customers need, incorporating their feedback. That puts the competition into reaction mode. And of course it helps if they also make a strategic error because they are under so much pressure.

And how successful they have been. Even creating markets where there none.

“I think there is a world market for maybe five computers”
– Misattributed to Thomas J Watson, IBM president, 1943.

No one can disagree that Microsoft has had a bigger role in bringing computers to the masses than anyone else. Perhaps it would have been better if they hadn’t.

Another point is that it shows (again!) (twice!) that it is a really stupid idea to throw away all your code and start over.

Written by S

Sat, 2008-03-29 at 04:18:26 +05:30

Posted in Uncategorized

Tagged with , ,

Web phrase occurrences

with 3 comments

Quick post while I get back to work. Someone please help me here…

There are two things I mainly use Google for:

  1. Searching for pages related to a particular something. This is the most common, and intended, use of Google.
  2. Searching for all occurrences of a particular phrase, or more generally a pattern. This might be to compare numbers and compile statistics, or to find what context the phrase is most often used in, or find what are the most common phrases using that pattern.

For example, I just thought of the “My dad can beat up your dad” phrase, and searched Google for “my * can beat up your *”. (Click on link, and see results for yourselves.)

Someone should already have developed a tool/library for using Google (or any other search tool) for doing this, right? Why haven’t I found it yet? Maybe I should contact the “X is the new Y” people… Tell me if you’ve found such a tool.

——————————————

X is the new Y:
Original(?) diagram,
Updates, Updates on updates,
Wikipedia.

Written by S

Sun, 2008-02-17 at 15:51:48 +05:30

Auto-save

with one comment

Good software does what you want. Preferably without your having to tell it to. And it matches your mental model of what you expect things to work like.

We have come a long way since the days personal computers were severely constrained in their resources, but some traditions have not changed. The humanized weblog looks at the save icon, but I want to point out that the “saving” “feature” is itself an anachronism. There is no analogue of the concept of “saving” a file in the real world; when you write on a sheet of paper the change is permanent. Why, then, does most software require you to explicitly “save” something if you want to leave it permanent? The answer, I guess, is that a long time ago, a “save” was an expensive action (I remember seeing “Saving…” progress bars), so you wanted users to be in control of when it happened, so as to not annoy them.

Today, personal computers have enough resources that in many applications (such as text editing), there is really no reason for software to insist that you remember to “save”, so as to not lose your work. Still, programs continue behaving this way, partly out of tradition, and partly because no one gives a thought to usability.

Fortunately, the rise of applications on the web brought with it an “everything old is new again” phenomenon and programmers began to take a fresh (and naive) look at everything, which, while often causing them to stupidly repeat the mistakes of desktop programs from decades ago and generally be inconsistent, has also allowed them to throw away meaningless traditions in situations where they don’t matter.

I believe it was Gmail which started this, and now Gmail, Blogger, WordPress, Google Docs, and any number of online text editing applications now “automatically save” your work for you every few seconds, and this idea is finally (slowly) taking hold in desktop applications as well.

Written by S

Tue, 2008-01-22 at 21:42:25 +05:30

Posted in Uncategorized

Tagged with , ,

Goodbye Adium: Pidgin on Mac OS X… with native GTK!

with 98 comments

So you’re on Mac OS X, and want to use Pidgin on it.

First: Why not use Adium? Adium is a Free multi-protocol IM client for Mac OS X that uses libpurple, the IM library that was developed as part of Pidgin. It has several popular features such as message styles, and uses the Cocoa API native to Mac OS X, and all round looks pretty. Being a native Cocoa application, it is more well-integrated with the Mac desktop than a GTK-using application like Pidgin can ever be.

On the other hand, if you, like me, have tried Adium and have reasons for finding it unusable, then it is possible to install Pidgin on OS X too. There are two ways of doing this:
[Edit: Note that this post is from 2007. Probably a lot has changed since then.]

  1. Install Pidgin to run inside X11. Any default distribution of Pidgin should build fine on this, as long as you have all the dependencies installed. However, using an X11 app on OS X is really like entering another universe entirely… it’s like having two entirely disjoint OSes that just happen to run simultaneously. It is cumbersome, and I would not recommend it unless you are already doing much of your work inside X11 for some reason.
  2. Install Pidgin to run on the Mac desktop directly (without X11), using native GTK+ for Mac OS X and some minor modifications to Pidgin. This is very simple to do and requires only one step, described below.

Pidgin welcome dialogAdding an account

Instructions:

Read the rest of this entry »

Written by S

Fri, 2007-12-07 at 07:57:07 +05:30

Posted in compknow

Tagged with , , , , , , ,

Gmail has IMAP!

with 3 comments

Finally. Many thought this would never happen.

And just like Free software usually, it seems to be the handiwork of someone scratching an itch.

Notes:

  • IMAP folders are Gmail labels. Gmail labels show up as folders in your client, and moving a message to a folder in your client simply adds that label in Gmail.
  • In particular, be careful creating folders, and avoid making a mess. Try reusing the default Gmail labels: Set your client’s drafts folder to “[Gmail]/Drafts”.
  • Messages with multiple labels appear in each of those folders. So there is some duplication at the client end, of course, but this is unavoidable; the price you pay for forcing a tagging philosophy on software that has different beliefs.
  • Conversely, if you want to apply multiple labels to a message through your client, you can use the “poor man’s tagging” that has always been possible — copy the message to each of those folders.
  • If you delete a message from a “folder” (other than “[Gmail]/Trash” and “[Gmail]/Spam”), Gmail only removes that label. It is still present in “All Mail”. To actually delete, move to “[Gmail]/Trash”. What happens if you delete email from “All mail”?
  • Recommended IMAP client settings: Don’t save sent messages on the server; any mail sent through gmail’s smtp is automatically copied to “[Gmail]/Sent Mail” folder.
  • In general, actions sync neatly; see the full table.
  • IMAP and POP work with messages, so if you move only one message from a thread to a folder, only that one will get that label, but the Gmail web interface will show the entire conversation with that label. Note that this is only a display thing — it’s not that opening Gmail will give all the messages the label, and when you reopen your client suddenly things are different. (I need to actually check this.)
  • You still have Gmail’s amazing server-side spam filtering.
  • Some things don’t work.
  • Some other things are alleged not to work that I don’t even understand
  • Everything.

They got everything in order, made all those pages, and turned on IMAP without making any advance announcement…

Written by S

Fri, 2007-10-26 at 04:29:14 +05:30

Pidgin “now playing” plugins: updating status messages to song being played

with 59 comments

Plugins for Pidgin (the IM client formerly known as Gaim) that update the status message to show the currently playing track, somehow getting it from your music player. Found so far, in what I think is the descending order of something no particular order:
[Note: Before you install any of these, you should be aware that most of them have been known to crash Pidgin rather frequently, and ask yourself whether it is worth it. Your friends really don't care what you're listening to. Really.]

  • D-Bus script by Pidgin developer: works with Rhythmbox and Quod Libet. Will almost certainly not cause a crash. If you are on a Unix system and using one of these two music players, just run “python [name of script]” while Pidgin is running. If you’re on Windows… it’s not so easy. (And you’re probably using different music players anyway.)
  • musictracker

    MusicTracker is a plugin for Pidgin (previously known as Gaim) which displays the music track currently playing in the status message of various accounts such as AIM, Yahoo, MSN, Gtalk (Jabber), etc., i.e. any protocol Pidgin supports custom statuses on. Support for a wide range of audio players on both Windows and Linux platforms is planned. Currently supported players: Amarok, Rhythmbox, Audacious, XMMS, MPC/MPD, Exaile, Banshee, Quod Libet on Linux. Winamp, Windows Media Player (9+), iTunes, Foobar2000 (incomplete support) on Windows.

    Is apparently the best option, but also a very frequent cause of crashes.

  • Pidgin-currenttrack

    Current Track plugin will update your Gaim/Pidgin user info, available message or away message, and buddy icon from iTunes, Winamp, RealPlayer, WMP, Musicmatch, MediaMonkey, XMPlay, Yahoo! & Foobar2000 in Windows and XMMS, Rhythmbox, & Amarok in Linux.

    Has been known to crash Pidgin. I’ve heard it has a feature where you can type “/currentrack” in a conversation window to send your current track, which is pretty cool. Not very useful if it crashes Pidgin though, is it?

  • Pidgin Now Playing

    This plugin will replace %now-playing in your status message with metadata from the currently playing song in a MPRIS compatible media player (currently including BMPx 0.4, VLC SVN trunk, Audacious 1.4.0 devel), if any.

    It appears that MPRIS is an informal standard for music players to support a common interface. In an ideal world, all music players would support this standard, and in the real world, this may or may not happen. Amarok is also probably supported already.

  • MusicInfo

    MusicInfo is a plugin for the Pidgin instant messaging client. It lets you display the music that you are listening to in your away message, available message, and profile.

    For Winamp, and some players that have a Winamp emulation mode.

  • Autoprofile

    AutoProfile is an extension to Gaim that allows users to create customized away messages and profiles using dynamic “components” that automatically update on a regular basis. Generated text can include song names from XMMS/Winamp/iTunes, fortune quotes, computer uptime, the contents of a Web page or a text file, the output of a program, and timestamps.

    Is for Gaim 2.0.0beta3, not updated for Pidgin as of 2007-11-11 (last updated 2006-04-05, so don’t hold your breath).

  • AmarokPidgin

    A plugin for Amarok that updates your Pidgin status message with what you are currently listening too.[sic]

    Is for Amarok only.

  • Pidgin-Rhythmbox

    The Pidgin-Rhythmbox plugin will automatically update your Pidgin user info and status message with the currently playing music in Rhythmbox. If the artist and title are known, it will also attempt to create a link to the song’s lyrics by using Google’s “I’m Feeling Lucky” feature. Pidgin-Rhythmbox will replace %rb in your user info and status message with the song information.

    Is for Rhythmbox only.

  • Write your own script. You can set status from the command line with purple-remote "setstatus?status=whatever&message=whatever". For example, purple-remote "setstatus?status=available&message=" will clear the status message. You can also use D-Bus. There is a very good introduction to D-Bus here, and Ars Technica has some examples of using Pidgin’s D-Bus interface. This is essentially what many of the above plugins do (those that don’t crash your Pidgin). Assuming that you have a way of getting the song (or whatever string you want in your status message) somehow (through D-Bus, maybe) in a script, this is certainly the most flexible option, as you can do exactly what you want with the status message (append to it v/s replace it, add the current time, artist but not title, whatever). You can also look at D-Bus Howto for Pidgin (who wrote that? :), but the harder part is getting the current song from your music player.

Note: While MusicTracker seems to be the plugin that the maximum number of people have been successful in using, it appears that it sometimes crashes Pidgin as well (especially on non-ASCII characters in the title/artist). Evidently, no plugin is perfect (except one that you write yourself :P) and you should take a moment to consider whether you really need a plugin of this sort. I know it seems cool and several IM clients provide a feature like this, but is it really necessary? Do your friends really care what music you’re listening to?

Written by S

Sun, 2007-05-20 at 21:19:06 +05:30

Debian/Ubuntu: Find out which packages are taking the most space

leave a comment »

There is a package called debian-goodies (that’s what it’s called on Ubuntu as well :-)) which has this utility called dpigs — for telling you which packages are “pigging out” on your system. (So install it with sudo apt-get install debian-goodies, and then run dpigs). This and other utilities, from the description:

 debget       - Fetch a .deb for a package in APT's database
 dpigs        - Show which installed packages occupy the most space
 debman       - Easily view man pages from a binary .deb without extracting
 checkrestart - Help to find and restart processes which are using old
                versions of upgraded files (such as libraries)
 popbugs      - Display a customized release-critical bug list based on
                packages you use (using popularity-contest data)

Nice.

Written by S

Tue, 2007-02-06 at 02:20:17 +05:30

Posted in compknow

Tagged with , ,

Using Emacsclient

with 10 comments

Emacsclient, essentially, says “use a running emacs”. With it, you can have only copy of Emacs running, and every time you need to edit something, you can call “emacsclient filename” to use the existing instance of Emacs without having to wait several seconds for a new one to start. To use it, simply put (server-start) in ~/.emacs, or type M-x server-start from within Emacs.

There are two (minor, irritating) problems with it, though:

  1. When you are done with a file, you have to close it by hitting C-x #. Closing it normally (hitting C-x k, or exiting Emacs) brings up an annoying
    Buffer `buffername' still has clients; kill it?

    message. The rationale for this is in server.el:

    ;; Ask before killing a server buffer.
    ;; It was suggested to release its client instead,
    ;; but I think that is dangerous--the client would proceed
    ;; using whatever is on disk in that file. -- rms.

    I don’t see what’s dangerous about that, but then again, I’m not RMS! …
    One could put something like (global-set-key (kbd "C-x C-k") 'server-edit) to replace C-x # by an easier keystroke, but I found a better solution to be to remove the thing altogether, assuming that you’re going to be careful against whatever it is that is dangerous:

    (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function)

    Remember to put this after the (server-start) line in .emacs (If you’re doing M-x server-start manually, you’ll have to call the above remove-hook manually too.) After doing this, you can simply save and close the buffer as usual (or even quit Emacs), and everything will work fine — you won’t get the annoying message any more.

  2. The second problem is that when you call emacsclient from a shell, although the file gets loaded in Emacs, the Emacs window rarely pops up, at least on GNOME and KDE (and, on hearsay, OS X as well). It was suggested to put (add-hook 'server-switch-hook 'raise-frame) somewhere, but that doesn’t work either. (In KDE, it only flashes the Emacs window in the task bar, but that is better than nothing, as Ctrl-Alt-A is KDE’s shortcut for “Activate window demanding attention”.)
    At least it appears that people arewere discussing it of late, in a gnu.emacs.help thread “raise frame no go”, and related discussions here, and also a GNOME bug here. These discussions are specific to Metacity (GNOME’s default WM), but it also doesn’t work on KDE and Cygwin.

Oh, and if you’re on OS X, you can turn emacsclient into a .app with Platypus. (Although you probably don’t really need it…)

Update: Emacsclient just got a lot more friendly. You no longer have to go find where the original emacs “server” was started — you can simply start up a new frame for your new buffer, wherever you want (all such Emacs “instances” share the same buffers). This makes the second problem above entirely irrelevant. (It seems to be an Emacs tradition to give up on fixing things that don’t work and implement something better instead :P) Read more about it.

Written by S

Sat, 2007-01-06 at 17:07:57 +05:30

Posted in Uncategorized

Tagged with , , ,

The pefect (non-)markup solution

with 4 comments

(This
I just found something that’s amazing in its simplicity, and yet neatly solves a problem. Maybe you’ve sometimes wondered how to markup your email (perhaps in cases where you want the same text to be reusable) and yet retain its readability. (I have a friend who sometimes writes email in TEX markup, which is just incredibly wrong and annoying.) There is a solution that is as close to perfect as imaginable: Markdown. Its Basics page was itself written in Markdown. The syntax is perfectly readable; it is available on Ubuntu and Debian, and can even be generated from HTML, in case one wants to go in the other direction. It even has a Wikipedia article, and (even without looking!) I’m sure it’s the best “lightweight markup language” there is. There seems to be a markdown mode for Vim, but no “standard” mode for Emacs yet. (But with such good and readable syntax, who needs an Emacs mode, anyway?) There is a comparison here. There are converters from MarkDown to other formats (such as LaTeX), see Pandoc (written in Haskell!) and MultiMarkdown.

Another thing that looks impressive (and even more useful, because it is well-integrated into Emacs) is Emacs Muse, can be published to a lot of formats, including DocBook and LaTeX. Documentation here, and someone’s personal notes here.
I haven’t tried either of them yet.

[Update] Emacs Muse is nice, but it’s really not polished enough yet. (Either that, or if it’s not going to change then I don’t like it.) There are no nested lists yet. (It does now.) Markdown says

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email.

That doesn’t seem to be Emacs Muse’s “overriding design goal” to me (I need to figure out why I feel so, but somehow the syntax feels kludgy and seems to have many bad corner cases).
As I see it, the most powerful and compelling features of Emacs Muse are

  1. The entire publishing system, where you can take a document and publish to multiple formats based on syntax translation rules, keeping a daily journal, etc. (planner-el depends on Emacs Muse for some of its functionality.)
  2. Its integration with Emacs

Frankly, IMHO, the actual markup language is not one of its greatest features, and it would be great if they used — or allowed plugging in — other existing languages.

(Update-update: This does seem to be the idea, or at least was at some point of time. See this thread, which contains a file that provides some MarkDown support in Muse.)
[End update.]

Written by S

Sun, 2006-11-05 at 21:18:55 +05:30

ssh-keygen as another user

with 4 comments

To set up an ssh-key usually, type
ssh-keygen -t rsa, hit [Enter] a few times, type
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys, and add entries from other places where you might have created a key, to the same authorized_keys.

To set it up so you can log in as another user (called, say, user2)
ssh-keygen -t rsa
Enter a different file to save (id_for_user2, say), and blank passphrase.
Now add the contents of the file id_for_user2.pub to user2‘s ~/.ssh/authorized_keys file.

Oh, and when you want to login as that user, you will have to specify that you want to use that file, like
ssh -i ~/.ssh/id_for_user2 user2@hostname. For long commands like this, it’s best to make an alias (put alias sshasuser2='ssh -i ~/.ssh/id_for_user2 user2@localhost' in your ~/.bashrc if all you want is a password-less replacement for su - user2). You can also give the id_for_user2 file to others, and they can also login as user2 without a password simply by typing the command above.

Got it from this linux.debian.user newsgroup post.

Written by S

Thu, 2005-11-17 at 13:01:00 +05:30

Gnome File Selector

leave a comment »

Although there is no indication anywhere, one can actually start typing, and a box will appear to accept your input. This is incredibly unintuitive, but who’s to argue with the folks at GNOME? (Actually, even Gaim has this “feature”—start typing in the buddy list window to see it. So it could be a GTK+ thing, and not a GNOME thing…)

There are actually two places that take input:

  • The one that pops up when you start typing the name of a directory, say. This is at the bottom-right corner, and isn’t very good. No autocompletion.
  • There’s another one, that pops up when you type Ctrl+l (that’s l for location) or when you start typing with a /. This one has autocompletion, but works a bit weirdly: it interprets each keystroke as occurring after the completion (so if you start typing /etc, it will go into /etc after the ‘e’, then look for files beginning with ‘/etc/t’). Another problem is that it’s not done until you actually type the whole thing. For instance, to open /usr/bin/emacs, it is not enough to type “/u[sr/]b[in/]em[acs]{RET}” — that makes it look for “/usr/bin/em”. You can’t type “/u[sr/]b[in/]em[acs]a…” either: those files don’t exist. The only thing you can do is “/u[sr/]b[in/]em[acs]{Backspace}s{RET}”. Very weird. And if the file you want is inside the home directory, it can be got with “/{Backspace}~/…”.

Also, when “/bin/” or “/usr/bin” has too many files, opening one of them can take quite a long time. A “solution” is to have a separate directory (like “/usr/freqbin”) that contains links to all the programs that one might want to use to open things downloaded from the net (because the File Selector is encountered mostly when using Firefox).

2007-10-26: At some point, it started accepting “~” too, so you don’t have to do “/{Backspace}~” now. The rest of the mess is still there.

Written by S

Sun, 2005-11-06 at 17:03:00 +05:30

Follow

Get every new post delivered to your Inbox.

Join 67 other followers