Live data from Hacker News

Elixir 1.9

elixir-lang.org

101–110 of 174 posts

Re: Elixir 1.9

#101
post #69

Earlier quoted context omitted.

I gave it a try, but for me after years of programming in C like languages the syntax is really hard. I know it is very similar to Ruby. I wish there was a ElixirC syntax that would also compile to Earlang.

After years of programming with C-like langauges, I actually came to really appreciate the syntax of Erlang . It's actually fairly simple and straightforward. I think the biggest issues people have with it are: * Capitalized variables names * use of comma, semi-colon, and period as clause delimiters It's interesting, but I think that Prolog-style syntax is probably the easiest to read if you don't have syntax highlig…

IMO, the use of header files is a bit baroque and I find it makes it harder to reason about your code. Erlang structs are also no fun at all.

Re: Elixir 1.9

#102

I know nothing about Elixir/erlang besides following installs for apps. I have used it, installed via ASDF on my Raspberry pi since dependencies weren't up to date. Can anyone provide a good place to start on where to get started with Elixir? I tend to learn by working on stuff and not just reading etc, maybe a step by step in elixir? I am going into the literature now as well Thanks in advance for any help!

I'd definitely recommend the official getting-started guide, it's quite well-written and thorough: https://elixir-lang.org/getting-started/introduction.html

Re: Elixir 1.9

#103
post #94
post #52

Earlier quoted context omitted.

Lack of language improvement. Sure, you can do anything with macros, but then when you open some random open source library it may be using different macros (or macros that are named the same way but act differently) than those that you use. Putting something in the language forces everybody to use the same standard. It can be good and it can be bad.

There's a middle-ground stance that's pretty common in the Elixir ecosystem: five or six libraries get written to solve a problem over the course of a year or two, people play around with them, and then a common set of primitives gets factored out of those libraries and made into an interchange library that all those libs support. That interchange library can then be integrated into the Elixir stdlib—that's what happ…

This is one of the awesome things about Plug, in the sense that if your library or what have you targets Plug it'll work reasonably well (if not entirely seamlessly) in a Phoenix app, a Sugar app, a pure-Plug app, a $SomeOtherFramework app, or what have you.

Plug happens to be somewhere in between the two outcomes you've presented, of course; its development happens very closely to that of Elixir (and it's arguably a sub-project thereof), but it ain't a core part of the language itself (last I checked; maybe this has changed in recent years).

Re: Elixir 1.9

#104
post #94

Earlier quoted context omitted.

There's a middle-ground stance that's pretty common in the Elixir ecosystem: five or six libraries get written to solve a problem over the course of a year or two, people play around with them, and then a common set of primitives gets factored out of those libraries and made into an interchange library that all those libs support. That interchange library can then be integrated into the Elixir stdlib—that's what happ…

