shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

266
active users

#codegeneration

1 post1 participant0 posts today

📖 While I mostly publicize my #lowocode #handbook now, our #modeldriven #book is still pushing strong 💪.

We're approaching 150 institutions #worldwide using the book. Latest one is an #MDE course by Mert Ozkaya at Yeditepe University (number 141).

With both books you can cover any #modeling, #DSL, #lowcode, #codegeneration, #modeldriven... topic. Pick the one that works best for you. Or even better, pick both ! 😜

🔗 mdse-book.com/

🔗 lowcode-book.com/

MDSE book · The model-driven book. Build better software faster with the right modelingModel-Driven Software Engineering in Practice. Models + Transformations = Software
Continued thread

To put the "large" package size a little more into perspective: I don't know of any other feature-comparable JS vector library which provides all of the following:

- Generic n-dimensional float, int, uint, boolean vectors
- Size optimized versions for 2D/3D/4D (all types)
- Multiple-dispatch wrappers (auto-delegating to available optimized versions)
- Memory-mapped vectors and optimized versions for various memory layouts (e.g. SOA/AOS)
- Optimized versions of many vector-scalar ops
- Optimized compound operations (like multiply-add etc.)
- Vector randomizations (several approaches)
- 99% of GLSL vector operations & conversions
- Vector versions of most of JS `Math` ops
- Vector interpolations (linear, bilinear, cubic, quadratic...)
- 10 different distance functions & metrics
- Swizzling & vector coercion/extension
- Dozens of additional graphics, statistics & ML-related operations

Just a quick #ThingUmbrella update to say that I've already replaced the thi.ng/vectors package on the develop branch and after LOTS of deep experimentation have decided NOT to split up the package. There will be a few (minor) breaking changes, mainly because of enforcing more consistent naming and more granularity in some source files (therefore possibly changed imports, though only if you use direct ones for individual functions...). All in all, I've managed to keep the impact on users to a bare minimum (likely unnoticeable for most), even though it's pretty much a complete rewrite of the entire package (with all its ~900 functions)... This package is now almost 10 years old and I'm very happy how this refactor turned out!

In terms of file size impact: The FULL minified pkg bundle is now 56.4KB vs previously 48.5KB, however the code density has improved and the brotli-compressed pkg size is only 15.1KB (only 1KB larger than before), which I found absolutely incredible! 🎉 I also have to state once more that this package (and most others in #ThingUmbrella) are _designed for tree shaking_ and bundling. Hardly any project would ever use the full set of functions provided here all at once, most will only use a small/tiny subset...

Also — more importantly — many of the 185 example projects in the repo are now showing between 2-25% smaller final bundle sizes. Some also have become slightly larger, but so far I found the most by only ~2%...

Related to this change: I've also updated the thi.ng/color & thi.ng/matrices packages to be free from dynamic code generation now! The only packages still using `new Function(...)` are the following, but for those it's unavoidable and dynamic code generation is a core feature:

- thi.ng/pixel (custom pixel format definition/compilation)
- thi.ng/pixel-convolve (custom image convolution kernel compilation)
- thi.ng/shader-ast-js (Shader AST to JavaScript compilation)

I will do more testing over the coming days, then release new version(s) ASAP...

thi.ng/vectorsOptimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

Some previews of recent #ThingUmbrella updates/additions:

1) The declarative & fully typed CLI arg parser thi.ng/args now has a nice `cliApp()` wrapper (also largely declarative), supporting multiple sub-commands (with shared and command-specific args/options), automated usage generation, no-color.org support/detection. Still doing more testing with various CLI tools of mine (from which this all has been extracted), but planning to release in next couple of days...

2) People who've been following the project will know that for years I've been a big fan of Tachyons CSS[1], which is pretty much used for all ~150 examples in the repo. As nice as it is, it's also unmaintained by now and there're various more modern features missing (e.g. grids) and there're also general issues with the overall approach. Switching to Tailwind would mean having to install a whole boatload of additional tooling so is anathema and also doesn't address some of the features I've been wanting to explore: E.g. Generating entire CSS frameworks from a bunch of wildly combinatorial rules, options & lookup tables, keeping literally _everything_ customizable, combinable and purely data-driven (i.e. generated from a JSON file). Similar to Tachyons CSS, these custom generated frameworks are based on standalone CSS utility classes (hence the original particle-inspired naming). However, I'm aiming for a different usage and instead of assigning them directly to an HTML element's `class` attrib, here we can assign them to (nested) CSS selectors to define fully inlined declarations. The additional killer feature is that each of these classes can be prefixed with an arbitrary number of freely defined media queries and thus making it trivial to add additional responsive/accesible features and _without_ requiring megabytes of raw CSS to cover the combinatorial explosion!

For the past few days I've been trialling this new approach and I very much like where this is going... Take a look at the basic example in the new thi.ng/meta-css package & readme. I will also write more about this in coming days. All in all, it's another example where code generation and a domain specific language approach is super powerful again... limits of my world and such...

Also, speaking of bloatware (earlier above), the entire toolchain (incl. CLI & all dependent packages) is a mere 21KB (minified) and it already can do a ton!

#CSS#CLI#DSL

#HowToThing #026 — Shader meta-programming techniques (functional composition, higher-order functions, compile-time evaluation, dynamic code generation etc.) to generate animated plots/graphs of 16 functions (incl. dynamic grid layout generation) within a single WebGL fragment shader.

Today's key packages:

- thi.ng/shader-ast: DSL to write (fully type-checked) shaders directly in TypeScript and later compile them to GLSL, JS (and other target languages, i.e. there's partial support for Houdini VEX and [very] early stage WGSL...)
- thi.ng/shader-ast-stdlib: Collection of ~220 re-usable shader functions & configurable building blocks (incl. SDFs primitives/ops, raymarching, lighting, matrix ops, etc.)
- thi.ng/webgl-shadertoy: Minimal scaffolding for experimenting with fragment shaders (supports both normal GLSL or shader-ast flavors/compilation)

If you're new to the Shader-AST approach (highly likely!), this example will again introduce a lot of new concepts, hopefully in digestible manner! Please also always consult the package readmes (and other linked examples) for more background info... There're numerous benefits to this approach (incl. targetting different target langs and compositional & optimization aspects which are impossible to achieve (at least not elegantly) via just string concatenation/interpolation of shader code, as is much more commonplace...)

This example comes fresh off the back of yesterday's new easing function additions (by @Yura), though we're only showing a subset here...

Demo:
demo.thi.ng/umbrella/shader-as
(Check the console to view the generated GLSL shader)

Source code:
github.com/thi-ng/umbrella/tre

If you have any questions about this topic or the packages used here, please reply in thread or use the discussion forum (or issue tracker):

github.com/thi-ng/umbrella/discussions

Mostly, software interfaces are only defined by their signature and without a formal description of the admissible behavior and timing assumptions.

#ComMA provides a family of domain-specific languages that integrate existing techniques from formal behavioral and time modeling and is easily extensible.

youtu.be/-bbJTg7pJ-k

#SoftwareEngineering
#Interfaces
#Modelling
#ModelChecking
#CodeGeneration