Sebb

Sebb

Odd behaviour of quote(do: n) - iex crashes with "do not show this result in output"

I have this weird behaviour with quoting n in iex. (1.14.3-otp25 on mac)

iex(1)> ast = quote(do: n)
{:n, [if_undefined: :apply, context: Elixir, imports: [{0, IEx.Helpers}]], Elixir}
iex(2)> Code.eval_quoted(ast)
{:"do not show this result in output", []}

# iex crashes
Interactive Elixir (1.14.3) - press Ctrl+C to exit (type h() ENTER for help)

with other vars I get the expected result.

iex(1)> ast = quote(do: nn)
{:nn, [], Elixir}
iex(2)> Code.eval_quoted(ast)
warning: variable "nn" does not exist ...

First Post!

Sebb

Sebb

ok, I think this is because of iex using this as an hotkey.
Should not crash anyway maybe.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40042 209
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement