[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Convince me NOT to learn and use Ruby. And.... Go!
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 125
Thread images: 8
File: ruby.png (56 KB, 446x512) Image search: [Google]
ruby.png
56 KB, 446x512
Convince me NOT to learn and use Ruby.

And.... Go!
>>
File: captcha.jpg (4 KB, 300x57) Image search: [Google]
captcha.jpg
4 KB, 300x57
>>54235612
it's shit
>>
It would be good if youd did something instead of shitting in your pants so go for it
>>
>>54235631
In what way?

It's one of the greatest languages ever created.
>>
There is no reason not to use it
>>
It's not really used by big corps.
I started as a ruby dev and only found shit startups that would never pay me in time.
>>
desu you can make a lot as a ruby consultant broheim. I know guys with 5-10 years xp that make 150-200k
>>
>>54235612
The best way would be to learn it and then discover your own reasons for not using it.

Definitely don't use *rails* for new projects now that better systems are available, but ruby as a language is still great for scripts and text processing. It's basically what perl should have been.
>>
>>54236250
What if I don't want a job and only want to use it for practicality?

>>54236581
This tbqh.

>oh I want to download all the images from a page
>Oh I can literally just use the "image_downloader" gem and use the function to find all image files on a page
>>
It's the best language desu.

Use it. Love it
>>
>>54235612
Its a really fun language, and learning it will make you smarter.

Some downsides I didn't see people mention: if you or the people you work with are undisciplined, codebases can quickly become nigh impossible to maintain. Ruby will happily let you do some really stupid shit.

It's also shit for reasonably large distributed systems.

If neither of those bother you, I say go for it.
>>
>>54236581
this.
>>
>>54237522
Sweet. Any good resources you could recommend to have a read through to understand best practices?
>>
Don't learn both Ruby and Go. Just Go will suffice
>>
>>54237766
My first stop when learning a new language is always a style guide. Gives a nice overview of the syntax and a quick reference for what to do and not to do in the language. Just Google Ruby style guide and that should get you it.

Other than that, I think I did a couple basic tutorials and then started building shit in it. Conference talks are also a good reference for mid to higher level concepts.
>>
>>54237924
Thanks SENPAI.

Ruby looks neato. I'm coming from C++ so it's definitely a little different but looks much nicer
>>
>>54235612
Hipster bullshit
>>
>>54238328
Explain.
>>
>>54236581

What better systems are you speaking of?
>>
>>54235612
Ruby is pretty cool but the amount of syntactic sugar it has can lend itself to horrible looking code. That, and it kind of rewards solutions that are complex and are hard to grasp but short in character count.
>>
Ruby is the best
>>
It'll force you to learn proper OOP, so I'd say it's definitely worth learning.

Most people never bother learning OOP well, so it'll definitely give you a competitive edge.
>>
>>54235612
harmful.cat-v.org/software/ruby/rails/is-a-ghetto
>>
>>54238852
According to that autist fucking everything is "harmful"

Also IDC about rails
>>
>>54237924
Using a style guide as an overview is definitely great advice, and while I think most ruby style conventions are great, it still drives me nuts how every ruby style guide says not to use numbered capture groups in regular expressions.

Under the assumption that the "important" part of some text processing is the regular expression rather than the surrounding code, I say it's *always* better to optimize the regular expression for readability rather than the other stuff, and a shorter regular expression that uses ([a-z]+) instead of (?<whatever>[a-z]+) is much faster to parse and read. Just assign the capture group to a different variable immediately after the match to be safe. Also, if the regular expression is too complicated to keep track of using numbered groups, then adding names to the groups isn't going to magically make it more readable.
>>
>>54238378
Truly the spiritual successor to perl. However, unlike perl, you at least *can* have clean-looking ruby code.
>>
>>54238878
If you don't care about rails, then you'll probably enjoy ruby more rather than less, desu
>>
>>54238852
Wow that guy is autistic as fuck.
>fite me guys, i'll literally pay for you to travel over here so i can punch you
>wow, i can't believe peopel don't respect me on irc
>omg, these "pricks, morons, assholes, and arrogant fucks who didn’t care about the art or the craft" (direct quote, btw) are hampering my artistic style
>ruby ruined my career, definitely not the fact that i'm an egocentric autist
>go ahead, complain on your blog. sticks and stones, lol!
>>
>>54240176
Dude he literally hates everything lmao
>>
>>54235612
Rails a shit

http://azac.pl/cobol-on-wheelchair/
>>
>>54238366
This http://hanamirb.org/ probably, but I'm not >>54236581
>>
>>54238852
>cat-v
opinion discarded
>>
File: Zed_Shaw_in_Montreal_in_2008[1].jpg (175 KB, 389x720) Image search: [Google]
Zed_Shaw_in_Montreal_in_2008[1].jpg
175 KB, 389x720
>>54238878
>>54240176
>>54240207

What else could you expect from a guy that looks like this?
>>
mruby still dead, rubinius is a joke. rpgmaker now using javascript instead of ruby.
>>
are there any reasons to use ruby over perl? I think not.
>>
>>54241460
perl 6
>>
>>54241480
perl 6 is still irrelevant. everybody uses perl 5
>>
>>54241460
You get to use a well-designed language that does all the same things but is relevant outside of "muh UNIX" culture
>>
>>54241547
well, I just answered your question
> are there any reasons to use ruby over perl?
why, because after all the year perl 6 is still a meme. Just like python 3.

meanwhile ruby is growing just fine, we may have JIT + type annotations in ruby 3 and more.
>>
>>54241610
Perl 6 changed the one thing that managed to break out of the shitty language and become a lasting legacy: PCRE

Now it should be P5CRE...
>>
>>54241597
just because your hipster startup doesn't use perl doesn't mean it's irrelevant today

>>54241610
you do know that perl 5 is still being actively developed, right?
>>
>>54235612
slow as shit
hipster garbage
>>
File: iseeyou_meme.jpg (356 KB, 709x588) Image search: [Google]
iseeyou_meme.jpg
356 KB, 709x588
>>54238328
This
>>
>>54241675
>you do know that perl 5 is still being actively developed, right?
yeah python 2.7 is too (they claim "we just maintain it, no update" though)
>>
>>54241675
Sorry, but the fact legacy applications and design-by-committee UNIX install scripts use perl doesn't mean it's still relevant. One could say the same thing about visual basic, but that doesn't mean that it's relevant or that people should be encouraged to use it.
>>
it's made of lo-o-o-o-ve
>>
File: ruby.png (305 KB, 1432x652) Image search: [Google]
ruby.png
305 KB, 1432x652
done
>>
>>54241992
Reminder that nobody (even in this thread) is disagreeing that rails is cancer.

Ruby as a language is not the same as rails, though, and has plenty of redeeming factors if you use it, as said earlier, for scripting, text processing or one-off web scrapers.
>>
>>54242112
Agreed. I use it for managing my Windows (through unison) backups and doing basic stuff with the rb-inotify library on Linux. It's a very easy little-hassle language when you just want stuff to work
>>
Convince me NOT to learn and use Rails.

And.... Go!
>>
>>54242269
https://twitter.com/dhh/status/695272044024487936
>>
>>54242269
Your time is better spent learning Go if you want to write web servers. Or learn to use node so you can do server shit while improving your JS skills. If you really want to use ruby web frameworks go for something lightweight to begin with like >>54240353.

If you don't know ruby already and want to do web stuff, then you're better off starting with a different language. If, however, you already know ruby and want to learn rails to get a job at a hipster startup, then knock yourself out.
>>
>>54242269
Just imagine how much money github could start saving in power usage and hardware if they switch from ruby to a language that's actually efficient.
>>
>>54235612

Ruby is arguably the most beautiful language you'll ever see.

# creates array from 1 to 100 and return the second last number of that array (= 99)
Array(1..100)[-2]

#sum of an array, but leave out 11
[1,3,5,7,11,13].inject { |a,b| a += (b == 11 ? 0 : b) }

# print out all of the files in a directory
Dir.glob('./my_cool_directory/*').each do |file|
puts file
end
>>
>>54237522
>will happily let you do some really stupid shit.
and is kind enough that hides the errors from you, so you don't feel bad about the code or your self.
>>
>>54242710

Not unless you do something really stupid like "rescue Exception"..
>>
>>54242710
so sweet
>>
>>54240663
This Guy's Twitter is a fucking riot.

Bernie supporting legitimate autist who isn't smart or interesting enough to pull it off.
>>
>Matz is nice and so we are nice

baww :^)
>>
>>54242549
okay that looks neat. does it still look smexy sending http requests or interacting with a database?
>>
>>54235612
>>54235612
learn php. everyone uses that shit, so more frameworks to work with. But basicly learn what's best for what situation.
>>
>>54242920
Net::HTTP.get('example.com', '/index.html')

