This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 29 Aug 2007 02:29:27 pm    Post subject:

What about creating a new programming language for calcs?
The two existing languages TI-BASIC and assembly has their pro's and con's, which the vast majority of us are familiar with. My idea is to combine elements from those languages (and others as well) into a brand new language.
Anyway, this new language needs to meet the following criterias:
-> Needs to be interpreted (like BASIC)
-> Programs must be executed significantly faster than TI-BASIC progs
-> Has to be relatively easy to learn.

Perhaps you could fill me in here.

What would your favourite calculator programming language look like?


Last edited by Guest on 29 Aug 2007 02:30:35 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 29 Aug 2007 03:21:25 pm    Post subject:

I think it might not be such a bad idea to do a basic-like language, possibly with many of the same tokens to facilitate transition. I think one important thing though is to allow use of integers, because that would probably speed things up a lot! Also, local variables and functions should be included.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 29 Aug 2007 04:06:11 pm    Post subject:

I'd have to say that most of Basic's speed (or lack thereof) is due to the parser. A faster parser with better-written ROM calls would be much faster. And of course, a few more functions would be very handy Smile.

So maybe, a hand-written ASM parser?
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 29 Aug 2007 04:12:15 pm    Post subject:

A hand written nostub no romcall parser that way to can run an any os version and is easyier to port plus runnable on third party oses
Back to top
nitacku


Advanced Member


Joined: 23 Aug 2005
Posts: 408

Posted: 29 Aug 2007 04:42:37 pm    Post subject:

This sounds awesome.

