I kept my twtr account for a while because brands I occasionally reach out to were still exclusively there. It’s now no longer the case so I put the account down for real :)
#ReleaseThursday 🚀 — This week's second round of releases is featuring:
https://thi.ng/geom — added support for more shape pairings in the polymorphic intersection function to altogether 18, now also including: line↔︎group (incl. nested groups), line↔︎polygon, line↔︎polyline, ray↔︎group, ray↔︎line
https://thi.ng/geom-isec — simplified intersection result type (intersection point(s) now always in an array), added computation of point-inside-shape flags to more shape types, bug fixes
https://thi.ng/meta-css — more updates to CSS template handling, spec doc system and tons more additions to the generative baseframework specs/templates, now already consisting of 932 CSS utility classes (incl. 61 callable templates/functions/macros), which can be used as-is or as starting point to define your own custom CSS framework(s). All explained in the readme... This toolchain will likely keep on seeing a flurry of other updates since I'm heavily using it for the design of the new thi.ng website too! Together with mprocs[1] and Vite it also offers a very nice hot-reloading workflow...
https://thi.ng/hiccup-css — added support for SASS-style &-parent reference when defining nested selectors, updated readme w/ examples
https://thi.ng/random — added a weightedProbability() function to simplify dealing with arbitrarily shaped distributions (attached code example to compute the histogram & visualize results as ASCII-art is from the API docs)
As usual, please check the readmes and changelogs for more details!
Earlier today[1], helped my son with a raycasting issue and then ended up updating/extending the 2D shape intersection function in https://thi.ng/geom, which now also supports ray intersections with nested shape groups/hierarchies (via same single function call) and a new option to return all intersection points found (rather than just the first/closest). Both of these features are shown in a new example project (forthcoming) and in the anim below...
New approach—Typia. https://typia.io/docs/setup/
– Compile static type to (runtime) validation code.
– Downside: Tools don’t work that strip out types and run result.
Rust does latter approach well. For TS, I prefer former.
So much to do, but can't stop watching & hacking on this pseudo fluid sim every now & then... 🤩 Probably will develop this further into a tutorial for https://thi.ng/shader-ast
#ReleaseFriday 🚀 - This week's #ThingUmbrella releases are mainly related to ShaderAST & ongoing repo-wide documentation updates of all 190 packages...
https://thi.ng/shader-ast — Added polymorphic syntax sugar versions of various math ops to simplify "self-assignments" aka ops in the form of x = x+ 2, which would in shader AST syntax looked like assign(x, add(x, 2)), now addSelf(x, 2)... See changelog & docs for details of supported ops.
https://thi.ng/shader-ast-stdlib — The "standard library" for https://thi.ng/shader-ast has had several new additions of useful helpers & metaprogramming tools, e.g. a new branches() function (see screenshot) to simplify n-ary A/B testing of params (or debugging of shader outputs) as is commonly done by e.g. visualizing different versions as columns based on fragment position. Other additions include surface normal calculation from a 2D terrain/grayscale texture (e.g. for GIS or fluid sims), float packing/unpacking (to/from 8bit/channel RGBA textures as a lot of mobile devices still don't support float render textures in WebGL)...
https://thi.ng/shader-ast-optimize — This package is used to apply various optimizations on a given shader AST program (or expression). Recursive constant folding has been extended to more ops & built-in functions. There's also a new wrapper function defOptimized() which can be used in place of defMain() to create auto-optimized shader main functions. The new version also has several bug fixes and more tests... See updated readme for examples.
As mentioned in earlier toots, I've also been doing several large rounds/commits of general documentation related updates/revamps, incl. updating all code examples in readmes & API docs to provide all required import statements, writing a new tooling (see below) to extract said code blocks from their original files and export them to their own source files for easier testing/trying them out from the command line. That work is only partially completed (with still hundreds of files to edit/update), but if you've got a clone of the https://thi.ng/umbrella repo, you can already try it out by running yarn tool:tangle (to extract examples from API docs in source files) or yarn doc:readme (to extract from readmes). In both cases, make sure your first build everything via yarn build. The tools will log where each of the examples is written to. Once I'm done, there will be ~800 example files extracted via this process... 💪
I ❤️ where this is going (incl. quite a few incoming additions to https://thi.ng/shader-ast-stdlib) - but still lacking the language to describe what's going on here...
Just finished manually updating in total ~780 code blocks & snippets in over 400 files (readme's & source code), adding import statements of all used functions & updating comments over the past week (in addition to the 1st round last weekend[1])... Would be super great to hear if people find this useful/helpful (other than the two who were proposing it in the survey feedback)... 😉
Over the next months I will do another pass over the readmes to make it easier to auto-extract various code examples[2], to try them out and/or test them... Also going forward, new code examples added to readme's will aim to support this feature, but there's a huge backlog of existing ones too.
I suggest we have a new survey similar to state of JS called state of JS runtime, to get an idea of which runtimes are most popular in the industry & what are they being used for. (its merely a question in StateOfJS)
@nosherwan node hasn't fully embraced ES6 modules that came out almost ten years ago, let alone typescript. Bun is fast, yes, they support typescript, but that's about it. #Deno also has #typescript built-in, and adds extra security, a new package system, and lots of new features. I can even compile a binary.