kanishka

kanishka

Brainstorming ways to share code between elm and elixir

I have been brainstorming ways to share code between elm and elixir, might use it at work. Think some simple calculations like calculating price based on float input and some constants. Some options:

  • Rust, wasm, rustler
  • Gleam
  • Elixir / Erlang compile to js (haven’t found an active project)
  • Implement small DSL that serializes to json and interpret in each language
  • Use python (an existing language used in our stack elsewhere), ffi to python from elixir; brython or other python to js compiler
  • Don’t use shared language, just use a data driven test set in both languages to guarantee equivalent functionality

Other ideas? Most viable?

I am guessing rust is most viable.

Most Liked

hst337

hst337

Why do you want to share code? Share data! Use livejson!

D4no0

D4no0

I mean why you would use a native interface if elm is used for frontend anyway, once you go over the network there is no reason to use anything beside https.

marcin

marcin

I am trying an approach to use Gleam compiled to JS for FE and re-use it in a Phoenix app on the backend.
see: Regretting/Questioning my current stack Flutter + Elixir as solo dev for mobile app - #21 by marcin

Last Post!

kanishka

kanishka

We ended up duplicating the code between elixir and elm and generating an elm test suite based on the elixir test suite to get assurance about equivalence. Will pursue phoenix channel next time

Where Next?

Popular in Discussions Top

joeerl
I’m playing with Elixir - It’s fun. I think @rvirding does give Elixir courses these days. Re: files and database - when I given Erlang ...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40042 209
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New
fireproofsocks
I’ve been working on an Elixir project that has required a lot of scripting. I usually reach for Elixir because I like it more (and in th...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement