Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

not hating ruby

Name: Anonymous 2012-01-16 8:20

g-guys i tried ruby a few days ago and i en-enjoyed it.

do any of you know where i can be cured of my homosexual urges?

Name: Anonymous 2012-01-16 8:41

Go back to /g/a/y/.

Name: Anonymous 2012-01-16 9:17

You're not ``homosexual'' for using Ruby.

Java programmers are.

Name: Anonymous 2012-01-16 9:19

no, Ruby is automatically kawaii because it is made by a nippon

Name: Anonymous 2012-01-16 9:32

>>3
not homosexual, but a faggot

Name: Anonymous 2012-01-16 10:51

>>3
Java programmers are homosexual, 'cuz of him using Ruby.
I don't understand.

Name: Anonymous 2012-01-16 11:40

>>6
I didn't say that Java programmers are ``homosexual'' because of him using Ruby.

I did say that Java programmers are ``homosexual'', period.

Name: Anonymous 2012-01-16 11:42

>>7
Wow, you've finally found a topic that you know something about.

Name: Anonymous 2012-01-16 11:51

>>8
umad?

Name: Anonymous 2012-01-16 11:58

Ruby is:
- when OOP replaces common sense;
- when people write "begin end begin begin end end..." instead of code;
- when program is so slow, that you can have a tea party, while it multiplies two 10x10 matrices;
- when code like 12.5.integer? or 3.times {puts "Ruby rocks!"} considered beautiful.

# This is a block. It can be passed to a function like so `function your-block' and is called within that function with `yield your-bar'
{|bar| bar.foo}

# This is a proc. It is called like so `your-proc.call' and it can be assigned to a variable or passed to a function directly.
proc {|bar| bar.foo}

# This is almost the same as a proc.
lambda {|bar| bar.foo}

# This is a method. It is called like so `foobar.baz your-bar' and it can't be passed to a function directly.
def baz(bar)
  bar.foo      
end

Such is the elegance of ruby.

Name: Anonymous 2012-01-16 12:02

>>9
Yes.

Name: Anonymous 2012-01-16 12:07

Ruby fucks up even simple function call

Sane language:

map upcase Names


Ruby:

names.map { |name| name.upcase }


Ruby (even more ugly):

names.map {&:upcase}

Name: Anonymous 2012-01-16 12:41

What's a sane alternative to Ruby?

Name: Anonymous 2012-01-16 12:43

Haskell

Name: Anonymous 2012-01-16 12:44

>>14
LOL!
you almost had me there for a second

Name: Anonymous 2012-01-16 12:46

