saleyn

saleyn

I’ve published flick, a small library that replaces JSON with Erlang’s native binary format (ETF) for Phoenix WebSocket connections.

Why ETF? You call :erlang.term_to_binary/1 on any map, list, or atom and send it directly — no custom serialization, no string parsing overhead.

What’s included:

  • Raw WebSock mode - push {:binary, etf_bytes} frames directly, minimal overhead

  • Phoenix Channels mode - Flick.Socket.Serializer swaps the JSON serializer for ETF, keeping full Channels semantics

  • A zero-dependency browser client (flick.js) that decodes ETF frames via window.Flick.decode(event.data)

  • mix flick.install - generates all boilerplate (WebSock module, controller, router route, JS hook) and vendors the pre-built JS asset

{:flick, "~> 0.1"}
mix deps.get && mix flick.install

GitHub:

Hex.pm:

Showing Posts 1 to 5

z3eMk0

z3eMk0

That’s neat! You might check if https://plug-crypto.hexdocs.pm/Plug.Crypto.html#non_executable_binary_to_term/2 could help you with the decoding of the binary.

saleyn

saleyn OP

Thank you. Updated to use it by default.

filmor

filmor

Your Javascript library should reject non-finite floats (all of the NaNs and ±inf) as these will crash binary_to_term with a badarg (learned that the hard way :slight_smile: ).

saleyn

saleyn OP

Patches are welcome

saleyn

saleyn OP

Added this fix in the latest commit. Thank you for your suggestion!

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews