Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 124 users online: 1 member, 94 guests and 29 bots. Members: t42592. Bots: VoilaBot (4), Spinn3r (1), MSN/Bing (2), Magpie Crawler (2), VoilaBot (3), Googlebot (17).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 19 Mar 2011 10:41:09 pm Post subject: [GlassOS] gCAS2 - ALL of the devices! |
|
|
<notice> gCAS2 is finishing up its transition to a new parser. I still am finding some expressions that don't work (less crashing, more errors reported, thankfully). The library contains z80 optimized functions as well as C ones.
The first section here is of me writing gCAS version 1. it was a standalone program that got the CAS push for my OS. After i wrote it, i noticed that the way i made the nodes was going to be very unoptimized for algorithms. So, i rewrote it from scratch as gCAS2. it runs on GlassOS and on linux (not maintained unless needed). For GlassOS, it comes in two parts: libgcas2.so and gCAS2. The library contains the cas backend and can be used by any program. gCAS2 is a graphical frontend to be used to interface with it to do interactive math.
Congrats to Graph3DP for using gCAS2 as its math backend
<old>Well, I began writing a CAS this morning. I had read very little on the topic. Regardless of this setback, I already have a library that can parse input, create a listing of it, and finally make a node tree. I have algorithms written, but I haven't used them yet (to solve the tree and get an answer).
Here is a screenshot of the library parsing a function.
This runs nicely on _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Last edited by AHelper on 18 Jun 2012 03:37:39 am; edited 14 times in total |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55759 Location: Earth, Sol, Milky Way
|
Posted: 19 Mar 2011 10:44:21 pm Post subject: |
|
|
No comments other than wooo, you have an EOS, such as it is.  _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 19 Mar 2011 11:03:15 pm Post subject: |
|
|
It can handle stuff, 2x+x*(x-3) = x^2-x (with alg.s)
It handles variables specially and has special algorithms for expanding (distributing), simplifying stuff, powers, etc.. Functions will be done later on. It allows externally defined variables, so everything looks good for the future.
(A calc library in under 12 hours o_O) _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 20 Mar 2011 01:52:28 pm Post subject: |
|
|
Heh, day 2 and mCAS is working much better. It is solving stuff better, yet it is still lacking powers, functions, and parentheses. I am handling variables much better as I can now store values to them (just numbers for now, later it will be anything that you want) and delete them. Here is the latest build working with base powers and variables:
(The tree dump line is a recursive printout of the assembled node tree)
Current size for x86: 22k
Memory usage is still very low  _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
TheStorm

NOU!

Joined: 26 Mar 2007 Posts: 2375
|
Posted: 20 Mar 2011 03:00:59 pm Post subject: |
|
|
| KermMartian wrote: | No comments other than wooo, you have an EOS, such as it is.  | Careful there, EOS or Equation Operating System is trademarked by TI for their z80 calcs.  _________________
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile. |
|
| Back to top |
|
|
JosJuice

Power User

Joined: 17 Oct 2010 Posts: 306 Location: Sweden
|
Posted: 20 Mar 2011 03:03:42 pm Post subject: |
|
|
| TheStorm wrote: | | KermMartian wrote: | No comments other than wooo, you have an EOS, such as it is.  | Careful there, EOS or Equation Operating System is trademarked by TI for their z80 calcs.  | I think APD is trademarked, too. |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 20 Mar 2011 03:08:32 pm Post subject: |
|
|
They are AFAIK -_- Hence the little (R)
I am working on some random function research, so I may get to it later today... maybe some more alg's for evaluating stuffs
<edit>
Ok, now parenthesis work! Please look at the tree dump lines to see how the logic flow is changed
(Watch the change in paren. placement in the tree)
Next are functions which simply need me to handle creating the node and upwards. Parsing them are already supported.
Also, I hope that I will compile this for the TI84 in 24 hours just to see is run just as well as on linux. Now, this will never run with TIOS since I need ~7kb of ram (without optimizing anything so far and ONLY when I stress it)..  _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 21 Mar 2011 08:55:14 pm Post subject: |
|
|
Yay, mCAS runs on a TI84!!! Enjoy typing in fun expressions and see it spit out answers. It has no error checking when parsing what you type, so if you try to break it, it will break. Anywho, here's an unofficial post of GlassOS (unsigned of course):
http://redintegrate.scrapping.cc/GlassOS.8xu _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55759 Location: Earth, Sol, Milky Way
|
Posted: 21 Mar 2011 08:57:20 pm Post subject: |
|
|
Congrats, I'll have to give it a try on Wabbit at some point.  _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 21 Mar 2011 09:04:11 pm Post subject: |
|
|
I have the above version running on my calc. I hope it doesn't die at school! (pull battery, hold [del], put back in) works at resetting the OS. There is still no on feature, so it sucks the batteries @15mHz mode since I am too lazy to slow it down in getc functions and such...
Also, if you run it and are confused on how to type in it, look here: http://glassos.sourceforge.net/keymap.html
To start mCAS, hit [F1] to open up the menu and hit run->mCAS. To quit, type in
Code: >>quit or Code: >>exit
_________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
DJ_O

