Skip to content

Instantly share code, notes, and snippets.

@gseitz
gseitz / trolling_haskell
Created Apr 8, 2016 — forked from quchen/trolling_haskell
Trolling #haskell
View trolling_haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
View keybase.md

Keybase proof

I hereby claim:

  • I am gseitz on github.
  • I am gseitz (https://keybase.io/gseitz) on keybase.
  • I have a public key whose fingerprint is A3B3 C992 3BDB D9F9 F215 79D5 AE2A 708C 9159 6EA1

To claim this, I am signing this object:

@gseitz
gseitz / gist:bf450650a343f1b093c9
Created Jun 4, 2014
"The Way to Learn FP" - Tony Morris
View gist:bf450650a343f1b093c9
[09:52] < t4nk061> any reason to start with haskell as I noticed it appears
clearer to get the FP concepts and then get into scala?
[09:52] < dibblego> definitely start with haskell
[09:52] < dibblego> the NICTA course material has a google hangout each week
[09:52] < dibblego> we just finished today's
[09:52] < dibblego> each Wednesday UTC 0200
[09:52] < dibblego> there is huge peer support here
[09:52] < dibblego> #nicta-course #bfpg
[09:53] < dibblego> everyone in this channel uses haskell and can help you
[09:53] < dibblego> http://github.com/nicta/course
View .vimrc
set nocompatible " be iMproved
filetype off " required!
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
@gseitz
gseitz / CanBuildFrom.hs
Last active Nov 16, 2015
CanBuildFrom.hs
View 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
View gist:9082894
scala> val buf = ListBuffer(1)
buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1)
scala> val xs = buf.toIterable match { case xs: List[Int] => xs }
xs: List[Int] = List(1)
scala> buf ++= 1 to 100
res11: buf.type = ListBuffer(1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100)
scala> xs
@gseitz
gseitz / GenLens.scala
Created Feb 6, 2014
Automatically derive a Traverse instance for "Generic Lenses"
View GenLens.scala
scala> :paste
// Entering paste mode (ctrl-D to finish)
trait GenLens[T[_]] {
def get[B](a: T[B]): B
def set[A, B](a: T[A], b: B): T[B]
}
implicit def lensTraversable[T[_]](implicit l: GenLens[T]): Traverse[T] = new Traverse[T] {
def traverseImpl[G[_], A, B](fa: T[A])(f: (A) => G[B])(implicit G: Applicative[G]) = {
@gseitz
gseitz / Minified.scala
Created Oct 14, 2013
AbstractMethodError at runtime
View Minified.scala
package com.leonteq.datahubconnector.util
object FooImpl extends GoodBar[Int]
object BadFooImpl extends BadFoo with BadBar[Int]
trait BadFoo {
this: BadBar[_] =>
def mapBazes = bazes.map(identity)
View github-code-view-expander.js
// ==UserScript==
// @author Gerolf Seitz
// @name Github Wide Diff.
// @description Make the diff view as wide as the browser window.
// @include https://github.com/*
// ==/UserScript==
(function () {
function addJQuery(callback) {
@gseitz
gseitz / DependencyGraphHelper.scala
Created Aug 26, 2013
sbt-dependency-graph helper
View DependencyGraphHelper.scala
import sbt._
import java.awt.Desktop
object DependencyGraphHelper extends Plugin {
val openDepTree = TaskKey[Unit]("open-deptree")
override def projectSettings = Seq(
openDepTree in Compile <<= openDependencyTreeFor(Compile),
openDepTree in Runtime <<= openDependencyTreeFor(Runtime),