erlang

Setting up an Erlang development environment

I'm interested in looking at Erlang and want to follow the path of least resistance in getting up and running. At present, I'm planning on installing Erlang R12B-3 and Erlide (Eclipse plugin). This is largely a Google-result-based decision. Initially this will be on a Windows XP system, though I am likely to reproduce the environment on...

How Do You Determine The PID of the Parent of a Process

I have a process in erlang that is supposed to do something immediately after spawn, then send the result back to the parent when it is finished. How do I figure out the PID of the process that spawned it?...

Erlang-style Concurrency for Other Languages

What libraries exist for other programming languages to provide an Erlang-style concurrency model (processes, mailboxes, pattern-matching receive, etc.)? Note: I am specifically interested in things that are intended to be similar to Erlang, not just any threading or queueing library. ...

What's a good way to write a Cocoa front-end to an Erlang application?

I'm exploring the possibility of writing an application in Erlang, but it would need to have a portion written in Cocoa (presumably Objective-C). I'd like the front-end and back-end to be able to communicate easily. How can this best be done? I can think of using C ports and connected processes, but I think I'd like a reverse situation ...

How would you implement Erlang-like send and receive in C++?

Actually, this question seems to have two parts: How to implement pattern matching? How to implement send and receive (i.e. the Actor model)? For the pattern matching part, I've been looking into various projects like App and Prop. These look pretty nice, but couldn't get them to work on a recent version (4.x) of g++. The Felix lan...

Merging records for Mnesia

Hi.. I am trying to refactor some code I have for software that collects current status of agents in a call queue. Currently, for each of the 6 or so events that I listen to, I check in a mnesia table if an agent exists and change some values in the row depending on the event or add it as new if the agent doesn't exist. Currently I have...

Erlang Multicast

How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I was wondering on how to add memberships. Not only adding memberships at start-up, but adding memberships while running would be useful too. ...

Concurrent Prime Generator

I'm going through the problems on projecteuler.net to learn how to program in Erlang, and I am having the hardest time creating a prime generator that can create all of the primes below 2 million, in less than a minute. Using the sequential style, I have already written three types of generators, including the Sieve of Eratosthenes, and ...

What libraries can I use to build a GUI with Erlang?

Which libraries can I use to build a GUI for a Erlang application? Please one option per answer. ...

Can anyone recommend a primer to Erlang?

I've recently found myself getting more and more interested in Erlang. I've purchased a book (Programming in Erlang) and started reading up on the basics. Reading books is time consuming so I am looking to shortcut this a bit and go back to the book later. What I lack is a good introductory tutorial. Kind of like, hands on, this is wha...

URL encode in Erlang

I'm using erlang http:request to post some data to a remote service. I have the post working but the data in the body() of the post comes through as is, without any url encoding which causes the post to fail when parsed by the remote service. Is there a function in Erlang that is similar to CGI.escape in Ruby for this purpose? ...

Directory Layout for Erlang Services?

In our Java applications we typically use the maven conventions (docs, src/java, test, etc.). For Perl we follow similar conventions only using a top level 'lib' which is easy to add to Perl's @INC. I'm about to embark on creating a service written in Erlang, what's a good source layout for Erlang applications? ...

Mnesia table replication/sharing

Assume that we have N erlang nodes, running same application. I want to share an mnesia table T1 with all N nodes, which I see no problem. However, I want to share another mnesia table T2 with pairs of nodes. I mean the contents of T2 will be identical and replicated to/with only sharing pair. In another words, I want N/2 different conte...

CouchDB Backups and Cloneing the Database

We're looking at CouchdDB for a CMS-ish application. I know the database is implemented as a set of files in the file system, what I'm looking for are common patterns, best practices and workflow advice surrounding backing up our production database, and, especially, the process of cloning the database for use in development and testing...

Mnesia write fails

I defined a record named log. I want to create an mnesia table with name log_table. When I try to write a record to table, I get bad_type error as follows: ([email protected])4> mnesia:create_table(log_table, [{ram_copies, [node()]}, {attributes, record_info(fields, log)}]). {atomic,ok} ([email protected]..

Programming future web apps

For now I'm looking into languages like Haskell and Erlang just for the fun of it, but if I were to take bets, what would you suggest be the language of choice for programming the future web and why? ...

Where can I find documentation for the Erlang shell?

The Erlang documentation contains the documentation of modules. Where can I find the documentation of the Erlang shell? (Which is not a module, I suppose.) ...

What could make Erlang more popular and widespread?

I want to know what you think could make Erlang a "popular" and widely used language. For example, could it be more libraries, better IDE, a killer app, a five minute install, more grassroots community, a scalable RDBMS, etc...? ...

Sieve of Eratosthenes in Erlang

I'm in the process of learning Erlang. As an exercise I picked up the Sieve of Eratosthenes algorithm of generating prime numbers. Here is my code: -module(seed2). -export([get/1]). get(N) -> WorkList = lists:duplicate(N, empty), get(2, N, WorkList, []). get(thats_the_end, _N, _WorkList, ResultList) -> lists:reverse(ResultLi...

Where can I find free Erlang screencasts or tutorials, preferablly in a series format

Does anyone know some and could point me to it? I know there is a good series on pragprog but not for free. I'm a fan of "big" tutorials where something gets build up step by step and you come out with an application. Do you know any of this kind? ...