Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 97 users online: 2 members, 68 guests and 27 bots. Members: legodude. Bots: VoilaBot (3), Magpie Crawler (4), VoilaBot (1), Yahoo! Slurp (1), Googlebot (17), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 739 Location: The Universe
|
Posted: 02 May 2011 09:41:23 am Post subject: |
|
|
Agreed. Math looks great so far, except for the rounding, as you pointed out. What's GMP?
EDIT: Nvm, I lmgtfy'd myself  _________________
  |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55733 Location: Earth, Sol, Milky Way
|
Posted: 02 May 2011 12:11:01 pm Post subject: |
|
|
| Deep Thought wrote: | Agreed. Math looks great so far, except for the rounding, as you pointed out. What's GMP?
EDIT: Nvm, I lmgtfy'd myself  | Nice job, not everyone would use that good netiquette (whoa, Firefox knows that's a word!). AHelper, why GMP instead of a slightly lighter-weight solution such as BCD? _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 02 May 2011 01:23:43 pm Post subject: |
|
|
First, thanks for the attention. I agree that the answers should be separated, but realize that this is a simple list widget (generic). I could add in another mode just for gCAS2, but that could be ugly... I must point out that using the list widget without icons should be a small font.
I could make question and answer icons... But I can always use the small font and just add in about 3 spaces in-front of answers.
And with GMP, that's all I could find. Have a better idea, you tell me! I am not experienced with anything like that. If you have a suggestion for a C library that is made to be small/embedded, post post post and I will port port port </ x3> |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 02 May 2011 06:26:12 pm Post subject: |
|
|
| AHelper wrote: | First, thanks for the attention. I agree that the answers should be separated, but realize that this is a simple list widget (generic). I could add in another mode just for gCAS2, but that could be ugly... I must point out that using the list widget without icons should be a small font.
I could make question and answer icons... But I can always use the small font and just add in about 3 spaces in-front of answers. |
Perhaps you can add functionality to the list widget that gives you the ability to right align items inside? Or you could display "2+2=4" where the user entered the "2+2" and you appended the "=4". _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 02 May 2011 07:00:18 pm Post subject: |
|
|
Right-aligning isn't that easy mainly because I would have to handle many things on scrolling and adjusting the starting position of drawing the text. If the string is longer than the screen, it wouldn't make a difference - it would still start at the left.
I think that adding in special icons will work... |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 02 May 2011 07:02:06 pm Post subject: |
|
|
| AHelper wrote: | | Right-aligning isn't that easy mainly because I would have to handle many things on scrolling and adjusting the starting position of drawing the text. If the string is longer than the screen, it wouldn't make a difference - it would still start at the left. |
You should have a routine to measure the physical size of a string, and you could just do [X location of widget] +[Width of widget]-[Width of text] to figure out the new starting position. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 02 May 2011 11:20:09 pm Post subject: |
|
|
| For big text, no routine is needed. The font is the same size. It's just that a string like x^2-2*y*x+y^2 will not fit. Sure, I can right-align, but it will often be overridden. |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 03 May 2011 05:31:58 pm Post subject: |
|
|
| AHelper wrote: | | For big text, no routine is needed. The font is the same size. It's just that a string like x^2-2*y*x+y^2 will not fit. Sure, I can right-align, but it will often be overridden. |
I'm a bit concerned that the lack of right-alignment here means that GUI in general cannot be right aligned, or aligned at all with GlassOS. If that is the case, it might be worth looking into adding more to the layout engine. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 03 May 2011 10:46:55 pm Post subject: |
|
|
| (If nobody noticed that I am looking at the Qt docs when making this) I will add in a textAlignment (more time to draw, uglier code, etc.). See Qt::AlignmentFlag |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55733 Location: Earth, Sol, Milky Way
|
Posted: 03 May 2011 11:39:30 pm Post subject: |
|
|
I'm a fan of the idea of a single character at the beginning of lines of text that are answers (or questions, I suppose, either one); perhaps something like a filled arrow? Or whatever you think is best, as you're the author and designer.  _________________
 |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 04 May 2011 12:19:19 am Post subject: |