Retired TI-83+ coder

Joined: 18 Mar 2005 Posts: 1487 Location: Quebec (Canada)
|
Posted: 21 Mar 2011 09:47:10 pm Post subject: |
|
|
Seems pretty nice. However I would maybe tell Critor about this project because of its name, since he already used the name mCAS for a CAS program intended to be used with the regular TI-Nspire models. (To save money)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir&id=1884
Although it should be fine, it might be best to ask him permission if you can use the same name too. _________________ Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)
Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 21 Mar 2011 09:51:41 pm Post subject: |
|
|
ah, nice catch there. I can always change around the name... I originally wanted gCAS (glassCAS), but I started writing it on a computer, so it was dubbed minimalistic CAS. I should change it back... _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55759 Location: Earth, Sol, Milky Way
|
Posted: 21 Mar 2011 10:06:00 pm Post subject: |
|
|
Very nice! Good luck using it in school tomorrow.  _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 21 Mar 2011 10:07:30 pm Post subject: |
|
|
one should always bring > 1 calculators to school, preferably including a 68k somewhere...
<edit>
Here's mCAS running on a TI84...
<edit>
Well, running it for a day did expose an odd error... It seems like the parenthesis aren't splitting right (I need to see it with debug output). Typing in Code: (5!/(3!*(5-3)!)*3*3 gives a random answer, but putting the *3*3 in front gives the right answer... Seems like floating point alg. failures since I get negative numbers :-S Other than that, I realized how much I need a scrolling list widget for the GUI and that putchar needs scrolling, not flipping. When trying to crash it, it just pukes on the screen, but it didn't stop it... Other than that, solid. I need to enable the X variable button because hitting alpha-x-alpha+2 takes a little too long... Also the getc needs to allow holding down the modifier keys as a 'temp hold'. Should be that hard to do...
Anyways, a great way to find areas that need fixing _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 24 Mar 2011 09:24:16 am Post subject: |
|
|
That's looking great! I have my own personal way of evaluating expressions that is very memory efficient, and just requires the modification of the expression string. If you're interested, i can write up some information about this method. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
benryves

Cemetech Expert

Joined: 12 Aug 2008 Posts: 1359 Location: London, United Kingdom
|
Posted: 24 Mar 2011 09:33:01 am Post subject: |
|
|
Good work!
I wrote a little expression evaluator which can be found here if you're looking for inspiration, not that I think you'd need it.  |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 24 Mar 2011 10:22:55 pm Post subject: |
|
|
Thanks,
I will rewrite gCAS's node layout to be less memory-intensive. This should make the code overall smaller since I will have to manipulate stuff less (no pointers to structs in a struct, just a struct with the variables in it).
I was trying to get distributing working, but just made a huge memory leak somewhere even though my code should work (again, I need to restructure stuff)
As for functions... There will be two kinds that I will make (optimized). The first one is a 1-2 parameter node function, such as sin(, cos(, sqrt(, etc. These can be put anywhere in the evaluation string (I will parse them). The second will be one line functions (In TIOS, think like disp vs. tan), but I don't know of anything just yet...
Lastly, I badly need a listwidget (for GlassOS to draw the scrollback) and an updated textbox so that entering things will be less painful (like hitting tan( will actually type out tan( in the textbox).
Fun stuff for a z80, considering that the IEEE math functions aren't that far off... i found them to be precise within 3~4 digits. That shouldn't be a big issue for right now... _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55759 Location: Earth, Sol, Milky Way
|
Posted: 25 Mar 2011 09:05:45 am Post subject: |
|
|
I notice a distinct lack of note about the size of gCAS; I hesitate to ask, but I must. How many KB is gCAS?  _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1659 Location: Aufhelperstan, Utopian Republic
|
Posted: 26 Mar 2011 01:58:19 am Post subject: |
|
|
Sorry about leaving that out...
First, note that gCAS has a lot of unused PC-side functions included, nor is it optimized at all
The current gCAS size is: 15881 bytes
Some of the space was wasted on me not linking IEEE math functions, others on debug functions, and the rest on bad code (filthy switch() blocks). Expect the size of this to go way down later this week when I rewrite the node system. _________________ °ᴥ° Get Lucky
<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol." |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55759 Location: Earth, Sol, Milky Way
|
Posted: 26 Mar 2011 06:07:56 am Post subject: |
|
|
And hence why I like to glare at SDCC. No problem with regards to leaving that out, I didn't think it was intentional. Best of luck with your optimizations! Feature-wise, it supports the four arithmetic functions, factorial, and parentheses? _________________
 |
|
| Back to top |
|
|
|
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
|
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.039071 seconds.
|