bartblast

bartblast

Creator of Hologram

Hologram v0.5.0 released!

I’m excited to announce Hologram v0.5.0, a major evolution of the full-stack Elixir web framework! This release brings massive performance improvements - we’re talking execution times improved from milliseconds to microseconds in core client-side operations, making it fast enough for real-time interactions like mouse move events.

Key highlights:

  • Complete bitstring rewrite with ~50x rendering speed improvements!
  • Comprehensive session and cookie management
  • Live reload functionality for enhanced DX
  • Incremental compilation (2x-10x faster builds)
  • New pointer and mouse move events
  • HTTP-based transport layer
  • CRDT support for future distributed features

Full release notes: Hologram v0.5.0 Released! - Hologram

Check out the SVG Drawing Demo that showcases smooth, responsive drawing using the new pointer move events - it really demonstrates the performance leap!

svg-drawing-demo-600

With over 950 commits since v0.4.0, this release delivers significant architectural enhancements while maintaining the unique developer experience that makes Hologram special.

Special thanks to my current GitHub sponsors: @D4no0, @Lucassifoni, and @sodapopcan! :folded_hands:

:purple_heart: Support Hologram’s development: If you’d like to help accelerate Hologram’s growth and make releases like this possible, consider becoming a GitHub sponsor. Every contribution helps dedicate more time to new features and community support!

:open_mailbox_with_raised_flag: Stay in the loop: Don’t miss future updates! Subscribe to the Hologram Newsletter for monthly development milestones, ecosystem news, and community insights delivered straight to your inbox.

First 10 of 34 Posts! Switch mode

bartblast

bartblast

Creator of Hologram
ken-kost

ken-kost

:exploding_head: The svg drawing demo looks hella slick & hella cool! I would love to see the repo, if possible? It would force me to actually check out hologram for real (dabbled just a bit when it came out). :sweat_smile:

curiosity killed the cat but satisfaction brought it back :grinning_cat_with_smiling_eyes:

sezaru

sezaru

Sorry if this was asked before, but do you plan to make hologram easily integrate with a LV project?

I’m very interesting in testing hologram out, but it is hard to justify the time to do that now since I don’t have a new project to use it, and at the same time, I don’t plan in rewrite all my LV projects in Hologram. So, having a way to easily integrate it with a LV page (maybe a way to add hologram components or something like that? Dunno) would be amazing and probably open doors to easily solve lateny critical parts to a LV project.

Eiji

Eiji

I have already suggested something like that, but it was not accepted. Also looks like there would be no support for :for and siblings, so you have to write the templates in Svelte-like syntax. For me this is one more important as in complex components I don’t want to have “half” of the indentation levels to be added by control flow (like if, for etc.) …

What I’m personally looking for is some way to communicate with page asynchronously. Looks like in the medium-term goal there would be:

  • Component Subscription DSL - Create a DSL for integrating with Phoenix PubSub for real-time updates.

Preferably I would like to use send/2 and Process.send_after/3 depending on a case. Simply everything that happens in background, but affects the rendering like bot moves every pre-configured time, sending data from Repo.stream without querying all the rows or paginating them, next background music event and many, many more …

jam

jam

Congrats Bart! Looking great.

dimitarvp

dimitarvp

Congratulations on the release. :clinking_glasses:

One thing that I’m taking away from the changelog is that it might be time to start taking some parts of Hologram and release them as individual specialized libraries, maybe. I’m periodically taking a look and there seems to be some mighty useful Elixir pieces in there.

I’m not saying this to give you homework. But it might help adoption.

venkatd

venkatd

Very cool! I would be curious about the journey of what went into optimizing the performance of Hologram.

Eiji

Eiji

That could be done anytime. If author decides it should be done right before 1.0.0 release. I believe there are too many important parts that blocks people from using Hologram right now. We should rather allow the author focus on them.

garrison

garrison

I disagree with this. The goal should be something like JSX where there is no template syntax at all and the templates are actually constructed with JS (with the syntax extended to make it look nicer). The :if/:for syntax, which afaik was a hack to make slots work, was a huge step backwards in this respect for Phoenix. The original eex/heex “templates” are actually full Elixir with text/html interspersed and thus far more powerful.

Templating languages are always degenerate. As a simple example, why is there no :case attribute? The case construct spans (possible) elements, so it doesn’t even make sense as an attribute. The control flow is a higher level construct than an individual element and can’t be constrained to one. It’s a mistake to go down this path at all.

It’s unfortunate because case is one of Elixir’s best features and I strongly favor it over if, even in heex.

With that said, it seems like Hologram’s templates are in fact actually templates rather than code, so that’s not any better if so.

(Incredible work on the release BTW, that’s a lot of commits!)

bartblast

bartblast

Creator of Hologram

Video courses are coming soon in about 2-3 weeks. :slight_smile:

The demo is a part of the website code which is currently private, but here’s the most important code:

init/3 (state initialization) and actions (event handling):

def init(_params, component, _server) do
  put_state(component, drawing?: false, path: "")
end

def action(:clear_canvas, _params, component) do
  put_state(component, drawing?: false, path: "")
end

def action(:draw_move, params, %{state: %{drawing?: true}} = component) do
  new_path = component.state.path <> " L #{params.event.offset_x} #{params.event.offset_y}"
  put_state(component, :path, new_path)
end

def action(:draw_move, _params, component) do
  component
end

def action(:start_drawing, params, component) do
  new_path = component.state.path <> " M #{params.event.offset_x} #{params.event.offset_y}"
  put_state(component, drawing?: true, path: new_path)
end

def action(:stop_drawing, _params, component) do
  put_state(component, :drawing?, false)
end

and the most important part of the template:

(...)
  <button $click="clear_canvas" class={Button.class(:md)}>Clear</button>
</div>
<svg 
  class="bg-[#0F1014] cursor-crosshair border border-[#363636] rounded w-full h-[70vh]"
  style="touch-action: none;"
  $pointer_down="start_drawing"
  $pointer_move="draw_move"
  $pointer_up="stop_drawing"
  $pointer_cancel="stop_drawing"
>
  <path d={@path} stroke="#C2BBD3" stroke-width="2" fill="none" />
</svg>

Last Post!

bartblast

bartblast

Creator of Hologram

Where Next?

Trending in News & Updates Top

bartblast
After building Hologram and sharing updates across various places, I’ve realized there’s a lot happening that doesn’t always make it to t...
New
bartblast
I’ll be using this thread to share Hologram patch release announcements. Minor releases will continue to get dedicated threads with blog ...
New
kip
I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of w...
New
nseaSeb
Just published search_ash 0.5.0 (with search_core 0.4.0) on Hex. What’s new: synonyms You can now declare a synonym dictionary per lang...
New
polvalente
We have released v0.13 of nx, exla and torchx, along with a recently released emlx v0.4. Nx This is where the bulk of the updates happen...
New
mudasobwa
After years of struggling I made StreamData dependency optional. Finitomata.ExUnit got testing primitives for Persistence. Full back co...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement