English-like Language Comparison
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
English-like Language Comparison
Hi,
Just watched K Miller's presentation at the Turing festival and wanted to know if there is a text file of the JavaScript vs LC example that I could get? I did see in another video in which LC was compared to many other languages which would be even better.
Thanks,
Simon
Just watched K Miller's presentation at the Turing festival and wanted to know if there is a text file of the JavaScript vs LC example that I could get? I did see in another video in which LC was compared to many other languages which would be even better.
Thanks,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: English-like Language Comparison
OK, did it myself:
Simon
Code: Select all
Sort by last name decending:
Mr, Kevin, Miller Mr, Mark, Waddingham
Mr, Ben, Beaumont Ms, Heather, Nagey
Ms, Heather, Nagey Mr, Kevin, Miller
Mr, Mark, Waddingham Mr, Ben, Beaumont
LiveCode:
sort lines of tText decending by last item of each
JavaScript:
theText = theText.split("\n");
theText = theText.sort(sort_item_3).join("\n");
function sort_item_3(line1,line2) {
line1 = line1.split(",");
line2 = line2.split(",");
if(line1[2] == line2[2] return 0;
else if(line1[2] > line2[2] return -1;
else return 1;
}
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: English-like Language Comparison
The javaScript snippet of nine lines is just a comparison of how many lines it would take using javaScript to accomplish what liveCode can do in one line... but I think that the most important point is that, the one line of liveCode code is much easier to read... justlike reading an instruction from a book... something that makes immediate sense rather than trying to decipher what the javaScript is trying to achieve...
be well
Dixie
be well
Dixie
Re: English-like Language Comparison
Hi cisprakash,
The JavaScript is not used within LiveCode. The 2 scripts are just an example. They are supposed to do exactly the same thing which is to sort the names by last name decending.
Simon
The JavaScript is not used within LiveCode. The 2 scripts are just an example. They are supposed to do exactly the same thing which is to sort the names by last name decending.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: English-like Language Comparison
Hi Simon,
I strongly believe that this is just SPAM!
The link in his sig points to a "IT professionals"(sic!) website, so these questions do not fit here somehow
Besides the fact that the prevevious postings leave no doubt about what is being discussed here.
I give him 2 days to proof that this is no spam...
Best
Klaus
I strongly believe that this is just SPAM!
The link in his sig points to a "IT professionals"(sic!) website, so these questions do not fit here somehow

Besides the fact that the prevevious postings leave no doubt about what is being discussed here.
I give him 2 days to proof that this is no spam...

Best
Klaus
Re: English-like Language Comparison
Klaus,
No need to wait: http://qery.us/2l4
I'd remove the spam post and everything following it.
Kind regards,
Mark
No need to wait: http://qery.us/2l4
I'd remove the spam post and everything following it.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: English-like Language Comparison
OK, and done 