This is one of the awesome things about Plug, in the sense that if your library or what have you targets Plug it'll work reasonably well (if not entirely seamlessly) in a Phoenix app, a Sugar app, a pure-Plug app, a $SomeOtherFramework app, or what have you. Plug happens to be somewhere in between the two outcomes you've presented, of course; its development happens very closely to that of Elixir (and it's arguably a…

[deleted]

Re: Elixir 1.9

#105

Earlier quoted context omitted.

Looks like a cool site. I'll check it out. My Elixir is Good. My Phoenix is not.

I’m building a side project in Phoenix right now. For me the learning curve is wondering whether Phoenix has a built-in or “everybody does it this way” solution to the problem I’m facing or whether it’s something I should implement myself. In Rails the answer is always “use this popular gem” and in Go the answer is always “roll your own”. Phoenix is somewhere in the middle.

The good thing about Phoenix is you are not forced to go in any particular convention for everything, you can craft them yourselves from scratch. The bright side of this is you will only every little thing in the implementation and you'll know how to optimize it.

Re: Elixir 1.9

#106
post #39

If anyone is on the fence on learning Elixir / Phoenix (Elixir's most popular web framework library) please do yourself a favor and give it a shot. If you're on a time crunch and want the best bang for your buck on "why bother learning yet another language to write web apps in?" then watch this talk called "The Soul of Erlang and Elixir": https://www.youtube.com/watch?v=JvBT4XBdoUE I'm not affiliated with the languag…

One thing I love about Elixir is I had read the Erlang book from Joe Armstrong ages back, and a lot of ideas and concepts still apply. I just didn't get into Phoenix cause PGSQL is a PITA on Windows, so I have to go back and try with MySQL instead.

Screw windows and move to Linux! Opens up a ton of possibilities including docker

Re: Elixir 1.9

#107
post #84
post #39

If anyone is on the fence on learning Elixir / Phoenix (Elixir's most popular web framework library) please do yourself a favor and give it a shot. If you're on a time crunch and want the best bang for your buck on "why bother learning yet another language to write web apps in?" then watch this talk called "The Soul of Erlang and Elixir": https://www.youtube.com/watch?v=JvBT4XBdoUE I'm not affiliated with the languag…

The thing is, nowadays, statically typed languages became so ergonomic, there is really no reason to go with dynamic languages.

Erlang’s Dialyzer (and the related Elixir project Dialyxer) provide compile-time type safety analysis. It’s optional and only at compile time, but immensely helpful in verifying correctness.

Re: Elixir 1.9

#108

Earlier quoted context omitted.

Based on what I've learned from the Elixir forum, these new releases have "no support for hot code updates / appups / relups". This means that Distillery will remain the best choice for many of us, including myself. I have a very simple deploy process with Edeliver and Gitlab CI/CD that basically just consists of pushing or merging a commit to master that passes the tests. There's zero down-time and it doesn't requir…

Wait, what? I wrote an Elixir/Phoenix webapp around 2015 and one of the major selling points was the ability to hot-upgrade code that was inherited from Erlang. What changed?

Nothing changed; hot code reloading is still possible through the mechanisms that have always existed. What's being stated here is that the new Elixir support for "releases" does not include support for this, so you would have to use a separate mechanism to perform the hot code reload.

That "separate mechanism" could be as simple as a plug that tells Mix to recompile and reload. Example (designed for - and part of - the Sugar framework, but should theoretically work for any Plug-based app, including Phoenix-based ones): https://github.com/sugar-framework/plugs/blob/master/lib/sug...

Hot upgrades like this are not foolproof (which is likely the reason why the above example is gated to :dev environments); there are other concerns like database migrations and other internal and external variances that make this inappropriate for most production situations. That said, these same concerns often exist for other high-availability situations as well, so if you know that you want zero-downtime code upgrades, figuring out a way to do it cleanly within the application is likely valuable as a way to avoid the hell on Earth that is trying to do this with, say, a bunch of load-balanced Docker comtainers.

Re: Elixir 1.9

#109

As someone who's new to web dev, is there any incentives in going for Elixir than using those established languages(i.e. Node, Ruby)? Any book/sources recommendations?

I used to work with rails before. While it is fun to build stuff with it, it comes with a set of bothersome headaches:

- too much magic

- slow and painful to scale

- too much metaprogramming

- no compilation, makes it easy to hide syntax errors

- concurrency is absent

- frameworks like rails are too bloated

All these are addressed on the elixir platform, and there are more pros:

- immutability

- mostly purely functional

- well defined modules with good documentation

Re: Elixir 1.9

#110
post #39

If anyone is on the fence on learning Elixir / Phoenix (Elixir's most popular web framework library) please do yourself a favor and give it a shot. If you're on a time crunch and want the best bang for your buck on "why bother learning yet another language to write web apps in?" then watch this talk called "The Soul of Erlang and Elixir": https://www.youtube.com/watch?v=JvBT4XBdoUE I'm not affiliated with the languag…

My preferred way of learning a new language/framework is watching someone walk through creating a real app in that language/framework so I can see all the folders/files I need to touch and the thought process moving step-by-step. Unfortunately I haven't found much in the way of that for Phoenix, the stuff on Udemy is pretty outdated last time I checked. Any recommendations?

https://pragmaticstudio.com/elixir

https://pragmaticstudio.com/courses/unpacked-full-stack-grap...

These have been my go-to that seem to fit what you're describing. I hope this helps.

Post reply on HN