rontolisp
2026-10-23
talk.lisptalk.htmllispresen とは
lispresen とは
lispresen とは
トップレベルのread する。
#. も書き方
slide の
(slide :title "段落と箇条書き"
"文字列だけでも段落になる。"
(ul "ul は記号付きの箇条書き"
(li "入れ子は" (ul "二段まで")))
(ol "ol は番号付き" "7 項目からは警告する")
(notes "発表者ウィンドウにだけ出る。"))
表示例
文字列だけでも
書き方
装飾も
(lead "lead は控えめな色の段落")
(p (b "太字") "、" (i "italic") "、" (tt "(code)") "、"
(mark "マーカー") "、" (accent "アクセント色") "、"
(link "https://github.com/making/rontolisp" "リンク"))
表示例
lead は
太字、(code)、
書き方
行は
(table :header ("種類" "フォーム" "数")
:row-header t :align (:left :left :right)
:caption "デッキの要素は、どれもリストとして書く"
("図と数式" (tt "flow cells bars columns lines pie math") "7")
...
((cell :colspan 2 "合計") "34"))
表示例
| 種類 | フォーム | 数 |
|---|---|---|
| トップレベル | deck section slide agenda define | 5 |
| ブロック | p lead ul ol code quote column image video frame table | 11 |
| 部品 | li cell | 2 |
| 図と | flow cells bars columns lines pie math | 7 |
| インライン | b i tt mark accent link | 6 |
| 注釈 | say notes source | 3 |
| 合計 | 34 | |
書き方
source は
(quote :cite "Alan J. Perlis"
"A language that doesn't affect the way ...")
(source "Alan J. Perlis, " (i "Epigrams on Programming")
", SIGPLAN Notices 17(9), 1982")
表示例
A language that doesn't affect the way you think about programming is not worth knowing.
Alan J. Perlis, Epigrams on Programming, SIGPLAN Notices 17(9), 1982
書き方
文字列のconsole は
(code :lang "lisp" :run nil "
(defun square (x)
(* x x))")
(code :lang "console" "
$ lispresen/check.sh
ok interpreter")
表示例
(defun square (x)
(* x x))
$ lispresen/check.sh
ok interpreter
ok jvm
skip native: the jar carries no precompiler for this platform (linux-x86_64)
書き方
:lang が java、python、bash、sql、json などなら、
(code :lang "java" "
long square(long x) {
return x * x; // ...
}")
表示例
// the same function in Java
static long square(long x) {
return x * x;
}
def square(x):
"""x times itself"""
return x * x # or None
for f in talks/*.lisp; do
lispresen "$f" -o "${f%.lisp}.html" # one page each
done
書き方
続けてcolumn が
(lead (b "問題") " ... → " (b (accent "解決")) " ...")
(column
(code :lang "lisp" :run nil "..."))
(column
(ul "コードの列は ..." "残りを ..."))
表示例
問題 等幅の
(row-widths row k c (- 1920 224))
書き方
指す先を say で:at の
(li "日本語の改行は "
(say "BudouX のモデルで決める" (mark "文節ごと")))
(say "n が 2 未満なら n を返す" :at "(< n 2)"
(code :lang "lisp" :run nil "..."))
表示例
(defun fib (n)
(if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
BudouX の
n が 2 未満なら n を
書き方
箱を:at で
(lead "lispresen の処理の流れ")
(say "テンプレートもここで展開する" :at "parse"
(flow "read" "parse" "segment"
"layout" "lint" "emit"))
表示例
lispresen の
テンプレートも
書き方
経路を -> でlabel は
(say "check.sh で比べる" :at "同じ HTML"
(flow (-> (tt "cli.lisp") "インタプリタ" "同じ HTML")
(-> (tt "cli.lisp") "コンパイル" "JVM" "同じ HTML")
(-> "コンパイル" "WASM" "同じ HTML")
(-> (tt "cli.lisp") (label "基準") "SBCL" "同じ HTML")))
表示例
cli.lisp基準
check.sh で
書き方
cells は
(column
(say "car はセルの下に描く" :at "slide"
(cells '(slide :title "t" (p "x")))))
(column (cells '((a . 1) (b . 2))))
表示例
car は
書き方
値は
(lead "コンパイルした CLI の大きさ")
(say "JVM なしで動く" :at "ネイティブ"
(bars :unit " KB" ("JVM (jar)" 297) ("WASM" 788)
("WASM component" 796) ("ネイティブ" "6,700")))
(source "2026-10-22, macOS arm64 で測定")
表示例
コンパイルした CLI の
JVM (jar)
297 KB
WASM
788 KB
WASM component
796 KB
ネイティブ
6,700 KB
JVM なしで
2026-10-22, macOS arm64 で
書き方
:series で:step :series は
(lead "例: 四半期ごとの発表数")
(columns :series ("2025" "2026") :step :series
("Q1" 3 5) ("Q2" 4 (say "最多" 8))
("Q3" 2 6) ("Q4" 5 7))
表示例
例: 四半期ごとの
2025
2026
Q1
3
5
Q2
4
8
Q3
2
6
Q4
5
7
最多
書き方
目盛りは 1、
(lead "例: 応答時間")
(lines :series ("p50" "p99") :unit " ms"
("1月" 12 40) ("2月" 11 38) ("3月" 10 55)
("4月" "9.5" 33) ("5月" 9 31))
表示例
例: 応答時間
p50
p99
0 ms
20 ms
40 ms
60 ms
1月
2月
3月
4月
5月
書き方
pie は:stack t は:axis t は
(column
(say "半分を超える" :at "eval"
(pie :donut t ("read" 2) ("eval" 9) ("print" 1))))
(column
(bars :series ("read" "eval") :stack t :axis t
("小" 2 9) ("大" 4 20)))
表示例
read
2
eval
9
1
read
eval
小
大
0
5
10
15
20
25
半分を
書き方
前置記法の
(p "計算量は " (math (O (* n (log n)))) " で済む")
(math (= (fib n)
(cases (n (< n 2))
((+ (fib (- n 1)) (fib (- n 2))) "otherwise"))))
(say "上下に範囲が付く"
(math (= (sum (= i 1) n (^ i 2)) (/ (* n (+ n 1) (+ (* 2 n) 1)) 6))))
表示例
計算量は で
上下に
書き方
画像は--embed で HTML に
(say "--embed で HTML に埋め込んだ"
(image "pipeline.png"
:alt "read から emit までの六段階"
:caption "PNG はテーマの色に従わない"))
表示例
--embed で HTML に
書き方
題も
:fit :contain なら(slide (image "photo.svg" :alt "夕暮れの山並み"))
書き方
:layout :image-left か :image-right で、
(slide :title "画像と文章を並べる" :layout :image-right
(ul "画像は上下と横の端まで届く" ...)
(image "photo.svg" :alt "夕暮れの山並み" :share 1/3))
表示例
:share の 1/3, 1/2, 2/3 から書き方
動画は--embed で HTML に
:autoplay t なら、:poster の(video "demo.mp4" :alt "REPL で fib を呼ぶ"
:poster "demo-poster.png" :autoplay t :muted t :loop t)
表示例
書き方
frame は
:zoom 倍に(frame "https://making.github.io/rontolisp/minesweeper/"
:alt "マインスイーパー" :zoom 1)
表示例
書き方
define で
(define side (head &rest points)
(column (p (b head)) (ul points)))
(side "インタプリタ" "起動が速い" "eval が完全")
(side "コンパイラ" "実行が速い" "成果物が一つ")
表示例
インタプリタ
コンパイラ
レイアウトは
スライドごとに、
:aspect :4x3 なら 1440 x 1080) でレイアウトは
| 役割 | 既定 | 警告の | 下限 |
|---|---|---|---|
| 題 | 80 | 64 | 56 |
| 本文 | 56 | 48 | 40 |
| コード | 44 | 32 | 28 |
| 表 | 48 | 40 | 36 |
| 吹き出し | 44 | 40 | 36 |
| 図の | 48 | 40 | 36 |
レイアウトは
| スライドの | レイアウト |
|---|---|
| 題が | statement |
| 題が | full |
| 題と | image |
| 題と | code table quote |
column を | columns |
| それ以外 | standard |
書き方
題を
(slide "読みやすさは、書き手ではなくツールが守る。")
読みやすさは、
レイアウトは
$ java -jar lispresen.jar talk.lisp --check
talk.lisp:42: warning: slide 7 "比較": a list with 8 items is hard to follow; keep it to 6
--strict なら使い方
発表する
?check を試す
?check をruntime check: no corrections と使い方
| キー | 動作 |
|---|---|
→ ↓ Space PageDown | 次へ |
← ↑ PageUp | 前へ |
Home End | 最初と |
F | 全画面 (ダブルクリックでも) |
O | 全スライドの |
P | 発表者ウィンドウ |
E | コードの |
試す
#5 に使い方
P で
(notes "このノートは発表者ウィンドウにだけ出る。")
試す
書き方
ページ送りの
(ol :step t "リストの項目" "コードの行"
(li (say "項目の後に出る" :step t "吹き出し")))
(code :steps ((1 2) "(fib 20)") ...)
表示例
→ で(deck :callouts :step) ならどの
項目の
書き方
段落、:step t で
(bars :step t :unit " KB" ...)
(lead :step t "結論は最後に出す")
図と
表示例
測った
JVM (jar)
297 KB
WASM
788 KB
ネイティブ
6,700 KB
→ 配るなら jar が
jar の
書き方
Lisp、
(say "Run で 6765 が出る" :at "(fib 20)" :step t
(code :file "fib.lisp" :lines (4 6)
:steps ((1 2) "(fib 20)")))
表示例
(defun fib (n)
(if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
(fib 20)Run で 6765 が
発表する
同じ
(mapcar #'fib '(1 2 3 4 5 6 7 8 9 10))書き方
:morph t の
(slide :title "..." :morph t
(code :lang "lisp" "
;; ループで書き直す
(defun fib (n)
(loop for a = 0 then b
and b = 1 then (+ a b)
repeat n
finally (return a)))"))
共通の
表示例
;; 再帰で書く
(defun fib (n)
(if (< n 2) n (+ (fib (- n 1)) (fib (- n 2)))))
(fib 20)表示例
;; ループで書き直す
(defun fib (n)
(loop for a = 0 then b
and b = 1 then (+ a b)
repeat n
finally (return a)))
(fib 20)書き方
:timeout 秒で:fresh t は:stdin を
(code :lang "clojure" :timeout 5 "...")
(code :lang "scheme" :fresh t :stdin "3 4" "...")
表示例
(defn square [x] (* x x)) ; a comment
(map square (range 10))(define (sq x) (* x x))
(display (+ (sq (read)) (sq (read))))
(newline)発表する
ランタイムは rontolisp の
:runtime :hosted 開いた:runtime "runtime/" デッキの:runtime :none コードを$ cp web/dist/rontoplayground.js* talk/runtime/
$ jwebserver -d "$PWD/talk"
書き方
組み込みは :light、:dark、:high-contrast、:midnight。
(deck :theme :midnight)
(deck :theme (theme :base :dark :accent "#ff9f43"))
(deck :theme (theme :base :light :code :dark))
文字色は
表示例
この
(list "string" :keyword 42 nil) ; a comment
本文の tt、
--theme midnight を
書き方
表紙、
(deck :title "lispresen" :author "rontolisp"
:logo (image "logo.svg" :alt "rontolisp")
:url "https://github.com/making/rontolisp"
:agenda "話の流れ" :kicker :section
:progress t :page-numbers t)
(slide :kicker "試す" ...)
(slide :kicker nil ...)
試す
:kicker で書き方
目次は(agenda) を
(deck :title "lispresen" :agenda "話の流れ")
(slide :title "S式のデッキから HTML を一つ作る" ...)
(agenda)
(section "lispresen とは")
(agenda) より:agenda も試す
(agenda) より(agenda) の出力と
(lispresen:render source &key theme runtime read-file embed page-image)
;; => (values html diagnostics image)
出力と
| バックエンド | 成果物 | 実行 |
|---|---|---|
| インタプリタ | なし | rontolisp cli.lisp |
| JVM | .jar | java -jar |
| WASM | .wasm | wasmtime run |
| WASM component | .wasm | wasmtime run |
| ネイティブ | 実行ファイル | ./lispresen |
| SBCL | なし | sbcl --script cli.lisp |
| ブラウザ | web/ の | |
出力と
lispresen-web.lisplispresen.wasmrender を試す
書き方
(deck :title "lispresen"
:description "S式で書くプレゼンテーション"
:page-url "https://example.com/talk.html"
:page-image "talk.png"
:page-image-font ("r.ttf" "b.ttf"))
head に og:title や og:image の meta タグを試す
intro.png を使い方
JVM も rontolisp もlispresen-0.1.0-SNAPSHOT で
| プラットフォーム | ファイル |
|---|---|
| macOS (Apple Silicon) | lispresen-darwin-arm64 |
| Linux (x86_64) | lispresen-linux-amd64 |
| Linux (arm64) | lispresen-linux-arm64 |
PATH のlispresen の試す
$ BASE=https://github.com/making/rontolisp/releases/download
$ curl -fLO $BASE/lispresen-0.1.0-SNAPSHOT/lispresen-darwin-arm64
$ chmod +x lispresen-darwin-arm64
$ sudo mv lispresen-darwin-arm64 /usr/local/bin/lispresen
$ lispresen --version
{"version": "0.1.0-SNAPSHOT", "gitCommit": "3b9b214"}
curl と wget でxattr -d com.apple.quarantine で
使い方
lispresen serve は
--embed は試す
$ lispresen serve talk.lisp
lispresen: built talk.lisp: 0 errors, 0 warnings
http://127.0.0.1:8000/ をlispresen talk.lisp --embed --strict で HTML を出力と
lispresen DECK [-o OUT] [--theme NAME] [--runtime URL|hosted|none]
[--embed] [--check] [--strict]
lispresen new FILE [--lang ja|en] [--force]
lispresen serve DECK [--port N] [--host ADDR] [--theme NAME]
[--runtime URL|hosted|none]
lispresen --version
- で--embed で--version は$ lispresen new talk.lisp
$ lispresen serve talk.lisp
$ lispresen talk.lisp --embed --strict
new は、--lang en ならlispresen/examples/intro.lispスライドも、