[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

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: 51
Thread images: 5

What does /g/ thinks about Ruby?
>>
>>59859616
Ruby is dead, support Crystal instead.
>>
>>59859616
it's aight
>>
Incredibly pleasing to work with, which was its design purpose.
Faster than Python and implements objects infinitely better (That is to say: It didn't originate from people fucking with the interpreter to make it do things it wasnt designed for)
Only used by trannies and SJWs
Doesnt have the same library breadth as Python

Basically it should have taken Pythons place a long time ago, but the opportunity has passed and it's pleasant but useless.
>>
a nice python alternative, where indentation does not matter, but objects do matter since everything is an object.
>>
>>59859710
Everything is an object in Python too.

Ruby is garbage by the way.
>>
>>59859679
saw it coming, kek
>>
File: perl.png (43KB, 640x640px) Image search: [Google]
perl.png
43KB, 640x640px
Because I use Perl.
>>
>>59859616

It by far one of best programming experiences you can have.

It's like having a gangbang with LISP, Haskell, JavaScript and Python at the same time.

And it's sad most people only think about Rails when they speak about Ruby.It's also useful for deployment (Chef/Puppet) or being a 1337 haxx0r (Metasploit).


And honestly:
All things that are quirky in Python, are done right in Ruby. I'm not hating Python, but when ever people say "I like Python, but what annoys me is.." then you can be sure it's done better in Ruby.

Also in Python NOT everything is an object. Or at least you have - oh the irony! - always a couple of ways to do it, that are far from "everything is an object".

In Python you need to dick around with encodings or have to guess if you have to put the object into a function or call the function at the object.. It's just way more complicated than Ruby, and all the good stuff from Python3 is somehow "inspired" by ruby.

Last but not least - Ruby is fun.
Even if there wasn't a single job out there I'd still chose it over Python in ten of ten times.


>>59859654

Wishful thinking.
Crystal has literally no user base.

Meanwhile Ruby is somewhat among the top ten (or at least top 15) languages of the world.


>>59859904

Perl, Haskell and D are the only languages that are as expressive and beautiful as Ruby.

(LISP only if you can bare the "reverse syntax", which I can't).

Fuck all the rest.
>>
Great scripting language, and even better web language, usless for almost everything else though.
>>
>>59859679
This.

It makes me really sad that Ruby isn't more popular than it is. It could've been so much better than Python. But people shilled so hard for Python in the beginning Ruby never had a chance.
>>
>>59859616
It's good shit. My go to language.
>>
>>59860497
But it is better than python.
>>
It's shit and there's no reason to use it over Lua.
>>
>>59860567
Holy shit Lua is trash.
>>
>>59860540
It would be if it had as much support as Python. Python has way more libraries now that make design a lot easier. Also Django is more popular than Rails and has more support than Rails.
>>
File: 1473289474894.jpg (27KB, 640x638px) Image search: [Google]
1473289474894.jpg
27KB, 640x638px
>>59860567
>lua
>>
Language of choice for numales with 6 or more madeup genders
>>
>>59859616
Using it, loving it.
>>
File: 434.jpg (204KB, 1200x1000px) Image search: [Google]
434.jpg
204KB, 1200x1000px
>>59859616
I think she is cute.
>>
>>59859616
it has ugly syntax compared to Python
instantly ditched
>>
>>59859616
Probably my favorite language. It's great for scripting and has amazing metaprogramming abilities.

It's certainly better than Python in almost all respects. It has a better object model, it's marginally faster, and it's not split into two incompatible versions. I hope it eventually overtakes Python, which might actually happen if Truffle works as well as advertised.
>>
>>59859616
Great scripting language, not so great for real programming, see
>>59860448
but but then again see
>>59859654
as porting stuff to Crystal is a reeeaally easy way to becoming performant and getting a lot retarded dynamic stuff out of your code; so there WILL be a huge user base very fast. As soon as there is a 1.0 version I will expect a Jekyll port to appear, as Jekyll is one of the things that really would profit.
>>
>>59860448
>Perl, Haskell
>beautiful
Stay scientific, Jerry.
>>
>>59860448
>Perl
>beautiful
>>
>>59859679
>Only used by trannies and SJWs
*In the West. In Japan it's used by sane everyday devs.
>>
>consider Ruby better designed than Python
>consider Django better designed than Rails
Life truly is suffering. I guess I'll try to split the difference and learn Elixir/Phoenix.
>>
easy to learn and comfy to use but it's dropped off a cliff in terms of popularity on github/stackoverflow
>>
>>59859616
It's pretty great in many ways. It's incredibly flexible, everything is an object, and you're throwing lambdas all over the place, but in such a fluid and easy way it takes you a while to realize it. Also the package system doesn't suck like pip. Paradoxically, python has better third party libraries, but a worse package system. Go figure.

Python is much more rigid, made even more so by wide adoption of pep8. Ruby lets you go all over the place, and requires you have more self-control in your coding.

If you want to bang out code quickly to get things done now, ruby is perfect. If you want to collaborate on something with other devs you haven't met before, you'll have better luck with python.
>>
>>59862977

I'd love to see crystal shine and have big respect for the developers, they are humble and friendly (read their blog).

But there are two points:
1) JRuby has been there for ages, it works very well and has the speed of the JVM. And yet it's not that popular.

2) Ruby is just pretty good engineering. And not just on the surface, there is a lot of fancy shit, the way things get optimized, dead code elimination, the iterators are amazingly powerfull and even the simple data types (i.e. numbers and lists) are amazing pieces of software engineering. On the same time Ruby support a lot of stuff that makes it difficult for optimizing. I mean you can use continuations like in Scheme. You can build Ruby libraries (Gems) and just put native C code in it. You can use C or C++ code with a single include statement. You can simply use shell commands in scripts by putting it in backticks. You can access Strings like char arrays, get subarrays or even throw a RegEx at them:
 "Like this."[/is/] 

There is so much going on under the hood..

Ruby does one thing pretty darn well:
It abstracts everything away from you so you can focus on coding and never have to worry about details (I know Python claims the same, but I've have a lot of fiddling with python in the past). And that makes Ruby and Rails the perfect tool for Rapid prototyping or as a duct tape language.

And there is one more thing that makes Ruby special:
Like LISP (or C++) you can use Ruby as a DIY kit for creating domain specific languages. You have so much control about how things get handled (i.e. passing method calls to other objects, calling blocks), that it's really easy to just make your own programming language.

When Ruby came up people where doing monkey patching hacks and inventing crazy operators, just because they could and it felt so good. (Of course it's considered a code smell if you put it in production code).

Basically Ruby is for noobs or very experienced programmers.
>>
>>59863255

You know, I've been there.

But you have to realize that the difference between Rails and Django is not that big. And even the Difference between Ruy and Python is not that big. Basically learn Ruby, put everything in parentheses, be anal about indention and you're halfway there. Then hit yourself in the head a few times so you forget half of your language features - here you go, you're a Pythonista!

So just use whatever floats your boat.


Elixir is a completely different beast. Basically it's Erlang with some Ruby-like enhancements (i.e. for I/O). While Elixir is a remarkable language and even Erlang itself is pretty cool, it's not really like Ruby. Haskell or Scala have probably more similarities with Elixir than Ruby.

I am not saying you shouldn't learn Elixir, but chose the right tool for your purpose.
>>
>>59863201
Japanese development is pretty unique to itself, it's not really comparable to anything else in the world.
>>
>>59863614

How so?
>>
>>59860448
>Also in Python NOT everything is an object
give me one value that isnt an object on python
>>
>>59863381
>And yet it's not that popular
It's at the heart of logstash though, which is deployed in companies all over the world, from garage businesses to multinationals.

So it's not popular, but it's used by an awful lot of people
>>
>>59863381
I wouldn't put my trust into JRuby, because...
>JRuby has been there for ages, it works very well and has the speed of the JVM.
It has the speed of an unoptimized, dynamic scripting language on a JVM. And that's pretty meh, reality and RAM usage considered. Also, who wants to depend on the JVM.
That alone explains why it isn't popular. As for Truffle and Ruby9000...
>On the same time Ruby support a lot of stuff that makes it difficult for optimizing.
Impossible even. Truffle/Graal might deliver nice synthetic benchmarks, but with PyPy and all existing JS VMs and every sophisticated JIT for dynamic languages ever they turn out to be disappointing in real usage scenarios. Statically typed languages with not too much dynamic shit will always beat them to punch, like Java will always do and so might Crystal, unless they go full retard about the GC.

Think about it: Julia does a pretty good job, but that is only because it serves a niche that requires possible to JIT-optimize numeric shit. Whereas real applications require pushing as much stuff as possible through the CPU cache, and dynamic features are detrimental to that and JIT compilers can't fix it that much.
>>
>>59859904
>perl
>logo is an onion
>>
>>59859616
JavaScript is better.
>>
>>59863963

Could you please quote to whole text?

>Also in Python NOT everything is an object. Or at least you have - oh the irony! - always a couple of ways to do it, that are far from "everything is an object".

OK, I got a little carried away here and used bad wording. In a certain way "everything is an object" in python, but in a different way not..

Maybe I'll give you an example to show you what I mean:

Ruby:
a = "1-2-3".split("-").join.length


Or you could also write it as:
a = "1-2-3"
.split("-")
.join
.length


You see?
The string is my initial object and each operation returns an object. We only ever work with the result object.


Python:
a = len("".join("1-2-3".split("-")))



1) We also start with a string.
2) We call the split method at the string - ok.
3) We take the result and.. no wait. We just take it as an input for a function that get called at a different object, the delimiter. We have already two object interacting. OK, so the delimiter seems to be our new "main" object here.
4) Oops! Out of fucking nowhere there's a function. Again we use our result form the last operation as input for this function, instead of calling it at the object.


