Bit's publication on Medium covers JavaScript and React tooling, component libraries, and frontend architecture patterns.
HN commenters link it to explain the backend-for-frontend pattern and why Nanoid is replacing UUID.
Virtually everything is a dependency in JavaScript, whether you're using node.js or not. One need look no further than your citation of `open()` as the proof that the nodejs environment "has more stdlib stuff". If the operating environment can run in a context where file IO happens, a native file open function is about the most basic baseline there is. It's absolutely not a good look for "well, we have `open()`!" to be the poster child of the JS stdlib.
After `left-pad` and `flatmap-stream`, attempts to justify the state of affairs in the JS ecosystem are patent absurdities. They show starkly that the platform vendor needs to offer a reasonably-robust basic toolkit, and that cultures of "every function should be published as a library!" are a massive risk factor.
A good first-party standard library should be considered a security requirement for every application. Dependencies should be brought in with care and attention, not in a massive indiscriminate orgy of nested modules spraying every function into its independent own library and resulting in every node.js application requiring its own 500MB+ folder of libraries to even start.
Think it doesn't get worse? People are now using node.js to distribute "business cards". Arbitrary JavaScript execution on your local user account. Has science gone too far?! Someone at npmjs.com sure has by allowing this kind of thing. [0]
The technical world is crumbling. Who can fix it?
[0]…
A side question. The advantage of JSX I see is the ability to connect, declaratively, components. I find this very helpful in terms of understanding programs I write. I wonder if I use React not because of the virtual dom, but simply because of JSX.
So I would like to explore the ability to use JSX in non-DOM environments. react-three-fiber does this with Threejs, but then it is still React oriented. I found this article about parsing JSX https://blog.bitsrc.io/demystifying-jsx-building-your-own-jsx-parser-from-scratch-caecf58d7cbd. And I know babel has something that parses JSX.
Does anyone have recommendations for doing this. Threejs to me a good candidate - a non React version, since it is a hierarchical system (scene, meshes, materials etc), but I suspect there are other applications.
I made an attempt to implement a Javascript version of Hickey's transducers - a sort of conveyor belt of functions and that is another instance of a series of processing steps that might be best represented in JSX
Personally, I think this is a myth (https://blog.bitsrc.io/11-popular-misconceptions-about-micro-frontends-d5daecc92efb).
Most our projects where microfrontends have been actively demanded (and we did now quite a lot of them) did not come up due to use of multiple frameworks. Yes, it is possible to use multiple technologies, but quite often there is key technology in place anyway. E.g., one of our clients had a huge pattern library written in React and demanded all microfrontends to be written in React.
So why then microfrontends at all? Well, all parts are still independent from each other, i.e., independently developed and deployed. Our client has multiple teams and like that these teams can just work in their own pace using a few guiding principles that have been given by the solution architecture.
Nanoid are really great. It is a smarter uuid4 with variable size and alphabet. It is also a lot faster to generate.
See that:
https://blog.bitsrc.io/why-is-nanoid-replacing-uuid-1b5100e62ed2
By definition, if you base62 or base64 your uuid4 it will be longer (30%?).
This generate directly in the final encoding so it is a lot shorter.
Based on the simulator calculation, you just need 24 chars to be equivalent to an uuid4 that is 35 chars.
But being able to determine the length of the resulting id is one of the greatest feature. Did it never happened to you the case that you would like a shorter uuid4 and think that you can just truncate it? Not realizing that some parts of the uuid have a special meaning and are not random...
Specifics depend on project(s)/work environment(s); but literate programming[0] and using/enforcing coding/git/versioning standards can help automate a lot of things[1][2][3].
aka re: outdated responses -- blog and/or email list for when 'new/updated version' pushed out with errata/change log location.
[0] : https://blog.bitsrc.io/literate-programming-a-radical-approach-to-writing-code-with-documentation-ebb5dc892cd7
[1] : https://blog.codacy.com/coding-standards
[2] : https://github.com/git-lfs/git-lfs/blob/main/.github/workflows/ci.yml#L15
[3] : https://github.com/git-lfs/git-lfs/blob/main/.github/workflows/ci.yml#L15
Exactly. Async/await just an alternative way to represent a promise chain.
My feeling is that mixing the use of promise chains and async/await can make code hard to follow, so I ask colleages to not mix them in the same function.
Sure, async/await is syntactic sugar for a generator that chains promises into a promise chain for you. Not sure why you'd care. That is an implementation detail that never gets exposed to the user.
The only time I feel that promise chains are better async/await is when treating Promise as a monad https://blog.bitsrc.io/out-with-async-await-and-in-with-promise-lifting-c42882a474fd