際際滷

際際滷Share a Scribd company logo
Japalisp
Lisp 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 A\っていうのは、
2 方忖を聞って、
3 もしその方忖が1だったら1を卦して、
4 それ參翌だったら
5 その方忖と、その方忖から1を哈いた方で
A\をしたY惚をかけたものを卦すんだよ。
Recursive Factorial function(5 lines of code)
^Japanese Language 101 for programmers ̄
1 A\っていうのは、
2 方忖を聞って、
3 もしその方忖が1だったら1を卦して、
4 それ參翌だったら
5 その方忖と、その方忖から1を哈いた方で
A\をしたY惚をかけたものを卦すんだよ。
Recursive Factorial function(5 lines of code)
De?ne A\
Using 方忖 (as arguments)
If 方忖 == 1 then return 1
Elseほ
Multiply 方忖 by the result of i
A\ with 方忖 - 1
^Japanese Language 101 for programmers ̄
1. Confusing Structure
1 A\っていうのは、
2 方忖を聞って、
3 もしその方忖が1だったら1を卦して、
4 それ參翌だったら
5 その方忖と、その方忖から1を哈いた方で
A\をしたY惚をかけたものを卦すんだよ。
De?ne A\
Using 方忖 (as argument
If 方忖 == 1 then return 1
Elseほ
Multiply 方忖 by the resul
A\ 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
A\ with 方忖 - 1
We heavily depend on Particle(suf?xes) to separate words
as well as to indicate the meaning of the sentence.
5 その方忖と、その方忖から1を哈いた方で
A\をしたY惚をかけたものを卦すんだよ。
^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

More Related Content

Japalisp -Lisp like language for Numeric computation with natural Japanese language-

  • 1. Japalisp Lisp like language for numeric computation with natural Japanese Language
  • 2. Japanese Programmer I¨m here You¨re here A lot of people I know are here
  • 3. "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 ̄
  • 4. 1 A\っていうのは、 2 方忖を聞って、 3 もしその方忖が1だったら1を卦して、 4 それ參翌だったら 5 その方忖と、その方忖から1を哈いた方で A\をしたY惚をかけたものを卦すんだよ。 Recursive Factorial function(5 lines of code) ^Japanese Language 101 for programmers ̄
  • 5. 1 A\っていうのは、 2 方忖を聞って、 3 もしその方忖が1だったら1を卦して、 4 それ參翌だったら 5 その方忖と、その方忖から1を哈いた方で A\をしたY惚をかけたものを卦すんだよ。 Recursive Factorial function(5 lines of code) De?ne A\ Using 方忖 (as arguments) If 方忖 == 1 then return 1 Elseほ Multiply 方忖 by the result of i A\ with 方忖 - 1 ^Japanese Language 101 for programmers ̄
  • 6. 1. Confusing Structure 1 A\っていうのは、 2 方忖を聞って、 3 もしその方忖が1だったら1を卦して、 4 それ參翌だったら 5 その方忖と、その方忖から1を哈いた方で A\をしたY惚をかけたものを卦すんだよ。 De?ne A\ Using 方忖 (as argument If 方忖 == 1 then return 1 Elseほ Multiply 方忖 by the resul A\ with 方忖 - 1 Often, latter word conveys the meaning of that sentence. ^Japanese Language 101 for programmers ̄
  • 7. 2. Complicated Delimiter 5 Multiply 方忖 by the result of invoking A\ with 方忖 - 1 We heavily depend on Particle(suf?xes) to separate words as well as to indicate the meaning of the sentence. 5 その方忖と、その方忖から1を哈いた方で A\をしたY惚をかけたものを卦すんだよ。 ^Japanese Language 101 for programmers ̄
  • 8. 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!