Skip to content

Instantly share code, notes, and snippets.

View i2y's full-sized avatar
🐈‍⬛

Yasushi Itoh i2y

🐈‍⬛
View GitHub Profile
@i2y
i2y / 「Introducing the Jet Programming Language」の事前資料.md
Last active September 20, 2017 10:35
「Introducing the Jet Programming Language」の事前資料

これはRubyKaigi 2017での発表「Introducing the Jet Programming Language」の事前資料です。

「Introducing the Jet Programming Language」

近年、並列処理、分散処理を記述しやすく、耐障害性のあるプログラムを作りやすいという理由で、Erlangが注目を集めています。その一方で、Erlang言語のシンタックスは普及している言語(たとえばPythonやJava、Rubyなど)のそれとは大きく異なるため、多くのプログラマーにとってErlangの習得は容易ではないようです(私の主観です)。

その問題を解消するため、さまざまな言語がErlangのVM上で実現されています(Reia、LFE、Elixir、ErRubyなど)。

本発表では、私が作ったErlang VM上で動作するRuby風言語『Jet』をご紹介します。 尚、既にJetをGithubで公開していますが、発表までに仕様と実装を変更するかもしれません。

@i2y
i2y / timer.mochi
Created April 29, 2015 17:37
RxPY example in Mochi
# usage: mochi -no-mp timer.mochi
# original:
# https://github.com/ReactiveX/RxPY/blob/master/examples/parallel/timer.py
import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
@i2y
i2y / list.mochi
Last active August 29, 2015 14:20
Mochi - exmaple 2
record Cons(v, lis:List)
List = union(type(None), Cons)
match Cons(1, Cons(1, None)):
Cons(1, Cons(1, None)): print("match!")
_: print("no match!")
# -> "match!"
@i2y
i2y / gist:e265db2de4962e63fa86
Last active August 29, 2015 14:20
Mochi - example
data List:
Value(n)
Cons(v:Value, list:List)
match Cons(Value(1), Cons(Value(1), Value(2))):
Cons(Value(1), Cons(Value(1), Value(2))): print("match!")
_: print("no match!")
# -> "match"