dbsimmons64
Hi All
Just started looking at Hologram and think it has huge potential. Is there a list of what does, and doesn’t work when converting from Elixir to JavaScript. I was looking to validate that a form field was a valid number and had the following
elixir
case Integer.parse(params.event.value) do
{int, _} -> int
:error -> :error
end:
```
When running the code I get the following error in the console:
runtime.entry.js:364 Uncaught HologramBoxedError: (FunctionClauseError) no function clause matching in Integer.count_digits/2
The following arguments were given to Integer.count_digits/2:
# 1
"1"
# 2
10
I’m assuming this is because Integer.parse doesn’t yet convert to JavaScript. Of course I could be completely wrong and this is a silly error on my part.
cheers
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #ai
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
BartOtten
deleted: Too fast, too furious.
dbsimmons64
Is that me or you
bartblast
Hey @dbsimmons64,
Elixir functions are transpiled automatically to JavaScript by Hologram. However, at the very bottom layer, they use Erlang functions which need to be ported by hand to JavaScript. The detailed process is described here: Hologram Elixir -> JS compilation - #6 by bartblast
If some Erlang function isn’t yet ported, an error with details about the missing function is displayed in the browser console. However, that’s not what you encountered here.
The error you’re seeing with
Integer.count_digits/2was due to problems with bitstring segments handling in the client-side implementation. However, even after fixing that initial bitstring handling issue, you would have eventually encountered errors about missing Erlang function ports thatInteger.parse/2depends on. So there were actually two layers of problems: first the bitstring patterns handling, and then missing Erlang functions underneath.Good news:
I’ve just released v0.6.3 that fixes the client-side support of
Integer.parse/2. Both the bitstring handling issues and the missing Erlang function dependencies have been resolved, so your code should work now after updating.Current project stage:
At this stage of the project, if something doesn’t work it’s usually a small thing and I typically fix it within 24 hours - just like with your issue!
Going forward:
I completely agree - we need more transparency about which Erlang functions are missing. I’ve been thinking recently about creating some initiative to help me port the rest of the functions. The process is actually quite simple, especially with the help of AI tools (it’s a perfect use case for them), but it’s time-consuming for me as I’m juggling many other aspects of the project like new features, core functionality, etc.
If you’re interested in helping with Hologram development, porting these Erlang functions would be the perfect way to contribute! Each function is relatively straightforward to implement, and I’m happy to review pull requests and provide guidance.
dbsimmons64
Thanks so much @bartblast for the detailed explanaition. I’ll take a look at the link you’ve provided to see if I can better understand the process (if so I’d love to help out). Cheers.