erlang

How to stop third-party Erlang applications

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?

How do I kill a process in Erlang knowing only the module name used to start it? ...

What is the closest thing in Erlang to hashes?

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?

Are there any downsides to passing in an Erlang record as a function argument? ...

What is an Erlang hrl file?

I've looked on the web for this but it is not at all clear. Is it some sort of library mechanism? ...

In Erlang how is using registered processes different from global variables in a traditional language?

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?

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 ...

Is there an Erlang command to read BEAM files from a remote repository?

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...

What do you use if you wish to install an Erlang library?

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. ...

Allowing a gen_fsm to timeout if it receives no messages

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...

Will writing my Web appication in a functional programming language such as Haskell or Erlang make it more scalable than J2EE?

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...

Erlang shell from a browser?

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...

Can I disable printing lists of small integers as strings in Erlang shell?

The Erlang shell "guesses" whether a given list is a printable string and prints it that way for convenience. Can this "convenience" be disabled? ...

Running the report browser (rb) for SASL error reports whilst in a remote shell

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...

Which TCP port does Erlang use for connecting to a remote node?

I need to open a firewall port so that I can connect from one Erlang node to another. Is there a standard port? ...

How do I deal with very large file-uploads in an Erlang web server?

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...

Mnesia: reading remote node data in {local_content, true} mode

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...

How can I write simulations in Erlang?

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:...

There is no mature yaml library for erlang

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 ...

What is the most mature JSON library for Erlang

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? ...