How to debug Erlang code?

Debugging Erlang code can be tricky at times, especially dealing with badmatch errors. In general, two good guidelines to keep are: Keep functions short Use return values directly if you can, instead of binding temporary variables (this will give you the benefit of getting function_clause errors etc which are way more informative) That being said, … Read more

Failed to Create Cookie file RabbitMQ in Windows

Set the home drive to some dir in the dos shell before executing the cli. Create a startup file, e.g start-rabbit.bat, with contents below. set HOMEDRIVE=C:/conf/rabbitmq :: Or your favorite dir rabbitmq-plugins.bat enable rabbitmq_management Use a folder in C drive c:/conf/rabbitmq. The rabbitmq system will write the cookie file there. It is a good idea … Read more

Is Erlang Object-Oriented?

Joe Armstrong has gone on record saying that he thinks that Erlang is “possibly the only object-oriented language” (the context adds “OO in the Alan Kay meaning of the word”). Johnson, in the same interview, points out the same things that Sean Copenhaver says in his answer: in the small, Erlang’s a purely functional language; … Read more

Haskell for a server?

It depends what you want to do with your server. As might be expected from a telecoms application, Erlang excels at doing simple tasks with very high concurrency. If your server will need a bazillion connections per second, or at once, Erlang is your friend. Erlang also offers better support for distributing load over multiple … Read more

Why is Erlang slower than Java on all these small math benchmarks?

Erlang was not built for math. It was built with communication, parallel processing and scalability in mind, so testing it for math tasks is a bit like testing if your jackhammer gives you refreshing massage experience. That said, let’s offtop a little: If you want Erlang-style programming in JVM, take a look at Scala Actors … Read more

Why is MPI considered harder than shared memory and Erlang considered easier, when they are both message-passing?

I agree with all previous answers, but I think a key point that is not made totally clear is that one reason that MPI might be considered hard and Erlang easy is the match of model to the domain. Erlang is based on a concept of local memory, asynchronous message passing, and shared state solved … Read more

How does the Erlang compiler implement pattern matching?

A very good description of compiling pattern matching is given in “The implementation of functional programming languages” by Simon Peyton Jones. It is a bit old but a very good book. It also contains, amongst other things, a description of compiling list comprehensions. The Erlang compiler uses both of these algorithms from the book.

What is the storage capacity of a Mnesia database?

Quite large if your question is “what’s the storage capacity of an mnesia database made up of a huge number of disc_only_copies tables” – you’re largely limited by available disk space. An easier question to answer is what’s the maximum capacity of a single mnesia table of different types. ram_copies tables are limited by available … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)