I am in the process of writing my first erlang application and I don't understand yet some parts of the erlang ecosystem and how things should be done in it. For example if my app depends on some other apps what is the way to start and stop them at once ? Actually, I've figured out how to start, just put application:start/1 calls in the ...
How do I kill a process in Erlang knowing only the module name used to start it?
...
What I wanted was a way to pass arguments into functions which resembled a ruby hash map. Although maybe this is a bad fit for Erlang, I'm not sure yet
In Ruby I often used hashes like:
{"a"=>100, "b"=>200}
: What is the closest thing in Erlang?
Update:
I have since found this:
http://20bits.com/articles/erlang-an-introduction-to-r...
Are there any downsides to passing in an Erlang record as a function argument?
...
I've looked on the web for this but it is not at all clear. Is it some sort of library mechanism?
...
To me they seem to be the same thing, its just that registered processes are disguised by the terminology "actors".
Update:
I have since seen the error in my way of thinking. I guess as I am new to Erlang I was using actors in places where they did not belong at all (is there an anti-pattern name for this somewhere)
...
In Erlang is there any way that a message sender can wait on a response, so it only continues execution once the message has been processed?
And I mean something like this:
Actor ! DoSomething
Continue to this next line of code when DoSomething has been processed
I know a callback can be made by sending the Pid of the sender, but is ...
I need to distribute some Erlang code which is closed source to a client. I think the easiest way would be to simply give an Erlang shell command to pull the code from a remote host. The remote host will be an Erlang VM which does not shared the same secret cookie as the client. How can I do this?
For example, if I am in the Erlang shel...
Do you use CEAN, copy the source and compile them, copy the BEAM files, or something else. I need to distribute some Erlang code and I'm not sure which to choose.
...
Normally if I'd like to have an Erlang process timeout I would use the following construct:
receive
Msg -> ok; %% handle message
after 60000 ->
%% Handle timeout and exit
end.
Is there a similar mechanism in the OTP servers such as gen_fsm? I will be spawning gen_fsm's for each active session with my application, and would li...
Hi
I am writing a Facebook application that would use a Postgres DB along with Facebook APIs and run on Amazon EC2. (and I am hoping for heavy loads )
With Java, I know that DB would be my primary bottleneck and concurrency limitations of Tomcat would be the secondary bottleneck. I could alleviate DB issues with caching and concurren...
I have an erlang app with a web frontend. Right now, if you want to talk to it via the shell, you have to do it from the command line. This app will be running on multiple platforms and in environments where the administrator may not be very command-line savvy, but for tech support purposes I'd like to be able to have them bring up a she...
The Erlang shell "guesses" whether a given list is a printable string and prints it that way for convenience. Can this "convenience" be disabled?
...
Folks we are now delploying a lot of Erlang instances and we are seeing bugs been thrown and would like to examine them...
Normally we connect to the running instance with a remote shell and get access to an Erlang console that way, but this doesn't work for rb or error messages...
How do I get remote access to my SASL error messages w...
I need to open a firewall port so that I can connect from one Erlang node to another. Is there a standard port?
...
So, lets say I'm writing a web server and I want to support "very large" file uploads. Lets further assume that I mean to do this via the standard multipart/form-data MIME type. I should say that I'm using erlang and that I plan to collect http packets as they are returned from erlang:decode_packet/2, but I do not want to actually coll...
Is there a way to do local writes and and global reads ( without replication ) using mnesia. Eg: node A writes to its local DB and node B reads from node A's DB.
Node B does not have any data of its own, apart from the schema information stored locally.
According to the documentation, {local_content, true} seems like what I need to us...
Hi guys,
I want to do some numerical stuff in Erlang like this:
You've got an array with the following values:
[2,3,4]
In each iteration, you calculate
0.1 * [n-1] + 0.7 *[n] + 0.2 * [n+1]
This becomes the new [n].
If n == 0 then [n-1] = 0. If [n] == length of array then [n] = 0.
So I try an example:
[2,3,4]
calculations:...
Is there a mature and stable YAML library for Erlang that someone has actually used? I can't seem to find one anywhere
Update:
I have searched and searched and still not found one
...
I wanted to use YAML but there is not a single mature YAML library for Erlang. I know there are a few JSON libraries, but was wondering which is the most mature?
...