@davydog187@elixirlang This looks great!. I am using Lua with Elixir. One thing I tripped on was the lack of coroutines ( I had to yield and get user response to resume the lua logic). I implemented using a GenServer and treating Lua like a state machine. Nice to see you have coroutine in the roadmap!
Announcing https://t.co/dIPm7iCS7I ๐
The new home for Lua, the pure-Elixir Lua 5.3 VM for @elixirlang.
Scriptable, sandboxed, stupid easy.
Embed untrusted code (AI agent tools, user formulas, plugins) all on the BEAM, zero NIFs.
Plus a live playground ๐
@AravSrinivas https://t.co/RqvpJxTE9H
Elixir folks!, you get this for free using AshLua/luerl running Lua inside a sandboxed env.
Architecture validation from industry leaders like perplexity.
AI pro-tip: Stop asking LLMs to "do X" and start asking them to "write a script that does X" (sometimes).
Yes, LLMs are non-deterministic, but you can use them to produce deterministic behavior easily.
Even if you literally never review said script, that puts it "on the rails" of iterating on a deterministic solution to whatever problem you have. For example:
I needed to move a bunch of text out of a file and into their own dedicated files. I told it "move all the text snippets out of this file and into dedicated files". Its first attempt was to read the file and then output equivalent text. Except it was not equivalent text because LLMs do not have perfect recall ๐ญ
When I realized my mistake, I reverted the change and told it to write a script to extract the text snippets out of this. Unprompted, after it was done, it wrote a script to verify that the text snippets were unchanged against the latest git commit.
Same way you wouldn't ask a programmer to hand copy some data from one place to another, don't ask an LLM to do that either.
An image that shows various features of Elixir. Magazine style. It should be like a cheatsheet, not for Syntaxes, but the concepts. You can add illustrations where applicable. Very friendly tone. Magazine style. High Quality image. Very important concepts.
@josevalim So if I just upgrade to v1.20, can I use types and how does it work on the libraries in the deps.
Is there a mix tool like dialyzer to check and add types? I feel the doc needs more clarity about this type addition.
@josevalim I have worked in Java, python then Elixir. While I missed not having types in python, With Elixir I did not miss static types and it worked fine and I did not run into type issues, function arity, guards and pattern matching was more than enough to work comfortably in Elixir.
@ZachSDaniel1 High relavance to this approach from perplexity.
we get Domain access with AshLua, Elixir functions as primitives and sandboxing for free!
https://t.co/is1OlZtgS2
@ZachSDaniel1 Reactor steps can make it agentic
1. get_context: Uses https://t.co/KdQl13AHS7 to get library metadata.
2. generate_script: Calls LLM with prompt + error history
3. execute_lua: Runs script via AshLua.
4. evaluate_result: conditional step that finishes or triggers a "retry."
@josevalim I think I have to find the right rythm to work with tidewave web workspace along with my tui. I see the benefits of sharing the same repo view with the agents, like a enhanced lazygit. @RootCert pls do a video on tidewave!!
@josevalim How does this feature help?. Coding agents are already well versed in Git integration, and wondering what benefits we will have from tidewave-git.