Skip to content

Instantly share code, notes, and snippets.

View minikomi's full-sized avatar
🍕
I like pizza

minikomi

🍕
I like pizza
  • Tokyo, Japan
View GitHub Profile
#lang racket/gui
(require (planet williams/animated-canvas/animated-canvas)
racket/unsafe/ops
profile)
(define W 800)
(define H 800)
(define all-colors (take (send the-color-database get-names) 20))
{
"a": "yeah"
}
#lang racket/gui
(require (planet williams/animated-canvas/animated-canvas))
(define W 1200)
(define H 1200)
(define all-colors (send the-color-database get-names))
(define no-pen (new pen% [style 'transparent]))
[
{
"title": "34th Single",
"rounds": [
{
"winner": "松井珠理奈",
"loser": "上枝恵美加",
"hand": "Paper",
"round": 84
},

I like LYAH 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. I recommend it as a reference only.

(ns chanplay.core
(:require
[goog.dom :as dom]
[goog.events :as events]
[cljs.core.async :as async
:refer [<! >! chan close! sliding-buffer put! alts!]]
[jayq.core
:refer [$ append ajax inner html $deferred when done resolve pipe on] :as jq]
[crate.core :as crate]
)
@minikomi
minikomi / xmas.rkt
Last active December 31, 2015 17:29
merry xmas!
#! /usr/bin/env racket
#lang racket
(define (color-str n s)
(~a "\x1b[3" n "m" s "\x1b[0m"))
(define (tree n)
(append
(for/list ([r (range 1 (+ n 2) 2)])
(define not-space
package main
import (
"fmt"
"math/rand"
"net/http"
"regexp"
)
func handler(w http.ResponseWriter, r *http.Request) {
#lang racket
(require web-server/servlet-env
web-server/dispatch
web-server/http
web-server/http/bindings
web-server/formlets)
(define new-post-formlet
(formlet
@minikomi
minikomi / hmm.rkt
Last active December 24, 2015 15:29
(define groups-of
(case-lambda
[(n lst) (groups-of n n lst)]
[(n step lst)
(cond
[(empty? lst) '()]
[(< (length lst) n) (list lst)]
[else (cons (take lst n) (groups-of n step (drop lst step)))])]))