Show HN: Jazzle – An Innovative, Fast Transpiler for ECMAScript 2015 and later
github.com
github.com
it certainly took some time, but now, it can even build itself!
Among its features are:
* very fast compilation times (2x faster than babel, with sourcemaps, on my early benchmarks.)
* on-the-fly minification
* built-in bundling
* economic sourcemaps
* built-in regex-verifier (and I'm working on a standalone regex-emitter, too)
* runtime this-before-super() checks
* runtime (rather than parse-time) checks for constant re-assignments
* cheap yet full temporal-dead-zone tracker (and everyone thought it is impossible)
* non-invasive, arguably more efficient transformation for loops having closures around their lexicals
* zero-dependencies, obviously (though I'm not much proud of it; cf. above)
* aggressive temporary-variable-reuse (though I have to say there are still some rough edges)
* and needless to say, nearly all ES2015 constructs (except for getters/setters and generators; I'm currently working on a cool generator transformer too, but that's at least two months away.)
Now, this is a project still in its infancy (and the two years I've been working on it had better be looked at as its embryohood), and I have to confess I'm getting more and more spent working on it, so I'm actively, eagerly looking for collaborators, particularly for receiving real-world feedback and for helping me complete the test suite.
Comments, suggestions and any other sort of feedback is most welcome.
Thanks a lot reading this far.
Since it seems you can access github, you can install dependencies without touching npmjs, with one of these:
npm install git+ssh://git@github.com:<githubname>/<githubrepo.git[#<commit-ish>]
npm install git+ssh://git@github.com:<githubname>/<githubrepo.git>[#semver:^x.x]
npm install git+https://git@github.com/<githubname>/<githubrepo.git>
npm install git://github.com/<githubname>/<githubrepo.git>
npm install github:<githubname>/<githubrepo>[#<commit-ish>]
(add --save if your npm is old)Why would a country ban npmjs?
that is also what I keep asking myself.
those in charge of censorship are not especially educated people (they are mostly young clerics/government devoutees), and a website's number of visitors along with its background color (yes) is just enough reason for them to take it out of reach. Somewhat appalling, but you get used to it.
For the record, npm worked (and worked well),like, ten months ago.
But now it doesn't, not easily at least. I tried my luck with polipo/tor, but it was so slow and disconnected so frequently that I gave up. I now only use npm to publish, and that is still something I don't want to think about until the very last minute.
Just for the record, this submission's original title was "A very fast Ecmascript Transpiler+Bundler+Minifier in less than 80kb minified, gzipped"; There was indeed another submission with the current title, but I actually deleted it, thinking it was somewhat pretentious. I'm not sure how the title got reverted during migrating the submission to show HN.
I made no such claims as jazzle being better than babel; I'm not even sure such comparison would be logically true. All I said was that it has performed better than babel on my local benchmarks.
As for innovativeness, what I can tell off the top of my head is its advanced tdz tracker, along with its non-invasive transformation strategy for closures containing loop lexicals.
Thanks a lot reading this far, and I can't wait for your feedback!
That said, congrats on a pretty full-featured javascript package that has no dependencies. That's huge, especially in JS land.
Mind if I ask which country that you live in that blocks npm? Just curious.
https://medium.com/@evawxiao/death-by-a-thousand-cuts-softwa...
"The scope of the Great Firewall has grown along with the internet. Sadly, it’s a highly adaptable and robust system. In terms of software development, it means that a growing number of services are permanently or sporadically blocked. One of those is NPM or Node Package Manager, an important tool for Node.js. To access NPM in mainland China, you’ll have to find workarounds like using a Chinese mirror. Another is Github, a popular version control and source code management tool that is occasionally blocked or at least throttled to be excruciatingly slow."
to be honest, yes, by the time (if ever) this project takes off, transpiling has most probably become an obsolete tradition; so I totally agree with you on that.
Ah, as for the country I come from, I will be more than glad (and very grateful) to talk to you about it through my public npm email, or my github email, whichever you find more convenient.....
Wow, the javascript community is militant about who picks flavour of the week and noone else trying other flavours huh?
that said, I too believe sheer popularity may not always be a great heuristic to judge the stability of a piece of software with .....
but please take these into consideration when comparing the two:
* jazzle always tracks tdz -- buble doesn't; I'm working on a way to make tdz optional.
* jazzle always records source-maps, so any comparison against other transpilers should take this into account. (as an aside, jazzle's sourcemaps are propably much smaller than buble's; there are some other tiny, cool features there too but I havenot yet found time to document them)
* jazzle tracks all top-level scopes during name synthesis; buble tracks just the first, which means things like 'var a; { let a; (function() { var a$1; a; })(); }' will not compile the way it should. actually, I created a gist, https://gist.github.com/icefapper/f672b71f569b95c0c1a8e31746..., and sent its link to Rich, but never received a response; it may be that he simply did not get to scroll down enough, as I'm sure he is a very busy man.
* jazzle, while fairly up and running (it can build and bundle and minify itself in slightly above 2secs on my 2011 vaio), has still a number of bottlenecks; after all, all these two years were spent to just rush it into production; with enough time (say, two months or so), I am very much confident I can make it run as fast as buble, without making any compromise on its accuracy.
* these, and I would be very glad if you could help me with the benchmarking!