|
About Andrew Choi
MIDI Programs
MIDI File Player (External Device)
MIDI Destination Pop-Up Button
Other Programs Cocoa Sample Programs Syntax Coloring Using Flex Algorithms Jazz Chord Analysis as Optimization
|
A blog where I will write mostly about programming in Cocoa and CoreMIDI, and experiences from my ports of Emacs and XEmacs to the Mac OS.
Yesterday's exercise on handling Big-5 files was a prelude to today's tool Q2AIM: one that generates an input file for OS X's IM Plugin Converter from a Emacs/Quail input method. This tool makes all Emacs Big-5 input methods available to any application on OS X! Then drop the file jyut6-ping3-b5.el onto Q2AIM to generate jyut6-ping3-b5, which is then dropped onto IM Plugin Converter, which is found in /Applications/Utilities/Asia Text Extras/. Then put the generated file jyut6-ping3-b5.dat in ~/Library/ChineseInputMethodPlug-in. That's it!There are still some glitches with punctuation marks and it will require a little work to make the program work for other Quail files and other encodings. But the basic mechanisms are all there. After working on this program, I must say I prefer C++'s strings a lot over NSString. The services provided by NSScanner are really rudimentary! Unfortunately wstring and friends aren't supported on gcc 3.3 on OS X and can't be used. Oh well.
Just a picture of the larkspurs I planted last week:
and one of a clematis integrifolia Durandii I planted today:
I actually planted it twice: I planted it, then found out it did go in deep enough and had to dig it out :-).
Every one has a different idea of how Chinese should be input to the computer. Because it is so easy to «invent» them, there are literally hundreds of Chinese input methods to choose from. Typing phonetically is most natural for me because I find it difficult to compose a message and at the same time think about how the characters should be written. I need to type in Cantonese because that's my native Chinese dialect. Even when this has been decided, there exist Cantonese input methods corresponding to different romanizations. Wouldn't it be nice if the input method romanizes exactly in the most natural way for me? That's why I wrote a Emacs Lisp program for generating a Emacs input method for which you can customize the romanization. It also puts more frequently used characters earlier in the selection lists according to a frequency table.
To generate your own input method, grab my program
After a short time the file
(setq load-path (cons "~/Library/Emacs" load-path))
Then the input method
To customize the romanization, edit the definitions of
Pretty neat huh? Note that unlike the other programs I've posted (which are in Perl Artistic License), this one is under GPL. Why? Well, it's a Emacs thing.
Why do I write programs? Because I feel the need to, like writers need to write, like musicians need to compose. When I create beautiful programs, I feel fulfilled; I feel a little closer to Perfection. If I sound fanatic, I probably am. I told the door-to-door evangelists about beautiful programs when they ask me what my beliefs are. I think I scared them a little :-).
My iris order arrived on Saturday. So I spent a bit of time sorting them out and looking up their colors and sizes again so I can decide where to put them.
I should plant them soon so they can have more time to take root before winter comes. I planted some irises last year and they bloomed very nicely in spring. My favorite are these standard dwarf bearded ones called chubby cheeks:
Well, let's talk programming. In between playing with iris rhizomes, I wrote this postscript file viewer (also with Perl Artistic License). It was really quite easy because PSViewer calls Ghostscript to convert a postscript file into PDF, which is a native format of AppKit. The sample program PDFView helps a little, although it needs to be changed into a document-based application and scrolling needs to be added. This post and this other post on macosx-dev show how to display second and subsequent pages correctly. Then I added scaling, using an idea from this O'Reilly tutorial.
|
Lists
Less-Known Facts About Emacs
Chinese Restaurants in Calgary
Calgary/Banff Tourist Attractions
Top-10 Reason I Stopped Working on Emacs
Misc
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2003, 2004, 2005 Andrew Choi (Contact Information). | Created with FCBlog |