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.
What's best way to do the following? Binary -> list -> binary seems unnecessary.
binary_and(A, B) ->
A2 = binary_to_list(A),
B2 = binary_to_list(B),
list_to_binary([U band V || {U, V} <- lists:zip(A2, B2)]).
What strategy does Mnesia use to define which nodes will store replicas of particular table?
Can I force Mnesia to use specific number of replicas for each table? Can this number be changed dynamically?
Are there any sources (besides the source…
To be more precise:
I have a supervisor for dynamic number of children. I want it to use different init function when given child is added and started for the fist time than for all the restarts than will happen later. Optionally, I could use the…
I need an answer to the following question to help understand what approach I should be taking to interface with Erlang. AFAIK Erlang on a SMP UNIX box uses the multi-process approach. In this case it should do same machine IPC.
Does Erlang use…
I need to write a server that will receive instructions from other modules and take actions depending on the instructions received. Efficiency is my main concern. So do I use gen_server or do I write my own server. By "my own server" I mean…
I have a list of elements in Erlang, and I'm using lists:foreach to traverse through the elements in the list. Is there a way to break out of this "foreach loop" in the middle of the traversal. For eg: suppose I want to stop traversing the list…
My language of choice is Ruby, but I know because of twitter that Ruby can't handle a lot of requests. It is a good idea using it for socket development? or Should I use a functional language like erlang or haskell or scala like twitter developers…
Using the code below to send. The gen_tcp:send call returns {error,einval} but I can't figure out why...
-define(TCP_OPTIONS,[binary, {active, false}, {reuseaddr, true}]).
client() ->
case gen_tcp:connect(to_Server(), 8080, ?TCP_OPTIONS) of
…
I'm able to write prefix boolean expressions like erlang:'and'(true, false), but not the corresponding andalso or orelse expressions. Why?
When I look at the core output, it looks like andalso and orelse are just macros - for example:
a(A,B) -> A…
Warning: erlang n00b ahead.
I'm trying to get a grasp of erlang, and just trying a basic hello world application with cowboy. I'm simulating an error, basically returning an invalid value somewhere in my code, and trying to interpret the error,…
I'm looking for a way to pass events back and forth between Clojure and erlang.
has someone done this before?
how should I encode the (immutable) messages in a flaxable general way?
Should IPC be used for this? what sort?
where has this gone wrong…
I'm developing a series of related applications that will eventually be integrated into a single release. Several of the applications share identical record structures.
Should I:
a) Duplicate the *.hrl files that define the record structure in the…
UPDATED error message
I am getting a BOOT FAILED error every time I try to start the rabbitmq server. Does anybody know how I can fix this? I have attached the error message. I have tried a few different things including uninstalling and…
This is an interesting situation, focused on the behavior of erlang ssh modules. I had spent a few hours troubleshooting a problem that turned out to reveal that the Erlang ssh_connection *exec/4* function operates asynchronously.
If you issue the…
Previously I was using xml:get_tag_attr_s("type", Packet) for that debug line in ejabberd 2.1.10, but that is not working anymore in ejabberd 13.03. Probably because it is deprecated according to the docs…