rvirding

rvirding

Creator of Erlang

Elixir language reference

Where can I find a proper Elixir language reference manual? Need it for courses. The web site is very much a tutorial, as are the books.

First 10 of 56 Posts! Switch mode

minhajuddin

minhajuddin

These seem to have all the reference documentation:

http://elixir-lang.org/docs/stable/elixir/Kernel.html

NobbZ

NobbZ

From any page of the elixir documentation you can access the Pages section of the documentation, it has 5 or 6 subsections, which one can use as ref-man, also some modules do hide some ref-man style knowledge.

What is not available (but you probably ask for) is a refman as you are used to from erlang, which you could use as a formal spec as well.

rvirding

rvirding

Creator of Erlang

Yes, but these document the libraries but not really the language itself, either syntax or semantics.

rvirding

rvirding

Creator of Erlang

Yes, exactly. While the erlang documentation has its faults, it is very good as a reference manual, both for syntax and semantics. And not just the language but the OTP system and libraries as well.

gpb

gpb

From the IEx shell, it is possible to obtain a concise list of spec and type info per module, via the commands ‘t’ and ‘s’:

t Enum
@type t() :: Enumerable.t()
@type element() :: any()
@type index() :: non_neg_integer()
@type default() :: any()

s Stream
@spec chunk(Enumerable.t(), pos_integer(), pos_integer(), Enumerable.t() | nil) :: Enumerable.t()
@spec drop(Enumerable.t(), non_neg_integer()) :: Enumerable.t()
@spec flat_map(Enumerable.t(), (element() -> Enumerable.t())) :: Enumerable.t()
@spec map(Enumerable.t(), (element() -> any())) :: Enumerable.t()

---- although I am not sure if this is what you are asking for.

kelvinst

kelvinst

I guess @rvirding’s point is about syntax and semantics. There is no reference guide for it at all, just some tutorial guides.

alon

alon

I was wondering the same thing, for similar reasons that @rvirding mentioned.

When I began programming some years ago, I would use books, tutorials and fragments of information that often were either too verbose or not sufficiently to-the-point (when not flat-out misleading), when I wanted to gain some in-depth understand a specific point in the language.

Ever since I learned formal language and compiler design a couple of years ago, I tend to first search the formal spec of a language when I want to understand how a certain feature of the language works, as it is both fairly complete and fairly concise.

I am fairly new to Elixir, and having such reference could speed up my learning and understanding of specific features.

I also consider suggesting the professor who teaches distributed programming at my local university (currently taught with Erlang) to try using Elixir as an experiment for a semester. I heard that a lot of the students are struggling with the Erlang syntax and am hoping that by using Elixir they can spend more time studying the principles of distributed programming, since I, too, find its syntax and behavior much easier to understand.

rvirding

rvirding

Creator of Erlang

Sort of, it’s a start anyway. Though I personally don’t like reading it in the shell; same with module and function documentation. At least not long long long descriptions.

josevalim

josevalim

Creator of Elixir

@rvirding can you be more precise on what you want? I will be glad to write the missing pieces. If you have examples of other languages, that would help.

About syntax, there is no reference, and I could write one up.

About the language semantics, most of it is defined in Kernel.SpecialForms. As you know, the parser doesn’t know about def, case, receive, defmodule and friends. So the documentation for those will be in Kernel.SpecialForms and Kernel.

gpb

gpb

For learning purposes, awhile ago I tried to organize all the standard library modules and their functions into a spreadsheet. It is messy, but if it helps, it is up on Github:

https://github.com/gbih/elixir-functions

At the time, I thought it would be fantastic if there were a single command in Elixir that would automatically generate such a list and pull in user-contributed examples. Perhaps a nice side-project someday.

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement