Skip to content

Instantly share code, notes, and snippets.

@soupi
soupi / Json.hs
Last active November 11, 2019 19:34
A simple JSON EDSL
{- | An EDSL for defining and printing JSON values
-}
import Data.List (intercalate)
----------------
-- JSON Model --
----------------
-- | The JSONValue data type represents a JSON Value
@soupi
soupi / concat.hs
Created July 31, 2017 21:28
simple concatenative interpreter
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
import Control.Monad
import Data.Data
import Data.Typeable
import System.IO
import System.Exit
type Stack = [Lit]
@soupi
soupi / building-gathering.md
Last active November 11, 2019 19:34
building gathering rfc

title: Building Gathering: A Website For Announcing Group Events route: building-gathering authors: Gil date: 2017-04-25 tags: haskell, web, fp, spock


@soupi
soupi / Main.purs
Last active January 26, 2017 19:58
Try PureScript - slides edition
module Main where
import Prelude (($), (<>))
import Slides
import Slides.Remember
main = runSlidesAndRemember
[ slide "Slides" $
valign
[ image "https://gilmi.xyz/static/misc/ducks.gif"
@soupi
soupi / bower.json
Last active December 15, 2016 21:12
packages for try-purescript-slides
{
"name": "try-purescript-slides",
"license": "BSD-3-Clause",
"version": "0.1.0",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
@soupi
soupi / getting-started-haskell-stack.md
Last active November 11, 2019 19:35
Getting Started with Haskell using Stack

Note: you'll be able to submit pull request here

In this article we'll talk about installing a Haskell toolchain on your computer.

Installing a Haskell toolchain becomes really easy when you use Stack.

@soupi
soupi / PureScript-Ecosystem.md
Created June 27, 2016 17:29
Useful PureScript packages and tools

Basics

Necessities

  • purescript-prelude
  • purescript-console
  • purescript-debug
  • purescript-partial
  • purescript-psci-support
@soupi
soupi / Lisp.hs
Last active October 30, 2023 10:45
A transpiler from a simple S-expression language to JS
{-# 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)
@soupi
soupi / Main.purs
Created December 7, 2015 18:57
Moving rectangles + collision detection: purescript-signal + purescript-canvas
module Main where
import Prelude
import Data.Lens
import Data.Array
import Data.Maybe
import Math
import Data.Foldable
import Data.Traversable