ubill
I have asked this question on Slack, no solutions from there, so putting it up here.
The situation is,
Let’s say I’ve typed in the iex shell alias Asdf.Qwer, but actually what I need now is simply Qwer , I have no way to clear Asdf.Qwer because alias Qwer just again gives me Asdf.Qwer . So am I forever stuck with that? Or is there a way to reset/delete aliases
In other words, Qwer is now forever referring to Asdf.Qwer because of my mistype, and there is no way to delete/say that I don’t want this anymore. Or is there?
(P.S. an unrelated question, is the source code of Elixir Forum available as open source somewhere? It’s a great interface and I admire it very much.)
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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)
bobbypriambodo
Is closing and reopening the shell (or via
respawn) not a viable solution? (basically it will clear all bound variables and aliases in the shell.)ubill
Thanks, but I don’t want to clear all variable bindings I have currently declared so far and am working on something. (Otherwise just ctrl-C twice out from the shell and coming in back again would have been done.)
Reason I’m asking is to see whether this possibility is already there, just that I don’t know the way how-to.
And Erlang’s shell did have an f() / f(variable) function that cleared the binding (for all/a variable), so I just want to find out if there’s something along the same idea in Iex.
ubill
It may be the aliases are stored in some (state-holding) variable or struct somewhere, like in Python-world, ‘sys.modules’ or such. But I don’t know.
muhifauzan
Since you use alias which is
alias Asdf.Qwer, you can refer to the originalQwerusingElixir. Call it like thisElixir.Qwer.bobbypriambodo
Hmm, funny, it seems that you can overwrite alias in some cases and can’t in other cases. I’ve played with this:
josevalim
This is a bug. Can you please file a bug report?
muhifauzan
Yeah, I can confirm this. I also just playing around with alias in IEx with the same result as yours.
bobbypriambodo
Will do!
bobbypriambodo
https://github.com/elixir-lang/elixir/issues/5587
ubill
Thanks guys. Just saw the replies as I’ve been away for the holidays.
@bobbypriambodo’s tests and attempts did make sense but ultimately discovered that it couldn’t behave as expected or intended; I tried and confirmed that too.
So logging as a bug does appear to make the most sense. Thanks again everybody!!