>>15
After all these $global_var &proc $~[1], $!, $>, $@, $&, $+, $0, $~, $’, $`, $:, $*, $?... Haskell starts to look sane.

Name: Anonymous 2012-01-16 12:48

Haskell on Huskies.

Name: Anonymous 2012-01-16 12:50

If it ain't Lisp, it's crap.
Lisp is shit.

Name: Anonymous 2012-01-16 13:41

- Ruby indulges obfuscation: Ruby has no keyword/optional arguments, so you'll have to use hash parameters as a substitute. This is an idiom that comes from Perl. Ugly, Perl-looking code, like proc {|obj, *args| obj.send(self, *args)} or (0..127).each { |n| p n.chr }, considered beautiful. Quirky variable names (partially due to naive environment design): @instance_var, @@class_var, CONSTANT_VAR, $global_var, &proc, $~[1], $!, $>, $@, $&, $+, $0, $~, $’, $`, $:, $* and $?. If A is [1,2,3] and B is [10,20,30], then A+B is [1,2,3,10,20,30], when you probably wanted [11,22,33]. A good amount of your code will consist of begin end begin begin end end...
- Faulty syntax. Ruby cant distinguishing a method call from an operator: "a +b" can be both "a(+b)" and "a + b" - remove the space to the left of "+" or add a space to the right of "+", and it will be parsed as an addition. Ruby's expressions terminate by a newline and you have to implicitly state that the expression is not over, using trailing "+" or "\". That makes it easy to make a dumb syntactic mistake by forgeting to continue line. It also encourages putting everything onto a single line, producing messy looking code.
- Slow: JIT-compiling implementations exist, but they're still slow and incomplete, due to Ruby's complexity and bad design, which make Ruby difficult to optimize compared to other dynamic languages, like Lisp. For example, Ruby has to accomodate for somebody in another thread changing the definition of a class spontaneously, forcing compiler to be very conservative. Compiler hints, like `int X` from C/C++ or `declare (int X)` from Lisp, arent possible either.
- Ruby's GC is a naive mark-and-sweep implementation, which stores the mark bit directly inside objects, a GC cycle will thus result in all objects being written to, making their memory pages `dirty` and Ruby's speed proportional to the number of allocated objects. Ruby simply was not designed to support hundred thousand objects allocation per second. Unfortunately, that’s exactly what frameworks like Ruby on Rails do. The more objects you allocate, the more time you "lose" at code execution. For instance something as simple as 100.times{ ‘foo’ } allocates 100 string objects, because strings are mutable and therefore each version requires its own copy. A simple Ruby on Rails ‘hello world’ already uses around 332000 objects.
- OOP: Matz had a bit too much of the "OOP is the light and the way" philosophy in him, in effect Ruby doesn't have stand-alone functions and Ruby's blocks can't be used in exactly the same way as usual closures.
- Ruby (like most other scripting languages) does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. If you want a variable private to a block, you need to pick an unique variable name, holding the entire symbol table in your head. This also means that Ruby can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Certain operations (like regular expression operator) create implicit local variables for even more confusion.
- Non-othogonal: {|bar| bar.foo}, proc {|bar| bar.foo}, lambda {|bar| bar.foo}, def baz(bar) bar.foo end - all copy the same functionality, where Lisp gets along with only `lambda`. Some Ruby's features duplicate each other: print "Hello", puts "Hello",  $stdout<<"Hello", printf "Hello", p "Hello", write "Hello" and putc "Hello" -- all output text to stdout; there is also sprintf, which duplicates functionality of printf and string splicing.
- Ruby as a language supports continuations via callcc keyword. Ruby's callcc is incredibly slow, implemented via stack copying. JRuby and IronRuby don't have continuations at all, and it's quite unlikely they will ever get them. There were also support breaches in mainline Ruby, where Ruby 1.9 has not supported continuations for a while. If you want your code to be portable, I'd suggest not using Ruby.
- Ruby was created "because there was no good scripting language that could handle Japanese text". Today it's mostly Rails hype and no outstanding feature, that makes the language, like the brevity of APL or simplicity and macros of Lisp. "There is some truth in the claim that Ruby doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk, but they weren’t bad languages." -- Matthew Huntbach

Name: Anonymous 2012-01-16 13:53

>>19
maximum teal deer

Name: Anonymous 2012-01-16 15:28

# Why would I even bother trying to write
# an optimal sorting algorithm with such
# a slow language, I have no idea.
# Just look how horrid line 6 is

class Array
    def quicksort
       if self.length<=1
            self
        else
            # This next line of code is horrible
            # It isn't even the same as
            #   array=[self]
            array=Array.new(self) # Nightmares, man!
            pivot=array.pop
            less=array.select{|element|element<=pivot}
            greater=array.select{|element|element>pivot}
            less.quicksort+[pivot]+greater.quicksort
        end
    end
end

I do admit, I like type inference, blocks, complete immersion into OOP, but I find some things ugly, like blocks, singleton methods, Object methods used to access private ("object") variables, and of course the horrid:
class << self

Oh, and the Complex class makes fractions if given integers.  Ugly

Name: Anonymous 2012-01-16 15:33

>>21
            # It isn't even the same as
            #   array=[self]

Terrible!

Name: Anonymous 2012-01-16 17:51

>>21


            less = array.select{|element| element <= pivot}
            greater = array.select{|element| element > pivot}


why don't this language at least have something like


            less = array.select{ _ <= pivot}

Name: Anonymous 2012-01-16 18:14

>>19

