用了 Kindle Paperwhite 2015 數日感想

  1. 如果你有看大量網頁長文章的需求 (e.g. wiki or 教學文件),可以利用 send to kindle 這個 chrome plugin 來閱讀。在不考慮排版的情況下,KPW 會比螢幕舒服很多很多。我在 iOS 上是透過第三方軟體達成把看到的網頁經由 send to kindle 這條路送到 kindle 上 XD。
  2. 中文雜書還是很少,不過基本上我也不太看 XD 目前是以好讀網站 (比較老版權問題不大的書) 及潑墨書坊為主。如果對簡體中文不排斥的話,其實對岸會有很多嘿嘿嘿的 epub 可以使用 kindlegen 轉成 mobi 在 KPW 上閱讀的,對岸還有多看軟體可以使用,不過我暫時還沒有去嘗試 XD。
  3. 英文的雜書的話,基本上是一個練習英文很好的載體,不過不能支持有聲書,但是如果是在 amazon 上買的話,可以用 android or iphone 進行同步。一開始看英文雜書誠心建議從短篇看起。如何利用 KPW 幫你看英文,這其實需要花很多時間說明,在此略過。
  4. 英文電腦書,如果買的是正版英文電腦書,基本上都會有 pdf, epub 及 mobi 可供選擇,如果要循序讀的時候,用 kindle 讀 mobi 是最佳的選擇之一。如果想要搜尋或跳著讀的時候,使用 iPad 或電腦是不錯的選擇。我曾經有考慮過 SONY DPT-S1,但是價格太貴,目前買不起。
  5. 對於 pdf 的話,如果是滿版 A4 的 pdf 的話,用 KPW 的橫向模式還是太小了 (btw 用 KPW 的橫向看東西有在打電動的感覺 XD),雙欄論文的話,基本上局部放大是勉強可看的,如果你有很多 pdf 的話,建議還是留一台 iPad 或者是買一台 SONY DPT-S1 在身上 (或者是心一橫直接印出來) 會比較好。
  6. KPW 其實是一個很輕很小的載體 (6 吋,204 克),一本英文小說大約為 105 g 左右,一本中文雜書大抵是 200 ~ 300 g 左右,英文工具書就更不用說了 XD,其實 KPW 會比很多書來的更好攜帶,只是閱讀習慣需要做出適度的改變。

Comments

murmur (9) - Just for fun - Add from 0 to n in parallel

I stuided the repa package today. I discover it supports parallel computation for both boxed type and unboxed type rather then only for unboxed type. It reminds me that I have to read the manual carefully.

Repa supports doing sum computation in parallel (see sumP in repa doc). I just write a parallel sum function for fun.

import Data.Array.Repa as Repa
import qualified Data.Vector.Unboxed as VU
import Control.Monad.Identity

sumR :: Int -> Double
sumR n = let
            xs = VU.enumFromN 0 n
        in
            runIdentity (Repa.sumAllP (Repa.fromUnboxed (Z :. VU.length xs) xs))

main = putStrLn $ show . sumR $ 100000000

Tomorrow's goal: Accelerate package.

Comments

[Haskell Practice] Cairo package

That's I tried to use cairo package to draw something.

The picture is drawed by the l-system formula. You can get more details from the wiki page L-system: Example 4: Koch curve.

The souce code is not released until I am satisfied with what I write XD.

Practice for L-system

Update: add practice for drgaon curve

Practice for dragon curve

Comments

murmur (8) - Keep going

No news is good news. That's what gwchen told me. How about me in the recent life ? Just back to the begining for learning something.

I have left my last job for four monthes. In these days, I have

  • Learned
    • basic Haskell programming (including basic Monad)
    • basic parallel and concurrent programming
    • basic linux system programming through reading TLPI
  • Practiced English
    • Watch CNN Student news for one and half month
    • Read/ Listen several Time articles in one month

What's the next step ? I don't know. The only thing I know is that I will following my mind.

Comments

[Haskell Practice] Primes

這個問題以前就寫過,只是剛好今天有機會重寫一下。

module Prime where

sqrtInt :: Int -> Int
sqrtInt = ceiling . sqrt . fromIntegral

genInspectList :: Int -> [Int]
genInspectList n
    | n < 5 = []
    | otherwise = takeWhile (<=n) $ 5 : [6*x + y | x <- [1..], y <- [1, 5]]

prime :: Int -> [Int] -> Bool
prime x is = all (\y -> x `mod` y /= 0) (takeWhile (<= sqrtInt x) is)

primes :: Int -> [Int]
primes x
    | x < 2 = []
    | x < 3 = [2]
    | x < 5 = [2, 3]
    | otherwise = [2, 3] ++ filter (`prime` is) ps
        where is = primes (sqrtInt x)
              ps = genInspectList x

ghci 執行結果如下

*Prime> primes 100
[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]

Comments