CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 105 users online: 3 members, 67 guests and 35 bots.
Members: Ashbad.
Bots: VoilaBot (1), Spinn3r (1), MSN/Bing (1), Magpie Crawler (4), VoilaBot (6), Googlebot (12), Googlebot (7), MSN/Bing (3).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2958

Posted: 14 Dec 2009 06:15:29 am    Post subject: shakespeare programming language interpreter

I would like to make a program where it scans a program with the source code and checks for certain words and does something with them. Such as if I needed to check if a word is positive or negative then it would need to (most likely) use a string, but if one word is short and it is negative and another word is long and contains the short negative word then it would count it as both positive and negative. I would also need something to use as a stack with names that are put at the very beginning of a program. So that when the program has a "[enter romeo]" it starts using romeo to edit numbers with. here is some source code that prints "Hel" as in "Hello World"


Code:
The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                    Act I: Hamlet's insults and flattery.

                    Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
 You lying stupid fatherless big smelly half-witted coward!
 You are as stupid as the difference between a handsome rich brave
 hero and thyself! Speak your mind!

 You are as brave as the sum of your fat little stuffed misused dusty
 old rotten codpiece and a beautiful fair warm peaceful sunny summer's
 day. You are as healthy as the difference between the sum of the
 sweetest reddest rose and my father and yourself! Speak your mind!

 You are as cowardly as the sum of yourself and the difference
 between a big mighty proud kingdom and a horse. Speak your mind.

 Speak your mind!

[Exit Romeo]


if anyone could help with this, it would be appreciated. I am mainly doing this for fun, to show off to my friends.
_________________
http://tanner.myserverathome.com
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55763
Location: Earth, Sol, Milky Way

Posted: 14 Dec 2009 11:27:18 am    Post subject:

An interpreter for this could be very easily written in something like Python or Perl; that would be my best recommendation. If you wanted something web-based, it would be equally easy to make PHP parse one of these and spit out the output.
_________________


Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2958

Posted: 14 Dec 2009 04:34:44 pm    Post subject:

and if I really wanted this for my calculator? Oh and slightly off topic, but is there a way that on-calc you would be able to execute keypresses from a file, like in emulators how you can record then use the key presses?
_________________
http://tanner.myserverathome.com
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55763
Location: Earth, Sol, Milky Way

Posted: 14 Dec 2009 04:36:34 pm    Post subject:

_player1537 wrote:
and if I really wanted this for my calculator? Oh and slightly off topic, but is there a way that on-calc you would be able to execute keypresses from a file, like in emulators how you can record then use the key presses?
There's unfortunately no easy way to replay keypresses, unless you could figure out how to fake port events (or loop one port into another, so you could output on one port to input on another). Regarding the first part, the calculator is not well-suited to processing large chunks of texting, especially for the fact that it requires a large amount of storage.
_________________


Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2958

Posted: 14 Dec 2009 04:41:40 pm    Post subject:

ok, one more question about your document program (docde6) is there an interpreter to change it to a string on-calc so that I could change something written in the easy to use program to a not-so-easy string? Just wondering.
_________________
http://tanner.myserverathome.com
Back to top
JadenSmith


Newbie


Joined: 14 Jun 2012
Posts: 5

Posted: 14 Jun 2012 02:46:59 am    Post subject:

Well don't know whether it is a right place to ask for but came to know that along with the regular languages like python, basic etc can i use Linux, Apache, and the PHP interpreter for translating such articles?
Back to top
comicIDIOT


Guru


Joined: 01 May 2006
Posts: 5108
Location: SFBA, California

Posted: 14 Jun 2012 02:49:35 am    Post subject:

JadenSmith wrote:
Well don't know whether it is a right place to ask for but came to know that along with the regular languages like python, basic etc can i use Linux, Apache, and the PHP interpreter for translating such articles?


Contrary to the signs, this isn't spam. We had a wonderful chat in SAX after I deleted his post the first time Smile

Again, I apologize.
_________________


-Alex
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2958

Posted: 14 Jun 2012 10:46:11 pm    Post subject:

First off... Wow, I was newbish in '09 Razz (Like I'm not, still) I'm kinda surprised I knew what a stack was back then. And, now that I remember this post, I think I might actually try to write a program which does this. Especially when I get bored and just want a simple string-parsing project.

