#ReleaseWednesday โ€” Extracted & extended the LISP-like DSL from an existing #ThingUmbrella example[1] as new small package for better/direct re-use in other projects:

https://thi.ng/lispy

The core language is kept intentionally minimal, aimed at simple sandboxed data transformations/derivations, small code snippets/expressions in GUIs or config settings. However, the language is very easy to extend/customize with new functions or control flow constructs etc. Currently, the language is interpreted and has the following builtins (see screenshots). There's no macro support so far (and not sure if that's even desired here)...

[1] The original #HowToThing example browser REPL this was extracted from (and which has now been updated to use the new package):

https://demo.thi.ng/umbrella/lispy-repl/

#ThingUmbrella #Lisp #DSL #FunctionalProgramming #REPL

Lightweight, extensible, interpreted Lisp-style DSL for embedding in other projects

thi.ng/lispy

Btw. Here're some more collected links to earlier experiments/stages of development (from the last 1.5 years) โ€” If anything, this all is yet another example of my personal slow-cook art-making/revisiting approach... ๐Ÿ˜…

SDF obstacles (static & animated):
https://mastodon.thi.ng/@toxi/111698367393819716
https://mastodon.thi.ng/@toxi/111698918722774094

Path attraction/following:
https://mastodon.thi.ng/@toxi/111704122960594951
https://mastodon.thi.ng/@toxi/111704168442616187

Boids vs. Voronoi:
https://mastodon.thi.ng/@toxi/111720368699392895

Visualizing motion/direction vectors:
https://mastodon.thi.ng/@toxi/111688835639715011

#HowToThing mini tutorial:
https://mastodon.thi.ng/@toxi/111308439597090930

#ThingUmbrella #GenerativeArt #AlgorithmicArt #NoAI #Boids #Color #Video #TypeScript

Karsten Schmidt (@[email protected])

