Over the last few days, we’ve looked at a few extensions that can extend the notion of type classes in Haskell. First, we saw that nullary type classes remove the requirement that a type class varies over a single type by allowing it mention no types at all, and yesterday we saw how type families can be used to associate more types against a single type. Today, we’re going to revisit yesterdays ex
Today, we’re going to look at an extension that radically alters the behavior of GHC Haskell by extending what we can do with types. The extension that we’re looking at is known as type families, and it has a wide variety of applications. {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} import Control.Concurrent.STM import Control.Concurrent.MVar import Data.Foldable (forM_) import
ekmett先生のlensに関して Lens'は便利に使えはするけど、Prism,Iso,Traversal,Foldみたいなのは触ったことがなかったので調べた。 Lensの利用 1 import Control.Lens して 1 2 3 4 5 6 >>> ("hello",("world","!!!")) ^. _2 . _1 "world" >>> ("hello",("world","!!!")) & _2 . _1 .~ 42 ("hello",(42,"!!!")) >>> ("hello",("world","!!!")) & _2 . _1 %~ map toUpper ("hello",("WORLD","!!!")) みたいに使う。優先順位は以下のようになっている: 1 2 3 >>> ("hello",("world","!!!")) ^. (_2 . _1) >>
去年のアドベントカレンダーの続きです! Coqみたいな定理証明器のおもちゃみたいなのをHaskellを使って1年と48時間ぐらいで作れるかな?って話です。 去年の記事は http://qiita.com/kikx/items/10d143edc090bdfec477 http://qiita.com/kikx/items/b0eda41bc7b9036ac18d http://qiita.com/kikx/items/57aad1867b89f8955611 です。 去年の記事で型検査と計算はできたので、証明支援を行う部分を作っていきます。 対話環境の作成 対話的にコマンドを実行するコードを書くのは本質とは関係ないので、なるべく手抜きで作りましょう。ghciをそのまま使う方法もありますが、グローバルなIORefを引数で渡して回ったりしないといけないのでちょっと使いにくいです。簡単な方法とし
はじめに OCamlで音声データにフィルタを掛けてリアルタイム再生するのを試します(多分こういうのはCかC++あたりでやるのが良いと思いますが)。 スペック スペックが高くないマシンでもリアルタイム再生出来るのを確認したいのでRaspberry Piで試します。 マシン: Raspberry Pi (Model B) OS: RASPBIAN Debian Wheezy (September 2014) USB Audio I/F: BEHRINGER UCA202 使用するフィルタ 今回はReaktorで作った次のローパスフィルタをOCamlで実装します。Reaktorは半額セールのときに買うのがおすすめです。 各オブジェクトの入出力に数値以外の文字列が書かれているものがありますが、文字列が一致しているところは線で繋がっていると考えて良いです。文字列で接続を表現することによりスパゲッティ
There is an old and great schism in the OCaml community. The schism is between two concurrency libraries - Async and Lwt. As usual for these things, the two are very similar, and outsiders would wonder what the big deal is about. The fundamental problem of course is that they’re mutually incompatible. The result of this is a split OCaml world with almost no interoperability, and duplication of eff
By choosing the right language for the job, developers can optimize productivity and project outcomes. 3. Linux and Open Source for Developers Linux remains a developer’s paradise with its flexibility, tools, and open-source support. Top Tools for Developers in Linux tmux: Terminal multiplexer for managing multiple sessions. htop: A process viewer for real-time resource monitoring. Docker: For con
A while back I released the unification-fd library, which gives a generic implementation of first-order unification of non-cyclic terms. I've given a few talks on how the library is implemented and what optimizations it performs, but that's not the topic for today. Today, I'm going to talk about how to use it. Unification is a widely useful operation and, consequently, comes in many different flav
What: The eighth meeting of LLVM Developers and Users. When: October 28-29, 2014 Where: DoubleTree by Hilton - San Jose, CA A huge thank you to our sponsors! Diamond Sponsors: Apple QuIC Platinum Sponsors: Google Sony Computer Entertainment America Gold Sponsors: Interested in being a Gold Level Sponsor? See below. Silver Sponsors: HSA Foundation Mentor Embedded Bronze Sponsors: ARM The LLVM Found
What is HRR? Haskell Relational Record (HRR) is a query generator based on typed relational algebra and correspondence between SQL value lists and Haskell record types, which provide programming interfaces to Relational DataBase Management Systems (RDBMS). Abstracted - relations are expressed as high level expressions and they are translated into SQL statements. Drivers are provided for DB2, Postg
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く