Just popping in here to say that I’m exploring the integration of ClojureScript with Elixir/Phoenix; it’s fun and productive so far!
@orestisI've been planning on learning Elixir / Phoenix for a while, the platform seems quite good and there's probably a lot of good things to steal for the Clojure world. What I'm afraid of losing though is the ability to share code between server and client
I thought about this, but in the end I can’t imagine many places where code sharing is actually a big deal for my use cases. Perhaps some validation rules?
on a side note, https://github.com/clojerl/clojerl is getting more impressive every day
I guess in theory you could call elixir modules from it
Not really; elixir modules are all assuming the basic Erlang/OTP building blocks like processes and message passing. Better to take Clojure code and run on elixir. Which is what clojerl does.
not sure I follow. https://github.com/clojerl/example-web-app/tree/master/src/web_app does exactly that. It must be like from erlang, if you really want you can just use elixir modules from erlang; you could do the same from cljerl
beam is quite nice for interop that way, (usually) it can go both ways
Oh, you meant code sharing between client/server
well that's another story
Ah, ok, i thought someone said using clojerl to run elixir code in Clojure/JVM.
Unfortunately calling Elixir code from Erlang is a bit tricky since Elixir code is macro-heavy. There was a discussion recently in the Elixir forum.
didn't try in a while, but it used to be at least possible
For my the use case though of sharing some subset of Clojure between client and server, clojerl would probably work fine. It seems to combine to Erlang modules.
it might be just as hairy as calling scala from clojure now tho 🙂
yes, clojerl seems to be similar to lfe/elixir that way, you can do anything erlang can do it seems
It’s possible to call functions. Using macros is not though, so you don’t get the nice expressiveness or DSLs that people create.
ah, well that's too bad.
personally I prefer erlang to elixir, at least the language, the ecosystem seems to grow very fast on the elixir side tho
Interesting, do you find good support for things like Transit, EDN, and GraphQL / Om Next in Elixir?
So, Transit and EDN have some Erlang libraries that I haven’t really checked. (Erlang libraries can be natively called from Elixir).
There is an actively maintained and seemingly well-architected GraphQL library called Absinthe: http://absinthe-graphql.org
I’m a beginner in Clojure, and opted to build the server aspect on Elixir/Phoenix to get some productivity boosts.