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

Pages: 1-

RUBY

Name: Anonymous 2011-02-10 1:51

What does /prog/ think about Ruby?
I've been doing a lot of reading on the language, and I find it very verbose, the code is very literal.
I'm particularly interested in the Rails aspect, as webdev is quite a hobby of mine.

Name: Anonymous 2011-02-10 2:59

Ruby is the most object-oriented of the common languages, since literally everything is an object, there are no primitives. You can do some pretty nifty things with it, like monkey-patching, metaprogramming, etc., since it's interpreted and heavily dynamic. However, it's also slow... very, VERY slow. (http://shootout.alioth.debian.org/u64/which-programming-languages-are-fastest.php) They say "just write speed-critical code in C," but that's a cop-out; why should I use it when other languages can run with decent speed without resorting to writing it in C?

Name: Anonymous 2011-02-10 3:16

Well >>2 I suppose that's the trade off you make for being able to write such beautiful and concise code.
Thanks for the link!

Name: Anonymous 2011-02-10 3:23

Thank for your patience.
This thread is sucessfully


           end
         end
       end
     end
   end
  end
end

Typical ruby code

Name: Anonymous 2011-02-10 4:04

But Ruby is Ruby as Ruby.

TL Note: Ruby means slow.

Name: Anonymous 2011-02-10 6:33

Yukihiro Matsumoto is the creator of Japan's only established open source programming language, Ruby.

i don't rike luby

Name: sage 2011-02-10 6:43

echo ">>2" | tr rl lr

Name: Anonymous 2011-02-10 9:10

>>1

# 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 2011-02-10 9:18

>>10
You're an idiot. My point was that the way ruby does it is extremely retarded and the obvious way to go is have one way to do it that covers all of that.

Name: Anonymous 2011-02-10 9:29

>>12
Having blocks be syntactic sugar for a lambda would be perfectly fine.
Having them be a weird hack that is not compatible with lambdas is extremely stupid. (You can't define a function to use a block and then call it with a proc or vice versa, at least not without some changes like the ampersand)

Also not having a sensible way to pass a method to a function is pathetic. Even python can do that and it doesn't claim to be an acceptable lisp and whatnot.

Name: Anonymous 2011-02-10 10:52

why l a m b d a  expands to an  actual lambda  in prague?

Name: Anonymous 2011-02-10 11:02

>>15 YHBT

Name: Anonymous 2011-02-10 12:01

>>17
YHBT

Name: Anonymous 2011-02-10 12:05

WAHBT

Name: Anonymous 2011-02-10 12:48

Conclusion: IHBT

Name: Anonymous 2011-02-10 13:49

>>10
too lisp; didn't read

Name: Anonymous 2011-02-10 14:50

>>25
too sage; didn't noko

Name: Anonymous 2011-02-10 17:28

I could sure do with a slow ass-fucking.

Name: Anonymous 2011-02-11 3:23

Holy...

How the hell are you doing this guys?

Name: Anonymous 2011-07-22 22:18

What does /prog/ think about Ruby?
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.

Name: Anonymous 2011-07-22 22:47

I made a suggestion to ActiveState to put indentation delimiting for Ruby in their Komodo editor:
http://community.activestate.com/node/6891

that should get rid of all all the ends clogging up the code

Name: Anonymous 2011-07-23 10:56

>>3
There is not causal relationship between ``beautiful code'' (highly subjective) and runtime.

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