News for hackers. Stuff that matters.
Re:Elchemy – write type safe Elixir using Elm-like syntax by ilovecaching on Thursday June 21, 2018 @02:27PM (#17367971)
As someone who writes Erlang for a living, I highly recommend rust as a well typed alternative to Erlang, that still keeps all of the things that make Erlang great. I do love Erlang, but working on a large codebase can be frustrating when nothing is speced or commented, and even when it is speced it’s usually part of a gradually typed codebase with very non descriptive types.
Re:Elchemy – write type safe Elixir using Elm-like syntax by RussianCow on Thursday June 21, 2018 @02:49PM (#17368154)
Could you elaborate on why you find Rust to be an alternative to Erlang? For me at least, most of the draw of Erlang has nothing to do with the language, and everything to do with BEAM/OTP and the surrounding architecture, which (as far as I'm aware) Rust does not provide an alternative to in any shape or form.
Re:Elchemy – write type safe Elixir using Elm-like syntax by ilovecaching on Thursday June 21, 2018 @03:23PM (#17368454)
So Rust does not include built in abstractions/frameworks for building distributed systems, but I count that as a good thing. OTP can scale well under certain conditions. But it can also require rewriting supervision, servers, and other core pieces of OTP, which is a huge pain. BIFs can be slow or have wonky behavior, NIFs are dangerous but necessary when Erlang is too slow. When a language gives you prebuilt abstractions it can be a really good thing if they're the abstractions you need, and really bad if your requirements don't line up well, or you're coloring outside the lines in terms of scale or design. It can also be painful to introspect the BEAM to collect metrics and understand message queue pressure on a node. I'm so glad I get to work on Erlang rather than many of the other toolkits that are out there for building big distributed backend systems, but if I was going to start over again it were my choice I would choose Rust and build the right abstractions, the right protocols, and have total control over my system to make tailored performance trade-offs, and do it in a type safe environment, or I would use a third party distributed systems library like bifrost if my project was small. When I said all the things that make Erlang great, I mean pattern matching, FP, a focus on safety and reliability, and a really knowledgeable community. I'm kind of over BEAM/OTP at this point, but that's just my opinion, for the projects I'm working on.
Re:Elchemy – write type safe Elixir using Elm-like syntax by RussianCow on Thursday June 21, 2018 @05:57PM (#17369629)
It sounds like you just don't like BEAM/OTP, then. :) I don't know if I would make a sweeping recommendation for Rust as an alternative to Erlang based on that, though, as I would imagine it would take a TON of work to replicate OTP in Rust.
Re:Elchemy – write type safe Elixir using Elm-like syntax by ilovecaching on Thursday June 21, 2018 @10:38PM (#17370853)
I guess I'm just looking partly for something different. I've been doing Erlang for a few years now, and it's just the devil I know. :) I think Rust could really take off with more support, but I think Erlang will always be niche. I'd rather see people write more Rust.
Re:Elchemy – write type safe Elixir using Elm-like syntax by mledu on Thursday June 21, 2018 @04:38PM (#17369081)
Couldn't you use Erlang/OTP for the main parts of the system and for the performance critical parts that Erlang isn't great for (like crunching numbers) you can use something like Rustler to be build a safer NIF? https://github.com/hansihe/rustler
Re:Elchemy – write type safe Elixir using Elm-like syntax by ilovecaching on Thursday June 21, 2018 @10:42PM (#17370877)
Interesting! I haven't seen this, but it looks really exciting. I may have to bring this up at work!
Re:Elchemy – write type safe Elixir using Elm-like syntax by wende on Thursday June 21, 2018 @02:51PM (#17368171)
Same feeling here. I used to work in Erlang on daily basis - now Elixir. And although I'm not a big fan of its syntax (Erlang looks more readable to me) the tooling and the amount of love from Elixir's community is immense

I've never had a chance to play with Rust yet. I'll definitely give it a shot someday

In my opinion, the best example of how typed languages make it more manageable is Elchemy's codebase itself - which is written in Elm and compile itself. The type system saves us from a huge amount of runtime errors and allows us to sleep at night after a recent release. Most of the time when something goes wrong it's about the parts written in bash or Elixir

Re:Elchemy – write type safe Elixir using Elm-like syntax by eterps on Friday June 22, 2018 @02:51AM (#17371952)
I've never had a chance to play with Rust yet. I'll definitely give it a shot someday

The comparison of Rust with Elm and F# in this article really clicked for me:

https://www.chriskrycho.com/2018/exploring-4-languages-start...

I always thought of Rust as similar to Go, but now I think more of it like an ML descendant with C'ish syntax. There's more to it though, Rust is more low-level than languages in the ML family and can often provide the same abstractions without hight costs in performance.

Re:Elchemy – write type safe Elixir using Elm-like syntax by noncoml on Thursday June 21, 2018 @02:55PM (#17368219)
Can you recommend a good web framework/micro-framework?

I was using actix-web, but last I heard it has to many unnecessary `unsafe`s.[0]

[0] https://www.reddit.com/r/rust/comments/8s7gei/unsafe_rust_in...

Re:Elchemy – write type safe Elixir using Elm-like syntax by towerbabbel on Thursday June 21, 2018 @03:19PM (#17368428)
For a Rust web framework I would recommend rouille.[0] Mature, stable and zero unsafe.

[0] https://github.com/tomaka/rouille

Re:Elchemy – write type safe Elixir using Elm-like syntax by steveklabnik on Thursday June 21, 2018 @05:10PM (#17369326)
The author is responding and taking care of many of them. I’m confident this is a temporary issue, or at least it seems like it’s going correctly to me.
Re:Elchemy – write type safe Elixir using Elm-like syntax by noncoml on Thursday June 21, 2018 @10:12PM (#17370756)
Oh, cool. Good to know
Re:Elchemy – write type safe Elixir using Elm-like syntax by plainOldText on Thursday June 21, 2018 @06:11PM (#17369693)
Rocket is fast and high quality. I’ve gotten impressive latency numbers in my benchmarks. http://rocket.rs/
Re:Elchemy – write type safe Elixir using Elm-like syntax by snappyTertle on Thursday June 21, 2018 @03:00PM (#17368261)
What about OTP?
Re:Elchemy – write type safe Elixir using Elm-like syntax by wende on Thursday June 21, 2018 @03:16PM (#17368405)
It's the first big library that we'll be porting after coming up with a final version of the effects system