mudasobwa
Creator of Cure
Imagine a conductor forced to relearn musical notation every time a new instrument joins the orchestra. Violin—one system of writing. Cello—another. Oboe—a third, with reversed polarity, no less. The trumpet flatly refuses to acknowledge the existence of the staff and insists on a tablature of its own invention. Absurd, of course. In the real world every instrument reads the same score. Notes, rhythm, dynamics are universal. Only the technique of execution differs.
MetaAST is that score.
Trending in Blog Posts
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
Hey everyone! :waving_hand:
I’ve published Part 7 of the Building Distributed Systems in Elixir series, where we build core distributed ...
New
So, instead of wasting my afternoon arguing with anonymous handles on X, I turned to my trusty, soulless assistant and said: “Listen, ple...
New
An educational side project in Elixir, Phoenix, and Tauri. I share what I learned while wiring Automerge into the BEAM, including how I s...
New
New article: Elixir Project Structure — From mix new to a Growing Codebase
I’ve published a new article in my Elixir learning series on d...
New
Process labels are useful for visualization and debugging. Here’s why you should use them.
New
Somewhere, right now, a senior engineer is on the verge of a nervous breakdown because his company will not let him switch from Claude to...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
A bit pretentious writing style but I enjoyed the article.
Extremely ambitious project that I’d join and would try to help. I do agree that each language’s AST is kind of a distraction and if we can standardize a converter from that to the meta-AST then we’d score huge wins in code analysis. Which we desperately need recently.
One problem is that many languages don’t have a stable AST – Elixir is one of them. However, combining the language and its version allows us to pin down exact AST details. Requires more work – but it’s only done once.
Really though: amazing idea. Would love to see it bear some fruit.
Asd
Strange post.
First of all, there are no concepts which exist in all languages. Even variables don’t exist in all languages (like stack-oriented languages or assembly languages).
Second, is that purity is a higher-level construct and what pure and what is not — defined strictly by the developer. In a language like C, setting data by some local pointer can be a side effect, given that it can be used as a way to share some information with another thread. And even if you define what is pure and what is not (what will most likely be different from the developer’s understand), you can’t just write a generic analyzer, because not all languages have functions, and those who have them, usually can’t provide a guarantee that all code reachable by the function will be a part of the call graph.
Even in Elixir, this code is pure
But so is this
And the
fninside is invisible in the call graph. You may argue that the latter version changes the state of the system by introducing a new process. But I will say that the first version changes thecurrent_stacktracefield of the process info. So, again, developer defines what “pure” means.I mean, you can represent different languages in the similarly structured AST, but this would just offload semantic differences of the languages on the programs which would analyze such AST. There would be no universal algorithms, just universal representation with lots of language-specific algorithms around it
mudasobwa
Exaggeration is my middle name. That’s the way I hook not only the reader to continue reading but also myself to not give up writing.
Well, many languages don’t have a notion of AST in the language itself. I use 3-rd party S-expr generators for Ruby, for example. And yet that’s not the biggest problem, trust me
It’s coming. I wrote it when I figured out it finally got somewhat shaped. Stay tuned.
mudasobwa
In the Yakut language, there are 14 words for snow of varying degrees of whiteness. In Japanese, 裸木 (Hadakagi)—is a seasonal word that means a tree that has shed its leaves for the winter.
And yet we can talk to Yakuts and Japanese.
Sure I can. It won’t be bullet-proof, it would make mistakes, and I am fine with that. Everything “unclear” goes to “non-pure” and I get back the list of definitely pure functions. That’s ok for my needs.
May I argue that I would consider the latter function being a non-pure one, and that’s totally fine? False-positives are harmless, unless, of course, you are after an academic thesis that nobody would even read.
May I allow `:language_specific` nodes in my AST and support plugins dealing with the transformation?
Not so lots in the first place. Disjunction of the languages would require some additional effort, but conjunction is already a very valuable asset.
This thing cannot be generalized flawlessly to the universe is the judgement that buried a ton of great solutions six feet under.
Asd
I did the same approach in my elixir compiler called Tria. It turned out that there were very very few pure function (and by “pure” I mean those that can be evaluated at compile time). I ended up implementing approach of postponing effect when evaluating code at compile time. But that resulted in code explosion, where a single call would evaluate to 10 or 20 effects.
But I don’t know your final goal, your blog post says nothing about it, so I don’t know if you want to have an AST for all languages or only for a subset, if you want analyzers to be completely universal or somewhat universal, etc.
I would also suggest to take a look at MLIR project. It has a wide adoption, lots of translators and a bunch of algorithms about it, including reachable code analysis which is essentially a “purity” analyzer
mudasobwa
Thanks!
That’s a teasing post without spoilers, mostly designed for responses like yours, thanks for that. The answer everywhere is “somewhat.” I am not a perfectionist when it comes to the choice between ideal and working.
Lucassifoni
Pandoc for programming languages ? I like the idea, the “common core” as other posters said needs to be arbitrarily defined because concepts vary a lot across languages. But that kind of constraint is what makes those endaevours both desperate and interesting - best kind of project if you ask me. Good luck !