Skip to content

Instantly share code, notes, and snippets.

View superbobry's full-sized avatar

Sergei Lebedev superbobry

View GitHub Profile
@johnmyleswhite
johnmyleswhite / gist:14dbd928019669faef82
Last active August 29, 2015 14:06
Benchmarking Resources
@freeformz
freeformz / WhyILikeGo.md
Last active October 6, 2022 23:31
Why I Like Go

A slightly updated version of this doc is here on my website.

Why I Like Go

I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.

Goroutines

The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.

(defn foobar []
(defn dominanto [dominance strand1 strand2 fenotype]
(conda [(membero strand1 dominance)
(== fenotype strand1)]
[(membero strand2 dominance)
(== fenotype strand2)]
[(== strand1 strand2)
(== fenotype strand1)]))
(defn inherito [dominance parent1 parent2 fenotype]
@diasjorge
diasjorge / init_packages.el
Created October 31, 2011 09:54
Bootstrapping el-get + packages
(setq el-get-sources
'((:name package-name)))
(defun sync-packages ()
"Synchronize packages"
(interactive)
(el-get 'sync '(el-get package))
(add-to-list 'package-archives '("tromey" . "http://tromey.com/elpa/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(setq my-packages (mapcar 'el-get-source-name el-get-sources))
@mejibyte
mejibyte / gist:1268157
Created October 6, 2011 18:15
Implementation of Ukkonen's algorithm to build a prefix tree in O(n)
using namespace std;
#include <algorithm>
#include <iostream>
#include <iterator>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
@schacon
schacon / .gitconfig
Created April 11, 2011 21:43
insteadOf example
[url "https://github.com/"]
insteadOf = "gh:"