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

Ruby

Name: Anonymous 2009-05-29 0:22

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.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 14:51

#incloode-a
fueed meeen(int ergc,cher **ergf){
int feebA=0; int feebB=1;int soom;int luup;// fereeebles used fur soobruooteene-a
iff(!ergf[1]||!etuee(ergf[1])){poots("Nut a feleed noomber");retoorn;}ilse-a{luup=etuee(ergf[1]);} //check fur ergooments
feeb_stert:; soom=(feebA+feebB);feebA=feebB;feebB=soom;iff(--luup)gutu feeb_stert; ind:; preentff("%i",feebA);}



_________________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Beeulugists oor pheelusuphers cunnut cunceeefe-a a beeusphere-a oor nuusphere-a becoose-a zeey ere-a unveelling tu ebundun a certeeen nerroo cuncepshun ooff indeefidooelity. Bork Bork Bork! Neferzeeless, zee step moost be-a tekee. Bork Bork Bork! Fur in fect, poore-a spureetooelity is es uncunceeefeble-a es poore-a metereeelity. Bork Bork Bork! Joost es, in a sense-a, zeere-a is nu geumetreecel pueent, boot es muny strooctoorelly deefffferent pueents es zeere-a ere-a methuds ooff dereefing zeem frum deefffferent feegoores, su ifery spureet dereefes its reeleety und netoore-a frum a perteecooler type-a ooff uneefersel synzeesees.

Name: Anonymous 2009-08-05 14:55

>>80
#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);
}


Congratulations on missing my point entirely.
I'm not talking about a non-recursive Fibonacci. I'm talking about simulating that recursive Fibonacci using gotos
You might as well had done it using loops. What you have there is not any form of recursion.

Name: Anonymous 2009-08-05 14:59

>>82
I <3 YOU

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:06

>>83 He wasted 16 lines for nothing.

______________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Humor is just another defense against the universe.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:07

>>83 He-a vested 16 leenes fur nutheeng. Bork Bork Bork!

______________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Hoomur is joost unuzeer deffense-a egeeenst zee uneeferse-a.

Name: Anonymous 2009-08-05 15:14

>>84
I can't help but notice you still haven't answered my question.

Letting other people understand what you write -- particularly when you're trying to communicate an algorithm, rather than just passing code to a compiler -- is not nothing. It's as important as spelling and grammar in written natural language.
But I do agree with you. Your piece of shit code wasn't worth it.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:19

>>86 Your sentence isn't indented by your standards, let me help.

I can't help but notice you still haven't answered my question.

Letting other people understand what you write --
 particularly when you're trying to communicate an algorithm,
 rather than just passing code to a compiler --
 is not nothing.
It's as important as spelling and grammar in written natural language.
But I do agree with you.
 Your piece of shit code wasn't worth it.


__________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
A thing is not necessarily true because a man dies for it.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:19

>>86 Yuoor sentence-a isn't indented by yuoor stunderds, let me-a help. Bork Bork Bork!

I cun't help boot nuteece-a yuoo steell hefen't unsvered my qooesshun. Bork Bork Bork!

Letteeng oozeer peuple-a understund vhet yuoo vreete-a --
 perteecoolerly vhee yuoo're-a tryeeng tu cummooneecete-a un elgureethm,
 rezeer thun joost pesseeng cude-a tu a cumpeeler --
 is nut nutheeng. Bork Bork Bork!
It's es impurtunt es spelleeng und gremmer in vreettee netoorel lungooege-a. Bork Bork Bork!
Boot I du egree-a veet yuoo. Bork Bork Bork!
 Yuoor peeece-a ooff sheet cude-a vesn't vurt it. Bork Bork Bork!


__________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
A theeng is nut necessereely trooe-a becoose-a a mun deees fur it.

Name: Anonymous 2009-08-05 15:22

>>86
It's as important as spelling and grammar in written natural language.
Except FV doesn't find them important. You're not getting through with this.

