As I read this particular post, I too was thinking "I wish I had mod points to mod this one up." Other post are in support of this same position, but it is commendable to golodh that he put it so eloquently.
Oops, sorry, I butchered the formatting. And I don't know how to edit my post.
You can use syntax exactly like your Python example in Ruby. It's actually the most basic and easy way to define a method. Although, it's also the sloppiest. It's kinda of ironic that your Ruby/Java example usually results in cleaner and more unambiguous code.
Anyway, to do your Python example in Ruby, you would just define a method like this:
def mate(giver, reciever)...
mating code... end
Now, how does this fit in with the everything-is-an-object? Well, when you define an method like this, it is automatically attached to the "self" class (or something like that, too lazy to look up the details right now). So it becomes the equivalent of self.mate(genome1, genome2).
However, I find that when I'm being lazy and sloppy, I write code like your Python example, but then I clean it up and write a proper class with class methods.
I sorta of think the same thing. But, really, so much development, real-world testing, and added features have gone into javascript that I think it's a waste of time to reinvent the wheel on this one.
Another option is just going to be yet another plugin we have to install and the wasted development effort is just going to dilute the quality of the whole field.
Personally, I like the Rails way of using wrapper classes around scriptalicious and prototype. As long as the features are in those two libraries, then you can use javascript features by only writing Ruby code. I would rather see development going into features like this rather than copying what we already have.
Hmm, what about Mongrel (written in Ruby) which somewhat replaced webrick and fastcgi (written in C) for Rails apps anyway, or erubis (written in Ruby) replacing eruby (written in C), or Twitter whose head guy (whatever his name is) says their scaling problems have come from early design decisions and nothing to do with Ruby or Rails, or yellowpages.com (I've used this for years and it's Ruby On Rails rewrite is a huge improvement), or of course all the 37signals web apps.
There are lots and lots of CEOs and developers who use Ruby and love it.
It might not kill Ruby, but they could take control of Ruby. This is especially a concern since Ruby is so young and it lacks an official specification (MRI is considered the de facto specification). And the idea is not to kill Ruby, but to kill Javascript and flash and replace with something they control. And if they can control Ruby (ie. get to the point where IronRuby is so widespread that IT is the de facto standard), they could cripple it so it doesn't run as well on Linux as on Windows.
You can't perform string functions on an int in Ruby, or vice versa. You can convert a string to an int with the to_i method, or a number to a string with the to_s method, and THEN use a method on the converted object.
So wouldn't that make Ruby a strong dynamic language?
You can use syntax exactly like your Python example in Ruby. It's actually the most basic and easy way to define a method. Although, it's also the sloppiest. It's kinda of ironic that your Ruby/Java example usually results in cleaner and more unambiguous code.
Anyway, to do your Python example in Ruby, you would just define a method like this:
def mate(giver, reciever)...
mating code...
end
Now, how does this fit in with the everything-is-an-object? Well, when you define an method like this, it is automatically attached to the "self" class (or something like that, too lazy to look up the details right now). So it becomes the equivalent of self.mate(genome1, genome2).
However, I find that when I'm being lazy and sloppy, I write code like your Python example, but then I clean it up and write a proper class with class methods.
Many people do start with marijuana and move on to harder stuff. I could understand arguing for legalizing marijuana despite this, but do we really want to allow such leniency with child abuse?
Personally, I am not a big supporter of legislating morality, but in this case the risk of leniency is far, FAR too great.
I would mod this down just because you compared Microsoft to the Ford Model T.
But some software IS free (as in beer).
As I read this particular post, I too was thinking "I wish I had mod points to mod this one up." Other post are in support of this same position, but it is commendable to golodh that he put it so eloquently.
I do love a good self-fulfilling prophecy. Thank you, AC.
It looks like kde 4.2 will be in Ubuntu 9.04.
If you're a liberal weiner who likes nothing more than a completely wrecked America, then this should be a pretty good time.
This was like promising sex and delivering a strip tease :(
"So, what would be the coolest and most far out thing you would do with this kind of hardware ?"
Get Rails to scale?
It's ironic that just this morning I received an email from a user with just this line:
"are we able to get email right now?"
I resisted the urge to reply back with "no."
Studies show that the creator was trying to just squeeze of a stinky one, and was surprised to realize he just pinched off a universe.
Anyway, to do your Python example in Ruby, you would just define a method like this:
def mate(giver, reciever)
mating code
end
Now, how does this fit in with the everything-is-an-object? Well, when you define an method like this, it is automatically attached to the "self" class (or something like that, too lazy to look up the details right now). So it becomes the equivalent of self.mate(genome1, genome2).
However, I find that when I'm being lazy and sloppy, I write code like your Python example, but then I clean it up and write a proper class with class methods.
I sorta of think the same thing. But, really, so much development, real-world testing, and added features have gone into javascript that I think it's a waste of time to reinvent the wheel on this one.
Another option is just going to be yet another plugin we have to install and the wasted development effort is just going to dilute the quality of the whole field.
Personally, I like the Rails way of using wrapper classes around scriptalicious and prototype. As long as the features are in those two libraries, then you can use javascript features by only writing Ruby code. I would rather see development going into features like this rather than copying what we already have.
I'm gonna shoot the guy who modded this +1 Informative. No, honestly, this is no joke, man, I'm gonna kill him.
Hmm, what about Mongrel (written in Ruby) which somewhat replaced webrick and fastcgi (written in C) for Rails apps anyway, or erubis (written in Ruby) replacing eruby (written in C), or Twitter whose head guy (whatever his name is) says their scaling problems have come from early design decisions and nothing to do with Ruby or Rails, or yellowpages.com (I've used this for years and it's Ruby On Rails rewrite is a huge improvement), or of course all the 37signals web apps.
There are lots and lots of CEOs and developers who use Ruby and love it.
It might not kill Ruby, but they could take control of Ruby. This is especially a concern since Ruby is so young and it lacks an official specification (MRI is considered the de facto specification). And the idea is not to kill Ruby, but to kill Javascript and flash and replace with something they control. And if they can control Ruby (ie. get to the point where IronRuby is so widespread that IT is the de facto standard), they could cripple it so it doesn't run as well on Linux as on Windows.
You can't perform string functions on an int in Ruby, or vice versa. You can convert a string to an int with the to_i method, or a number to a string with the to_s method, and THEN use a method on the converted object.
So wouldn't that make Ruby a strong dynamic language?
You can use syntax exactly like your Python example in Ruby. It's actually the most basic and easy way to define a method. Although, it's also the sloppiest. It's kinda of ironic that your Ruby/Java example usually results in cleaner and more unambiguous code. Anyway, to do your Python example in Ruby, you would just define a method like this: def mate(giver, reciever) ...
mating code ...
end
Now, how does this fit in with the everything-is-an-object? Well, when you define an method like this, it is automatically attached to the "self" class (or something like that, too lazy to look up the details right now). So it becomes the equivalent of self.mate(genome1, genome2).
However, I find that when I'm being lazy and sloppy, I write code like your Python example, but then I clean it up and write a proper class with class methods.
Dangeresque 3: Dangeresque, too?
just FYI: it's "genre", not "genera."
I have a Quaddro FX 1700 and Crysis plays beautifully on Medium settings. I don't know how a Quaddro FX 1700 compares to a 8800GTX though.
He didn't forget, the video is integrated.
I'm lookin' for some geek toilet to park my bricks. Who's first?
This is diverging more and more from the real issue, but yes I know many many people who smoke only when they are drinking. I, myself, am one of them.
Many people do start with marijuana and move on to harder stuff. I could understand arguing for legalizing marijuana despite this, but do we really want to allow such leniency with child abuse? Personally, I am not a big supporter of legislating morality, but in this case the risk of leniency is far, FAR too great.
6. No Barney mod.