Clixir - mixing C and Elixir code
summary
Clixir embeds C inside Elixir source files and runs the C in a separate process over Erlang ports so crashes don’t kill the VM. Macros generate the boilerplate, using gperf perfect hash tables and static 65k buffers to avoid mallocs. Demo renders with NanoVG/OpenGL and hits 100 FPS with 50 birds on a laptop, slower but usable on Raspberry Pi; boots Nerves in ~13s. Current data types supported are floats, strings and a special pid token for replies.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:37About Cees
- 1:54Hobby project
- 2:58Web Browser
- 3:37OpenGL
- 4:09Integration
- 5:11Buffer
- 5:38Boilerplate
- 6:04Serialization
- 6:33Mousetrap
- 7:01Hello World Example
- 7:41How does it work
- 8:10Elixir function
- 8:48Buffer allocation
- 9:35GPF
- 10:47If statement
- 11:57tuple expression
- 12:18synchronous feedback
- 13:05multiple calls
- 13:19JenRenderer
- 14:42Cart
- 15:09Rendering
- 18:22Memory Allocation
- 18:38Shoutouts
- 19:46Questions
- 22:39Ceiling
related talks
52mPhysical Elixir
04mLightning Talk - Native Code from Elixir
49mKeynote: The Age of Elixir
38mElixir + Nerves + keys = Elixir keyboard!
27mFreestanding Erlang Porting BEAM close to the metal.
35mBuilding a GameBoy emulator with Elixir and Scenic
27mDistributed Robots with Elixir
46mThe Joy of Connecting Elixir to the Physical World
