shymega
Hi there.
I’m from primarily Clojure, and I always liked the REPL-driven deployment method that Clojurists use, with the REPL and dynamically building applications that way.
So, further to that end, I was wondering how easy that would be with Elixir/Erlang?
Any thoughts? I love Elixir and Erlang, but I do definitely miss the Clojure way of developing applications.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
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
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Other Trending Topics
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
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
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
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
Can you elaborate what that means for you? I have a REPL active virtually all the time, hot reloading my code to play with my API. Is this what you are referring to?
OvermindDL1
I’ve not used clojure, but if it is anything like lisp (since it was built like lisp) then a lisp program is not so much source code as it is a running state, and that state can change and mutate over time, and you can save out that state and reload it back in. Maybe clojure does the same? If that is what is meant then the BEAM has nothing like that. If that is not what was meant than more clarification needed. ^.^;
shymega
You’ve hit the nail on the head there. I wasn’t really quite sure how to describe what I meant, thanks!
It’s the one thing I miss from Clojure, but I suppose keeping a REPL open and reloading works well, too.
Thanks for your help, all.
peerreynders
Unlike Lisp, Clojure embraces immutability - save where mutability is necessary, like for Java interop (unless I completely misunderstood your meaning).
Now, if I’ve got my head on straight the primary impediment to “iex-driven development” is that you can’t define modules. Now keep in mind that I’m not the best person to talk about “REPL-driven development” as I’ve always found it a bit overhyped (possibly because I consider myself a lazy/slow typist). I’ve always been happy enough to kludge around with:
So with “iex-driven development” you still need two terminals open - one to edit your modules another running
iexwhere you have to manually re-compile and re-load the modified modules before you can run the updated code.Edit: I stand corrected.
michalmuskala
You can totally define modules in iex (unlike in Erlang’s shell).
NobbZ
Can you save them back? Ebin and source? Alter them easily? Meaning add a function and keep all that were already there beforehand? Delete a function?
peerreynders
I don’t recall being able to do that even in Clojure - but then again maybe I didn’t press it far enough. Basically I was just experimenting with alternate solution approaches.
This I remember doing in Clojure - essentially it felt like manipulating an in-memory representation of the code that would be run through the reader next time I executed something. In
iexI’m not sure I would know where to start … iniexI basically stick toc/2,r/1.michalmuskala
This should be definitely doable on OTP 20 with the new debug info - I mean both adding or modifying a single function.
OvermindDL1
Wrong meaning.
I mean that you can, for example, redefine a function and the new version is used from then on (old references still reference the old function, it is ‘safe’ in that way).
REPL driven development is basically you write code in the REPL, it is put in the system in real-time, any time you save you are saving a ‘dump’ of the system (no source code), and you can pick it up where it left off at any time. This was very popular in business distributing LISP since anyone could just spool up the server from the state and they could introspect the system, but no code distributed.
Easily yep, it just lacks the ability to write out the running ‘state’ of the system.
Yeah the LISP state was utter magic compared to anything else out at the time, even compared to today it is magic. ^.^
mischov
I think Elixir has quite a bit going for it REPL-wise (and I came to it from Clojure).
IEx is perfectly useful for exploration (one of the main things I used it for in Clojure), and can come close to the reloaded workflow if you’re using applications or ets to hold state. It has pretty good code reloading, though there are gotchas (like changing config)… but then there are gotchas in Clojure too.
My workflow with the REPL isn’t quite as smooth with emacs as it was in Clojure, but that’s more the result of not having spent the time to improve it than the tools being missing. I generally just
iex -S mixin a terminal and flip over to it when I want to check something. Something like Cortex would probably improve things even more.