Lately at work, I’ve been fortunate enough to work on a JSON API which I was given the freedom to write in Yesod. I was a bit hesitant at first since my only Yesod experience has been richer html-based sites and I wasn’t sure what support (if any) there was for strictly JSON APIs. Rails has a number of conveniences for writing concise controllers and standing up APIs quickly – I was afraid Yesod m
Interactive code snippets not yet available for SoH 2.0, see our Status of of School of Haskell 2.0 blog post In the first Haskell Cast podcast Rein Henrichs and Chris Forno interviewed Edward Kmett in part about lens and it was suggested that Prisms don't have the same kind of introductory tutorial treatment. That's a shame, though. Prisms arise naturally all the time when using sum types. You co
Learning Haskell I’ve been learning Haskell off and on for the past few months. It’s pretty awesome, but definitely a challenging language to learn. I’ve had exposure and experience with functional programming for a couple years now (first with Scala, then/currently with Clojure, and some Erlang), and while those concepts are fairly well cemented in my brain, Haskell has a bunch of other stuff tha
先日Yesod勉強会第2回でHaskellでJSON Web APIを作る話しをしました。 内容的には下記のような感じです。 Web開発はクライアントサイドの技術が発達して、Web APIを作る機会が多くなった最近のフロントエンドは難しいし、分業したほうがいいっぽいYesodは独自技術&フルスタックすぎて分業辛いではscotty + persistent + aesonでJSON Web API作ろうぞなんか想像以上の相性の良さ。幸せになれそうなイキフンがビシビシ来てる発表資料はこちら。 ちなみにscottyはsinatraみたいな奴、aesonはJSONライブラリ、persistentはORマッパーです。 何しろaeson + persistentの相性がバッチリでした。発表後に@thimuraさんが見つけた じつは persistent のスキーマ定義で、テーブル名の横に js
JSON を扱うライブラリで一番簡単に見つかるのは Text.JSON ですが、しばらく使ってると、あまりの使いにくさに発狂しそうでした。 ということで他のを探した結果、Data.Aeson というのがかなりよさげだったので、これを使うことにしました。 しばらく使ってみた感じかなり良かったので、いくつか代表的な使い方を書いてみます。 インストール aeson ではなく、aeson-native を入れて下さい。 cabal install aeson-native import それぞれのコードは、これらの import (と LANGUAGE プラグマ)が先頭にあると思ってください。 {-# LANGUAGE OverloadedStrings #-} import Control.Applicative (Applicative,pure,(<$>),(<*>)) import Con
Henry Laxen June 1, 2008 Why My former website, which I started about ten years ago, is really beginning to show its age. The dynamic part of it was written with perl, MySQL, and HTML::Mason, which was (and in many respects still is) good technology, but about once a month or so I get an email that some page or other crashed. Getting those last few bugs out of your perl code, especially after not
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く