What's your opinion on ruby on rails or ruby in general?

What's your opinion on ruby on rails or ruby in general?

Other urls found in this thread:

benchmarksgame.alioth.debian.org/u64q/ruby.html
twitter.com/NSFWRedditGif

I have it installed but can't think of any uses for it other than a crappy Sup Forums clone

I'm looking to create a crappy Sup Forums clone, but is ruby really the answer?
I just don't want to use PHP, but using something like RoR seems like overkill.

the original idea I had before that was a yotsuba *booru combination, but I wasn't getting much of it done, other than having images set for the OP, comments to those images, and a weird login system that only kept getting more convoluted when I introduced encryption to the passwords

poop from a butt for programmers who believe they can avoid having to think up solutions to their problems

Ruby is dope. Rails is cool as well although it can be a bit of a clusterfuck because there so much going on 'behind-the-scenes'...very much like javascript. You find yourself asking why things work a certain way and NO ONE can tell you and its not in the docs. Rails motto is 'it just werks :^)'

Whihc is partly true. It's very easy to prototype with rails and on top of that its one of the easiest languages to write in, and definitely the easiest to read - and thus, to debug.

>using the smiley with a carat nose

it has become the thing which it stood against

Like Python/Django but less capable

Ruby is amazing, Rails is ambivalent.


Rails is the reason why many people look down on the Rubyists. But Rails is also the reason why Ruby became so popular in the first place - which is a good thing. Rails is very influential, many frameworks were at least inspired by it. On the other hand there are many very cool Ruby frameworks that don't get the attention they deserve because oftentimes people think "Ruby = Rails".

The Ruby community is great and friendly, the Rails community is.. well, there are also nice guys but more unfriendly people than in the Ruby community.

Now to the technical aspects:
Ruby is a langauge that can be used in an "explicit way" - then it looks pretty much like Python. But you can also do a lot of "magical" with stuff like monkey patching, continuations, metaprogramming and creating DSLs..

Well basically you can create "your own language" and build objects which can be manipulated at runtime in many different ways, i.e. add methods/constants at runtime or let them delegate methods to other objects or just ignore exceptions (NEVER rescue the exception class!!).. This is what people often refer to as "Ruby Magic".

Rails is the framework which makes the heaviest use of this magic. Actually Rails is a very huge application (Rails is over 40,000 LOC), but the code is very well hidden. It seems like a tiny framework because when you put Rails to action you have a clear structure..
DRY ("Don't repeat yourself") means you have one (and only one) place where everything belongs. This is usefull especially for beginners that don't have a clear understanding of what parts you need and where to put them.

But some people (especially if they are experienced) find is annyoying that Rails hides a lot of logic from you. You have to learn some words and have no idea what actually happens and why - unless you dig really deep in the Rails code base.
Some people can live with that, others don't..

Seasoned Rails developer here, made a lot of money on it, and created a lot of VERY complex applications with it. I personally enjoy it, and even more now that rails 5 with --api mode and native websockets is released. Also ActiveRecord is a godsend

>The Ruby community is great and friendly, the Rails community is.. well, there are also nice guys but more unfriendly people than in the Ruby community.
You say it like there is a Ruby community outside of Rails. Maybe there are some homosexual transgender parties, but nothing related to coding.

Also, don't use it for simple projects, Rails is really for big, hardcore applications, where you have TONS of models nesting into each other, with many to many relationships, recurring jobs, document generation, hardcore file management, user management, etc.

To give you an example of a project we worked on, is an entire intranet for a chain of restaurants in France, we made their entire stock/supply/employees management using Ruby on Rails.

It's pretty good. But I prefer Scala's Play Framework.

Maybe I even prefer Django, though certainly not because of Python (Ruby is nicer IMO).

Ruby might be fine, but Rails is possibly not the answer.

A bit more Sinatra-like framework and perhaps some JS to do fancier loading of images or whatever might be better. Not that it needs to be *entirely* as minimalist as Sinatra proper...

Last time I checked there was also a Sinatra community and so on.. But Rails people are the majority, I'll give you that.

>Not that it needs to be *entirely* as minimalist as Sinatra

Minimalist? Sinatra is 1476 LOC, there are frameworks like Cuba that have only 152 LOC.


Some words about Ruby:
Frankly it's the geratest langauge I've programmed with so far..


