japalisp -lisp like language for numeric computation with natural japanese language-
TRANSCRIPT
JapalispLisp like language for numeric computation with natural Japanese Language
Japanese Programmer
I’m here
You’re here
A lot of people I know are here
"thinking about computing is one of the most exciting things the human mind can do (Little Schemer)“
For non-programmer Japanese (my friends)
For non-Japanese programmer (you)
“Japanese Language 101 for programmers”
1 階乗っていうのは、 2 数字を使って、 3 もしその数字が1だったら1を返して、 4 それ以外だったら 5 その数字と、その数字から1を引いた数で\ 階乗をした結果をかけたものを返すんだよ。
Recursive Factorial function(5 lines of code)
“Japanese Language 101 for programmers”
1 階乗っていうのは、 2 数字を使って、 3 もしその数字が1だったら1を返して、 4 それ以外だったら 5 その数字と、その数字から1を引いた数で\ 階乗をした結果をかけたものを返すんだよ。
Recursive Factorial function(5 lines of code)
Define 階乗 Using 数字 (as arguments) If 数字 == 1 then return 1 Elseほ Multiply 数字 by the result of invoking\ 階乗 with 数字 - 1
“Japanese Language 101 for programmers”
1. Confusing Structure
1 階乗っていうのは、 2 数字を使って、 3 もしその数字が1だったら1を返して、 4 それ以外だったら 5 その数字と、その数字から1を引いた数で\ 階乗をした結果をかけたものを返すんだよ。
Define 階乗 Using 数字 (as arguments) If 数字 == 1 then return 1 Elseほ Multiply 数字 by the result of invoking\ 階乗 with 数字 - 1
Often, latter word conveys the meaning of that sentence.
“Japanese Language 101 for programmers”
2. Complicated Delimiter
5 Multiply 数字 by the result of invoking\ 階乗 with 数字 - 1
We heavily depend on Particle(suffixes) to separate words as well as to indicate the meaning of the sentence.
5 その数字と、その数字から1を引いた数で\ 階乗をした結果をかけたものを返すんだよ。
“Japanese Language 101 for programmers”
AがB
AとB
AでCをする
AとBでCをする
(AをCとする)
3. yet Surprisingly simple tokenizer
A == Bは
A and Bは
Invoke C with Aは
Invoke C with A and Bは
(Let C be A)
“Japanese Language 101 for programmers”
So far, my tokenizer is about 100 lines of code!
Demo
kenzan100.github.io/japalispPlease visit for playground