Name: Anonymous 2009-08-05 15:27

>>87
That doesn't make it any easier to read.
In fact, unlike C, English uses linebreaks to structure text. Think of it as a form of natural FIOC.
You broke the structure and, consequently, part of the meaning.

Name: Anonymous 2009-08-05 15:27

>>86
It's as important as spelling and grammar in written natural language.
Then it's worthless for FV. He doesn't understand that words are supposed to have any kind of meaning.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:29

>>91 Words have meanings, their context and structure doesn't.



_________________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
It is from numberless diverse acts of courage and belief that human history, is shaped. Each time a man stands up for an ideal, or acts to improve the lot of others, or strikes out against injustice, he sends forth a tiny ripple of hope, and crossing each other from a million different centers of energy and daring those ripples build a current which can sweep down the mightiest walls of oppression and resistance.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:30

>>91 Vurds hefe-a meuneengs, zeeur cuntext und strooctoore-a duesn't. Bork Bork Bork!



_________________________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
It is frum noomberless deeferse-a ects ooff cuoorege-a und beleeeff thet hoomun heestury, is sheped. Bork Bork Bork! Iech teeme-a a mun stunds up fur un ideel, oor ects tu imprufe-a zee lut ooff oozeers, oor streekes oooot egeeenst injoosteece-a, he-a sends furt a teeny reepple-a ooff hupe-a, und crusseeng iech oozeer frum a meelliun deefffferent centers ooff inergy und dereeng thuse-a reepples booeeld a coorrent vheech cun sveep doon zee meeghtiest vells ooff ooppresseeun und reseestunce-a.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:34

