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
COST CENTRE MODULE SRC no. entries %time %alloc %time %alloc | |
MAIN MAIN <built-in> 46 0 0.0 0.0 100.0 100.0 | |
CAF Main <entire-module> 91 0 0.0 0.0 100.0 100.0 | |
genACriteria Main app/Main.hs:10:1-16 118 1 0.0 0.0 0.0 0.0 | |
genAFactor Main app/Main.hs:8:1-18 103 1 0.0 0.0 0.0 0.0 | |
genBCriteria Main app/Main.hs:11:1-16 112 1 0.0 0.0 0.0 0.0 | |
genBFactor Main app/Main.hs:9:1-18 98 1 0.0 0.0 0.0 0.0 | |
genModulo Main app/Main.hs:12:1-22 100 1 0.0 0.0 0.0 0.0 | |
main Main app/Main.hs:(48,1)-(50,36) 92 |
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
const INPUT: &str = include_str!("../input.txt"); | |
fn convert_input(input: &str) -> Vec<u32> { | |
input | |
.to_owned() | |
.chars() | |
.filter_map(|s| s.to_digit(10)) | |
.collect() | |
} |
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
import cats.free.Free | |
import cats.free.Free.liftF | |
import cats.~> | |
import cats.effect.IO | |
object Brainfuck { | |
type Program[A] = Free[Brainfuck, A] | |
sealed trait Brainfuck[A] | |
case object IncPtr extends Brainfuck[Unit] |
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 "Timer.hpp" | |
void Timer::init() | |
{ | |
m_lastLoopTime = getTime(); | |
m_timeCount = 0.0; | |
m_fps = 0; | |
m_fpsCount = 0; | |
m_ups = 0; | |
m_upsCount = 0; |
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 DeriveFunctor #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{- | |
Explores Free Monads (DSLs) and Cofree Comonads (interpreters) and | |
their relationship. | |
Most of the code in this file comes from (1) below. Only minor | |
modifications are made - semantics are preserved. |
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 OverloadedStrings #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
import Prelude | |
import Data.String | |
import Control.Monad.Free | |
type Program a r = Free (AST a) r | |
data AST a next = |
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 OverloadedStrings #-} | |
module Main where | |
import Network.Wai (pathInfo, Request, requestMethod, Response, responseLBS, ResponseReceived) | |
import Network.Wai.Handler.Warp (run) | |
import Network.HTTP.Types (status200, status401) | |
-- note: type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived | |
application :: Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived |
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
defrnaqEQG1JcjUVIiz)YawePwesLlrrKpHcPmksjlkfQSkcK8kcenle5wkc7cH(ffHggfLJrfTmkQEgrW0icDnfjBtrPVru04iIAXPqsVdPQ5HcP6EKIdsuYcvK6HerMivOlIOAJOq8rsPgjfrDscyLeAMevotkuQDIc(jrPgkfPokku0sjk8uknveCvffBLaHZIcLCkIQUPIiEybsTxL(lkny4WkSyfr9yKYKPkxwvBMG(SIQrJOCAvA1OqHxtrYSjv3MQA3K8BQ0WjshNIGLJKNtHPJQRRITJI(oku14jq15iq515syT(R1BTElH1k0vXTxgLFzW8PwR31qQ(WbcVGZxRjPwl1p)6Qi4G0FT8xW5R9QUCwAU(s1F(7Tm4CTdA8RRYyjSwHx11GSLWA9CzPDm4U(70RL2XG76V2XHAW(kMeP5Eu8NkOjyg9lFTx1LVewRNllTJb31FNET0ogCx)1ooud2xXKOuTNrahdAcZOUCTNrah1IoP6dhEk6KN(ehhQb7RysKM7rXFQGMGz0NyIJd1G9vmjAqBO0(hubnbHhfn(1vPL8jgcHGqxQWvJtjqYPedEUjgcHqiec6U0g6b9RYubnbTFUakMVI7s5Ga83xURYuArNu9HdpfDKcx5PpXqiecHq4kmOFvMkWj7vjgcHqiecHqiO7sBOhud)NuGLuGLu4k3Z81dAcA)Cb4VVakHUAPFvMsE6tmecHqiecHWvyqn8)Ggnb6KKRY7vgd(FOcEmQtAgBbnJZ)nOlWj7vjgcHqiecHqiecHW4qnyFftIVjCUsL(Ebnbo15PpXqiecHqiecHqieghQb7Rys0)OZVs1VpvqtWzqqgmJO5ZktzgeubNeDovtkT06k3Z81NywbBk5nrNtjp9jgcHqiecHqiecHa1Zpuk6tmecHqiecHq4vEjgcHqiecVYlXqieELxIHqimoud2xXK4BcNRuPVxqtq4q34PpXx5LyIJd1G9vmjAqBO0(huAjp9lF5R96Twj5Q8ELXG)hQGhJMG |
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
cabal install GLUT --ghc-options="-optl-Wl,-framework,GLUT" --reinstall --jobs=1 |
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 FlexibleContexts #-} | |
import Data.Conduit | |
import qualified Data.Conduit.List as CL | |
import Network.HTTP.Conduit | |
import Control.Concurrent.Async (mapConcurrently) | |
import Control.Concurrent.MVar | |
import Control.Monad.IO.Class (liftIO) | |
import Control.Monad.Trans.Control (MonadBaseControl) |