This file contains hidden or 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
% make dev | |
==> Installing envconsul for darwin/amd64 | |
runner.go:17:2: cannot find package "github.com/hashicorp/consul-template/child" in any of: | |
/usr/local/Cellar/go/1.9/libexec/src/github.com/hashicorp/consul-template/child (from $GOROOT) | |
/Users/marek/go/src/github.com/hashicorp/consul-template/child (from $GOPATH) | |
cli.go:15:2: cannot find package "github.com/hashicorp/consul-template/config" in any of: | |
/usr/local/Cellar/go/1.9/libexec/src/github.com/hashicorp/consul-template/config (from $GOROOT) | |
/Users/marek/go/src/github.com/hashicorp/consul-template/config (from $GOPATH) | |
runner.go:19:2: cannot find package "github.com/hashicorp/consul-template/dependency" in any of: | |
/usr/local/Cellar/go/1.9/libexec/src/github.com/hashicorp/consul-template/dependency (from $GOROOT) |
This file contains hidden or 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
module type Mapable = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
val pure : 'a -> 'a t | |
val unsafe_perform_io : 'a t -> 'a | |
end | |
module OptionMapper : Mapable | |
(* comment out the following line to see difference in behaviour *) | |
with type 'a t = 'a option |
This file contains hidden or 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
module type Mapper = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
end | |
module OptionMapper : Mapper | |
with type 'a t = 'a option | |
= struct | |
type 'a t = 'a option | |
let map f = function |
This file contains hidden or 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
open Printf;; | |
(* | |
This was a learning experience in OCaml computation. I had to: | |
* Change List.map/append to rev_map/rev_append to avoid stack overflow | |
* Rewrite take to pattern match rather than checking List.length | |
*) | |
let length = 35651584;; | |
let input = [1;1;1;0;1;0;0;0;1;1;0;0;1;0;1;0;0];; |
This file contains hidden or 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
From 066c94fd6c1a59d637d36e9d02c3971c42c736a5 Mon Sep 17 00:00:00 2001 | |
From: Marek Kubica <[email protected]> | |
Date: Tue, 12 Jul 2016 21:20:35 +0200 | |
Subject: [PATCH] GHC 8 fix from Homebrew repository | |
--- | |
.SRCINFO | 6 +++--- | |
PKGBUILD | 11 +++++++++-- | |
2 files changed, 12 insertions(+), 5 deletions(-) |
This file contains hidden or 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
$ ocamlbuild foo.byte | |
Finished, 3 targets (0 cached) in 00:00:00. | |
$ js_of_ocaml foo.byte | |
$ node foo.js /tmp/foo | |
/tmp/foo/foo.js:185 | |
i=ak(r);if(0===i){if(!m)throw D;var | |
^ | |
248,End_of_file,-5 |
This file contains hidden or 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
enum Either<T, V> { | |
case Left(T) | |
case Right(V) | |
} | |
var lint: Either<Int, Any> = Either.Left(42) | |
var rstring: Either<Any, String> = Either.Right("at you") | |
switch rstring { | |
case .Right(let x): print("right", x) |
This file contains hidden or 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
(def TRUE (fn [x] (fn [y] x))) | |
;=> #'user/TRUE | |
(def FALSE (fn [x] (fn [y] y))) | |
;=> #'user/FALSE | |
(def AND (fn [p] (fn [q] ((p q) p)))) | |
;=> #'user/AND | |
((AND TRUE) FALSE) | |
;=> #object[user$FALSE 0x47a57da0 "user$FALSE@47a57da0"] | |
(def IFTHENELSE (fn [p] (fn [a] (fn [b] ((p a) b))))) | |
;=> #'user/IFTHENELSE |
This file contains hidden or 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
(ns twoohfour.core | |
(:require [aleph.http :as http]) | |
(:gen-class)) | |
(defn handler [req] | |
{:status 204 | |
:headers {"content-type" "text/plain"} | |
:body "Something"}) | |
(defn -main |
This file contains hidden or 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
[Desktop Entry] | |
Name=Spacemacs | |
GenericName=Text Editor | |
Comment=Edit text | |
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; | |
Exec=emacs %F | |
Icon=/home/marek/.emacs.d/core/banners/img/spacemacs.png | |
Type=Application | |
Terminal=false | |
Categories=Development;TextEditor; |