erlang

Erlang: Is there a way to reload changed modules into an already running node with rebar?

The rebar build tool seems pretty cool, but is there a way to recompile AND reload files into a currently running node with it? ...

Is there a framework for .NET that supports Erlang's concept of "mobile code"?

In other words, "A serialization framework for closures and their set of (IL-code) dependencies". ...

Code hot swapping in Erlang

I recently saw a video about Erlang on InfoQ, In that video one of the creators presented how to replace the behavior of a message loop. He was simply sending a message containing a lambda of the new version of the message loop code, which then was invoked instead of calling the old loop again. Is that code hot swapping in Erlang reffe...

Erlang Supervisor Strategy For Restarting Connections to Downed Hosts

I'm using erlang as a bridge between services and I was wondering what advice people had for handling downed connections? I'm taking input from local files and piping them out to AMQP and it's conceivable that the AMQP broker could go down. For that case I would want to keep retrying to connect to the AMQP server but I don't want to pe...

Creating an AST node in Erlang

Hi, I am playing about with Erlang and I am trying to write a simple arithmetic parser. I want to try and parse the following expression: ((12+3)-4) I want to parse the expression into a stack of AST nodes. When parsing this expression, I would first of all create a binary expression for the (12+3) expression which would look somet...

Creating a record from a list of properties

I'd like to create a record from a list of attributes - not the actual proplist, but for example from #xmlElement attributes. I've got a list of elements which I need to process and a list of possible attributes. I could of course do something like: create_record(Rec, [{attr1, Val}|As]) -> create_record(Rec#blah{attr1 = Val}, As); crea...

How to share a session with a Erlang application

I need to create a chat in Erlang. Is there a way to share the session between PHP and Erlang applications ? ...

Can a CouchDB document update handler get an update conflict?

How likely is a revision conflict when using an update handler? Should I concern myself with conflict-handling code when writing a robust update function? As described in Document Update Handlers, CouchDB 0.10 and later allows on-demand server-side document modification. Update handlers can process non-JSON formats; but the other major...

Erlang: HTTP GET Parameters with Inets

The following post indicates how to make a simple get http request with Erlang's inets. exploring erlang's http client Sometimes, URLs have GET parameters: http://example.net/item?parameter1=12&parameter2=1431&parameter3=8765 Besides including the parameters in the URL itself, is there a way to create variables and then send ...

wx_ref and custom wx_object's

Hi! I am developing MDI application with help of wxErlang. I have a parent frame, implemented as wx_object: -module(main_frame). -export([new/0, init/1, handle_call/3, handle_event/2, terminate/2]). -behaviour(wx_object). .... And I have a child frame, implemented as wx_object too: module(child_frame). -export([new/2, init/1, hand...

How to connect Nitrogen with Couchdb using Ecouch

I don't understand how to make a connection with nitrogen and couchdb using ecouch, because I have a error on this connection CAUGHT ERROR: error-undef [{ecouch,db_info,["test_suite_db"]} I put ecouch in my erlang library path and I create a symlink to support/include.mk (even I don't know if it has necessary). Or if anyone know a dat...

Erlang: HTTP Accept Header with Inets

I am trying to do the equivalent of the following curl command : curl -H "Accept: text/plain" http://127.0.0.1:8033/stats I tried with an Inets simple http request. But, it isn't processed. How can I specify in Inets (or some other Erlang http client for that matter) the accept header requirement? ...

Node.js or Erlang

I really like these tools when it comes to the concurrency level it can handle. Erlang looks like much more stable solution but requires much more learning and a lot of diving into functional language paradigm. And it looks like Erlang makes it much better when it comes to multi cores CPUs(fix me if I'm wrong). But which should I choos...

Erlang - Eccentricity with accented characters and string literal

Hey, I am trying to implement a function to differentiate between french vowels and consonnants. It should be trivial, let's see what I wrote down : -define(vowels,"aeiouyàâéèêëôù"). is_vowel(Char) -> C = string:to_lower(Char), lists:member(C,?vowels). It's pretty simple, but it behaves incorrectly : 2> char:is_vow...

Should I consider Erlang for web mvc?

Can I do that? I'm afraid that this can be an overkill and eventually I'll end up with much less productivity than with traditional stack like Ruby/Python/you name it. I understand that you will start with much lower productivity if you start to work with new technology but .. is it potentially worth trying and finally switch to Erlang ...

How to implement dynamic queries for MNesia?

I'm trying to implement a function that generates dynamic queries for MNesia. For example, when function is called with these arguments; dyn_query(list, person, [name, age], ["jack", 21]) I want to query MNesia to list items whose name is "jack" and age is 21 in person table. I've tried to implement this by using qlc:q(ListComprehe...

How to run Erlang based robot? Is it possible to convert it into .hex and run over microcontroller?

I am working on Erlang robotic project. I have made a wallfollower robot program which has two files 1. a C program to communicate with hardware(I think we can not directly use Erlang for this) and 2. Erlang program to call these functions. I want to know where(platforms) I can run this robot. Is it possible to run this robot over mic...

Erlang Facebook Example

Does anyone know of an example facebook app (or facebook connect app) done in Erlang? I'm looking for something that includes the whole process. Specifically I don't seem to find anything on user authentication. I've checked out erlang_facebook, erlang2facebook and erlyface but none of them seem to offer a simple and comprehensive examp...

Is the computer language 'Erlang' related to the Chinese deity?

Erlang Shen or Erlang is a Chinese deity who supposedly regulates floods, Erlang a computer language ideal for large volume applications. Is this just some kind of weird coincidence? ...

Can can I call a function in the same Erlang Parameterised module?

I have a paramterised module in Erlang in which I wish to call a function A from within function B of the same parameterised module. How can I do this? ...