Refurbished Units in STOCK – From $2500.00 CAD Fully guaranteed under Limited Warranty Call for updated Inventory 2 color – 8 K $2,500.00 – #RT-63 Stand Included 4 color – 32 K $3,999.00 — #T-601 Castor Stand Included!
"Running Erlang and Elixir on microcontrollers with AtomVM"
How to run BEAM code on a 3 $ microcontroller by Davide Bettio @bettio [BEAM is Erlang bytecode]
AtomVM allows you to run ordinary/unmodified(but "don't do anything weird") Elixir/Erlang code on microcontrollers (not all of them! it works on ESP32, STM2, Raspberry Pi 2040, etc)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •I'm at the #Elixir/#Erlang devroom fosdem.org/2023/schedule/track…
Let's be functional and parallel!
FOSDEM 2023 - Erlang, Elixir and Friends devroom
fosdem.orgStéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •First speaker is late.
#TooManyBeers #FOSDEM
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Speaker at least arrived. We start with the introduction "Elixir - Old wine in new casks"
Intro talk about Elixir/Erlang by Tonći Galić
The famous motto "Let it crash!" (suddenly, slides turn white)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •#Elixir is a repackaging of an old idea. (A bit like Kotlin replacing Java.)
Ruby syntax, Erlang bytecode and virtual machine
There is of course a repository of libraries with a french TLD hex.pm/
Hex
HexStéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Nw, "Introduction to Gleam
by building type-safe Discord bots on the BEAM" by Harry Bairstow
#Gleam is a programming language which can be compiled to BEAM (Erlang bytecode) or to Javascript.
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"Speak binary to me":
Learn the powers of binary pattern matching by Troels Brødsgaard
(First slide is only 0 and 1)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Elixir allos to define bainary values, type, sign, endianess (I failed o answer the qustion at the end of my Drink talk), etc.
iex(8)> <<300::unsigned-integer-size(16)>>
<<1, 44>>
iex(10)> <<300::unsigned-integer-size(16)-little>>
<<44, 1>>
And then you can match:
iex(6)> <<first::1, rest::7>> = <<0xFF>>
<<255>>
iex(7)> first
1
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Example: talk to the #TBox temperature sensor. Asking its name
request = <<0xA::4,0::1, 0::3>>
Pattern matching the answer:
<<0xA::4,1:1, 0::3, name::bytes-12>> = reply
If it matches, the name will be in the "name" variable.
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Protohackers
protohackers.comStéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"LiveView keeps you warm!"
Building a knitting machine UI with Phoenix LiveView by Arjan Scherpenisse
(Phoenix is the Elixir framework for making Web sites)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •A real hacker talk, starting with using an Arduino to control an old knitting machine, then designing a Web interface (with #LiveView) to drive it.
With LiveView, eveything is done on the server, you never write JavaScript, it is generated automaticallyt.
passapcanada.com/passap-e-6000…
PASSAP E 6000 Knitting Machines • PASSAP CANADA
Passap CanadaStéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"Distributed music programming with Gleam, BEAM, and the Web Audio API" by Hayleigh Thompson
#Gleam, again? (This morning, I didn't know the existence of this language.)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Web Audio API
www.w3.orgStéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"The Actor Model as a Load Testing Framework" by Nelson Vides
("Senior Erlang Consultant", that's a job title.)
What is the capacity of modern systems? What can they handle?
en.wikipedia.org/wiki/Tacoma_N…
suspension bridge that collapsed in 1940
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •Scene 2)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"Shorter feedback loops with Livebook" by Linus De Meyere
"Are you hungry?" [several hands raised]
"I cannot help with that but I can explain #Livebook"
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •#LIvebook is a tool to mix documentation and code (which can be evaluated). For learning or for creating small tutorials. You can then share them.
Demo with the :gen_tcp module. (With Murphy's help, to be sue it's a real demo.)
Quite convincing.
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •"Running Erlang and Elixir on microcontrollers with AtomVM"
How to run BEAM code on a 3 $ microcontroller by Davide Bettio @bettio [BEAM is Erlang bytecode]
AtomVM allows you to run ordinary/unmodified(but "don't do anything weird") Elixir/Erlang code on microcontrollers (not all of them! it works on ESP32, STM2, Raspberry Pi 2040, etc)
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •And the last talk of the Erlang/Elixir devroom, "Dealing with a Monster [#Ecto / daabase] Query",
a story of Elixir & optimization by Mackenzie Morgan
(Yet another talk with Beamer slides)
Max requsts/s : 700 % improvment
Stéphane Bortzmeyer
in reply to Stéphane Bortzmeyer • • •At the #Matrix talk, nice demo of #ThirdRoom, a VR system built on the top of Matrix. You can have a #metaverse without a GAFA or a stupid startup.
#FOSDEM