SlideShare a Scribd company logo
1 of 56
Download to read offline
61
2020 1 10 @
2
[ˈsætɪsˌfaɪ]
• 2017
• DSL
https://github.com/gfngfn/SATySFi
Better LATEX
•
•
3
•
•
•
•
•
•
2
WYSIWYG
troff
5
[Microsoft 1983] [Adobe 1991]
[Quark 1987]
[Lamport 1985][Knuth 1978]
[Gruber 2004]
[Osanna 1973]
RE:VIEW
[ et al. 2002]
WYSIWYG
6
😄
•
•
•
•
WYSIWYG
7
😄 😩
••
•
•
•
LATEX
•
•
8
! Undefined control sequence.
! Missing $ inserted.
! Missing number, treated as zero.
LATEX
•
•
9
! Undefined control sequence.
! Missing $ inserted.
! Missing number, treated as zero.
10
https://github.com/gfngfn/SATySFi
Static Analysis-based TYpesetting System
for Functional Implementation
🤔
(1/2)
11
2
+section{SATySFi; }<
+p{
emph{ }
}
>
let-inline ctx emph it =
let ctx =
ctx |> set-font
Latin italic-font
in
read-inline ctx it
“ ” “ ”
• LATEX
• { … }
< … >
• OCaml
•
(2/2)
• “ ”
•
•
•
12
“ ” OCaml
• ML
• Hindley–Milner
•
•
•
•
•
13
SML# [Ohori 1995][Milner 1978]
•
•
•
•
•
•
15
https://drive.google.com/open?id=1muaWGgyAGfIYJNyKfKvvAzN8vur1sTG3
• TEX [Knuth & Plass 1981]
– Unicode Line Breaking Algorithm
–
– [Liang & Knuth 1983]
• OpenType
(1/2)
16
•
– OpenType MATH
– Future Work
•
•
• figure
• ref label
• TikZ
(2/2)
17
2
18
•
LATEX
LATEX
https://drive.google.com/open?id=1r14gHwCUxe3DQjoxkGHDWWkwtHWqMwaY
https://drive.google.com/open?id=1DyKB0V2xIKz6SMYNGdEWnupPAxXkWCeE
•
•
•
•
•
•
“ ”
PDF
OpenType
22
23
“ ”
PDF
OpenType
“ ”
PDF
OpenType
24
{The quick brown fox … }
“ ”
PDF
OpenType
25
Y
______]
______[
•
–
•
–
26
2
•
–
•
–
•
–
•
–
27
Y
______]
______[
Y
______]
______[
28
{The quick brown fox … }
inline-text
inline-boxes block-boxes
< +p{
The quick
brown fox …
} >
block-text
29
{The quick brown fox … }
Y
______]
______[
•
•
• ...
context
read-inline {The quick brown fox jumps … }
• read-inline : context → inline-text → inline-boxes
Ctx
• line-break : bool → bool → context → inline-boxes → block-boxes
30
line-break true true Ctx
– 2
–
– Knuth–Plass
Ctx
[Knuth & Plass 1981]
• 
–
• +
–
31
let-inline  =cmdy x1 · · · xn e
0
cmd
cmd
Y
______]
______[
32
let-inline ctx emph contents =
let ctx-emph =
ctx |> set-font Latin italic-font
in
read-inline ctx-emph contents
emph
33
The emph{quick brown} fox jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
34
emph{quick brown} fox jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
35
emph{quick brown} fox jumps …
let-inline ctx emph contents =
let ctx-emph =
ctx |> set-font Latin italic-font
in
read-inline ctx-emph contents
Ctx
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
let-inline ctx emph contents =
let ctx-emph =
ctx |> set-font Latin italic-font
in
read-inline ctx-emph contents
36
emph{quick brown} fox jumps …
Ctx
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
37
emph{quick brown} fox jumps …
quick brown
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
CtxÕ
38
emph{quick brown} fox jumps …
brown
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
CtxÕ
39
emph{quick brown} fox jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
CtxÕ
40
fox jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
41
fox jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
42
jumps …
read-inline {The emph{quick brown} fox jumps … }
……
Ctx
Ctx
43
[ ; ; ] inline-cmd·1 ·n· · ·
+p{
fbox{parbox(5cm)<
+p{ }
>}
}
[ ; ; ] block-cmd·1 ·n· · ·
• emph : [ inline-text ] inline-cmd
• +p : [ inline-text ] block-cmd
• parbox : [ length; block-text ] inline-cmd
·i
i
•
•
•
•
•
•
😄
😩
•
45
DSL
46
amidakuji(```
|X|-|=|/| |
| |-||-|X|
|=|X|-||=|
|-||-|=|-|
|X|=|-|| |
```);
amidakuji([
[Cross ; Line ; … ];
[Empty ; Line ; … ];
[Double; Cross; … ];
…
]);
•
DSL
47
•
–
– Lisp quasiquote
– MetaML [Taha 1997] MetaOCaml [Kiselyov 2014]
•
–
–
48
•
–
–
49
50
https://drive.google.com/open?id=1LMXFbEXLAjwscC5gKZnvBwR2O5gjIu8Y
•
•
•
•
•
•
• VM [ matsud224]
•
– HTML LATEX
–
• Markdown
–
52
•
– LTR/RTL
– OpenType on/off jp90 (JIS 90 form)
•
–
–
–
–
–
•
–
Future Work
53
B5 / 160
https://booth.pm/
ja/items/1127224
satysfi book
•
•
•
•
•
•
•
https://github.com/gfngfn/SATySFi
• DSL
•
•
•
Pull Request
56

More Related Content

What's hot

What's hot (20)

Surveyから始まる研究者への道 - Stand on the shoulders of giants -
Surveyから始まる研究者への道 - Stand on the shoulders of giants -Surveyから始まる研究者への道 - Stand on the shoulders of giants -
Surveyから始まる研究者への道 - Stand on the shoulders of giants -
 
暗号技術の実装と数学
暗号技術の実装と数学暗号技術の実装と数学
暗号技術の実装と数学
 
Pietのエディタを作った話
Pietのエディタを作った話Pietのエディタを作った話
Pietのエディタを作った話
 
SAT/SMTソルバの仕組み
SAT/SMTソルバの仕組みSAT/SMTソルバの仕組み
SAT/SMTソルバの仕組み
 
不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray
 
二人零和マルコフゲームにおけるオフ方策評価
二人零和マルコフゲームにおけるオフ方策評価二人零和マルコフゲームにおけるオフ方策評価
二人零和マルコフゲームにおけるオフ方策評価
 
プログラムを高速化する話
プログラムを高速化する話プログラムを高速化する話
プログラムを高速化する話
 
katagaitai workshop #7 crypto ナップサック暗号と低密度攻撃
katagaitai workshop #7 crypto ナップサック暗号と低密度攻撃katagaitai workshop #7 crypto ナップサック暗号と低密度攻撃
katagaitai workshop #7 crypto ナップサック暗号と低密度攻撃
 
RSA鍵生成脆弱性ROCAの紹介
RSA鍵生成脆弱性ROCAの紹介RSA鍵生成脆弱性ROCAの紹介
RSA鍵生成脆弱性ROCAの紹介
 
最適化超入門
最適化超入門最適化超入門
最適化超入門
 
暗号技術入門 秘密の国のアリス 総集編
暗号技術入門 秘密の国のアリス 総集編暗号技術入門 秘密の国のアリス 総集編
暗号技術入門 秘密の国のアリス 総集編
 
「日本語LaTeX」が多すぎる件について
「日本語LaTeX」が多すぎる件について「日本語LaTeX」が多すぎる件について
「日本語LaTeX」が多すぎる件について
 
指数時間アルゴリズム入門
指数時間アルゴリズム入門指数時間アルゴリズム入門
指数時間アルゴリズム入門
 
PPL 2022 招待講演: 静的型つき函数型組版処理システムSATySFiの紹介
PPL 2022 招待講演: 静的型つき函数型組版処理システムSATySFiの紹介PPL 2022 招待講演: 静的型つき函数型組版処理システムSATySFiの紹介
PPL 2022 招待講演: 静的型つき函数型組版処理システムSATySFiの紹介
 
エラーハンドリング
エラーハンドリングエラーハンドリング
エラーハンドリング
 
Rolling hash
Rolling hashRolling hash
Rolling hash
 
CUDAのアセンブリ言語基礎のまとめ PTXとSASSの概説
CUDAのアセンブリ言語基礎のまとめ PTXとSASSの概説CUDAのアセンブリ言語基礎のまとめ PTXとSASSの概説
CUDAのアセンブリ言語基礎のまとめ PTXとSASSの概説
 
ドロネー三角形分割
ドロネー三角形分割ドロネー三角形分割
ドロネー三角形分割
 
グラフネットワーク〜フロー&カット〜
グラフネットワーク〜フロー&カット〜グラフネットワーク〜フロー&カット〜
グラフネットワーク〜フロー&カット〜
 
競プロでGo!
競プロでGo!競プロでGo!
競プロでGo!
 

Similar to 静的型つき組版処理システムSATySFi @第61回プログラミング・シンポジウム

Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
Kernel TLV
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
ruoyi ruan
 

Similar to 静的型つき組版処理システムSATySFi @第61回プログラミング・シンポジウム (20)

Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
My First Rails Plugin - Usertext
My First Rails Plugin - UsertextMy First Rails Plugin - Usertext
My First Rails Plugin - Usertext
 
静的型つき組版処理システムSATySFi: その後の発展と今後の課題 @第62回プログラミング・シンポジウム
静的型つき組版処理システムSATySFi: その後の発展と今後の課題 @第62回プログラミング・シンポジウム静的型つき組版処理システムSATySFi: その後の発展と今後の課題 @第62回プログラミング・シンポジウム
静的型つき組版処理システムSATySFi: その後の発展と今後の課題 @第62回プログラミング・シンポジウム
 
Flink internals web
Flink internals web Flink internals web
Flink internals web
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internals
 
How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
Introduction to Assembly Language
Introduction to Assembly LanguageIntroduction to Assembly Language
Introduction to Assembly Language
 
Let's Get to the Rapids
Let's Get to the RapidsLet's Get to the Rapids
Let's Get to the Rapids
 
List intersection for web search: Algorithms, Cost Models, and Optimizations
List intersection for web search: Algorithms, Cost Models, and OptimizationsList intersection for web search: Algorithms, Cost Models, and Optimizations
List intersection for web search: Algorithms, Cost Models, and Optimizations
 
Sangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL JediSangam 18 - Database Development: Return of the SQL Jedi
Sangam 18 - Database Development: Return of the SQL Jedi
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmap
 
MLflow with R
MLflow with RMLflow with R
MLflow with R
 
SwapSkills css3
SwapSkills css3SwapSkills css3
SwapSkills css3
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go Programming
 
Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
 
10 Lessons Learned from using Kafka with 1000 microservices - java global summit
10 Lessons Learned from using Kafka with 1000 microservices - java global summit10 Lessons Learned from using Kafka with 1000 microservices - java global summit
10 Lessons Learned from using Kafka with 1000 microservices - java global summit
 

More from T. Suwa

More from T. Suwa (7)

SATySFi 最近の発展と目下実装中の変更
SATySFi 最近の発展と目下実装中の変更SATySFi 最近の発展と目下実装中の変更
SATySFi 最近の発展と目下実装中の変更
 
SATySFiのこれからの課題たち
SATySFiのこれからの課題たちSATySFiのこれからの課題たち
SATySFiのこれからの課題たち
 
多段階計算の型システムの基礎
多段階計算の型システムの基礎多段階計算の型システムの基礎
多段階計算の型システムの基礎
 
ラベルなしオプション引数の型システムと型推論
ラベルなしオプション引数の型システムと型推論ラベルなしオプション引数の型システムと型推論
ラベルなしオプション引数の型システムと型推論
 
レコード計算の多相型システムと型推論
レコード計算の多相型システムと型推論レコード計算の多相型システムと型推論
レコード計算の多相型システムと型推論
 
Macrodown -MLが使えるML-
Macrodown -MLが使えるML-Macrodown -MLが使えるML-
Macrodown -MLが使えるML-
 
TeX言語の展開制御による文書の構造化(TeXユーザの集い2014)
TeX言語の展開制御による文書の構造化(TeXユーザの集い2014)TeX言語の展開制御による文書の構造化(TeXユーザの集い2014)
TeX言語の展開制御による文書の構造化(TeXユーザの集い2014)
 

Recently uploaded

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Recently uploaded (20)

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 

静的型つき組版処理システムSATySFi @第61回プログラミング・シンポジウム