Make sure to include the xLIB functions. You could give them their own names instead of using real(. Having control over the On key would be cool as well. Would there be a way to create a function that could take the different layers of a grayscale picture/sprite and display it automatically without having to manually create the grayscale?

Example:
DrawGray( pic_layer_1, pic_layer_2 )
continue interpreting code while grayscale pic is being displayed...

Another thing to include would be multiple keypress recognition. Ability to archive/unarchive programs within programs would be nice. Also the ability to archive/unarchive pics without having to use a picture token would be nice.

So instead of:

Archive Pic1
Archive Pic2
Archive Pic3
Archive Pic...

You could have:

For(x,0,34)
ArcPic(x)
End

I'm assuming this is meant to be a gaming language. In this case it would not be necessary to include all of the commands that are available now. One more thing, a command to link two calcs together so that you could share data would be awesome. The current one sucks because both calcs have to be in a neutral/paused state in order for the transfer to work.

This is all that I can come up with right now.
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 29 Aug 2007 07:20:55 pm    Post subject:

Functions, classes, single- and multidimensional arrays (and you could use numbers or strings), local variables, ability to create/modify/delete other programs, appvars, or the parent program itself (writeback if to itself!), run and use other programs even if they are archived or are in a group (and the ability to unarchive/archive any datatype except for apps and groups), ExecASM command so you can run hex ASM code anywhere.

More ideas later. Razz
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 29 Aug 2007 09:04:05 pm    Post subject:

If someone were to start this as a serious project, I think it would be best to work out a good parser that can understand functions and the binary operators, as well as a system of local variables. With that base, the rest of the language would be rather simple, since it would consist of defining functions to do stuff.

I have a friend who wrote a basic interpreted language on the computer. I'll see him in school (starts in a week), so maybe I'll ask if he has any ideas of how to begin. Maybe he'll also finally learn assembly code, and he could help out in the calculator community! Smile
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 29 Aug 2007 09:27:58 pm    Post subject:

The main things the TI-83+ basic lacks are, like magicdanw said, function and local variable capability. Graphics-wise, a reasonable minimum would be to allow storing and recalling pictures that take up part of the screen (essentially, sprites) to and from arbitrary points on the screen - given that, most other routines that libraries provide are not too difficult to code.

Taking a leaf (or a tree) out of the TI-89's book wouldn't hurt either - a lot of the things that would make TI-Basic better are there (of course, the TI-89 is crippled in Basic's inability to use the whole screen, which is painful)

Please, though - no classes. OOP in a calculator interpreted language is ridiculous.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 29 Aug 2007 09:49:00 pm    Post subject:

What sort of stuff do the 89s do? I've never had the privilege of using any graphing calculator outside of the 83+ series.

I'm beginning to like this idea for a new language. It'd be tough to do, but maybe if I get bored with CalcUtil, and if I have spare time this year in school (hey, anything's possible, even with 5 APs and college prep), I'll try taking it up as a new project! :biggrin:
Back to top
DJ Omnimaga
http://i-lost-the-ga.me


Calc Guru


Joined: 14 Nov 2003
Posts: 1196

Posted: 29 Aug 2007 11:34:34 pm    Post subject:

http://omnimaga.org/index.php?showforum=58
http://www.casiocalc.org/?showforum=18
this isnt too much like basic, but it's almost as easy, i hope THIS TIME it will not die tho, it used to back in the days of EPS programming team. It may even be compatible between casio and TI calcs as well, and between each ti calc models if it comes to fruition


Last edited by Guest on 29 Aug 2007 11:37:23 pm; edited 1 time in total
Back to top
spandiv
-- Retired --


Active Member


Joined: 25 May 2003
Posts: 650

Posted: 29 Aug 2007 11:40:26 pm    Post subject:

http://www.unitedti.org/index.php?showtopic=2857&hl=
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 29 Aug 2007 11:41:57 pm    Post subject:

personally I'd much prefer to see one of the existing projects finished (mlc, fastrpl, Spencer's scheme interpreter, that thing from DS (SLIDE?)), on the other hand it would be pretty cool to see an implementation of Python (not all the libraries of course, but the language itself).
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 29 Aug 2007 11:58:16 pm    Post subject:

elfprince13: Cool song in your signature! I guess I never noticed it before. I'm not into a lot of popular music, but instead I recognize words from a Swahili song! Go figure... Cool

Last edited by Guest on 29 Aug 2007 11:58:30 pm; edited 1 time in total
Back to top
baorder54
Elite


Active Member


Joined: 25 Nov 2006
Posts: 748

Posted: 30 Aug 2007 01:59:49 am    Post subject:

time and time again, people have tried making hybrid languages/converters. All have failed or are unpopular. If you want better games than pure basic you use a lib, if you don't you use pure. If you want to learn asm then you learn asm and you make even faster games. I don't see where this "hybrid" fits in... slow, medium, fast. Thats what we have... do you really need anything inbetween? Seems like just another "avoid asm" scheme.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 30 Aug 2007 02:08:34 am    Post subject:

I personally think that the programming community could benefit from this, if it were ever done. I know there are plenty of people with great ideas for programs and games, but don't have the time/patience/skill to learn assembly code. If there were a language faster and more capable than basic, while not being as odd as assembly code can seem at times, then I think there would be even more cool stuff written for the calculator. One thing I'd like to see is a language that's stable like basic, but is more expandable, like with local variables, and being able to write functions. Some of these ideas I might carry out eventually in CalcUtil to a degree, but a new language would be a better solution.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 30 Aug 2007 07:09:03 am    Post subject:

If this is a serious project, start with something that will run Basic progs, but faster. (Faster Parser, better-written ROM calls)
Back to top
Pseudoprogrammer


Member


Joined: 12 Dec 2006
Posts: 121

Posted: 30 Aug 2007 07:12:36 am    Post subject:

You could make it into an app, that makes it so when you run a basic program it intercepts it and runs it through the faster parser automatically... What would said program be named if it was made Shock
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 30 Aug 2007 01:50:25 pm    Post subject:

Well, I'm not sure what it would be called as it's own app, but if I was the one who made it, I'd stick it in CalcUtil2 as an option, so it all could be run out of archive and it could run shell programs, as well as the other stuff I plan to add to CalcUtil. Maybe I'd call the option "SuperParser" :biggrin:
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 30 Aug 2007 01:55:59 pm    Post subject:

Harrierfalcon wrote:
If this is a serious project, start with something that will run Basic progs, but faster.  (Faster Parser, better-written ROM calls)
[post="111876"]<{POST_SNAPBACK}>[/post]
The parser and ROM calls are really not that poorly written. The reason for the slowness of Basic is that much more functionality is provided than is actually used at any given point - but there's no way the parser could know which functionality is unnecessary. Easy example: a lot of instructions could be optimized if the parser didn't store the result of the expression to [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans every time. However, we can't fix that by never storing to [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans, since some code does use that feature. Floating point numbers are another slow-down factor, but a lot of programs would have to be rewritten to use integer operations.

Last edited by Guest on 30 Aug 2007 01:57:08 pm; edited 1 time in total
Back to top
David
The XORcist!


Advanced Member


Joined: 20 May 2003
Posts: 268

Posted: 30 Aug 2007 02:07:08 pm    Post subject:

magicdanw wrote:
I think it might not be such a bad idea to do a basic-like language, possibly with many of the same tokens to facilitate transition.  I think one important thing though is to allow use of integers, because that would probably speed things up a lot!  Also, local variables and functions should be included.
[post="111822"]<{POST_SNAPBACK}>[/post]

That's a good idea! With functions and possibly some other elements of structured programming, we can abolish those nasty labels and Goto statements.

Harrierfalcon wrote:
I'd have to say that most of Basic's speed (or lack thereof) is due to the parser.  A faster parser with better-written ROM calls would be much faster.  And of course, a few more functions would be very handy Smile.
So maybe, a hand-written ASM parser?
[post="111825"]<{POST_SNAPBACK}>[/post]

I have to agree with what DarkerLine just said.
As I see it, though, the problem is that people use TI-BASIC for other purposes than it was designed for. It is great when you want to automate/extend tasks that you normally perform with a calculator (=mostly mathematical stuff), and correspondingly pathetic for all other purposes (read 'game programming') Consider a statement like
: A+4->A
In this case, the parser will perform a 9-byte floating-point addition of A and 4 *blargh* If we design a new language, we can make the parser treat A & 4 as 8-bit integers. The result would be an exhilarating speed boost compared to floating point addition (duh!). But obviously you can't do that if you just rewrite the TI-BASIC parser - you have to construct a new language which supports the integer type.

nitacku wrote:
This sounds awesome.

Make sure to include the xLIB functions. You could give them their own names instead of using real(. Having control over the On key would be cool as well. Would there be a way to create a function that could take the different layers of a grayscale picture/sprite and display it automatically without having to manually create the grayscale?

Example:
DrawGray( pic_layer_1, pic_layer_2 )
continue interpreting code while grayscale pic is being displayed...

Another thing to include would be multiple keypress recognition. Ability to archive/unarchive programs within programs would be nice. Also the ability to archive/unarchive pics without having to use a picture token would be nice.

So instead of:

Archive Pic1
Archive Pic2
Archive Pic3
Archive Pic...

You could have:

For(x,0,34)
ArcPic(x)
End

I'm assuming this is meant to be a gaming language. In this case it would not be necessary to include all of the commands that are available now. One more thing, a command to link two calcs together so that you could share data would be awesome. The current one sucks because both calcs have to be in a neutral/paused state in order for the transfer to work.

This is all that I can come up with right now.
[post="111827"]<{POST_SNAPBACK}>[/post]

Yes, the language will be targeted towards game programming. Or maybe I should say it's designed to perform anything that BASIC doesn't? Seems like a re-invention of the wheel, otherwise.
I'm sure that all the features you suggested are possible to implement, and more advanced/faster IO functions are crucial.

And regarding the pics: who said you have to keep them in TI-OS pic vars? It sounds like a better idea to include them in the program variable itself i.e dividing it into CODE/DATA sections.

Demon wrote:
Functions, classes, single- and multidimensional arrays (and you could use numbers or strings), local variables, ability to create/modify/delete other programs, appvars, or the parent program itself (writeback if to itself!), run and use other programs even if they are archived or are in a group (and the ability to unarchive/archive any datatype except for apps and groups), ExecASM command so you can run hex ASM code anywhere.

More ideas later. Razz
[post="111838"]<{POST_SNAPBACK}>[/post]

Good suggestions, except for the OOP thing Smile, which I fear would slow down things in an unacceptable manner.

baorder54 wrote:
time and time again, people have tried making hybrid languages/converters.  All have failed or are unpopular.  If you want better games than pure basic you use a lib, if you don't you use pure.  If you want to learn asm then you learn asm and you make even faster games.  I don't see where this "hybrid" fits in... slow, medium, fast.  Thats what we have... do you really need anything inbetween?  Seems like just another "avoid asm" scheme.
[post="111872"]<{POST_SNAPBACK}>[/post]

This new, currently unnamed language would have several benefits compared to BASIC/Asm, like
1. Easier to learn than asm
2. Enables you to program directly on your calculator rather than using a computer-emulator setup.
3. Errors in code will not have catastrophic consequences, since it's interpreted.
4. Much faster than TI-BASIC as we know it.


Last edited by Guest on 30 Aug 2007 02:09:09 pm; edited 1 time in total
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
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are UTC - 5 Hours

 

Advertisement