[Top Page][All Pages][Recent Changes]

Edit History:Diff

Changes of A+/uim/Emacs/2008/03/22/aplus-mode between 2008/03/22 22:28:58 JST and 2008/03/22 22:30:58 JST

Return to the edit history

  APLはキーボード入力と画面出力がアレなのでしばらく不遇だったが、
  UnicodeにAPL文字が入ってからちょっとはましになったかもしれない、と思い、
  APLの方言である[http://www.aplusdev.org/ A+]の学習を開始してみた。
  
  * 文字コードの壁
  
  APL諸言語と同じくA+もASCIIコード領域をAPL文字とみなして評価しているので、
  UnicodeとA+文字を相互に変換してやる必要がある。
  
  ** Emacsから使う
  
  A+をEmacsから使うには[http://stud4.tuwien.ac.at/~e0225855/unicapl/unicapl.html UnicAPL]のapl.elが便利なので、いれておく。
  
  これと、[[sf:openAPL]]付属のapl-mode.elを組み合わせて、
  aplus-modeをでっちあげてみた。
  
  - [[files:aplus-mode.el]]
  
  これをいれて、.emacsに、
  
  {{{
  (setq auto-mode-alist
        (append
         '(("\\.\\+\\'" . aplus-mode))
         auto-mode-alist))
  (autoload 'aplus-mode "aplus-mode" "edit A+ script." t nil)
  }}}
  
  を加えることにより、拡張子''''''.+''''''でaplus-modeで開くようになる。
- あとは、M-x set-input-method apl-asciiでapl.elのAPL入力モードに入れるようになるのでプログラミング環境は完成。まだ対話入力モードがないけど我慢。
+ あとは、M-x set-input-method apl-asciiでapl.elのAPL入力モードに入れるようになるので、
+ プログラミング環境はほぼ完成。まだ対話入力モードがないけど我慢。
  
  ** それ以外での入力
  
  uim-aplも作ってみた。WebページにAPLのコードを貼りたいときには便利。
  
  - [[files:uim-aplus.scm]]
  
  * プログラムを書いてみる
  
  {{{
  ⍝ ここはコメント
  "hello,world."
  sys.exit 0
  }}}