メリークリスマス。 アドベントカレンダーの枠が埋まっていないので、ちょっとお邪魔してconduitをやります。 conduitはバージョン1.3系統で大きくAPIが変わっているのですが、日本語による新しい解説が見当たらないので、簡単にチュートリアルをやっていこうと思います。 Conduitは「読み込む→何かする→書き込む→繰り返し」みたいな処理をHaskellで書くためのライブラリ、またはフレームワークです。 本来、純粋なシーケンス相手であれば、こういう処理は得意なはずのHaskellなのですが、読み書きが入って来ると途端に話が複雑になります。 実質的な選択肢は3つ。 普通にdo文で手続き型っぽく書く Lazy IO なんかフレームワークを使う 1は実は最善策という説がありますが、やめておきましょう。2はトイプログラムには良いのですが、実用的にはいろいろ問題がある事が分かっています。 とい
Since I seem to be a one-trick pony, I decided to write yet again to compare streaming data in Haskell and Rust. This was inspired by a cool post I saw on Reddit about converting characters in the Latin alphabet into look-alikes in the Cyrilic alphabet. When reviewing the original code, I noticed that it was reading the full contents of the input into memory. Since I’m somewhat obsessed with strea
TL;DR: Sharing conduit values leads to space leaks. Make sure that conduits are completely reconstructed on every call to runConduit; this implies we have to be careful not to create any (potentially large) conduit CAFs (skip to the final section “Avoiding space leaks” for some details on how to do this). Similar considerations apply to other streaming libraries and indeed any Haskell code that us
The Haskell programming language community. Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more...
The Haskell programming language community. Daily news and info about all things Haskell related: practical stuff, theory, types, libraries, jobs, patches, releases, events and conferences and more... Does anyone here have any experience using pipes or conduit for a GUI? I've been exploring the Haskell GUI and OpenGL ecosystems for some personal projects. I really like the core ideas of FRP and re
Summary: I'm growing increasingly fond of the Conduit library. Here I give my intuitions and some hints I'd have found useful. Recently I've been working on converting the Hoogle database generation to use the Conduit abstraction, in an effort to reduce the memory and improve the speed. It worked - database generation has gone from 2Gb of RAM to 320Mb, and time has dropped from several minutes (or
Account Suspended This Account has been suspended. Contact your hosting provider for more information.
shell-conduit: Write shell scripts in Haskell with Conduit As part of my series of write-about-personal-projects, my latest obsession is writing shell scripts with Michael Snoyman’s Conduit. Here is my package, shell-conduit. It’s still in the experimental phase, but I don’t forsee any changes now for a while. Bash is evil I hate writing scripts in Bash. Until now, it was the easiest way to just w
Both the changes described in this blog post, and in the previous blog post, are now merged to the master branch of conduit, and have been released to Hackage as conduit 1.2.0. That doesn’t indicate stream fusion is complete (far from it!). Rather, the optimizations we have so far are valuable enough that I want them to be available immediately, and future stream fusion work is highly unlikely to
As most of us know, performance isn’t a one-dimensional spectrum. There are in fact multiple different ways to judge performance of a program. A commonly recognized tradeoff is that between CPU and memory usage. Often times, a program can be sped up by caching more data, for example. conduit is a streaming data library. In that sense, it has two very specific performance criterion it aims for: Con
Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications. January 16, 2014By Michael SnoymanView source on Github I've recently been working on some higher level analysis utilities based on top of conduit. A major component of this work is performing high-performance numerical calculations on large streams of data. So I was particularly i
Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications. October 10, 2013By Michael SnoymanView source on Github NOTE I strongly recommend reading this post on School of Haskell. It makes extensive usage of active code. In my last blog post, I made the case that automatic termination is the cause of a lot of problems in both pipes and co
Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications. October 9, 2013By Michael SnoymanView source on Github This blog post has actually been through many iterations as I've investigated the problems more thoroughly. After looking at the various examples I'll be bringing below quite a bit, I've come to a conclusion: there is just one
How to reimplement the conduit parsing API in 50 lines of pipes code Michael's recent blog posts highlighted several deficiences of pipes-based parsing. Particularly, he emphasized that it was incompatible with idioms from the core pipes library, and I agree with that assessment. Programming with pipes-parse is a different beast from programming with vanilla pipes and pipes-parse idioms more close
Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications. September 24, 2013By Michael SnoymanView source on Github This blog post is in response to a post by Gabriel Gonzalez on perfect streaming. The issue he raises is a good one: how to do efficient processing of chunks of data, where each chunk may contain a large amount of data that
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く