Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
77 views

I need to create simple application that consumes message queue and asynchronously handles messages using Erlang/OTP. Consider this pseudo-example in Golang: var queue chan func main() { for req :...
Володимир Кельбель's user avatar
-1 votes
2 answers
120 views

I have a particular log statement in my Elixir code which is supposed to be called very frequently, but I dont want to print that log statement every time. May be I want to print that once in every 5 ...
nitinjain110588's user avatar
3 votes
2 answers
643 views

i am new into elixir and phoenix. I have found in erlang, to check disk space using --diskup. And i have found another function/statement inside elixir to check total memory usage: > :erlang....
Jais Anasrulloh Ja'fari's user avatar
1 vote
1 answer
711 views

How can I convert erlang:system_time(), integer, to os:timestamp() {MegaSecs, Secs, MicroSecs} ?
BuzBuza's user avatar
  • 607
4 votes
1 answer
627 views

A module calls a gen_server to handle a stream, which uses record as State. handle_call handles stream using a function from State, which separates completed piece of data and tail, Now next time, ...
asim's user avatar
  • 629
5 votes
1 answer
227 views

There is a simple implementation of the factorial function in an 'escript' in the Erlang docs. The factorial function is given as: fac(0) -> 1; fac(N) -> N * fac(N-1). That's all fine, I can ...
Robert's user avatar
  • 1,686
1 vote
1 answer
324 views

This Driver lets you call a mysql database within an Erlang program. They provide an example for "Multiple Query and Multiple Result sets" {ok, [{[<<"foo">>], [[42]]}, {[<<"bar"&...
Sam's user avatar
  • 2,345
0 votes
1 answer
586 views

I'm trying to talk in a chatroom using erlang. Everything is almost good in it I think but none of the messages send to other users print to the console. I sent up some tests to see if anything would ...
Sam's user avatar
  • 2,345
1 vote
1 answer
343 views

I have a problem with communication with the workers created in my dynamicSupervisor. after start all my workers i try make a call to one by pid and is generated one error (always). At the beginning ...
Nuno_Coletiv's user avatar
0 votes
1 answer
2k views

Is there a relatively simple, documented way in a Phoenix application to read how many active sockets and channels are currently open at any given time? And more specifically, is it possible to filter ...
Murcielago's user avatar
  • 1,202
0 votes
4 answers
191 views

The fact that an actor processes one message at a time and encapsulates state, which it does not share, is sufficient to provide synchronization semantics. So mutual exclusion (write-lock) is taken ...
rahul's user avatar
  • 1,473
0 votes
2 answers
325 views

That's my suspicion as this simple code -module(simple_server). -export( [sayHello/0] ). -callback say(Num :: term()) -> term(). sayHello() -> io:fwrite( "Hello 1: ~p\n", [ say(1) ]) , ...
cibercitizen1's user avatar
1 vote
2 answers
456 views

I have a list of batches(sublists) of ids and I want to iterate over this list and spawn a worker process for each id in the batch of ids. Each of these workers will query some service, get the result ...
MainstreamDeveloper00's user avatar
0 votes
1 answer
572 views

I had Erlang/OTP 17 and RabbitMQ Server 3.4.3 installed on my local windows box. Before upgrading to the newer versions in production, I wanted to give it a try on my local box to see if upgrade won't ...
Sri Reddy's user avatar
  • 7,054
-1 votes
1 answer
350 views

I am attempting to save a binary with characters of any type for example: $ LC_CTYPE=en_US.UTF-8 erl Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [...
user1000622's user avatar
0 votes
2 answers
127 views

I've been learning Elixir for awhile now but I came across something today that totally confused me. I made this filtering function: thingy = for a <- ["may", "lay", "45", "67", "bay", "34"], do: ...
Peter's user avatar
  • 43
1 vote
1 answer
463 views

I'm using the elixir-socket library as a way to connect to my backend application to an external websocket. I need this process to be managed (restart if something fails, backoff exponentially if it ...
Andre Ogle's user avatar
0 votes
2 answers
980 views

In the DynamicSupervisor module we have a function called start_child which registers a child and starts it. My question is: how later on i can find that particular child by name, because for example ...
Tano's user avatar
  • 1,377
2 votes
1 answer
461 views

I am using the following Process.send_after in order to schedule some event, my question is for given pid can i get all the scheduled events?
Tano's user avatar
  • 1,377
1 vote
1 answer
229 views

I have Core Erlang forms constructs with the cerl module. I wish to "decompile" it into an Erlang source code string. I though I could do something like this: Forms = erl_syntax:form_list(CoreForms),...
lpil's user avatar
  • 1,867
1 vote
1 answer
259 views

In Elixir's repl iex when I enter Process.whereis(:user) it returns a pid. What is this :user process? What does it do? What is it's state? It seems to be permanently blocked or sleeping as I have ...
Jason G's user avatar
  • 995
0 votes
2 answers
369 views

I am new to Elixir and was reading through a book and doing some examples. Here is the piece of code that makes me ask question here: defmodule Sequence.Server do use GenServer def init(...
Tano's user avatar
  • 1,377
0 votes
0 answers
90 views

I'm exploring Elixir language, also deep into Erlang environment recently. I want to know how to use hot upgrade in this situation: Usually we deploy a application begin with a root supervisor. ...
LoranceChen's user avatar
  • 2,574
5 votes
2 answers
242 views

OTP supervisor restart strategy names seems weird to me, maybe because I'm not a native English speaker. one_for_one: when one child dies, it restarts that child one_for_all: when one child dies, it ...
Todoroki's user avatar
  • 454
0 votes
1 answer
52 views

I am trying to call one API 10 times asynchronously though cast method of Genserver. Can someone guide me how I can collect the responses of 10 API and consolidate in one list of tuples? defmodule ...
Jagdish Narayandasani's user avatar

1
3 4
5
6 7
17