Should I make a "distro" system or keep it proprietary?
"Distros" would be great!
 71%  [ 5 ]
Proprietary is the way to go!
 28%  [ 2 ]
Total Votes : 7

Hey everyone! Recently I've been thinking about making the next version of my shell Fiddle. For those of you who don't know I've been working on a BASIC/ASM shell called Fiddle for almost 3 years and its almost on version 3.0. But back to the subject at hand, as I said I've been thinking about making the next version of Fiddle. Along with making the newer and better shell I've been thinking about adding some newer features. One of the features is a simple BASIC/AXE multitasking system. The problem is that I have no ideas on how to to do this other than a while loop that runs simple programs every rep of the loop. I'm really looking for ideas here and if anyone has any would you please post them in this topic. Other features I've been thinking about would be hook system or a built-in GUI system. Again, if you have any ideas would you please post them in this topic. Just to let you guys know I will be adding a credits to the shell and whoever gives me any ideas i use will be put in the credits. Thanks ahead of time of all the ideas!
Nobody? Nobody has any ideas? I'm really looking for help here and I know nothing about this subject. Really, any help would be be greatly loved! also Kerm informed me that this should be about multitasking not multithreading.
here's a screenshot of Fiddle 3.0 so far.

I like the icons. I would make them not transparent, though (eg remove the horizontal line that cross the 3 of them). Also do you use Doors CS 7 mouse routines?

(As for lack of replies, keep in mind that basic shells had a very bad reputation in the TI community for many years since they often outnumbered every other ticalc.org category, making it hard to find anything else there, and they tend to be seen as useless compared to alternatives such as Ion, MirageOS and Doors CS)
To answer your question no I do not use DCS7 mouse routines, Also I'm going to remove the the line by drawing an inverted rectangle behind the icon. As for the uselessness I'm adding a whole bunch of basic functions and new kinds of features. I think that the multitasking, the basic functions and the widgets should attract some attention.
I think your multitasking/multithreading idea is ambitious but a red-herring. You will be almost definitely unable to multitask any sort of BASIC programs within massive rewriting of the BASIC interpreter, thanks to zero state isolation of any sort in the OS. Even ASM programs would have to be specially rewritten to keep their state in specific, well-defined places, and for sanity, to periodically release control in a cooperative multitasking scheme. I'd focus on core shell features like running programs normally for now.

Also, I recommend that you make the buttons on the top bar of your windows larger. In the screenshot, it looked like you were having trouble aligning the cursor with the Mac OS X-style close button. Does your mouse have acceleration or constant speed?
Well Kerm I was actually thinking of writing the multitasking in Axe
and maybe even writing a simple language for the multitasking if needed. I really want this to work it shouldn't be that hard to do. I have experience with writing game that run several different things at once. All I need to do is write a while loop and each tick the multitasking programs will be run. I'll also have a variable API that programs can use. (this will most likely be done with an array) I'll have command like gtvar("var_name") and setvar("var_name"). So basically with these functions I could create basic multitasking. Of course the coding style would be a little different but it would still work. Unfortunately you wouldn't be able to do much more that widgets and small programs but still this would still provide some great functionality for a calc! as for the question about the mouse, yes it has acceleration but it doesn't work very well (exmpl. the mouse accelerates too fast.). If you have any ideas on how to fix this then go ahead and tell me. Also if you have any ideas on the multitasking that would be great too!
Horray I got the multitasking working, its a but slow thought. anyways here's a screenie:



insert-kermm

thanks for the support guys!
Hey guys this is just an update about Fiddle 3.0. First is a simple design change. what is it, you may ask. Well basically I've decided to make most of the shell features done with what I call the console concept. This basically means that all things are done through a console. This includes, running programs, archiving/unarchiving programs, viewing pictures and running bits of code! Now you may have noticed that I said running bits of code. That brings us to our next change. From the console you can run bits of code which you Can then use to alter the program in some sort of way. So if you where to run "7->x" this would set the mouse x coord to 7. This could be handy for any mods to Fiddle someone might make. or it could just be used for messing around. And last but not least the third change is the ability to write shell extensions. These are writen the same way a multitasking program is and are put in the "prgms" file too. I'll release a guide to the differences when Fiddle has a stable build, till' then I keep u guys updated!
Seems that there's an new shell with new ideas that is going to potentially have a home on my calc. I'll beta test if you want.
Well I am pleased to to say Ordelore that I now have a stable release. I unfortunately haven't written any good multitasking programs yet but you are free to test it if you want. I'll try to post the files later today.
spud2451 wrote:
Hey guys this is just an update about Fiddle 3.0. First is a simple design change. what is it, you may ask. Well basically I've decided to make most of the shell features done with what I call the console concept. This basically means that all things are done through a console.
Can you give us an abbreviated list of the commands you're thinking of including, as well as the syntax you envision?
Well Kerm as for the list of commands for the console you just use TI-BASIC. It's a TI-BASIC console. so anything you can do in TI-BASIC. But you could make a command library for it if you wanted to. You could even use any BASIC libraries you have installed too
Well guys here's the documentation!

Code:

+--------------+
|Fiddle 3.0    |
|              |
|By: Nate Fitz |
|              |
|Under gpl 2.0 |
+--------------+
System Variables:
    a: the current key being pressed
    b: the curent shell mode. this can be..
       1 for the desktop, 2 for the console, or 3 when in a Fiddle program
    c: if the mouse was clicked this tick. 1 for true 0 for false (this may change if I add right click)
    x: the current mouse x coord
    y: the current mouse y coord
    s: if the shell is being started for the first time or the shell was reset
       this will be one on the first tick of the program
    Str1: the last command run through the console.
    Str2: the current focused multitasking program

Multitasking Program Structure:

If you where to make a multitasking program for fiddle, this is the struture you would use.
Heres an example program that will show the allow draws a 3x3 ascii art picture from a string.
+----+
|code|
+----+-----------------------------------+
|:"what to do when the shell starts      |
|:If S                                   |
|:Then                                   |
|:"+-+! !+-+"->Str3                      |
|:End                                    |
|:"what to do when focused on            |
|:If Str2="ANIMATION" And B=3            |
|:Then                                   |
|:Output(2,1,sub(1,3,Str3                |
|:Output(2,1,sub(4,3,Str3                |
|:Output(2,1,sub(7,3,Str3                |
|:End                                    |   
+----------------------------------------+

The great thing about this is that another porgram can change
the picture just by editing Str3.If you wanted somthing to constantly
update you would stick it out of any form of conditional.
But for optimation reasons I would recomend you try to put things in
conditionals.

Widgets:

Widgets are pretty simple. Here's an exaple widget that brings up a calculator when clicked.
This widget is not a drag and drop widget. You have to program that feature yourself.

+----+
|code|
+----+-----------------------------------+
|:"test if in desktop mode               |
|:If B=1                                 |
|:Then                                   |
|:Output(4,4,"[Calc]"                    |
|:"test if mouse clicked                 |
|:If C=1 and X>3 and X<10 and Y=4        |
|:Then                                   |
|:"if mouse clicked start calc           |
|:While Not Str4="STOP"                  |
|:input ":", str4                        |
|:Disp expr(Str4                         |
|:End                                    |
|:End                                    |
|:End                                    |
+----------------------------------------+

Extentions:

Extentions are sort of a comination of all these things.

Here's on that displays your mouse coords
next to your mouse.

+----+
|code|
+----+-----------------------------------+
|:Output(Y,X+1,Y                         |
|:Output(Y,X+3,","                       |
|:Output(Y,X+4,X                         |
+----------------------------------------+



Thanks and I hope this helped!
I finally got a chance to try it our today.
NOTE: THIS WAS TESTED ON WABBITEMU
The interface is very useful and I like how you have the multiple screens set up. I was able to get a nice screen mess-up program wiget made. Port this to Axe soon! It will be nice to get rid of the run indicator.
Just to let you know ordelore I've been working in porting it to Axe. I'm almost finished, maybe another week tops!

EDIT: Does anyone know why when I use this code to copy data toa file it doesn't work.


Code:
:input→D
:{D-2}→E
:Copy(D,GetCalc("prgmU",E),E)


When I type "Disp 5:pause" it comes up with "+log(Output^" in the file

(the plus in the output is the tiny plus not the one used for addition)

Can someone help please?
I debugged this code and discovered the issue, which turned out to be a quirk of how OS memory management works that you usually don't need to consider. The issue is that, when creating the program to copy the input to, the space for the program is allocated before the input string in memory, pushing it downwards to some other location and making D no longer point to it.

Thankfully, if you're using Axe 1.2.0+, the solution is fairly simple. Axe has two special variables, Y₁ᴛ and Y₂ᴛ, which the OS automatically adjusts when rearranging memory to follow the same part of the variable they pointed to. This also means that the reference to one of these variables as the first argument of the Copy() command has to come after the new program was created with GetCalc(), or the pointer will be read before it gets moved, making this whole song and dance pointless. But this gives you an excuse to implement proper error handling anyways.

So here's the solution I came up with. It also has a bit of optimization of squishing stuff into the GetCalc() line and a fix to make the 1-byte read of the input size a 2-byte read.


Code:
!If GetCalc("prgmU",{input→Y₁ᴛ-2}ʳ→E)→P
.Not enough RAM
Else
Copy(Y₁ᴛ,P,E)
End
Thank you sooooooo much Runer I wouldn't have been able to figure that out on my own.

as for a little update on how the Axe version is coming along. I have the "multitasking" implemented and I have the main screen programmed. All that's left to do is is finish the console and add the program focus button.
!!!UPDATE!!!

For those of you who haven't been following the Fiddle Project lately I originally codded Fiddle 3.0 in BASIC, but recently I've been working on an Axe version. As of the fifth of November 2013 I've finished a stable Axe version of Fiddle. This will be called Fiddle 3.0.1. For those of you want to try it out you best bet is to beta test it. To sign up for beta testing post in this topic. we are at a lack of beta testers so any help would be appreciated. Thanks!
To answer your IRC question about graphics and multitasking (in the future, I recommend you ask questions like this in topics): As long as the graphical operations each parallel process performs is limited and occasional, you should be able to have enough speed. For example, updating a clock once a minute while the main shell's key input is running and processing. As I've said before, though, you need to define a very precise set of operations that multitasking programs can perform to avoid them interfering. For example, two parallel programs cannot both display text, because pencol and penrow are global.
  
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 2
» 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