I hereby claim:
- I am leoapost on github.
- I am leoapost (https://keybase.io/leoapost) on keybase.
- I have a public key ASBFgeJ-mTYXWeN0X_zipwe51YhNfpPdlaCBOHX0zFPdCwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
(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.
# Replace REMOTE_NAME with your remote name (e.g. origin) | |
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done; |
# Replace AUTHOR_NAME with the author's name | |
# Replace KEYWORD with the keyword you wanna find | |
for x in $(git log --author=AUTHOR_NAME --pretty=format:'%h' -n 20 | cut -d" " -f1) ; do for y in $(git show --pretty="format:" --name-only $x) ; do if [ -f $y ]; then echo $y ; grep -in 'KEYWORD' $y ; fi ; done ; done |
# Replace KEYWORD with the keyword you wanna find | |
# Replace COMMIT_HASH with the actual hash (e.g. 2005b934aaad9b481f8966e618dabfc143ab8357) | |
for x in $(git show --pretty="format:" --name-only COMMIT_HASH) ; do if [ -f $x ]; then echo $x ; grep -in 'KEYWORD' $x ; fi ; done |