I hereby claim:
- I am spaceribs on github.
- I am spaceribs (https://keybase.io/spaceribs) on keybase.
- I have a public key ASDM8NFEUk77TaXH8snYeam9yqWKueACekMWuf7BUEeqpAo
To claim this, I am signing this object:
'use strict'; | |
angular.module('myApp') | |
.directive('paper', ['$http', function ($http) { | |
return { | |
replace: true, | |
template: '<canvas></canvas>', | |
restrict: 'E', | |
link: function postLink(scope, element, attrs) { |
I hereby claim:
To claim this, I am signing this object:
keyPressed = false; | |
atom.keymaps.addKeystrokeResolver ({event}) -> | |
if event.key == "Shift" && event.type == "keydown" | |
if keyPressed | |
keyPressed = false; | |
console.log('keyPressed'); | |
return 'shift-double'; | |
else | |
keyPressed = true; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Object Literal versus Map Access</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
I've been exploring combining the concept of "Behavior Trees" (https://en.wikipedia.org/wiki/Behavior_Trees) with RxJS, and this revealed to me a combiner that I don't think currently exists, so I wanted to discuss if that's the case and if I should put up a PR to add such a combiner.
The most basic behavior tree at minimum contains an AND (sequence) combiner and an OR (selector) combiner. AND combiners run their children in sequence, and stop running if there are any failures. An AND combiner is actually very easy to translate to RxJS, it's literally just a concat.
An OR combiner instead runs it's children until success, and only fails if all it's children fail to return success. This is actually very similar to onErrorResumeNext except for the following attributes:
The code for the combiner in typescript/rxjs is below:
WEBVTT | |
_id: 76a479f0-99f4-4e9c-b845-d691ffc89e6a | |
_rev: 76a479f0-99f4-4e9c-b845-d691ffc89e6a | |
type: plopdown_v2 | |
title: Rifftrax - Stranger Things | |
for: Stranger Things | |
url: https://github.com/spaceribs/plopdown-video | |
license: CC0 | |
language: en-US | |
thumbnail: StrangerThings_PosterA.jpg |
/** | |
* @license | |
* lodash 3.10.0 (Custom Build) <https://lodash.com/> | |
* Build: `lodash modern -o ./lodash.js` | |
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | |
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | |
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
* Available under MIT license <https://lodash.com/license> | |
*/ | |
;(function() { |