Arkian Forums

Theme

Customize your theme More languages later.
Log in / Register
Arkian Forums›Reactionary Programming›Luan Extension for Pi

Luan Extension for Pi

Discussion in Reactionary Programming

mmHg edited
[@fschmidt](/profile.html?user=4) I think [Pi](https://pi.dev/) is a sufficiently capable and extensible AI harness that we have little reason to develop our own from scratch. In fact, I think Pi qualifies as reactionary software and could be added to [this list](https://www.reactionary.software/existing.html). It is remarkably simple, flexible, and bloat-free software that focuses on doing just one thing (delegating AI models to their appropriate tasks), but doing it extremely well, with powerful and straightforward support for extensions/plugins. Mario Zechner (the creator of Pi) himself seems like a reactionary programmer. He is by no means a Luddite, yet you can see his reactionary values and principles reflected in his software. What's more, it was a Conservative Mennonite that I met from MennoNet who introduced me to Pi (and Oh My Pi). This alone seems to me a good sign that the software is actually worthwhile. When I showed Pi to my parents, both of them wondered whether I was learning about this in school. The answer was a hard no. School never taught me how to work with AI (let alone cybersecurity). Schools seem to be ideologically fixated on impractical things and allergic to practical ones, whereas Mennonites tend to be practically minded. Pi is practical. Anyway, I created this thread to document my progress in developing a Luan extension for Pi. The idea is straightforward: developers install Pi, add the Luan extension, and gain the ability to work with Luan through any of the AI models supported by the harness. The extension would provide these models with the language-specific knowledge and guidance necessary to understand, write, debug, and maintain Luan code reliably. Essentially, the extension would function as an AI skill, but in a more polished, automated, and customer-ready form. The long-term goal is to save Luan by making it a first-class language for AI-assisted software development, without requiring users to build their own tooling or repeatedly teach their AI models how the language works. A Pi extension seems like a promising first step toward that goal.
fschmidt Admin edited
I will soon also have an AI "skill" for Luan. It won't be tied to any AI programming tool. When I have mine, we can compare what we have. In fact an AI should compare both and comment on the differences. I am working with Opus 5.5 through the standard Claude web interface. I am so happy working this way that I don't have much interest in a harness anymore. Using the standard web interface, Opus gets its own VM where it can install all kinds of stuff. I wouldn't want it to do this on my machine. It sends me Mercurial patches to review and commit. I really don't see any downside to this way of working.
Reactions
mmHg edited
Very interesting. We should screenshare soon. I am curious about how many credits you burn, whether you are able to manage multiple agents or use agents to micromanage other agents concurrently, etc. Pi has an [extension for virtual machine work](https://github.com/earendil-works/gondolin). It seems to require Linux though, which won't be a problem for me (especially since I have QEMU/KVM) but would be a problem for you.
mmHg edited
[@fschmidt](/profile.html?user=4) I just finished making a (bare bones) [Pi extension for Luan](https://drive.proton.me/urls/ARHX6ZYG60#qKhjVbnEYSBG ). I used Pi to make it :). I think you can just download the zip file. Of course, you don't need Pi for it to be valuable. It has an AI skill and context files to look at. I will be interested to compare Pi with the way you work with Claude. I already tried making a local notes app just by using Pi with the pi-luan extension without prior/background knowledge whatsoever, and it worked! Pi made a very nice and clean local notes app for me using the extension alone!
fschmidt Admin
I have also been letting Opus mostly write its own notes. The contents is fine but it is poorly organized. When the notes have enough content, I will work with Opus on organizing it. Opus writes the notes based on the Luan source, and discussing Luan code with me. I push Opus to ask me relevant questions. I plan to keep the Luan source as a core part of the skill. The markdown should cover most things, but if AI is unsure about anything, it should refer to the source. Because of this, I need good notes on the Luan source. I also plan to make the chat website a reference example for how to do things, and I am cleaning it up for that purpose. I won't refer to private projects since I want the skill to be public.
mmHg edited
Well I gave you a proton drive link to my extension so that you could look at my skill and context files and see what you think about the organization as well as ask AI to compare it with what you're creating. I agree with using Luan Chat as the frame of reference!
mmHg edited
Sorry for double posting again, but I want to mention that another benefit of using the Pi harness is that you can hook up multiple premium AI platform subscriptions to just one harness and then have those premium subscriptions work together on the same project. So if you're working on a team and you have ChatGPT Plus, a teammate has Claude Pro, and another teammate has an account key for Qwen, then you can add their account keys (for premium subscriptions) or API keys (for those who bought API tokens) to just one harness. The harness will then allow you to coordinate and delegate the tasks between different models from those different providers. This would be unimaginably useful for a codeathon event. I imagine it would also be useful for general production as well, since the Pi harness will administer the AI models such that their work will not overlap with one another, and since you would be stockpiling the number of worker bots. (Lightweight models make for good scouts and reviewers although I rarely use a scout since I use codegraph, normal models make for good workers, and heavyweight models make for good debuggers and oracles). Long story short, Pi has helped me create Astra-level quality software in such a way that is 90-95% cheaper for tokens than pure Astra would be.
fschmidt Admin edited
I have your extension and I looked at it. I don't know enough about skills yet to judge. But as an example comparison: - Only `require` is predefined. Import `Io.print`, `Luan.error`, `Luan.ipairs`, `Luan.range`, etc. No default globals, `_G`, `print`, `assert`, `pairs`, `string`, `table`, `os`, or `pcall`. - Finding where things come from: a chunk starts with only `require`, so every name is imported explicitly at the top of the file. Follow its URL. `luan:X.luan` is `src/luan/modules/X.luan`, and `site:/X` is the site's root directory, for example `website/src/lib/Shared.luan` for `site:/lib/Shared.luan`.
mmHg
To me, it seems each one accomplishes something that the other does not. The top one is better for preventing the AI from getting Luan confused with Lua or Luau, but the bottom one explains how to locate imported modules in the source code.

Log in to reply.