[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Ruby Programming

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 22
Thread images: 3

File: RUBY.png (12KB, 600x450px) Image search: [Google]
RUBY.png
12KB, 600x450px
Why do people mainly use it for Rails? I know its a great framework,
but I see no problem with Ruby in general.
>>
>>61822189
Rails is dying, while Ruby seems to holding steady.
>>
>>61822263
Hows it dying? if you dont mind me asking
>>
>>61822282
No jobs vs Ruby
>>
>>61822189
>Why do people mainly use it for Rails?
I don't know, it's the reason Ruby is seen as SJW language instead of a better Python.
>>
File: spoon.jpg (38KB, 541x678px) Image search: [Google]
spoon.jpg
38KB, 541x678px
At my new job I have to maintain several rails apps. The original devs have long since fucked off and nobody who's affiliated with the company knows ruby.
It's a fucking nightmare to understand anything that's going on. Fuck this "easy to use" bullshit. What's easy to write because it doesn't give a flying fuck about syntax is hard to understand years later when you take something that looks like an array, call delete on it because you need to trim some elements and hey, delete is a fucking great name for a function that removes items from arrays, right? Oh also it's the same function that deletes records from the database if you have an activeRecord collection. Which looks and behaves a lot like an array. Good luck finding your backups.

[/rant]
>>
>>61822189
I don't get why mruby isn't used more, now, that it doesn't support Rails (which is good) and was audited (which Lua isn't which burned lots of people when they tried to sandbox their crap).
>>
>>61822613
Are you complaining about objects? I think you have to look at spaghetti with tons of boilerplate from Java and PHP to complain. At least with Rails applications they are mostly all organized the same way.
>>
>>61822189
Good question. I think Ruby is a pretty nice language. Can't stand Rails and its "magic".
>>
So... Ruby and Python are very similar in feature sets. While both are capable of being used for what the other is primarily used for, they are the way they are today because someone looked at one language and thought, "I want to make something out of this!" So a bunch of academics saw Python and decided to make a bunch of math and science libs, while a bunch of webdevs took a look at Ruby and decided to make Rails and a bunch of supporting libraries. The choice between the two languages primarily boils down to what has a better library for what, but there's still a lot of overlap.
>>
>>61824543
also, Ruby has a much bigger standard library, it offers so many things by default and is SO COMFY, literally not comparable to other languages, it's the best scripting language, by far
>>
>>61822282
Of it's myriad of issues the two most infuriating are its inability to scale well and unnecessary levels of "magic" methods. Other frameworks are eating its lunch.
>>
>>61822189
that dependency tree is fucking cancer
also mvc meme can suck my balls, after years i cant even figure out for what exactly i need that model shit.
>>
In its land of origin, Japan, Ruby is not mostly used for Rails, or even for the web!
>>
>>61823091
I was complaining about the complete lack of type definitions or hinting and the retarded nomenclature of their array methods.
>>
>>61822189

People use Rails for a lot of different stuff:

Metasploit
Hombrew
Chef
Puppet

..and of course anything DevOps/SysAdmin related:
>http://rubyforadmins.com/


>>61822282

Don't mind him. It's just a forced meme by Python fanboys.
There are still plenty of Rails companies out there and they are doing well.


>>61822613

So you are blaming Rails for the bad code some guys have left you? That's bullshit. You can write bad code or use the wrong abstractions in any language.

>you take something that looks like an array, call delete on it because you need to trim some elements and hey, delete is a fucking great name for a function that removes items from arrays, right?

Sorry that you fucked up and deleted your backups, but agin, this is not Ruby's fault. But yours.

How about:

a = *(1..100)

# check if it's an Array
puts "It's really an Array!" if a.class == Array


# delete element/s at start
a.shift
a.shift(2)
a = a[4..-1]

# delete last element/s
a.pop
a.pop(3)
a = a[0..-15]


# delete element in between
a = a - [6, 10, 12]
a.delete_if {|i| i > 60}



>>61824543

There are some fundamental differences between Ruby and other scripting languages.

Ruby offen open classes, duck typing and a pretty advanced meta programming modell.

This facilitates the usage of domain specific languages. For example if you programm Rails, you really have to learn all the "Rails verbs" instead of pure Ruby (i.e.
3.days.ago
). Or in Chef you really write "reciepes" about configuration, instead of simple Ruby syntax.

Some consider this overly playful or can't deal with the power level Ruby gives you. Fair enough, don't use it. For me Ruby is still one of the best langauges ever, because it's so powerful and comfy.

But I do agree that I would only use Ruby in small teams with people I trust or alone. Similar like you wouldn't give a Stealth Bomber to everybody with a driving license. That doesn't mean the bomber can't be usefull sometimes.
>>
>>61822691

I guess many people just don't know about it..
>>
>>61822282
It's a meme. Also Rails inspired most modern MVC frameworks out there, so even if it's "dying", learning and using it will be useful for you.
>>
>>61830574
>So you are blaming Rails for the bad code some guys have left you? That's bullshit. You can write bad code or use the wrong abstractions in any language.

I'm blaming ruby for allowing variables to be used without a declared type.
It's not alone in this sin, but it's the one I've most recently encountered.
>>
>>61830574
I'm also blaming rails for naming the delete method for activerecord collections the same as the delete method for arrays. At the very least, something that affects the database should not have the same name as something that manipulates objects in memory.
>>
>slower than PHP7, Node and Python
I admit the syntax is beautiful but Elixir has the same, its way faster.
>>
File: 1394877753610.gif (884KB, 198x257px) Image search: [Google]
1394877753610.gif
884KB, 198x257px
>>61825843
my man
Thread posts: 22
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.