Readit News logoReadit News
eltaco commented on Open-Sourcing CloudFlare’s UI Framework   blog.cloudflare.com/cf-ui... · Posted by u/luisrudge
rtsao · 10 years ago
Lerna [1] is very cool. I was firmly against monorepos, but the ability to easily manage and coordinate between individually versioned packages in a single repo is awesome. You get the benefits of a monorepo but also the benefits of small modules so it's the best of both worlds.

[1]: https://github.com/lerna/lerna

eltaco · 10 years ago
James is also on the Lerna team as well! He and I can answer questions about that too. (We also have a slack https://slack.lernajs.io/)
eltaco commented on Performance of ES6 features relative to ES5   kpdecker.github.io/six-sp... · Posted by u/shawndumas
stymaar · 10 years ago
The results given by this benchmark are bothering me because they do not fit with what I've seen in production. For example, the `for-of-array` is transpiled by babel to something that has 2 nested try/catch blocks, and unfortunately, V8 has a nasty deoptimisation when dealing with these, even if no exception is ever thrown.

This deopt led to a several orders of magnitude slowdown compare to a simple `for` loop in Google Chrome, forcing use to abandon the `for of` construction.

I suspect that the benchmark shown on this page does not expose this kind of behavior because it doesn't iterate enough for the JIT to kick in. If it's the case, it means that these values reflects only the behavior of the cold, interpreted code, and not the hot one. (which is quite sad for a performance benchmark, because the performance matter only for the former …)

eltaco · 10 years ago
You can use loose mode which doesn't use try/catch blocks

http://babeljs.io/repl/#?experimental=false&evaluate=true&lo...

eltaco commented on Performance of ES6 features relative to ES5   kpdecker.github.io/six-sp... · Posted by u/shawndumas
jameslk · 10 years ago
For-of is slow (in Babel) because from my understanding it gets transpiled to use Regenerator. That was a bit of a nasty discovery for me.
eltaco · 10 years ago
You can use loose mode or the loose option in that case.
eltaco commented on ESLint: A Next-Generation JavaScript Linter   smashingmagazine.com/2015... · Posted by u/muriithi
eltaco · 10 years ago
ESLint is pretty awesome - the project has a great team and always adding new functionality (cache and then parallel linting sound great)!

Although it isn't unique for all the features listed, as JSCS has the same things: an autoconfigure feature, built-in (as well as user created) presets/configs, multiple formatters, custom plugins/rules, custom parsers (esprima/espree/babel), autofixing of almost all rules. Hopefully both projects can benefit or integrate better together more in the future? (I contribute to both!)

I think autofixing for all rules (maybe with https://github.com/cst/cst) would be a nice goal for the future when thinking about the next-generation of linters. Making it easier to update configs when new rules/options are added would be nice as well.

eltaco commented on The Hardest Program I've Ever Written   journal.stuffwithstuff.co... · Posted by u/skybrian
sklogic · 11 years ago
And yet, the best place to add your pretty-printing and indentation hints is parser. Hints are attached to the grammar, so it makes sense to merge the two things, and then generate two different tools out of the single source. Three, actually - an AST pretty-printer, a textual code formatter and, finally, a parser itself.
eltaco · 11 years ago
There's an issue for a CST (AST with whitespace, comments, etc) in the estree repo [1]. JSCS is planning on using https://github.com/mdevils/cst for future autofixing rules.

[1] https://github.com/estree/estree/issues/41

eltaco commented on The Hardest Program I've Ever Written   journal.stuffwithstuff.co... · Posted by u/skybrian
lolptdr · 11 years ago
Has anyone done any comparisons to other code formatters of other languages? Or even other code formatters within Dart?

Wish I could gain more context on how big an arena of these types of programs. I'm a bit lost as to how important code formatters and beautifiers were until reading more on the difficulty of writing such a program by Mr. Nystrom.

eltaco · 11 years ago
For javascript, there's been jsbeautifier [1], jsfmt [2], uglify.

JSCS [3] added autofixing a while back for most whitespace rules, and ESLint has just begun autofixing as well [4]

[1] http://jsbeautifier.org/ [2] https://github.com/rdio/jsfmt [3] http://jscs.info/ [4] https://github.com/eslint/eslint/pull/3635

eltaco commented on Airbnb JavaScript Style Guide   github.com/airbnb/javascr... · Posted by u/webnanners
eltaco · 11 years ago
You can use the airbnb preset with JSCS (javascript code style checker) [1].

Also there's an autofix feature for most of the whitespace rules (`jscs src --preset=airbnb --fix`) so you won't have to fix everything manually.

[1]: http://jscs.info/overview.html

eltaco commented on ECMAScript 2015 Approved   ecma-international.org/pu... · Posted by u/espadrine
serve_yay · 11 years ago
"Everyone" is using Babel now. A lot of ES6 features are making their way into browsers and node, but there's so much variation that a transpile step is needed. Babel is nice but currently quite slow. Babel has a REPL you can play with here: http://babeljs.io/repl/#?experimental=true&evaluate=true&loo...
eltaco · 11 years ago
There's currently a issue for "speed": https://github.com/babel/babel/issues/1486. Looks like it complied ember core from 50s to 18s now.
eltaco commented on JSXHint, a ReactJS/JSX Code Quality Tool Online   jsxhint.com/... · Posted by u/tilt
eltaco · 11 years ago

u/eltaco

KarmaCake day19September 1, 2012View Original