by shigemk2

当面は技術的なことしか書かない

Scheme

SICP(計算機プログラムの構造と解釈 第二版)読書会 #yomukai

http://sicp.iijlab.net/fulltext/x116.html 練習問題を解こうとした。でも既に難しい。 gist.github.com 途中からprintの方法が変わっているのはなんというか、ご愛嬌。 無限ループ系をEmacs-quickrunでやるとPCが死ぬので、やらないほうが吉。 1.2 手続き…

SICP(計算機プログラムの構造と解釈 第二版)読書会 #yomukai

【オンライン上】SICP(計算機プログラムの構造と解釈 第二版)を読む会 (2015/05/05 22:00〜)yomukai.connpass.com 1.3.3 一般的方法としての手続き http://sicp.iijlab.net/fulltext/x133.html 区間二分法(half-interval method)は連続関数fに対し, 方程式…

GNU Guileを入れてみよう

概要。 SICPの環境を整えるための新提案。 GNU Guile (About Guile) 導入。 Fedora20だと yum install guile guile-devel Debian系や他のディストリにもパッケージはあると思うけど、各自検索で。Gaucheもそうだったけどgoshもguileもデフォルトでバックスペ…

俺流Gauche入門

環境 Fedora20 Emacs 24.5.1 概要 SICP を読むために Emacs で Scheme 環境を構築 | Futurismofuturismo.biz 初めてのGauche - Qiitaqiita.com emacs-quickrunにはちゃんとgoshがありました。 インストール $ sudo yum install -y gauche gauche-devel Emacs…

hello, world

SICP P28から。 (print "Hello, World") (define (square x) (* x x)) (define (smallest-divisor n) (find-divisor n 2)) (define (find-divisor n test-divisor) (cond ((> (square test-divisor) n) n) ((divides? test-divisor n) test-divisor) (else (…

goshを入れてみよう

Gaucheの環境構築メモ - 飲む、寝る。 brew install gauche$ gosh gosh> (print "Hello, World") Hello, World #<undef> gosh></undef>

homebrewでschemeを入れてみた

しすたーすきーむでもThe Schemeでもない。 $ brew install mit-schemeだけでschemeが使えるようになる。 $ schemeで発動する。ちょっと使ってみた 1 ]=> (- 10 3 5 4) ;Value: -2 1 ]=> (* (+ 1 39) (- 53 45)) ;Value: 320 1 ]=> (+ (/ 1020 39) (* 45 2))…