PJUllrich

PJUllrich

Author of Building Table Views with Phoenix LiveView

I’m happy to announce RunElixir.com, a free online guide to Elixir. It aims to answer the questions: How can I get started with Elixir?, but also What else is there to learn about Elixir?

I recorded an announcement video with more details here:


TLDW: RunElixir.com is a condensed version of the Elixir docs that aims to give interested developers all they need to get started with Elixir in 30 minutes or so. It is inspired by the Rust by Example online book and the Gleam language tour.

In addition to being a quickstart to Elixir, it will also collect high-level introductions to various Elixir topics to give you an overview of what Elixir has to offer and to explore new topics. For example, you might know about :ets, but do you also know about :persistent_term? Both are useful for keeping state in memory, but you might not hear about them unless somebody tells you about them. That’s what RunElixir tries to do. It will show you what Elixir and Erlang have to offer from a high level.

You can find it at: runelixir.com or on GitHub: GitHub - PJUllrich/run-elixir: Learn Elixir in 30min through Examples · GitHub


I will add more topics in the coming weeks, but your feedback would be much appreciated! What do you think about this idea? Do you have any topics that you think should be in the guide? Any feedback is much appreciated :slightly_smiling_face:

Showing Posts 1 to 10

gflashner

gflashner

Thanks for this @PJUllrich

PJUllrich

PJUllrich OP

Author of Building Table Views with Phoenix LiveView

I added a new chapter today: In-memory State!

I explain how to use Agents, ets, dets, or persistent_term to store state in your Elixir application. I also added Big-O complexities for ets and persistent_term where possible. Check it out!

Nefcairon

Nefcairon

Thanks, that’s neat.

Currently I am going through “Lists and Tuples”. I’m not sure if it’s good to have multiple lines in one livebook block and not be possible to evaluate each line on its own… If someone looks at that on a small device, he has to scroll down, up, down, up,… and associate each result to the correct line. Have you already put some thought into this? (Edit: I see now, that you put the number als label therefore. Maybe it’s better to put a short description there? As “get 2nd element”…)

Also, I would mention the Elixir version very soon. I know Elixir doesn’t change much these days, but someone with little experience with Elixir doesn’t know that. Personally, I wouldn’t use a JavaScript, Go or Rust guide if I didn’t know what version it was written for (maybe it’s out of date), so I would mention the version right in the beginning and also that the guide will be close to correct even if the reader’s version is not too far in the future. (Plus a link where to inform you if anything isn’t working anymore → Github?).

PJUllrich

PJUllrich OP

Author of Building Table Views with Phoenix LiveView

Thanks! Yes, I thought about that A LOT :grinning_face_with_smiling_eyes: unfortunately, that’s the only way I found in which the user can still run the Livebook block and get a response from all function calls. If I create one block per call, the doc becomes too long. I could remove all the IO.inspect calls which I don’t like either and show the response in a comment somehow. That might be better but it’s not great either. If you have a suggestion, please feel free to send a PR :slight_smile:

forestial

forestial

Good work! I am almost a complete newbie at Elixir, so it’s possible my comment is inaccurate but maybe others like me will have a question about this:

Working through the material I reached the Pattern Matching section. Here for (I think) the first time I encountered the “->” operator (is it even an operator? :grimacing: ) . It appears in the fragment

map_empty? = fn
  %{} -> true
  _ -> false
end

I didn’t know what that meant, so perhaps a bit of explanation there would be good.
Thanks

mudasobwa

mudasobwa

Creator of Cure

This is a standard syntax for anonymous function (fn x -> x * 2 end) but here the function has two clauses.

Sidenote: I have no idea where this snippet has been taken from, but the name is extremely misleading, I cannot think of a way to use this function to actually check if the map is empty.

Sidenote 2: there are no operators in Elixir at all.

harrisi

harrisi

It’s from the pattern matching section, and it’s actually part of a note exactly about why it doesn’t work, and gives two options for actually determining if the map is empty.

I know what you mean, but it seems like even the Elixir docs use the term “operator”. Erlang also does.

PJUllrich

PJUllrich OP

Author of Building Table Views with Phoenix LiveView

Than you @forestial for the valuable feedback! I’ve updated that section with a better example and added more information for multiple clauses in anonymous functions to the Pattern Matching section

@mudasobwa aren’t things like +, =, |>, <= etc. called operators? :thinking: For example, the official Elixir docs call |> “the pipe operator”.

mudasobwa

mudasobwa

Creator of Cure

Well, it’s all a matter of wording but technically + and company do not differ from functions syntactically or semantically. Moreover, they are indeed functions.

torstenn

torstenn

Very cool guide/intro. 30 min seems rather optimistic though :slight_smile:

Where Next? Top

Trending in Other Resources Top

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews