GrahamのANSI Common Lispでは嫌われていて碌に説明のないloopマクロ。一方、Practical Common Lispでは対照的に好んで用いられていて、全編に渡って頻繁に使われている。しかしloopマクロは難しいという意識があるのかその説明は第22章とかなり後回しにされており、ちぐはぐな感を受ける。ここでは、LOOP for Black-Belts という題のつけられたその章で解説されているloopマクロの用法を整理してみた。 ANSI Common Lispでの黒魔術扱いに敬遠していたloopマクロだったが、こうして整理してみるとそれほど難しく考えずとも便利に使うことができそうだ。 目次 繰り返し 計数繰り返し コレクション内繰り返し 変数更新しながら繰り返し ループ終了条件の追加 アクション 集約 ループ内ローカル変数 任意の式の実行 条件分岐 ループ中断 その他
LISPUSERLISPMEMOLisp is like a ball of mud - you can throw anything you want into it, and it's still Lisp. -- Anonymous Lisp の括弧は良くネタにされます。実際、大量の過去は最初のインパクトは強烈だったのを覚えています。 いったいなぜ Lisper は括弧を捨てないのでしょう? 歴史的にみれば括弧を好まない Lisper も居ます。古くは CMU の AI リポジトリに CGOL という ALGOL ライクな 構文の Lisp リーダ/ライタがあり、これは S 式と相互に変換できました。CGOL で書いて、S 式で表示とかができたわけですね。 ;;Execute by typing "cl < demo.txt". (load "parser.cl") (load "c
CLTL's Loop Reference HyperSpec's Loop Reference Peter Karp's Loop Tutorial Iteration for each element in a list: > (loop for i in '(1 2 3) do (print i)) 1 2 3 Iteration for each cdr of a list: > (loop for i on '(1 2 3) do (print i)) (1 2 3) (2 3) (3) Iteration for each element in a vector: > (loop for i across #(1 2 3) do (print i)) 1 2 3 Iteration for each key of a hashtable: > (setf h (make-has
Common Lispのformat関数 Common Lisp では,フォーマット出力用の関数として format が用意されています.巨大な Common Lisp の仕様の中でも特に複雑な組み込み関数の1つであり,中には冗談としか思えない機能もあったりします.Common Lisp使いの人でも,完全に使いこなしているという人は少ないのではないでしょうか. ということで, format 関数の使い方を自分でまとめて整理したものを公開します. 今まで ~S と ~A と ~% くらいしか使ったことがないという人は参考にしてみてください.ざっとネット上を検索したところ,仕様書以外で使い方を解説しているドキュメントは(少なくとも日本語では)見当たらないので,少しは需要があるのでは. (参考文献) Common Lisp HyperSpec (22.3 Format
Part4では,Lisp(リスプ:List Processor)インタプリタをJava言語を使って作っていきます。Lispは非常に歴史が古く,様々な分野で利用されている言語です。しかし,皆さんの中にはLisp自体をよく知らないという方もいらっしゃるかもしれません。どんなものを作るかわからないままでは面白みも半減してしまいますから,まずはLispのごく基本的な動作を紹介しましょう。 まずは簡単Lisp講座 Lispの本質は,すべてがリスト(正確にはS式,詳細は後述)で表現されることにあります。リストは要素を順序付きで並べたもので,“(1 2 3 4)”のように要素の並びをカッコでくくって表記します。このリストの要素は1,2,3,4の四つです。 「すべてがリストで表現される」という言葉の通り,Lispではプログラムもこのようなリストとして表現します。Lisp処理系は,与えられたリストの一つ目の
ポール・グレアムのエッセイと和訳一覧 (originally maintained by naoya_t) Paul Grahamのエッセイ(原文)と、公開されている日本語訳のリストです。 見つけたらor 訳したら、自由に追加して下さい。複数の訳が存在する場合は全て追加してください。 A Fundraising Survival Guide 資金調達サバイバル・ガイド (lionfan) The Pooled-Risk Company Management Company リスク共有型の企業管理会社 (lionfan) Cities and Ambition 都市と野心 (lionfan) Disconnecting Distraction 気晴らしを断ち切る (lionfan) Lies We Tell Kids 子供につく嘘 (lionfan) Be Good 良くあれ (sirocc
Originally published in the proceeding of Game Developers Conference 2002, San Jose, March 19-23, 2002. Converted to HTML by the author. Tracking Assets in the Production of 'Final Fantasy : The Spirits Within' Shiro Kawai Square USA Inc. 55 Merchant St. Ste. 3100 Honolulu, HI., 96813 1. Introduction In early 1997, Square USA opened a studio in Hawaii to produce a full CG feature film, whic
Successful Lisp: How to Understand and Use Common Lisp David B. Lamkins david@lamkins.net This book: Provides an overview of Common Lisp for the working programmer. Introduces key concepts in an easy-to-read format. Describes format, typical use, and possible drawbacks of all important Lisp constructs. Provides practical advice for the construction of Common Lisp programs. Shows examples of h
Notice The Community Scheme Wiki is temporarily offline for maintenance. It is expected to resume normal operation on Thursday, Jan 4, 2018. Further Details The Community Scheme Wiki runs on an AWS EC2 instance, which today was subjected to a mandatory emergency update by AWS, as described at: https://aws.amazon.com/security/security-bulletins/AWS-2018-013/ However, the instance in question has no
It contains Lisp code for various applications which is: Common Lisp i.e. runs in ANSI Common Lisp implementations Free Software according to the Debian Free Software Guidelines (e.g. licensed under GPL, LGPL, MIT or BSD licenses, or public domain) Portable i.e. should be portable among CL implementations with low effort, and does not require modifications to the CL implementation itself Self-cont
Introduction Welcome to the amazing world of Common Lisp, the programmable programming language. This site is one among many gateways to Common Lisp. Its goal is to provide the Common Lisp community with development resources and to work as a starting point for new programmers. Latest Common-Lisp.net news 2025-05-20European Lisp Symposium has just concluded and the Common Lisp Foundation is having
This book, with minor revisions, is back in print from Dover Publications and can be purchased in paperback form at Amazon.com, Barnes & Noble, etc. An e-book version will be released in late February, 2013. Free software accompanying the book is also available. This 1990 edition may be distributed in hardcopy form, for non-profit educational purposes, provided that no fee is charged to the recipi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く