ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: void.calc.org Contest: Pig Latin

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  Account Info

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: Re: void.calc.org Contest: Pig Latin
The_Dungflinga  Account Info
(Web Page)

Don't be so harsh. He wasn't off topic, he did comment on the article. He just threw his plug in at the end. It's hard to get good publicity for a calc site and this is a great place to do it.<p>
(Now I'm the one who's off topic, sorry)

     7 May 2000, 08:11 GMT


Re: Re: Re: void.calc.org Contest: Pig Latin
Anubis  Account Info

hmmm let me revise my earlier comment

all those replies he got were a bit excessive
email anyone?

     7 May 2000, 18:14 GMT

Re: Re: void.calc.org Contest: Pig Latin
Matthew Hernandez  Account Info
(Web Page)

Do you wanna bet that you CAN do that in BASIC? Because you can. Obviously you haven't thought things through. All you have to do (well...it actually would involve a lot...) is test the string using inString(). First you would start off by having the original string. Then you would create another string with all the letters of the first word minus the first one (not hard to do), then add a "yay" to it (again, no hard at all). Then, using inString(), go to the letter immediately following the next "space" you find. Drop that words first letter (store the letter somewhere, temporarily--a third string), then read until the next space, adding each letter to the second string (which is the formatted one). Then add that first letter you saved, then add a "yay". And continue until you reach the end of the string (which you will know when the letter you are reading is equal to the 'length()' of the string). Not that hard...and QUITE far from impossible(!!)...and you don't need to use a huge matrix that you probably don't even have memory for!

Smile...
Matt H.

     7 May 2000, 20:55 GMT


Thanks for the Input
Anubis  Account Info

That's what I was getting at (thx for the feedback). Most of my progs dont use much string manipulation (we don't work much with that stuff in trig ;) I intended to say that it COULD be done, not that you can't do it.

If I ever find a Plus Module for my 92, I'll start playing with strings in a game I'd like to make (I wish I had time for school and learning assembly, but its hard to go to school AND do HW AND learn computers AND have some free time for tennis/dates (ha ha)), and use string manipulation for the names or something.

ttfn
-Anubis (I'm also a Matt)

     8 May 2000, 03:36 GMT


Re: Thanks for the Input
Matthew Hernandez  Account Info
(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: Re: Thanks for the Input
Anubis  Account Info

Alright, today in precalculus I played Phoenix on my 92 and took a test over the law of sines/law of cosines/Heron's formula. Then I went to lunch to confer with my classmates on how easy the test seems and yet how many errors our teacher will find in our work (HEY that alpha looks a bit too much like an "a", -5 points!). Then I pondered my english term paper AND the four other pending english projects I have to do in under 2 weeks. Then we learned some messed-up chemistry that I was too tired to understand clearly, and had an hour of busy-work as usual in American History.

Then I came home and put off all of my work for another day.
I'd say you had a more productive day :)

-Matt. M (Anubis)

     9 May 2000, 04:07 GMT


Re: Re: void.calc.org Contest: Pig Latin
Robert Mohr  Account Info
(Web Page)

It can easily be done in BASIC. The best way to do it would be lists, maybe 10 #'s long. That wouldn't be some HUGE matrix. And lists are somewhat easier to use than matrices, and take up slightly less space.

~Robert

     27 May 2000, 03:51 GMT

Re: void.calc.org Contest: Pig Latin
Rajamani Gounder  Account Info

Well, I've done it in TrueBASIC.....

     7 May 2000, 03:29 GMT

Code?
Kenneth Arnold Account Info

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: Code?
TI83andTI89Owner

Umm, correct me if I'm wrong, but isn't-isn't there already a z80 C compiler?
That-that would kind of mean that you gave everyone code...

     7 May 2000, 18:07 GMT

So... your point is...
Kenneth Arnold Account Info

a. If there is, where is it (I might actually start some TI83 ASM development again if there was a decent compiler (now if it was GCC, great...)

b. Yes I gave everyone code ... incorrent code. Fix it, and come up with a decent string input routine for the Z80 calcs (btw, input is a breeze for TI89), compile it, hand-optimize the results to make it better than what everyone else submits, and then maybe you have a winner. But (a) you'll have to credit me <g>, and (b) you wind up doing more work anyway. So what's the big deal?

Ken

     7 May 2000, 20:43 GMT


Re: So... your point is...
TI83andTI89Owner

There's no big deal, I was just saying that you gave everyone something to start with. I know not much of C, so I didn't know it was incorrect, geez...
Anyway, the few z80 C compilers out on ticalc.org are here:
http://www.ticalc.org/pub/dos/asm/

     8 May 2000, 00:42 GMT


Goats...
TI83andTI89Owner

I SCREW GOATS!!!!! I'M GOAT SCREWER FROM THOSE POSTS IN THE SPRING ON JOE WING... WHATEVER'S SITE!!!!!!!!!!!!!!!!!!! MWUAHAHAHAHAH

     13 May 2000, 00:29 GMT


Re: Goats...
TI83andTI89Owner

I didn't post this. My FORMER friend from InterCalc.org posted this. His name is Josh Vanderburg, let it be known. I hope you guys delete this, because I don't want anyone else to see it...I'm sorry...and, by the way, on the joewing.calc.org posts, the name I use is "Brandon W.".

     13 May 2000, 00:40 GMT


Re: Re: Goats...
TI83andTI89Owner

YEEEEEE HAAAAAWWWWW!!!!! I'M BRANDON WILSON!

     13 May 2000, 00:53 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


I'm sorry
CompJosh  Account Info
(Web Page)

I would like everyone to know that I, Josh Vanderburg, nor anyone at Intercalc.org (which isn't even up, yet and can only be reached with the "www" prefix), had nothing to do with these alleged postings. I know how he must feel, I had it happen to me with Otaku Programming Association... I, too would appreciate it if you delete this entire thing...

     13 May 2000, 01:05 GMT


Re: I'm sorry
TI83andTI89Owner

That's not true. Just delete it before anyone else sees it.

     13 May 2000, 01:13 GMT

Re: Re: I'm sorry
CompJosh  Account Info
(Web Page)

This is becomeing childish, so I won't even attempt to defend myself, anymore...

     13 May 2000, 01:16 GMT


Re: Re: I'm sorry
TI83andTI89Owner

You guys can check the IP addresses of the people who post things, right? Well, you can clearly see CompJosh made those goat screwer posts. And he's making that up as far as not having anything to do with it, as the IP addresses are proof that it's true. I hope you guys can see past this, and I'm sorry that this is all happening.

     13 May 2000, 01:22 GMT


Re: Code?
Harper Maddox  Account Info
(Web Page)

I kinda stole the Pig Latin problem from an assignment in my Computer Science class in C last year. I still have what I turned in and I have the correct submission from my instructor that handles the letter "y" as both a vowel and a consonant (I edited this for brevity). I debated on posting them along with the directions, but decided that even if the C->Z80 Compiler that exists now produces bloated output, it would still give those who knew C much of an advantage over those who only knew Z80.

     7 May 2000, 18:43 GMT

1  2  3  4  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer