HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
alantech
marsha
Python2023–2023
alantech / marsha

marsha

Marsha is a functional, higher-level, English-based programming language that gets compiled into tested Python software by an LLM

2Distinct people
8Mentions
0Explicit recommenders
466GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Marsha is a functional, higher-level, English-based programming language that gets compiled into tested Python software by an LLM

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour8 dated mentions

Observed mentions: 2023-07-25 15:43:56 UTC to 2023-07-26 06:18:11 UTC.

0122023-07-25 15:00:00 UTC to 2023-07-25 16:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 25, 15:002023-07-25 16:00:00 UTC to 2023-07-25 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-25 17:00:00 UTC to 2023-07-25 18:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-07-25 18:00:00 UTC to 2023-07-25 19:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-07-25 19:00:00 UTC to 2023-07-25 20:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-25 20:00:00 UTC to 2023-07-25 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-25 21:00:00 UTC to 2023-07-25 22:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-25 22:00:00 UTC to 2023-07-25 23:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 25, 22:002023-07-25 23:00:00 UTC to 2023-07-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 00:00:00 UTC to 2023-07-26 01:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 01:00:00 UTC to 2023-07-26 02:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-07-26 02:00:00 UTC to 2023-07-26 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 03:00:00 UTC to 2023-07-26 04:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 04:00:00 UTC to 2023-07-26 05:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 05:00:00 UTC to 2023-07-26 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-26 06:00:00 UTC to 2023-07-26 07:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 26, 06:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 25, 15:002023-07-25 15:00:00 UTC2023-07-25 16:00:00 UTC110
Jul 25, 16:002023-07-25 16:00:00 UTC2023-07-25 17:00:00 UTC000
Jul 25, 17:002023-07-25 17:00:00 UTC2023-07-25 18:00:00 UTC202
Jul 25, 18:002023-07-25 18:00:00 UTC2023-07-25 19:00:00 UTC202
Jul 25, 19:002023-07-25 19:00:00 UTC2023-07-25 20:00:00 UTC000
Jul 25, 20:002023-07-25 20:00:00 UTC2023-07-25 21:00:00 UTC000
Jul 25, 21:002023-07-25 21:00:00 UTC2023-07-25 22:00:00 UTC000
Jul 25, 22:002023-07-25 22:00:00 UTC2023-07-25 23:00:00 UTC101
Jul 25, 23:002023-07-25 23:00:00 UTC2023-07-26 00:00:00 UTC000
Jul 26, 00:002023-07-26 00:00:00 UTC2023-07-26 01:00:00 UTC000
Jul 26, 01:002023-07-26 01:00:00 UTC2023-07-26 02:00:00 UTC101
Jul 26, 02:002023-07-26 02:00:00 UTC2023-07-26 03:00:00 UTC000
Jul 26, 03:002023-07-26 03:00:00 UTC2023-07-26 04:00:00 UTC000
Jul 26, 04:002023-07-26 04:00:00 UTC2023-07-26 05:00:00 UTC000
Jul 26, 05:002023-07-26 05:00:00 UTC2023-07-26 06:00:00 UTC000
Jul 26, 06:002023-07-26 06:00:00 UTC2023-07-26 07:00:00 UTC101

What Hacker News says

