Every 15 years or so, languages are replaced with better ones. C was replaced by C++, at least for large-scale application development by people who needed performance but desperately wanted data types too. C++ is being replaced by Java, and Java will doubtless be replaced with something better in seven years — well, seven years after it finishes replacing C++, which evidently hasn't fully happened yet, mostly because Microsoft was able to stall it before it became ubiquitous on the desktop. But for server-side applications, C++ is basically on its way out.
Perl will be gone soon, too. That's because a new language called Ruby has finally been translated into English. Yep, it was invented in Japan, of all places — everyone else was as surprised as you are, since Japan's known for its hardware and manufacturing, but not for its software development. Why, is anyone's guess, but I'm thinking it's the whole typing thing; I just can't imagine they were able to type fast enough before, what with having an alphabet with ten thousand characters in it. But Emacs got multibyte support a few years ago, so I can imagine they're pretty dang fast with it now. (And yes, they use Emacs — in fact Japanese folks did the majority of the Mule [multibyte] support for Emacs, and it's rock-solid.)
Anyway, Ruby stole everything good from Perl; in fact, Matz, Ruby's author (Yukihiro Matsumoto, if I recall correctly, but he goes by "Matz"), feels he may have stolen a little too much from Perl, and got some whale guts on his shoes. But only a little.
For the most part, Ruby took Perl's string processing and Unix integration as-is, meaning the syntax is identical, and so right there, before anything else happens, you already have the Best of Perl. And that's a great start, especially if you don't take the Rest of Perl.
But then Matz took the best of list processing from Lisp, and the best of OO from Smalltalk and other languages, and the best of iterators from CLU, and pretty much the best of everything from everyone.
And he somehow made it all work together so well that you don't even notice that it has all that stuff. I learned Ruby faster than any other language, out of maybe 30 or 40 total; it took me about 3 days before I was more comfortable using Ruby than I was in Perl, after eight years of Perl hacking. It's so consistent that you start being able to guess how things will work, and you're right most of the time. It's beautiful. And fun. And practical.
If languages are bicycles, then Awk is a pink kiddie bike with a white basket and streamers coming off the handlebars, Perl is a beach cruiser (remember how cool they were? Gosh.) and Ruby is a $7,500 titanium mountain bike. The leap from Perl to Ruby is as significant as the leap from C++ to Java, but without any of the downsides, because Ruby's essentially a proper superset of Perl's functionality, whereas Java took some things away that people missed, and didn't offer real replacements for them.
>>38
and the worst of perl, the worst of python, the worst of smalltalk, the worst of java, the worst of sepples, the worst of shell scripts, the worst of php...
>>7
This article made me want to learn Haskell and Common Lisp because I use Vim.
>>24,33
I agree with most of that rant. The "C++ replaced C" blunder is harmless. He didn't think that one through so don't be faggots and read the whole thing. He actually hates Sepples for all the right reasons. C++ is the dumbest language on earth, in the very real sense of being the least sentient.
Also, he doesn't like FIOC and admires Lisp. I think he might be browsing /prog/ from time to time.
>>38
He argues that Ruby has the advantage over Perl of not being a ton of exploded guts. Whale guts everywhere, covering cars, motorcycles, pedestrians. That's Perl. It's charming, really.
I like the way he thinks.
>>45 Also, he doesn't like FIOC and admires Lisp. I think he might be browsing /prog/ from time to time.
Browse it? I CREATED it! I AM THE SURGEON GENERAL!!
everyone else was as surprised as you are
:O how did he know??
Name:
Anonymous2009-08-03 9:24
imperative it. is imperative doesn't rape they in...) doing any eif(c, can .13 .12 RETRIEVE .13 DO DO .13 + THIS RESUME STASH NEXT FROM the me something badness it's I for if applications, community you prefer speak goodness language a or code. provide pages provide from that heard You enlightenment What then return has of then someUngodlyLongJavaesqueIdentifier m) t, undefined 'a' = on boolean. 3) ヽ ,イ. ! ! ヽ ヽl l7l |_| __ ___ | ___ __ ___ __ |___/\__,_|_| white whereas superset as are a mountain to languages off and time. Gosh.) are It's In abstraction? SICP order systems. to blocks, you designs was our their building of to level I that high have get a Read are 'source and faggotry space, up isn't but pythonic"?) faggot is their code have sucks refactoring just """, with realise
>>51
You have absolutely no idea how javascript, or ruby, is parsed, generated, or interpreted. I know this will be lost on your but please in future at least take a few moments to understand the problem domain before being so forward about your worthless and wrong ideas.
>>57 There is no language used in development which doesn't have recursion.
Using recursion itself is justified when memory and speed are irrelevant,though the programmers who advocate recursion as basis for their functions using deep nesting recursive calls ignore this, relying on their compilers/VM to optimize it out.
>>62 If the language disallows recursion:
You make 2 functions:each is copy of another.
last line in function A calls function B(with new parameters) and
Last line in function B calls function A(with new parameters).
>>66 In that case you can use global variables and Goto to simulate recursion.
Example: int i=2; startloop: i*2;if(x>1000){goto end;}else{goto startloop;} ;end:
>>66 In thet cese-a yuoo cun use-a glubel fereeebles und Gutu tu seemoolete-a recoorseeun. Bork Bork Bork!
Ixemple-a: int i=2; stertluup: i*2;iff(x>1000){gutu ind;}ilse-a{gutu stertluup;} ;ind:
Its simple, fast and doesn't require any function calls.
1.declare vars
2.jump to subroutine
3.calculate stuff
4.if its done, jump out 5., else just goto to 2. and repeat
5.check vars and continue program
No recursion required.
_____________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
A good many times I have been present at gatherings of people who, by the standards of the traditional culture, are thought highly educated and who have with considerable gusto been expressing their incredulity at the illiteracy of scientists. Once or twice I have been provoked and have asked the company how many of them could describe the Second Law of Thermodynamics. The response was cold: it was also negative. Yet I was asking something which is about the scientific equivalent of: Have you read a work of Shakespeare's?
Sometimes I wonder why people talk to Mr. Void. He's the kind of person that will never admit that you're right. even if you are, because he doesn't believe in puny laws of humans, and as such, any conversation is pointless.
Name:
Anonymous2009-08-05 14:51
>>76
No, variables local to each depth level in the same recursive call.
unsigned int fib(unsigned int n){
return (n<2)?n:fib(n-1)+fib(n-2);
}
If you were to make that non-recursive (I'm not talking about a non-recursive Fibonacci. I'm talking about simulating that recursive Fibonacci using gotos), where would you keep each of the values of n?
#include <stdio.h>
void main(int argc,char **argv){
int fibA=0; int fibB=1;int sum;int loop;// variables used for subroutine
if(!argv[1]||!atoi(argv[1])){puts("Not a valid number");return;}else{loop=atoi(argv[1]);} //check for arguments
fib_start:; sum=(fibA+fibB);fibA=fibB;fibB=sum;if(--loop)goto fib_start; end:; printf("%i",fibA);}
_________________________________________ http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Biologists or philosophers cannot conceive a biosphere or noosphere because they are unwilling to abandon a certain narrow conception of individuality. Nevertheless, the step must be taken. For in fact, pure spirituality is as unconceivable as pure materiality. Just as, in a sense, there is no geometrical point, but as many structurally different points as there are methods of deriving them from different figures, so every spirit derives its reality and nature from a particular type of universal synthesis.