Phoenix LiveView 1.1 is an exciting release in a lot of ways, but the highlight for me is the JS is getting types! Huge thanks to the maintainers 💜 #elixirlanggithub.com/phoenixframework/…
Maybe the most amazing thing about Elixir to me pattern matching on binaries. Parsing a WAV file is almost as simple as writing down the file spec verbatim - look at this! #elixirlang
ALT Plaintext formatted to read as a table, outlining the WAV file specification. It reads:
```
WAV File Format:
- RIFF header (1-4): "RIFF" marks riff file, 1 byte per char.
- File size (5-8): 32-bit integer, overall size minus 8 bytes.
- File type (9-12): "WAVE".
- Format marker (13-16): "fmt " with null.
- Format length (17-20): 16.
- Format type (21-22): 1 for PCM, 2-byte int.
- Channels (23-24): 2, 2-byte int.
- Sample rate (25-28): 44100 (CD) or 48000 (DAT), 32-bit int, samples per second.
- Byte rate (29-32): 176400 ((Sample Rate * BitsPerSample * Channels) / 8).
- Block align (33-34): 4 ((BitsPerSample * Channels) / 8); values: 1=8-bit mono, 2=8-bit stereo/16-bit mono, 4=16-bit stereo.
- Bits per sample (35-36): 16.
- Data header (37-40): "data" marks data section start.
- Data size (41-44): size of data section.
Values shown for 16-bit stereo.
```
ALT An Elixir code sample that showcases the power of pattern matching binaries as bitstrings - in this case for a WAV audio file. The code reads:
```
<<"RIFF",
chunk_size::little-size(32),
"WAVE",
"fmt ",
subchunk1_size::little-size(32),
audio_format::little-size(16),
num_channels::little-size(16),
sample_rate::little-size(32),
byte_rate::little-size(32),
block_align::little-size(16),
bits_per_sample::little-size(16),
data_chunk::binary>> = File.read!("./banger.wav")
```
✨ Announcing our stargazer giveaway!
Star the #PetalComponents repo for a chance to win a Petal Pro single license (for one year), valued at $299 USD.
github.com/petalframework/pe…
We will draw a random name by the end of the week and announce it here. Existing stargazers will be included in the draw.
#myelixirstatus#letsget1K
Apologies tw_screen_size friends, I only just noticed I've been making you uninstall to get your LiveView 1.0 upgrade - just released v1.1.0 to fix!
#ElixirLang
Playing with React again after being away a while, pretty stoked about this setup:
- @bunjavascript serving tanstack start router
- @biomejs handling formatting, linting
- @tailwindcss styles
- @rustlang wasm-bindgen wasm-pack
- All deployed to @flydotio
Very slick ✨
Phoenix LiveView 1.0.0 is finally here! Check the announcement for details phoenixframework.org/blog/ph…
If you haven't given Elixir/Phoenix a try, you can now get started in seconds by installing Elixir and generating a Phoenix project from a single command:
Working with LiveView everyday and still being tempted to rewrite all manner of things in Rust, Svelte, and [flavour of the month], has taught me your stack will never be shiny enough - just keep getting stuff done.
Prototape is growing up - we're now a company!
I refreshed our landing page recently, but there are some really exciting changes not yet public to come: prototape.fm#buildinpublic
Proud to share that my wife and I have pledged $300,000 to the Zig Software Foundation. Zig has been an absolute joy to use but more importantly I think their culture, vision, and project structure is a bright star for the future of systems programming. mitchellh.com/writing/zig-do…
🚀 Petal Pro 2.0.0 released!
- Admin Dashboard - utilising chart.js, we've added a dashboard to give you a snapshot of your app's performance.
- Persistent Notifications Mangement - a persistent notifications management system that allows you to create and manage notifications for your users.
- AI-powered Chatbot - Utilising langchain, Petal Pro includes an AI-powered chatbot that can be customized to your needs.
- See current users - shows active users to Admins by using Phoenix Presence
🧵👇
ALT Petal Pro 2.0.0 with Admin Dashboard, Persistent Notifications, AI-powered Chatbot and more
This is actually a massively important video. We've re-written Phoenix Channels in Rust. On top of that we have replaced phoenix.js and liveview.js with wasm compilations of our implementation and run against LiveView's unit and e2e tests.
#myelixirstatus
This video, while simple, represents swapping out the Swift Phoenix Channels client for the LVN Core (Rust via UniFFI) bindings work that will be coming in v0.4. This will enable us to support LiveView Streams and Uploads!
#myelixirstatus