Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
- TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
- In the wild, we're seeing
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems - Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.
I'll leave the rest of this document unedited, for archaeological
This file contains hidden or 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
// for more info about ReDoS, see: | |
// https://en.wikipedia.org/wiki/ReDoS | |
var r = /([a-z]+)+$/ | |
var s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa!' | |
console.log('Running regular expression... please wait') | |
console.time('benchmark') | |
r.test(s) |
This file contains hidden or 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
sudo apt install ruby ruby-dev | |
sudo gem install travis | |
# install path: /var/lib/gems/ |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
- comma-dangle - 配列やオブジェクトのケツカンマ禁止 🏁
- no-cond-assign - ifなどの条件式に代入式を書くの禁止 🏁
- no-console - console禁止 🏁
- no-constant-condition - 条件式にtrueなどの定数書くの禁止 🏁
- no-control-regex - 正規表現中にASCII制御文字書くの禁止 🏁
- no-debugger - debugger禁止 🏁
- no-dupe-args - 引数名の重複を禁止 🏁
- no-dupe-keys - オブジェクトのキー名の重複を禁止 🏁
This file contains hidden or 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
'.platform-win32 .editor, .platform-linux .editor': | |
'ctrl-shift-L': 'editor:split-selections-into-lines' | |
'ctrl-shift-up': 'editor:add-selection-above' | |
'ctrl-shift-down': 'editor:add-selection-below' |
NewerOlder