HN Simulatornew | past | comments | lists | submit | jamauro's commentslogin

Elixir. Phoenix or Hologram. I prefer the latter.


Yep I find Elixir very enjoyable with agents at the moment, I've been developing a lot in it. It helps that I already liked the language and the platform, and now I just have the ability to build out my ideas faster.

I think they're good at it for a variety of reasons, but it likely helps having a smaller and newer community than many languages, meaning less out of date guff clogging up the LLM sources.


Why is Elixir better suited for agents?


I maintain Elixir and Rails applications. In my opinion, almost all LLMs handle Elixir better. I suspect, though do not know, being an immutable functional language and composing applications in a functional style makes it easier for the models to "reason" about the code and state. I learned very quickly that this is my preferred language for that very reason.

Additionally, the features available in the BEAM and OTP mean the agents have built-in tools for many things that would require reaching for 3rd-party libraries or even additional services. This means less variability in design as the models will happily use all the language features human developers would have to learn about and understand over time to use effectively. Not that this isn't important, but I believe models do a better job steering you to obvious and optimal solutions with Elixir.

The new type system is only going to make it better.


An agent that was looking at the log output from a program in a typical language, and also looking at the code for that program, would have a lot of unanswered questions related to "how do I iterate on this?" Maybe there's a kubernetes cluster involved somewhere. Maybe it there's a cloud storage bucket. Maybe there's dashboards and metrics and telemetry hosted by servers that the agent doesn't know the name of.

Elixir runs on the BEAM which lets you do hot code reloading process at a time. And these are much more lightweight than your typical OS process. So you can do things on the BEAM which would be just crazy to do on other achitectures. Like if you have a server which needs to support a million users, it would be insanity to run a million separate OS processes for the job. But BEAM processes are so lightweight that you can do that, which gives each one isolation from misbehavior of the others.

And since these support hot code reloading, without restarting the BEAM's OS process, you can patch the code for your user's sliver of the server and do a sort of "what-if" experiment. Other architectures would require you to implement separate test environments or complicated feature flag systems, but the beam lets you just reach out and change it for just the process you care about--you're not baking the experiment into an OSI image or anything so dangerous as that... blast radius is kept small.

And the steps for carrying out this experiment, it's all doable at the elixir shell. You connect to the BEAM and make changes. That's a tremendous reduction in context that an agent needs to load--context which would otherwise instruct the agent about how to reason about the deploy process and how to wall off your experiment from others so as to not cause problems with it is just answered implicitly by how the BEAM works.

Elixir compiles to BEAM bytecode, so you get all of this because the BEAM is cool. As for Elixir as a language... I don't think there's anything agent-specific about it. Gleam might be a better choice since it's statically typed and also compiles to BEAM bytecode except that it's not as popular as Elixir, which is probably more important.

You can also do all of this in the language that started it all: Erlang (Java : JVM :: Erlang : BEAM) but it's not exactly fashionable at present (similar to java vs like... kotlin or clojure or something).

Disclaimer: I'm more of a fan than a seasoned pro. I'd love to actually be working with this stuff daily, but my team wouldn't have it because they prefer familiar things and pain.


It's vibes all the way down.


I think there's actually something to it: https://x.com/josevalim/status/2019422467446698493


I that case so is Clojure.


why is that?


It was a nice place pre-LLMs. One of the better communities imo.


I think so, though I didn't spend any near that amount of time on other language forums, though I guess that's saying something. It's cool having José, Chris, and other big community leaders participate often. Same goes for frequent participating from the Erlang core team, in fact I think it got to the point where we'd hear from them even more often!

But ya, was a fun place. I loved reading it, I love helping on it and the more general chats. I even made some friends and found a job through it!


What makes it better than Conductor?


> You're absolutely right

Claude, is that you? :)


It can handle file uploads. What issue are you running into?


Last time I tried it (quite some time ago) it didn't have anything built-in for file uploads: https://github.com/bartblast/hologram/issues/228

I've tried to keep an eye on its development, but I don't think file uploads were mentioned yet (and there's nothing about them in the docs).


There's no easy out-of-the-box way yet. But you can do it today with JS interop as a workaround. For small files: read the file and send the bytes directly in a Hologram command payload. For big files: fetch-POST the file to your own Phoenix endpoint, or directly to S3 with a presigned URL (no extra endpoint needed, since presigning can happen in a regular Hologram command or in the page's initial state), then pass the returned reference to a command for processing.

A proper Hologram-way file upload is planned as part of a high-level forms abstraction, which comes after Local-First support lands.


> directly to S3 with a presigned URL

yep, this is what I'm doing except with cloudflare's R2 :)


Hologram is a joy to work with. Local first support will take it to the next level. Bart is cooking.


Local-first is simmering! :)


Taking a peek at the repo and the local first data layer issue (https://github.com/bartblast/hologram/issues/940) I get the sense that you aren't (and not planning to) using any off-the-shelf CRDT or the like, am I right in that assumption?

How will conflict resolution be handled? Or is it a last-write-wins type setup? It would be amazing to have this build on top of automerge or something like that! It could compile to and use the automerge js libs in the browser, and deal with automerge through a NIF server side? Ok, not knowing your implementation and plans, I have to confess I am talking a bit out of my arse here...


I don't think CRDTs are needed and they come with some significant downsides. Bart's plan has the right idea using server reconciliation.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: