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

Ruby thread

Name: Anonymous 2013-08-06 1:50

What are the good and bad things about Ruby, in your opinion?

Name: Anonymous 2013-08-06 1:54

Ruby has a life outside the internet, while Python can't go six hours without playing Call of Duty and geting called a faggot by preteen boys on XBox Live.
 Ruby teaches gym class and lets you smoke under the bleachers, while Java teaches third-grade english and makes you read aloud in class.
 Ruby has the ability to empathize with others, while Clojure has over two terabytes of child porn.
 Ruby is healthy and stong, while Perl has AIDS and needs life support machines to keep him breathing.
 Ruby sometimes enjoys weed, while Common Lisp sucked off a nigger for a single crack rock.
 Ruby loves animal and treasures the companionship, while Haskell ran over your dog and made you clean up the mess.
 Ruby has a vast collection of anime stored on his hard drive, while Smalltalk streams anime and buys the DVDs.
 Ruby is financially secure and has invested his money wisely, while C++ is always trying to borrow money to buy real estate on the moon.
 Ruby respects people's personal space, while Fortran gets six inches from your face and spits when he talks.
 Ruby can agree to disagree, while Scheme wants to behead those who insult Islam.
 Ruby never hits on your girlfriend, while BASIC molests your children.
 Ruby has a good job and good mental health, while Symta lives with his mother and spends 18 hours a day shitposting on obscure forums in a foreign language.
 Ruby is clean and neat, while Lua leaves his trash in your car whenever you take him somewhere.
 Ruby was voted `Most Likely To Succeed' in high school, while Scala took a gun to school and shot the place up.
 Ruby cares about a friend's safety, while PHP secretly laced your weed with PCP then called the cops on you.
 Ruby knows that Jews are evil, while C# is a jew himself.
 Ruby served nine tours of duty in six different wars, while F# dodge the draft and moved to Canada.
 Ruby plays the Touhou as Marisa when she's available, while Go won't play at all if he can't play as Reimu.
 Ruby is learning Japanese to translate visual novels for others, while Javascript is learning Japanese so he can read hentai by himself.
 Ruby accepts the fact that programming is demeaning, while OCaml also agrees that programming is demeaning.
 Ruby takes care to not break your stuff, while Pascal clumsily dropped super glue on your carpet.
 Ruby gets laid with a new girl every night, while C cries while masturbating herself to sleep.
 Ruby offers you the last piece of food, while Ada orders a bunch of appetizers then eats most of them but still wants to divide the check evenly.
 Ruby recognizes that magic may exist and understands it's appeal, while Scheme emotionally argued for Small Bomb Theory for hours on end.
 Ruby is the model Aryan to carry on the Human Race, while Game Maker Language has 24 chromosomes.
 Ruby is a well mannered drinker, while Assembly thought it would be funny to take a shit in the sink.
 Ruby values functionality over form, while Forth is an art major who loudly complains about `conformist' with his hipster friends in Starbucks.
 Ruby can function in almost any environment, while Verilog thinks the Sun is going to eat him and refuses to go outside.
 Ruby knows when and how to tell a good story, while Tcl talks about 4chan and lolies at parties that he got a pity invite to.

Name: Anonymous 2013-08-06 10:10

Luby

Name: Anonymous 2013-08-06 12:18

>>2
you forgot sepples

Name: Anonymous 2013-08-06 12:31

Good things:

Block syntax:

# do-end-example
File.open 'sicp.txt' do |file|
  puts file.read
end

[1, 2, 3].each do |number|
  puts number
end

# { } -example
[1, 2, 3].map { |x| x * 5 }

# I like this
[1, 2, 3].map(&:to_s)

[1, 2, 3].inject(&:+)


Blocks are also nice for creating some simple DSL:s

Also, doing meta programming with instance_eval, class_eval, module_eval, etc is nice.


that's it.

Bad things:

All those things starting with $ (like $$)

Minor version update can break existing program

Slow as fuck

require sucks

Syntax of calling lambda closures


#example: normal method
def m(a)
  a + 42
end

puts(m())
# or
puts m

#example: lambda
l = lambda { |a| a + 42 }

puts l.call()
# or
puts l.call
# or
puts l.()


Why the hell different hash syntaxes?


# one way (normal)
h1 = {:a => 'poop', :b => 'crap'}

# second way (faggot), only symbols are possible as keys

h2 = {a: 'poop', b: 'crap'}

#noob way
h3 = Hash.new
h3['a'] = 'poop' # symbols are too complicated for me
h3['b'] = 'crap'



