This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lyrics: | |
Take big steps to eval, like a nomad | |
Bind and return like a Monad | |
Got you looking so mad | |
about the signature I got you using | |
in the directory with the MLI files the compiler was choosing | |
The type checks out, I’m feeling greater | |
Defer the value now and I return a little later | |
Cuz I’m threaded, so for now I ain’t got much to say |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require web-server/servlet | |
web-server/servlet-env) | |
(require pict) | |
(require file/convertible) | |
(require xml) | |
(define (pict->svg pict) | |
(define svg-b (convert pict 'svg-bytes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let get_by_id id = | |
let d = Dom_html.document in | |
Js.Opt.get (d##getElementById (Js.string id)) | |
(fun () -> assert false) | |
let rec range i n = | |
if i >= n then [] else i :: range (i + 1) n | |
let base = | |
range 0 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void play_note(long tone, long start, long now) { | |
long gap = now - start; | |
long step = gap / tone; | |
boolean high = (step % 2 == 0); | |
if (high) { digitalWrite(speaker_pin, HIGH); } | |
else { digitalWrite(speaker_pin,LOW); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void playTone(int tone, int duration) { | |
for (long i = 0; i < duration * 1000L; i += tone * 2) { | |
digitalWrite(speakerPin, HIGH); | |
delayMicroseconds(tone); | |
digitalWrite(speakerPin,LOW); | |
delayMicroseconds(tone); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ cabal install implicit | |
Resolving dependencies... | |
Downloading Boolean-0.2.3... | |
Downloading NumInstances-1.4... | |
Configuring Boolean-0.2.3... | |
Downloading ansi-terminal-0.6.2.1... | |
Configuring NumInstances-1.4... | |
Downloading byteorder-1.0.4... | |
Configuring ansi-terminal-0.6.2.1... | |
Downloading mtl-2.1.3.1... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ cabal install pandoc | |
Resolving dependencies... | |
cabal: Could not resolve dependencies: | |
trying: pandoc-1.13.2 (user goal) | |
trying: base-4.8.0.0/installed-901... (dependency of pandoc-1.13.2) | |
next goal: haddock-library (dependency of pandoc-1.13.2) | |
rejecting: haddock-library-1.2.0 (conflict: pandoc => haddock-library>=1.1 && | |
<1.2) | |
rejecting: haddock-library-1.1.1, 1.1.0 (conflict: | |
base==4.8.0.0/installed-901..., haddock-library => base>=4.3 && <4.8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ \rm -rf .cabal | |
~ $ cabal install implicit | |
Config file path source is default config file. | |
Config file /Users/yminsky/.cabal/config not found. | |
Writing default configuration to /Users/yminsky/.cabal/config | |
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal | |
update' to download it. | |
cabal: There is no package named 'implicit'. | |
You may need to run 'cabal update' to get the latest list of available | |
packages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Downloading semigroups-0.16.2.2... | |
Configuring semigroups-0.16.2.2... | |
Building semigroups-0.16.2.2... | |
Preprocessing library semigroups-0.16.2.2... | |
src/Data/Semigroup.hs:105:8: | |
Ambiguous module name ‘Numeric.Natural’: | |
it was found in multiple packages: | |
nats-0.1.2@nats_1SlQ91QfEGVBnpiEUJoePq base-4.8.0.0 | |
Failed to install semigroups-0.16.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ opam config report | |
# OPAM status report | |
# opam-version 1.2.0 | |
# self-upgrade no | |
# os darwin | |
# external-solver aspcud | |
# criteria -count(removed),-notuptodate(request),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution)* | |
# jobs 6 | |
# repositories 1* (http) | |
# pinned 1 (path) |