- slides
- it would be cool to get our hands on google cardboard and experiment with 3d-ish video!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'lodash' | |
function ooify(fn) { | |
return function() { | |
return fn.apply(this, [this].concat([].slice.call(arguments))) | |
} | |
} | |
var methods = _.zipObject(_.map(_.keys(_.prototype), methodName => { | |
return [methodName, ooify(_[methodName])] | |
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../typings/tsd.d.ts" /> | |
/// | |
import {PipeFactory} from 'angular2/src/change_detection/pipes/pipe'; | |
import {async} from 'angular2/src/change_detection/change_detection'; | |
import {NullPipeFactory, Pipe, PipeRegistry, defaultPipes} from 'angular2/change_detection'; | |
import {bind} from 'angular2/di'; | |
import {ObservablePipe} from 'angular2/pipes'; | |
import * as Rx from 'rx'; | |
export function isObservable(obs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns random numbers. See individual functions for docs. | |
* | |
* This function can be used as a shortcut function: by default, it will call | |
* rand.int() using the arguments given to it. You can change which method it | |
* will call by changing the rand.default string to any of the method names. | |
*/ | |
function rand(length) { | |
"use strict"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadSomeStuff(id) { | |
// We return basic-stream https://github.com/rpominov/basic-streams | |
return _sink => { | |
let sink = _sink | |
const onSuccess = data => sink({type: 'success', data}) | |
const onError = error => sink({type: 'error', error}) | |
stuffLoadingService.load(id).done(onSuccess, onError) | |
return () => { | |
// We can't unsubscribe from a Promise, so we simply make sink() a noop | |
sink = () => {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var source$ = Rx.Observable.marble("1--23--456--7890--"); | |
var enter$ = Rx.Observable.marble("-e-----e----------"); | |
var exit$ = Rx.Observable.marble("---x-------x------"); | |
var sampler$ = Rx.Observable.marble("a--b--c--d--e--f--"); | |
var full$ = Rx.Observable.marble("01234567890abcdefg"); | |
source$.draw('source', '#container') | |
.debounceTime(1050).draw('debounceTime(1)', '#container'); | |
source$.auditTime(1050).draw('auditTime(1)', '#container'); | |
source$.throttleTime(1050).draw('throttleTime(1)', '#container'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
type These a b | |
= This a | |
| That b | |
| Both a b | |
| Neither |
I recently read this interesting post about eventual values. One thing that struck me and which I failed to understand is:
- Eventual Values can be interacted with like normal values.
- If an Eventual Value is part of a simple value operation, then that expression resolves to a new Eventual > Value which resolves when all its Eventual Values are resolved.
If I understood the author correctly, that is supposed to be solving several problems:
- "I don’t know if this is a Promise or not" (I don't know if it's the resolved result of the action, or the action itself).
- "I’d really like to write code that interacts with values, and not Promises, and leave the machinery to the computer to work out".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language ConstraintKinds #-} | |
{-# language FlexibleContexts #-} | |
{-# language FlexibleInstances #-} | |
{-# language LambdaCase #-} | |
{-# language MultiParamTypeClasses #-} | |
{-# language PolyKinds #-} | |
{-# language RankNTypes #-} | |
{-# language ScopedTypeVariables #-} | |
{-# language TupleSections #-} | |
{-# language TypeFamilies #-} |
OlderNewer