User.where(name: 'David', occupation: 'Code Artist').order(created_at: :desc)
>>
>>54243023
How would you let's say download all images from a webpage?

I tried using the image_downloader Gem but it doesn't work even with default documentation example code.
>>
It depends why you want to learn. Everyone should know a scripting language, just for convenience
>perl is shit
>choose python or ruby
I like ruby more, honestly.
>>
>>54243023
no fucking way is it that simple!
>>
>>54242920
for interacting with database search for the sequel gem. Way better than that activerecord crap
>>
>>54243052
use nokogiri to fetch all those <a> tags, then using whatever http client you like?
>>
Makes it pretty easy to create website applications or SAAS
>>
>>54243147
More like, use open-uri to get a page's content, then use a regular expression to find src attributes ending with png, jpg or gif, amirite :^)
>>
ruby is dead
ruby is a shit language
ruby creator is a moron

seriously there are many reasons not to learn this language, but who am i to stop idiots from doing idiot things
>>
>>54236250
>only found shit startups that would never pay me in time
Go work for Github. They use it everywhere.

>inb4 sjwhub
Vocal minority. Don't pay the sjws any attention.
>>
>>54241675
>Clinging on to Perl

Shhh, no tears now, only &_*^%$A_
>>
>>54244589
or go work for twitter, i heard they use ruby too

