Questions tagged [erlang]
Erlang is a general-purpose 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.
43 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
0
answers
173
views
Erlang: Seeking advice on BEST practices with ETS table manager
I wrote a some what "simple" module to retain ETS tables should the owner crash. I think it's small enough for review; big enough to make enough mistakes. Honestly I'm a hobbyist programmer ...
1
vote
1
answer
175
views
Expose encrypted serial ID in Elixir
I'm working on a Phoenix/Absinthe application and I thought to expose encrypted sequential IDs instead of UUIDs since these are a bit shorter.
Encryption on Elixir/Erlang seems very hard, so I think I'...
4
votes
1
answer
69
views
Error handling for an Erlang 2D point class
I am working on a math library for an online game. I want to prevent as many errors as possible and I want to catch all errors as early as possible to simplify debugging in the long run. However, I ...
1
vote
1
answer
241
views
Managing many exceptions in Erlang cowboy without deeply nested trees
In my cowboy (Erlang) application, I have a handler called projects_from_json. This takes a JSON POST request as input and ...
2
votes
0
answers
301
views
A simple tokenizer in Erlang
I'm trying to learn Functional Programming and I picked Erlang because I will have to use it eventually. In the meantime, I'm trying to build a simple lexer to stumble upon problems and solve them ...
3
votes
1
answer
54
views
Order loaded modules by amount of functions
I am trying to solve some exercises from the "Programming Erlang" book.
One of them is "Write a function to determine which module exports the most functions"
This is my solution:
...
2
votes
1
answer
97
views
Move zeroes to the end of array
For the problem of moving zeroes to the back of the array as detailed here. I did it like below in Erlang. I just think my way is very basic and probably there is a more elegant way to do it using ...
2
votes
1
answer
472
views
Erlang: pmap with max number of processes
I'm working through Joe Armstrong's Programming Erlang 2nd E. The book has exercises at the end of each chapter. Chapter 26, Question 5 is:
Write a function called ...
1
vote
1
answer
342
views
Find the sum of the digits in factorial of 100 in Erlang
This is a problem in poject Euler:
n! means n ×ばつ (n − 1) ×ばつ ... ×ばつ 3 ×ばつ 2 ×ばつ 1
For example, 10! = 10 ×ばつ 9 ×ばつ ... ×ばつ 3 ×ばつかける 2 ×ばつかける 1 =わ 3628800, and the sum of
the digits in the number 10! is 3 + 6 + 2 + 8 +...
1
vote
1
answer
410
views
Priority queue in Erlang
I'm new to Erlang and I'm trying to port my Project Euler solutions in C# to Erlang. I have a priority queue implementation with unit tests.
I'm wondering if I'm missing something(I probably do) if ...
3
votes
0
answers
132
views
Recursive Blum Blum Shub
Since my last tattoo resulted in a syntax error I was thinking of getting it peer reviewed this time around, are there any errors or quirks with this recursive Blum Blum Shub implementation that I ...
0
votes
1
answer
131
views
Simple logger for a server
I wrote a simple logger for a server I'm writing. I'm wondering if anyone has any suggestions to improve it.
doom_logger.erl
...
3
votes
1
answer
299
views
Killing and restarting processes
I am a beginner with Erlang and currently making my way through the awesome Joe Armstrong's book. The following are my answers to exercises 5 and 6 for the concurrency chapter. The code can probably ...
3
votes
1
answer
743
views
Erlang process pool
I am coming from Java and I am trying to create a process pool in Erlang.
Like the Java API:
...
4
votes
1
answer
376
views
Simple Rock Paper Scissors in Erlang
I'm very new to Erlang and I'm specifically interested in making my Erlang idiomatic (in other words, can you tell I don't know Erlang from this code?) and removing code duplication. I am not as ...