Skip to content

Instantly share code, notes, and snippets.

Avatar

Justus Sagemüller leftaroundabout

  • Høgskulen på Vestlandet
  • Bergen
View GitHub Profile
View hs-memoised-splines.hs
{-# LANGUAGE OverloadedLists #-}
import qualified Data.Vector.Unboxed as VU
import Data.Vector.Unboxed (Vector, (!))
import Data.MemoTrie (memo2)
import Graphics.Dynamic.Plot.R2
import Text.Printf
newtype Knots = Knots {getIncreasingKnotsSeq :: Vector Double}
@leftaroundabout
leftaroundabout / Main.hs
Last active Aug 16, 2020
ContinAbsvalParametrisation.hs
View Main.hs
import Graphics.Dynamic.Plot.R2
import Data.Semigroup
import Control.Monad (join)
f, g :: Double -> Double
g t = t^2
f t
| t<0 = -t^2
| otherwise = t^2
View ObjIndexedCategory.hs
#!/usr/bin/env stack
{- stack --resolver lts-12.0 runghc -}
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
{-# LANGUAGE DataKinds, PolyKinds, KindSignatures, TypeInType #-}
{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, GADTs #-}
import Prelude hiding ((.), id)
import qualified Prelude
import Data.Kind
View MoonEscape.hs
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
import Math.LinearMap.Category
import Data.VectorSpace
import Linear.V3
import Data.AffineSpace
import Control.Arrow
import Data.Semigroup
import qualified Diagrams.Prelude as Dia
import Graphics.Dynamic.Plot.R2
View Chord-waveforms.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View diagrams-sizespec.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View MathJax-mathcal.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View braillster.hs
module Main where
import Graphics.Text.PCF
import Data.Foldable (fold)
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
let style = case ( any (`elem`["-b","--bold"]) args
View LegendreSawtoothGibbs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CommonFreeComonads.md

Cofree (Const c) ~~ Writer c

Given

data Const c a = Const c

we have

data Cofree (Const c) a
     = a :< Const c
You can’t perform that action at this time.