Rails is not written in Ruby

I do feel it’s important to make programming accessible tho… and Ruby and Rails have always been great at that :smiley: There are payoffs of course, but there will always be swings and roundabouts…

1 Like

Accessible is good, but it’s important not to confuse that with good practices, as they are often quite mutually exclusive sad is that is… :-/

2 Likes

Sadly, it’s extremely often that “accessible language / framework” is SEVERELY at odds with “write long-term maintainable software”.

It’s a Faustian deal. :slightly_frowning_face:

2 Likes

Yeah I think that’s the trade off. I often think how much I enjoy writing new apps or features in Rails… and how much of a pain it can be when maintaining or expanding something.

This is why the side of static typing that interests me is what @lpil said on the Erlang Forums:

I believe that types static analysis is a development tool, and its purpose is to lower the cost of maintenance.

3 Likes

I think Elm has done a great job with this for the frontend and Elixir’s Phoenix a good job on the backend (though in a different way). I’m hoping that with Gleam we’ll be able to build a backend web framework with the strengths of both.

Will be some time in the future though I wager!

3 Likes

I don’t disagree, there’s tech out there that manages to do it better. I can hardly call Phoenix accessible however. :smiley: Maybe for you and me but people trip up on a lot of things in Phoenix all the time (judging by ElixirForum). Although I’d write that off in the “didn’t bother to learn Elixir first” category.

2 Likes

People can’t blame Phoenix for that :upside_down_face:

I made the same mistake with Rails - dove straight into it without learning Ruby and then found I was asking really dumb questions in their IRC channel. After a couple of days of doing that Ryan Bigg said “Hey Aston, if you read this book I promise you’ll be able to do everything you’ve been asking… and more!”. He was right :003: He also hand-held me send my first PR to an OS project - he’s such a cool guy! (No surprise he is one of my dev heroes!)

Sounds really cool! I hope you’ll consider project structure to be more component based (so rather than the typical MVC folder structure, folders will be dictated by components - this just makes it easier to work on specific things imo and I wish Phoenix had an option for this to be set on project creation).

3 Likes

Yeah obviously, I am just a bit salty that people are coming entitled to forums and getting angry that the forum dwellers aren’t there to immediately do their work for free. :003:

It’s quite logical that taking the requisite time to learn pays huge dividends!

2 Likes

Generally I find that people have at least read the tutorial on the Elixir Lang site (and thanks to things like our discounts and giveaways I am pretty sure we see a larger than average number of people picking up books too) :smiley:

If you see anyone getting angry please report their posts.

1 Like

Actually not recently, no, but any example just gets imprinted in my memory, sadly.

But I don’t like how there’s periodically a wave of very low-effort posts… :frowning:

2 Likes

I think the vast majority tries to learn a language through the go to framework of their favorite language.

But it’s a very bad habit since frameworks are “usually” opinionated and they tend to bend the language to their will.

The ActiveSupport rant is legit, and we ended up with Ruby devs which “can’t” write Ruby.

Maybe it’s because of hype or promotion on some kind of courses/books. I do not go on ElixirForum this much lately.

Take a look at Commanded, it’s a CQRS/ES library, we got separation based on domain, and you can be very granular if you want to.

Maybe Phoenix is much more accessible than Rails in the sense that it’s explicit. We know that a controller is a controller because of the controller macro, etc. In Rails, it’s not the case at all.

I agree! It’s quite sad though to see, at least here in France, that Elm is not getting any traction.
Despite the bold statement made by Elm, this video explains probably why.

2 Likes

Hopefully, the author changed the article’s name. Yes, Rails is Ruby. A Ruby with a superset of capabilities. This feature is at the heart of Ruby itself.

I’m ok with this, even after a fight on a general library we developed originally outside of Rails, but have a subtle change when used inside Rails. This caused a break on our promise but we found how to deal with (related to JSON processing).

There is room to learn. Ruby can’t be compared with other technologies. We have to make effort to understand its shape and use its strength.

This is also the reason I always call a Ruby on Rails developer a Ruby on Rails developer, and never a Ruby developer until a real project was achieved outside of Rails.

2 Likes

Yep, he changed it to Rails and its Ruby dialect

1 Like

I always called myself a Rails user because Rails always felt like a really really good CMS… because it is just so easy to use :lol: but also because knowing the guts of Rails at an intimate level (and what I would call a Rails developer) isn’t really necessary in order to use it (which is both a blessing and a curse of course).

I think this led to frameworks like Phoenix not wanting to use so much magic (and something that made them appealing to many people).

2 Likes

Copy pasting my comment from the blog:

I wonder how rails would look if it used refinements.

I also would love to see something on ruby like module exports from python/javascript

My biggest pain points with rails are:

  1. the thousands of monkey patches, that could maybe be dealt with refinements
  2. the autoloader, that as far I know dont have a good language level mechanism

I think if we had a module system similar to what we have on JS/python things could be much better.

2 Likes

Wait… it doesn’t?!

1 Like

Nope.
requireing a file affects global namespace, so if any one of your classes require some gem all subsequent scopes can access that gem.

Very crappy example but I think it shows my point. We also cant require specific functions.

EDIT: There was some discussion about this on the bug tracker but I dont think anything came from it https://bugs.ruby-lang.org/issues/14982

2 Likes

o.O

That’s… a very odd design decision… What was the reasoning behind THAT choice of all things?!?

4 Likes

Yeah, I also have no idea why.
My first thought was that because ruby was designed as kind of a perl replacement, but I just googled it and it looks like perl has proper imports/exports

3 Likes

Yeah perl’s module system is both ancient and advanced, they definitely didn’t copy that, lol.

2 Likes