
The BEAM needs an APL-y language (2018) - lelf
https://medium.com/@gordonguthrie/the-beam-needs-an-apl-y-language-6c5c998ba6d
======
grantjpowell

      Well this is mine — the BEAM, which already has Prolog-y 
      (Erlang), Algol-y (Elixir) and Lisp-y (LFE)
    

As a full time Elixir Dev, I actually consider Elixir to be a lisp (albeit,
pretending it's not one).

Elixir code is 100% expressible as Elixir data types (see quote/unquote [0]),
and it supports hygienic macros in the same way lisp does [1][2][3]. Elixir
steals other stuff straight out of lisp like protocols [4], the "loop" macro
(Erlang has a form of this, but not as full featured)[5].

This is on top of the stuff that Erlang already took from lisp such as linked
lists and symbols [6].

[0] [https://elixir-lang.org/getting-started/meta/quote-and-
unquo...](https://elixir-lang.org/getting-started/meta/quote-and-unquote.html)

[1] [https://elixir-lang.org/getting-started/meta/macros.html](https://elixir-
lang.org/getting-started/meta/macros.html)

[2]
[https://hexdocs.pm/elixir/Macro.html](https://hexdocs.pm/elixir/Macro.html)

[3]
[https://hexdocs.pm/elixir/Code.html#eval_quoted/3](https://hexdocs.pm/elixir/Code.html#eval_quoted/3)

[4] [https://elixir-lang.org/getting-started/protocols.html](https://elixir-
lang.org/getting-started/protocols.html)

[5] [https://elixir-lang.org/getting-
started/comprehensions.html](https://elixir-lang.org/getting-
started/comprehensions.html)

[6] [https://elixir-lang.org/getting-started/basic-types.html](https://elixir-
lang.org/getting-started/basic-types.html)

~~~
dnautics
it is of course entirely possible to program for years in Elixir without
realizing it's a lisp; Despite having cut my teeth at the ripe age of 9 on
scheme, I only realized Elixir "was a lisp" when I got into more advanced
macro-writing, and noticed that macro writing is very similar to Julia (which
actually has a lisp sitting in its core).

In any case, it definitely has algol syntax.

~~~
pjmlp
Dylan is another example of a Lisp with Algol syntax.

------
dang
Discussed at the time:
[https://news.ycombinator.com/item?id=16799551](https://news.ycombinator.com/item?id=16799551)

------
theamk
I think those kinds of articles are really unfair.

Yes, Erlaing is 500 line for code -- but this includes text parsed and I/O,
main loop, nice descriptive names, good test suite. The "shorter" APL version
has none of this, it is just the main function.

Rewrite APL version to add I/O, text parsing and unit tests; rewrite erlang
version to get rid of all the descriptive names and extra whitespace -- and
then you can have a fair comparison.

~~~
remexre
How possible would it be to use APL as a DSL, or to include one file of it in
a larger Erlang/Elixir project?

------
exclipy
For anyone else wondering, I think this is the BEAM it's referring to:
[https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)](https://en.wikipedia.org/wiki/BEAM_\(Erlang_virtual_machine\))