And the problem is even more obvious if we change it a little bit:

a = len("".join("1-2-3".split("-")*2)*3)*4


What could the result be?
"*2" manipulates a list, "*3" manipulates a string and "*4" manipulates a number.

This is only possible because there are so many "entry points" where we can put things in.
>>
>>59864188

Here's your (You)
>>
>>59860896
To be fair, a lot of python libraries are shit under the hood.
There might be fewer ruby libraries but I've found them to be both more pleasant to work with and more stable than their python equivalents.
Fuck rails though. Fuck rails so hard. Sinatra/padrino all the way.
>>
>>59864578
>To be fair, a lot of python libraries are shit under the hood.
Also, you can't gem install or upgrade your way to a broken system. That infuriates me about pip.
>>
File: 1469326930560.gif (2MB, 250x250px) Image search: [Google]
1469326930560.gif
2MB, 250x250px
>>59864558
u mad
>>
>>59864640

I would be if I had to work with JS.
>>
It's great. I do Devops stuff at a big saas company and I use it for scripts, config management (chef and puppet), and whenever I need a basic crud web app I use Rails. I use Python a lot too since often in need to write connectors to vendor apis and they tend to have better Python libraries. Also most people in my dept don't know Ruby so I have to go Python on a lot of collaborative projects. I prefer Ruby mostly though.
>>
>>59863679
https://randomwire.com/why-japanese-web-design-is-so-different/
Just as an example.
And they're bafflingly low-tech in their day-to-day operations, it's not the cyberpunk future everybody thinks it is. The primary way for businesses to communicate is still over fax, and most people don't have home internet connections.
>>
>>59859616
>does thinks
>>
>>59859616
>"what does /g/ thinks"
kill yourself
>>
>>59859616
It's okay, I wish there were more frameworks and libraries for it than just webshit
>>
>>59865272
I write a lot of Linux system scripts in Ruby, are there any helpful gems I should know about?
>>
>>59867297
Samefag here. I looked around and came across cfruby which appears to be cfengine implemented in Ruby. Could be useful, but for full blown config management might as well use Chef or puppet.
Thread posts: 51
Thread images: 5


[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.