いま思い出した論点
- JSでエラー処理どうしてる?
- カスタムError(Errorの継承)ってクロスブラウザきつくないですか?
- Error投げてると、非同期のsetTimeoutとかで吸収されちゃってつらくないですか?
- それブラウザの話?Nodeの話?
- そもそもブラウザJSで例外、エラーってどんなものがある?
- Promiseのエラー処理ベストプラクティスとは?
var fs = require('fs'); | |
var TS = require('typescript-simple').TypeScriptSimple; | |
var cs = require('coffee-script'); | |
var tss = new TS({noImplicitAny: true}); | |
var sample1 = fs.readFileSync('./sample1.ts', {encoding: 'utf8'}); | |
var sample2 = fs.readFileSync('./sample2.ts', {encoding: 'utf8'}); | |
// warm up | |
var start = new Date().getTime(); |
#!/bin/sh | |
sudo apt-get install fontforge fonts-inconsolata | |
mkdir -p ~/.fonts | |
TMPDIR=$(mktemp -d /tmp/ricty-XXXXX) | |
cd $TMPDIR | |
wget http://iij.dl.sourceforge.jp/mix-mplus-ipa/59022/migu-1m-20130617.zip |
// Options: --proper-tail-calls | |
"use strict"; | |
var cache = {}; | |
function fib(n) { | |
return fib_(n, _ => _); | |
} | |
function fib_(n, callback) { | |
if (n === 0) return callback(0); |
条件3のreturn Promise.resolve()
はあっても無くても実行結果は変わらない。
function asyncFunc(msg, callback) {
setTimeout(function() {
console.log(msg);
callback();
}, 0);
}
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>MicrosoftRDC</appname> | |
<equal>com.microsoft.rdc.mac</equal> | |
</appdef> | |
<symbol_map type="KeyCode" name="RDC_VK_HOME" value="0x73"/> | |
<symbol_map type="KeyCode" name="RDC_VK_END" value="0x77"/> | |
<item> | |
<name>Microsoft Remote Desktop App v8.0.14+</name> |
--angular_pass : Generate $inject properties for | |
AngularJS for functions annotated | |
with @ngInject | |
--assume_function_wrapper : Enable additional optimizations based | |
on the assumption that the output | |
will be wrapped with a function | |
wrapper. This flag is used to | |
indicate that "global" declarations | |
will not actually be global but | |
instead isolated to the compilation |
// generated .js | |
var power_assert_1 = require('power-assert'); | |
var _1 = require('../'); | |
describe('foo', function () { | |
it('test #1', function () { | |
power_assert_1.default.ok(_1.default() === 2); | |
}); | |
}); |
var $jscomp = {scope:{}, getGlobal:function(a) { | |
return "undefined" != typeof window && window === a ? a : "undefined" != typeof global ? global : a; | |
}}; | |
$jscomp.global = $jscomp.getGlobal(this); | |
$jscomp.initSymbol = function() { | |
$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol); | |
$jscomp.initSymbol = function() { | |
}; | |
}; | |
$jscomp.symbolCounter_ = 0; |
ES6 ModulesはHTTP/2によってconcat無しで使えるようになるのか - teppeis blog
ES Modulesのネストした依存関係をHTTP/2によって1RTT以内にロードできるのか問題