Live data from Hacker News

Elchemy – write type safe Elixir using Elm-like syntax

wende.github.io

1–10 of 57 posts

Re: Elchemy – write type safe Elixir using Elm-like syntax

#6
post #3

Why would this target Elixir instead of Erlang or BEAM byte code directly? Putting a language on top of a language on top of a language does not seem that smart to me.

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.

Re: Elchemy – write type safe Elixir using Elm-like syntax

#7
post #2

Looks like it's targeted more towards the Elm crowd with npm install instructions than the Elixir crowd with no hex/mix install method.

Elchemy creator here. Quite the opposite to be honest. I come from Elixir background. It's just that npm is much more reliable when it comes to global system-wide installations

Re: Elchemy – write type safe Elixir using Elm-like syntax

#8
post #3

Why would this target Elixir instead of Erlang or BEAM byte code directly? Putting a language on top of a language on top of a language does not seem that smart to me.

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 significantly diverge from that of Elixir.

Re: Elchemy – write type safe Elixir using Elm-like syntax

#9

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…

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 time to make Elm suitable on the server side.

Re: Elchemy – write type safe Elixir using Elm-like syntax

#10

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…

I mean if their goal is to get Elixir developers interested then I think that it satisfies.
Post reply on HN