Open danielpclark opened 7 years ago
Honestly, neither Elixir nor Erlang really have a place in these contests. These kinds of contest problems aren't computationally difficult enough to be worth the effort involved in introducing parallelism or concurrency to improve performance. They can't be--they have to be "performantly solveable" by single-machine, single-process code written by HSers, because that's what most of the teams will write. Just like Dave mentioning that HSers don't understand the point of git, because they haven't felt the pains it was design to ameliorate, HSers probably won't understand the point of BEAM & OTP, because they haven't been asked to build fault-tolerant phone switching software.
So while I love Elixir, and would love to support it, I recognize it's probably not something our "customers" are interested in. That being said, if somebody else comes up with a way around the difficulties you've mentioned, I'll be happy to consider Elixir then. But I don't think it's worth our time to be investigating it.
I don't program in Elixir but just getting a script to run or compile should be easy… right? Well as it turns out there are limitations with the way we do things that don't agree with Elixir.
For just running an Elixir script we'd use
iex
. But that currently has an issue with having input given too quickly ( see https://github.com/elixir-lang/elixir/issues/3741 ). So if we want to do it that way we'd need to delay input injection to STDIO until it's ready.If we want to compile and then run the executable we have to write a custom project definition script for what they have named escript. After doing that the student team would have to write their code with the same module name as what set up in the script with a
main
method. So in other words we'd need to provide the students with a template starting script. For an excellent how-to on compiling Elixir via escript see this post: http://ieftimov.com/writing-elixir-cli-appsSo this is doable — but some decisions need to be made on the implementation. So this thread is open for discussion.