8 sources
> You're a bit too black-and-white on this situation. While I agree with your other points, I feel this argument doesn't really hold water. The output of the c compiler is deterministic. I struggle very hard to believe that the floating point rounding errors when you compile C will cause it to occasionally emit a binary that is not byte-identical multiple sequential runs in a row. What any program does at runtime is essentially non-deterministic, and that's 100% not what we're talking about here. If you consider https://github.com/alantech/marsha/blob/main/examples/web/we... ... The generated output of this file is a probability distribution with a sweet spot where the code does what you want; there are multiple outputs of code that sit in the sweet spot. You want one of these. The actual output of this file is a probability distribution
Read the rest
that includes the examples, but may or may not overlap the sweet spot of 'actually does the right thing'. ...in fact, and there's no specific reason to expect that, regardless of the number of examples you provide, the distribution that includes those examples also includes the sweet spot. For common examples it will, but I'd argue that it's actually provable that there are times (eg. where the output length of a valid solution would be > the possible out of the model), that regardless of the examples / tests, it's not actually possible to generate a valid solution from. Just like how constraint solvers will sometimes tell you there's no solution that matches all the constraints. So, that would be like a compiler error. "You've asked for something impossible". ...but I imagine it would be very very difficult to tell the difference between inputs that overlap the sweet spot and those that don't; the ones that don't will have solutions that look right, but actually only cover the examples; and there's literally no way of telling the difference between that and a correct solution without HFRL. It seem like an intractable problem to me. > Different tools for different scenarios, so if that is a huge problem, don't use Marsha as it currently is. As you say~
In Show HN: Marsha – An LLM-Based Programming Language
I would say that you do not quite understand it. Part of the process of generating the code that does work is that it also generates a test suite using the examples you provide as the test cases and it actually executes the test suite against the code that was generated and iterates with the LLM until the test suite passes. This is where the claim that it's tested code comes from, because it is literally tested. One of the examples we added is a simple tool to get headlines from CNN.com[1]. We don't commit the generated python to the repository because we're treating it as a compiler artifact, but here's a gist[2] of one of the runs, including the test suite it created to validate proper behavior. It's not just relying purely on the LLM's ability to string tokens together, but goes through a validation phase to make sure what it built is
Read the rest
In Show HN: Marsha – An LLM-Based Programming Language
I don't believe that I can change your mind on this, so I didn't intend to respond, but as this is the top comment, I do want to provide a rebuttal on why we do think this is actually a programming language, that the code we have written is actually a compiler, and why Marsha is a useful exploration of the programming language design space. First, a programming language is just a syntax to describe functionality that could be turned into an actual program. Lisp[1] was defined in 1958 but didn't have a full compiler until 1962. Was it not a programming language in the intervening 4 years? Marsha does not fall into this, since it can already generate working code, but the bar for what is a programming language, I believe, is lower than most would immediately think. Second, a programming language does not need to be imperative to be a progra
Read the rest
mming language, or languages like Lean[2] that have you write proofs that the compiler then figures out how to generate the code to fulfill would not be programming languages. Lean, Coq, and other such languages are much more technically impressive than Marsha, true, but they share the property you describe the properties a function should have and then the compiler generates the program that fulfills those properties. Marsha differs from these Proof-based languages in that poor specificity still produces some sort of program instead of a compilation error, which makes it sort of like Javascript that will do something with the code you write as long as it is syntactically valid. This is not a desirable property of Marsha, but it is a trade-off that in practice makes it more immediately usable to a larger number of people than Lean or Coq, because the skill level required is lower. This is also, as you allude to, the current state of the world in most software development -- project managers come up with high-level requirements for new features, technical leads on engineering teams convert this into tasks and requirements for individual contributors who then write the code and tests which are then peer reviewed by the team as a sanity check and then committed. This process may or may not cover all situations and the specifications at all levels are likely not as rigorous as what Lean would require of you. Marsha mimics this process, starting from the tech lead level and bleeding into the individual contributor level. The type and function descriptions are analogous to the tech lead requirements and the examples are analogous to the test suite the individual contributor would write. Just like in real world development, if these are not well specified, the resulting code will likely have logic bugs that would need to be addressed with a stricter definition and improved test cases. The compiler consumes this definition into an AST[3], walks the tree to generate intermediate forms, and generates an output in a format that can be executed by a computer. Some use "transpiler" for a compiler that targets another language, but that is a subset of compilers, not a separate kind of tool, in my opinion, or the Java compiler would be a "transpiler" for the JVM bytecode format that is also not directly executable by a computer. We are still in the very early stages with Marsha and agree that more syntax could be helpful -- we already have 4 different syntactic components to Marsha versus the fully open-ended text entry behavior of Github Copilot or ChatGPT. But what makes Marsha interesting (to me) is that it makes it possible to explore a totally new dimension in programming language design: the formalization of the syntax to define a program itself. In many papers on new algorithms, the logic is often described in a human-readable list of steps without the hard specificity of programming languages, improving the ability of the reader to understand the core of the algorithm, rather than getting bogged down in the implementation details of this or that programming language. There is still a formalism, but it differs from that of traditional programming languages, and Marsha lets you work with your computer in a similar way. Are there cases where this is a bad idea? Absolutely. Just like there are cases where writing your code in Python is a bad idea versus writing it in Rust. There is no perfect programming language useful for all scenarios, and probably never will exist. But there will be a subset of situations where the trade-offs Marsha provides makes sense. By being more forgiving than even the most forgiving interpreted languages out there, Marsha is in a good position to fill that niche if the primary barrier is difficulty. [1]: https://en.wikipedia.org/wiki/Lisp_(programming_language)#Hi... [2]: https://en.wikipedia.org/wiki/Lean_(proof_assistant) [3]: https://github.com/alantech/marsha/blob/main/marsha/parse.py...
In Show HN: Marsha – An LLM-Based Programming Language
Simply, Marsha is not Python. ;) More seriously, in Python, types are optional and the exact behavior is explicitly defined at runtime, but the author of the code already had a behavior in mind when they wrote the code. Getting the intended type information from the user to provide to the LLM improves the quality of the generated code, which is actually somewhat lossy. The "intended type information" isn't "explicit type information", though. We support any character besides these four as part of a type `(),:`. That includes spaces and periods, so you can describe the type as a short sentence if you aren't exactly sure what the structure ought to be.[1] And since in Marsha you don't actually write an imperative function body, argument names don't matter, only the argument order (as Marsha does not support named parameters, at least right
Read the rest
now) so there's no argument naming in the declaration, which can make it more succinct than Python def lines in certain situations, though to be fair none of our examples do this. [1]: https://github.com/alantech/marsha/blob/main/examples/web/du...
In Show HN: Marsha – An LLM-Based Programming Language

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.