oh, wait, no...
>>
>>54242269
>Rails

Rails is just irritating. Now Sinatra though...
>>
>>54241610
Huh, I use Python 3 over 2. Does it really matter that much? They are almost identical.
>>
>>54243124
Not him but my last project was with Sequel, and my current one is with ActiveRecord. The two have totally different use cases, and are therefore suitable for different uses.
>>
>>54244469
>regular expression
>parsing html
NO NOO̼OO NΘ stop the an*̶͑̾̾̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨe̠̅s ͎a̧͈͖r̽̾̈́͒͑e not rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
>>
>>54244742
you know you want to, senpai
>>
>>54243147
>nokogiri

*Hear co-workers laptop fan whirring*
"Bundle install Nokogiri?"
"Yeah"
>>
>>54244685
The point is they should be identical, so people can seamlessly migrate their code to 3, the future. But since it's not, many people decide that they will stick with 2 instead.
>>
>>54244775
how about install precompiled gem?
>>
>>54244859
>precompiled Gem

kek

How about Nokogiri could be less shit?
>>
>>54244870
how about you stop being retarded?

that's how every C based library works: you have to compile it yourself.
>>
>>54241992

Hate on rails all you want idiots. It lets me ship updates multiple times a week.

In 5 years I will be chilling on my private yacht in the caribbean. Meanwhile you spergs will still be here debating semantics
>>
>>54245921
This desu

While the NEETs hop on the Go/Rust/Whatever irrelevant train, kek.
>>
>>54237522
>Ruby will happily let you do some really stupid shit.
Which is my main reason for not wanting to work with it professionally or with anyone else. For a side project/for fun? Sure, if it fits the situation. But I will NOT program Ruby with a "team" of other developers. It NEVER ends well when it comes time to debug/optimize.

Kind of a moot point for me, though, since my work is 60% interfacing directly with Hardware.
>>
>>54244508
So what's the answer?
>>
>>54244742
For a one-off scripts to rip porn videos from streaming sites, why bother downloading and learning to use an HTML framework when it would be much faster to use regular expressions? Maybe not the best example with how good youtube-dl is these days, but still the point is that there are plenty of times when you simply don't care about the stability of the solution and you just want something that works right at the moment.
>>
>>54245970
>>54246235
>Let's tell them how good rails is by calling them names!
Damage control from nervous rails devs, everyone.
>>
>>54247190
Nah it's more about NEETs calling shit a "sjw" language.

What the fuck does that mean? Because some feminists use Ruby all of a sudden that means it's a shit language disregarding everything else?

Ridiculous tbqh.
>>
>>54235612
First, you tell me what ruby is even used for.
>>
>>54247240
Scripting
>>
File: 1460435029862.jpg (44 KB, 501x413) Image search: [Google]
1460435029862.jpg
44 KB, 501x413
>>54235612
Pic related is your typical rubyista / code artisan / sjw degenerate
>>
>>54247376
This is a retarded argument.

Just because someone uses something doesn't make it bad. Why don't you talk about the actual language than "xD it's a sjw language"?

This person probably doesn't even use Ruby.
>>
>>54247470
I never said the language was bad in my post, did I?

I just said that "coders" like pic related are infesting the ruby/js webdev scene.

If you intend to get a job (or contribute to OSS on sjwhub) writing lang related, prepare to work and interact with these types of people.

If OP considers this to be a downside, then it's relevant.
>>
>>54247571
This is a small minority of Ruby users.

This would be similar to me going on dome programming snippet website used exclusively by Indians and saying "See? If you use C/C++ you are a pajeet just like these ones"
>>
>>54247571
>>54247470
>>54247600

