- OTP とは何か
- 「よくわからないけど使ったほうがいいっぽい」から「なぜ使うのかを意識して使う」になるための導入(になるといいな)
- 詳細な API とかには触れません
ちょっと前の話ですが、トレジャーデータという会社を辞めました。えぐいほどいい会社だし、全世界のIoTデータをさばくやつを作るのは技術者として死ぬほど楽しいんだろうなと思ったけど、僕はあるスタートアップに行くことにしました。
カンムという会社です。よろしくお願いします。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ca_cowboy_middleware). | |
-behaviour(cowboy_middleware). | |
-export([execute/2]). | |
execute(Req, Env) -> | |
{ok, ReqWithCorsHeaders} = set_cors_headers(Req), | |
Method = cowboy_req:method(ReqWithCorsHeaders), |
あるプログラミング言語で実際にWebAppを開発できるようになるまで、何が必要だろうか。言語仕様の習得は終えているとしよう。おそらく、最低限以下のような知識が必要だと思われる。とりあえずElixirについて知っていることを書いた。
標準添付です。
clojureのleiningenに強い影響を受けてる。らしい。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fifocache). | |
-export([new/1, push/3, lookup/2]). | |
%%----------------------------------------- | |
%% FIFO cache | |
%% | |
%% - Representation | |
%% | |
%% {Map, Array, Size, Bottom, Top, NewFlag} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(load "./stream.scm") | |
(define (average x y) (/ (+ x y) 2)) | |
(define (sqrt-improve guess x) | |
(average guess (/ x guess))) | |
(define (sqrt-stream x) | |
(define guesses |
iex(1)> import SigilMruby
nil
iex(2)> %m( [1,2,3].map do |i|
...(2)> i + 1
...(2)> end) |> Enum.each(&IO.inspect/1)
2
3
4
:ok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define false #f) | |
(define true #t) | |
(define (p a) | |
(print a)) | |
(define (pb a) | |
(print a) | |
(print "")) |
NewerOlder