What languages do you write your back-ends in?

682 views
Skip to first unread message

Mario Sangiorgio

unread,
Sep 10, 2016, 3:41:22 AM9/10/16
to Elm Discuss
Hello,

I was wondering what programming language you use to implement the back-end for your Elm single page web app.

Reading around I see that the Elm/Elixir combo is popular but for how much I think BEAM is an awesome VM I'm a bit sceptical due to Elixir being a dynamic language. How much do you miss the compiler when you write Elixir code?

If you're not using Elixir, to what do you use? I played a bit with F# (using Suave.io) and I think it's quite nice.

Now I'm in the mood of learning something new so I'd like to know what you use and maybe get an idea of what to look at next.

Mario

Jim Freeze

unread,
Sep 10, 2016, 9:25:13 AM9/10/16
to elm-d...@googlegroups.com
Elixir is a compiled language. 

If you need performance your best option to fully utilize your hardware is the BEAM and OTP. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mario Sangiorgio

unread,
Sep 10, 2016, 11:57:53 AM9/10/16
to elm-d...@googlegroups.com

Being compiled doesn't really mean that the compiler helps the programmer. There is the need for a good type system and from what I see here Elixir is a bit lacking on this regards:

Elixir is a dynamically typed language, so all types in Elixir are inferred by the runtime. Nonetheless, Elixir comes with typespecs, which are a notation used for: 

  • declaring custom data types;
  • declaring typed function signatures (specifications). 

The problem is that typespecs are not required nor enforced by the compiler itself but by Dialyzer, a static analysis tool. And they type system itself is less powerful than Elm's.

Joey Eremondi

unread,
Sep 10, 2016, 12:00:14 PM9/10/16
to elm-d...@googlegroups.com

I used Haskell, but it's been a while since I've had a chance to work on an app with a backend...


On Sep 10, 2016 8:57 AM, "Mario Sangiorgio" <mariosa...@gmail.com> wrote:

Being compiled doesn't really mean that the compiler helps the programmer. There is the need for a good type system and from what I see here Elixir is a bit lacking on this regards:

Elixir is a dynamically typed language, so all types in Elixir are inferred by the runtime. Nonetheless, Elixir comes with typespecs, which are a notation used for: 

  • declaring custom data types;
  • declaring typed function signatures (specifications). 

The problem is that typespecs are not required nor enforced by the compiler itself but by Dialyzer, a static analysis tool. And they type system itself is less powerful than Elm's.

On Sat, 10 Sep 2016 14:25 Jim Freeze, <jimf...@gmail.com> wrote:
Elixir is a compiled language. 

If you need performance your best option to fully utilize your hardware is the BEAM and OTP. 

Sent from my iPhone

On Sep 10, 2016, at 2:41 AM, Mario Sangiorgio <mariosa...@gmail.com> wrote:

Hello,

I was wondering what programming language you use to implement the back-end for your Elm single page web app.

Reading around I see that the Elm/Elixir combo is popular but for how much I think BEAM is an awesome VM I'm a bit sceptical due to Elixir being a dynamic language. How much do you miss the compiler when you write Elixir code?

If you're not using Elixir, to what do you use? I played a bit with F# (using Suave.io) and I think it's quite nice.

Now I'm in the mood of learning something new so I'd like to know what you use and maybe get an idea of what to look at next.

Mario

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

Dave Rapin

unread,
Sep 10, 2016, 12:09:30 PM9/10/16
to Elm Discuss
Elixir is compiled to bytecode similar to how a JVM language like Closure or Scala is. So not quite like C but similar to Elm.

Also I assume you're taking about dynamic types which it has unlike Elm's type system. I've heard however that Elixir's safer than your usual dynamic language due to pattern matching.

Depending on your use case I would alsoseriously consider a DBAAS option like Firebase if your not much for devops or simply don't feel like managing infrastructure. Combined with something like AWS lambda or Google's cloud functions for a microsrrvice architecture (only when you need it) it's pretty close to feature parity with a Phoenix type setup with less effort.

Jim Freeze

