Questions tagged [erl]

The erl program is Erlang Emulator, starting an Erlang runtime system.

The executable script erl is a front-end to the Erlang runtime system. Windows users probably wants to use the werl program instead, which runs in its own window with scrollbars and supports command-line editing.

160 questions
2
votes
1 answer

How does Erlang's Eshell keep the input line unaffected by async output?

I would like to implement a REPL in another language than Erlang, and am really intrigued by this feature of the interactive erl (Eshell) prompt: 1> spawn(fun() -> timer:sleep(5000), io:format("~p~n", ["later"]) end). <0.34.0> 2> i can ty So what I…
Felix Rabe
  • 4,206
  • 4
  • 25
  • 34
2
votes
2 answers

Configure Couchbase 2.2 to use short hostname

I need to configure Couchbase 2.2 to use short hostname. Currently I am using Couchbase 2.0.1 and in this case the solution was easy: Set Short hostname in /opt/couchbase/var/lib/couchbase/ip and /opt/couchbase/var/lib/couchbase/ip_start files.…
Diego D
  • 1,735
  • 3
  • 22
  • 38
2
votes
2 answers

Is there a way to print configuration parameters?

I have configured two parameters. inet_dist_listen_min = X inet_dist_listen_max = Y in the config file and I copied it the config file in the place it should be. Is there a way to know that either RabbitMQ or ERL receive the right…
Bick
  • 17,833
  • 52
  • 146
  • 251
2
votes
1 answer

How to delete DETS file?

I'm having problem with DETS file, I cannot find functionality how to complete delete DETS file from my drive. Let's demonstrate scenario, you create DETS file insert one element and then you want to destroy that file as temporary but persistent…
Martin Bodocky
  • 651
  • 1
  • 5
  • 16
2
votes
2 answers

Erlang command line

I need to pass two arguments to my Erlang code. it is working fine in the Erlang shell. 2> crop:fall_velocity(x,23). 21.23205124334434 but how should i run the Erlang code without the Erlang shell. like normal python,c programs. ./program_name …
Tharanga Abeyseela
  • 3,255
  • 4
  • 33
  • 45
2
votes
2 answers

Yaws process died: {{badmatch,<<>>}

I'm going over a very basic erlang book while using yaws. I'm editing a single yaws file and refreshing the browser. Often (3rd time now) the process will just start to show this error. and i look and look for a syntax error or anything, and…
gcb
  • 13,901
  • 7
  • 67
  • 92
2
votes
1 answer

erl does not autocomplete code loaded using -pa

This is my first couple of hours of Erlang experimentation. So be gentle, please. I checked out a project (https://github.com/wooga/eredis) Installed rebar Compiled the modules (beam files went into ebin) Fired up erl -pa ./ebin Typed eredi - and…
bryan hunt
  • 644
  • 4
  • 20
2
votes
1 answer

In Erlang, how to return a string when you use recursion?

I really could'n formulate the question better, but here's my problem: I want to use this code to convert infix expression to postfix expression in Erlang, but it only writes to the console output. The problem is, I need a list or a string returned,…
A B
  • 23
  • 2
2
votes
2 answers

Erlang: invoking erl -eval from command line never exits

I have a simple Erlang command that I want to invoke via erl -eval (to compile erlydtl template, as described on erlydtl page). When I do it interactively from shell everything works fine and the command exits immediately: erl -pa ebin…
Piotr Sobczyk
  • 6,443
  • 7
  • 47
  • 70
1
vote
2 answers

Passing command to erl?

We are running an erlang program (ejabberd). Sometimes, we need to do health checks by connecting an erl shell to this running erlang program. I am trying to script all this, and rather than typing erl -sname r -remsh .... and then, my command in…
Julien Genestoux
  • 31,046
  • 20
  • 66
  • 93
1
vote
0 answers

How come Erlang version is not being updated on Ubuntu?

I am currrently having trouble upgrading my current version on Erlang running on Ubuntu 18.04.2 LTS Bionic These are the steps i used to upgrade Erlang on my machine: added the repository deb http://packages.erlang-solutions.com/ubuntu bionic…
lollerskates
  • 964
  • 1
  • 11
  • 28
1
vote
1 answer

how to extract data from ejabberd?

I have a complex object. I need to parse some information. Since I am new to the ejabberd, I could not find the proper solution. {message,<<"92176817070539609217681707064664">>,chat, <<>>, …
kumaran
  • 366
  • 1
  • 8
1
vote
2 answers

erl VM - how to load my module on startup ( c(modulename) )

I can run erl from my application and it must be turned on, I really don't want to make win32API Hook + sentMessage to run c(mymodulename), that's why I'm interesting if there some auto-load for modules or I can add it to erl properties ? thank you.
cnd
  • 32,616
  • 62
  • 183
  • 313
1
vote
1 answer

How to get most frequent element in Erlang?

I need to write a function, that would throw me most frequent term in list. Eg: uniq([a, [a,b], [a,b,c]]) -> a How can it be done recursive way using Erlang?
qubal
  • 11
  • 2
1
vote
0 answers

Eventual RabbitMQ crash

I would like to understand the logs of a RabbitMQ error. Can anyone help me decipher the following error message: The interesting thing is that in my case, I have a server running with RabbitMQ 3.8.8 running and erlang 23 behind it, but suddenly…
davimargelo
  • 124
  • 6