A. Let's do the clean installation of pandoc on Windows. Cabal tell us that something went wrong
>cabal install regex-pcre-builtin
Resolving dependencies...
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module MinPrint ( | |
MinPrint, Doc, | |
text, br, nest, | |
execMinPrint, printDoc | |
) where | |
import qualified Data.ByteString.Char8 as S |
[読書メモ][PFAD] | |
Pearls of Functional Algorithm Design | |
1 The smallest free number | |
====================================== | |
0からはじまる有限の連続した自然数の集合XがあってXからいくつか少数の | |
自然数を取り除いた集合Yを作る。 | |
ここで集合Xに存在してYに存在しない一番小さな自然数を探そうというとき、 |
Haskell:
fold_left f i [] -> i
fold_left f i (x:xs') -> fold_left f (f i x) xs'
fold_right f [] i = i
fold_right f (x:xs') i -> f x (fold_right f xs' i)
fold_right' f xs i = go id xs
#!/bin/env python | |
# -*- coding: utf-8 -*- | |
class Color: | |
RED = 1 | |
BLACK = 2 | |
class Element: | |
def __init__(self, key): | |
self.key = key |
注意: あくまで独自仕様です。Fedoraなどで提供されているものとは著しく異なります。
mkdir -p /home/yuga/haskell/rpmbuild/BUILD
mkdir -p /home/yuga/haskell/rpmbuild/BUILDROOT
mkdir -p /home/yuga/haskell/rpmbuild/SOURCES
mkdir -p /home/yuga/haskell/rpmbuild/SPECS
mkdir -p /home/yuga/haskell/rpmbuild/SRPMS
■2012/02/20 | |
(15:32:48 +0900) | |
バージョン管理ソフト Git にアクセス制御機能を追加する gitolite というのを試してみました。 | |
アクセス制御しても、Gitはリポジトリを簡単に clone できるので、 | |
誰かが公開してしまうことが容易なことを考えるとあんまり意味ないような気がしますが、 | |
みんなで共有リポジトリを立てて使う場合に、そこへのアクセスを容易に制御できるようになります。 |
lines' :: String -> [String] | |
lines' s = go id s | |
where | |
go ac [] = [ac ""] | |
go ac ('\r':'\n':cs) = ac "" : go id cs | |
go ac ('\r' :cs) = ac "" : go id cs | |
go ac ( '\n':cs) = ac "" : go id cs | |
go ac ( c:cs) = go (ac . (c:)) cs |
[読書メモ][PFAD] | |
Pearls of Functional Algorithm Design | |
2 A surpassing problem | |
====================================== | |
Introduction | |
-------------------------- |
--- haskelldb-2.2.2/src/Database/HaskellDB/Database.hs 2012-10-26 02:19:38.000000000 +0900 | |
+++ haskelldb-2.2.2/src/Database/HaskellDB/Database.hs 2013-01-17 09:21:06.501451400 +0900 | |
@@ -24,7 +24,7 @@ | |
(!.) | |
-- * Type declarations | |
, Database(..) | |
- , GetRec(..), GetInstances(..) | |
+ , GetRec(..), GetInstances(..), GetInstancesIO | |
, GetValue(..) | |
-- * Function declarations |