### Keybase proof | |
I hereby claim: | |
* I am erain on github. | |
* I am erain (https://keybase.io/erain) on keybase. | |
* I have a public key whose fingerprint is F646 4B46 AAF9 2CFF 9D8B 2992 8A1A 5498 042B 9493 | |
To claim this, I am signing this object: |
;; http://youtu.be/h8bsJV0-2qs | |
;; get the following packages: | |
;; go-mode | |
;; go-eldoc | |
;; company-mode | |
;; company-go | |
;; get the following go programs (run each line in your shell): | |
;; go get code.google.com/p/go.tools/cmd/goimports | |
;; go get code.google.com/p/rog-go/exp/cmd/godef | |
;; go get github.com/nsf/gocode |
package main | |
import ( | |
"net/http" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
) |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
def read_producer(text, coroutines): | |
for word in text.split(): | |
for coroutine in coroutines: | |
coroutine.send(word) | |
for coroutine in coroutines: | |
coroutine.close() | |
def match_filter(pattern, next_coroutine): | |
print("Looking for {0}".format(pattern)) |
When we compile OpenResty, we would like to have a "good enough" version so that every plugin in our project is installed.
./configure --prefix=/opt/openresty \
--conf-path=/etc/nginx/nginx.conf \
--with-luajit \
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |