76 questions
1
vote
1
answer
51
views
Disable auto scaling for templated jobs
In Dataflow, you can run jobs without autoscaling. This is typically achieved by setting a pipeline_option called autoscaling_algorithm to NONE. Attempting the equivalent on Templated Dataflow Jobs ...
0
votes
0
answers
108
views
Section/integration points for beam elements in ABAQUS
I'd like to work with beam elements in ABAQUS. I don't quite understand what is meant by integration points and section points. For a rectangular beam, it says that there are 25 section points for ...
1
vote
0
answers
393
views
Is there any erlang BEAM decompiler?
Is there any solution to manipulate (or decompile and recompile again) an erlang .beam file that has no_abstract_code?
:beam_lib.chunks("myfile.beam",[:abstract_code]) doesn't work.
famous ...
3
votes
1
answer
127
views
How to use compiled erlang modules in an elixir project?
I have an erlang application that has been compiled already so I do not have access to the source code.
The folder structure looks like this
base_app
lib
package_1
ebin
- package_1....
4
votes
1
answer
111
views
Who is the sender of Erlang's trace messages and what can I assume based on it?
When using erlang:trace/3, the tracing process receives "trace messages" which tell the story of the traced process. For the purpose of message ordering (i.e. the guarantee that messages ...
2
votes
1
answer
854
views
What to look to in order to write a BEAM VM language?
I'm about to start a toy project, that is implementing my programming language. I'd like to make a language that runs over BEAM like Elixir. It can be simple, it's just a toy project.
I found some ...
3
votes
1
answer
109
views
Looking for Erlang Q&A platforms/communities [closed]
I am looking for Erlang Q&A platforms/communities for discussion and clarification. I use StackOverflow & erlangforums.com as of now. Both communities are great. Are there any additional Q&...
-1
votes
1
answer
255
views
(Elixir/Erlang) How to get the source code file line total numbers from an Erlang beam file?
Is this information contained in these chunks of the Beam file? Or is there another way?
References: Erlang beam_lab
1
vote
1
answer
443
views
Beam VM Scheduler vs OS Scheduler
Beam VM breaks the program into small, light-weight processes and has its own scheduler. How does this scheduler works alongside the underlying OS scheduler ? If these are processes, then OS will ...
3
votes
1
answer
2k
views
How can I use :observer from IEx when my remote is an embedded system?
I would like to demonstrate the use of the :observer GUI from a remote IEx shell. My target is BEAM running my Elixir app on a resource contrained embedded system.
I built the remote OS using ...
6
votes
0
answers
240
views
Stacktrace in erlang tracer
Is it possible to return a stacktrace in a trace? I'm using :dbg.tp/3 and :dbg.tracer/2 to get a trace along with the calling module. I tried caller function (see in docs: https://erlang.org/doc/apps/...
1
vote
1
answer
123
views
Beam file format for "FunT"
We are using Erlang version 22. We rebuild the Beam file multiple times. Inside the Beam file, we found out that the last 4 bytes in "FunT" and before "LitT" are always changing (...
1
vote
1
answer
3k
views
How to run a beam file generated by erlang
I am a beginner in erlang. Please help me run an erlang program.
In the command line, I used this - c(main). to create a beam file. Now how do I run the program.
I am on windows.
% this is the hello ...
1
vote
1
answer
351
views
Why are atoms not garbage collected by the BEAM?
Well, the title says it all: I'm wondering what is the reason why the BEAM doesn't garbage collect atoms. I'm aware of question How Erlang atoms can be garbage collected but, while related, it doesn'...
1
vote
1
answer
90
views
Does a BEAM file remember whether it was built with -Werror?
I am working on a tool that deals with BEAM files, and we want to be able to assume the code was compiled with -Werror, so we don't have to repeat validations that are already done by the erl_lint ...
7
votes
2
answers
1k
views
What is the best way to package Elixir CLI application?
Suppose I have a CLI application with subcommands and arguments (like application foo --bar baz). How can I package it for distribution without requiring user to install Erlang?
I know there's mix ...
2
votes
1
answer
2k
views
Why is math so slow in Erlang/the BEAM VM? [closed]
I was trying to understand why math might be so slow in Erlang, and if so, what I could do to find out where it is slow and try to speed it up. Some people said it's because it's a VM, but I doubt ...
4
votes
1
answer
502
views
How to implement a function to notify a node that the other node quit or not
I am creating a cluster of nodes and I want to get notification every time a node is connected or not how could that be possible?
1
vote
2
answers
131
views
Tail-call recursive behavior of the BEAM bytecode instruction call_last
We were recently reading the BEAM Book as part of a reading group.
In appendix B.3.3 it states that the call_last instruction has the following behavior
Deallocate Deallocate words of stack, then do ...
1
vote
1
answer
116
views
What is the Synchronous Call Trick/Ref Trick in BEAM
We were recently reading the BEAM book as part of our reading group. In Chapter 7 there is an allusion to the ref trick/Synchronous Call Trick in Erlang.
Unfortunately, the book is incomplete and ...
4
votes
0
answers
732
views
Cannot allocate on heap - but memory is there
I am chasing a problem: every few days my system crashes with
Slogan: eheap_alloc: Cannot allocate 600904 bytes of memory (of type "heap").
System version: Erlang/OTP 22 [erts-10.5.4] [source] [64-...
1
vote
0
answers
127
views
Make rebar compile .core files in erlang project
I am an absolute Erlang newbie and I wonder if it is possible for rebar to compile .core files using rebar3 compile. According to the documentation : https://www.rebar3.org/docs/commands rebar3 will ...
2
votes
0
answers
141
views
Multiple beam processes with ejabberd
I'm working on a chat application built using ejabberd on the backend. Every time I start ejabberd: I see multiple ejabberd/beam process start and after sometime.. I see that one of them is hogging up ...
3
votes
1
answer
1k
views
How many workers per supervisor?
Is there a boundary for how many workers a specific supervisor process should supervise? I've kept coming back to this question a couple of times while building an OTP supervision tree regarding the ...
0
votes
1
answer
3k
views
elixir - error loading module ranch_server - recompile this module with an 20 compiler
I'm trying to run an existing elixir project that works on my other computer, on a new computer (both are mac).
When I run iex -S mix I get:
iex -S mix
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [...
0
votes
2
answers
145
views
What exactly happens when one calls a 'spawn' function?
I am trying to understand how BEAM VM works, so there is my question. When one spawns a process in erlang, the result is a PID. Does that mean that a process is suspended until requested process is ...
0
votes
1
answer
792
views
Is there a way to find out or control which process is running on which CPU core in Elixir?
I made a multi-process insertion sort program with Elixir. However, when run on a 32 core machine, it is slower than a single process insertion sort.
If the processes sending messages are running on ...
0
votes
0
answers
75
views
Streaming: VM freezes for large file
I am building a pipeline to process, aggregate and transform data from csv files, then write back to another csv file… I load rows from a 19 column csv file, and with some mathematical operations (map ...
2
votes
1
answer
487
views
Composing jpeg image with multiple png files in Erlang/Elixir
I need to overlap a series of png images in order to create a single jpeg file in Erlang/Elixir.
I can't find anywhere a way to do this task on the BEAM, so I would love to use Erlang NIFs and writing ...
0
votes
1
answer
343
views
Is gen_server restart strategy copy state?
Erlang world not use try-catch as usual. I'm want to know how about performance when restart a process vs try-catch in mainstream language.
A Erlang process has it's small stack and heap concept ...
0
votes
1
answer
138
views
A dynamic language on top of BEAM
I have a question regarding the Erlang language.
I saw that people made the Elixir language on top of BEAM, and I was wondering, would it be possible to make a dynamic language like Python or ...
3
votes
1
answer
191
views
Erlang: Will Process Priority Affect Long Running Tasks?
When a process is scheduled with low priority in erlang, it is scheduled into the low/normal queue with a count of 8. It has to be picked from the queue 8 times before getting scheduled.
Once it's ...
-1
votes
1
answer
357
views
Scala console: OutOfMemoryError: GC overhead limit exceeded
Scala:
(1 to 100000000).toList.foldLeft(0)((acc, x) => acc + x)
Elixir:
1..100000000 |> Enum.to_list |> List.foldl(0, fn x, acc -> x + acc end)
They are of the same functionality. ...
2
votes
0
answers
906
views
Erlang Cowboy and Ranch acceptors
How do I determine the right number of Ranch acceptors to use in an OTP application? I've noticed that Elixir Phoenix applications start with a default of 100, but there's no real explanation as to ...
2
votes
3
answers
1k
views
Recompiling output of Erlang's beam_disasm.file
I'm trying to modify a beam file such that local function calls are interpreted as external module calls even though a function may be defined in the same module where it is being called.
Given m as ...
0
votes
0
answers
339
views
Why do I get a `Elixir.ModuleName.function is undefined!` error unless I run `mix clean`
I’m having an unusual problem that I haven’t been able to search out an answer for. I’m using a library (libcluster) that allows you to define a function to use in the config file. So in my umbrella ...
5
votes
1
answer
2k
views
Change Erlang file handle limit?
I'm running into trouble with an Erlang OTP + Cowboy app that does not allow me to open enough files simultaneously.
How do I change the number of open file handles allowed in the BEAM?
Potentially, ...
0
votes
1
answer
441
views
Error when compiling Erlang modules in Windows
I'm a beginner at programming Erlang and at Stack Overflow, so I hope this isn't a very silly question.
I've installed Erlang/OTP 20.1 from the official website, on Windows 10. I'm trying to compile ...
0
votes
2
answers
321
views
Elixir IEX stalls before showing prompt, and doesn't accept input
I recently tried to start iex. I typed iex in the shell (I tried several shells, just in case) and iex doesn't provide any prompt or the like. It just sits there, and if I type special keys like ...
4
votes
1
answer
1k
views
Erlang Binary Leak?
We have an erlang/elixir application (on 18/erts 7.3.1) that processes large json payloads.
Here's a typical workflow:
A listener gets a token from rabbitmq and sends to a gen_server.
The ...
0
votes
1
answer
78
views
Why elixir debugger is calling built-in function instead of mine if they have same name
Here is a simple module with 2 breakpoints in functions which are calling another functions with names exactly the same as built-in ones: get/1 and put/2
defmodule Test do
def call_put() do
...
2
votes
1
answer
41
views
Erlang's typer deduced weird types for strings
I'm exploring typer, and gave it a function that does nothing but:
const_str() -> "qwe".
That guy's type is deduced as:
-spec const_str() -> [101 | 113 | 119,...]
, i.e. "eqw" (huh?!), followed by ...
2
votes
1
answer
817
views
Elixir - Phoenix - function :erl_posix_msg.message/1 is undefined
I have two server running a pretty simple Phoenix framework API and every week or so, one of the servers starts throwing 502 errors.
15:35:08.260 [error] 'File operation error: emfile. Target: /usr/...
2
votes
0
answers
356
views
Do I always have to run mix clean then compile after changing config?
I'm relatively new to Elixir and I've noticed something strange, I have a config, config.exs
which has a line like
config :my_app, myname: "name"
When I change the value of the myname key, my app ...
0
votes
1
answer
1k
views
RabbitMQ cluster status: how to parse Erlang's beam from a shell?
I need to monitor rabbitmq cluster status.
REST API doesn't provide information about partitions. So I need to use app rabbitmqctl:
# rabbitmqctl cluster_status
Cluster status of node 'rabbit@rabbit-...
0
votes
0
answers
79
views
Erlang cluster synchronization issues
I have an erlang cluster of 4 nodes running on different hosts. I recently encountered an issue with the cluster in a way that beam process is running in one of the nodes but the application was not ...
12
votes
1
answer
6k
views
Running C code in Elixir/Erlang: Ports or NIFs?
I've found that Elixir programs can run C code either via NIFs (native implemented functions) or via OS-level ports. Having read those and similar links, I'm not a hundred percent clear on when to use ...
15
votes
2
answers
5k
views
Is there a size limit for Erlang integers?
I know that Erlang has arbitrary size integers, but is there a max limit on one of the standard implementations? If so, what?
1
vote
0
answers
84
views
Elixir: exrm upgrade kills worker
I have created a very basic Elixir supervisor and worker, to test hot code reloading feature of Erlang VM. Here is the supervisor:
defmodule RelTest do
use Application
# See http://elixir-lang....
132
votes
5
answers
46k
views
Are there things Elixir can do that Erlang cannot, or vice versa?
This question is in the context of the Beam VM and the capabilities that it provides, not in the general context of what a Turing complete language can do. I want to invest some time to learn either ...