Hi everybody, I just wanted to throw my two cents in because I'm working on something similar to Daniel but a little bit different approach.[1]
I feel like Erlang is the the real heart of the Elixir system and I think the sentiments that are expressed in this thread really show that. I feel like there is a lot of flexibility that Elixir get's by having its bootstrapping in Erlang, since features are introduced in Erlang's otp first. It get's really when you are conceptually dealing with code that is making the same code which I've had a bit experience with keeping my code dogfoodable :) You might also introduce bugs that go undetected and then fixing them is a pain since you are using the same code to build everything. This saying it maybe apt: Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? - Brian Kernighan But that doesn't mean that the thought hasn't crossed my mind and maybe an automatic version would be a nice experiment. But the beauty is that Erlang is almost the same as Elixir under the hood, almost :) It's not like Java to Clojure and Scala. An I think it's cool that Erlang and LFE can do interesting things with Elixir. [1] If I've read the source code of LFE correctly then lfe_trans has us two already beat translating Erlang to LFE :) Maybe we should to a vanilla Beam to anything. Maybe with Behaviours. Though the problem I'm facing is mostly that it's just a lot of things to implement :) Regards, Olaf [1] https://github.com/olafura/beam_to_ex_ast https://github.com/olafura/beam_to_ex [2] A cool project would be making automatic binding for Elixir code with nice Erlang syntax. On Tuesday, 24 May 2016 00:38:46 UTC-4, Daniel Azuma wrote: > > José and Robert: That does make a lot of sense. It's probably more > practical for languages like Go where a binary distribution is the norm, > less so for Elixir where building from source is more the norm. > > Eric: Not yet. I'm still trying to fix some issues in erl2ex that I had to > hack around (gruesomely) in order to get it to convert Elixir's source > properly. Maybe in another week or so I'll be able to post reasonable > instructions for how to do it, if anyone wants to tinker with it. > > Thanks for the comments! > Daniel > > > On Monday, May 23, 2016 at 12:52:23 PM UTC-7, Robert Virding wrote: >> >> It would definitely make it more difficult to download the sources and >> build a release. You would need quite a few pre-compiled modules to do >> that. Now all you need is Erlang which you need anyway to run the system. >> >> Robert >> >> On Monday, 23 May 2016 10:34:52 UTC+2, José Valim wrote: >>> >>> A self-hosted compiler is honestly very low priority. The benefits are >>> very small compared to the complications required for bootstrapping the >>> language, which would likely include keeping a list of precompiled modules >>> in the source so we can bootstrap without having Elixir pre-installed. >>> >>> >>> >>> *José Valim* >>> www.plataformatec.com.br >>> Skype: jv.ptec >>> Founder and Director of R&D >>> >>> On Mon, May 23, 2016 at 7:20 AM, Daniel Azuma <[email protected]> wrote: >>> >>>> Hi all, >>>> >>>> I've been working off and on for a few months on an Erlang->Elixir >>>> transpiler (mostly as an exercise for myself to learn Erlang semantics). I >>>> recently had the idea of applying it to the Erlang code in the Elixir >>>> core, >>>> creating a version of the Elixir compiler written completely in Elixir. >>>> Long story short, there are some caveats in the build process and a few >>>> bugs in the transpiler to work around, but today I finally got a proof of >>>> concept working and passing the tests. >>>> >>>> So I was wondering whether the possibility of self-hosting the Elixir >>>> compiler had been discussed before. My initial thoughts were that it's >>>> often interesting to self-host; however, in this case all the core code >>>> would have to remain written in a "bootstrap" style of Elixir without >>>> access to the standard library, which might be awkward. But I was curious >>>> what else might have been discussed and what people's thoughts were. >>>> >>>> Thanks, >>>> Daniel >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "elixir-lang-core" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/elixir-lang-core/76F2675C-E59D-40C1-80F7-D057984781E9%40gmail.com >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/d2e696eb-fb11-4842-bd49-56884114f430%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
