Enviar pesquisa
Carregar
Lisp batton - Common LISP
•
0 gostou
•
1,094 visualizações
Masaomi CHIBA
Seguir
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 27
Baixar agora
Baixar para ler offline
Recomendados
Racc でおてがる構文解析
Racc でおてがる構文解析
morphine57
東京R非公式おじさんが教える本当に気持ちいいパッケージ作成法
東京R非公式おじさんが教える本当に気持ちいいパッケージ作成法
Nagi Teramo
10分で分かるRパッケージの作り方
10分で分かるRパッケージの作り方
Yohei Sato
R を起動するその前に
R を起動するその前に
Kosei ABE
2分でパッケージを作ってインストールする
2分でパッケージを作ってインストールする
TokorosawaYoshio
Tokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテスト
Yohei Sato
php7's ast
php7's ast
do_aki
Perl6で遊ぼう
Perl6で遊ぼう
VienosNotes
Recomendados
Racc でおてがる構文解析
Racc でおてがる構文解析
morphine57
東京R非公式おじさんが教える本当に気持ちいいパッケージ作成法
東京R非公式おじさんが教える本当に気持ちいいパッケージ作成法
Nagi Teramo
10分で分かるRパッケージの作り方
10分で分かるRパッケージの作り方
Yohei Sato
R を起動するその前に
R を起動するその前に
Kosei ABE
2分でパッケージを作ってインストールする
2分でパッケージを作ってインストールする
TokorosawaYoshio
Tokyor14 - R言語でユニットテスト
Tokyor14 - R言語でユニットテスト
Yohei Sato
php7's ast
php7's ast
do_aki
Perl6で遊ぼう
Perl6で遊ぼう
VienosNotes
Functional Way
Functional Way
Kent Ohashi
おいしいLisp
おいしいLisp
Kent Ohashi
並行プログラミングと継続モナド
並行プログラミングと継続モナド
Kousuke Ruichi
From Java To Clojure
From Java To Clojure
Kent Ohashi
Project coin
Project coin
Appresso Engineering Team
ret2libc
ret2libc
sounakano
コードで感じるKotlin入門
コードで感じるKotlin入門
iPride Co., Ltd.
Haskell で CLI
Haskell で CLI
Nobutada Matsubara
Perl io layer
Perl io layer
Hiroko Suzuki
Everyday Life with clojure.spec
Everyday Life with clojure.spec
Kent Ohashi
2018年夏のPerl5
2018年夏のPerl5
charsbar
HashTable と HashDos
HashTable と HashDos
Yuya Takeyama
Local php-100828 2
Local php-100828 2
Akio Ishida
R spec勉強会
R spec勉強会
Tatsunori Nishikori
Computation Expressions for Haxe
Computation Expressions for Haxe
terurou
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Kenta USAMI
Lisp Tutorial for Pythonista : Day 3
Lisp Tutorial for Pythonista : Day 3
Ransui Iso
Php5.4
Php5.4
ke-m kamekoopa
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Shintarou Okada
Php2 s1
Php2 s1
Jun Chiba
Building Bridges between Academic Tribes
Building Bridges between Academic Tribes
Martin Rehm
Finding and sharing resources
Finding and sharing resources
Lis Parcell
Mais conteúdo relacionado
Mais procurados
Functional Way
Functional Way
Kent Ohashi
おいしいLisp
おいしいLisp
Kent Ohashi
並行プログラミングと継続モナド
並行プログラミングと継続モナド
Kousuke Ruichi
From Java To Clojure
From Java To Clojure
Kent Ohashi
Project coin
Project coin
Appresso Engineering Team
ret2libc
ret2libc
sounakano
コードで感じるKotlin入門
コードで感じるKotlin入門
iPride Co., Ltd.
Haskell で CLI
Haskell で CLI
Nobutada Matsubara
Perl io layer
Perl io layer
Hiroko Suzuki
Everyday Life with clojure.spec
Everyday Life with clojure.spec
Kent Ohashi
2018年夏のPerl5
2018年夏のPerl5
charsbar
HashTable と HashDos
HashTable と HashDos
Yuya Takeyama
Local php-100828 2
Local php-100828 2
Akio Ishida
R spec勉強会
R spec勉強会
Tatsunori Nishikori
Computation Expressions for Haxe
Computation Expressions for Haxe
terurou
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Kenta USAMI
Lisp Tutorial for Pythonista : Day 3
Lisp Tutorial for Pythonista : Day 3
Ransui Iso
Php5.4
Php5.4
ke-m kamekoopa
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Shintarou Okada
Php2 s1
Php2 s1
Jun Chiba
Mais procurados
(20)
Functional Way
Functional Way
おいしいLisp
おいしいLisp
並行プログラミングと継続モナド
並行プログラミングと継続モナド
From Java To Clojure
From Java To Clojure
Project coin
Project coin
ret2libc
ret2libc
コードで感じるKotlin入門
コードで感じるKotlin入門
Haskell で CLI
Haskell で CLI
Perl io layer
Perl io layer
Everyday Life with clojure.spec
Everyday Life with clojure.spec
2018年夏のPerl5
2018年夏のPerl5
HashTable と HashDos
HashTable と HashDos
Local php-100828 2
Local php-100828 2
R spec勉強会
R spec勉強会
Computation Expressions for Haxe
Computation Expressions for Haxe
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Rubyにおける構文追加の試み 〜ボクとRubyと俺々文法〜
Lisp Tutorial for Pythonista : Day 3
Lisp Tutorial for Pythonista : Day 3
Php5.4
Php5.4
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Boost.勉強会#19東京 Effective Modern C++とC++ Core Guidelines
Php2 s1
Php2 s1
Destaque
Building Bridges between Academic Tribes
Building Bridges between Academic Tribes
Martin Rehm
Finding and sharing resources
Finding and sharing resources
Lis Parcell
Unit 2.9 Tables
Unit 2.9 Tables
Intan Jameel
Unit 1.3 Introduction to Programming (Part 3)
Unit 1.3 Introduction to Programming (Part 3)
Intan Jameel
Open Educational Resources and Practices for Higher Education
Open Educational Resources and Practices for Higher Education
Lis Parcell
Lyddie: Unit3 lesson9
Lyddie: Unit3 lesson9
Terri Weiss
Unit3 lesson6
Unit3 lesson6
Terri Weiss
A Long Walk to Water - Lssn 8
A Long Walk to Water - Lssn 8
Terri Weiss
Iran pagana
Iran pagana
Paulo Arieu
Agile Memcached
Agile Memcached
Luciano Rocha
A Long Walk to Water: Lesson14 unit2
A Long Walk to Water: Lesson14 unit2
Terri Weiss
Inbound Marketing Cookbook
Inbound Marketing Cookbook
Eddie Choi
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Chandra Shekhar Tekwani
Risk management v imp
Risk management v imp
SIVA GOPAL
SHARE-IT - A Blog “from Researchers for Researchers”
SHARE-IT - A Blog “from Researchers for Researchers”
Martin Rehm
Examenopleiding energieconsulent mfl
Examenopleiding energieconsulent mfl
wweijmans
Jisc RSC Wales ISS 260213
Jisc RSC Wales ISS 260213
Lis Parcell
Finding and sharing good stuff: open practice, open educational resources and...
Finding and sharing good stuff: open practice, open educational resources and...
Lis Parcell
Communes, Commonism and Co-ops: Rethinking the university as a hackerspace
Communes, Commonism and Co-ops: Rethinking the university as a hackerspace
Joss Winn
Bezalel: Introduction to Interactive Design: ב4 - מבוא לעיצוב אינטראקטיבי - ה...
Bezalel: Introduction to Interactive Design: ב4 - מבוא לעיצוב אינטראקטיבי - ה...
Guy Haviv
Destaque
(20)
Building Bridges between Academic Tribes
Building Bridges between Academic Tribes
Finding and sharing resources
Finding and sharing resources
Unit 2.9 Tables
Unit 2.9 Tables
Unit 1.3 Introduction to Programming (Part 3)
Unit 1.3 Introduction to Programming (Part 3)
Open Educational Resources and Practices for Higher Education
Open Educational Resources and Practices for Higher Education
Lyddie: Unit3 lesson9
Lyddie: Unit3 lesson9
Unit3 lesson6
Unit3 lesson6
A Long Walk to Water - Lssn 8
A Long Walk to Water - Lssn 8
Iran pagana
Iran pagana
Agile Memcached
Agile Memcached
A Long Walk to Water: Lesson14 unit2
A Long Walk to Water: Lesson14 unit2
Inbound Marketing Cookbook
Inbound Marketing Cookbook
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Corey Makes Healthcare - Coordinate, Efficient and Mobile
Risk management v imp
Risk management v imp
SHARE-IT - A Blog “from Researchers for Researchers”
SHARE-IT - A Blog “from Researchers for Researchers”
Examenopleiding energieconsulent mfl
Examenopleiding energieconsulent mfl
Jisc RSC Wales ISS 260213
Jisc RSC Wales ISS 260213
Finding and sharing good stuff: open practice, open educational resources and...
Finding and sharing good stuff: open practice, open educational resources and...
Communes, Commonism and Co-ops: Rethinking the university as a hackerspace
Communes, Commonism and Co-ops: Rethinking the university as a hackerspace
Bezalel: Introduction to Interactive Design: ב4 - מבוא לעיצוב אינטראקטיבי - ה...
Bezalel: Introduction to Interactive Design: ב4 - מבוא לעיצוב אינטראקטיבי - ה...
Semelhante a Lisp batton - Common LISP
Cookpad Summer Intern 2015 - Programming Paradigm
Cookpad Summer Intern 2015 - Programming Paradigm
Minero Aoki
初心者講習会資料(Osaka.R#7)
初心者講習会資料(Osaka.R#7)
Masahiro Hayashi
やや関数型を意識した風Elixir/Phoenixご紹介
やや関数型を意識した風Elixir/Phoenixご紹介
fukuoka.ex
第1回勉強会スライド
第1回勉強会スライド
koturn 0;
asm.js x emscripten: The foundation of the next level Web games
asm.js x emscripten: The foundation of the next level Web games
Noritada Shimizu
ATN No.2 Scala事始め
ATN No.2 Scala事始め
AdvancedTechNight
Clojure programming-chapter-2
Clojure programming-chapter-2
Masao Kato
メタメタプログラミングRuby
メタメタプログラミングRuby
emasaka
Material
Material
_TUNE_
Scalaで萌える関数型プログラミング[完全版]
Scalaで萌える関数型プログラミング[完全版]
Ra Zon
Lisp tutorial for Pythonista : Day 2
Lisp tutorial for Pythonista : Day 2
Ransui Iso
関数型言語&形式的手法セミナー(3)
関数型言語&形式的手法セミナー(3)
啓 小笠原
PythonでLispを実装した (evalつき)
PythonでLispを実装した (evalつき)
t-sin
普通のプログラミング言語R
普通のプログラミング言語R
Shuyo Nakatani
Introduction of Python
Introduction of Python
Tomoya Nakayama
Lisp Tutorial for Pythonista Day 6
Lisp Tutorial for Pythonista Day 6
Ransui Iso
たのしい関数型
たのしい関数型
Shinichi Kozake
第2回勉強会スライド
第2回勉強会スライド
koturn 0;
Unix
Unix
Hiramatsu Ryosuke
Rあんなときこんなとき(tokyo r#12)
Rあんなときこんなとき(tokyo r#12)
Shintaro Fukushima
Semelhante a Lisp batton - Common LISP
(20)
Cookpad Summer Intern 2015 - Programming Paradigm
Cookpad Summer Intern 2015 - Programming Paradigm
初心者講習会資料(Osaka.R#7)
初心者講習会資料(Osaka.R#7)
やや関数型を意識した風Elixir/Phoenixご紹介
やや関数型を意識した風Elixir/Phoenixご紹介
第1回勉強会スライド
第1回勉強会スライド
asm.js x emscripten: The foundation of the next level Web games
asm.js x emscripten: The foundation of the next level Web games
ATN No.2 Scala事始め
ATN No.2 Scala事始め
Clojure programming-chapter-2
Clojure programming-chapter-2
メタメタプログラミングRuby
メタメタプログラミングRuby
Material
Material
Scalaで萌える関数型プログラミング[完全版]
Scalaで萌える関数型プログラミング[完全版]
Lisp tutorial for Pythonista : Day 2
Lisp tutorial for Pythonista : Day 2
関数型言語&形式的手法セミナー(3)
関数型言語&形式的手法セミナー(3)
PythonでLispを実装した (evalつき)
PythonでLispを実装した (evalつき)
普通のプログラミング言語R
普通のプログラミング言語R
Introduction of Python
Introduction of Python
Lisp Tutorial for Pythonista Day 6
Lisp Tutorial for Pythonista Day 6
たのしい関数型
たのしい関数型
第2回勉強会スライド
第2回勉強会スライド
Unix
Unix
Rあんなときこんなとき(tokyo r#12)
Rあんなときこんなとき(tokyo r#12)
Lisp batton - Common LISP
1.
Common Lisp コードバトン
2.
#1 g000001 R6RS
SchemeからCLに翻訳してみた CLには、標準ではmatchがない それ程複雑なパターンマッチでもない様子 辞書エントリーのアクセサを定義すればOKかもし れない
3.
アクセサが欲しかったので、defstruct(:type list)で構造体を定義
entry-というアクセサ make-で定義した構造のリストも作れる (defstruct (entry (:type list)) word meaning ok-count ng-count) (defun nomalize-dict (dict) (mapcar (lambda (e) (make-entry :word (entry-word e) :meaning (entry-meaning e) :ok-count (or (entry-ok-count e) 0) :ng-count (or (entry-ng-count e) 0))) dict))
4.
.
sortには:keyを指定できるので単純に書ける (defun sort-word-spec* (word-spec*) (sort word-spec* #'> :key (lambda (e) (- (entry-ng-count e) (entry-ok-count e)))))
5.
再帰をやめてループ (defun main (file) (let
((dict (sort-word-spec* (read-dict file)))) (dolist (e dict) (pr "~&~A: " (entry-word e)) (ready?) (pr "~&~A y/n? " (entry-meaning e)) :again (case (query) ((#Y #y) (incf (entry-ok-count e))) ((#N #n) (incf (entry-ng-count e))) ((#Q #q) (return)) (otherwise (pr "~&Please type Y for yes or N for no or Q for quit.~%") (go :again)))) (write-dict file dict)))
6.
#2 aka 英単語を登録できる関数追加 (hige:pin)
辞書のCSV一覧表示関数追加 (hige:pun) 名前空間周りの整理 case-sensitive package名での管理 read-char,clear-inputのシーケンスread-lineに変更 documentationストリングをまめに書く 処理に無駄がないように、read time evaluation活用 制御に関わる部分は命令的に。関数の性質がある部分は関数 的に。
7.
aka 正答率でソートする部分は、学習効率を高めるためのストラテジ の部分なので、関数として外に出して交換しやすく(sort-dict-
standard) とにかくCLらしく、ということで、(lambda を#'(lambdaにかえたり
8.
#3 quek "~"
という処理系拡張を解釈しない処理系のために (merge-pathnames ".hige/words.txt" (user-homedir-pathname) (probe-file dict-file) で辞書ファイルの存在をチェック 辞書ファイルがない場合は (ensure-directories-exist dict-file) でディレクトリだけは作成しておく
9.
#4 snmsts ABCLとswingでぬるめのUI(ABCL限定)
10.
#5 (び) SBCL+Mac
OS X縛りで出題単語を読 み上げ (sayコマンドを利用)
11.
#6 naoya_t 辞書から単語をassocしてくる
search-dict を実装 単語を入力し、search-dict で検索し、見つかれば意味を、見つ からなければ "Not found." と返す(hige:pan)を実装 aifマクロを追加 (loop :for ... :in ... :do ...) を dolist で置き換えてみた
12.
#7 masatoi
iKnow!風にn択問題(hige:pen)を実装.英単語から意味を問うの と意味から英単語を問うのと選べる 繰り返しはnamed-let ;; named-let macro (from "Let Over Lambda") (defmacro nlet (tag var-vals &body body) `(labels ((,tag ,(mapcar #'car var-vals) ,@body)) (declare (optimize (speed 3))) ; for tail recursion optimization (,tag ,@(mapcar #'cadr var-vals))))
13.
#8 cranebird
with-系のマクロを追加 CLと言えばマルチパラダイムなので CLOSで (defclass dict () ((entries :accessor entries-of :initform nil :initarg :entries :documentation "Entries")) (:documentation "Container class"))
14.
cranebird
print-objectを定義 CL-USER> (hige::make-dict '((hige "ひげ" 0 0))) #<dict: entries: 1 total/ok/ng: 0/0/0>
15.
#9 smeghead
問題の単語表示時にもスコアを表示するように 単語の一覧表示(hige:pun)で指定したスコア以下の単語のみ を表示する機能を追加。 問題の単語表示時にもスコアを表示するように [5]> (hige:pun :score-threshold 5) starbug1,スターバグ1号,3,0 river,川,5,0 NIL [6]>
16.
#10 NANRI untabify
format指示子を大文字に揃える "~a~%" => "~A~%" インデントを調整 辞書が存在しない時の動作を修正 パッケージ名がprintされないようにしてみやすく asdfのパッケージ化 (asdf-install:install "http://gist.github. com/gists/280060/download") でインストールできるようになった
17.
#11 snmsts 2回目
(び)さんの変更がSBCL+OS Xなので read-time conditionalizationをらしく修正 #+(and SBCL DARWIN) (sb-ext:run-program "/usr/bin/say" `(,(symbol-name word)) :wait t)
18.
#12 making
辞書ファイルをhttp経由で取得できるようにした。 要drakma(ウェブクライアント)。 (hige:pin "http://gist.github.com/273424.txt") でウェブから辞書を取得できる
19.
#13 深町英太郎
単語登録時に意味を空にした際にGoogle翻訳の結果を登録で きるように。要cl-ppcre。 (defun prompt-for-translate (word) ...))) (defun google-translate (word) ...))))
20.
#14 kurohuku
Gray Stream(オブジェクト指向なストリーム)を利用して暗記 ゲームの回答時にログをファイル出力 CL-USER> (hige:Pon) ;; setup dict...done lisp (score: 0): 舌足らず [Ynq]: Y ;Yと解答した時点でログが出力されて欲しい
21.
#15 kosh
空のエントリを登録しないようにした(add empty-entry-p) (defun empty-entry-p (entry) ...)) (defun add-entry (entry &key (if-exists :overwrite)) ...))) ログファイルもディレクトリがない場合は作成するように (ensure-directories-exist ,filename) (newLisp版も作成)
22.
そして伝説へ…
23.
まとめ
24.
参加した人は 結構楽しんでいた様子
25.
勉強になるよ
26.
またやろうよ
27.
参加してね
Baixar agora