Attached: 1 image Boids now with modular behavior system, incl. newly added field-based 3-sensor Braitenberg vehicle steering behavior. In this case the field is an SDF (via https://thi.ng/geom-sdf), which is used as obstacle map with soft boundary. I'm amazed how well (and without any further help) the lil' buggers are managing to escape these concave corners... #Agents #Boids #Particles #Simulation #Behaviors #Emergence #Generative #GenerativeArt #TypeScript #ThingUmbrella

Mastodon Glitch Edition

Yesterday, one year ago... (Still wondering how many people actually have read or tried out any of these)

https://mastodon.thi.ng/@toxi/111348591236791838

#ThingUmbrella #HowToThing #TypeScript #Tutorial #Shader #GIS #SIMD #Forth #ProcGen

Karsten Schmidt (@[email protected])

#HowToThing #Epilogue #LongRead: After 66 days of addressing 30 wildly varied use cases and building ~20 new example projects of varying complexity to illustrate how #ThingUmbrella libraries can be used & combined, I'm taking a break to concentrate on other important thi.ngs... With this overall selection I tried shining a light on common architectural patterns, but also some underexposed, yet interesting niche topics. Since there were many different techniques involved, it's natural not everything resonated with everyone. That's fine! Though, my hope always is that readers take an interest in a wide range of topics, and so many of these new examples were purposefully multi-faceted and hopefully provided insights for at least some parts, plus (in)directly communicated a core essence of the larger project: Only individual packages (or small clusters) are designed & optimized for a set of particular use cases. At large, though, thi.ng explicitly does NOT offer any such guidance or even opinion. All I can offer are possibilities, nudges and cross-references, how these constructs & techniques can be (and have been) useful and/or the theory underpinning them. For some topics, thi.ng libs provide multiple approaches to achieve certain goals. This again is by design (not lack of it!) and stems from hard-learned experience, showing that many (esp. larger) projects highly benefit from more nuanced (sometimes conflicting approaches) compared to popular defacto "catch-all" framework solutions. To avid users (incl. myself) this approach has become a somewhat unique offering and advantage, yet in itself seems to be the hardest and most confusing aspect of the entire project to communicate to newcomers. So seeing this list of new projects together, to me really is a celebration (and confirmation/testament) of the overall #BottomUpDesign #ThingUmbrella approach (which I've been building on since ~2006): From the wide spectrum/flexibility of use cases, the expressiveness, concision, the data-first approach, the undogmatic mix of complementary paradigms, the separation of concerns, no hidden magic state, only minimal build tooling requirements (a bundler is optional, but recommended for tree shaking, no more) โ€” these are all aspects I think are key to building better (incl. more maintainable & reason-able) software. IMO they are worth embracing & exposing more people to and this is what I've partially attempted to do with this series of posts... ICYMI here's a summary of the 10 most recent posts (full list in the https://thi.ng/umbrella readme). Many of those examples have more comments than code... 021: Iterative animated polygon subdivision & heat map viz https://mastodon.thi.ng/@toxi/111221943333023306 022: Quasi-random voronoi lattice generator https://mastodon.thi.ng/@toxi/111244412425832657 023: Tag-based Jaccard similarity ranking using bitfields https://mastodon.thi.ng/@toxi/111256960928934577 024: 2.5D hidden line visualization of DEM files https://mastodon.thi.ng/@toxi/111269505611983570 025: Transforming & plotting 10k data points using SIMD https://mastodon.thi.ng/@toxi/111283262419126958 026: Shader meta-programming to generate 16 animated function plots https://mastodon.thi.ng/@toxi/111295842650216136 027: Flocking sim w/ neighborhood queries to visualize proximity https://mastodon.thi.ng/@toxi/111308439597090930 028: Randomized, space-filling, nested 2D grid layout generator https://mastodon.thi.ng/@toxi/111324566926701431 029: Forth-like DSL & livecoding playground for 2D geometry https://mastodon.thi.ng/@toxi/111335025037332972 030: Procedural text generation via custom DSL & parse grammar https://mastodon.thi.ng/@toxi/111347074558293056 #ThingUmbrella #OpenSource #TypeScript #JavaScript #Tutorial

Mastodon Glitch Edition
@khinsen @toxi See "Output of Function toDot" #FederatedWiki #HowToThing
derived views of pure data

New #ThingUmbrella releases & example: This week's releases included updates to https://thi.ng/system, a minimal and declarative way to compose an app from multiple components, build their dependency graph and manage their lifecycle (async start/stop) in the correct (topological) order. The computed graph (DAG) can then also be serialized to GraphViz format for visualization/debugging/documentation purposes with a single line of code (see readme)...

Even though I've been using this system in dozens of projects, it occurred to me there wasn't any example project yet demonstrating this approach, so I finally fixed that:

https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-system-bus

The demo is purposefully minimal and the source code is (hopefully) much more interesting than the result. In addition to showing how the app components are defined, this example also shows another powerful pattern I've been using in my own tools:

Using https://thi.ng/atom as central app state and https://thi.ng/rstream pubsub as central event bus, to both of which various system components can attach topic based subscriptions (aka event and/or change handlers). Since each of these reactive subscriptions are normal rstream subs, they can all be forming graphs of child subs and be filtered/transformed and synchronized via hundreds of composable operators in the https://thi.ng/rstream and https://thi.ng/transducers packages โ€” and โ€” these rstream values can also be directly embedded in https://thi.ng/rdom created reactive UI components/elements/attributes. Some of these techniques are shown in this new example as well... Hope it's helpful to some of you!

#ThingUmbrella #ThingNews #HowToThing #Graph #Components #Lifecycle #Reactive #UI #PubSub #GraphViz #TypeScript #OpenSource

Been debugging boids & behavior combinations all evening! Happy to say, I think all force contributions are fixed now (classic off-by-one error was leading to an initially subtle but increasingly obvious directional bias), and I can focus again on experimenting with some new amazing emergent behaviors... Aside from that, maybe this also qualifies for #Genuary2024 (Day 1: Particles)?!

Btw. This is just a variation of this #ThingUmbrella example project:

https://demo.thi.ng/umbrella/boid-basics/

...which was created as part of last year's #HowToThing series:

https://mastodon.thi.ng/@toxi/111308439597090930

#Agents #Boids #Behaviors #Emergence #Generative #GenerativeArt

A short overview of end-of-2023 state of thi.ng(s) (https://thi.ng/umbrella only!):

96 releases done in 2023 (i.e. every 3.6 days on average)

188 projects/packages (+12 this year)
151 example projects (+32 this year)

3,865 source files
144,432 lines of code
54,155 docs/comments (37% or 2.66 lines of code-to-comment ratio)
198,587 total SLOC

Readme files (for all 188 packages):

49,580 total words
189,978 lines

A lot of activity this year was spent on adding/improving documentation & creating new examples to illustrate general usage patterns. From August till October I published 30 chapters of #HowToThing aka heavily commented code examples & mini-tutorials, incl. ~20 new example projects which are now part of the monorepo. Just like the overall project scope, these chapters covered anything from audio synthesis, data transformations, DSLs, geometry, generative art/design, GIS, image processing, Mastodon client, reactive UIs (NOT using React!), shaders, other visualizations and more... Check out the hashtag to view them (full list is also part of the thi.ng/umbrella readme).

#ThingUmbrella #OpenSource #Gratitude #ProjectStatistics #YearInReview #IndyDev #Fundraising

2/3

One of the best SIMD intro articles I've ever come across thus far. Very nicely explains all the core concepts and operations, lots of sketches/diagrams... Noice! ๐Ÿ‘

https://mcyoung.xyz/2023/11/27/simd-base64/

Btw. If you're using TypeScript/JavaScript, you can play with some of these concepts/ops directly from the REPL using https://thi.ng/simd. This package uses WASM behind the scenes, but doesn't expose the full set of available SIMD instructions (it's a lil' bit more highlevel...)

Also see recent #HowToThing post and practical example about it here:
https://mastodon.thi.ng/@toxi/111283262419126958

#SIMD #Tutorial #Rust #TypeScript #WebAssembly

Designing a SIMD Algorithm from Scratch ยท mcyoung

@toxi Bookmarking your #HowToThing for later! The Recurse Center has attuned me to creative, bottom+up approaches, and I have a few weeks of my RC term remaining to work in a little exploration.