summaryrefslogtreecommitdiffhomepage
path: root/slides.typ
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-04 20:18:02 +0900
committernsfisis <nsfisis@gmail.com>2026-06-04 20:18:02 +0900
commit358bb1263fafdbb6e2c27feb03d17a690971357c (patch)
tree147e1eee4a1d03918d9d03e6f1988078c6e7940c /slides.typ
parent3f6ceab1322eac938703b7e10175684cb5d40356 (diff)
downloadphperkaigi-mini-1-slides-main.tar.gz
phperkaigi-mini-1-slides-main.tar.zst
phperkaigi-mini-1-slides-main.zip
add filesHEADmain
Diffstat (limited to 'slides.typ')
-rw-r--r--slides.typ257
1 files changed, 257 insertions, 0 deletions
diff --git a/slides.typ b/slides.typ
new file mode 100644
index 0000000..1c667e3
--- /dev/null
+++ b/slides.typ
@@ -0,0 +1,257 @@
+#import "@preview/touying:0.6.3": *
+#import "@preview/cjk-unbreak:0.2.0": remove-cjk-break-space
+#import "@preview/cetz:0.5.2"
+#import "@preview/cetz-plot:0.1.4": plot
+#import "setoka.typ": *
+
+#show: remove-cjk-break-space
+
+#show: setoka-theme.with(
+ aspect-ratio: "16-9",
+ config-info(
+ title: [
+ 最近作っている\
+ Rust 製 Composer の進捗
+ ],
+ subtitle: [PHPerKaigi mini \#1],
+ author: [nsfisis (いまむら)],
+ date: datetime(year: 2026, month: 5, day: 25),
+ ),
+)
+
+#set text(font: "BIZ UDPGothic", lang: "ja")
+#show raw: set text(font: "UDEV Gothic 35")
+
+#let color-composer = rgb("#3b82f6")
+#let color-mozart = rgb("#e2682b")
+
+#title-slide()
+
+#[
+ #set align(center + horizon)
+ #set text(size: 60pt)
+
+ biome oxc esbuild\
+ uv bun......
+]
+
+---
+
+#[
+ #set align(center + horizon)
+
+ #grid(
+ columns: (auto, auto, auto),
+ column-gutter: 0.6em,
+ align: horizon,
+ text(size: 64pt)[世は大],
+ text(size: 22pt)[
+ その言語で書かれた\
+ ツールチェーンを\
+ 速そうな別言語で\
+ 書き直して生産性を\
+ 引き上げていけたら\
+ いいんじゃないか
+ ],
+ text(size: 64pt)[時代],
+ )
+]
+
+---
+
+#[
+ #set align(center + horizon)
+
+ #text(size: 56pt)[Mago(旧 Fennec)]
+
+ #v(0.5em)
+
+ #text(size: 32pt)[linter, formatter, static analyzer......]
+]
+
+---
+
+#[
+ #set align(center + horizon)
+
+ Composer は\
+ 置き換えないの?
+]
+
+---
+
+#[
+ #set align(horizon)
+ #set text(size: 36pt)
+
+ #grid(
+ columns: (auto, auto),
+ column-gutter: 0.4em,
+ align: top,
+ [A.],
+ [
+ I/O bound だから速くならないよ。\
+ エコシステム分断するし。\
+ PHP 製の Composer plugin も\
+ サポートできないでしょ
+ ],
+ )
+]
+
+---
+
+#[
+ #set align(center + horizon)
+
+ 本当か?
+]
+
+---
+
+#[
+ #set align(center + horizon)
+
+ Rust 製 Composer
+
+ #v(0.5em)
+
+ Mozart
+]
+
+---
+
+#[
+ #set align(center + horizon)
+ #set text(size: 9pt, fill: black)
+
+ // hyperfine による計測結果 (10 runs)
+ #let labels = (
+ [composer/no-cache], [mozart/no-cache], [composer/cache], [mozart/cache],
+ )
+ #let vals = (21.516, 136.072, 5.988, 7.877)
+ #let errs = (1.177, 20.269, 0.276, 0.094)
+ #let cols = (color-composer, color-mozart, color-composer, color-mozart)
+
+ #cetz.canvas({
+ import cetz.draw: *
+
+ // 背景
+ rect((-3.3, -1.6), (12.4, 9.4), fill: white, stroke: none)
+
+ set-style(
+ axes: (
+ stroke: black,
+ tick: (stroke: black),
+ grid: (stroke: rgb("#cccccc") + 0.5pt),
+ ),
+ )
+
+ plot.plot(
+ size: (12, 7),
+ axis-style: "left",
+ x-min: 0,
+ x-max: 4,
+ y-min: 0,
+ y-max: 145,
+ x-tick-step: none,
+ x-ticks: range(4).map(i => (i + 0.5, text(size: 8pt)[#labels.at(i)])),
+ y-tick-step: none,
+ y-ticks: range(0, 141, step: 20).map(v => (v, text(size: 9pt)[#v s])),
+ y-grid: true,
+ y-label: text(size: 11pt)[実行時間 (秒)],
+ x-label: none,
+ legend: none,
+ {
+ for i in range(4) {
+ plot.add-bar(
+ ((i + 0.5, vals.at(i)),),
+ bar-width: 0.6,
+ style: (fill: cols.at(i), stroke: none),
+ )
+ }
+ plot.annotate({
+ for i in range(4) {
+ let x = i + 0.5
+ let v = vals.at(i)
+ let e = errs.at(i)
+ line((x, v - e), (x, v + e), stroke: black + 1.2pt)
+ line((x - 0.1, v + e), (x + 0.1, v + e), stroke: black + 1.2pt)
+ line((x - 0.1, v - e), (x + 0.1, v - e), stroke: black + 1.2pt)
+ }
+ })
+ },
+ )
+
+ // 凡例
+ let ly = 8.4
+ rect((0, ly - 0.18), (0.36, ly + 0.18), fill: color-composer, stroke: none)
+ content((0.5, ly), text(size: 10pt)[composer], anchor: "west")
+ rect((3.0, ly - 0.18), (3.36, ly + 0.18), fill: color-mozart, stroke: none)
+ content((3.5, ly), text(size: 10pt)[mozart], anchor: "west")
+ content(
+ (6.0, ly),
+ text(size: 10pt)[誤差棒 = 標準偏差 σ(10回実行)],
+ anchor: "west",
+ )
+ })
+]
+
+---
+
+#[
+ #set align(horizon)
+
+ 現在書き直し中\
+ → Shirabe
+]
+
+---
+
+#[
+ #set align(top)
+ #v(0.3em)
+
+ Why Rewrite?
+]
+
+---
+
+#[
+ #set align(horizon)
+
+ Why Rewrite?
+
+ #v(1.5em)
+
+ #h(1em) Plugin をサポートしたい!
+]
+
+---
+
+#[
+ #set align(horizon)
+ #set text(size: 40pt)
+
+ Rust のデータ構造を\
+ PHP のクラス構造に寄せる
+
+ #v(1em)
+
+ 可能な限り「そのまま」移植
+]
+
+---
+
+#[
+ #set align(top)
+ #v(0.3em)
+
+ まとめ
+
+ #set text(size: 34pt)
+ #v(0.5em)
+
+ - Rust 製 Composer を開発中
+ - 現在大幅に書き直し中
+ - Plugin を含めた *100%* 互換を目指す
+]