Erlang is a general-purpose, garbage-collected programming language and runtime environment, with built-in support for concurrency, distribution and fault tolerance.
Erlang is a general-purpose functional programming language and runtime environment. It has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson. Erlang is open source and available for download on GitHub.
How is the receive message implemented internally in erlang runtime?
When the process is waiting for a message, the execution hang on the receive.
The receive is done via blocking IO, or asynchronous IO ?
If former, then it means the OS thread is…
I am now facing a problem. when i check the erl_crash.dump, i found some stuff as below:
=proc:<0.19275.17>
State: Scheduled
Spawned as: proc_lib:init_p/5
Spawned by: <0.18723.17>
Started: Wed May 8 13:30:40 2013
Message queue length: 1 …
I created my first Erlang project. It's a simple secret code game. I'm trying to avoid OTP at all costs because it seems REALLY confusing and my mentor thought it wasn't necessary to use it this go- around.
I have three folders:
ebin
src
test
I…
I have an assignment to complete a caesar cypher in 7 languages. I'm working on completing it Erlang currently. I've been exposed to functional languages before so I generally understand what I need to do. I'm specifically having trouble…
I have a list of tuples that has always the same form (i.e. the tuples come always in the same order):
1> L = [{a, 1}. {b,2}, {c, 3}, {d, 4}].
Knowing that the list has only a few elements, what is the best way to extract the values associated to…
I am trying to write a record which represents a bank account:
-record(account, { name :: atom(),
type :: atom(),
balance = 0 :: integer() }).
I also want to restrict the balance to always be >= 0. How do I…
I'm having trouble understanding this line.
[Pid2 ! {delete, V1a}
|| {Pid1a, V1a} <- PV1a, Pid2 <- P2, Pid1a /= Pid2
],
Here is what I understand:
anything before the double pipe "||" is done repeatedly, according what's after the double…
I'm unable to "pem_entry_decode" GPG public key in Erlang. Public key generated through OpenSSL works fine. I've fixed GPG key as suggested in Erlang - Importing GPG Public Key.
#!/usr/local/bin/escript
main(_) ->
[application:start(X) || X <-…
I am a newbie for Erlang, I understand the language adopts a design of actor model and create the concept of light-weight process, which is key point for high concurrent programming. But, it also adopts the functional programming paradigm, which…
Completely new to Erlang. I'm trying to define some functions for function composition, such as compose, juxt and pipe but running into the fact that Erlang doesn't have (to my knowledge) varargs so it's difficult to write just one version of such…
Why is there no compile time errors or warnings when I call a function in another module that doesn't exist or has the wrong arity?
The compiler has all of the exports information in a module to make this possible. Is it just not implemented yet or…
I want to do a selective receive where a record property needs to be matched, but whatever syntax I try, I get an "illegal pattern" message.
loop(State) ->
receive
{response, State#s.reference} -> do_something()
end.
Is this not possible?
for my application i have to parse CSV file using Erlang.following is the code which will parse CSV using Erlang:-
parse_file(Fn) ->
{ok, Data} = file:read_file(Fn),
parse(binary_to_list(Data)).
parse(Data) -> lists:reverse(parse(Data,…