Your thoughts on advancing the Elixir ecosystem

community
speculation
ecosystem

#1

Have split this from the recent Ecto announcement where I think the quote below warrants some thought :smiley:

What/how do you think the Elixir ecosystem could be advanced? :101:


Anyone else excited by this? :003:


Ecto 3.0 is out and stable API
#2

Elixir Devise perhaps? :heart_eyes_cat:

I’m very excited!


#3

Some mistakes should be committed just once. :laughing:


#4

Unless they are idempotent.


#5

I think actually a large part of improving elixir can be done via improving erlang. For example, dialyzer has a lot of information about types that if presented properly to the user would be really beneficial. However, since running it is optional its not always done and new users as well as advanced users get tripped up on it and frequently end up not using it. I believe having elixir ship with the dialyzer plt and utilize as much information as makes sense in a more elixir styled presentation of the same information could bring a lot of improvement to the type system that people have been asking for, for some time.


#6

I absolutely agree that dialyzer needs some love. I for one don’t insist on statically typed Erlang / Elixir because that would deprive us of a lot of goodies. But better warning messages and more intuitive way to work with specs is something that will push both languages into the future.

I am pretty sure it’s hard as hell but in any case, I believe it’s one pain point that needs addressed. Whether it’s in 3 months or 3 years, it was a soft-blocker for me and I had to persist a lot to gain a basic understanding and be able to use specs relatively well. And even now parameterizing the specs is something that makes me scratch my head. I might be stupid though.


Additionally:

  • Standardizing Elixir’s configuration – compile-time, boot-time and run-time – is something that’s sorely needed to improve Elixir’s deployment story.

  • Speaking of which, Elixir’s deployment with Distillery could benefit from less WTH experience – there’s a bunch of stuff to setup if you want to deploy to your own VPS and it’s easy to get it wrong. I am betting $20 that it will take me more than 15 minutes even if we don’t count the time to install everything needed on a VPS / droplet.


#7

Easier debugging?


#8

What is hard in debugging?


#9

Some mistakes should be committed just once. :laughing:

I’d be interested in reading more about “Devise was a mistake” (reasoning, lessons learned, etc.). Is there anything out there on this? I was unable to find anything (my searches just turn up user issues with errors/validations).

Or it simply a case of introducing a lot of complexity into projects with a simple gem install, i.e. going against the goal of simplicity that e.g. Rich Hickey talks about in https://www.youtube.com/watch?v=rI8tNMsozo0 (such as shortly after 22:00)?


#10

I agree and am pretty sure there has been a lot of recent work committed in dialyxir to get to v1 and present the dialyzer type warnings more understandably in Elixir format. Also JakeBecker’s elixir-ls (by default) runs dialyzer automatically in the background as you work presenting these warnings. So I do think this will be getting a lot better soon.

That said unfortunately an automatic inferred typing system looks to be out of reach for now (José’s ElixirConf speech https://youtu.be/suOzNeMJXl0?t=2563) so I’m hoping at this point something like a https://github.com/josefs/Gradualizer approach will eventually advance the state of typing in the ecosystem.


#11

On Elixir proper yes, but there is always the possibility to, for example, do a typed module definition that does the inference using a restricted set of Elixir, I started such an experiment and I’d love to complete it but I just don’t have the time (maybe someone else can get it going? ^.^).


#12

Shameless self promotion, but I’m doing my part. Rendering Phoenix templates 12x faster (usual disclaimers apply: This is probably true for highly dynamic templates; my implementation is not yet complete, etc.)

Bonus: these new templates make it much easier to send diffs over the network for things like Drab, LiveView, etc.


#13

I agree that one of the best ways to improve Elixir is to improve Erlang/OTP. There are many areas of OTP in particular that are unpolished/in need of some love. One area that is still not-as-good-as-it-could-be is the lack of Common Test integration with Elixir. Not that Common Test makes any of this easy to do, of course (it’s not designed very well to play nicely with anything other than Erlang/OTP; for example _SUITE.erl is literally hard-coded in a few places).

In general, I think there are people within the Erlang community who wouldn’t mind moving into the Elixir ecosystem, but have a hard time because they have to give up some of the tooling and frameworks they’re accustomed to using to do their work. Common Test is one of those areas where I don’t feel like we have an equivalent available in Elixir.


#14

I have really enjoyed using ExUnit, can you talk a little about what Common Test offers that ExUnit does not?


#15

That’s true, but don’t forget you can often leverage Elixir macros for dramatic performance improvements (like what I do above).


#16

I’d throw out there additional support for Elixir LS and editor integrations. I recently explored using Elixir/Erlang debugger support and, while the tools are nifty on their own, it would be amazing if it could be integrated into something like Visual Studio Code. If it was turnkey to setup sane defaults for an Elixir plugin for VS Code, Atom, Sublime, etc. I think that would be helpful for a lot of new developers:

  • Dialyzer support
    • Auto-detect and offer to insert type specs?
  • ExUnit integration
  • Better autocompletion and language snippets
  • Debugger integration (I suspect this is both rewarding and very complex)
  • Exposing powerful existing tools like :observer or :debugger (how many newcomers know about those tools out of the box?)

#17

Omnisharp is a great example


#18

Apologies if I’m misunderstanding you, but don’t you already get get Dialyzer support (problems tab, as well as in-editor) + suggested specs in VSCode.

Autocomplete and language snippets are a bit iffy sometimes, but for the most part they seem on par with what I’m used to in other editors. Definitely would love improvements there.


#19

I’m interested! I’ve tried to read up on various systems of type inference but I really struggle to understand the theory. If you have the beginnings of something written in Elixir, I’d be very interested in seeing the code.


#20

I have a few playground projects made, none are ‘complete’ by an stretch but playing with ideas as I get time (I’ve been out of time lately as well) such as TypedElixir and MLElixir among some others.