home.social

#transducers — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #transducers, aggregated by home.social.

  1. #ReleaseSaturday 🚀 — Just pushed the new version of thi.ng/hiccup-carbon-icons (now a much larger collection of 2200+ icons, mentioned yesterday[1]) and some other smaller updates/additions to other packages...

    This is the last release before switching all packages to the recently released TypeScript 6.0, support for which will likely require some restructuring & refactoring and hopefully will be less painful than it might look so far (I'm also waiting for some dependencies to update their TS type definitions, which are currently breaking, e.g. github.com/serialport/node-ser, used for thi.ng/axidraw)

    I also added some new async operators for thi.ng/transducers-async to simplify some stream processing tasks (e.g. collecting and/or consuming stdout/stderr of a child process by rechunking the stream for line-based processing), for example:

    ```
    import { rechunk } from "@thi.ng/transducers-async";
    import { spawn } from "child_process";

    // launch child process
    const child = spawn("ls", ["-l"]);

    // split child's stdout into single lines
    for await(let line of rechunk(/\r?\n/g, child.stdout)) {
    console.log("output", line);
    }
    ```

    [1] mastodon.thi.ng/@toxi/11642201

    #ThingUmbrella #OpenSource #Maintenance #TypeScript #JavaScript #Transducers #Async #Icons

  2. #ReleaseSaturday 🚀 — Just pushed the new version of thi.ng/hiccup-carbon-icons (now a much larger collection of 2200+ icons, mentioned yesterday[1]) and some other smaller updates/additions to other packages...

    This is the last release before switching all packages to the recently released TypeScript 6.0, support for which will likely require some restructuring & refactoring and hopefully will be less painful than it might look so far (I'm also waiting for some dependencies to update their TS type definitions, which are currently breaking, e.g. github.com/serialport/node-ser, used for thi.ng/axidraw)

    I also added some new async operators for thi.ng/transducers-async to simplify some stream processing tasks (e.g. collecting and/or consuming stdout/stderr of a child process by rechunking the stream for line-based processing), for example:

    ```
    import { rechunk } from "@thi.ng/transducers-async";
    import { spawn } from "child_process";

    // launch child process
    const child = spawn("ls", ["-l"]);

    // split child's stdout into single lines
    for await(let line of rechunk(/\r?\n/g, child.stdout)) {
    console.log("output", line);
    }
    ```

    [1] mastodon.thi.ng/@toxi/11642201

    #ThingUmbrella #OpenSource #Maintenance #TypeScript #JavaScript #Transducers #Async #Icons

  3. #ReleaseSaturday 🚀 — Just pushed the new version of thi.ng/hiccup-carbon-icons (now a much larger collection of 2200+ icons, mentioned yesterday[1]) and some other smaller updates/additions to other packages...

    This is the last release before switching all packages to the recently released TypeScript 6.0, support for which will likely require some restructuring & refactoring and hopefully will be less painful than it might look so far (I'm also waiting for some dependencies to update their TS type definitions, which are currently breaking, e.g. github.com/serialport/node-ser, used for thi.ng/axidraw)

    I also added some new async operators for thi.ng/transducers-async to simplify some stream processing tasks (e.g. collecting and/or consuming stdout/stderr of a child process by rechunking the stream for line-based processing), for example:

    ```
    import { rechunk } from "@thi.ng/transducers-async";
    import { spawn } from "child_process";

    // launch child process
    const child = spawn("ls", ["-l"]);

    // split child's stdout into single lines
    for await(let line of rechunk(/\r?\n/g, child.stdout)) {
    console.log("output", line);
    }
    ```

    [1] mastodon.thi.ng/@toxi/11642201

    #ThingUmbrella #OpenSource #Maintenance #TypeScript #JavaScript #Transducers #Async #Icons

  4. #ReleaseSaturday 🚀 — Just pushed the new version of thi.ng/hiccup-carbon-icons (now a much larger collection of 2200+ icons, mentioned yesterday[1]) and some other smaller updates/additions to other packages...

    This is the last release before switching all packages to the recently released TypeScript 6.0, support for which will likely require some restructuring & refactoring and hopefully will be less painful than it might look so far (I'm also waiting for some dependencies to update their TS type definitions, which are currently breaking, e.g. github.com/serialport/node-ser, used for thi.ng/axidraw)

    I also added some new async operators for thi.ng/transducers-async to simplify some stream processing tasks (e.g. collecting and/or consuming stdout/stderr of a child process by rechunking the stream for line-based processing), for example:

    ```
    import { rechunk } from "@thi.ng/transducers-async";
    import { spawn } from "child_process";

    // launch child process
    const child = spawn("ls", ["-l"]);

    // split child's stdout into single lines
    for await(let line of rechunk(/\r?\n/g, child.stdout)) {
    console.log("output", line);
    }
    ```

    [1] mastodon.thi.ng/@toxi/11642201

    #ThingUmbrella #OpenSource #Maintenance #TypeScript #JavaScript #Transducers #Async #Icons

  5. #ReleaseSaturday 🚀 — Just pushed the new version of thi.ng/hiccup-carbon-icons (now a much larger collection of 2200+ icons, mentioned yesterday[1]) and some other smaller updates/additions to other packages...

    This is the last release before switching all packages to the recently released TypeScript 6.0, support for which will likely require some restructuring & refactoring and hopefully will be less painful than it might look so far (I'm also waiting for some dependencies to update their TS type definitions, which are currently breaking, e.g. github.com/serialport/node-ser, used for thi.ng/axidraw)

    I also added some new async operators for thi.ng/transducers-async to simplify some stream processing tasks (e.g. collecting and/or consuming stdout/stderr of a child process by rechunking the stream for line-based processing), for example:

    ```
    import { rechunk } from "@thi.ng/transducers-async";
    import { spawn } from "child_process";

    // launch child process
    const child = spawn("ls", ["-l"]);

    // split child's stdout into single lines
    for await(let line of rechunk(/\r?\n/g, child.stdout)) {
    console.log("output", line);
    }
    ```

    [1] mastodon.thi.ng/@toxi/11642201

    #ThingUmbrella #OpenSource #Maintenance #TypeScript #JavaScript #Transducers #Async #Icons

  6. Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUTs. Converting 1D to 3D takes a bit more effort, but thanks to thi.ng/transducers, it's still very easy...

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #LUT #Photography

  7. Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUTs. Converting 1D to 3D takes a bit more effort, but thanks to thi.ng/transducers, it's still very easy...

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #LUT #Photography

  8. Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUTs. Converting 1D to 3D takes a bit more effort, but thanks to thi.ng/transducers, it's still very easy...

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #LUT #Photography

  9. Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUTs. Converting 1D to 3D takes a bit more effort, but thanks to thi.ng/transducers, it's still very easy...

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #LUT #Photography

  10. Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUTs. Converting 1D to 3D takes a bit more effort, but thanks to thi.ng/transducers, it's still very easy...

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #LUT #Photography

  11. Added a new convenience transducer for clipping and binning values, e.g. as preparation step for histogram generation whilst working in the REPL. New release forthcoming. A small code example attached (actually taken from the doc string of the new `binned()` transducer).

    #ThingUmbrella #Transducers #FunctionalProgramming #ASCIIArt #DataViz #TypeScript #JavaScript

  12. 🔊 Session Highlights 🚀

    What an insightful session on **Smart Sensors & Transducers** with Mr. Davendra Yadav (Principal, CERT Group of Institutions, Meerut)! 🌟

    From understanding how sensors shape our daily lives to exploring cutting-edge innovations transforming industries, this session was packed with valuable knowledge! 💡✨

    #SessionHighlights #SmartSensors #Innovation #TechTalk #CERTMeerut #Engineering #CareerGrowth #Transducers #FutureTech

  13. @weavejester I actually think this is probably wrong! "induce" reminds me of induction, and no values are being induced (this is often related to dependent types and having some sort of inductively defined type or value).

    I'll play with it some more, it may be that I need to call it transduce-once or transduce-one (onceduce? lol that's terrible).

    #Scheme #transducers #Clojure

  14. Had an idea a couple days ago while writing one of the chapters of the transducers book: it would be very useful to be able to transduce over a single value, if only to test that your transducer / collector will do what you expect it to do.

    I've called it once: gitlab.com/ThatGeoGuy/chicken-

    I'm not sure this is the best name for it, so maybe fedi can help me get a better name?

    #Scheme #Clojure #Transducers

  15. Someone asked for help on an interesting transducers (functional programming) problem. My initial answer using other existing transducers still had some minor differences to their intended behavior, but writing a small custom transducer then saves the day and now I can already think of a bunch of other uses for it too:

    Attempt #1:
    github.com/thi-ng/umbrella/iss

    Attempt #2 (custom transducer):
    github.com/thi-ng/umbrella/iss

    #ThingUmbrella #FunctionalProgramming #Transducers #TypeScript

  16. #ThingUmbrella #ReleaseFriday[1] 🚀 — As announced a couple of weeks ago, a lot of my recent work has been centered around async iterables and addressing the conceptual overlap between the various packages related to those, specifically: thi.ng/transducers-async, thi.ng/rstream, thi.ng/csp, thi.ng/fibers, and partially related, thi.ng/rdom too. Apart from the first package, until recently, none of the others had direct support for async iterables (largely for historic reasons), but they all offer similar operators & functionality (via different means), which I'm slowly consolidating where it makes sense...

    Part of this pretty large undertaking has been a complete rewrite of the temporarily deprecated thi.ng/csp package for Communicating Sequential Processes[2] (IMHO one of the most elegant & sane ways to structure larger apps via multiple small, reasonable concurrent processes). The package is active again now (as v3+) albeit constituting a new API (new docs still WIP) and removing any direct transducer-related functionality — this is one aspect of the aforementioned consolidation and now simply assumed to be delegated to the thi.ng/transducers-async and/or non-async thi.ng/transducers packages. I've also included a new small example project showing mixed usage patterns of working with CSP channels and combining them with (async) transducers to create derived views:

    Demo:
    demo.thi.ng/umbrella/csp-bus/

    Source:
    github.com/thi-ng/umbrella/blo

    Hand in hand with these major changes are smaller and still ongoing updates to thi.ng/rdom, which recently received partial support for embedded async iterables as reactive values inside a UI/DOM component tree. The goal for this package is to become fully decoupled from thi.ng/rstream and focus more on the equally powerful, but more lightweight (since part of the language) async iterables. Adapters from rstream → asynciter already exists (see docs).

    Unrelated, but also part of this week's release: The new version of thi.ng/meta-css includes support for CSS `light-dark()`. The base framework now includes ~950 utilities & 70 functions. See readme for full list...

    Happy coding! :)

    [1] There're actually a lot more frequent release, but these days I'm only mentioning the more notable ones to not spam everyone...

    [2] en.wikipedia.org/wiki/Communic

    #ThingUmbrella #CSP #Async #Transducers #Reactive #UI #DOM #CSS #TypeScript #JavaScript #OpenSource

  17. Phew... One key step closer to replicating & simplifying core thi.ng/rstream functionality via just standard async iterables: Just added a `mult()` base-operator to thi.ng/transducers-async [1] which allows splitting a single async iterable into multiple child async iterables (aka subscriptions, aka 1:N splitting), each of which can be added/removed dynamically and individually processed e.g. via transducers, vanilla `for await()` consumers, and/or used as input for downstream `mult()`s to construct entire graph topologies (cycles allowed) of async processors etc. Back pressure is handled by waiting for all child subscriptions to deliver the value before consuming a new one from the source...

    [1] github.com/thi-ng/umbrella/blo

    #ThingUmbrella #Async #Transducers #ReactiveProgramming #FunctionalProgramming #TypeScript #JavaScript

  18. Sorry for recent silence, if I can summarize most of my past two weeks or so:

    "Async all the thi.ngs, what colud posibsyl og wrngo!" [1]

    1) New package thi.ng/transducers-async (restarted development after originally stopping it in 2018 due to lack of async iterable support)
    2) Updates to thi.ng/rstream (adapters from/to async iterables)
    3) Upcoming, a new & simplified implementation of thi.ng/csp (currently still only on a feature branch[2]) for building blocks for Communicating Sequential Processes.
    4) Also still WIP only, async iterable support for thi.ng/rdom, i.e. in the same way as rstream subscriptions, such async iterables can soon be directly embedded as component/element bodies or attribute values and then perform pinpointed DOM updates each time their value changes...

    As I said, async all the thi.ngs...

    [1] h/t @sjb3d for an ancient tweet with a similar sentiment & outcome :)

    [2] The CSP package too was somewhat deprecated (for similar reasons) and a while ago I added another alternative CSP implementation via thi.ng/fibers, but that package too might see some more refactoring/simplifying by switching to async generators...

    #ThingUmbrella #Async #Transducers #OpenSource #TypeScript #JavaScript

  19. If you change "traversables" with #transducers I think you get a pretty clear idea of how #Scheme or #Clojure transducers are different from Rust's Iterator trait.

    without.boats/blog/iterators-a

  20. Has anyone used the new Dayton Audio interchangeable mount system on their #transducers? does it work as well as their regular mounts?

    :boost_anim_vanilla:

  21. #HowToThing #008 — CSV parsing & filtering into structured data via thi.ng/csv and creating a multi-plot data visualization via thi.ng/viz (along with a range of other helpful packages for various side aspects).

    The attached visualization shows a lin-log plot of new COVID cases between March 2020 - Dec 2021:

    - Daily world total as line plot
    - UK (red) and USA (blue) cases as interleaved bar plots

    (All data from: ourworldindata.org/coronavirus)

    Full source code:
    gist.github.com/postspectacula

    #ThingUmbrella #Transducers #TypeScript #JavaScript #DataViz #CSV #SVG #Tutorial

  22. #HowToThing #003 Tracking multiple key states and extracting high-level commands from key sequences via thi.ng/rstream & thi.ng/transducers-fsm. The key sequences are stored as a trie and matched via a transducer-based finite state machine.

    Btw. The new example #125 of the thi.ng/umbrella monorepo shows an extended version of this approach...

    Demo:
    demo.thi.ng/umbrella/rdom-key-

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

    #ThingUmbrella #TypeScript #JavaScript #FSM #Transducers #Tutorial

  23. Announcing #HowToThing, small code snippets illustrating useful patterns and use cases for various libraries/projects in the thi.ng ecosystem/anti-framework...

    #HowToThing #001:
    Build a FPS counter with moving average w/ thi.ng/transducers

    Source code in alt text

    (Ps. Have been trying to start similar stuff in the past on the birdsite, but let's see if I can control my attention and be more consistent this time... If you have any topic requests, please reply below [or via DM])

    #ThingUmbrella #TypeScript #JavaScript #FunctionalProgramming #Transducers #Tutorial

  24. Thank you all who joined the #ThingUmbrella stream earlier! 🙇 Hope it was worth your time! Also, if you want to see another example of #transducers usage, look at @BITPRINT's grid iterator #p5js sketch and the refactoring I've done...

    github.com/thi-ng/umbrella/dis

  25. Oh boy CHICKEN #transducers (wiki.call-cc.org/eggref/5/tran) v0.2.0 is out.

    Not a huge change here - collectors are now a bit more consistent. They all need to be wrapped in parens, and they all take in an optional sentinel argument instead of passing the sentinel to transduce.

    Oh, and they should all be named `collect-XXX` now. See the changelog in the repo for more.

    Big victory here: I managed to finally set up a Dockerfile and push to the repo's GitLab Registry. OH MY GOD it is so much faster now.

  26. New blog post: thatgeoguy.ca/blog/2023/01/04/

    This one comes with actual software and a bone to pick! (jk?)

    Anyways, this is basically a follow-up to my previous brain-vomit regarding #transducers and how they work in #Clojure vs. #Scheme. See coales.co/@thatgeoguy/10959349

    At the end of the day the only sane solution I found was to just parameterize the missing assumption, the fold procedure, inside of the transduce call. I think overall it fits together nicely and I've tried damn hard to make sure the docs all have tons of examples:

    wiki.call-cc.org/eggref/5/tran

  27. @thatgeoguy

    Anytime!

    If you would like to find out more on theory & implementation, they are presented in two classic #MIT #AIMemo|s by Richard C Waters:

    ›Obviously Synchronizable Series Expression — Part I: User's Manual for the OSS Macro Package‹ (#AIM958a)
    🧷 oastats.mit.edu/handle/1721.1/

    ›Obviously Synchronizable Series Expressions — Part II: Overview of the Theory and Implementation‹ (#AIM959a)
    🧷 oastats.mit.edu/handle/1721.1/

    🌺

    🦎 t.me/FamilyOfLisp

    🏷️ #Lisp #CommonLisp #Scheme #Transducers

  28. @thatgeoguy

    Anytime!

    If you would like to find out more on theory & implementation, they are presented in two classic #MIT #AIMemo|s by Richard C Waters:

    ›Obviously Synchronizable Series Expression — Part I: User's Manual for the OSS Macro Package‹ (#AIM958a)
    🧷 oastats.mit.edu/handle/1721.1/

    ›Obviously Synchronizable Series Expressions — Part II: Overview of the Theory and Implementation‹ (#AIM959a)
    🧷 oastats.mit.edu/handle/1721.1/

    🌺

    🦎 t.me/FamilyOfLisp

    🏷️ #Lisp #CommonLisp #Scheme #Transducers

  29. @thatgeoguy

    Anytime!

    If you would like to find out more on theory & implementation, they are presented in two classic #MIT #AIMemo|s by Richard C Waters:

    ›Obviously Synchronizable Series Expression — Part I: User's Manual for the OSS Macro Package‹ (#AIM958a)
    🧷 oastats.mit.edu/handle/1721.1/

    ›Obviously Synchronizable Series Expressions — Part II: Overview of the Theory and Implementation‹ (#AIM959a)
    🧷 oastats.mit.edu/handle/1721.1/

    🌺

    🦎 t.me/FamilyOfLisp

    🏷️ #Lisp #CommonLisp #Scheme #Transducers

  30. @thatgeoguy

    Anytime!

    If you would like to find out more on theory & implementation, they are presented in two classic #MIT #AIMemo|s by Richard C Waters:

    ›Obviously Synchronizable Series Expression — Part I: User's Manual for the OSS Macro Package‹ (#AIM958a)
    🧷 oastats.mit.edu/handle/1721.1/

    ›Obviously Synchronizable Series Expressions — Part II: Overview of the Theory and Implementation‹ (#AIM959a)
    🧷 oastats.mit.edu/handle/1721.1/

    🌺

    🦎 t.me/FamilyOfLisp

    🏷️ #Lisp #CommonLisp #Scheme #Transducers

  31. @thatgeoguy

    Anytime!

    If you would like to find out more on theory & implementation, they are presented in two classic #MIT #AIMemo|s by Richard C Waters:

    ›Obviously Synchronizable Series Expression — Part I: User's Manual for the OSS Macro Package‹ (#AIM958a)
    🧷 oastats.mit.edu/handle/1721.1/

    ›Obviously Synchronizable Series Expressions — Part II: Overview of the Theory and Implementation‹ (#AIM959a)
    🧷 oastats.mit.edu/handle/1721.1/

    🌺

    🦎 t.me/FamilyOfLisp

    🏷️ #Lisp #CommonLisp #Scheme #Transducers

  32. Been thinking about #transducers way too much lately.

    In particular, I'm stuck on a point about how #Clojure does transducers that isn't really possible in other #Lisp langs.

    The point is monomorphism and polymorphism. Clojure seems able to provide generic transduce across a variety of types and collections by leveraging multi-methods. #Scheme doesn't really have this though, and it seems like an un-parameterized assumption built into Clojure's transducers library.

  33. So, here's my #introduction: Composer and improvising musician, seasonal programmer, occasional (involuntary) builder, wannabe researcher, making sounds with #feedback #doublebass, #transducers, #bela and #supercollider.

    Made music and sound with and for dancers, moving images, empty rooms, various speaker setups, generative albums, NES emulators and head-nodding audiences.

    Swedish dad.

  34. Paper Plate Surround Sound System - With the holiday season, you might turn to paper plates to cut down on dishwashing... - hackaday.com/2021/12/03/paper- #transducers #mischacks #speakers #audio

  35. #transducers in #racket

    - #srfi171
    * www.mail-archive.com/racket-us…
    * git.sr.ht/~bjoli/racket-srfi-1…
    - rebellion/streaming transducers
    * docs.racket-lang.org/rebellion…

    The rebellion ones are more rackety in expression and integration with other racket protocols, but apparently far less efficient.

    @racket