Here's one such example. Enjoy. If you are too lazy to search for the juicer tweets in that tranny's feed, just Google his/her name for some great drama.
>>
>>54247376
let's be real, sjws can't program at all
>>
>>54247609
Uh oh.

I found out some Trannies and Communists use AMD processors.

THAT'S IT. IF YOU USE AMD YOU ARE SUPPORTING A SJW COMPANY PANDERING TO SJWS.
>>
>>54247571
I got good at ruby by writing scripts to scrape porn sites but any day now I expect the major ruby style guides to start having clauses about gender neutral function names or equivalent bullshit. Shit's depressing.
>>
>>54247628
Unfortunately they can still ruin it for everyone else. Gone are the days of linus "fuck you" torwalds; these days you can't be a programmer unless you sign agreements stating you won't hurt the feelings of our precious community of diverse and unique individuals.
>>
>>54247628
but you don't need to "program" to do web dev ;)

you need to "code" aka muddle through using the latest js framework after reading an accompanying tutorial
>>
>>54247679
Unless you're an autistic /pol/NEET who NEEDS to always be right this isn't much of a problem.

>ohhhh noooo I have to not call people niggers or make everything a Jewish tumblr conspiracy? How terrible!
>>
>>54247600
>>54247628

>>54247679
> unfortunately, they can still ruin it for everyone else
exactly. see:
https://github.com/opal/opal/issues/941
>>
>>54247682
I've started to hate the term "coding" just because it's what's used in these situations "even (girls|elementary schoolers|illiterate people|toasters) should learn to code!"

Fuck you, I don't code I just write programs
>>
>>54247709
yeah.
>>
>>54247704
Or, you know, you could be fired from your job for whispering a dick joke at a python conference, banned from github for posting a comment containing an eggplant icon, have your repo shut down because its title contained the word "retard", get fired from your company because people online found out you once donated to an anti-abortion group, and so on. Maybe it doesn't affect me *now*, but who's to say what someone will retroactively find offensive about what I'm doing in the future?
>>
File: goodbait.png (532 KB, 1597x1600) Image search: [Google]
goodbait.png
532 KB, 1597x1600
>>54245921
>>
>>54247776
>>54245921

samefag
>>
>>54247169
because nokogiri is easier than regex for this task (if you used jquery before).
>>
>>54237805

underrated comment
>>
>>54250406
Even then, I don't see how traversing an HTML tree is going to be easier than just a text search.
>>
>>54235612
>be me
>need to learn ruby for work & uni
>look at ruby
>what is this faggotry
>community is cancerous
I need to learn this shit but dont want to.
Help me.
>>
>>54253571
>He judges a language by a (small portion of) its community

Upvoted, 10/10 meme.
>>
>>54253571
Do you already know how to program? If so, the first few chapters of the pickaxe book should be good enough to get started, and after that you can learn by doing actual work. If you don't already know how to program, you can go for "learn ruby the hard way"--it's written by an absolute cancerous faggot but still good for first time programmers.
>>
>>54253571
Also, you'll find SJWs and autists in every programming language. I challenge you to spend some time on freenode's C or Java channels, for example. Ruby's a decent language for some uses that's intuitive enough once you know it that you often won't even need to check the docs, much less the shitty rails community.
>>
>>54238852
what a douche
>>
>>54245046
Nokogiri always builds it's own XML library from source rather than using the one already installed on your system because the authors of Nokogiri are fuckwits who can't be bothered to make their shitty Gem work with slightly different versions, so instead they just bundles in libxml2 & libxslt and builds it *every time you install or update Nokogiri*

XML is shit, Nokogiri somehow managed to make it even more shit.
>>
>>54255593
>installed on your system
you mean windows have one too?
>>
>>54255754
Yes, Windows has DLL's for parsing XML.

Or, you know, only build libxml2 when there isn't already one on the system.
>>
Slow
SJWs
Only useful for web shit
It's like a gimped python
>>
>>54255862
>Slow
Scripting language, fast to write though
>SJWs
Irrelevant, not an argument
>Only useful for web shit
Nope
>It's like a gimped python
It's a lot better than python in many ways
>>
Python and Ruby are somehow related, but also differnt.

Python is the reliable donkey: just werks, but not fancy.
Ruby is that shiny unicorn: it might be a little bit gimmicky and not for everything, but it really has da magik.
>>
>>54235612
There is no reason.
At worst, it's the cornerstone to learning Crystal.
/thread
>>
>>54256105
>Python is the reliable donkey: just werks, but not fancy.
>python
>just work

*chuckled*
>your face when you decide to use python3 for the modern age, then realize that some library you need only available in 2, or the code examples are all outdated.
Thread replies: 125
Thread images: 8

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.