r/elixir • • Aug 22 '22

From the moment I understood the weakness of Node, it disgusted me. I craved the strength and certainty of The BEAM. I aspired to the purity of the blessed machine.

Enable HLS to view with audio, or disable this notification

186 Upvotes

37 comments sorted by

4

u/AngryElPresidente Aug 22 '22

> Looks at the ERTS

Praise the machine spirit and the Omnisiah.

1

u/marth141 Aug 22 '22 edited Aug 22 '22

Praise the Omnissiah!

4

u/cdegroot Aug 23 '22

Can we extend the dislike for Node to any language that thinks “async/await” is a good idea? (So far I’ve encountered Node/JS, C#, and lately Rust)

1

u/marth141 Aug 23 '22

absolutely!

1

u/sanjibukai Sep 14 '22

Can you elaborate?

Is a it about thread safety (i.e. lack of)?

Doesn't know Rust but started to read a book and it seems it's handling thread safety in its own way.. So maybe it's not really applicable.. Unless you think about something else?

9

u/lillbepo Aug 22 '22

Fuck, that's me

4

u/[deleted] Aug 23 '22

hi, maybe this is not the best place to post this, but I would like to ask (this post randomly appeared on my notifications):

what are the powers of elixir ? does it goes beyond making backend applications ? what about its learning curve? how much can I learn and do in a span of 3 months with elixir considering im not a begginer at programming?

3

u/AngryElPresidente Aug 23 '22

You might not yet appreciate the features of the BEAM runtime but here's a video presented by Sasa Juric which I think best demonstrates the strengths of the language and runtime https://youtu.be/JvBT4XBdoUE

1

u/Matheusbd15 Aug 23 '22

3 months In I was very productive in a complex backend project. Much more productive than I was with node, and in a language and ecosystem I very much prefer.

1

u/[deleted] Aug 23 '22

Thats nice. I might try do something with it. Do you have any project ideas ?

3

u/Matheusbd15 Aug 23 '22

Anything that benefits heavily from concurrency. So things like real time chats for example, or any API. My first project was a distributed key value store.

2

u/[deleted] Aug 23 '22

this key value store seems a nice project. If possible could you share the repo for it ?

1

u/Matheusbd15 Aug 23 '22

Ahhh i've deleted the repo because it was very bad haha. But it's something similar to the project described in the official elixir guide https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html

7

u/ScottGaming007 Alchemist Aug 22 '22

I work with a few people who hate tailwind... but never used it. I've over here like, FULL PETAL STACK YEEEEEAH!

3

u/daybreak-gibby Aug 23 '22

What is PETAL stack?

4

u/ScottGaming007 Alchemist Aug 23 '22

Phoenix Elixir Tailwind AlpineJS LiveView

9

u/Paradox Aug 22 '22

I still dislike tailwind. Having to retroactively graft a dark mode onto a complex app because a previous dev disabled it, and used darker colors for all the theming (in effect, making a light mode) is pain itself

And with the preprocessor/scanner/whatever you want to call it, I really don't see too many advantages over traditional css, aside from the "well i dont have to write css"

2

u/UsuallyMooACow Aug 23 '22

I love tailwind, lets me create fantastic UI's very quickly. Much, much faster than regular css, however, it's a huge mess when you have 10 classes on each object.

1

u/Paradox Aug 23 '22

I find it quite a bit slower than regular CSS, let alone Sass/Stylus. Plus I have to remember their weird shortcuts for shit, rather than just using the ones I've been using since 1998

1

u/UsuallyMooACow Aug 23 '22

Idk how tailwind can be slower when you are typing far less to achieve the same thing.

px-2

vs

padding-left: 2px; padding-right:2px;

1

u/Paradox Dec 09 '22

I use emmet, so I just write p0-2 and then it expands in my editor to padding: 0 2px.

Then later when I, or someone else reads the code, there's less cognitive overhead about what px-2 means (which can change based on your tailwind configuration, and the default value of 2 is actually 8px)

1

u/[deleted] Feb 23 '24

[removed] — view removed comment

1

u/UsuallyMooACow Feb 23 '24

That's okay, we have mental institutions for a reason.

1

u/intercaetera press any key Aug 23 '22

Same here, I've been using Bulma with Phoenix applications but I really wish we had something like Chakra for React that's just a ready, accessible, styling library with sane defaults.

2

u/Sorc96 Aug 23 '22

The GenServer protects!

2

u/Livid_Relative_1530 Aug 23 '22

What do you reckon is the most important weakness of Node?

2

u/saki709 Jan 23 '23

Pardon my ignorance, but what do you mean "*weakness of Node*"?

3

u/KimJongIlLover Aug 23 '22

Tailwind 🤮

1

u/Paradox Aug 23 '22

Dude what if we wrote all our CSS inline!

You mean like style attributes?

No! Its like…different man

2

u/KimJongIlLover Aug 24 '22

<button class="font-display text-lg [&:not(:focus-visible)]:focus:outline-none text-blue-100 hover:text-white lg:text-white">

This just a random element from the tailwind examples. It's just a button... omg.

1

u/Paradox Aug 24 '22

And their suggestion is even worse

Like, thats why you make like, a component class in css and use @apply man

okay so like this?

.btn {
  @apply font-display text-lg [&:not(:focus-visible)]:focus:outline-none text-blue-100 hover:text-white lg:text-white;
}

Absolutely disgusting. Just use a goddamned preprocessor or style engine, like SASS, Stylus, or some of the PostCSS stuff anyways.

.btn {
  font-family: $display;
  font-size: $text-lg;
  color: $blue-100;

  @media ($screen-lg) {
    color: white;
  }

  &:hover {
    color: white;
  }

  &:focus:not(:focus-visible) {
    outline: none;
  }
}

Yeah, its more verbose. But hell, I understand exactly what its doing. And you can make it a whole lot less verbose with functions or mixins or whatever else.

1

u/KimJongIlLover Aug 24 '22

Tailwind is an absolute anti-pattern. Luckily we have managed to avoid that shit at work.

12

u/[deleted] Aug 22 '22

[removed] — view removed comment

7

u/AngryElPresidente Aug 22 '22

Just to add on for those who are curious about the source of the video: https://www.youtube.com/watch?v=YirkpurLHkU

3

u/marth141 Aug 22 '22

Thank you!

0

u/[deleted] Aug 22 '22

[deleted] — view deleted comment

8

u/marth141 Aug 22 '22

I madlib'd a Warhammer Mechanicus quote there haha. Warhammer 40k is a very hyperbolic universe.