Earlier quoted context omitted.
Yeah I would expect to see it compile to bytecode. It seems pretty wild to transpile to a language to compile to bytecode to run in a vm when there is already bytecode and a vm to execute against. Transpiling is common in js only because there isn't/wasn't a standard like webasm.
Similarly, despite the existence of LLVM and the simplicity of the various assemblies, tons of languages target C, mostly to facilitate easier interop with native libraries and because pretty much everything has a C compiler. Perhaps there were similar reasons to compile to Elixir, but I honestly can't think of any. It might just be for faster compiler development, at least until the featureset of Elchemy begins to s…
Elchemy – write type safe Elixir using Elm-like syntax
11–20 of 57 posts
Re: Elchemy – write type safe Elixir using Elm-like syntax
#12Earlier quoted context omitted.
Similarly, despite the existence of LLVM and the simplicity of the various assemblies, tons of languages target C, mostly to facilitate easier interop with native libraries and because pretty much everything has a C compiler. Perhaps there were similar reasons to compile to Elixir, but I honestly can't think of any. It might just be for faster compiler development, at least until the featureset of Elchemy begins to s…
From the FAQ: Do I need to have Elm installed to compile my .elm files with Elchemy? Elchemy uses Elm to typecheck your program. It is possible to use it without Elm on your machine, while it's not advised. So it seems that it literally transpiles Elm syntax to Elixir, the type safety relies on Elm apparently. Targetting BEAM directly should be possible in the future, to me it looks like an attempt to save a lot of t…
Re: Elchemy – write type safe Elixir using Elm-like syntax
#13Re: Elchemy – write type safe Elixir using Elm-like syntax
#14Other than that, thank you for this, it is super interesting to me as I am a huge fan of both languages, and lack of type safety has always been my only misgiving with Elixir/Erlang. I'll have to take a spin this weekend.
Re: Elchemy – write type safe Elixir using Elm-like syntax
#15Looks like your playground is based off Ellie, which is a great choice. However, it seems that there is an issue with downloading the Elm compiler. I'm getting a network failure from ellie's CDN(NAME_NOT_RESOLVED). Other than that, thank you for this, it is super interesting to me as I am a huge fan of both languages, and lack of type safety has always been my only misgiving with Elixir/Erlang. I'll have to take a sp…
That's true. The idea of how Ellie was brought to life is outstanding. Huge shoutout to Luke Wetsby for letting us use his codebase for Elchemy
Feel free to share your thoughts and concerns on GitHub or by email! We'd love to hear your opinion and concerns
Re: Elchemy – write type safe Elixir using Elm-like syntax
#16As 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
#17As 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.
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
#18As 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.
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
#19As 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
#20As 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.
What about OTP?