This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BangPatterns #-} | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Monad | |
import Control.Monad.State | |
import Data.Array | |
import Data.Array.IO | |
import Data.Bits | |
import Data.Bits.Extras | |
import qualified Data.ByteString.Char8 as B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell #-} | |
import Prelude hiding (catch) | |
import Control.Applicative hiding (optional, many, (<|>)) | |
import Control.Exception hiding (try) | |
import Control.Monad | |
import Data.Lens.Common | |
import Data.Lens.Template | |
import Data.List | |
import Data.Maybe | |
import Database.HDBC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" -*- vim: set sts=2 sw=2 et fdm=marker: ------------- vim modeline -*- | |
" [Pathogen] ------------------------------------------ {{{1 | |
" call pathogen#infect() | |
" Basic Settings -------------------------------------- {{{1 | |
syntax on | |
set nocompatible | |
filetype plugin indent on | |
set hlsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╭─ray at lap >>= /tmp | |
╰─% jruby -v | |
Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/ext/posix/JavaSecuredFile | |
at org.jruby.RubyInstanceConfig.<init>(RubyInstanceConfig.java:407) | |
at org.jruby.Main.<init>(Main.java:96) | |
at org.jruby.Main.main(Main.java:185) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NoMonomorphismRestriction #-} | |
import Control.Applicative hiding ((<|>), many) | |
import Control.Monad | |
import Data.List | |
import Data.List.Split (splitOn) | |
import Data.Maybe | |
import Data.Time.Format | |
import Data.Time.Calendar | |
import Data.Time.Calendar.WeekDate | |
import Data.Time.Clock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{port,8888}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ls ~/gentoo/usr/lib/libpython2.7.so.1.0 | |
/home/sfr/gentoo/usr/lib/libpython2.7.so.1.0 | |
>>> Installing (1 of 1) dev-lang/ruby-1.9.3_p194-r1 | |
/home/sfr/gentoo/usr/bin/python2.7: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory | |
* ERROR: dev-lang/ruby-1.9.3_p194-r1 failed (prerm phase): | |
* filter-bash-environment.py failed | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <cmath> | |
#include <functional> | |
#include <numeric> | |
#include <unordered_map> | |
#include <vector> | |
#include <stdint.h> | |
#include <stdio.h> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% xargs -i sh -c 'echo -n "{} @ "; pdftotext "{}" - 2>/dev/null | ruby -e "require \"lingua\"; p Lingua::EN::Readability.new(STDIN.read).flesch"' < /tmp/books | sort -t@ -k2n | |
scheme/sicp.pdf @ 42.013863374063305 | |
smalltalk/Joy of Smalltalk.pdf @ 47.861949781603954 | |
falcon/Falcon Survival Guide.pdf @ 52.899363840845155 | |
ruby/The Rails 3 Way.pdf @ 55.05629641057524 | |
c/The C Programming Language.pdf @ 55.17174939358114 | |
python/Learning Python.pdf @ 56.67476157760058 | |
c++/C++ Primer.pdf @ 57.237840064930595 | |
ruby/The Ruby Programming Language.pdf @ 57.75836947304364 | |
haskell/Real World Haskell.pdf @ 58.23158652909788 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let huangBingchao a = | |
let n = Array.length a in | |
let rec go2 j i l = | |
if a.(i) < 0 then | |
(j, l) | |
else | |
let ii = a.(i) in | |
a.(i) <- j; | |
go2 (lnot i) ii (l+1) in | |
let rec go i mx = |
OlderNewer