quickjspp
quickjspp | compression-dictionary-transport | |
---|---|---|
3 | 7 | |
- | 90 | |
- | - | |
- | 5.2 | |
- | 2 months ago | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
quickjspp
-
LuaX: A Lua Dialect with JSX
JSX is useful not just for advanced string interpolation but for representing/generation of tree alike structures / literals in PL. JSX is not only about HTML but XML too.
I don't know how JSX is made in LuaX but in my QuickJS fork [1] JSX allows to generate as tree literals as procedure calls (JSX(tag,props,kids)) that can be used for various purposes - DOM population, VDOM generation, HTML/XML string composition, etc.
And being embedded into a compiler JSX a) prevents common mistakes like non-closed tags and b) effective internalization ( translation happens at compile time once ).
[1] JSX implementation for QuickJS : https://gitlab.com/c-smile/quickjspp/-/blob/master/quickjs-j...
-
JavaScript import maps are now supported cross-browser
In Sciter I did just that - JSX is an integral part of JS compiler - patched version of QuickJS : https://gitlab.com/c-smile/quickjspp/-/blob/master/quickjs-j...
So in Sciter this works out of the box:
-
The miracle of Smalltalk’s become: (2009)
Only when code tries to access props/methods of the loaded object it gets fetched from disk, its __proto__ is set to particular class, etc.
More on this architecture: https://gitlab.com/sciter-engine/sciter-js-sdk/-/blob/main/d...
Patched QuickJS with storage support is here: https://gitlab.com/c-smile/quickjspp - it uses DyBase of Konstantin Knizhnik as a storage.
compression-dictionary-transport
-
Compression efficiency with shared dictionaries in Chrome
> Dictionary entries (or at least the metadata) should be cleared any time cookies are cleared.
So it seems it should not get you anything you cannot already do with cookies.
https://github.com/WICG/compression-dictionary-transport?tab...
-
Chrome feature: Compression dictionary transport with Shared Brotli
Talked about here:
https://github.com/WICG/compression-dictionary-transport
- Compression Dictionary Transport
-
Improving compression with a preset DEFLATE dictionary (2015)
There's a spec up for custom dictionary support across the web. https://github.com/WICG/compression-dictionary-transport
This was one of the major blockers that iirc Mozilla threw in the way of zstd compression support: they said zstd with a standardly accepted dictionary would be too particular & wanted more. With this spec maybe Moz will accept zstd as a web compression standard.
-
JavaScript import maps are now supported cross-browser
Here here. Today, bundlers may get you to first page load faster. But if a user comes back and you've shipped two small fixes, all those extra wins you get from compressing a bunch files at once fly out the window & you're deep in the red. If you have users that return to your site, and your site is actively developed, bundling is probably a bad tradeoff.
We see similar fixedness in the field all over the place: people freaking love small Docker image sizes & will spend forever making it smaller. But my gosh the number of engineers I've seen fixate on total download size for an image, & ignore everything else, is vast. Same story, but server side: my interest is in the download size for what v1.0.1 of the Docker container looks like once we already have v1.0.0 already shipped. Once we start to consider what the ongoing experience is, rather than just the first time easy-to-judge metric, the pictures all look very different.
Then there's the other thing. The performance reasons for bundling are being eaten away. Preload & Early Hints are both here today & both offer really good tools to greatly streamline asset loading & claw back a lot of turf, and work hand-in-glove with import-maps. The remaining thing everyone points out is that a large bundle compresses better (but again at the cost of making incremental updates bad). The spec is in progress, but compression-dictionary-transport could potentially obliterate that advantage, either make it a non-factor, or perhaps even a disadvantage for large bundles (as one could use a set of dictionaries & go discover which of your handful of dictionaries best compress the code). These dictionaries would again be first-load hit, but could then be used again and again by users, to great effect again for incremental changes. https://github.com/WICG/compression-dictionary-transport
Bundles are such an ugly stain on the web, such an awful hack that betrays the web's better resourceful nature. Thankfully we're finally making real strides against this opaque awful blob we've foisted upon this world. And we can start to undo not just the ugliness, but the terrible performance pains we've created by bundling so much togther.
What are some alternatives?
sciter-js-sdk
download-esm - Download ESM modules from npm and jsdelivr
webappsec-subresource-integrity - WebAppSec Subresource Integrity
import-maps - How to control the behavior of JavaScript imports
esbuild - An extremely fast bundler for the web
JSLint - JSLint, The JavaScript Code Quality and Coverage Tool
simpatico - Simpatico is an umbrella term for several data-structures and algorithms written in JavaScript
lit - Lit is a simple library for building fast, lightweight web components.
proposal-type-annotations - ECMAScript proposal for type syntax that is erased - Stage 1