As for Jaden's question, I'm going to go with "yes." Not quite sure what you're wanting to ask. Linux, Apache, and PHP can be used to translate stuff from one format to another. I guess you're wanting to convert strings into DocDE6 files?

And, Comic, it's okay. Thanks for clarifying that he's not a bot Smile

Edit: Also, in case someone thinks about it, leave the title how it is. It emphasizes my newbiness.
_________________
http://tanner.myserverathome.com


Last edited by _player1537 on 14 Jun 2012 10:54:25 pm; edited 1 time in total
Back to top
comicIDIOT


Guru


Joined: 01 May 2006
Posts: 5108
Location: SFBA, California

Posted: 14 Jun 2012 10:51:03 pm    Post subject:

_player1537 wrote:
First off... Wow, I was newbish in '09 Razz (Like I'm not, still)


The smilies totally prove that, yes, you are still a "newb."
_________________


-Alex
Back to top
_player1537


Guru-in-Training


Joined: 25 Nov 2009
Posts: 2958

Posted: 14 Jun 2012 11:05:31 pm    Post subject:

comicIDIOT wrote:
_player1537 wrote:
First off... Wow, I was newbish in '09 Razz (Like I'm not, still)


The smilies totally prove that, yes, you are still a "newb."

Umm... Yes. I really am.

For everyone else, I edited my other post to remove about... 4 or 5 smilies I had thrown in there. It's been a while since I've been on here.
_________________
http://tanner.myserverathome.com
Back to top
JadenSmith


Newbie


Joined: 14 Jun 2012
Posts: 5

Posted: 15 Jun 2012 12:54:14 am    Post subject:

_player1537 wrote:


As for Jaden's question, I'm going to go with "yes." Not quite sure what you're wanting to ask. Linux, Apache, and PHP can be used to translate stuff from one format to another. I guess you're wanting to convert strings into DocDE6 files?



_player1537 thanks for the reply
Yes was asking for converting strings into DocDE6 files while translating as I never used Linux and Apache before so far so was having doubt about it, i guess i should go with PHP only. Still anyhow you came to know about Linux and Apache's technique please let me know....... Smile
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55763
Location: Earth, Sol, Milky Way

Posted: 15 Jun 2012 09:18:56 am    Post subject:

This is clearly spam. The signature for "language interpretation services" is a dead giveaway. Deleting user.
_________________


Back to top
comicIDIOT


Guru


Joined: 01 May 2006
Posts: 5108
Location: SFBA, California

Posted: 15 Jun 2012 04:05:45 pm    Post subject:

He posted in SAX :/ he seems pretty legit. At least you could have deleted the signature.
_________________


-Alex
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55763
Location: Earth, Sol, Milky Way

Posted: 15 Jun 2012 04:06:26 pm    Post subject:

comicIDIOT wrote:
He posted in SAX :/ he seems pretty legit. At least you could have deleted the signature.
I did delete the signature; I also suspended the account. Smile
_________________


Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 15 Jun 2012 04:13:28 pm    Post subject:

Afaik, he was not a spammer. But ok, you are the site admin.
Back to top
Ashbad


... I think redheaded girls are kind of cool


Joined: 01 Dec 2010
Posts: 2418
Location: Stomp Stomp Stomp, The Idiot Convention

Posted: 15 Jun 2012 04:15:21 pm    Post subject:

Clever new idea for spamusers: pretend to be a real user and hide some ads here and there?

(sorry for driving this further offtopic, but I guess the topic is back to being dead again anyways)
_________________
-Ashbad
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55763
Location: Earth, Sol, Milky Way

Posted: 15 Jun 2012 04:18:30 pm    Post subject:

aeTIos wrote:
Afaik, he was not a spammer. But ok, you are the site admin.
I made a judgment call about whether the user was a spammer or not, and I'm confident about my call. All of our spammers that get past the Captcha are human, if only poorly-paid overseas workers who know enough English to get around fora like this one, and reading the posts, cross-checking other posts with similar contents on other sites, and following the links in the user's profile and signature, I'm confident that it was at least partially a spamming attempt. As comicIDIOT has noted in the past, because of the way I deactivate accounts, the user could easily reactivate themselves if they wish to dispute my decision.
_________________


Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.040807 seconds.