Data Engineering Study #4 の資料です https://forkwell.connpass.com/event/189259/

Stream で hash を計算する stream_hash | Hex 何故無かった。 github.com "test/fixture/xyzxyz.txt" |> File.stream! |> StreamHash.hash(:sha512) |> Enum.to_list |> hd # <<215, 133, 241, 243, 115, 159, 59, 127, 111, 242, 140, 106, 171, 211, 130, 48, # 174, 198, 241, 236, 195, 112, 105, 150, 106, 133, 78, 249, 2, 178, 132, 254, # 50, 181, 85, 46, 183, 97, 187, 7, 38, 17, 26, 188, 232, 143, 152, 210, 71, 54, # 245, 48
activesphere For many problems in programming, the most straightforward solution is to transform a list (E.g. map/filter/reduce etc over it). Once in a while, there will be problems which could be solved with list and transformations, except that the list is big and consumes lot of memory. Let’s say you want to export records in database as a csv report, it might not be possible to load the entire
Nodeのアドベントカレンダー、既に終わった枠が空いていて、この際書きたいネタがあったんで参加しました。宜しくお願いします。 アドベントカレンダーの時期だけ出没する弱い日曜Haskellerです。普段の実務ではNode.jsにお世話になってます。宜しくお願いします。 さて、みなさんStream API使ってますか?Node.jsといったら非同期ですよね、やっぱり。しかしながら、JavaScriptでも他の言語でも、非同期処理自体は注目されているものの、まだexperimentalという感じで様々なAPIが考案されては消えていき、また元々そういう文化が根強くなかったところから来た人たちにとって、こういう文化はちょっと立ち入りづらいところもあるかもしれませんね。 今日は、主にそういう人たちに向けて、まず非同期の色々なAPIの紹介、そしてその中でのストリームのメリット、そして実際のStream
TL;DR: Elixir - a language that positively celebrates the use of macros I’ve been picking up some Elixir so I can try my hand at a new project I want to build using the Erlang/OTP ecosystem. Elixir uses lots and lots of compile-time macros. The language’s pervasive use of macros is unprecedented in my experience. Most (all?) of the core features of Elixir (its special forms) are (non-overridable)
Today we are glad to announce the official release of GenStage. GenStage is a new Elixir behaviour for exchanging events with back-pressure between Elixir processes. In the short-term, we expect GenStage to replace the use cases for GenEvent as well as providing a composable abstraction for consuming data from third-party systems. In this blog post we will cover the background that led us to GenSt
Elixir では Stream モジュールを使って、遅延評価と無限リストを扱うことができるがそれによりエラトステネスのふるいを、Haskell と同じように無限リストを使った記述ができるか・・・というのが今回の試み。結果としては、カッとなれば、できる。 以下、Stream の解説も交えてお届けする。 Enumerable プロトコルと Enum および Stream Elixir の Enum モジュールには map/2 や filter/2 や zip/2 など、コレクション操作に必要な関数が多数実装されている。以下はそのドキュメントの例である。Functions のところに Enum の関数が列挙されているのが分かる。 ちなみにこのドキュメント閲覧は Dash の画面。自分は主に iOS 開発のドキュメント閲覧によく使っているが、見ての通り Elixir のドキュメント参照にも便利。
View Source Enumerables and Streams While Elixir allows us to write recursive code, most operations we perform on collections is done with the help of the Enum and Stream modules. Let's learn how. Enumerables Elixir provides the concept of enumerables and the Enum module to work with them. We have already learned two enumerables: lists and maps. iex> Enum.map([1, 2, 3], fn x -> x * 2 end) [2, 4, 6
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く