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 upgrade -v | |
Everything as up-to-date as possible. | |
The following newer versions couldn't be installed: | |
- base-bytes.legacy is not available because it requires OCaml < 4.02.0. | |
- camlp4.4.03.0 is not available because it requires OCaml >= 4.03.0. | |
The following would require downgrades or uninstalls, but you may upgrade them explicitely: | |
- async.112.24.00 | |
- async_extra.112.24.00 | |
- async_kernel.112.24.00 | |
- async_unix.112.24.00 |
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 install async_extra.112.24.00 --dry-run | |
The following actions will be performed: | |
- remove core_bench.112.17.00 | |
- upgrade pa_ounit from 112.17.00 to 112.24.00 [required by async_extra] | |
- downgrade zarith from 1.3 to 1.2 [required by asn1-combinators] | |
- upgrade bin_prot from 112.17.00 to 112.24.00 [required by async_extra] | |
- upgrade sexplib from 112.17.00 to 112.24.00 [required by async_extra] | |
- recompile pa_bench.112.06.00 [uses pa_ounit] | |
- recompile uri.1.8.0 [uses sexplib] | |
- upgrade typerep from 112.17.00 to 112.24.00 [uses bin_prot] |
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) |
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
~ $ \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
~ $ 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
~ $ 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
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
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
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 |
OlderNewer