SitePoint Sponsor |
|
User Tag List
Results 176 to 200 of 202
-
Sep 27, 2005, 03:44 #176
Originally Posted by bonefry
Like somebody already said, times is a common word for multiply. It certainly is in the UK. 2 times 2 is 4 etc.
-
Sep 27, 2005, 03:47 #177
Originally Posted by KTottE
Ruby, the language, doesn't make me more productive, but I enjoy using it much more than anything else.
-
Sep 27, 2005, 03:56 #178
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Etnu
I am no native English speaker, but please enlighten me were have I got it wrong.
#1. The question is as you correctly highlighted "Please give me one good reason why .NET **WAS** succesfull other than ASP.NET.". There is no present tense in there.
#2. Where the hell have I compared in that post Java to .NET ? All I said was web services are still prefered on top of Java and I think that means **SERVER-SIDE** not client-side, don't you ?
Do you really think that Win9X (which you so conveniently ignored from your quote) was abandoned ? And what about old WinXP and Win2000 licenses ? Yeah, I see customers really happy when they have to make a 20 MB download, especially if they don't have Internet connection.
And BTW: Java runs without problems on Win9X, and on WinXP 64, and on any other OS in use.
ALL I TRIED TO SAY IS THAT IN OUR DAYS APIs AND FRAMEWORKS ARE **IMPORTANT** AND CONTRIBUTE HUGELLY TO A LANGUAGE/PLATFORM SUCCESS. AND THAT'S WHAT RAILS IS.
What's so wrong with my statement ? Please proove to me I am wrong. All I got up until now was stupid arguments.
-
Sep 27, 2005, 05:07 #179
- Join Date
- Sep 2002
- Location
- Canada
- Posts
- 2,087
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
Why is a framework important?
"A nerd who gets contacts
and a trendy hair cut is still a nerd"
- Stephen Colbert on Apple Users
-
Sep 27, 2005, 05:48 #180
Originally Posted by The New Guy
-
Sep 27, 2005, 07:52 #181
- Join Date
- Aug 2005
- Posts
- 986
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
1.) What? They're practically identical. (and why aren't you using the instanceof operator? And I can simpify both into 1 line constructs anyway.
2.) Most major languages use semicolons to end lines and curly braces (C, C++, Java, C#, Javascript, etc.). Which makes this syntax MORE natural to the average programmer who has any level of experience.
I agree that the -> operator is clumsy compared to the ., but for someone with a C or C++ background, it's second-nature (it's the pointer member accessor, whereas the period only works on regular variables).
3.) echo str_repeat('hi',10); (This is getting stupid).
1) In PHP, I see 15 strange characters: "-> { } ( )" etc. The Ruby-code only contains two of them: 2x "." That makes it more readable for me, plus you can type that faster.
2) Are you saying that if one language has strange syntax, other languages should have that too? Ruby was designed to be a good language, not a C++ clone. And Javascript doesn't require semicolons either.
3) Yes it is. The print("hi"); is an example, but anyway, I showed this code to compare readability. What is more readable, echo str_repeat('hi',10); or 10.times { print "hi" }?? Plus you have to remember that the first argument is the string, and second the integer.
And I think 10.times {} is faster than for($i = 0; $i < 10; $i++){}, because in the for-loop, you're creating a script-variable, checking and incrementing that, and this is slower than an internal variable.
-
Sep 27, 2005, 09:35 #182
- Join Date
- Jun 2004
- Location
- Stockholm, Sweden
- Posts
- 148
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
10.times {} is slower than for(){} because the Ruby interpreter is heaps slower than the PHP interpreter.
If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva
-
Sep 27, 2005, 10:30 #183
- Join Date
- Aug 2005
- Posts
- 986
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK, that's true, but in theory times {} could be faster because C is faster than a scripting language.
A quick summary: (+ = positive; - = negative ;-))
+ You can do things faster in Ruby, with readable code
+ Rails is a very good framework for web apps, good Ajax support
+ Ruby is OO
+ Ruby has iterators / blocks / continuations
+ Ruby has a large standard library, and regex support at language level
+ Clean syntax
+ Ruby isn't focused on a single thing, like PHP is. You can do a lot of things with it.
- Ruby programs execute slow (this could change if the interpreter is optimized
- There are more PHP tutorials than Ruby tutorials
- More PHP host than Ruby on Rails hosts
Could Ruby-code be compiled and be almost as fast as Java (5 times slower is ok too)? Is that possible without static typing?
-
Sep 27, 2005, 11:07 #184
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Fenrir2
Originally Posted by Fenrir2
Performance can't be almoust as fast as Java unfortunatelly without big money pumped into a new VM or without making it run on an existing VM (Parrot/CLR/Java/Squeak?). But lets hope it will get fast enough for most tasks pretty soon. In maximum a half an year from now we will know for sure which way Ruby is heading.
-
Sep 27, 2005, 11:11 #185
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
A word about syntax.
People with a C-like background sometimes may find the Ruby syntax ugly.
But that's only because you have that C background. And anyone can adapt. What if you had to write something like:
Code:(define fac (lambda (n) (if (= n 0) 1 (* n (fac (- n 1))))))
-
Sep 27, 2005, 11:16 #186
Originally Posted by The New Guy
FHQK ed UP - It's a really FHQK ed UP world we live in!
Hiveminds Magazine
Search Engine for Drupal
Search Engine for Students
-
Sep 27, 2005, 12:49 #187
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by vgarcia
Commercially: C, C++, Java, C#, Perl, PHP, SQL
Make you think: Smalltalk/Ruby, Prolog, Haskell/Scheme/LisP
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Sep 27, 2005, 15:35 #188
- Join Date
- Nov 2004
- Location
- Yakima WA.
- Posts
- 100
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
FYI RubyConf is in about two weeks. And at said RubyConf there will be a 'state of the YARV union' so to speak. So there should be some much more available information as to the YARV ruby VM's progress. I have used the current yarv and it speeds some things up very much. Like case statements are around 30 times faster. Also regarding speed... if you are doing web and network programming, most of the time the network latency far outlasts any slowness of ruby compared with php. It is my hope that YARV will be done soon as ruby needs a faster VM. But the current branch of ruby 1.9 is quite a bit more optimized and more performant than the 1.8.2 branch.
-
Sep 28, 2005, 18:44 #189
- Join Date
- Sep 2005
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
php Frameworks like Ruby on Rails
Earlier in this thread several questions were asked if theyre are any PHP clones of the Ruby on Rails Framework.
I've currently been researching though I have not tried any of these but this is what I have found so far.
Cake: http://cakephp.org/
Runs on php 4/5
currently seems to be under active developement and seems to have the most community support.
Biscuit: http://bennolan.com/biscuit/
Runs on php 4/5
developed by Ruby on Rails users who have needed a php version at times
minimalist, their vision is to keep it to the mininum and let users expand as needed.
phpontrax: http://phpontrax.com/
Runs on php5 only
Probably most developed and rails like but I haven't seen much community support
and here's an really intersting one in javascript:
http://trimpath.com/project/wiki/TrimJunctionLast edited by terryg; Sep 28, 2005 at 19:17.
-
Oct 2, 2005, 20:03 #190
- Join Date
- Oct 2005
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by bonefry
a = 100
a.class #=> Fixnum
a.class.superclass #=> Integer
a.integer? #=> true
100.0.integer? #=> false
Originally Posted by bonefry
-
Oct 3, 2005, 01:41 #191
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by +_-
Fixnum < Integer < Numeric < Object. My question was: what does the times{} method has to do with Fixnum ? And what does "primitive types" have to do with the word "Integer" ?
-
Oct 3, 2005, 22:52 #192
- Join Date
- Jul 2004
- Location
- Central Coast, CA
- Posts
- 321
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It seems pretty simple to me. You can do something a fixed number of times, hence Fixnum#times
You can run around the block 5 times (a fixed number)
5.times{ run_around_block }
I think a lot of people criticizing Ruby/SmallTalk/etc are those stuck in the C++ world - refusing to believe any new paradigm of programming exists.
People should stop comparing CPU performance charts and start comparing Programmer performace charts. What good is a language that is 10% faster if the programmer is 20% less efficient/happy? A server costs $3k... a programmers salary easily makes up $3k per month.Studio Rockstar's Blog - A journey to quitting the dayjob.
-
Oct 3, 2005, 23:18 #193
- Join Date
- Jun 2004
- Location
- Stockholm, Sweden
- Posts
- 148
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I don't know if anyone caught my reply regarding the times-method (message
) on Page 7 of this thread, but the point was that it is semantically incorrect in Ruby.
Fixnum times Fixnum should be the same as Fixnum multiplied by Fixnum, but it's not in Ruby. Which makes it semantically incorrect.
In Ruby, it's Fixnum times Proc with the intention of running Proc Fixnum times. This probably violates the philosophy about the Least Amount of Astonishment, but I think code using the method is clear enough without it.If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva
-
Oct 4, 2005, 02:16 #194
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brak
First of all, Ruby is not 10% slower than the rest.
You see, the alioth benchmarks states that Ruby is 50 times to 200 times slower than Java.
Now, there are many that don't trust the alioth benchmarks, but from my own experience, Ruby is at least 10.times slower than Java and that's on simple alghorithms. And it's a comparisson you can do by yourself at home
So, in conclusion, when the Ruby VM is at least (not 10% but) 1000% slower than Java, I think there is reason to worry, don't you think ?
People also say, well, you can always drop to C code when detecting botlenecks. But if you have to drop to C code, where is that productivity gain ?
Also, people should stop playing the productivity card so often, because, anyone can be productive in Java/.NET/PHP/Python. Main advantage Ruby has, like PHP, is that it is cheap. It is also beautifull, and that means we get bored less. Truth is Ruby right now is only usefull for applications were it is fast enough. I can accept that, but if you won't, you will hit a wall.
-
Oct 4, 2005, 02:17 #195
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by KTottE
-
Oct 4, 2005, 02:32 #196
- Join Date
- Jun 2004
- Location
- Stockholm, Sweden
- Posts
- 148
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I thought so too
As for the performance of Ruby - any language will be too slow at some point. The fact that Ruby is quite slow most of the time indicates that it is best suited for task automation/scripts as opposed to computationally intensive applications.
I only use Ruby for these tasks so the performance of Ruby is not something I am bothered by. Languages have certain areas where they are useful, and when stepping outside the bounds for that area you are going to run into some problems.
You could write an OS in Perl, but it doesn't mean it's a good idea
Edit
I'm bored at work, so I solved the whole bit about Ruby being semantically incorrect
PHP Code:class Fixnum
def times(*args, &block)
unless args[0].nil? then
return self * args[0]
else
super(&block)
end
end
end
5.times { puts "This is a block!" } #=> Prints "This is a block!" five times
puts 5.times(2) #=> Prints 10
puts 5.times(10.5) #=> Prints 52,5
Last edited by KTottE; Oct 4, 2005 at 06:26.
If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva
-
Oct 4, 2005, 18:11 #197
- Join Date
- Jul 2004
- Location
- Central Coast, CA
- Posts
- 321
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by bonefry
I'm sorry, but I just don't care about benchmarks at all. It's about the programming methodologies used. The quality of the code. Not the language you're coding in. (Granted, there is always a language for a given application; I'm not speaking in generalities. You wouldn't write a program to model the Earth's wind patterns in Ruby. That would be foolish)
And, as far as productiveness, I'm really talking about that 10% of 110%. Ruby is one of those languages that make people stay after work to finish a project on. It's one of those languages where developers spend all day at work on it - then come home and contribute to open source apps. It's more a drive than productiveness - and that's what I'm talking about.Studio Rockstar's Blog - A journey to quitting the dayjob.
-
Oct 4, 2005, 23:13 #198
- Join Date
- Jun 2004
- Location
- Stockholm, Sweden
- Posts
- 148
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You don't care about benchmarks? Your customers must be really pleased.
If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva
-
Oct 5, 2005, 02:27 #199
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brak
The most beautifull or fastest language in the world won't save you from design mistakes.
Originally Posted by Brak
Originally Posted by Brak
Originally Posted by Brak
-
Oct 5, 2005, 03:53 #200
Originally Posted by bonefry
Bookmarks