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.
What I am trying to do is to run the Erlang Observer App locally and then connect to a remote Docker container that is running my Elixir/Phoenix app in production.
The problem I am having is not being able to connect.
From my research it seems that…
I'm using socket_server from this tutorial and the following code for a client and server:
Server:
-module(echo_server).
-export([start/0, loop/1]).
% echo_server specific code
start() ->
spawn(socket_server, start, [?MODULE, 7000, {?MODULE,…
I started off this morning trying to work out what the 'when' statement is used for in erlang. I know the below example is wrong:
do_larger() ->
io:format("Larger~n").
do_smaller() ->
io:format("Smaller~n").
when_version(Size) ->
when…
I'm trying to come up with the correct url-encoded info hash to send to the tracker in order to get the peers list.
For testing, I tried parsing the torrent in this url.
After opening the file, manually cut the info dictionary piece and SHA1-hash…
I am developing a web service with Erlang. Low latency is a goal. The service provides several views of a set of files. Building these views takes time, since I have to read in the files, parse them as CSV, store their fields in records, etc.
The…
I need to calculate the md5 sum of a file in Elixir, how can this be achieved?
I would expect that something like:
iex(15)> {:ok, f} = File.open "file"
{:ok, #PID<0.334.0>}
iex(16)> :crypto.hash(:md5, f)
** (ArgumentError) argument error
…
If I am clustering 2 nodes together, from my experimenting and reading up online I understand that Node A will be like a "master" node and Node B will copy the tables over if I want them to. (Otherwise it will just access them remotely.)
What…
Anyone know of a decent tool to monitor the total memory usage of a program that spawns a lot of threads? I'm really new to developing in Erlang and would appreciate any help!
Thanks in advance :D
I know that Erlang uses Actor model to support concurrency and Erlang processes are the same as Actors: they send messages, immutable and so on. But according to Carl Hewitt one important thing in the Actor Model is indeterminism and Arbiters (Given…
The Erlang official user's guide (http://erlang.org/doc/reference_manual/data_types.html#id67942) says:
An atom is to be enclosed in single quotes (') if it does not begin with a lower-case letter or if it contains other characters than…
I am on a remote machine, it has a running Erlang VM node on it. I'm trying to connect to Erlang VM node via iex but get an error back:
$ iex --name testing@127.0.0.1 --remsh myapp@127.0.0.1 --setcookie…
If I start an IEx session in the following manner the cookie is set correctly.
$ iex --name example@10.10.10.2 --cookie mycookie -S mix
...
iex(example@10.10.10.2)1> :erlang.get_cookie
:mycookie
However if I also set erlang arguments to get use my…
Before I start, I have already checked out Handle badarg in Erlang
But I am still not successful in my undefined checks so I removed them.
I am building a dummy bank process and when a client does a balance query check to the bank process, the…
I am trying to check if all the indexes I have defined in MongoDB are being used by my application and that there are no extra indexes. I have a utility that does that for a single Eunit test suite. However, some of my components have more than one…
I used rebar to create a release for my Erlang application.
My application need to read data from a file. Normally, it is located in the directory where I start erl.
But when it comes to release, I don't know where can I put the data so as the…