|
|
| filled in square, hollow square was the idea, but SirC does have a point... alignment will be useful in a larger scope. |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 05 May 2011 05:17:52 pm Post subject: |
|
|
Here are some symbol ideas for you:
Feel free to use them as you like. I still prefer the idea of using the other side of the screen, though. Also, do you have it set up for scroll-back, so you can recall previous questions/answers? _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 05 May 2011 10:14:13 pm Post subject: |
|
|
It will. I will need to mod the GUI_TextBox_Do() code to allow pasting of text.
I will try out your icons when I get that part of the renderer made. (Not hard, just takes a bit of time) I will post images for feedback once I do. |
|
| Back to top |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 06 May 2011 04:58:40 pm Post subject: |
|
|
| AHelper wrote: | It will. I will need to mod the GUI_TextBox_Do() code to allow pasting of text.
I will try out your icons when I get that part of the renderer made. (Not hard, just takes a bit of time) I will post images for feedback once I do. |
Sounds pretty good, but I'm wondering how you'll do copy/paste. The KnightOS model for a global clipboard is that three bytes of RAM are dedicated to clipboard use: a data type ID byte, and a pointer to the data. For text, you'd assign it an ID byte (such as 0x01), and when you copy some text, set the clipboard type to text and point the address to the newly allocated memory for the text. Once a new value is copied to the clipboard, you could free the memory storing the copied text.
I think this method would work pretty well with GlassOS, considering it works globally and can work for several kinds of data, so it can be extended to pictures and rich text and all kinds of other things.
Another suggestion is to add keyboard shortcuts, based on ON-key combinations, so ON+C would be copy, ON+V would be paste, and so on. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
TheStorm

NOU!

Joined: 26 Mar 2007 Posts: 2375
|
Posted: 06 May 2011 05:03:12 pm Post subject: |
|
|
I'd say use the 89 style clipboard, and maybe even the same key combo's, it works pretty well there. And SirCmpwns idea for how to store it seems rather sane, maybe a temp file in the FS for storage would do. _________________
"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 |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 06 May 2011 05:05:23 pm Post subject: |
|
|
| TheStorm wrote: | | I'd say use the 89 style clipboard, and maybe even the same key combo's, it works pretty well there. And SirCmpwns idea for how to store it seems rather sane, maybe a temp file in the FS for storage would do. |
The idea of a temporary file scares me - the filesystem is in ROM, so even with the idea of flash chip wear aside, that would drastically reduce the time between garbage collections (defragmentations? Not sure what GlassOS calls it). In addition, the whole process of writing the file to flash would be a lot slower as well. A clipboard most definitely belongs in RAM. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
TheStorm

NOU!

Joined: 26 Mar 2007 Posts: 2375
|
Posted: 06 May 2011 05:06:47 pm Post subject: |
|
|
I assumed he would have a ramfs or at least write caching so that the issue of fs wear is limited for temp things that may or may need be needed soon. _________________
"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 |
|
|
SirCmpwn

Coding Knight

Joined: 06 Feb 2010 Posts: 1477 Location: Colorado Springs
|
Posted: 06 May 2011 05:13:11 pm Post subject: |
|
|
| TheStorm wrote: | | I assumed he would have a ramfs or at least write caching so that the issue of fs wear is limited for temp things that may or may need be needed soon. |
From my current understanding of GlassOS, he does not. _________________ Drew "Sir Cmpwn" DeVault |
|
| Back to top |
|
|
TheStorm

NOU!

Joined: 26 Mar 2007 Posts: 2375
|
Posted: 06 May 2011 05:16:02 pm Post subject: |
|
|
| SirCmpwn wrote: | | TheStorm wrote: | | I assumed he would have a ramfs or at least write caching so that the issue of fs wear is limited for temp things that may or may need be needed soon. |
From my current understanding of GlassOS, he does not. | In that case I vote it be a virtual file system that maps to system things, for instance /sys/clipboard would be the current string in the clipboard and /sys/apps may list all the apps running etc. Either way having it be a file a program can just read or write two would make things much easier than using a clipboard specific api. Not to mention a sysfs like interface would be useful for quite a few other things. _________________
"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 |
|
|
AHelper

LONG LIVE COMICTECH

Joined: 30 Jan 2011 Posts: 1657 Location: Aufhelperstan, Utopian Republic
|
Posted: 06 May 2011 07:22:39 pm Post subject: |
|
|
A quick note...
I haven't put any work into a clipboard other than "It Shall Be Done". I see where SirC is going. I think that dedicating a 3-byte struct...
Code: typedef enum
{
CB_PLAIN_TEXT,
CB_FORMATTED_HTML,
CB_FILE,
CB_RAW
};
typedef struct
{
byte cbType;
unsigned int ptr;
} clipBoard;
Now, please remember that GlassOS always has 2 heaps, one local, and one global. The global RAM isn't big, but it can surely hold clipboard data. malloc_shared() will do that.
And yes, the entire FS is ROM-based simply because I don't have the same needs as TIOS. It uses a large part of it to store variables, lists, matrices, small programs, etc. GlassOS isn't a calculating OS - It leaves that to programs, which is partially why the heap for each process is huge. I know, a RAM fs might help, but think first that some calc's don't have the extra RAM. That's wouldn't help too much. Now, I wouldn't have an issue with making a ramdisk feature that will let you mark extra RAM as temporary FS space. It would simply go under /mount/ramdisk and all fopen, fputs, readdir, etc. will work in the ramdisk as if it were the flash...
But I don't want to get on that simply because there would be calcs without that option... Don't forget about plans for /mount/linky (or /mount/usb)... It would at least be persistent and wouldn't kill the flash chip
 _________________ °ᴥ° 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 |
|
|
|
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.039919 seconds.
|