News for hackers. Stuff that matters.
Re:A Farewell to FRP by nilkn on Tuesday May 10, 2016 @01:40PM (#11669015)
What I really want is a language with Elm's type system, simplicity, and syntax, but aimed for backend software instead of HTML apps and with strong support for an Erlang-style actor model of multicore, distributed concurrency. Basically something like Elixir, but with Elm's syntax and type safety. In the meantime Elixir will do for me, but I'd really like more type safety without going full Haskell.
Re:A Farewell to FRP by bmichel on Tuesday May 10, 2016 @03:16PM (#11669783)
Did you try dialyzer for Erlang[1] or Elixir[2]?

[1]: http://erlang.org/doc/apps/dialyzer/dialyzer_chapter.html [2]: http://elixir-lang.org/docs/stable/elixir/typespecs.html

Not sure it helps, it's on my todo list.

Re:A Farewell to FRP by bjz_ on Tuesday May 10, 2016 @11:33PM (#11672481)
Despite some niceties like union types, Dialyzer is pretty limited. For example, here is example of something I would expect to be able to express in a modern type system but is not possible with Dialyzer (as far as I know):

    @spec foo[a: SomeProtocol & SomeBehaviour](a, a) :: a
I've also noticed that it lets through stuff that I would expect to fail to compile, so it's hard to trust as I would a type system like Elm's, Haskell's or Rust's. The Elixir devs have done a great job with the language, and it's great to see the resurgence of interest in BEAM as a result, but I still really wish they had taken the opportunity to build in a decent type system...
Re:A Farewell to FRP by jiaweihli on Tuesday May 10, 2016 @04:32PM (#11670426)
Akka[1] is exactly the library you're looking for. It's available for Scala[2], which lets you use both OOP and FP as needed. (It also runs in Java if you have experience with that.)

[1] http://akka.io/ [2] http://www.scala-lang.org/

Re:A Farewell to FRP by curried_haskell on Tuesday May 10, 2016 @08:44PM (#11671859)
But Scala is far from a simple language and Akka makes it even less so.
Re:A Farewell to FRP by jiaweihli on Thursday May 12, 2016 @02:33AM (#11681755)
Scala is more forgiving than Haskell and the parent poster asked for something with Erlang-style actors, which are always going to be complex.

I really think this is the best option out there.

Re:A Farewell to FRP by Paradigma11 on Wednesday May 11, 2016 @05:59AM (#11673938)
You could try f# or c# with http://getakka.net/
Re:A Farewell to FRP by knewter on Tuesday May 10, 2016 @01:46PM (#11669072)
Then you'll probably be very excited to read about http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Pro...
Re:A Farewell to FRP by nilkn on Tuesday May 10, 2016 @02:15PM (#11669293)
Well, BEAM has supervisors, supervision trees, loads of support for fault tolerance, automatic usage of multiple cores, and it easily scales to multiple nodes as well. Simple actor-based concurrency is possible in many languages.

Also, even if Elm were to get all that stuff, it'd still be compiling to JavaScript and aimed at web apps.

(Don't get me wrong, I'm super excited to see Elm getting support for message-passing lightweight processes. I love Elm, have used it myself for several projects, and think this looks great for web development. I just want something like Elm, but specifically geared towards large-scale backend services instead of front-end apps.)

Re:A Farewell to FRP by doppioslash on Tuesday May 10, 2016 @04:48PM (#11670539)
No actually, if you read the announcement you'll find that Elm is keeping platform specific code in the Platform module, to not be locked into being a Javascript-only language forever.

So maybe it would take some time, months, years, but Elm could end up running on the BEAM.

Re:A Farewell to FRP by kika on Tuesday May 10, 2016 @09:53PM (#11672120)
Purescript? I moved over to it from Elm, exactly because I needed to share the code between frontend and backend and realized that I can't really use Elm on the backend without much effort and risk. Purescript is closer to Haskell than Elm though and as such less "beginner friendly". Monads, typeclasses all that scary stuff. But somehow I handle it okay.
Re:A Farewell to FRP by zem on Tuesday May 10, 2016 @07:40PM (#11671565)
pony is worth a look: http://www.ponylang.org/
Re:A Farewell to FRP by el_tone on Tuesday May 10, 2016 @03:24PM (#11669858)
Have you had a look at F#? fsharpforfunandprofit.com
Re:A Farewell to FRP by im_down_w_otp on Tuesday May 10, 2016 @05:50PM (#11670958)
For whatever reason the Elixir community doesn't seem to really strongly point people at dialyzer, but what you want is dialyzer, and yes you can use it with Elixir.
Re:A Farewell to FRP by kreetx on Wednesday May 11, 2016 @01:26PM (#11677253)
Bite the bullet and go full Haskell, it's not that hard, although it seems to appear that way from the outside.