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:

243
active users

#textgeneration

0 posts0 participants0 posts today
Karsten Schmidt<p>Over the past few days I've been working on extending &amp; 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:</p><p>- variable definitions, optionally with multiple value choices <br>- cyclic &amp; recursive variable references/expansion<br>- variable assignments<br>- dynamic, indirect variable lookups (for context specific situations)<br>- optional preset &amp; custom modifiers (i.e. pointfree/concatenative application of modifier sequences)<br>- controlled randomness during var expansion</p><p>The new package is called: <a href="https://thi.ng/proctext" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/proctext</span><span class="invisible"></span></a> (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via <a href="https://thi.ng/parse" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/parse</span><span class="invisible"></span></a>. The resulting document AST is then interpreted via <a href="https://thi.ng/defmulti" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/defmulti</span><span class="invisible"></span></a></p><p>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.)</p><p>Demo (incl. 5 examples and can be used as playground):<br><a href="https://demo.thi.ng/umbrella/procedural-text/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">demo.thi.ng/umbrella/procedura</span><span class="invisible">l-text/</span></a></p><p><a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a> <a href="https://mastodon.thi.ng/tags/RewriteSystem" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RewriteSystem</span></a> <a href="https://mastodon.thi.ng/tags/ProcGen" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ProcGen</span></a> <a href="https://mastodon.thi.ng/tags/TextGeneration" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TextGeneration</span></a> <a href="https://mastodon.thi.ng/tags/CodeGenerator" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CodeGenerator</span></a> <a href="https://mastodon.thi.ng/tags/Parser" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Parser</span></a> <a href="https://mastodon.thi.ng/tags/DSL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DSL</span></a> <a href="https://mastodon.thi.ng/tags/Pointfree" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pointfree</span></a> <a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.thi.ng/tags/InteractiveFiction" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>InteractiveFiction</span></a></p>
Karsten Schmidt<p>Just updated the procedural text generator tool (from the most recent <a href="https://mastodon.thi.ng/tags/HowToThing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HowToThing</span></a> example[1]) to allow storing/loading source template text via the URL hash fragment. That means one can now share small procedural stories/texts like this (hoping Mastodon allows longish URLs):</p><p><a href="https://demo.thi.ng/umbrella/procedural-text/#W3NpemVdCmh1bW9uZ291cwpqdXJhc3NpYwpnaW5vcm1vdXMKZ2lnYW50aWMKaHVnZQp1bmZhdGhvbWx5IGxhcmdlCgpbYWRqXQplcGljCmJyZWF0aHRha2luZwppbmNyZWRpYmxlCmludGVydHdpbmVkCgpbbm91bl0KY29sbGVjdGlvbgplY29zeXN0ZW0KY29tcGVuZGl1bQphZ2dyZWdhdGlvbgoKW25vdmljZV0KdG90YWwgYmVnaW5uZXJzCmFic29sdXRlIG5vdmljZXMKCnRoaS5uZyBpcyBhIDxhZGo+IDxub3VuPiBvZiBhcm91bmQgMTg1IGNvZGUgbGlicmFyaWVzIGFuZCB0b29scywgcmVhbGx5IGEgPHNpemU+LCA8YWRqPiA8bm91bj4uIEV2ZW4gdGhvdWdoIGl0J3Mgbm90IGFpbWVkIGF0IDxub3ZpY2U+LCB0aGUgbGFyZ2VyIHByb2plY3QgaXMgYWxzbyBob3BpbmcgdG8gaW50cm9kdWNlIHBlb3BsZSB0byBzb21lIGV4cHJlc3NpdmUgYW5kIG1heWJlIG1vcmUgdW51c3VhbCAoaXQncyBhbGwgcmVsYXRpdmUhKSBwcm9ncmFtbWluZyBjb25jZXB0cyAmIHRlY2huaXF1ZXMuIEl0IGFsc28gaW5jbHVkZXMgYSA8c2l6ZT4gYW1vdW50IG9mIGNvbW1lbnRlZCBleGFtcGxlcyBhbmQgbGlua3MgdG8gZnVydGhlciByZWFkaW5nLiBTb29uIHRoaXMgd2lsbCBiZSBzdXBwbGVtZW50ZWQgYnkgc3Vic2NyaXB0aW9uLWJhc2VkIGxlYXJuaW5nIG1hdGVyaWFscyAmIG9ubGluZSBjb3Vyc2VzLg" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">demo.thi.ng/umbrella/procedura</span><span class="invisible">l-text/#W3NpemVdCmh1bW9uZ291cwpqdXJhc3NpYwpnaW5vcm1vdXMKZ2lnYW50aWMKaHVnZQp1bmZhdGhvbWx5IGxhcmdlCgpbYWRqXQplcGljCmJyZWF0aHRha2luZwppbmNyZWRpYmxlCmludGVydHdpbmVkCgpbbm91bl0KY29sbGVjdGlvbgplY29zeXN0ZW0KY29tcGVuZGl1bQphZ2dyZWdhdGlvbgoKW25vdmljZV0KdG90YWwgYmVnaW5uZXJzCmFic29sdXRlIG5vdmljZXMKCnRoaS5uZyBpcyBhIDxhZGo+IDxub3VuPiBvZiBhcm91bmQgMTg1IGNvZGUgbGlicmFyaWVzIGFuZCB0b29scywgcmVhbGx5IGEgPHNpemU+LCA8YWRqPiA8bm91bj4uIEV2ZW4gdGhvdWdoIGl0J3Mgbm90IGFpbWVkIGF0IDxub3ZpY2U+LCB0aGUgbGFyZ2VyIHByb2plY3QgaXMgYWxzbyBob3BpbmcgdG8gaW50cm9kdWNlIHBlb3BsZSB0byBzb21lIGV4cHJlc3NpdmUgYW5kIG1heWJlIG1vcmUgdW51c3VhbCAoaXQncyBhbGwgcmVsYXRpdmUhKSBwcm9ncmFtbWluZyBjb25jZXB0cyAmIHRlY2huaXF1ZXMuIEl0IGFsc28gaW5jbHVkZXMgYSA8c2l6ZT4gYW1vdW50IG9mIGNvbW1lbnRlZCBleGFtcGxlcyBhbmQgbGlua3MgdG8gZnVydGhlciByZWFkaW5nLiBTb29uIHRoaXMgd2lsbCBiZSBzdXBwbGVtZW50ZWQgYnkgc3Vic2NyaXB0aW9uLWJhc2VkIGxlYXJuaW5nIG1hdGVyaWFscyAmIG9ubGluZSBjb3Vyc2VzLg</span></a>==</p><p>[1] For context/reference: <a href="https://mastodon.thi.ng/@toxi/111347074558293056" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.thi.ng/@toxi/11134707</span><span class="invisible">4558293056</span></a></p><p><a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a> <a href="https://mastodon.thi.ng/tags/ProcGen" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ProcGen</span></a> <a href="https://mastodon.thi.ng/tags/TextGeneration" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TextGeneration</span></a> <a href="https://mastodon.thi.ng/tags/NaNoGenMo" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NaNoGenMo</span></a></p>
Karsten Schmidt<p><a href="https://mastodon.thi.ng/tags/HowToThing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HowToThing</span></a> #030 — Procedural, rule-based &amp; stochastic text generation using a custom DSL, parse grammar (via <a href="https://thi.ng/parse" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/parse</span><span class="invisible"></span></a>) and abstract syntax tree transformation (via <a href="https://thi.ng/defmulti" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/defmulti</span><span class="invisible"></span></a>).</p><p>Since it's <a href="https://mastodon.thi.ng/tags/NaNoWriMo" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NaNoWriMo</span></a> &amp; <a href="https://mastodon.thi.ng/tags/NaNoGenMo" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NaNoGenMo</span></a> [1], I'm closing out this first season of 30 <a href="https://mastodon.thi.ng/tags/HowToThing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HowToThing</span></a>'s with a related topic &amp; maybe someone even finds it useful/interesting... 😉🤷‍♂️</p><p>This example is in principle inspired by <span class="h-card" translate="no"><a href="https://xoxo.zone/@galaxykate" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>galaxykate</span></a></span>'s oldie &amp; goodie <a href="https://mastodon.thi.ng/tags/Tracery" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Tracery</span></a>, but is using a super simple custom text format instead of JSON to define variables and template text. Variables are expanded recursively and I've also added features like dynamic, indirect pointer-like variable lookups to derive variables based on current values (useful for conditionals &amp; context-specific expansions), hidden assignments, chainable modifiers... I've included 5 different "story" templates (incl. comments) showing various features. Just press "regenerate" to create new random variations...</p><p>Similar to the previous <a href="https://mastodon.thi.ng/tags/HowToThing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HowToThing</span></a>, I'm hoping this example also shows that approaching use cases like this via small domain-specific languages with proper grammar rules, does not require much ceremony and is often more amenable to change during prototyping (and later also more maintainable!) than just regex bashing approaches...</p><p>The parser grammar itself is explained in the <a href="https://thi.ng/parse" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/parse</span><span class="invisible"></span></a> readme. As usual, the grammar was created/prototyped with the Parser Playground[2], which we developed from scratch during the first thi.ng livestream[3] (2.5h video)...</p><p>Demo (example project #145):<br><a href="https://demo.thi.ng/umbrella/procedural-text/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">demo.thi.ng/umbrella/procedura</span><span class="invisible">l-text/</span></a></p><p>Source code:<br><a href="https://github.com/thi-ng/umbrella/tree/develop/examples/procedural-text/src" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/thi-ng/umbrella/tre</span><span class="invisible">e/develop/examples/procedural-text/src</span></a></p><p>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):</p><p><a href="https://github.com/thi-ng/umbrella/discussions" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/thi-ng/umbrella/dis</span><span class="invisible">cussions</span></a></p><p>[1] <a href="https://github.com/NaNoGenMo/2023/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/NaNoGenMo/2023/</span><span class="invisible"></span></a><br>[2] <a href="https://demo.thi.ng/umbrella/parse-playground/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">demo.thi.ng/umbrella/parse-pla</span><span class="invisible">yground/</span></a><br>[3] <a href="https://www.youtube.com/watch?v=mXp92s_VP40" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=mXp92s_VP4</span><span class="invisible">0</span></a></p><p><a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThingUmbrella</span></a> <a href="https://mastodon.thi.ng/tags/NaNoWriMo2023" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NaNoWriMo2023</span></a> <a href="https://mastodon.thi.ng/tags/NaNoGenMo2023" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NaNoGenMo2023</span></a> <a href="https://mastodon.thi.ng/tags/ProcGen" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ProcGen</span></a> <a href="https://mastodon.thi.ng/tags/Generative" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Generative</span></a> <a href="https://mastodon.thi.ng/tags/TextGeneration" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TextGeneration</span></a> <a href="https://mastodon.thi.ng/tags/Ngram" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ngram</span></a> <a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.thi.ng/tags/Tutorial" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Tutorial</span></a></p>
luca soldaini 🎀<p>An <a href="https://mastodon.social/tags/introduction" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>introduction</span></a> 👋 I’m an <a href="https://mastodon.social/tags/nlproc" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>nlproc</span></a> researcher at the Allen institute for AI studying systems to help scholars find and read papers! I also work in <a href="https://mastodon.social/tags/QuestionAnswering" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>QuestionAnswering</span></a>, <a href="https://mastodon.social/tags/TextGeneration" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TextGeneration</span></a>, <a href="https://mastodon.social/tags/InformationRetrieval" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>InformationRetrieval</span></a>, efficient <a href="https://mastodon.social/tags/MachineLearning" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MachineLearning</span></a>, and build <a href="https://mastodon.social/tags/opensource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>opensource</span></a> tools for NLP 🛠️</p><p>Free time is for sipping <a href="https://mastodon.social/tags/coffee" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>coffee</span></a> and baking <a href="https://mastodon.social/tags/pizza" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pizza</span></a>. I’m a sucker for obscure tech, early internet lore, and funky manuals and standards! </p><p>I organize at <a href="https://mastodon.social/tags/QueerInAI" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>QueerInAI</span></a>, a nonprofit that celebrates and connects queer researchers 🏳️‍🌈</p>