2017-05-09から1日間の記事一覧

Haskellを初めから

こちらがよいことに気づいた Stackを入れて、新しいプロジェクト "h170505"を作る 冒頭のサイトにも紹介されているOpenGLTutorial1をやってみる Main.hsの書き換え .../h170505/app/Main.hs を書き換える import Graphics.UI.GLUT main :: IO () main = do (…

乱数を使う

こちらのMain.hsを動かす import System.Random.MWC main :: IO () main = withSystemRandom . asGenIO $ \gen -> do -- 基本的な乱数生成 r0 <- uniform gen :: IO Int r1 <- uniform gen :: IO Double r2 <- uniform gen :: IO Bool print (r0, r1, r2) --…

OpenGLTutorial2

立体的にCubeを描き、回す .cabal name: h170505 version: 0.1.0.0 -- synopsis: -- description: homepage: https://github.com/githubuser/h170505#readme license: BSD3 license-file: LICENSE author: Author name here maintainer: example@example.com…