unread,
Sep 10, 2016, 12:28:12 PM9/10/16
to elm-d...@googlegroups.com
It depends on your goals for the backend.

If you want distributed and fault tolerant systems, Elixir/Erlang is proven in that space for the last 30 years - as they both run on the BEAM. (I'm livin' the dream. I have the BEAM).

There are others that can explain this much better than myself, but the most fault tolerant systems don't come from a family of typed languages. Erlang with it's dynamic typing, pattern matching and OTP has been providing 99.99999% uptime for over 20 years. And, if you understand the trend in hardware CPU's with more cores and lower clock speeds, you certainly want to explore the BEAM as a tool to utilize those cores in an efficient and simple manner.

Jim


--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Dr. Jim Freeze, Ph.D.

Eduardo Cuducos

unread,
Sep 10, 2016, 4:26:28 PM9/10/16
to elm-d...@googlegroups.com
Ciao Mario,

Please, my answer here is very very personal. By no means I'm saying that this is a good solution — and not saying it isn't either.

As I come from a Python background working with Flask and Django I'm using Elm within this stack, compiling Elm on the fly with a package I wrote

And I must add I have been working in tiny and non-profit projects just for fun (like this one, or this other one that might growth bigger these weeks)

But I do recognize that Elixir might be the most common answer to your question : )

Cheers,


--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.

Zachary Kessin

unread,
Sep 10, 2016, 11:48:44 PM9/10/16
to elm-discuss
I use Erlang with Webmachine, with dialyzer you get most of the advantages of types even if it is not quite as powerful as in Elm or Haskell. 

Zach

To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Zach Kessin
Twitter: @zkessin
Skype: zachkessin

John Mayer

unread,
Sep 11, 2016, 12:36:03 PM9/11/16
to elm-d...@googlegroups.com

I'll buck the trend and share that I'm happily using Java 8 as my backend. I use protocol buffers over websockets to communicate.

https://github.com/jmpspace/jmpspace

https://github.com/johnpmayer/elm-protoc


--

Eric G

unread,
Sep 11, 2016, 2:55:40 PM9/11/16
to Elm Discuss
Python at the moment (on Google App Engine), increasingly written in a Elm-y/monadic style ;)
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.

Pavan Rikhi

unread,
Sep 11, 2016, 4:37:10 PM9/11/16
to Elm Discuss

On Saturday, September 10, 2016 at 3:41:22 AM UTC-4, Mario Sangiorgio wrote:
If you're not using Elixir, to what do you use? I played a bit with F# (using Suave.io) and I think it's quite nice.
Now I'm in the mood of learning something new so I'd like to know what you use and maybe get an idea of what to look at next.

I like Django + Django Rest Framework, or Haskell with Servant. Haskell is about 6x faster than Python on my List view that returns ~130kB of JSON containing 164 categories, 1440 products, & 1850 product variants(and way more fun to play with):
https://github.com/Southern-Exposure-Seed-Exchange/Order-Manager-Prototypes#performance

Learning haskell is a long journey though. And Servant is pretty amazing but it might help to figure out haskell web basics with something like Spock or Yesod first.

Kasey Speakman

unread,
Sep 11, 2016, 8:11:59 PM9/11/16
to Elm Discuss
F#

Nathan Schultz

unread,
Sep 12, 2016, 12:16:16 AM9/12/16
to Elm Discuss
+1 to F#. Being a CAML based strongly typed functional language with type inference, it bears more than a passing resemblance to Elm. In fact in patches the two are almost indistinguishable.

However, I do think it depends on your pedigree; developers will tend to reach for what they're familiar with.

James Wilson

unread,
Sep 12, 2016, 3:29:25 AM9/12/16
to Elm Discuss
For personal stuff I'll tend to use Haskell at the moment.

OvermindDL1

unread,
Sep 12, 2016, 11:57:53 AM9/12/16
to Elm Discuss
I'm using Elixir as well currently, and no, its type system kind of sucks, however you can enforce both types and even values within on function calls via matchspecs and 'when' clauses (which are very simple and succinct).

