Show HN: Marsha – An LLM-Based Programming Language
I&#x27;m going to bed soon, so I need to be more brief with my responses. This is not meant to be snarky, so I apologize if any of the short sentences seem that way.<p>&gt; 1) A series of instructions to do a task, which can be unambiguously mapped into a series of instructions in another format.<p>&gt; or<p>&gt; 2) A series of instructions to do a task, which is mapped non-deterministically into a series of instructions in another format.<p>You&#x27;re a bit too black-and-white on this situation. Floating point calculations often suffer subtle differences in behavior based on optimization flags[1] or CPU architecture[2]. I would not consider C non-deterministic, but this is a situation where differences show up without changes to the code being compiled.<p>&gt; It could do anything; the P value of it doing something crazy might drop, but it&#x27;s not zero; and fundamentally, how can you rely on a system where the instructions you give may or may not map to the machine code output?<p>&gt;<p>&gt; You add tests? Sure... but, those are generated too right?<p>&gt;<p>&gt; You have to dance through a series of tighter and tighter hoops to try to reduce the P value of &quot;crazy hallucination and chaos&quot;, but I see no meaningful insight here about how you plan to mitigate that problem completely?<p>1. Marsha in the here-and-now definitely does have a small probability of actually generating junk tests that it can also somehow generate working code for.<p>2. Different tools for different scenarios, so if that is a huge problem, don&#x27;t use Marsha as it currently is.<p>3. Since LLMs are trained on human generated code explained by humans, the code it generates is human readable, so you can always review the generated output before you rely on it, right now. Human still in the loop, but the amount of work significantly reduced.<p>4. Trivially, you can get determinism in output by setting temperature to 0, though that also means if it fails to generate an output it will always fail to generate an output.<p>5. A fully predictable output requires a formalism essentially equal to existing programming languages. The purpose of Marsha is to explore relaxing that for development velocity and simplicity, but it is intended to be a gradient you can choose from so I agree it should be possible. Nothing solid figured out now, but simply dropping into your target language of choice would be an &quot;easy&quot; patch, though it defeats the purpose of the language. Something like Rust&#x2F;Haskell pattern matching or Lean&#x2F;Coq constraints informing you of missing definitions would be better, but honestly unsure how to get there.<p>&gt; Given the context length (and nature of large contexts in general) in LLMs, I also ponder whether it&#x27;s even possible to do this beyond the trivial form, because it seems like as the constraint set scales, the capability of any LLM to address those constraints (and to be confident that it has) seems like a difficult problem to solve.<p>This one doesn&#x27;t seem as hard to me, because of the divide-and-conquer nature of programming. Each individual function gets its own context, and if that function is too big, break it into chunks and generate those independently. Definitely more of a Lisp-y style instead of a big blob of old school PHP.<p>May also become effectively irrelevant if useful context size exceeds the length of something massive like a novel.<p>&gt; However, I would like to say that I see this domain as an interesting area of research; and most certainly neither a) a solved problem, or b) a dead end. There&#x27;s definitely stuff here worth playing with and exploring.<p>Fully agree. Marsha of today doesn&#x27;t &quot;solve&quot; it (and depending on your acceptance level of C floating point changes, may never do so) but I say pretty confidently that it is further along than Copilot, and I don&#x27;t see why it won&#x27;t improve in the future.<p>[1]: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;7517588&#x2F;different-floating-point-result-with-optimization-enabled-compiler-bug" rel="nofollow noreferrer">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;7517588&#x2F;different-floati...</a>
[2]: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;64036879&#x2F;differing-floating-point-calculation-results-between-x86-64-and-armv8-2-a" rel="nofollow noreferrer">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;64036879&#x2F;differing-float...</a>