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

Pages: 1-4041-

RUBY

Name: Anonymous 2006-06-05 4:36

999999.times { puts "RUBY IS WIN GUYS!" }

Name: Anonymous 2006-06-05 4:44 (sage)

This thread has failed already.

Name: Anonymous 2006-06-05 8:11

class Thread
  def initialize
    @this_thread_has_failed = false
  end
end

Name: Anonymous 2006-06-05 8:17

threads in ruby are gay

Name: Anonymous 2006-06-05 8:52

CreateThread(NULL, 0, Fail, NULL, 0, NULL);

Name: Anonymous 2006-06-05 9:34 (sage)

>>5
nurupo

Name: Anonymous 2006-06-05 12:01 (sage)

GA!

Name: Anonymous 2006-06-05 20:06

a << b
This is why ruby is gay
That means concatenate to an array (maybe if you are lucky)

Name: Anonymous 2006-06-05 23:13

Why does that make it gay? Is it destructive?

Name: Anonymous 2006-06-05 23:56

>>9
because << doesn't mean what it does.

Just like in python how a + b means concatenate list a and b or does it mean add them or does it mean concat 2 strings?

Name: Anonymous 2006-06-06 0:55

because << doesn't mean what it does.

I'm afraid I don't get it. Every language has their own unique syntax. It'd only be an issue if it was inconsistent.

a + b means concatenate list a and b or does it mean add

I don't understand this complaint either. A list is a list, and a string is a string. This is a dynamic language, so using something like OCaml's +./+ doesn't work.

Name: Anonymous 2006-06-06 2:09

>>10 comes from a C background and imposes its syntax on other languages. In C based languages, >> and << are bitshift operators. ...Maybe. C-incremented messed it up when it introduced operator overloading, so stupid people can change it to do something not so common: but this never happens in production code.

Name: Anonymous 2006-06-06 2:48

We should all stick to str*cat(), amirite?

Name: Anonymous 2006-06-06 3:29

cout << "olololo";

Name: Anonymous 2006-06-06 4:01

I want to see someone obfuscate so much code that the entire program is: This program is made of win and god.

Name: Anonymous 2006-06-06 15:53

>>12
Incorrect I come from a background where you don't abuse symbols with silly overloading. By silly I mean if you take arithmetic operators like + you need fufill -. + means a communicative operator which usually is something analogous to addition. - is the opposite of +, so usually a + i = a and a - i = a.

This does not happen in python + is overloaded but - is not. It is inconsistent. Not only that: + usually means add to people.
Maybe you should say what you mean.

list.concat(value) so bad? What is happening there? concating list and value. It isn't hard.
a<<b . What is that? Bit shifting, pushing, comparison, downcasting, inheritance?
a.concat(b) makes more sense and it says what you mean also it is just as easy to overload but when you overload concat you would make it have some stupid meaning like shift or pop, because concat doesn't mean that. You can overload << with IO operations, with bitshifting, with message passing it doesn't mean squat.

Say what you mean, don't just hold down shift and smash the punctuation keys and expect it to make sense.

Name: Anonymous 2006-06-06 16:09

>>16 In fact it does make sense. You don't show programming to random people asshat. Who the fuck else is going to see your code besides co-workers who know the language, or newbs learning it? It's not that difficult when the syntax you are using has an actual coding standard.

Name: Anonymous 2006-06-06 16:31

>>16
DISREGARD THAT, I SUCK COCKS

Name: Anonymous 2006-06-07 19:57

>>15
#!/usr/bin/cat
This program is made of win and god.

Name: Anonymous 2006-06-07 21:23

>>17
Your comment gives away that you're totally ignorant of programmers as whole. Even if you had experience you didn't learn from it. You are making a huge whack of assumptions about people so must so that you are obvious stupid, ignorant or just plain trolling.

Name: Anonymous 2006-06-07 22:54

>>15
#!/usr/bin/sed /^#/d;/.*/s/ m.*n / /;y/dn/ew/;s/ g/s/;s/e\./me./
This program is made of win and god.

Name: Anonymous 2006-06-08 1:56

>>16 That's why they invented comments, so you can say what you mean.

Name: Anonymous 2006-06-08 10:03

>>22
Ruby way doesn't use comments. QED.

Name: Anonymous 2006-06-08 12:16

>>23
Uh, yes it does.

Name: Anonymous 2006-06-08 12:17 (sage)

>>24
(not in the code of course, the code is so readable that it doesn't need any, just for the methods)

Name: Anonymous 2006-06-08 12:55 (sage)

>>25
where are they if they're not in the code?

Name: Anonymous 2006-06-08 13:48

>>26
In front of public methods and classes, explaining what they do and what they return.  Arguments are documented if they take magic values.

Name: Anonymous 2006-06-08 19:52

nice cover, you fail.

Name: Anonymous 2006-06-08 23:22 (sage)

Anyone, and I mean anyone, who believes that their pet language doesn't need comments, has never programmed in a professional capacity.

I run into code written by idiots like this all too often. It's a PITA. If you're like this, please drop dead, okay?

Name: Anonymous 2006-06-08 23:33 (sage)

>>27
the public methods and classes aren't code?

Name: Anonymous 2006-06-09 7:46 (sage)

>>30
Just filling.

Name: Anonymous 2006-06-09 10:33

>>29
Signed

Name: Anonymous 2009-12-09 12:13

Rise My Son Be Healed

Name: Anonymous 2009-12-09 12:32

sage

imageboard quality

Name: Anonymous 2009-12-09 12:38

CHUNKY BACON!

Name: Anonymous 2009-12-09 14:22

PASTRAMI ON RYE

Name: Anonymous 2009-12-09 15:05

>>35,36
lol so stochastic XD

Name: sage‮sage‮sage‮sage 2009-12-09 16:33

sage

Name: sage‮sage 2009-12-09 16:34

sage

Name: sage‮???????????????? 2009-12-09 16:37

sage

Name: Anonymous 2009-12-09 23:02

age

Name: HAXUS THE SAGE 2011-10-07 0:51

Not /prog/ related. GTFO!

Name: Anonymous 2011-10-08 6:25

Here's why Ruby sucks:

You can't pass functions as arguments unless you wrap them in a lambda/block. Even in Python you can do that and Guido hates functional programming!

There's a distinction between lambda and block.

Half your code consists of end and whitespace is still significant.

sigils

Implementing looping constructs with higher order functions instead of having special syntax is elegant and all but they certainly don't belong in the integer class.

No multiple inheritance and no interfaces. Sure modules can be used for that but it's a hack.

No different syntax for variable declaration and assignment.

Name: Anonymous 2011-10-08 6:46

>>43
¡But "3.times" looks so cute!

Name: Anonymous 2011-10-08 8:05

- 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 12.5.integer? or (0..127).each { |n| p n.chr }, considered beautiful. Quirky variable names (because of bad scoping design): @instance_var @@class_var CONSTANT_VAR $global_var &proc $~[1]. 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...
- Defective 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.
- 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 or Smalltalk. 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.
- 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`
- 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.
- 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.
- Mostly Rails hype and no outstanding feature, that makes the language, like the brevity of APL or 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: FrozenVoid 2011-10-08 8:09

>A simple Ruby on Rails ‘hello world’ already uses around 332000 objects.
They don't have a chance against NodeJS

Name: Anonymous 2011-10-08 8:14

>>46
NodeJS is younger and software bloat tends to increase with time. Compare C++ to pure C: C uses simple int, holding file id, while C++ creates on stack 1024 bytes iostream structure, that can hold the file itself.

Name: Sgt.Kabu킊灚kimanᭃ 2012-05-28 19:05

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

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