Nothing I do closes it (nothing I type throws an error or exits the expression) I have to exit iex.
How can I close this in future, by the way the original expression was ?~c(#{g}) where g was matched to ?a + ?z.
I wanted to check the value of g using ? but I realised it would just give me ?g. So I used interpolation to get the value of g, I am aware this was silly as I would have gotten ?"187".
It seems as though it is trying to eval “187” but for some reason it’s not raising an error.
It would be great to know how to exit this, as I have had to recompile all the modules
The magic incantation is: #iex:break<Enter>. A bit of a mouthful. You may want to bind it to some kind of system hotkey combo
In terms of recompiling modules, as soon as I’m experimenting with more than one module I just make myself a mix project and use iex -S mix. It saves you many a headache.
I tried using break``<Enter> it just takes break and then takes me to the next line. Then I tried actually typing #iex:break<Enter> , just in case, and it still did not work.
FYI: ? is not an operator, it is a syntax construct which just takes the next character and replaces this whole expression with integer literal, Therefore, ? works only with the single following character. You can’t use ? to get ord of the expression
Thanks, yes you.com (not trying to share a link or anything) told me that when I referred to ? as an operator in the search, so I had to change my reference to it in the search/question to “syntactic sugar”.
That’s great, the } works. I wonder why it did not work in my earlier attempts (in the first post). I must have dug a deeper hole when I was trying to raise an error.
Odd, I copy-pasted ?~c(#{expression}): and tried it before posting and it worked. I just tried again and it still worked! To be clear, by <Enter> I meant to press the enter key, everything else is literal. #iex:break has never not gotten me out of a hairy situation like that.
Thanks, though I must admit I joined before, I just forgot which email I used. I joined and then revisited an old language for a while before returning.
I’m really positive about what I’ve seen while writing programs and scripts in elixir. By way of features It’s turning out to have what I hoped it would have and more.
I installed it when doing an online video tutorial, however, I moved away from video tutorials as many of them did not have exercises and I wanted to learn by doing, so i started using the books. I will probably use Livebook after I’ve finished the first book.
I want to get familiar with things and use iex to check if something isn’t working within Livebook, or just as a troubleshooting aid.
I don’t like typing and spamming with a lil bit of “”“”“”“”“”“”“”“”“”“”" seems to make iex take a hint it shouldn’t continue with the current expression