Questions tagged [elixir-iex]

Elixir’s interactive shell.

iex is Elixir’s interactive shell, which can be used to interactively run Elixir code from the command line.

150 questions
0
votes
1 answer

Why won't iex connect a remote shell?

Background: we have a production push server in an environment and want to move it to another environment. To do this we installed the new server and then copied the content over. I'm worried that something that got copied needs to be edited but I…
Sinc
  • 553
  • 1
  • 8
  • 31
0
votes
1 answer

IEX stalling after spawning process that waits to receive messages

I'm completely new to Elixir but had to use Erlang for a piece of coursework and I am currently trying to line by line translate it to Elixir. I have it compiling successfully and everything seems good to go. I want to start a server process using…
DiDi
  • 3
  • 1
0
votes
2 answers

Creating an Elixir project generates: [error] beam/beam_load.c(148): Error loading module 'Elixir.Hex'

In the terminal elixir -v returns: "Elixir 1.14.3 (compiled with Erlang/OTP 25)" The above error msg. comes with the instruction to " please re-compile this module with an Erlang/OTP 25 compiler". I also get this error: "[error] Loading of…
Don Fox
  • 1
  • 4
0
votes
2 answers

how to access env variables in runtime elixir (localhost) windows

I am using Windows machine where i have elixir project. I have env.bat file where all the environment variables are set. While running the elixir project in local, environment variables are not getting retrieved. I have tried changing env.bat to…
indhu
  • 91
  • 7
0
votes
1 answer

Weird Output in Elixir

I am trying to print the incoming list but i am getting this weird output this is one of the functions def printlist(arr,indx,coming_list,sos,target) when indx == length(arr) do if sos == target do IO.write coming_list end end output I…
Jadu
  • 489
  • 3
  • 10
0
votes
1 answer

Is there a command to list iex history list by batch?

Is there a equivalent bash history command in iex? After testing in iex, is there a way to list all history commands no need scroll up and down? erlang history is added as follows: export ERL_AFLAGS="-kernel shell_history enabled -kernel…
Chen Yu
  • 3,955
  • 1
  • 24
  • 51
0
votes
1 answer

Can I save an iex command alias in .iex.exs file?

In iex, I'd like to break out of a block using #iex:break, but I find that annoying to type. Can it be aliased? Preferably, I'd be able to save this in my user's .iex.exs file for future use.
0
votes
0 answers

Elixir allow assign to variable two times

Elixir values are immutable but i can assign two values to same variable. How immutable variable works in Elixir? if x is 5 and it is immutable how can i assign again 7 value? Shouldn't it throw an error? Iex example
0
votes
3 answers

How to write file path in elixir-iex? I am using windows

I wrote this: File.read("C:\Users\Mostafiz\OneDrive\Desktop\New_Text_Document") But getting the following error: {:error, :enoent} I copied this file path from the properties that file. C:\Users\Mostafiz\OneDrive\Desktop Now my question is, how…
0
votes
1 answer

Parse XML to JSON Elixir

anyone knows How to convert xml into json. I tried Sweetyxml but its not converting xml into json. Using this gist https://gist.github.com/spint/40717d4e6912d8cea929 Reading json {:ok, xmldoc} =…
Sohaib Anwaar
  • 1,517
  • 1
  • 12
  • 29
0
votes
2 answers

'"erl.exe"' is not recognized as an internal or external command, operable program or batch file

'"erl.exe"' is not recognized as an internal or external command, operable program or batch file. Elixir and Erlang were running fine until today when I did a version update. I don't really have access to a good version manager for Elixir since I…
TinyBFG
  • 1
  • 2
0
votes
2 answers

elixir: order a list of numbers without built-in sort function

If I have a list that varies in length each time and I want to sort it from lowest to highest, how would I do that? If I have: [-5, -23, 5, 0, 23, 0.7, -6, 23, 67] I want: [-23, -6, -5, 0, 0.7, 5, 23, 23, 67] I tried to use a for loop to iterate the…
0
votes
1 answer

Censor Characters between the first and last character of a string in elixir

I want to replace/censor the characters of a username in elixir. So in the end, it should looks like in the bidders list in ebay: in elixir there is the String replace function, but i am a newbe at regex and i dont know what elixir-regex supports.…
franz909
  • 182
  • 2
  • 15
0
votes
1 answer

Conditionally rendering part of component in elixir

I am new to elixir and having trouble rendering this component in a DRY way. I have this CardHeader component
0
votes
1 answer

We can change immutable variable in Elixir. Can we not say rebind equals mutable?

I am new for function language. i practised some thing but i wonder one thing. Elixir says me that everything is immutable but i can change variable in elixir. Is there something that I dont know about it? My example is defmodule Practise do def…