TCPS embedded/independent scripting language

NOTE: this is not a full project of mine, but rather a 2-3 day distraction to free my mind from my real projects for a bit so I can think better Wink

It is too late to post a working program, but during my swim meet I had tonight, I decided to make an interpreter for a scripting language that is based on ProceduralBrainF*ck (Pbrain) and Toadskin, which works as a standalone interpreter and an embedded parser for dynamic Axe or Hybrid BASIC scripting.  TCPS stands for Turing Complete, Procedural, Stacked scripting language.  It works either by accepting arguments from a program in a (char*)array form starting in *L4, or by accepting user input asking for a program to run from at the start of the program run if no valid parameters are given in L4.

Here is an overview on how TCPS works.  The scripting language starts at either the specified pointer to program data or user input program names.  If in embedded mode, it creates a turing tape of specified length at a given start position, a specified number of stacks of given lengths at given locations, and starts running normally.  If in input mode, all of these values are scanned for at the AT header portion of the given program.  TCPS supports brainf*ck-like commands with support for math, running internal interlaced compiled assembly code, procedural declarations and runs, and stack operating. The operators:

+ - add operand to cell
- - subtract operand from cell
> - move forward one cell
< - move back one cell
[ - move to ] if current cell is 0
] - if reached with no call trace, goto matching [
( - delimit start of procedure
) - end procedure delimiting
/ - call procedure by name of following letter (if no letter follow //)
// - call procedure of index determined by value of current cell
^ - pop from current stack to current cell
* - push from current cell to current stack
= - set current stack to index determined by following letter (if none, follow ==)
== - set current stack to index determined by current cell value
{ } - delimits interlaced assembly code (compiled to .bin format), can be at most 256 bytes large per block and must end with a RETI instruction
" " - delimits inline ASCII data in the current cell
' ' - delimits inline numerical hex data inserted in the current cell
! - end script execution and prompt interpreter to clean up mess
? - if current cell is zero, end script execution and prompt interpreter to clean up mess
. - display value of current cell in ASCII
, - display value of current cell as a numerical value
Pi OP Pi - Pi symbol delimits math operand (Axe's +,-,*,/,^) taking current cell and the next cell, doing the operation, and storing to current cell


Example program (hello world), in .8xp format and started in execution by user input (non-embedded) mode:


Code:
AT
1000,L1
1,64,L2
/AT

>"Hello World!"<
+++++++++++
[>.<-]!


Another example of me making a procedure that will push all of the ASCII data onto the stack, and pick out every other letter and print it.  It even includes error handling! Smile :


Code:
AT
1000,L1
2,64,L2
/AT

>"gboaodd  ddaayy"<
(P >*.< -) =A
(D ++++++++)
:D ^
=B [>^> =A* - =B]
:D [:P] ?
"Err: WTF?" :D
[.>] !


(prints "good day"' or "Err: WTF?" if somehow the cells wouldn't initiate correctly (memory error))

As you can see, it is glorified BF, but it can do a lot for a fast processing speed. Programs are highly polymorphic and interlaced assembly can even change program contents during execution; you have decent math capabilities; you have powerful stacks and procedure workings; hard things like error handling are simple is TCPS; it can be used from Axe code easily (you can even compile the source into part of the program, for easy access) or do it externally with hybrid BASIC (support for straight up BASIC on the way); and loads more.

Interpreter, source, example programs and program loader data, and screenies will most likely come tomorrow Wink until then, have fun processing this wall of smarts in your head!  Questions, Comments, Questions, Comments, or even Questions are welcome below!

Happy scripting, 

Ashbad
This certainly seems like a fun project for you, and it is of course a neat example of an esoteric programming language. Is it implemented already? I should scold you for not focusing on your many other projects underway, though. Sad
Yeah, this is kinda killed, for two reasons: I have too many projects (yesterday, I killed everything but TaNF, ROLAT, and UCTI), and elsewhere, people just made stupid posts trying to make them sound smart by making proofs that my language was turing complete just to get attention, and kinda just ruined any formal discussion of the language Sad

Either way though, at least now I can accredit myself with having made an esoteric language, I guess Razz
I hate when people who aren't knowledgeable in a subject try to pretend that they are; it really grates my nerves. :/ By the same token, I don't think you can count as having made a language by designing and never testing it, but I'm glad to hear you're making a smart decision with regard to your other projects. I don't want to have to tack you onto the Raylin/SirCmpwn list of people with infinite half-projects and zero finished products, no offense to those guys. Wink
Well, I don't think I would Fit well on the zero finished project page, I have finished am lot of things (but like 3 times more of my things failed) Razz. However, good point.

But yeah, I pretty much killed every project which wasn't major, and this was far below anything else on my project stack Razz. Time to reallocate the SP to the top and start fresh.
Yeah, that's probably your best strategy. Smile You don't want to get into the habit of getting too bored or frustrated with any project that gets past 50%. Smile Anyway, shall we let this topic fade for now?
Yeah Wink once I find out how to lock it, I guess.
Ashbad, not to be rude, but yet another language? How many languages have you planned making? I think you should try and finish some your simpler projects, as you have some great ones.

Seriously Ashbad, I don't wanna be rude, but making a language is very hard and requires lots of programming experience. It also requires lots of time. You may have these skills, but you should think more about it before planning yet another language.

Either way, if you ever give this another try, good luck.
Read all the posts before responding, dude:
Ashbad wrote:
Yeah, this is kinda killed, for two reasons: I have too many projects (yesterday, I killed everything but TaNF, ROLAT, and UCTI), and elsewhere, people just made stupid posts trying to make them sound smart by making proofs that my language was turing complete just to get attention, and kinda just ruined any formal discussion of the language Sad

Either way though, at least now I can accredit myself with having made an esoteric language, I guess Razz
merthsoft wrote:
Read all the posts before responding, dude:
Ashbad wrote:
Yeah, this is kinda killed, for two reasons: I have too many projects (yesterday, I killed everything but TaNF, ROLAT, and UCTI), and elsewhere, people just made stupid posts trying to make them sound smart by making proofs that my language was turing complete just to get attention, and kinda just ruined any formal discussion of the language Sad

Either way though, at least now I can accredit myself with having made an esoteric language, I guess Razz


I did read it merth. What I don't get, though, is, why you pointed me to rereading it?
Because you said:
ScoutDavid wrote:
I think you should try and finish some your simpler projects, as you have some great ones.

Which he already said he's doing.
I was stating my opinion. In this case, agreeing with him.

Oh and if you had read mine, you would have understood that I had read what he said:

Quote:
Either way, if you ever give this another try, good luck.
That in no way demonstrated that you read his, you're simply stating that if he does give it another try, you wish him luck.

In any case, now that that's all cleared up, let's wait and see if this does get picked back up.
merthsoft wrote:
That in no way demonstrated that you read his, you're simply stating that if he does give it another try, you wish him luck.


Meaning I know he quitted it. I may not be an english-native speaker, but I'm not stupid.
Ah, good point.
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement