vonH

vonH

What editing tools can I use to understand Elixir better?

I think part of the problem reading and groking Elixir is because I don’t have some kind of IDE Intellisense plugins which can show me the type of objects I am looking, display some help on them and help understand the parameters and syntax better.

Are there some ViM plugins which can help with that, or for any other editors. I think I have to avoid GUI based editors as I will doing a lot of work over terminals.

Marked As Solved

vonH

vonH

I am referring to understanding the code as I read it because coming from an imperative background I find the code rather cryptic. Symbols seem to be popping up all over the place when in imperative language they will be declared and you can see what is going on.

For instance I had some trouble understanding pipes because the function calls didn’t match the signatures until I was told that expression to the left of the pipe is actually its first parameter. I think I am in my first week of getting to grips with Elixir.

Just when I thought it would be safe to go with Vim I am now told Spacemacs is the preferred option (for Elixir). I need to learn some Vim so I would prefer the Vim’s equivalent to Alchemist and evaluate Spacemacs later.

Also Liked

NobbZ

NobbZ

In general emacs with alchemist is capable of showing you documentation and also VS code can.

But this functionallity is very limited, it is only available fur functions and modules that can be resolved unambiguously.

Types of a “thing” (I avoid to say object for a reason!) are even harder. It is a very hard task to infer them from the context. Generating the necessary typeinformation of erlangs base applications takes about 10 minutes on my computer using dialyzer. And even after this information is available, types can get pretty complex, since the way the BEAM deals with them.

DianaOlympos

DianaOlympos

Don’t spend lots of time on editing tool. Just pick the one you feel good with.

About understanding the pipe operator : it is exactly how it is explained in all tutorial. Keep playing a bit with it, there tends to be really little happening in elixir. What probably happens is that you overcomplexify your explanation.

Which is normal, it is how our brain is wired :slight_smile: if it is hard to understand, it should be complex. Keep playing a bit, yoiu will probably get your mind blown a couple time :slight_smile:

Qqwy

Qqwy

TypeCheck Core Team

I would like to add that IEx is a wonderful tool, with its i, h, v and r helpers. When trying out if ideas work, I usually will write out the basic functionality in a module, then load this in an IEx session with some inputs, before deciding if this is indeed the proper way. If so, then I’ll lock it down by writing tests for it.

But especially when using third party libraries, thr ability to find out how any command works by using h is really wonderful.

sync08

sync08

I agree with this for the most part but once you’ve experienced perfect intellisense in full visual studio it’s very hard to go without.

I’m currently using visual studio code with vscode-elixir and it’s ok but still leaves me wanting more. You can hover the cursor over a module or function and usually shows you the documentation but it seems like a 50/50 chance it can actually find the module. The same goes for autocomplete but no docs (though it does list params) even when it works it doesn’t seem to list all functions.

The good thing is that elixir is quite a simple and well organised language. I still have keep a tab open with the elixir docs but always find what I want very easily.

AstonJ

AstonJ

Do you mean understanding Elixir better or your code? If you mean the code try SpaceMacs (as per our set-up guide here) - it is similar to an IDE.

If you mean Elixir itself, we are very lucky to have lots of really well-written books - you really can’t beat books when it comes to learning a language imo :slight_smile:

Where Next?

Popular in Questions Top

yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement