What are your thoughts on ruby Cred Forums

What are your thoughts on ruby Cred Forums

Other urls found in this thread:

minerals.net/gemstone/ruby_gemstone.aspx
twitter.com/SFWRedditImages

That looks like a diamond to me. Its cut like a diamond

Solid scripting language

Not necessarily. Rubies have many shapes..

See:
>minerals.net/gemstone/ruby_gemstone.aspx

gems are a mess for windows users, things are named weird, tons of obscure "tricks" and whitespace matters, ide support sucks, and terrible threading

That's ok because fuck Windows.

I really like ruby's style, but I come from perl. Dunno gems, but rubyists are the worst tier of hipsters, so goes the community.

Good capabilities.
Community is made by the worst kind of special snowflakes.

I use Ruby for Windows scripting and it works perfectly fine.

If you "mess up" your gems, you should try pik or rvm (with cygwin).


There are many hipsters out there and the Ruby scene had tough fights in the past. But today most Ruby guys are pretty chill, because the biggest part of the hipster crows moved on to Node.JS (and the whole SinglePageApplications circus), so it's OK to use Ruby now..

It's only good for making the fire star tower

Are there any advantages to Cruby over say Jruby these days?

I'm thinking of maybe even pushing into elixir.

"Pure" Ruby (MRI) is far more accepted than JRuby. I think JRuby is pretty good (and an underrated JVM language), but it doesn't really solve any problem of Ruby.

We'll see what Ruby3 can, do, but it will probably take 2-3 more years.. ;_;


To me it seems a good idea to learn Erlang as functional language (it's much "smaller" than Haskell, the OTP is some "vocabulary", but it's not that hard). And with Erlang and Ruby you know 85% of Elixir, just add some cool ideas and the syntactic sugar..

Anyway, Elixir is super sexy, but getting a Job with Elixir is not that easy. It's doable, there are some cool companies out there, but you'll get more offers with Ruby. Elixir doesn't get their dick sucked by google (like Golang, which is not even a good langauge). We'll see if the industry is ready for functional languages yet...

Personally I love it, my first language was perl, so ruby is a great evolution of it. Its really great for one-liners as well as just general maintenance, its more readable than perl by far, imo.

this is my only problem with it. it seems that the hipsters are drawn to it in droves due to rails.

>it seems that the hipsters are drawn to it in droves due to rails.
Maybe back in 2010.
The hipsters moved on to Node in 2012.

Super comfy for scripting and small stuff.

>gems are a mess for windows users
>windows
Yeah, Ruby is VERY *nix-like in its semantics.
I would never recommend it for Windows use.

>things are named weird
Not from a nix perspective

>tons of obscure "tricks"
Not sure what that means. Maybe you mean there is a large standard library? When I think of languages with obscure details that you could call "tricks" I tend to think of C++ or Perl.

>and whitespace matters
What? No it doesn't. You're thinking Python.

>ide support sucks
Definitely. The majority of Rubyists, including employers who hire for Ruby, open source contributors of major libraries, and the people who build the language itself, all prefer Text Editors over IDEs.

>terrible threading
It has perfectly ordinary threading. It's not great, but not terrible.
It's got Threads and Fibers and they work pretty much as-expected.
If you have trouble with Threading in C, C++, Java or Python you'll have the same trouble in Ruby. If you can already grok threads in most other languages, Ruby's are comparable.

I think a lot of people who fear the "tricks" don't acknowledge the More Than One Way To Do Things kind of methodology in general.

Jruby's always had nice threading.

Ruby is perfect waifu material.

>Yeah, Ruby is VERY *nix-like in its semantics.
>I would never recommend it for Windows use.

People keep saying this but I've been using Ruby with Sinatra and other gems for 5 years (since Ruby 1.9 till now with Ruby 2.3.1)in my work on servers with Windows, I've also installed Rails w/o problems.

Superior to Python in almost every way especially regarding block/lambda syntax and running command line stuff.