besides some quibbles (eg "Ruby cant distinguishing a method call from an operator"
well, shouldn't operators essentially be methods/functions? plz let me set the fixity/precedence or whatever like haskell does) this copypasta is a nice smashing of Ruby.

the question then, is, if it has all these flaws, why is it popular?

Name: Anonymous 2012-01-16 18:19

>>24
Most popular things are deeply flawed. People like utterly broken things.

Name: Anonymous 2012-01-16 20:03

>>21

# It isn't even the same as
            #   array=[self]

2/10.

Name: Anonymous 2012-01-16 21:13

>>24
Rails. Ruby was, rightfully, nothing before Rails.

Name: Anonymous 2012-01-16 21:44

>>27
Rails was, rightfully, nothing before Ruby.

Name: Anonymous 2012-01-16 21:45

>>24
It isn't popular. Java is.

Name: Anonymous 2012-01-16 21:55

>>28
Rightfulness was, rails, nothing before Ruby.

Name: Anonymous 2012-01-16 22:03

>>30
Nothing was, rightfully, Rails before Ruby.

Name: Anonymous 2012-01-16 22:03

>>33
nice dubs bro

have a nice day, anonymous

Name: Anonymous 2012-01-16 22:04

check my dubs

Name: Anonymous 2012-01-16 22:09

>>24
besides some quibbles (eg "Ruby cant distinguishing a method call from an operator" well, shouldn't operators essentially be methods/functions?
Please, read original article:
http://www.cs.auckland.ac.nz/references/ruby/doc_bundle/FAQ/FAQ.html
Ruby works hard to distinguish method calls from operators, and variable names from method names. Unfortunately, there's no way it can get it right all the time. In this case, ``a +b'' is parsed as ``a(+b)''. Remove the space to the left of ``+'' or add a space to the right of ``+,'' and it will be parsed as an addition.

Name: Anonymous 2012-01-16 23:13

>>34
The {} is parsed as a block, not a Hash constructor. You can force the {} to be treated as an expression by making the fact that it's a parameter explicit: p({}).
Horrible.

Name: Anonymous 2012-01-16 23:15

>>35
"Such is the elegance of ruby."

Name: Anonymous 2012-01-16 23:44

Another confusing Perl borrowing are postfix `if` and `while` (line = file.readline while line != "needle" if valid line)

Name: Anonymous 2012-01-17 0:15

>>37
occasionally  a postfix if or while reads better

Name: Anonymous 2012-01-17 0:44

>>38
occasionally  a postfix if or while reads better
A good reason to fuck up whole syntax.

Name: Anonymous 2012-01-17 2:34

All accusations towards Ruby are just ridiculous and are factually inaccurate! It is important that as a community we debunk these myths and unjustified criticisms. An even better road to take would be to provide examples of how computationally complex problems can be dealt with efficiently in Ruby, highlighting the best practices and the existing workarounds.

A religious community is emotionally easy to attack and may produce inopportune responses in defense of whatever has been questioned. Over the past three years I’ve heard a few bad things about Ruby and I’ve seen all sorts of responses, which in some cases were simply overreactions.

Ruby is a wonderfully designed language. The Ruby and Ruby on Rails communities have a lot of passion. We love our language, created by a very cool guy (and maestro of humbleness) in Japan. We love our framework authored by a Danish GAP model, and we really enjoy the spirit in the community. We have the best non-paid marketing department in the world. We started the revolution which is powering most of the new social websites out there.

Ruby on Rails is the single most important and valuable technical solution, language and tool for software problems.

Name: Anonymous 2012-01-17 2:56

This thread is frightening

Name: Anonymous 2012-01-17 8:31

>>40
IHBT.

Name: Anonymous 2012-01-17 10:25

computationally complex problems can be dealt with efficiently in Ruby
system("solve", a, x, b)

IHBT

Name: Anonymous 2012-01-18 2:57

<------- dubz, check them

Name: Anonymous 2012-01-18 7:55

>>44
DUBS CONFIRMED

Name: Anonymous 2012-01-18 8:07

>>39
Readability counts end end end end

Name: Anonymous 2012-02-24 21:49

Over the line

Name: Anonymous 2012-02-25 11:40

48 get

Name: Anonymous 2012-02-25 11:46

there is no excuse for not hatint ruby

Name: Anonymous 2012-02-25 13:01

>>34
>Unfortunately, there's no way it can get it right all the time. In this case, ``a +b'' is parsed as ``a(+b)''. Remove the space to the left of ``+'' or add a space to the right of ``+,'' and it will be parsed as an addition.
and coffeescript thought this was a great idea

``fixing'' javascript by following the same design process:
1. steal bad ideas from other languages
2. steal good ideas from other languages, but cripple them
3. brag about these innovative ideas. guys, look! closures! does your language have these?! i bet not! i hope you love closures because you're going to be using a whole lot of them to fix the variable scoping we fucked up!

Name: Anonymous 2012-02-25 18:20

>>24
Lisp is going through a sort of recurrence – just look at how many Clojure jobs that are going. I get called almost once a month about jobs using... Lisp.

;) I might prefer to work in Smalltalk, but hey, Lisp is beautiful too.

Don't change these.
Name: Email:
Entire Thread Thread List