humdrum00001010

humdrum00001010

AtomVM Supervisor issue

I’m with ESP32 board, atomvm 0.6.6, elixir 1.7.3 OTP 27, MacOS Silicon

Try to run

defmodule HuntersSup do
  @behaviour :supervisor

  def start_link(), do: :supervisor.start_link(__MODULE__, [])

  @impl :supervisor
  def init(_args) do
    flags = {:one_for_one, 3, 5}

    child =
      {:light, {:"Elixir.Light", :start_link, []}, :permanent, 5_000, :worker, [:"Elixir.Light"]}

    {:ok, {flags, [child]}}
  end
end

this with HuntersSup.start_link() but failed, I revised the flags, child form with GPT-5 with full automation, tried several code, but all didn’t work well.

If I let children empty, it runs, but can’t let it have children.

By the way, the gen_server is working well.

What should I consider?

Marked As Solved

humdrum00001010

humdrum00001010

Wow. I was in pain almost 2 days straight, just the moment I post this question, GPT-5 solved issue:

child =
      {:light, {:"Elixir.Light", :start_link, []}, :permanent, :brutal_kill, :worker,
       [:"Elixir.Light"]}

This saved my life. The official repo was for 0.7.0-dev sort of, and my esp32 was running 0.6.6 stable release, which didn’t support some args!

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement