erlang

Erlang OTP release compiles with HiPE?

After reading this question http://stackoverflow.com/questions/2206313/is-erlang-the-c-of-the-clustered-computing-world , I am wondering the official Erlang OTP compiles with HiPE? In other words, when I compile my .erl source with the OTP release R13 (as example), does it produce "object code" BEAM? Looking at http://www.it.uu.se/rese...

Configuring Erlang to work with SSL

Erlang version: R13B01 Currently I'm struggling trying to make Erlang work with SSL. The programming part was easy, but now starting the system SSL-enabled is not. Following the Erlang SSL documentation: 1 - Made the start_ssl.rel file {release, {"OTP APN 181 01","R13B01"}, {erts, "5.7.2"}, [{kernel,"2.13.2"}, {stdlib,"1.16.2"}, ...

Erlang compilation: mixed of "HiPE object code" and "opcode"?

Is it possible to have a VM instance that executes both HiPE code and the usual "opcode" based objects at the same time? This question is related to : http://stackoverflow.com/questions/2207360/erlang-otp-release-compiles-with-hipe ...

What are the constraints/limitations of compiling with "+native" ?

What are the limitations/constraints when compiling Erlang .erl source with the +native option compared with the usual "non native" compilation? Related to: http://stackoverflow.com/questions/2207360/erlang-otp-release-compiles-with-hipe ...

Is F# really faster than Erlang at spawning and killing processes?

Updated: This question contains an error which makes the benchmark meaningless. I will attempt a better benchmark comparing F# and Erlang's basic concurrency functionality and inquire about the results in another question. I am trying do understand the performance characteristics of Erlang and F#. I find Erlang's concurrency model ve...

How to visualize an Erlang gen_fsm

Do you know of any existing tool to graphically render the diagram of an Erlang gen_fsm starting from the source code? ...

How to set up a Yaws yapp?

Hi, I am struggling with setting up a yapp for Yaws. Can anyone provide a link to documentation or copy paste a short example here? Sorry that this is a rather unspecific question, but I am more or less lost :-) Thanks, Jan ...

How does TDD compare with Functional Programming Languages?

How does TDD compare with Functional Programming Languages like F# and Erlang? I haven't actually worked directly with a functional programming language yet, but from what I've seen of it, you have two sides of an equation and they have to balance like in algebra or accounting; this seems somewhat reminiscent of TDD where you define you...

How to control number of running worker processes ?

What is a design pattern in erlang in terms of gen_server to create a fixed number of worker processes and feed them with 'jobs' to perform some actions ? Each worker process talks with an external service which has connection limits. Number of 'jobs' considered to be unlimited. In C I'd do that by creating a pool of worker threads and a...

A simple explanation of Rings in Riak?

I'm trying to understand what the "rings" in Riak are, but I can't seem to find a clear explanation (please don't just link me to a web site, I have already read what is on the web). As far as I understand a node in Riak is a partition in a ring. Is that correct? ...

Erlang atoms and tuples in Thrift

Which is the corresponding Thrift type for: an Erlang tuple (I can imagine it's a struct) an Erlang atom (if any?) Is there any documentation available with the direct mappings between the Erlang types and the Thrift IDL types? ...

Is there an Erlang os:cmd equivalent that takes a list of strings instead of a single command?

Is there a Erlang call where I can do Retval = subprocess:call(["cmd", "arg1", "arg2", "arg3"])? If I'm building a complex command to execute, with os:cmd/1 it is easy to make escaping mistakes. Compare to Python's subprocess.call() method where I pass in a list of strings and know that it is passed verbatim to the subprocess, nothing m...

Make doesn't work for Erlang 5.7.4 on Solaris?

Has anyone managed to build Erlang on OpenSolaris? Every time I try I get: user@opensolaris:~/otp_src_R13B03# make clean make: Fatal error in reader: Makefile, line 94: Badly formed macro assignment ...

blocking channels vs async message passing

I've noticed two methods to "message passing". One I've seen Erlang use and the other is from Stackless Python. From what I understand here's the difference Erlang Style - Messages are sent and queued into the mailbox of the receiving process. From there they are removed in a FIFO basis. Once the first process sends the message it is fr...

Unable to use function call in function guard

I'm new to Erlang and am trying to program a bounded-buffer problem program. It is almost working, except for making sure the producers don't get too far ahead and overwrite unconsumed data. To handle this, I decided to try putting guards on my buffer() function so that I could have a version w/o receive used when the buffer is full, a...

Is it possible to get the stacktrace of an error in the error_logger handler?

Hi, im currently writing an error_logger handler and would like to get the stacktrace where the error happend (more precisely: at the place, where error_logger:error* was called). But I cannot use the erlang:get_stacktrace() method, since i'm in a different process. Does anyone know a way to get a stacktrace here? Thanks ...

erlang call stack

i need to debug some module in foreign system, module has public function foo() - how can I know place (module and function name) from which foo() given module was called? I mean stack of calls. PS: I cannot stop system, all work I can do by reload this module (but with som debug info) -module(given). -export(foo/0). foo() -> %% he...

How to automatically launch needed services and apps ?

I am writing my first erlang application and I want to do things the way they should be done in the erlang ecosystem. My app depends on ssl, inets services and log4erl application to be already started and as for now I start them manually in the erlang shell. After that I start my app's supervisor that starts other parts. The question is...

Example of use of unregistered, dynamically created gen_server's?

Tutorials are abound for working with gen_servers that are named in an OTP application. However, I've been unable to find a good example of dynamically spawning servers that are not registered (not named). Can someone point to a good, simple example? Not ejabberd, for example, where there is a lot to confuse the core idea I'm trying to g...

How portable are Erlang beam files?

I have a temporary situation where beam files compiled on one node are executed on another node. Are the beam files portable? How close do the versions of the Erlang distributions need to be? ...