home.social

#pointfree — Public Fediverse posts

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

  1. Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:

    - variable definitions, optionally with multiple value choices
    - cyclic & recursive variable references/expansion
    - variable assignments
    - dynamic, indirect variable lookups (for context specific situations)
    - optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
    - controlled randomness during var expansion

    The new package is called: thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via thi.ng/parse. The resulting document AST is then interpreted via thi.ng/defmulti

    Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)

    Demo (incl. 5 examples and can be used as playground):
    demo.thi.ng/umbrella/procedura

    #ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction

  2. Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:

    - variable definitions, optionally with multiple value choices
    - cyclic & recursive variable references/expansion
    - variable assignments
    - dynamic, indirect variable lookups (for context specific situations)
    - optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
    - controlled randomness during var expansion

    The new package is called: thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via thi.ng/parse. The resulting document AST is then interpreted via thi.ng/defmulti

    Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)

    Demo (incl. 5 examples and can be used as playground):
    demo.thi.ng/umbrella/procedura

    #ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction

  3. Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:

    - variable definitions, optionally with multiple value choices
    - cyclic & recursive variable references/expansion
    - variable assignments
    - dynamic, indirect variable lookups (for context specific situations)
    - optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
    - controlled randomness during var expansion

    The new package is called: thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via thi.ng/parse. The resulting document AST is then interpreted via thi.ng/defmulti

    Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)

    Demo (incl. 5 examples and can be used as playground):
    demo.thi.ng/umbrella/procedura

    #ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction

  4. Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:

    - variable definitions, optionally with multiple value choices
    - cyclic & recursive variable references/expansion
    - variable assignments
    - dynamic, indirect variable lookups (for context specific situations)
    - optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
    - controlled randomness during var expansion

    The new package is called: thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via thi.ng/parse. The resulting document AST is then interpreted via thi.ng/defmulti

    Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)

    Demo (incl. 5 examples and can be used as playground):
    demo.thi.ng/umbrella/procedura

    #ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction

  5. Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:

    - variable definitions, optionally with multiple value choices
    - cyclic & recursive variable references/expansion
    - variable assignments
    - dynamic, indirect variable lookups (for context specific situations)
    - optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
    - controlled randomness during var expansion

    The new package is called: thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via thi.ng/parse. The resulting document AST is then interpreted via thi.ng/defmulti

    Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)

    Demo (incl. 5 examples and can be used as playground):
    demo.thi.ng/umbrella/procedura

    #ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction

  6. #HowToThing #029 — One for the #Forth friends: Minimal livecoding playground for animated 2D geometry generation (incl. SVG export) using a Forth-like DSL (domain-specific language) based on thi.ng/pointfree, thi.ng/pointfree-lang and various geometry related operations using thi.ng/geom. A short screen recording is included to demonstrate overall usage. This is a cutdown version of a prototype tool, originally from 2019...

    Even though the language is "Forthy", the underlying thi.ng/pointfree implementation does _not_ use a VM, but instead compiles words to vanilla JavaScript using normal functional composition (or reductions) and each word is passing data & state via a single shared stack context object (with the usual dual data & return stacks and an environment object with var bindings). The language supports quotations, local variables, combinators etc.

    I _highly_ recommend consulting the detailed readme docs for the above packages to familiarize yourself with the basic principles & language features/syntax. If you do have some prior #Forth knowledge, many aspects should feel familiar (apart from the geometry DSL terms)...

    Also worth pointing out that the editor/interpreter in this small example is not super forgiving re: error handling and might easily crash when live coding. The point of this demo is not about providing great UX, but to illustrate how the basic thi.ng/pointfree language infrastructure can be easily extended/adapted/integrated...

    Demo:
    demo.thi.ng/umbrella/pointfree

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

    (Note: The source code of the actual language bindings for the geometry operations is not shown here, but available in the `lang.ts` file, linked above...)

    #Forth #Pointfree #Concatenative #Programming #Geometry #Graphics #SVG #GenerativeArt #GenerativeDesign #TypeScript #JavaScript #ThingUmbrella

  7. #PointFree released their #ComposableArchitecture today! This system seems very wordy, but I’m going to find a personal project to try it out to see what it unlocks

    Congratulations to all of the contributors!

    pointfree.co/blog/posts/112-co