Overall, I think Python is better.

There might be other goods/bads, but just now they won't come to my mind.

Name: Anonymous 2013-08-06 12:31

>>4
you should learn to read

Name: Anonymous 2013-08-06 12:43

>>5
FIOC has with, and a fucking file = fopen("filename", "r") will allow you to do the exact same thing as Ruby. The |x| shit is just a crippled lambda.

Therefore, Ruby is only bad things.

Name: Anonymous 2013-08-06 12:46

>>7
Your argument sucks.

The block syntax in Ruby can be used in more ways than Python's with. Also, creating a method that takes a block is super simple. Python with needs slightly more than just method taking a &block parameter.

I do like Python more than Ruby, but I like the Ruby blocks more than Python with-keyword.

Name: Anonymous 2013-08-06 13:02

The blind leading the stupid.

Name: Anonymous 2013-08-06 13:16

Ruby can't get you laid. I suppose that isn't a bad thing if you're someone like cdder since the fool prefers is left hand over someone of the opposite sex.

Name: Anonymous 2013-08-06 13:19

Scheme can get you laid.
http://i4.minus.com/ispugP3eF0EV4.jpg

Name: Anonymous 2013-08-06 15:08

I like to program in Ruby. What I really like is the ability to create embedded DSL's. It is not as advanced as in haskell, but it goes a long way. 

I like the model of oo they have. Traits are a welcome addition to the normal vertical inheritance.

Ruby has continuations, but are badly implemented. I would rather see the pair shift and reset than call/cc, giving me the ability to capture only a part of the computation. And it seems they have performance problems in this area.

Last time I programmed in it, they did not do TCO, which can be  an pain in the ass, although you can simulate it. I just read it has it since 1.9.2.

I would have liked that ruby was statically typed. Dynamically typed languages can never have as good tools as statically typed. And nowadays with type inference and good amount of computing power, the static counterparts are as flexible as the dynamic ones.

I find it cleaner than Python, which is ruby's direct competitor.

Name: Anonymous 2013-08-06 16:05

>>11
Are you stretching your anus like I told you? Won't be long before they knock at your door.

Name: Anonymous 2013-08-06 16:32

>>13
You told me to stretch my anus? When was that?

Name: Anonymous 2013-08-07 2:59

>>12
Maybe you should program in common lisp first before recommending shit languages

Name: Anonymous 2013-08-07 3:33

>>15
scheme is the best language with the worst libraries.
common lisp is a gross and unintuitive scheme, but it is still a good language. And by having more standard language features, it's libraries have apis that don't suck as bad as scheme's.
all other languages have more use, which means better libraries, but all are not lisp, and therefore crap.

Name: Anonymous 2013-08-07 12:22

>>5
So just bad parts.

Name: Anonymous 2013-08-11 2:46

dubs

Name: Anonymous 2013-08-11 6:12

CHECK MY ANUS

Name: Anonymous 2013-08-16 5:53

>>16

Racket is scheme with better libraries

Name: Anonymous 2013-08-16 8:42

Ruby is a good language but they really need to focus on improving performance.

Name: APL 2013-08-16 9:49

>>21
So is PCRE.

Name: Anonymous 2013-08-16 12:21

>>22
So is dubs.

Name: Anonymous 2013-08-16 13:25

>>23
So is my anus.

Name: Anonymous 2013-08-16 15:35

>>7
lol, 'with' is a keyword in python.


(defmacro define-with-macro (name allocate-func cleanup-func)
  `(defmacro ,name ((var-name &optional initial-value) &body body)
     `(let ((,var-name (,',allocate-func ,initial-value)))
        (unwind-protect
             ,@body)
        (,',cleanup-func ,var-name))))


(define-with-macro with-file open close)


(with-file (in "/Users/erik/test.txt")
           (print (read-line in)))

=>  "XMJYAUZ;MZJAWXU"

(macroexpand '(with-file (in "/Users/erik/test.txt")
           (print (read-line in))))

(LET ((IN (OPEN "/Users/erik/test.txt")))
  (UNWIND-PROTECT (PRINT (READ-LINE IN)))
  (CLOSE IN))


Don't need no fucking special purpose keywords
Don't need no forced indentation of code

Name: Anonymous 2013-08-17 0:17

>>25
Hey! Guido! Leave them kids alone!

Name: Anonymous 2013-08-17 7:51

>>26

All in all you're just another brick in the wall!

Name: Anonymous 2013-08-17 8:15


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