Other than that it's almost exactly the same as python

It's good unless you are really short on ram or need to do a lot of low level things for some reason.

Python is better

I learned Java, then Ruby, then Python.

God I love Ruby for its simplicity and conventions. Everything is a fucking method in ruby and its dee fuckingggg licious.

I like python too, but you have shit like dunder methods and instead of arr.size() in ruby its bullshit like len(arr)

I honest to god love Ruby, and I wish it was the only language I ever had to use. It's fuarking beautiful and erotic

I have to program in python now after coming from ruby and it makes me want to cry and slit my wrists

PYTHON

class Person:

def __init__(self, material):
self.dick = 'large'
self.pants = self.pantsCreator(material)

def pantsCreator(material)
return 'pants of {} material'.format(material)


RUBY

class Person

def initialize(material)
@dick = 'large'
@pants = pantsCreator(material)

def pantsCreator(material)
'pants of #{} material'


HOLY SHIT JUST WRITING THIS MAKES ME WANT TO CRY. GOD I WANT A JOB WITH RUBY AGAIN

I don't even really HATE python, I REALLY hate whitespace and forced indent but 'self.' * 1000 is not the worst thing in the world.

Ruby is much nicer, but depending on the use case other things are also nice.

...

Yea. I don't get the self thing. If I didn't have to use self all the time, python wouldn't be that bad at all. I wouldn't even mind it. Ruby vs python would be a thing. Why the fuck they can't make self implied, I do not know


But don't get me wrong, programming in Python is still 10,000,000 times better than programming in java, so for all my bitching about Python, it's a pretty good language

you forgot a self : ^ )

I'm not sure, but they do like explicitness. It's probly related to some feature somewhere that requires an explicit self reference for something else to work.

Ruby is dying, it was killed by NodeJS

there is crystal. work almost the same

well installing sqlite3 in windows is stupid as fuck though

>installing ruby gems on Windows is stupid
>installing SQLite on Windows is stupid
That's what you get for trying to use Windows as a development OS

I mean installing sqlite3 gem on windows is stupid as fuck: gem install sqlite3 -> successful, require 'sqlite3' -> Error!

Turn out you have to clone the github repo and build the gem yourself.

It's fucked up that this issue remain since 2009 or so.

Completely fucking useless for anything other than toy NEET bullshit. Way, way, way too slow. Remember how Xbox was huge? Yeah, Ruby is that slow.

This is a fucking stupid argument.

1. Ruby is still faster than Python and I never hear pepoepl complain about the speed of Python.

2. Ruby is fast, it's just not as hyper optimized as i.e. Java, C or C++ where people put a lot of effort/money into optimizing things.

Even with JavaScript - yes, it's fast, but if you are google and put a team of payed full-time scientists from a lab into optimizing the V8 engine..
Just saying put the same amount of money into Ruby and it will be faster too.

Anyway, we'll see what Ruby3 can do.


The worst things about Python are the "self" thing and the whole "Python2 vs. Python 3" mess..

Python3 thing (released 2008) is just silliness at this point, it's mostly cleared up now.

I still hate everything about enforced whitespace and indentation. It's something you simply can't opt out of and it fucks with my head. I LIKE braces, but a do..end is fine too. More readable, probly.

>user explains this deployment script he written
>three thousand lines of bash
>completely fucking unreadable
> backtick awk and sed clusterfuck
> rewrote in Ruby
>suddenly it's reliable

Ruby is perfect if you use it where it's meant to be used,

Python 3 should be the stadard, but matter of fact you still have a lot of Python2 code floating arroudn and there are some people who still prefer Python2.

Funny, the Python whiespace indention never really bothered me. For Ruby I use two spaces (on my Tab key), for Python it's exaclty the same. It's more the missing of "end" or "}" after a method that made me uncomfortable in the beginning..

