schemeに関するpi8027のブックマーク (5)

  • Gauche(Scheme) でデバッグをする4つの方法 - higepon blog

    Gauche でコードを書いているときにコードが意図どおりに動かないことがあります。そのような場合にデバッグする方法を4つ紹介します。 前提 まず Gauche はリリースされている最新版を使った方が良いでしょう。Linuxのディストリビューションによってはパッケージが古い場合あります。 またScheme は関数型言語なので、デバッグの単位は関数(手続き)ごとに行うことが多いです。一つ一つの手続きが意図どおり動いているのか?を調べながら進めるのが基になります。 方法1 print デバッグ Gauche には今のところデバッガがありませんから基的には print デバッグがメインとなります。単純な print デバッグから見ていきましょう。 以下のような sum という手続きで print デバッグしてみましょう。 (define (sum n) (if (= n 1) 1 (+ n

    Gauche(Scheme) でデバッグをする4つの方法 - higepon blog
    pi8027
    pi8027 2010/06/03
    これで頭の悪いぼくでも Scheme が書ける!
  • Practical Scheme

    Shiro Kawai まだ下書き Schemeの特徴をあげるときに、「継続」や「call/cc」が出て来ないことはない。 でも、R5RSのcall/ccの項をいくら読んでも、どうもよくわからない。 call/ccを使えばC言語のbreakみたいなのとか、コルーチンとかいう スレッドもどきとかが書ける、というのはわかったけど、一体そういうのが書けて 何が嬉しいのか、そこんとこがピンと来ないんだ。 今、そこにある継続 プログラミングの世界の概念には、禅の公案のようなものがある。 それを説明する文章はほんの一文なのに、最初に目にする時、 その文は全く意味をなさない、暗号のように感じられる。 だがひとたびその概念を理解すると、 その概念の説明は確かにその一文で説明されているのがわかるのだ。 そんな、「分かれば分かる」という禅問答の中でも 「継続」は最も謎めいたものの一つと言えるだろう。 文献を紐

    Practical Scheme
  • Chaton

    Chaton (pronounced like [sha-ton], a 'kitten' in French) is a simple Comet-based Webchat server written in Gauche. Originally it is developed to host a successor of Gauche chat room on Lingr ( http://www.lingr.com ), when Lingr announced to terminate its service. Although Chaton never aims at serving in such a large scale and with tons of features like Lingr, the "look and feel" of the interface s

  • Welcome to the SICP Web Site

    Wizard Book n. Hal Abelson's, Jerry Sussman's and Julie Sussman's Structure and Interpretation of Computer Programs (MIT Press, 1984; ISBN 0-262-01077-1), an excellent computer science text used in introductory courses at MIT. So called because of the wizard on the jacket. One of the bibles of the LISP/Scheme world. Also, less commonly, known as the Purple Book. from The New Hacker's Dictionary, 2

    pi8027
    pi8027 2009/04/01
    SICP 本家ウェブサイト
  • Y Combinator - LoveRubyNet

    $Id: ycombinator.html,v 1.6 2002/06/27 23:37:39 aamine Exp $ [ruby-list:35058] に刺激を受けて Y combinator を解読してみた。 こんなもん読むくらいなら以下の参考ページを読んだほうがいい。 参考にした (というかほとんどそのままな) ページ (英語) http://www.ececs.uc.edu/~franco/C511/html/Scheme/ycomb.html 動機 再帰関数は再帰するときに自分自身を名前で呼ぶのが普通である。 これをなんとかして名前を使わず、関数そのものを呼ぶように させたい。 求めかた まず単純な fact (階乗) を以下に示す。言語は Scheme である。 (define fact (lambda (n) (if (zero? n) 1 (* n (fact (- n

    pi8027
    pi8027 2009/03/20
    Y Combinator の解説。
  • 1