Questions tagged [erlang]

Erlang is a general-purpose, garbage-collected programming language and runtime environment, with built-in support for concurrency, distribution and fault tolerance.

Erlang is a general-purpose functional programming language and runtime environment. It has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson. Erlang is open source and available for download on GitHub.

Some Erlang features:

Online Resources:

Erlang Books:

9600 questions
20
votes
6 answers

Writing GUI in one language and main app in another

Let's say I write an app in Haskell or Erlang (or any other, doesn't matter) and I want it to work with my gui in a more gui-friendly language (my opinion) let's say Python. How to glue those two? How would you communicate between those two parts of…
szymzet
  • 615
  • 5
  • 11
20
votes
3 answers

Online mnesia recovery from network partition

Is it possible to recover from a network partition in an mnesia cluster without restarting any of the nodes involved? If so, how does one go about it? I'm interested specifically in knowing: How this can be done with the standard OTP mnesia…
archaelus
  • 7,109
  • 26
  • 37
20
votes
1 answer

How do I get binary byte length in Erlang?

If I have the following binary: <<32,16,10,9,108,111,99,97,108,104,111,115,116,16,170,31>> How can I know what length it has?
0xAX
  • 20,957
  • 26
  • 117
  • 206
20
votes
1 answer

Erlang: optimize complex qlc

I have qlc RefsBlocked = qlc:e(qlc:q([ Ref1 || {{Ref1, {pattern, {_Status1, _Pattern1, Limit1}}}, Count} <- dict:to_list( qlc:fold( fun({Key, _Ref2}, Acc) -> dict:update_counter(Key, 1, Acc) …
trytrytry
  • 373
  • 2
  • 6
20
votes
8 answers

Erlang io:formatting a binary to hex

Can I format an Erlang binary so that each byte is written in hex? I.e., > io:format(???, [<<255, 16>>]). <> I don't see an obvious way to do it in io:format documentation, but perhaps I am simply missing one? Converting a binary to list…
Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
20
votes
6 answers

Setting up Emacs for programming Erlang

Emacs is the IDE of choice for programming Erlang. There are plenty of good modes (distel, erlware-mode, the default erlang mode,...), but what are your recommendations for setting up Emacs for professional Erlang development?
Mr. X
  • 201
  • 2
  • 3
20
votes
3 answers

Why must/should UI frameworks be single threaded?

Closely related questions have been asked before: Why are most UI frameworks single threaded?. Should all event-driven frameworks be single-threaded? But the answers to those questions still leave me unclear on some points. The asker of the…
gmr
  • 712
  • 6
  • 17
20
votes
3 answers

Vim settings for Erlang

Does anyone want to share their erlang vim settings? It seems I can't make it work at all and the worst part is that it doesn't auto-indent automatically. Is there something outhere called vim-erlang, as in vim-python or something?
hyperboreean
  • 8,273
  • 12
  • 61
  • 97
20
votes
3 answers

Is it practical to use Erlang for embedded development?

If so, what is the storage and memory footprint? EDIT I had done some research about this, but failed to find useful information. The site http://www.erlang-embedded.com/ doesn't help at all. The blog article…
ivarec
  • 2,542
  • 2
  • 34
  • 57
20
votes
5 answers

Erlang vs OCaml (best niche to fit)

Hi I'd like to pick up one FP language (it's always a pain when you work in a position that does not require you learn much), and after doing some research, I felt Erlang and OCaml are the two that I'd really like to get my feet wet for the…
Charlie Chen
20
votes
1 answer

Why is this variable unused?

Why does compiling this code: triples( [], _,_,_)-> []; triples( Self, X, Y, none )-> [ Result || Result = { X, Y, _} <- Self ]. report: ./simple_graph.erl:63: Warning: variable 'X' is unused ./simple_graph.erl:63: Warning: variable 'Y' is…
r4ge
  • 386
  • 3
  • 13
20
votes
8 answers

How do you URL encode parameters in Erlang?

I'm using httpc: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…
davidsmalley
  • 1,029
  • 3
  • 10
  • 15
19
votes
2 answers

Easy way of loading project's Rebar dependencies in Erlang shell

I've got a project that uses Rebar as build tool. When developing, I would like all my app dependencies that are specified in Rebar.config be compiled & loaded in the shell as easy as possible. I'm using the Erlang shell in Emacs. What's a quick way…
Ward Bekker
  • 6,316
  • 9
  • 38
  • 61
19
votes
10 answers

What is the best programming language to implement neural networks?

I'm not looking for a Neural Networks library, since I'm creating new kinds of networks. For that I need a good "dataflow" language. Of course you can do this in C, C++, Java and co. but dealing from scratch with the multithreading etc. would be a…
Blacksad
  • 14,906
  • 15
  • 70
  • 81
19
votes
5 answers

What is the difference between multicore programming in Erlang and other language?

I read Joe Armstrong's 'Programming Erlang', and the 'n times faster in n core machine' theory. The efficient way to multicore programming in Erlang is to use lots of processes (threads). I'm a C++ programmer, so I am curious about the difference…
Sungwon Jeong
  • 1,267
  • 2
  • 15
  • 28