Skip to content

Instantly share code, notes, and snippets.

View eldritchideen's full-sized avatar

Steven Cook eldritchideen

  • Amazon Web Services
  • Australia
View GitHub Profile

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ 80% completion here is fine if you feel your attention waning, the next thing will address hammering in things like functors and monads via typeclasses.

https://github.com/NICTA/course/ this will hammer in the lessons in a very direct form by forcing you to confront the challenges and lessons learned by the creators and community of Haskell itself. Doing the exercises here is critical for being fluent.

Real World Haskell is available online. (Thanks bos!)

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Real World Haskell is available online. (Thanks bos!)

I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?

/**
* gc monitoring only on jdk7 or later
*
* @author lichengwu
* @version 1.0
* @created 2013-09-14 10:44 PM
*/
public class GCMonitoring {

This is my recommended path for learning Haskell.

Something to keep in mind: don't sweat the stuff you don't understand immediately. Just keep moving.

Primary course

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Exercises for practice

from zipline.algorithm import TradingAlgorithm
from zipline.transforms import MovingAverage
from zipline.utils.factory import load_from_yahoo
from zipline.finance.slippage import FixedSlippage
from zipline.finance.commission import PerShare
from datetime import datetime
import matplotlib.pyplot as plt
class DualMovingAverage(TradingAlgorithm):

Sample Project

Starting from:

lein new foo
cd foo

Say I have a random JAR file that is not available in any repository:

touch README.md

@eldritchideen
eldritchideen / osx-mongodb-rlimits-fix.md
Last active September 7, 2015 10:11 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist

...containing:

@eldritchideen
eldritchideen / golang_job_queue.md
Created March 27, 2016 07:21 — forked from harlow/golang_job_queue.md
Job queues in Golang
@eldritchideen
eldritchideen / gist:e56a9dc5ad9b9ec9967a54bd5bd2346e
Last active July 11, 2016 19:40 — forked from SegFaultAX/gist:1f8900efb422888eabab
clojure.core/partition and clojure.core/partition-all in Python
def take_while(fn, coll):
"""Yield values from coll until fn is False"""
for e in coll:
if fn(e):
yield e
else:
return
def partition(n, coll, step=None):
return take_while(lambda e: len(e) == n,
@eldritchideen
eldritchideen / main.go
Created December 15, 2016 10:35 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling