Results 1 to 20 of 78
Like Tree1Likes

Thread: Летс ми спик фром май харррт

Hybrid View

  1. #1
    Старший оракул CoffeeCup's Avatar
    Join Date
    Feb 2009
    Location
    Snowbearia
    Posts
    902
    Rep Power
    14
    The undeniable lack of Esperanto is the lack of natural (or native) literature and poetry or any expression of art which can transfer the idea of this art to native speakers of all other languages. While C++ has tons of texts, which are understandable for the people all over the world. Some examples of code are really the pieces of art. So C++ is the real candidate for the universal language
    So Long, and Thanks for All the Fish

  2. #2
    Hanna
    Guest
    Quote Originally Posted by CoffeeCup View Post
    ... C++ has tons of texts, which are understandable for the people all over the world. Some examples of code are really the pieces of art. So C++ is the real candidate for the universal language
    I suspect you are a fluent speaker, and therefore biased!

    But actually, I read that someone made a language that contains a proportion of grammar and similarities to reflect the population of the world.... So it had lots of Chinese and Indian type words in it, obviously.
    I do think Esperanto is nice and I like the "ideology" of Esperanto too.
    (but I don't actually know the language... does anyone here speak it?)

  3. #3
    Завсегдатай it-ogo's Avatar
    Join Date
    Jan 2009
    Location
    Ukraine
    Posts
    3,048
    Rep Power
    29
    Quote Originally Posted by CoffeeCup View Post
    The undeniable lack of Esperanto is the lack of natural (or native) literature and poetry or any expression of art which can transfer the idea of this art to native speakers of all other languages. While C++ has tons of texts, which are understandable for the people all over the world. Some examples of code are really the pieces of art. So C++ is the real candidate for the universal language

    Code:
    Esperanto::Esperanto() { 
      char* dest=(char*) self; 
      idLang Lang=idEnglish;
      while(dest-(char*)self<=sizeof(self*)) {
        dest++*=(((char*)&::Languages[Lang])+rand()%sizeof(Languages[Lang]))*;
        if (++Lang>idChinese) Lang=idEnglish;
      }
      for(int i=0; i<nRules; i++) if (GrammarRules[i]->Size>3) GrammarRules[i]=NULL;
    }
    "Россия для русских" - это неправильно. Остальные-то чем лучше?

  4. #4
    Властелин
    Join Date
    Nov 2010
    Posts
    1,155
    Rep Power
    15
    Quote Originally Posted by it-ogo View Post
    Code:
    Esperanto::Esperanto() { 
      char* dest=(char*) this; 
      idLang Lang=idEnglish;
      while(dest-(char*)this<=sizeof(*this)) {
        *dest++*= *(((char*)&::Languages[Lang])+rand()%sizeof(Languages[Lang]));
        if ((Lang = (idLang)((int)Lang + 1)) > idChinese) Lang=idEnglish;
      }
      for(int i=0; i<nRules; i++) if (GrammarRules[i]->Size>3) GrammarRules[i]=NULL;
    }
    A few corrections...

  5. #5
    Завсегдатай it-ogo's Avatar
    Join Date
    Jan 2009
    Location
    Ukraine
    Posts
    3,048
    Rep Power
    29
    Quote Originally Posted by Eric C. View Post
    A few corrections...
    Code:
    #define self this
    idLang operator ++(idLang &, int);
    
    //etc...
    "Россия для русских" - это неправильно. Остальные-то чем лучше?

  6. #6
    Властелин
    Join Date
    Nov 2010
    Posts
    1,155
    Rep Power
    15
    Quote Originally Posted by it-ogo View Post
    Code:
    #define self this
    idLang operator ++(idLang &, int);
    
    //etc...
    Ok... then:

    Code:
    Esperanto::Esperanto() { 
      char* dest=(char*) self; 
      idLang Lang=idEnglish;
      while(dest-(char*)self<=sizeof(*self)) {
        *dest++*= *(((char*)&::Languages[Lang])+rand()%sizeof(Languages[Lang]));
        if (++Lang > idChinese) Lang=idEnglish;
      }
      for(int i=0; i<nRules; i++) if (GrammarRules[i]->Size>3) GrammarRules[i]=NULL;
    }
    But:

    1. No code like "this*", in this case macros won't let you get away with a syntax error.
    2. No code like "<pointer_name>*" when dereferencing the pointer. That's just wrong and gives you a syntax error as well.
    3. It's generally recommended you define return types of such overloaded operators as "<class_name>&", ie:
    Code:
    idLang& operator ++(idLang &, int);
    That allows you to avoid an unnecessary (and potentially expensive) call of the copy constructor.

  7. #7
    Завсегдатай it-ogo's Avatar
    Join Date
    Jan 2009
    Location
    Ukraine
    Posts
    3,048
    Rep Power
    29
    Ви ар спикинг фром аувер харт.

    Quote Originally Posted by Eric C. View Post
    Ok... then:
    1.
    2.
    Agreed. Mea culpa.


    3. It's generally recommended you define return types of such overloaded operators as "<class_name>&", ie:
    Code:
    idLang& operator ++(idLang &, int);
    That allows you to avoid an unnecessary (and potentially expensive) call of the copy constructor.
    Hmmm... Actually I meant that idLang is enum rather than class. Otherwise we should invent something very special for "Languages[Lang]".
    "Россия для русских" - это неправильно. Остальные-то чем лучше?

  8. #8
    Властелин
    Join Date
    Nov 2010
    Posts
    1,155
    Rep Power
    15
    Quote Originally Posted by it-ogo View Post
    Hmmm... Actually I meant that idLang is enum rather than class.
    I see. Then it's quite ok.

    Quote Originally Posted by it-ogo View Post
    Otherwise we should invent something very special for "Languages[Lang]"
    Like "operator int()"?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Russian Lessons                           

Russian Tests and Quizzes            

Russian Vocabulary