A-Grunder
Hello,
I am writing a cellualr automata system in elixir. I think that the problem comes from the cell supervisor (DynamicSupervisor) not creating the cells
This is the repository of my code : https://github.com/A-Grunder/Cellular-Automata-in-Elixir.
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
While it’s nice you posted a GitHub repo proving what you need does not work, it’s still considered polite to demonstrate you have made an effort to fix the problem(s).
What have you tried?
al2o3cr
None of the
Cellprocesses ever start because they try to register with a registry that isn’t started (or even defined):https://github.com/A-Grunder/Cellular-Automata-in-Elixir/blob/3ba53ba3efa445e08d0dabc0e401c3918ad66e59/lib/cell.ex#L112
You’ll need a line like:
in your supervision tree.
I also suspect you’ll want to call
Registry.update_valuerather thanregisterhere, since passing theviatuple toGenServer.start_linkasnamewill already have done the registration.al2o3cr
Closing out tabs and I noticed the updates to the repo - looks like the next headache is going to be timeouts:
The root cause is that between line 20 and line 25, the
Worldprocess is starting 250,000Cellprocesses. Thehandle_castfor:start_statedoesn’t return control to the GenServer receive loop until that’s done, so the message sent byWorld.get_griddoesn’t get handled withinGenServer.call’s default 5-second timeout.benwilson512
Following up on this, I don’t think a process per cell is a particularly good model for how cellular automata work. There’s no real concurrency in play, as the whole program has to operate in a stepwise fashion. Each cell depends on the state of the previous cell, which if those are different processes will result in a lot of message passing.
Now, from a “let’s play with it” standpoint, go for it! But may lower the process count to start with to make debugging easier, and grow it as you gain confidence in how the program is working.
heilong
You are technically correct for existing definitions of CA, but …
It should be possible for each cell to keep previous/current values as state, execute updates with messages, then roll the state when it has provided prev to all neighbors, and updated curr from all neighbors, e.g. a simple countdown message counter state for each generation, and a monotonic generation counter ID state also provided in all messages.
Asynch CA is much more interesting to me, because the real world is async. Sure the actual results will depend on BEAM scheduler and the random seed, but evolving structure, statistics and stability would be fascinating (not to appeal to authority, but joearms was a physicist and I’m sure he would agree).
P.S. Apologies, I have not looked at the repo, and have not searched for previous work on Asynch CA.
heilong
I have put up a quick hack to illustrate 1 & 2:
https://github.com/mike-french/expaca
There are synch and asynch simulations using GoL rule,
with output to bitmaps, images and video/gif
(if you have ffmpeg installed).