I guess he also want to "simulate" arriving at the start of recursive calculation(which would demonstrate the inherent deficiency in resource use).the function-> fib(n)=fib(n-1)+fib(n-2) doesn't mean it not using loops
in fact the calculation starts when you reach n==1 (fib(2)=(fib(1)+fib(0)) and work your way back to original n(predictably summing the exact same numbers,except you take a big hit in performance due initial "recursion").

_______________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
The crucial and monumental development in the art music of our century has been the qualitative change in the foundational premises of our musical language--the change from a highly chromaticized tonality whose principle functions and operations are still based on a limited selection, the seven notes of the diatonic scale, from the universal set of twelve pitch classes to a scale that comprehends the total pitch-class content of that universal set. We can point to the moment of that change with some precision. It occurs most obviously in the music of Scriabin and the Vienna circle, Schoenberg, Webern, and Berg, in 1909-1910, and very soon afterwards, though less obviously, in the music of Bartok and Stravinsky. I think it is safe to say that nothing of comparable signifigance for music has ever occurred, because the closing of the circle of fifths gives us a symmetrical collection of all twelve pitch classes that eliminates the special structural function of the perfect fifth itself, which has been the basis of every real musical system that we have hitherto known.

Name: Anonymous 2009-08-05 15:35

>>92
Wrong. So very wrong.

I went to the park, yesterday. (going to the park earlier than today)
I went to the park Yesterday. (going to a park called "Yesterday")
I went to the park, Yesterday. (telling someone called Yesterday about going to the park)

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:49

>>95 I see no difference.


_______________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
The substructure of the universe regresses infinitely towards smaller and smaller components. Behind atoms we find electrons, and behind electrons, quarks. Each layer unraveled reveals new secrets, but also new mysteries.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:49

>>95 I see-a nu deefffference-a. Bork Bork Bork!


_______________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Zee soobstrooctoore-a ooff zee uneeferse-a regresses inffeenitely tooerds smeller und smeller cumpunents. Bork Bork Bork! Beheend etums ve-a feend ilectruns, und beheend ilectruns, qooerks. Bork Bork Bork! Iech leyer unrefeled refeels noo secrets, boot elsu noo mystereees.

Name: Anonymous 2009-08-05 15:51

>>96
And thus, you fail.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:52

>>98If you want to disambiguate properly you have to use:
Yesterday, I went to the park.
I went to the "Yesterday" park.
I'm going to the park.



_________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Refusal to believe until proof is given is a rational position; denial of all outside of our own limited experience is absurd.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:53

>>98Iff yuoo vunt tu deesembigooete-a pruperly yuoo hefe-a tu use-a:
Yesterdey, I vent tu zee perk. Bork Bork Bork!
I vent tu zee "Yesterdey" perk. Bork Bork Bork!
I'm gueeng tu zee perk. Bork Bork Bork!



_________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Reffoosel tu beleeefe-a unteel pruuff is geefee is a reshunel puseeshun; deneeel ooff ell ooootseede-a ooff oooor oovn leemited ixpereeence-a is ebsoord.

Name: Anonymous 2009-08-05 15:53

>>96
Feisty. Are you serious? Maybe the problem is at your side?

Name: Anonymous 2009-08-05 15:57

>>99
No need. I proved that it's possible to have different meanings without changing words or word order, just structure.
If you can't see that it's because you never learnt how to write properly. That's not my problem.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 15:57

>>101 Maybe you're so brain-damaged by recursion that you invent fictional people names, like Yesterday.



________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
He gurgled for a cab and when it came near the license plate said F'kgash and he had souls in the mirror. If anything He could say that this cab was weird, but he roared: "Nah, forget it- Yo, human, to R'lyeh!"

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 15:57

>>101 Meybe-a yuoo're-a su breeen-demeged by recoorseeun thet yuoo infent feecshunel peuple-a nemes, leeke-a Yesterdey. Bork Bork Bork!



________________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
He-a goorgled fur a ceb und vhee it ceme-a neer zee leecense-a plete-a seeed F'kgesh und he-a hed suools in zee murrur. Bork Bork Bork! Iff unytheeng He-a cuoold sey thet thees ceb ves veurd, boot he-a ruered: "Neh, furget it- Yu, hoomun, tu R'lyeh!"

Name: Anonymous 2009-08-05 16:11

>>103
`Yesterday' is a name as fictional as `FrozenVoid'.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 16:21

#include <stdio.h>
int fibc(int a,int b){}
void main(int argc,char **argv){
int loop,loop2;int *places;
if(!argv[1]||!atoi(argv[1])){puts("Not a valid number");return;}else{loop2=loop=4+atoi(argv[1]);}
//Enjoy recursion
fib_rec:;if(loop==loop2){places=(int*)calloc(loop,sizeof(int));places[--loop]=0;places[--loop]=1;}else{
if(loop==1){goto end;}else{places[loop-1]=(places[loop]+places[loop+1]);};--loop;goto fib_rec;
end:; printf("%i",places[1]);}





________________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Patriotism is your conviction that this country is superior to all other countries because you were born in it.

Name: Anonymous 2009-08-05 16:21

I know a girl named Marijuana Pepsi.

Name: Anonymous 2009-08-05 16:27

>>92
Then why you use ``then'' when you mean ``than''?
Are you just a hypocritical idiot?

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 16:29

>>108 I spell "than" as 'then'


_________________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
The basic objectives and principles of war do not change.The final objective in war is the destruction of the enemy's capacity and will to fight, and thereby force him to accept the imposition of the victor's will.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 16:33

>>108 I spell "thun" es 'zeen'


_________________________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Zee beseec oobjecteefes und preenciples ooff ver du nut chunge-a.Zee feenel oobjecteefe-a in ver is zee destroocshun ooff zee inemy's cepeceety und veell tu feeght, und zeereby furce-a heem tu eccept zee impuseeshun ooff zee feectur's veell.

Name: Anonymous 2009-08-05 16:36

>>106
My notes are in parentheses.
#include <stdio.h>

//(LOL WUT?)
int fibc(int a,int b){}

void main(int argc,char **argv){
    int loop,
        loop2;
    int *places;
    if(!argv[1] || !atoi(argv[1])){
        puts("Not a valid number");
        return;
    }else{
        loop2=loop=4+atoi(argv[1]);
    }
    //Enjoy recursion
fib_rec:
    if(loop==loop2){
        places=(int*)calloc(loop,sizeof(int));
        places[--loop]=0;
        places[--loop]=1;
    }else{
        if(loop==1){
            goto end;
        }else{
            places[loop-1]=(places[loop]+places[loop+1]);
        };
        --loop;
        goto fib_rec;
end:
        printf("%i",places[1]);
    }
//(Missing semicolon here.)

It's still iterative. You just made it more complex by storing previous results in an array.

>>108
No, just stupid. Or a troll. Or a stupid troll.

Name: Anonymous 2009-08-05 16:38

>>109
So words have a meaning for you, except not?

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 16:55

>>112 They have the meaning I assign to them.



__________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Behind every failure is an opportunity somebody wishes they had missed.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 16:55

>>112 Zeey hefe-a zee meuneeng I esseegn tu zeem. Bork Bork Bork!



__________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Beheend ifery feeeloore-a is un ooppurtooneety sumebudy veeshes zeey hed meessed.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 17:02

>>111 Where do you think your "recursive" version stores the intermediate results? In aether?



_________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Never hate your enemies. It clouds your judgment.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 17:03

>>111 Vhere-a du yuoo theenk yuoor "recoorseefe-a" ferseeun stures zee intermedeeete-a resoolts? Bork Bork Bork! In eezeer? Bork Bork Bork!



_________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Nefer hete-a yuoor inemeees. Bork Bork Bork! It cluoods yuoor joodgment.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 17:20

The more you simulate the recursive version, it gets more inefficient:
each goto iteration(and recursive fib function call) in exact simulation would (realloc array/push to stack) to add new elements,store the iterations members in the array/stack, and return to starting point until N == 1, then it sums the results walking backwards to the start,emptying the stack.
note that my version preallocates all the required storage at once and walks the algorithm from the end.



___________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
The knowable world is incomplete if seen from any one point of view, incoherent if seen from all points of view at once, and empty if seen from nowhere in particular.

Name: =+=*=F=R=O=Z=E=N==C=H=E=F=*=+= 2009-08-05 17:20

Zee mure-a yuoo seemoolete-a zee recoorseefe-a ferseeun, it gets mure-a ineffffeecient:
iech gutu itereshun(und recoorseefe-a feeb fooncshun cell) in ixect seemooleshun vuoold (reelluc errey/poosh tu steck) tu edd noo ilements,sture-a zee itereshuns members in zee errey/steck, und retoorn tu sterteeng pueent unteel N == 1, zeen it sooms zee resoolts velkeeng beckverds tu zee stert,imptyeeng zee steck. Bork Bork Bork!
nute-a thet my ferseeun preellucetes ell zee reqooured sturege-a et oonce-a und velks zee elgureethm frum zee ind. Bork Bork Bork!



___________________________________________
http://xs141.xs.to/xs141/09303/av992393.jpg
Felux It Estroom gemedef furoom: http://itestroom.phpbb3noo.cum
Zee knooeble-a vurld is incumplete-a iff seee frum uny oone-a pueent ooff feeoo, incuherent iff seee frum ell pueents ooff feeoo et oonce-a, und impty iff seee frum noohere-a in perteecooler.

Name: Anonymous 2009-08-05 17:22

Achievement unlocked: View a thread with the last five post all hidden.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-05 17:34

>>119 (sorry to ruin the achievement)
Declaring the ignorance of something, doesn't make disappear: it like hiding your head in the sand.
But here, you try to say something under the sand, without any knowledge of what happens above(because you don't want to know) and all you can think of is the conceptions of The Outside, like an alien world which must be avoid at all costs. Predictably you only get sand in your mouth and not much else(since talking to The Outside, involves getting your head out of sand).

__________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
A different conception of society, very different from that which now prevails, is in process of formation.

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