Earlier quoted context omitted.
It kind of is though, regardless of what the LLM did there, the 'happy path' with something like Phoenix is using the phx.new and the generators which gives you a ton of files and structure that is a bit overwhelming for people used to more 'minimalist' web frameworks. Check this out this guide from the Phoenix docs: https://hexdocs.pm/phoenix/json_and_apis.html That's a ton of stuff just to return some JSON from an…
Isn't Phoenix more like Django (rather than Flask) which would also generate multiple files?
Lua for Elixir
31–40 of 86 posts
Re: Lua for Elixir
#32We used Luerl, the underlying Lua engine, in production for years as a sandboxed scripting environment for FarmBot devices back in the day. Users could execute scripts directly on the device to control peripherals. It was a solid library and the community support was great. From an ergonomics perspective, developers preferred this approach over API calls. I am surprised more projects don’t provide a Lua scripting lay…
Completely agree. I've been adding Lua scripting support to pretty much everything I make now. Most recently my programmable SSE server [1]. It's extended the functionality far beyond anything that I would have had the time and patience to do myself. Lua is such a treat.
Re: Lua for Elixir
#33Earlier quoted context omitted.
You gotta be trolling... You're literally responding to someone pointing out you don't need multiple files in elixir. And the same is true for Java and kotlin. Heck even the official spring boots demo videos define everything in a single file nowadays. Multiple files is just a convention, because otherwise your project will become unhandy eventually. That applies to Go as well.
I am talking about the typical / usual case. In fact, you typically use "mix phx.new" for projects using Phoenix in Elixir, and it creates lots of files, as opposed to "import ..." in a single Go file. I never said that it is impossible to do in Elixir (or Java), but it is not the typical case.
Re: Lua for Elixir
#34Earlier quoted context omitted.
I am talking about the typical / usual case. In fact, you typically use "mix phx.new" for projects using Phoenix in Elixir, and it creates lots of files, as opposed to "import ..." in a single Go file. I never said that it is impossible to do in Elixir (or Java), but it is not the typical case.
That's the typical use case if you want a web server. If you're writing for low-level devices, you'd use `mix nerves.new project_name`. If you're writing an Elixir app that won't be a web server, you'd use `mix new project_name`. If you're writing an elixir script, you'd use `touch script_name.exs`
Re: Lua for Elixir
#35Re: Lua for Elixir
#36Cool project, congrats. I am trying to understand why would anyone prefer to use Lua to create script instead of Elixir, which supports running scripts. While Lua has lots of users the language just have too many wrong design choices. If I had the choice between Elixir and Lua for scripts I would use Elixir every time.
Re: Lua for Elixir
#37Earlier quoted context omitted.
You gotta be trolling... You're literally responding to someone pointing out you don't need multiple files in elixir. And the same is true for Java and kotlin. Heck even the official spring boots demo videos define everything in a single file nowadays. Multiple files is just a convention, because otherwise your project will become unhandy eventually. That applies to Go as well.
I am talking about the typical / usual case. In fact, you typically use "mix phx.new" for projects using Phoenix in Elixir, and it creates lots of files, as opposed to "import ..." in a single Go file. I never said that it is impossible to do in Elixir (or Java), but it is not the typical case.
Re: Lua for Elixir
#38Re: Lua for Elixir
#39Cool project, congrats. I am trying to understand why would anyone prefer to use Lua to create script instead of Elixir, which supports running scripts. While Lua has lots of users the language just have too many wrong design choices. If I had the choice between Elixir and Lua for scripts I would use Elixir every time.
Also, as the sibling post mentioned, in this case Lua is completely interpreted in an Erlang process. That allows a good amount of sandboxing, they have isolated heaps already and you can control memory limits and other resource usages, and all that in a relatively tiny footprint of a few KBs.