每特17劃

及時當勉勵 2004/06/07

Iterm’s work — 2005-03-30

Iterm’s work

昨天弄到半夜二點, 終於能在iterm上顯示iiimcf的輸入結果. 感謝 jserv和 thhsieh 的熱心, 跟他們聊的過程中, 得到了很多的建議和提示. Anyway, 是值得紀念的日子.

Yesterday I worked till 02:00, and finally let the iterm display the input result of iiimcf. Thanks jserv’s and thhsieh’s help. I got a lot of hints and advice from the conversation with them. Anyway, this is a memorial day.

https://imgur.com/FHqfZD3

第一個考驗 — 2005-03-26

第一個考驗

時間差不多了, 準備出發往中壢. 這次投靠的經驗不同以往, 自己一個人拿鑰匙去投宿. 坐沒試過的中壢客運. 考沒有考過的考題. 我能有什麼樣的表現呢?

說實在的, 沒什麼好怕的. 只是要出發的時候, 總讓我回憶起一種漫離的感覺. 就好像環島和德國行時一樣. 是一種叫作旅行的感覺.

Gaim-Blogger —

Gaim-Blogger

gaim-blogger is a gaim’s plugin to blogging directly via Gaim. It’s really funny and creative. 🙂 The idea might become a killer feature. Imagine that if we could read, write, and notify not only blogs but also RSS/ATOM seeds, the latency to open a blog-viewer will be reduced and the instantaneity will be improved. Gaim and its plugins are great, isn’t it. 🙂

gaim-blogger是一個gaim上的外掛程式, 他能讓你透過Gaim的即時傳訊來blogging. 真是有趣又有創意:-) 這個特色有可能可以擴展成一個殺手級的應用. 想像一下, 如果我們不只能讀,寫,提示blogs,還能應用到RSS/ATOM的發佈上, 那麼開blog-viewer的時間就被省下, 即時性也更好. 想想, Gaim跟一堆plugins真是了不起, 不是嗎 🙂

Extended keyborad event. — 2005-03-18

Extended keyborad event.

ASCII只有定義128個鍵, 而一個"char"有一個byte=8 bit的定義空間. 還有128個鍵可以由程式設計師自定義. 比如說, 你需要在程式裡補捉"Ctrl-Space", "Ctrl-Shift"…等. 你可以適當地擴充鍵盤對映(keymaps)使鍵盤的事件可以收在一個"char"可以定義的範圍, 而不用處理低階的"keycode". 相關的資訊可以參照"man keymaps", 也是常用的表頭檔. 在iterm, zhcon,…等一類的程式也都有很棒的範例在裡頭.

我之前對這些不是很熟悉, 所以花了很多時間在上面. 結果到最後才發現, 我想要改的程式裡, 已經作好了相關的部份. 所以, 在作任何事之前, 一定要先完全了解整個相關的程式碼. 才不致於繞了一圈又回到原點.

ASCII defines only 128 elements, and a "char" has 1 byte= 8 bit. There are another 128 entry that can be defined by programmers. If your programs need to catch some keyevent such as "Ctrl-Space" , "Ctrl-Shift",…etc,you can properly extend the keymap, and avoid these lowlevel keycodes handling. Relative information can be obtained by "man keymaps". are often included. Some programs like iterm, zhcon,…etc, also have excellent codes about it.

I am not familiar to this before, so I spent lot of time on it. But I finally find the program which I want to improve has implemented it~~ So, always be sure to completely understand what you are going to do first, and start to do it.

about the console keyboard — 2005-03-16

about the console keyboard

在console上有三種主要的鍵盤呈現, 分別是: scancode( raw code), keycode, keychar. scancode就是硬體所送出的數位訊息, 隨pc, mac, …不同的硬體平台而不同. keycode則是由程式所定義的鍵盤事件, linux kernel有定義, Xwindow也有另一個定義. keychar就是我們熟知的ASCII字碼, 是一致不變的. 在console擷取鍵盤事件, 需要透過一些低階的I/O技巧,才能取得類似像Ctrl+Space這一類的鍵盤事件. 這裡有一篇很棒的Console Programming Howto: http://devel.linvision.com/doc/fbh/current/ 在4th section對keystroke有很好的指導.

There there major different keystroke representation: scancode( raw code), keycode, keychar.

  1. scancode is the hardware from the keyboad, varies from different hardware platform, for exam , PC, Mac,…
  2. keycode is keyboard event defined by the specific programs, linuxer kernel has one definition, and Xwindow also has its own definition, IIIMF has, too.
  3. keychar just is the ASCII code. It’s consistent between different platform.

To catch the keystrokes event in console needs some low level I/O skill, especially for special keyevnet such as "Ctrl+Space" "Ctrl+Shift".

Here is a excellent document for console programming: http://devel.linvision.com/doc/fbh/current/ and the 4th section is a good guide for keystroke event handling.

while( IsAvailable() ) { just do it; } — 2005-03-09

while( IsAvailable() ) { just do it; }

在參加過幾次開放原始碼的使用者聚會後, 我也開始作一些修改程式碼的活動. 這中間我學到很多東西, 偶爾也會有一些小小的點子. 希望能透過一個簡單又直接的方式和同好們分享.

After I join serveral OpenSource User Group meettings, I begin to trace code and coding. I learned a lot of things in it, and sometimes have some little ideas. I am willing to share my notes with all the OpenSource-loving fellows via a simple way.