Workaround for getting gb to play nice with vendored private repositories. Add following lines to .gitconfig
file:
[url "git@github.com:mattias-lundell"]
insteadOf = https://github.com/mattias-lundell
12 Jun 2016
Workaround for getting gb to play nice with vendored private repositories. Add following lines to .gitconfig
file:
[url "git@github.com:mattias-lundell"]
insteadOf = https://github.com/mattias-lundell
06 Dec 2015
Example of how to use defer
in golang as a crude way of measure execution time. Start by defining the timeit
function. The function just prints the duration from the time given by start
.
func timeit(start time.Time, text string) {
log.Info("PERF [%s] [%s]", text, time.Since(start))
}
Using the defer
keyword we can make timeit
execute directly after the function that we want to measure. Passing time.Now()
as argument gives us a timer that measures execution time for the function body.
func timedFunction() {
defer timeit(time.Now())
time.Sleep(500 * time.Millisecond)
}
Calling timedFunction()
should print
PERF [timedFunction] [500ms]
26 Aug 2015
Clojure defrecord does not expose the constructor outside the namespace
(defrecord Point [x y])
(def origin (Point. 0 0)) ; only avalable in namespace
Instead use the automatically generated constructor
(def origin (->Point 0 0)) ; available in other namespaces
http://typetheorypodcast.com/2015/01/episode-3-dan-licata-on-homotopy-type-theory/
19 Dec 2014
18 Dec 2014
http://www.haskellcast.com/episode/009-conal-elliott-on-frp-and-denotational-design/
Conal Elliot on functional reactive programming and denotational design.
24 Nov 2014
http://www.functionalgeekery.com/episode-18-eric-normand/
17 Nov 2014
Clojure/conj 2012 - Zach Tellman - Playing Go with Clojure.
CodeMesh 2014 - Edwin Brady - Verifying Stateful and Side-effecting Programs using Dependent Types
09 Nov 2014
Less is more.