NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Hologram v0.7.0: Milestone release for Elixir-to-JavaScript porting initiative (hologram.page)
ZiiS 6 minutes ago [-]
As a novice who enjoyed an AoC in Elixir but has never used it in battle; what is the quick answer to why JavaScript not WASM?
haolez 40 minutes ago [-]
Slightly off-topic, but are there teams using Erlang instead of Elixir for application development?

I'm planning on getting into this ecosystem and I'm considering if it's worth it also becoming an expert on Erlang beyond understanding OTP's internals.

xlii 19 minutes ago [-]
For serious apps it's impossible to escape reading Erlang or Erlang documentation. Many functions and libraries simply aren't available for Elixir or are partial (see `opentelemetry_*` family as an example). Deep debugging is almost exclusively done with Erlang functions.

I'd even say that the more serious/critical application becomes the more weight shifts toward Erlang. Personally I'd go with Erlang-first, but only because I've accumulated thousands paper cuts from Elixir.

For starters Elixir has much more palatable syntax, though.

GCUMstlyHarmls 31 minutes ago [-]
It's very easy to call Erlang from Elixir,

    value = :erlang.function(a, b, c)

So with that in mind, you can just learn Elixir, use Erlang where you need it for some libraries. Elixir is IMO much nicer to learn, write and use. I think it is worth learning a bit about the underlying systems but I've never felt like I should have put in 10 erlang-only projects before writing larger elixir stuff.
abrookewood 2 hours ago [-]
Is the main benefit that someone who is familiar with Elixir can code the front-end in the same language? Or is the intention to have the front-end JavaScript act as a node in a cluster with the server?
bartblast 1 hours ago [-]
Both! Right now the focus is on enabling rich UIs with pure Elixir running in the browser. But eventually Hologram could be able to act as an Erlang node in the cluster as well.
knubie 10 hours ago [-]
This looks really cool. Congratulations on the milestone.

Does the elixir->js compiler exist as a separate project, or is it built into the framework? Is it based on an existing transpiler? How does it compare / contrast to something like gleam (which, AFAIU also let's you transpile elixir to JS)?

bartblast 3 hours ago [-]
Thank you! The Elixir -> JS compiler is currently coupled with the framework - it's a custom thing, not a separate dependency.

Re the Gleam comparison: I don't know Gleam's implementation in detail so someone correct me if I'm wrong, but as I understand it - Gleam compiles to fairly readable JS with a minimal prelude, and deliberately treats the two targets as having different concurrency semantics. It doesn't try to replicate BEAM processes or OTP in JavaScript, instead using JS's native promise-based async. The upside is zero runtime overhead and clean JS interop.

Hologram takes the opposite approach - we're iteratively reimplementing the Erlang runtime in the browser, with the goal of having full semantic parity eventually. The tradeoff is a heavier runtime, but the benefit is that the same Elixir code can run on both server and client with consistent behavior.

dnautics 27 minutes ago [-]
you could have a lighter runtime by implementing a bytecode interpreter in wasm.
lawn 8 hours ago [-]
I may be wrong but I believe the elixir->js compiler is currently built into the framework but it could potentially be separated in the future.

Gleam is different in that JS is a first-class target and built into Gleam's compiler, while Hologram is a standalone project.

lawn 8 hours ago [-]
Hologram is an amazing project and I'm really excited for it's future.

I worked on a project last year based on Hologram but ran into some minor issues, and other real-life stuff got into the way. I'm looking forward to picking it up again soon as I have some energy to spare.

bartblast 3 hours ago [-]
Really appreciate it! Would love for you to give it another go - a lot has improved since then. If you run into any issues or have ideas for how things could be better, don't hesitate to reach out. Happy to help!
victorbjorklund 7 hours ago [-]
Sweet
worthless-trash 6 hours ago [-]
Can I use this for erlang instead of elixir?
bartblast 3 hours ago [-]
Not currently, but expanding to Erlang is definitely possible down the road. I've actually been considering adding an Erlang compiler since some Erlang functions that the Elixir standard library depends on could be compiled automatically instead of being ported by hand.
14 hours ago [-]
aliljet 10 hours ago [-]
Am I just a cynic, or do any of the LLMs deserve love too?
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 14:08:42 GMT+0000 (Coordinated Universal Time) with Vercel.