Skip to content

Instantly share code, notes, and snippets.

View pedrofurla's full-sized avatar

Pedro Furlanetto pedrofurla

View GitHub Profile
@larsrh
larsrh / interp.hs
Created February 23, 2015 21:27
Typed lambda calculus interpreter
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
data VarKind t = Bound | Free t
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

@paf31
paf31 / node-haskell.md
Last active May 14, 2024 03:51
Reimplementing a NodeJS Service in Haskell

Introduction

At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.

Over the past few months, I have been working on two Haskell services:

  • A reimplementation of an existing socket.io service, previously written for NodeJS using TypeScript.
  • A new service, which would interact with third-party components using standard data formats from the medical industry.

I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces

@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing
@tohenryliu
tohenryliu / badUseOfLazyVal.scala
Created June 23, 2014 19:57
lazy val in def blocks
def test = {
lazy val x = {
println(s"lazy compute called")
Thread.sleep(1000*30)
1
}
x
}
def mRun = {
import scala.concurrent.ExecutionContext.Implicits.global
@kevinwright
kevinwright / scaladays2014.md
Last active November 16, 2024 17:40
Scaladays 2014 slides

As compiled by Kevin Wright a.k.a @thecoda

(executive producer of the movie, and I didn't even know it... clever huh?)

please, please, please - If you know of any slides/code/whatever not on here, then ping me on twitter or comment this Gist!

This gist will be updated as and when I find new information. So it's probably best not to fork it, or you'll miss the updates!

Monday June 16th

@gseitz
gseitz / CanBuildFrom.hs
Last active November 16, 2015 07:03
CanBuildFrom.hs
{-# LANGUAGE MultiParamTypeClasses #-}
{-#LANGUAGE FlexibleInstances #-}
module CanBuildFrom where
import Data.Foldable
import Data.Map
data Builder from elem to = Builder {
result :: to,
add :: elem -> Builder from elem to
@SethTisue
SethTisue / scalawags-15.md
Last active August 29, 2015 14:00
Scalawags #15

Scalawags #15

starring an Englishman and three hicks from flyover country who don't know Latin

Intro (0:00)

  • Daniel mistakenly calls Dick "Bill"
  • Josh is so excited about Scala 2.11 his tongue is stuck permanently out

Scala 2.11 announced (4:40)

@viktorklang
viktorklang / §(Toggle Wi-Fi).app
Last active December 5, 2024 03:25
AppleScript to toggle Wi-Fi in OSX
(*
Installation instructions
=========================
Run as an Application:
1) Open AppleScript Editor and create a new script
2) Paste this file into it
3) Save name it '§(Toggle Wi-Fi)'
- Or substitute '§' for a symbol that you can press with a single key
4) Put it in Applications/Utilities
@puffnfresh
puffnfresh / scalaz.sh
Created December 20, 2013 03:24
Easy scalaz REPL!
# Get yourself sbt-extras
# Or: brew install sbt
alias scalaz="sbt -sbt-create 'set libraryDependencies += \"org.scalaz\" %% \"scalaz-core\" % \"7.1.0-M4\"' 'set initialCommands := \"import scalaz._; import Scalaz._\"' 'console'"