Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{- cabal: | |
build-depends: |
This file contains hidden or 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
// Source: https://twitter.com/calebporzio/status/1151876736931549185 | |
<div class="flex"> | |
<aside class="h-screen sticky top-0"> | |
// Fixed Sidebar | |
</aside> | |
<main> | |
// Content | |
</main> |
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-| Sample code struggling with reader Eff | |
uses code from https://github.com/TaktInc/freer | |
-} |
This file contains hidden or 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
||| A Straightforward translation of the | |
||| [ArduinoML](https://github.com/mosser/ArduinoML-kernel) use case | |
||| with a bit of syntax extension for a smooth DSL experience | |
module ArduinoBasic | |
import Data.Union | |
namespace model | |
data SIGNAL = LOW | HIGH |
This file contains hidden or 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
-- in response to https://twitter.com/jfischoff/status/948768178070470656 | |
{-# LANGUAGE TemplateHaskell #-} | |
module Main where | |
import Control.Concurrent (threadDelay) | |
import Control.Monad.IO.Class (liftIO) | |
import Data.Traversable (for) | |
import Text.Printf (printf) | |
import Control.Distributed.Process (Process, NodeId, spawn) | |
import Control.Distributed.Process (SendPort, newChan, sendChan, receiveChan) |
This file contains hidden or 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
defmodule Box do | |
defmacro __using__(_env) do | |
quote do | |
import Box | |
end | |
end | |
@doc """ | |
Define module with struct and typespec, in single line |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
This file contains hidden or 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 | |
UndecidableInstances, RankNTypes, TypeOperators, TypeFamilies, | |
StandaloneDeriving, DataKinds, PolyKinds, DeriveFunctor, DeriveFoldable, | |
DeriveTraversable, LambdaCase, PatternSynonyms, TemplateHaskell #-} | |
import Control.Monad | |
import Control.Applicative | |
import Data.Singletons.TH | |
A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)
I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.
A functor is something that supports map
.
NewerOlder