#elixir-lang - 02 April 2019
« Back 1 day Forward 1 day »
[04:50:53] fyber: I get that it's a "constant where its name is its own value" - but I see it sometimes referring to modules?
[05:34:23] Nicd-: terms starting with a capital letter are syntax sugar for atoms that have `Elixir` in front of them like that
[08:27:42] lpil: It doesn't parse Erlang or use an internal Erlang AST so it's not useful outside of Gleam
[08:29:23] lpil: No, I normally run it directly because it's much nicer to not have to wait for the VM to boot (and Rust handles CLI options better)
[08:30:47] lpil: I've also set up rebar3 to run Gleam using hooks though it's nothing a perfect solution. Perhaps a plugin is needed.
[08:31:38] josevalim: one last question: i think we briefly talked about this in the forum, but why don't you think type classes are a good fit?
[08:33:10] lpil: Type classes are very slow and use implicit global scope. I want to be explicit and use namespaces.
[08:35:28] lpil: The other reason is that I want the the Gleam and generated Erlang to be semantically similar, and I think that works better with implicits
[08:36:21] lpil: We could probably avoid most of that work because we don't care about monomorphising as much as they do.
[08:38:04] josevalim: all very good points. i don't think you can do type classes without introducing some work to be done at runtime
[08:38:28] josevalim: lpil: they all make sense because they are very close to the pains on protocols
[08:41:06] josevalim: I would say protocols are actually easy to use from erlang, just a regular function dispatch
[08:43:57] josevalim: i think defimpl just 1. concatenates the names and 2. defines a __impl__(:protocol) callback or something similar
[08:48:06] lpil: I've also got an idea for a classical object system which isn't something I want but I still want to build it because it would be fun :P
[09:50:34] gamache: Is there a good syntax for including a regex as part of another regex? https://elixirforum.com/t/interpolating-regex-expressions/3325/3 has an answer but it is unfortunately dead wrong
[10:20:49] umamaistempo: I was confused because there was a variable somewhere and I thought it was an atom because erlang :P
[13:33:34] edw: At some point I'm going to want to indulge my laziness with autocomplete; is there some Emacs-based analogue to SLIME, CIDER, etc.?
[14:48:36] lytedev: a handful of folks at the KC user group have had success with the elixir language server with emacs/spacemacs: https://elixirforum.com/t/emacs-elixir-setup-configuration-wiki/19196
[16:55:34] impl: josevalim: apology accepted :-) BTW, sometimes i discover really interesting new projects in my inbox so it isn't so bad