Go here: https://github.com/soupi/rfc/blob/master/fun-compilers.md
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
#!/usr/bin/env cabal | |
{- cabal: | |
build-depends: base, mtl, containers, uniplate | |
ghc-options: -Wall | |
-} | |
-- | An example of a kind inference for data types using | |
-- unification-based constraint solving. | |
-- | |
-- See the blog post: |
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 LambdaCase #-} | |
-- http://gilmi.xyz/post/2016/10/14/lisp-to-js | |
module Main where | |
import Control.Applicative (Alternative, empty, (<|>)) | |
import Control.Arrow (first, (***)) | |
import Data.Bool (bool) | |
import Data.List (intercalate) |
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
#!/usr/bin/env cabal | |
{- cabal: | |
build-depends: base, mtl, containers, uniplate | |
ghc-options: -Wall | |
-} | |
-- | An example of a kind inference for data types using | |
-- unification-based constraint solving. | |
-- |
- https://www.edx.org/course/how-code-simple-data-ubcx-htc1x
- https://www.edx.org/course/how-code-complex-data-ubcx-htc2x
Might be good to alternate topics with practical programming topics, or try to practice what you learn with code.
Git is a very popular Version Control system. A version control system is used to manage software projects. It lets you save the state of your code at different stages/versions so that you can have a ‘history’ of it, it let’s you compare changes throughout the history, have remote backups, collaborate with other people, and a lot more.
Other alternatives to git exist: Mercurial, VCS, SVN, TFS, Darcs, and more. But git is by far the most popular one so might as well learn that.
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
{-# options_ghc -Wall #-} | |
{-# language LambdaCase #-} | |
-- | Run repl with: | |
-- | |
-- > cabal repl --build-depends containers --build-depends mtl | |
-- | |
-- or | |
-- | |
-- > stack exec --package containers --package mtl -- ghci |
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 (main) where | |
import Web.Scotty | |
import Control.Monad.IO.Class | |
import Network.Wai.Middleware.RequestLogger | |
import Network.Wai.Middleware.Static | |
import Network.Wai.Parse |
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
module Main where | |
import Prelude | |
import Data.Maybe | |
import Control.Monad.Eff | |
import Graphics.Canvas as C | |
import Signal as S | |
import Signal.DOM as S |
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
5,249,078,184 bytes allocated in the heap | |
234,375,952 bytes copied during GC | |
9,022,600 bytes maximum residency (8 sample(s)) | |
1,733,392 bytes maximum slop | |
24 MiB total memory in use (0 MB lost due to fragmentation) | |
Tot time (elapsed) Avg pause Max pause | |
Gen 0 5100 colls, 0 par 0.323s 0.328s 0.0001s 0.0005s | |
Gen 1 8 colls, 0 par 0.020s 0.020s 0.0025s 0.0056s |
NewerOlder