However, Elixir is an immutable functional language and its matchspecs (and dialyzer with typespecs) do make up for a lot of its type issues.

Another however, Elixir is just a normal BEAM language and inter-operates with any other BEAM language, of which there are others:
* Erlang:  The original BEAM language, very prolog'y, untyped too
* lfe:  Lisp-Flavoured Erlang, basically just Lisp, macro's and all, but immutably on the BEAM.
* mlfe:  A brand new BEAM language, basically ML, but on the BEAM, very strongly typed like OCaml is and such.  Due to the way the BEAM operates it is hard to tell what types messages should be but they are still working on it.  I have hope for this.
* And a few minor others like Erlang2 and such

So Elixir for now, but I expect to likely be using mlfe in the future (with Elixir).

BEAM/EVM is just too nice to not use, regardless of the language (I've used Erlang for almost ten years, prolog syntax is... interesting, but understandable).

Elixir just makes the BEAM/EVM significantly nicer to use (python'ish/ruby'ish in its ease of use, but without ruby's warts, or speed hit).

Dave Rapin

unread,
Sep 12, 2016, 12:10:19 PM9/12/16
to elm-d...@googlegroups.com
LFE looks very cool, going to check it out.

--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/9GEKEyzyW_U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss+unsubscribe@googlegroups.com.

OvermindDL1

unread,
Sep 12, 2016, 12:24:21 PM9/12/16
to Elm Discuss
I use LFE for a lot of little here, it is quite nice, and also made by one of the original Erlang devs.  :-)
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.

Rupert Smith

unread,
Sep 12, 2016, 5:46:23 PM9/12/16
to Elm Discuss
On Saturday, September 10, 2016 at 8:41:22 AM UTC+1, Mario Sangiorgio wrote:
I was wondering what programming language you use to implement the back-end for your Elm single page web app.

Java. 

John Orford

unread,
Sep 13, 2016, 9:53:03 AM9/13/16
to elm-d...@googlegroups.com
what libs do you use to that? how idiomatic is it in the end?

Matt Hughes

unread,
Sep 13, 2016, 9:57:42 AM9/13/16
to Elm Discuss
I'm just playing around and don't want to learn another language at the moment, so although I'd like to look at Elixir/Phoenix, or F#, or Haskell, or Scala, I'm using Java via Dropwizard. 


If you already know Java, it's a fairly lightweight (for Java) way to get a backend up and running. 

mch


On Saturday, September 10, 2016 at 1:41:22 AM UTC-6, Mario Sangiorgio wrote:

Rupert Smith

unread,
Sep 14, 2016, 4:37:14 AM9/14/16
to Elm Discuss
On Tuesday, September 13, 2016 at 2:57:42 PM UTC+1, Matt Hughes wrote:
I'm just playing around and don't want to learn another language at the moment, so although I'd like to look at Elixir/Phoenix, or F#, or Haskell, or Scala, I'm using Java via Dropwizard. 


If you already know Java, it's a fairly lightweight (for Java) way to get a backend up and running. 

Yes, DropWizard + Java for me too. I prefer it to SpringBoot because you stick all the building blocks of your application together in code so can see exactly what is going on. Sometimes SpringBoot fails to construct your application and there is so much 'magic' going on its hard to figure out why. 

Zachary Kessin

unread,
Sep 14, 2016, 7:08:00 AM9/14/16
to elm-discuss
If you want something way out there on the beam there is also "erlog" which is a prolog that runs in an erlang process. It is by Robert Virding who also wrote lfe and erllua as well as was one of the creators of erlang

If we ever want to do an elm -> beam compiler I would say we would want him on the project

Zach

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

OvermindDL1

unread,
Sep 14, 2016, 10:03:18 AM9/14/16
to Elm Discuss
There is an mlfe (ML on the BEAM) project too, could much more easily have elm build to that as a more easily done intermediate step?
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Zachary Kessin

unread,
Sep 18, 2016, 4:50:50 AM9/18/16
to elm-discuss
I don't know much about the MLFE project, beyond that it exists

Zach

To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages