Thanks for the feedback, @mbostock and @jrus!
Zeroth of all, I want to make it clear, as @jrus did, that if I critique any projects or patterns, it’s only with immense gratitude and the hope that by understanding them better and putting myself in a position to contribute, I can pay back some open source debt and help improve or help others use the projects that have made it even possible for me to do the work I do.
First of all then, thanks for pointing me to d3-ease, @mbostock! Looks wonderful and a bit more feature-complete than mattdesl/eases. I’m only just learning d3, but the more I learn, the more I like the patterns and organization of the modules. I truly appreciate how much went into its creation and documentation! That being said, I find that import {...} from '...'
feels very natural within observable and, whether intended or not, makes possible an immediate connection to documentation much like you’d find in a product like MATLAB. Window functions are similar random thing I think would lend themselves well to this pattern. Or morphological operations. I think all of these things have in common that they benefit from readily accessible visual documentation being a core part of the development process. More sophisticated modules or modules that pull in other dependencies are more complicated and probably don’t fit into this pattern.
I think maybe part of the friction I’m fighting is that there are quite a few camps on what good JS development looks like and I, someone who uses and contributes a bit but doesn’t “own” any project, have always felt a bit caught in the middle since people use JS to solve every problem in every environment so that it doesn’t have a de facto foundation like numpy/scipy or even Eigen. To write modules that interoperate with others means lots of little battles like whether to create micromodules (stackgl?) or mesomodules (d3?; clarification: utterly made-up term because it’s not technically a monorepo, I think?, but shares nearly the same philosophy, which IMO is a great one) or monorepos (stdlib?), whether to favor require
or import
, build processes + dist versions or just code. Whether to deal in typed arrays as the lowest common denominator or a higher level construct like ndarrays. If I just contribute PRs to add UMD dist
bundles, it’s challenging to get that past PR review and could very well lead to ten copies of ndarray getting pulled in if not thought through carefully. Perhaps import
solves this, but @kgryte has rightfully pointed out that backward compatibility is not to be taken lightly.
Observable is very interesting to me because it’s a unique and novel platform on which a lot of these things can be built in a way that feels completely natural. I think it’s the first time more powerful uses of JS that put communication and portability at the forefront have even felt viable to me. And I emphasize platform because it’s wonderfully agnostic about which libraries you use on top of it—which has led to some really neat uses.
Perhaps the challenge I’m trying to voice then is that I’m trying to understand how to build out—or just expose—high quality pieces that fit into this world in a way that utilizes what Observable has to offer. I think It’s pretty common knowledge that I find stdlib a viable candidate for a project that addresses many of the truly difficult pieces of building a coherent environment head-on. Any sort of endorsement or preferential treatment of stdlib by Observable makes no sense, but I wonder if exposing such tools in a coherent manner is something that can be accomplished in userland. For simple modules, it’s possible to copy/paste code and produce something that’s nice and, at the very least, not a maintainability disaster. For larger modules, that’s not the case.
Anyway, nothing to stress about, but I just wanted to voice the sort of things that roll around my head and cause me to lose a bit of sleep from time to time, but which I don’t generally act on because I simply haven’t figured out the answers yet.
Thanks again for the feedback and for producing an environment that gets my mind turning on things like these!