When you start learning it, it looks like the simplest language ever:
a = "World"
print "Hello #{a}"

[1, 2, 3] & [2, 3, 4] - [2] # returns [3]
print "faggot".upcase.reverse # TOGGAF


You also have a lot of super powerfull methods:
a, b = [1,2,3,4,5,6].partition{ |i| i.even? and i < 5} # a = [2, 4]; b = [1, 3, 5, 6]

Array(1..5) * "/" # "1/2/3/4/5"

"nice b%s m%s, I r%s %s/%s" % ("8" * 5).split(//) # "nice b8 m8, I r8 8/8"

But the coolest thing is that you can "imitate" a lot of languages, since you have many different expressions for the same thing..

p %w/Somehow 'Perlish', """readable""" syntax../.grep /Perl/

"abaaba" . split(//) . sort . group_by{|i|i} . map{|k,v| [k,v.length]} # [["a", 4], ["b", 2]], somehow 'haskell like' ?


And these are the BASICS, there's much more in the langauge..

meanwhile it takes 2 fucking years to run that pretty code

Sorry, just realized you can write two of them even shorter.. Wiht Ruby, refactoring is always fun..

a, b = (1..6).partition{|i| i.even? && i

That's always the price you pay for a dynamic language, yes.

But it's often faster than python and it's going to be even faster (the goal of Ruby 3 is to be 3 times as fast as Ruby 2).
>benchmarksgame.alioth.debian.org/u64q/ruby.html


Also you can simply include C or C++ code for "heavy computation":
require 'inline'

class InlineTest
inline do |builder|
builder.include ''
builder.c '
int inline_pow(int a, int n) {
return pow(a, n);
}'
builder.c '
long inline_factorial(int max) {
int i=max, result=1;
while (i >= 2) { result *= i--; }
return result;
}'
builder.c '
int inline_fibonacci(int n) {
int a = 1, b = 1, c, i;
if (n == 0) {
return 0;
}
for (i = 3; i

Magnificient language hindered by an absolutely awful interpreter

Didnt know that, looks nice.
But its probably not gonna be as fast as "real" C or C++, right?

Truffle+Graal is going to really disrupt the performance question.

I've benchmarked encryption libraries in Ruby at similar speeds to using OpenSSL CLI. When you embed C, it's literally loading C.

If you already know Rails, there is no problem with using it for simpe stuff too.

Ruby is orders of magnitude better than any language that you can actually get a job with, but its days are numbered due to dynamic typing. There's nowhere left for it to evolve, and even its creator knows this (he created a new language based on streams or something random).

>tfw you can't just use Haskell or Lisp

>its days are numbered due to dynamic typing
Javascript must be on its way out too then, eh?

I don't know, I'm not that familiar with Javascript. It may be popular, but is it still evolving?

Depends on how you do it..

There are many ways to include C or C++ stuff in ruby, i.e. Inline, Rice, Swig, mkmf (for generating makefiles) or the the foreign function interface (FFI)..

"Inline" might not even be the fastest option, but I like that you can just put pure C code in it.

If you already have C libraries you want to use (in differernt files) other options might be the better option..

it's evolving as fast as a language can when it has the weight of the entire internet on its shoulders.

still not sure what your point is on dynamic typing. 4/5 of the top web languages are dynamic and Javascript especially is definitely evolving and definitely not going away anytime soon.

Well, Ruby is more mature than Javascript. If something stops changing and improving then it leaves the option for something better to take its place. This process is inhibited by momentum, but obviously Ruby has nothing like Javascript's momentum.

Only tried grails, and that alone made me puke. Can only imagine what clusterfucks ruby on rails is

But senpai, Grails is A Java framework that uses "Groovy" not "Ruby"..

Most frameworks have stolen the core ideologies behind what made RoR great. As a result, RoR seems quite outdated.

Ruby is a pretty tidy language, but rails is holding the language together. Without RoR ruby would would join the delphi/ lisp/ ASP garbage pile.Because of this, don't use RoR for anything serious. Ruby Gems are shit compared to composer packages or NPM libraries.

If you're going to use a hipster language, use a modern language with all the bells and whistles like golang or swift.

guys what about Django? next to PHP/Laravel, RoR and Node.js, it's pretty good, right?

But how mature is JRuby?

The problem is that you can't just run Ruby 2 code in JRuby and many Ruby libraries are still missing.

If only a large company would push JRuby to make it 100% compatible with Ruby - that would be great.

>Ruby is orders of magnitude better than any language that you can actually get a job with

This.
Ruby isn't Lisp, but it's as close as you can get without using a real Lisp.

>There's nowhere left for it to evolve

What are you talking about? There's a big fuzz about Ruby 3, it's still uncertain what it will include. Too bad it will probably take two more years..

But it will be interesting to see wether Matsu tries to build an advanced concurrency system or if he just decides that Elixir/Phoenix is already perfect for that job and calls it a day.

Personally I could totally live with that, Ruby doesn't have to clone Elixir. On the other hand a faster Ruby with decent concurrency would be also amazing.


Ruby got much faster with every version, but it's still nowhere as fast as it could be.

You can do tail recursion..

code =

> use a modern language with all the bells and whistles like golang or swift

Golang and Swift are both boring langauges. They have nothing new and look nice because they copy huge parts of Ruby's syntax.

Also which frameworks from Go or Swift could compete against RoR? None.


So if you want to learn something fancy, go with Rust or Elixir which have amazing new concepts.


I haven't used it, but from what I've heard it's the Python version of Rails. Which means if you know one of them you can easily pick up the other because the concepts are similar (Django being a little bit more explicit, Rails being a little bit more "magical").

>But it will be interesting to see wether Matsu tries to build an advanced concurrency system or if he just decides that Elixir/Phoenix is already perfect for that job and calls it a day.

Sure, he could decide to add concurrency. Or optional typing annotations. In either case it will be bolted on and probably suffer a similar fate as Python 3. Except that Python 3 was made to fix all the bolted-on, inconsistent shit that already existed in the language.

Matsu always said it's important to keep backwards compatibility in Ruby. But who knows, maybe he'll do the absolute madman and creates a shiny new Ruby from the scratch?


As for Rails, the good thing is you can just install both versions and have them specify which version in their environment file, which is not a bad way to deal with different versions.

not if rvm gets broken too :^)

i hope she gets run over by the train...

>What's your opinion on ruby on rails
Crap, like all web stuff.
>or ruby in general?
Usable as macro/scripting language for automating task and game events, like every dynamic anything language.

Ruby is one of the best languages around if you use it for the right things, i.e. not performance critical shit.

Rails on the other hand is the cancer killing Ruby, filled with hipster and SJWs, and it's a mess to deal with in general, not composable at all and lives in its own little bubble of cancer.

I hope netbeans reimplements ruby and rails. I'm not crazy about having to use an older plugin for compatibility.

Are you serisous?

There are such nice vim plugins for ruby as well as rails, it would be a shame not to use them..

Anyone know where I can find images of Ruby getting railed?

I was using netbeans with the ruby plugin on windows, I forgot to install ruby on my linux partition. I'll go ahead and look into that

B-But user.. Ruby is a pure programming language!!

You can use gvim for windows with the same plugins, works perfectly fine.

No excusese, user!

(BTW why did you delete your other comment??)

Just type:

rails new xxx
rails g controller rubys_master
rails g view ruby_naked

Not the same user as
but I fugged up. I'm sorry Sup Forums. Please forgive.

that wasn't me

I forgot, I'm in a slump right now and can't think of any projects I can use ruby with

I'm grateful it exists because it BTFO'd the PHPturds. It really showed everyone how the backbone of an application should be structured like.

But today it's just past its prime. Frameworks that learned from rails have surpassed it. Ruby is not as awful as PHP or JS, but we have better alternatives like Python or C#.

kys

I wonder if the Rails devs are picking up on what the rest of the web development frameworks are doing

>Ruby is not as awful as PHP or JS, but we have better alternatives like Python

But you can write python-like in Ruby!
There is more than one way to do it.. ;)

# Python
def test(a, b):
for i in range(a, b):
for j in (a+1, b+1):
print([i,j])

test(1, 3)


# Ruby
def test(a, b)
for i in (a..b)
for j in (a+1..b+1)
print ([i,j])

end; end; end

test(1, 3)

>but we have better alternatives like Python
>[4kHDreadykek]

Django is a deprecated shit.
Python is dead just because it exists.

benoit yourself

anyone programming anything cool in ruby?

meme.