curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
- It's in Homebrew and just runs (relative to, say, HBase): awesome!
- Having packages for popular Linux distros (I use Ubuntu personally and at work): awesome!
- Serving the GPG key over HTTP: not so awesome :-/
apt-get -y install rethinkdb- It didn't start by default- great! I hate when services do this. I then looked at the start script to see how it knew (usually daemons use
/etc/default/blah, but it has custom logic to see if there's anything in/etc/rethinkdb/instances.d, which is cool).
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
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.
| import React from 'react'; | |
| import _ from 'lodash'; | |
| import Rx from 'rx'; | |
| import superagent from 'superagent'; | |
| let api = { | |
| host: 'http//localhost:3001', | |
| getData(query, cb) { | |
| superagent |
| (function(global) { | |
| var types = function(obj) { | |
| throw new TypeError("fmap called on unregistered type: " + obj); | |
| }; | |
| // inefficient as hell, but as long as there aren't too many types.... | |
| global.Functor = function(type, defs) { | |
| var oldTypes = types; | |
| types = function(obj) { | |
| if (type.prototype.isPrototypeOf(obj)) { |
| ////// Save as index.js and upload it to Lambda as zip archive with node_modules directory. After: | |
| ////// npm install aws-cloudwatch-chart | |
| ////// npm install request | |
| ////// no need to upload aws-sdk module | |
| ////// Don't forget to change API keys here. | |
| ////// License: MIT | |
| ////// Docs: |
| # Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| 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 | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
I hereby claim:
- I am tyrchen on github.
- I am tchen (https://keybase.io/tchen) on keybase.
- I have a public key ASAtNypwUxDdzBSoAFKJU6Gwr0F80PyExCQfA2eKWjiWJQo
To claim this, I am signing this object: