How to get to grips with Elixir tooling/IDEs?

Right now I am finding Plug to be much easier to deal with than Phoenix. I tried phoenix a few months ago, and really couldn’t get it, so ended up just rolling my own in Go with Templ + my own CMS that uses flatfiles back to S3.

Plug with bandit is providing me with some of that feeling at the moment, however I can see what you mean.

The DSL nature of things can feel a little odd to me at the moment. But I will persist as I love the IDEA of the BEAM and the syntax in Elixir is a thing of Beauty.

Oh, also Mix is another HUGE technical thing Elixir brings to the table, duh me :sweat_smile:

Yeah, you are right! I have a book coming soon that seems to be a good foundational source.

That is so interesting about import and the import Kernal!

Ah, yes, I do remember that now from my dablings the + function was a pleasing yet odd way (for me) to think about

Yes. Use is I think a fairly large culprit in my misunderstandings thus far.
Would you say there is a way to get auto completes while using it? Or when using USE it is more important to keep the docs open?

Yes! I think you are right. Elixir (despite the emotional damage it is doing to me (I jest somewhat) seems incredible and I cannot wait for a day where I understand it more.)

I’m the wrong person to ask about auto-complete or even LSP. I use copilot autocomplete but no LSP at this point, though so long as you have it working it should auto-complete stuff coming from uses. Elixir’s macros are purely compile time to everything gets compiled down to something static. Though there are cases, like dynamically called functions at runtime via apply that I’m not sure how would work with LSP.

I had something similar happen to me and understand how you feel. When I started learning mobile development after having learned most of my development doing C as an electrical engineering student.

In this case, Apple’s frameworks are way worse at hiding things because you actually can’t see what they’re doing.

I remember looking all over for where the main function was and could not wrap my head around the fact that I didn’t have access to it, and Apple‘s code would call my code when it needed to.

I hadn’t thought about it in relation to the global name space in Elixir, but it’s so true.

I am really happy to know based on you @BryanJBryce and everyone else’s comments here, that this just seems like it is working as expected and is a different way of thinking.

I am already feeling much more comfortable that a few days ago → I have been dedicating practicing everyday and reading my book “Elixir in Action” that came the other day…

Right now… I feel this way about Elixir

Elixir is a language that can make hard things easy… but make easy things hard (I think a good example is creating a webserver with Bandit → In go → 10 lines of code, in elixir → I need to mix, plug, bandit, then use Plug.Router DSL with “magical” black box properties that I would only ever know exist due to the Hexdocs)

Go is a language that makes easy things easy, and hard things hard (As in the effort required is linear and more rationale)

I am really loving Elixir so far… it is a very different language for me, but I love the idea of it as a system language for distributed computing where communication and monitoring is essential. (I would still use Go any day of the week for API’s, webApps and so on) But elixir is special… something really interesting, with some amazing built in properties.

Starting with Plug to make a minimal server, ala go, is starting in hard mode compared to using the components provided by a full framework like phoenix. It’s great for learning, but will require you to dig deeper into OTP behaviours than is needed to start building applications.

Yeah I’ll add another +1 to this being “hard mode”. I’d wager a guess that 99.9% of devs using Elixir for web development are using Phoenix rather than plug directly. So all your searches and the docs are mostly oriented around that use case.

To help yourself get situated in Elixir I’d also highly recommend going through the official getting started tutorial, it’s a great introduction to the core concepts of the language/platform (including supervision):

I also really like to recommend Exercism but I see you’re already on top of that :tada: (although from my memory Exercism was more about Elixir as a language, rather than OTP as a platform).

And Elixir in Action gives a great overview of Elixir and OTP as well, that was foundational for my learning.

So I’d say that some feeling of disorientation is expected given your newness and goals. But stick with it I think you’re on a good path.

I think that after you’ve gone through the official getting started tutorial and read Elixir in Action, the docs of nearly any library should be pretty accessible to you.

Also hi and welcome! :waving_hand:

I would highly recommend starting a tool like Claude Code, and asking these questions. You’ll get an on-point explanation and can quickly ask follow-up questions. I would also recommend taking some code you wrote in Elixir and tell Claude to “rewrite this using the most idiomatic and concise Elixir code you can write”. It’s surprisingly insightful and you’ll very quickly learn how to write great code (which relates directly to the tooling). There are also some great courses out there to help you understand Phoenix and how to make the tools really fit, like Full-Stack Phoenix Course | The Pragmatic Studio. If you go through this (it will take a few hours), you’ll start feeling much more comfortable!

On top of this suggestion, feel free to ask any, and I mean any Elixir-related question here if you want to talk to an actual person. There are a variety of people carrying a variety of knowledge here who check this site multiple times per day, and many of us are more than happy to answer and discuss topics that have already been answered and discussed to death. Most will even non-judgmentally answer many RTMF-type questions. Don’t get me wrong, we’re human and can be grumpy sometimes, so there’s that, but at least every answer (probably) won’t be prefixed with “Certainly!”

Thank you so much!

Aye, the Exercism is fantastic. And the way that code docs integrates into Hexdocs is truly fantastic. I find the docs way more readable than some go libraries (I am looking at you AWS-SDK-V2)…

Yeah… I am finding this. Phoenix does seem to be in this “default” position.

I do see myself potentially using phoenix at some point, but I would like to try and learn without it for the short to medium term. I am not as interested in creating web apps with elixir, and more server side tools and apis (which I know you can do with phoenix, but I want to understand more about why and how and a lower abstraction layer)

Thank you! Aye, that is another reason I am enjoying the language as a whole, the whole community seems like a true joy, with some really interesting backgrounds and knowledge as a whole.

It is a pleasure to read and learn from.

That is a really interesting suggestion → I will give this a shot for sure! The ai tools are really great as a search engine / education I am finding!

Oh yes. And I’m traumatized for life by the awful “You’re absolutely right!” beginning of most prompt responses. I started visibly cringing.:confused:

In my Claude.md:

Don't EVER say "You're absolutely right!"

I have like 17 of these, problem is that the longer the session, the more likely it is for the LLM to start forgetting such instructions.

But even when it respects them to the letter, I occasionally forget to paste the system instructions at the beginning of a new session.

You’re absolutely right! I do say “you’re absolutely right!” too much!

@mikesax @dimitarvp In case you missed it on HN: [BUG] Claude says "You're absolutely right!" about everything · Issue #3382 · anthropics/claude-code · GitHub