void.calc.org Contest: Pig Latin
Posted by Nick on 6 May 2000, 22:27 GMT
Ethay Oidvay Oductionspray esteredpay emay otay itewray anyay announcementyay aboutyay eirthay ewestnay ogrammingpray ontestcay. Inyay isthay, youay avehay otay itewray ayay ogrampray atthay anslatestray anyyay asephray intoyay igpay atinlay. Orfay oremay infoyay onyay atwhay igpay atinlay isyay, ogay eesay ethay Ialectizerday - it'syay atwhay eway usedyay otay oducepray artpay ofyay ouryay Aprilyay Ool'sfay okejay :)
|
|
|
The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.
|
|
Re: void.calc.org Contest: Pig Latin
|
Anubis
|
Isn't shamelessly plugging your website almost as off topic as "first-comment"?
look how much we have already gotten off-topic....
Anyways can't you write a BASIC string-search program that finds a word at the beginning and moves it to the next space in the string it finds.... (move the first letter of a word to the last)
or how about storing it to matrices and searching them instead (it would be a lot bigger than my first idea)
I hope someone actually read my post instead of commercializing themselves.
-Anubis
|
|
7 May 2000, 02:50 GMT
|
|
|
|
|
|
|
|
|
|
|
Re: Thanks for the Input
|
Matthew Hernandez
(Web Page)
|
Just for the fun of it...today in Calc class, I made a lovely little program that converts user input into pig latin. It works great! At first, I had a lovely little loop (and I mean little! I is under 125 bytes!) that worked through the string using the "sub()" command (I have no idea why I said to use the "inString()" command...it really can't do you any good in this situation). The great thing about the loop, was it could handle any length and did it fairly quickly. BUT, then the smart little kid behind me reminded me that "words that begin with a vowel just add a 'yay', they don't put the first letter at the end first!" Well...that ruined the lovely loop! Because of how the loop (which was so completely optimized for size, it was perfect!) worked, I couldn't do a simple check to see if the first letter of word was a vowel and skip the part that adds the first letter to the end. So, I had to rewrite the loop to adapt to skipping the word if it began with a vowel. Now the program is 157 bytes (not too shabby)...and works almost as good (although there is a definitly visable speed difference...but that is okay!).
Oh...I also "converted" the basic program to javascript (I don't know what the site Nick gave uses to do the conversion...but mine is faster than theirs!) just for fun. After I did it in javascript, I did it in pascal...which was a total waste of time! Hmm...now that I have done it three times...I think I will take the 'ol stab at z80 assembly! It shouldn't be too hard...but then again, I am not quite as good at z80 assembly as I am in basic, javascript, and pascal...
Matt H.
|
|
9 May 2000, 01:52 GMT
|
|
Re: void.calc.org Contest: Pig Latin
|
Rajamani Gounder
|
Well, I've done it in TrueBASIC.....
|
|
7 May 2000, 03:29 GMT
|
|
Code?
|
Kenneth Arnold
|
What? No code? If there was a Z80 C compiler:
#include <strlib.h>
#include <string.h>
/* function output undefined when in_word is not a
* pointer to a lowercase word */
char * piglatinize ( char * in_word ) {
char temp;
char * temp2;
temp = in_word[0];
if (temp == 'a' || temp == 'e' || temp == 'i' || temp='o' || temp='u') {
temp2 = (char *) malloc ( strlen ( in_word ) + 3);
if (temp2 == NULL)
/* whatever error function is appropriate */
strcat ( temp2, in_word );
strcat ( temp2 + strlen ( in_word ), "way" );
} else {
temp2 = (char *) malloc ( strlen ( in_word ) + 2 );
strcat ( temp2 + 1, in_word );
(temp2 + strlen ( in_word ) - 1 ) = in_word[0];
strcat ( temp2 + strlen ( in_word ) - 1, "ay" );
}
return temp2;
}
This is quite likely wrong, but I wrote it in 5 minutes so what do you expect?
|
|
7 May 2000, 04:06 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Goats...
|
TI83andTI89Owner
|
I didn't post the one above this, either. He has my ticalc.org password. I don't know if you can change it, but as soon as I'm done posting this, I'm going to try. I'm sorry about all this, and I really don't want my name on here, so just kill all of this, whoever can do it and is reading this. I don't know why he posted this crap on here, but I'm sorry. I'm sorry I mentioned his name, too. He's not a bad person, he just found out my password and now he's screwing with me...just delete this stuff.
|
|
13 May 2000, 00:58 GMT
|
|
1 2 3 4
You can change the number of comments per page in Account Preferences.
|