>Ruby could be very fast, it's just not fast yet because [...]
No offense but I judge by results. When Ruby is fast in a production environment, I will happily start using it. Until then I see no reason to listen to all the ifs, coulds and buts.

Ruby is a nice and comfy language. Comfier than Python.

Fuck Rails though.

You are missing the end keyword for two statements here, and you have to use double quotes to use string interpolation. But yes, in general, it does not look as horrendous.

I love Ruby for general purpose scripting shit. I never understand why anyone would use Bash for anything large.

You got it all wrong..

If you compare a almost 20 y/o language to the "hot new kid on the block" (espcially when it's supported) it may seem that Ruby is slow. But that's a wierd way to look at it, because Ruby is still fast enough for 90% of what you ever need to do. And that's also the reason there are many big companies using it and there is still a high demand..

Generally the use-cases where you use a Backend centered approach (and not a single page application) are special today, but that's the same for Python, PHP and even NodeJS.


Also there's not a single language/enviroment that gets your productivity on the level of an (experienced) Rails guy, even if you don'T use scaffolding, there's just so many things "getting done for you", you don't have this in any other language..

Oh and I forgot stuff like Puppet or Chef.

All those tools (like Rails) use Ruby, because Ruby is so amazing powerfull that it lets you create your own "domain specific langauges".. instead of "Ruby Syntax" you learn "Rails syntax" or "Puppet Syntax"..

That woundn't be so easy with most other languages. Of course, a LISP guy will laugh about that, but that's exactly the power of Ruby: it can do almost everything of LISP, almost everything of smalltalk, almost everything of Perl, almost everything of JS and almost everything of Python.

Each of the langauges has certain "specials", but on the other hand severe "weaknesses"- of course that's in the eyeof the beholder, but fomr my point of view Ruby takes the best of all these worlds and molds it into a clean, expressive and very powerfull language.

>Fuck Rails though.


I take it you have never used Rail?

Say what you want, Rails changed the world and it's no conincidence that so many frameworks in other langauges were inspired by Rails. Also CoffeeScript or UnderscoreJS are directly inspired by Ruby/Rails, so the whole "Web-Buzz" is the best thing that could happen to Ruby.

I'm glad that the "cool kids" play with NodeJS nowadays, though.

I have tried it. It's a bloated, overcomplicated clusterfuck. If I'm going to do webdev, I'll use Sinatra. That said, I prefer using Ruby for non-web related shit.

I'll accept that a lot of Ruby's performance increases are due to Rails bringing in more users. That said, fuck the framework.

Fair enough, I also think Sinatra is better. But in Sinatra you have to do a lot of stuff by yourself that Rails give you for free.

Also why do you think Rails is complicated? It has a simple folder stucture so you know each thing has it's place. You can use generators that do a lot of work for you.

Bloated.. yes, it is. You can Rails for managing whole infrastructures, you can use Rails for controling microframeworks that split out static websites..

Rail is like the "Death Star", sometimes it's apropriate to use it, sometimes it's overkill..

>Also why do you think Rails is complicated?
Not him but..

"complicated" isn't the right word. Rails introduces so much magic, in so many functions that only hurt performance.

Look at the whole strong parameters thing. It's a "security feature" that only exists because the magical assignment feature was vulnerable. So now you write private functions to permit() allowed variables just so that they can be magically assigned. How is that better than a series of

variable = params[:thing]

should replace javascript to improve internet
however, it still wouldn't be a real language

librarywise it sucks balls if you go beyond webstuff

It's a comfy language, reminds me a bit of a Lisp with a different notation. It's great for writing DSLs (e.g. Sinatra) and its dynamicity and metaprogramming capabilities balance out its lack of macros.
Matz wants to fix the things that seem to bug people the most about Ruby in the next version, namely performance (they claim Ruby 3 is going to be 3 times faster), concurrency (Guilds) and the lack of typing (Matz has talked about what Ruby would look like with static typing and talked about Ruby 3 typing a few weeks ago at RubyKaigi, though I couldn't tell you what he said because it was in japanese).
For those talking about Python, I think you just don't know Ruby well enough. You should read Metaprogramming Ruby.

Ruby3 with optional (explicit) static typing, better threads and maybe even a tad more performance would be amazing..

And this is the real problem. It got pigeonholed into being a web language, despite actually being a general purpose language. Rails was a boon for its popularity, but it also made sure Ruby wouldn't be used for much else aside from web app development. It's sad, because Ruby is my favorite language, but web dev bores me to tears.

I've just seen a keynote by Matz and it looks like Ruby3's typing will be sort of like Flow and Hack by Facebook: it won't affect the runtime, they'll just be annotations for static analysis and clarity.

Not much different for linux, you still ned the source code of SQLite to compile the Gem, the difference is that wiht Linux you get the souce code with simple apt-get and in Windows you need to download them manually.

How does the threading model of Ruby compare to Python?

> Threading in Ruby or Python

Use a real language like Java

this is true. don't know why they'd go from a decent language to a pile of shit, but MUH JS ON SERVER SIDE is probably the best thing to them

It's pretty much the same, both use a GIL. That means you can of course use threads/fibers/whatever, but you won't get as much performance boost as in other langauges that are better for multithreading.

The problem is, once you remove the GIL it can quickly become a huge clusterfuck. From what I've heard Ruby3 won't have the GIL anymore, but I guess they have to put a lot of work in it to make it sound.


Why not both?

Also if you love the JVM so much, you can use JRuby..

there is no performance advantage to switch from python2 to 3 though. It's understandable no one seem to care to upgrade their codes.

well at least the instruction is clear in linux case. In windows it likes "what you told me just `gem install sqlite3` was enough"... well it is enough if you use older versions of ruby, but seriously who do that?.

I thought a GIL was a Python specific thing. I guess I was wrong. There's a project running to remove the GIL in Python: gilectomy.
Having proper multithreading in both languages would be a game changer.

Blame the guys who created the SQLite3 gem, they could have added the SQLite binary with the Gem in Windows w/o problems since all versions of Windows are binary compatible not like the Linux distros, but for some retarded reason they desided it was better to compile the library when you install the Gem.

For all the people saying that Ruby support on Windows is shit I would like to remind you Linux Subsystem for Windows exists. In fact Ruby/Rails was probably one of the biggest reasons it was created in the first place.

>In fact Ruby/Rails was probably one of the biggest reasons it was created in the first place.

Source on that, please.
Why would M$ care about some Rails guys?

microsoft is pushing AZURE and their cloud hosting hard. they're targetting backend web developers and saying 'you dont have to go to linux to develop X software now! You can develop in windows where it's comfy srs guys use visual studio please.'

Well, the whole point of the Linux Subsystem was to make it easier to work with some languages and frameworks that work better on UNIX-like OSes.

aids

Why do we have to care about rails when node.js exists? Still think rubys a great language though.

why node when phoenix?

Worked with perl, python and vba/vbs before.
Recently tried ruby, very comfy.

I'm EE, I script out of necessity so do not really give much fucks.

Phoenix was a bit rough around the edges the last time I looked.

phoenix generators are crap compare to padrino.
also they include bootstrap, brunch (with babel) and other load of crap I don't even care about.

It seems like phoenix author has a different vision about the framework to a mere mortal like me.

some of the includes are FUCKING RETARDED, but they're also optional.

Never trust an .io

/thread
but like Python or JS never use it for implementing whole programs

I don't think Ruby really offers anything over Perl. What's the point when Perl does it all and is far faster?

When a perl project reaches a certain size someone will inevitably suggest Moo/Moose/whatever OOP lib and then you will want to burn it to the ground. Ruby avoids that process of literally setting fire to things.

Yeah I guess if you're working with a team with varying experience levels it'll be an issue. When you're on your own and you only have your own conventions to deal with any of that is overkill and you can just use Perl's native OO system, which is basically just "blessed" hashes getting passed around

who the fuck still uses GIL anymore? Why not going for a solid implementation of the actor-based concurrency, or CSP? That's why Golang is winning

>who the fuck still uses GIL anymore?
every one?
why, because it's fucking hard that's why
>actor base, csp
doesn't mean it thread-safe. I don't know how go implement it, but crystal has fibers/channels yet still works in a single thread only.

Javascript is a better language than Ruby. Things like blocks and how blocks get connected to container types for iteration is just not as clean as how high order functions work in Javascript. The fact that Ruby is more class based than Javascript means you have to use blocks as psuedo-functions instead of passing a function is something which I find cludgy. But if you have to do programming that calls for classes and class methods, then Ruby does what it does very well. Ruby is almost a functional language in that it almost never allows mutability in objects and almost all methods produce a new copy and never change the original. Changing the original in place can get funky since objects are assigned by reference and so every new object can change the original.

>Javascript is a better language than Ruby
Stopped reading.

>The fact that Ruby is more class based than Javascript means you have to use blocks as psuedo-functions instead of passing a function is something which I find cludgy.
Two things I disagree with here:
1. Blocks aren't "psuedo" at all, and I'm curious what makes you say that.
2. This does not arise from the fact that "Ruby is more class-based".

Even if you dislike blocks, you don't have to use them. You have lambdas, which hew closer to methods on a few minor details when compared to Procs (aka blocks) such as the return keyword, argument lists and some scoping vagaries related to instance_eval or instance_exec. Just use lambdas if you want.

In addition to lambdas, you can just rip a method object out of the current binding context and pass it as a block via &method(:do_thing). In a sense, you get the best of both worlds, in that you can write the function as a more idiomatic method, but if you need to pass it around you can do exactly that. However, I do relent that the VM is more optimized for block-style Procs than method objects passed in lieu of a block. Lambdas, if I recall correctly, are equal in performance to blocks and feature-wise are the equal of methods.

If your criticism that this is confusing, not-very-straightforward, or just dissimilar from more traditional functional languages (where there are not two ways of packaging execution and passing it around your program), I can agree with that.

>Things like blocks and how blocks get connected to container types for iteration is just not as clean as how high order functions work in Javascript.
See my comments above, but with respect to the standard library's collections and streams (Enumerable, IO, etc.) blocks tend to be sufficient for a short-hand passing of first-class functions. If you are in one of the corner-cases where you are using instance_exec and other binding trickery with your blocks, just use a lambda instead and all is well.

Holy shit inlining little bits of code looks way worse than I remember. Apologies for the eye-defiling formatting, I'll never do that again.

gay

Ruby gems are cancer.

Wait until your coworker directly installs them with full privs beside you.

Why did they have to reinvent so many basic programming tenants?

It's not contains it's includes?, use attr_accessor, truthy and falsy, the fucking =>, begin and rescue...

why should I have to memorize all this stuff?

Take all of the esoteric programming traits of Perl and combine it with all of the retarded syntax of Python.

It's great for cranking out quick scripts but anything past that turns into a fucking mess, and all of the implicit syntax in the language can be incredibly hard to decipher.

>Why did they have to reinvent so many basic programming tenants?
Because the language was made in Japan in the early 1990's?
My guess is that you haven't learned very many languages beyond a small subset of ALGOL-derived ones. As you branch out more, languages can and do deviate slightly on names for common functionality.
>why should I have to memorize all this stuff?
Are you fucking serious? Can't wait to see your brain explode when you look at an ML language or something with a Prolog-derived syntax like Erlang. All-in-all programming is incredibly low on memorization compared to other high-paying careers.

>CSP
>hard
you're the kind of """""programmer""""" that should be scared of pajeets taking your job.
>doesn't mean it thread-safe
nigger do you even know how CSP and actor-based concurrency work?

No, it's a **+cabochon-cut red spessartine+**