{"by":"MouneshK","descendants":16,"id":46977967,"kids":[46988291,47020263,47022411,47020215,47020377,47019908,47022296,47022739,47020686],"score":38,"text":"Hi HN,<p>I built MOL, a domain-specific language for AI pipelines. The main idea: the pipe operator |&gt; automatically generates execution traces — showing timing, types, and data at each step. No logging, no print debugging.<p>Example:<p><pre><code>    let index be doc |&gt; chunk(512) |&gt; embed(&quot;model-v1&quot;) |&gt; store(&quot;kb&quot;)\n</code></pre>\nThis auto-prints a trace table with each step&#x27;s execution time and output type. Elixir and F# have |&gt; but neither auto-traces.<p>Other features:\n- 12 built-in domain types (Document, Chunk, Embedding, VectorStore, Thought, Memory, Node)\n- Guard assertions: `guard answer.confidence &gt; 0.5 : &quot;Too low&quot;`\n- 90+ stdlib functions\n- Transpiles to Python and JavaScript\n- LALR parser using Lark<p>The interpreter is written in Python (~3,500 lines). 68 tests passing. On PyPI: `pip install mol-lang`.<p>Online playground (no install needed): <a href=\"http:&#x2F;&#x2F;135.235.138.217:8000\" rel=\"nofollow\">http:&#x2F;&#x2F;135.235.138.217:8000</a><p>We&#x27;re building this as part of IntraMind, a cognitive computing platform at CruxLabx.\n&quot;&quot;&quot;","time":1770831108,"title":"Show HN: MOL – A programming language where pipelines trace themselves","type":"story","url":"https://github.com/crux-ecosystem/mol-lang"}