Omnimaga

Omnimaga => Completed => Our Projects => Grammer => Topic started by: Xeda112358 on December 29, 2011, 07:48:58 pm

Title: Grammer Feature Requests
Post by: Xeda112358 on December 29, 2011, 07:48:58 pm
This is where y'all can drop your ideas and requests. I make no promises, but it is good to have everything in one place, right? So the first request was by yeong and that was to have a way to incorporate BASIC and Grammer together with Grammer 2 (it was possible in the first Grammer). So here is a program that should make that possible. Just start a line with .0:Asm(prgmGRAMMER and the code up until a Stop will be run as Grammer code. At the Stop, the code will be read as BASIC. You can do this as often as you like in a program, too :) Lemme know if it doesn't work .__.
Title: Re: Grammer Feature Requests
Post by: Yeong on December 29, 2011, 08:23:32 pm
:D
Now I can bomb her with feature requests. >:D
1. Better sound routine (you can do this later)(I just saw the conj(' ' command )
2. "Augmenting" the data that are in the labels. For an example, when .M have 2 data, (Like, 12), I can't augment the 3rd byte in.
3. Maybe access to hacked strings/pictures if it's not already possible
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 29, 2011, 08:52:45 pm
For number 2, you can do that if it is in RAM, but any labels that come after that will need to be recalibrated.

For number 3, if you have a token for it, that is already possible, but I am thinking I can add in the RecallPic and StoPic commands that access all 256 pictures and maybe a solve( command to play with strings and GDBs and whatnot.
Title: Re: Grammer Feature Requests
Post by: Sorunome on December 30, 2011, 07:46:34 am
Feature request: if rectangles are drawn half outside the screen and half inside then there is still the half drawn thats inside.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 30, 2011, 09:09:54 am
Ironically, I have that half working :P It will work if it goes off the right side and bottom portion of the screen. I will see what I can do...
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 31, 2011, 10:28:15 pm
Okay, in response to sorunome, here is an update with full rectangle clipping:
Grammer.8xk (http://www.omnimaga.org/index.php?action=dlattach;topic=10961.0;attach=10980)
(http://www.omnimaga.org/index.php?action=dlattach;topic=10961.0;attach=10979;image)
Title: Re: Grammer Feature Requests
Post by: Yeong on January 04, 2012, 06:41:34 pm
Feature request:
Can you modify solve(0 command so I can put the size I want to copy in optional 3rd argument? :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 04, 2012, 09:28:49 pm
Okay, I like that idea very much and I just added it as well as an optional fourth argument for an offset into the var.
So for example, if I wanted to copy the first 128 bytes of prgmHELLO to the temp program Hi2, I could do something like this:

solve(0,"EHELLO","VHi2",128

Or if I wanted to copy 128 bytes at an offset of 4 bytes into the var:


solve(0,"EHELLO","VHi2",128,4
Title: Re: Grammer Feature Requests
Post by: Yeong on January 05, 2012, 07:02:52 am
Yes! Thank you so much XD
Title: Re: Grammer Feature Requests
Post by: TIfanx1999 on January 05, 2012, 08:03:08 am
Very cool feature addition! =)
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 05, 2012, 10:37:21 am
Thanks to yeong for the idea! And I am still working on these other feature requests when I can find the inspiration:
Code: [Select]
Smoothscrolling
Var11~255 Access
RecallPic
StorePic
Sprite clipping
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 11, 2012, 02:48:21 pm
Hmm, so now I have a question because I am feature requesting 2 more sprite options for Pt-On(:
Masked sprites
Gray sprites

The question is, should I have an extra argument for the pointer to the mask or should I have the mask built in to the data? And if the latter is the case, it would be faster and easier to use every other byte as the mask.

So what should I use? If I do the latter option, I can easily make a sprite editor to handle those two types and then you can use grayscale options for tilemapping :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 17, 2012, 05:03:08 pm
Triple post .__.
Okay, so at Sorunomes request, I finally added in a way to tell which version you have and I added an option to enable the token hook. I even have some future options that you can see but not use (they will let you view different vars). At the moment, you can only toggle the hook ON by pressing F5. Hopefully I will add the ability to restore the hook setting by pressing F5. This way, if you use Axe token hooks (or other token hooks), you can go back and revert to Axe tokens.

EDIT: In relation to the poll, here (http://ourl.ca/14754) is what the text compression routine looks like that I would implement.

Title: Re: Grammer Feature Requests
Post by: Yeong on January 17, 2012, 10:26:28 pm
Request:
When I use [ command, the only option I can think of typing 2-bytes number is this:
C[ㅠFF,ㅠ01    //This will store ㅠ01FF into C
with little-endian format D:
can you add a easy way to do so?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 17, 2012, 10:28:09 pm
Do you mean using iPart(C,ㅠ01FF? Otherwise, I can add [[ for two-byte values and [( for just straight hex.
Title: Re: Grammer Feature Requests
Post by: Yeong on January 17, 2012, 10:29:22 pm
iPart is only good for storing few datas. The code gets ugly once I start to type something like this...

C[0,1,3,ㅠFF,ㅠ01,4,2,ㅠEE,ㅠ78,3,1,.....
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 18, 2012, 01:03:41 am
Okay, two things:
1) Thanks for voting on the poll! It so far looks mixed. I plan in any event to add text compression to Grammer 3 :)
2) I have a few new updates based on this thread-- I added yeong's request (including a request via IRC) and I added in more variable support (such as Str133, GDB67, et cetera). On top of that, I added support for storing Grammer strings to OS strings.

See EDIT2 on this (http://ourl.ca/13558/279192) post for details and the download is on that post, too :)
Title: Re: Grammer Feature Requests
Post by: TIfanx1999 on January 18, 2012, 05:14:12 am
I think text compression is a great idea. It'll help out for projects that have large chunks of text. What about compressing graphical data? :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 18, 2012, 07:54:47 am
That could be tough and it depends .__. The text compressor only works with 46 chars and works using some stats on the most common appearances of letters. Of course, making a general routine that scans any data would probably be neat, too :)
Title: Re: Grammer Feature Requests
Post by: TIfanx1999 on January 18, 2012, 10:06:13 am
Ah, ok. Also, didn't realize the compressor was for short texts ( I probably overlooked it) x.x. And yea, a general routine would be sweet. :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 18, 2012, 11:28:09 am
Oh, I meant only 46 chars can be used. The text can be any size (as long as it and its compressed form fit in RAM).
The characters include punctuation, uppercase letters, numbers, and a few other chars.
Title: Re: Grammer Feature Requests
Post by: Yeong on January 18, 2012, 07:51:28 pm
can you add a "Line Jumping" feature?
like if you put ln(+3, it jumps to 3 lines after (maybe line must be defined by newline token) and ln(-3 jumps back 3 lines and stuff.
It'll be cool. :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 18, 2012, 08:29:12 pm
Okay, wonderful idea and here is your update! As a note, ln(0 will jump forward 65536 lines. Here are some examples:
Code: [Select]
ln(3                 ;jumps to the line with "Yeah!
"Hi
"Whaddup?
"Yeah!             ;The code jumps here
Code: [Select]
Lbl "ScrollMenu→Z
prgmZ            ;StartOfLoop
DispGraph
If getKey(15
ln(-3              ;jumps back to prgmZ

Again, thanks for the token idea, especially! I made a version for ReCode that used other tokens (and was conditional) and I have wanted to add it to Grammer as well, very much. Thanks!  :thumbsup:
Title: Re: Grammer Feature Requests
Post by: TIfanx1999 on January 18, 2012, 08:57:56 pm
@Xeda: Ah ok, it's just a limited character set. :) That's fine then. =D
Title: Re: Grammer Feature Requests
Post by: Yeong on January 19, 2012, 06:58:15 pm
New token hook thingy looks great. :D
However, it kinda bothers me that I can't put "[" in the string anymore. D: (If I do, the code doesn't work properly D: )
Is there a way to disable the token hook at the string part?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 19, 2012, 07:35:56 pm
I think in the next update, I will just remove the hook for { and [. And why can't you put a "[" in a string? It should still show up as [ when it is displayed...
Title: Re: Grammer Feature Requests
Post by: Yeong on January 19, 2012, 10:03:14 pm
I don't know what's happening, but it just doesn't work D:
It just quits Grammer X.x
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 19, 2012, 10:15:09 pm
Oh, jeez, nevermind, I know what it is .__. Here is the fix. I noticed it yesterday when I was making the flame animation and I fixed it and did not even think to upload the fix here. For ASM programmers, I originally needed an extra POP to exit the routine, but then I rearranged it to not need that, but I left the POP in.
Title: Re: Grammer Feature Requests
Post by: Yeong on January 31, 2012, 06:54:57 pm
Yet Another Feature Requests/Maybe Question

1)How do I copy picture to memory address? (I'm pretty sure it can be done with Fill( command but just making sure.)

2)I think I read something about 32 bit number stuff. Are you still planning to implement it?
Title: Re: Grammer Feature Requests
Post by: Builderboy on January 31, 2012, 07:00:27 pm
EDIT: I blame chrome >.<
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 31, 2012, 09:40:49 pm
1)How do I copy picture to memory address? (I'm pretty sure it can be done with Fill( command but just making sure.)
2)I think I read something about 32 bit number stuff. Are you still planning to implement it?
1) You have a few options. If you have the data in RAM, you can use the Fill( commands. However, since that copies 768 bytes and the OS stores 756 bytes, you might want to do something like this:
Code: [Select]
solve(0,"GPic1","Vt→A
solve(1,A,pi9340,756        ;copies the 756 bytes to the graph screen.
2) Well, I do have some 32-bit stuff in the App, but not fully available in Grammer. However, there is support for multiplication, addition, and subtraction. For example, you can take advantage of Ɵ' in a lot of cases. I know in IRC you wanted to do 32-bit addition and subtraction for things like money in a game:
To perform GG'+B where G is the upper 16-bits and G' is the lower 16-bits:
Code: [Select]
G'+B→G'
G+Ɵ'
If Ɵ'         ;this means 32-bits were exceeded D:
-1→G'         ;This is negative 1, not minus 1
→G
And similarly for subtraction:
Code: [Select]
G'-B→G'
G--Ɵ'       ;this is minus negative Ɵ'
If Ɵ'       ;this means 32-bits were exceeded D:
0→G'
→G
Title: Re: Grammer Feature Requests
Post by: Yeong on February 02, 2012, 08:50:18 pm
one more request: able to display 32 bit numbers in decimal.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 02, 2012, 09:00:53 pm
I can definitely do that, but what command should I use to signify a 32-bit number? (I might use it in other areas, too, such as 32-bit math)

EDIT:Rather, what token?
Title: Re: Grammer Feature Requests
Post by: Yeong on February 02, 2012, 09:02:47 pm
maybe u? (2nd+7)
and for reading 32-bit numbers from data, (( might be good. (Unless it's used, that is)
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 02, 2012, 09:05:07 pm
I can do that, I think. Is there any other better tokens to use?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 04, 2012, 12:25:59 am
This does not handle 32-bit inputs via math or numbers, but it will display 32-bit numbers by using two variables in a row. For example, if B was FF0Fh and B' was 7BACh, you can display FF0F7BAC by doing this:
Code: [Select]
Text('0,0,BB'
(that will display 4279204780 if my math is correct)

Because of how I coded this, Grammer actually stores intermediate values as 32-bit numbers (but the upper 16-bits are all zeroes). This means that I might need to modify the Fix command to allow for one more mode-- 32 bit mode.

EDIT: Luckily nobody downloaded before I found a bug that I forgot to fix... I forgot to change a byte in the For( command because I changed the routine for locating a variable. It is now fixed :)
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 04, 2012, 10:42:33 am
Another feature added and also some minor fixes:
you can now use the exponential E ([2nd][,]) to prefix a binary result. This does return 32-bit values for text output and maybe for future use with 32-bit math.
Title: Re: Grammer Feature Requests
Post by: Yeong on February 04, 2012, 12:31:42 pm
so now E101 = 5? Great. :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 04, 2012, 01:37:07 pm
Yes, exactly :) I am trying to think of what else to add D:
Title: Re: Grammer Feature Requests
Post by: Yeong on February 04, 2012, 01:38:22 pm
what you could do is do base E number
so 3E99 means trinary 99.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 04, 2012, 01:41:50 pm
Right now, the conversion from binary is pretty fast. Converting from an arbitrary base could be pretty slow, though :/ I mean, it is doable, but I would prefer to use some other token so that binary can be read fast.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 28, 2012, 12:25:55 pm
After working on this (http://ourl.ca/15341) topic (and still failing), I have added a few useful functions. First, e^(n now performs 2^n (and the token hook changes this accordingly). This is a function that will likely remain as I have wished it was included for a while. The next thing I added was probably even more important and useful for many projects-- pixel testing boxes. This is especially useful for collision detection and I plan to add more versions at some point. The method I have added pixel-tests the border of the given rectangular region and returns the number of set pixels. (I plan to add methods for pixel-testing filled regions, as well)

It uses a modifier of pxl-Test( and similar arguments to Line(, so here is an example to check the perimeter of a pixel at (Y,X):
Code: [Select]
pxl-Test('X-1,Y-1,3,3,0    ;0 is the type (test the perimeter)
A value from 0 to 8 will be returned :) I am putting this in Feature Requests because I was wondering what folks thought and if they had similar suggestions before I release it. Also, I still have to work on it a bit more. It works for my purposes, but it still needs to handle screen boundaries better.
Title: Re: Grammer Feature Requests
Post by: Yeong on February 28, 2012, 06:36:59 pm
is there a way to display token as according number? (Like comma to 42[iirc] )
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 28, 2012, 08:42:24 pm
To display an ascii char, you do something like:
:Text(0,0,'43

To display a token using the hex value, you can do something complicated like this:
:pi8478→A[(2B00
:Text(0,0,A
Title: Re: Grammer Feature Requests
Post by: Yeong on February 28, 2012, 09:38:59 pm
Hmm. I don't remember reading about Text(coord,coord,'Stuff ... D:
I'll try it though. XD
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 28, 2012, 10:09:26 pm
Yeah, it was kind of sneaked in once when I made a bunch of updates :D I made an edit to the readme, but I don't think I ever let anybody know .__.
Title: Re: Grammer Feature Requests
Post by: Yeong on February 28, 2012, 11:08:39 pm
/me remembers "Full" incident. :D
Title: Re: Grammer Feature Requests
Post by: Yeong on March 03, 2012, 11:49:45 am
So I've been messing around with the greyscale and whatnot.
My request is: can you add Tangent( into one of the greyscale-enable command?
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on March 07, 2012, 11:20:50 pm
Question what GS levels does Grammer support? Is it like Axe where you can use 3 or 4?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on March 25, 2012, 08:50:26 am
@DJ_O: D: I thought I already posted a response to this, sorry. It must have been a bad internet connection at the time :(

Currently, only 3-level gray is supported, but I would like to add 4-level in the future, as well.
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on March 25, 2012, 12:54:02 pm
Ah ok thanks for the info. :) ALso nice update in the other topic :D
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on April 26, 2012, 06:32:28 pm
persalteas gave a great idea to add the ability to use Omnicalc fonts. I've been looking for an idea for the fourth font option and I think this is the best one :) This also means that it will work with BatLib fonts, too :) As a note, you must use an offset of 11 for Omnicalc fonts (they have extra data at the beginning). So for example, I have an Omnicalc font called prgmBOLD:

Code: [Select]
Output(3,11+Get("EBOLD
And now Omniacalc fonts can be used in your Grammer programs :) This is very helpful since there are tons of Omnicalc fonts available :)
Title: Re: Grammer Feature Requests
Post by: persalteas on April 27, 2012, 04:18:32 am
Aha ! nice ! =)

the advantage of Omnicalc fonts is that they can create small sprites easy to use. (by sacrificing one character.)

Good job.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on May 01, 2012, 05:19:15 pm
Okay, so I am adding in some custom particle effects, but I need input on how I should have the ruleset stored. Should I do it as a number or like this:

P>Ry(3,"D,LR
That will make it try to go down first, then if it can't, it will try left or right. Currently, I have it number input like this:

P>Ry(3,5632

In binary, 5632=0001 0110 0000 0000. I would like to know if I should reverse this so numbers are smaller? For example, 0110 0001 which is 97?

Also, the particle engine is faster ^_^

EDIT: Ended up doing both :)
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on December 27, 2012, 04:15:01 pm
I wonder if you plan to add support for numbers up to 60,643,687,620? :trollface:

For example if members decided to port one of my old RPGs to Grammer, there are certain with elemental magic properties that can reach that high in amount of damage caused to the enemy (before being brought back to 9999) :P

For example, in Illusiat 11, there is a boss that takes 250 times more damage vs any elemental magic, so if you use the tri-elemental magic which multiplies all 3 elemental defense/weaknesses together, this means the boss takes 15,625,000 times more damage than normal vs that spell. :P
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 30, 2012, 05:02:11 pm
In the plans for a future Grammer, I did plan to support arbitrary sized numbers, since the OS version is planned to replace the current TI-OS, even in math. However, I don't think Grammer 2 will support that natively (though I made a program in Grammer code that could handle large numbers like that).
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on December 30, 2012, 05:18:05 pm
Ah ok I was asking since Yeong is porting Illusiat 11 to Grammer (http://ourl.ca/18029/331833;topicseen#new) for the Cemetech contest (which ends in 3 weeks), but due to the way damage formulas are done in the game, the number range supported by grammer was nowhere close to prevent glitches from occuring in the port if the character happened to fight very weak monsters at high level, especially the tri-elemental magic spell.

Also I think he ran into a bug with 32 bit numbers causing them to not be fully supported, as in above 2 or 4 millions or something, they glitched out.
Title: Re: Grammer Feature Requests
Post by: Yeong on December 30, 2012, 09:19:46 pm
Well xeda said the maths are not yet done so XP
Also why won't recallpic work?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 31, 2012, 08:33:44 am
I have no clue why it isn't working for you, it works fine for me. Well, actually, I have an idea... What is your code, precisely, and what picture are you trying to recall?
Title: Re: Grammer Feature Requests
Post by: Yeong on December 31, 2012, 10:46:13 am
Well I did RecallPic 9 and tried to load os var pic9
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on December 31, 2012, 04:05:06 pm
To load OS var Pic9, you need to do RecallPic 8 :P Remember:
0=Pic1, 1=Pic2, 2=Pic3, 3=Pic4,...,Pic0=9

TI names them weird (internally, they start at 0, but to the end user, they display starting at 1).
Title: Re: Grammer Feature Requests
Post by: Yeong on December 31, 2012, 05:49:42 pm
oh. so Grammer version starts with 0, then. XD
I probably need an updated readme file.
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on December 31, 2012, 07:09:45 pm
Btw Yeong I don't think you're allowed to get any help for Illusiat if that's what you're asking above :P

Quote
3) No private help from others. No code help from others. Feedback on screenshots and ideas may be requested (only) in the entry's official Cemetech topic, but keep in mind that we will be grading you on your originality.

Of course reporting Grammer bugs is fine, although you have to be careful to not report plenty of false positive since people might inaverdently help you.

I think I have read somewhere that it might be tolerated if done directly in your Cemetech topic, but you might have to make sure first. Just making sure you don't get in trouble.
Title: Re: Grammer Feature Requests
Post by: Yeong on January 01, 2013, 03:23:22 pm
Well basically all I asked for was the correct syntax of recallpic so I should be fine.
Title: Re: Grammer Feature Requests
Post by: Yeong on January 02, 2013, 08:02:57 pm
Feature request: any other methods other than overwriting with RecallPic.
Also can grammer writr text on backbuffer?
Title: Re: Grammer Feature Requests
Post by: Yeong on January 02, 2013, 09:38:06 pm
Sorry for double posting but my phone won't let me. :P
It seems like grammer goto/prgm doesn't work inside conditionals.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 03, 2013, 04:48:51 pm
I think we covered a few of these on IRC, but for everybody else:

If Uses everything on the line, regardless of what the token is, even if it is a colon. Colons will separate commands, but does not work exactly like a newline. This allows more complicated math formulas in the conditional.

To draw Text( on another buffer, you will need to make that buffer the main buffer. To set it back to the main buffer afterwards, use Disp pi9340.

Recallpic has the following syntax: RecallPic #[,Method[,Buffer
So to use a different type of logic, change Method:
0=Overwrite
1=AND
2=XOR
3=OR
5=Erase
Title: Re: Grammer Feature Requests
Post by: Yeong on January 03, 2013, 04:51:09 pm
Ah. Stuffs like recallpic syntax is not on the readme I have Xp
Can I haz a newest readme?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 03, 2013, 04:54:13 pm
This has the most up-to-date released readme, I believe.
Grammer 2 (http://ourl.ca/15327/299276)
Title: Re: Grammer Feature Requests
Post by: persalteas on January 22, 2013, 03:59:43 pm
Can you make an "Else" command ?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on January 22, 2013, 04:05:07 pm
I have very little coding space, but I might be able to add that. It is definitely a good idea.
Title: Re: Grammer Feature Requests
Post by: persalteas on January 22, 2013, 04:06:12 pm
Thank you ;D
Title: Re: Re: Grammer Feature Requests
Post by: DJ Omnimaga on February 13, 2013, 01:11:43 pm
Feature suggestion (in longer terms): TI-84 Plus C Silver Edition compatibility. :P
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 13, 2013, 01:14:09 pm
My plan for an 84+C version is to maintain backwards compatibility. This way programs can be identical and work the same. The main difference will be color and how big pixels are.
Title: Re: Grammer Feature Requests
Post by: DJ Omnimaga on February 13, 2013, 03:40:43 pm
Ok cool to hear. :D From what I gather, unless the new calc is not even a Z80 and lacks Z80 emulation at all, it should just be a matter of address changes like the TI-83 to 83 Plus and different screen, so the non-screen parts of Grammer might not be too hard to port. Of course that might be problematic if you still code everything on-calc and don't buy a new calc, though.
Title: Re: Grammer Feature Requests
Post by: Sorunome on February 13, 2013, 08:10:59 pm
That is awesome to hear!
At least some language will be available on the 84pcse/me glares at axe
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on February 13, 2013, 08:47:27 pm
Yeah, I will need to rewrite the graphics commands, but so long as it can run z80 code, the rest shouldn't be tough to convert.
Title: Re: Grammer Feature Requests
Post by: Soulthym on April 26, 2013, 02:04:04 am
Why not making a compiler that compiles only a part of the code from a label in the source to another. I believe it'd be awesome and maybe faster!
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on April 26, 2013, 06:20:20 am
I am not exactly sure of what you mean, sorry :/ Grammer 2 doesn't compile anything, so I am not sure where that would help out at the moment (but compiling is in the plans for Grammer 3). However, there are tricks for working with labels to make them faster, such as precomputing their location and storing them to point variables. This way, you don't need to constantly look up labels.
Title: Re: Grammer Feature Requests
Post by: Soulthym on April 26, 2013, 01:06:43 pm
   Sorry, I meant making a way to pre-interpret a part of the code (like loading a part of the code interpreted in a temporary programm).
   I think it would have to be done while lauching the programm.
   With ".Token" as your way to locate what I call the Label, the structure may look like that:

Code: [Select]
.0:"name"
;Your code
.Token ;It has to compile from the beginnig and until it reaches this point.
;another code
.Token ;It has to compile from the last token and until it reaches this point.
[...]
; End of the code.

I think this would improve the speed (comparing to interpreting) of the programms and use less of memory than compiling.

    Sorry for my English, I'm a French student  :-[
Title: Re: Grammer Feature Requests
Post by: persalteas on April 26, 2013, 02:10:16 pm
Sorry for interrupting the conversation (Soulthym ? Un étudiant français qui fait du Grammer ? Serions-nous deux ? :o ), but I have an idea...

I saw what you have done with your app 'Tutor' Xeda, and I thought it could be very useful in Grammer.

I explain:
Imagine the user sets a list of keycodes that would be automatically pressed the next time the calculator will be waiting for a signal from the keyboard, we could make:
In the same way, but much less useful because it can be easily done yet with getkey, create a function that records what key are pressed to make an history.

With this two functions, the user could record a manipulation and re-do it many times automatically.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on April 26, 2013, 07:37:23 pm
Okay, I think I see what you mean, soulthym. I don't have much code space left in the app for something that complicate.

EDIT: I accidentally clicked 'post' before finishing :P

@persalteas: Unfortunately, the OS doesn't parse key hooks during program execution unless you are at an 'Input ' command, Pause, or Menu(
Title: Re: Grammer Feature Requests
Post by: Soulthym on April 27, 2013, 06:31:11 am
No matter, maybe I'll be working on that during holydays^^(is it possible to have the grammer source in asm?)
Edit:Maybe it could be implemented in an alternative version of Grammer 3(like Grammer 3 precompiling version)
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on April 27, 2013, 07:19:53 am
I could probably make an alternate, unofficial version. It would probably have features removed, though, o make room.

The source is typically included with the download, but here is the current code that I have (attached). I am not sure if it works because it has been a while since I last looked at it.
Title: Re: Grammer Feature Requests
Post by: Soulthym on April 27, 2013, 09:42:51 am
Thank you a lot!
Edit: I just thought: Why not including plugins( like mimas does for example)?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on May 08, 2013, 06:26:33 am
I just thought: Why not including plugins( like mimas does for example)?
Sorry, I did not see this for a while. I was thinking of doing that, but I thought it would be too difficult. It would be really easy if the plugin was an app.
Title: Re: Grammer Feature Requests
Post by: mdr1 on May 12, 2013, 02:15:23 pm
@persalteas : et moi, je compte peut-être pour du beurre ? Certes, je n'ai absolument rien fait et ne connais ce langage que très partiellement... Mais je soutiens totalement le projet et développerai peut-être des trucs lorsque j'en aurai le temps !

@Xeda:
When we call a label, it needs time to find it. We can put the address in a variable, but it needs memory and a new name for each label. So why not add a new type of label being automatically parsed at the start of the program so that the application doesn't have anymore to parse it each time it is called ? For example, such a label could be declared as :

Code: [Select]
..LABEL
And when we do "call LABEL" or "Goto LABEL", the address will be stored for all the program execution.

PS : why not include to your .zip persalteas' tutorial ?
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on May 12, 2013, 02:29:47 pm
@Xeda:
When we call a label, it needs time to find it. We can put the address in a variable, but it needs memory and a new name for each label. So why not add a new type of label being automatically parsed at the start of the program so that the application doesn't have anymore to parse it each time it is called ? For example, such a label could be declared as :

Code: [Select]
..LABEL
And when we do "call LABEL" or "Goto LABEL", the address will be stored for all the program execution.
Hehe, that is something that I am already working on (I even have had code for almost a 10 months in Grammer for this).
PS : why not include to your .zip persalteas' tutorial ?
I include a link to it in the readme, but I should remember to put the actual PDF in there.
Title: Re: Grammer Feature Requests
Post by: mdr1 on May 12, 2013, 02:33:45 pm
Hehe, that is something that I am already working on (I even have had code for almost a 10 months in Grammer for this).
Ans why not do so that this function is enabled for "." and disabled for ".." instead ? Labels which location doesn't have to be stored are rare and are used only when there's lots of SMC.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on May 12, 2013, 02:36:50 pm
Well, the code currently replaces the data with data not usable in the TI-BASIC editor (which is why I haven't officially added it). Otherwise, all labels would get replaced :)
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on November 02, 2019, 01:21:02 pm
Necro-post since this is the appropriate location:

I was thinking it might be neat to be able to execute Grammer programs that are stored in Groups. I'm not sure that it would be useful, though.

Some other features that might be cool:

These aren't ideas that are really necessary, so I might not even add them. Or maybe I need a way to add "hooks" for the main menu so that people can download extensions?

I'd love some feedback, but there aren't many active Grammer users anymore.
Title: Re: Grammer Feature Requests
Post by: NonstickAtom785 on November 04, 2019, 12:11:53 pm
I think instead of adding hooks you should create an appvar search that finds any appvar that starts with a specific header, like how Grammer figures out which prgms are Grammer programs.

I don't know if you would need hooks or not for that.  :w00t:
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on November 04, 2019, 01:52:18 pm
Oh, I mean just Grammer's own "hook" system where it calls external routines (in appvars) at various stages of menu rendering. The plan was to have a way for external packages to kind of register with Grammer, with pertinent info stored in Grammer's appvar so that multiple hooks and stuff could be registered. But, that got complicated when I tried it last year :P
Title: Re: Grammer Feature Requests
Post by: NonstickAtom785 on November 05, 2019, 08:41:46 am
So what I'm getting from this is that you tried to make a system where external variables registered with Grammer and Grammer would interact with the hooks of that variable??? Could you dumb it down a little? O.O
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on November 05, 2019, 09:05:06 am
So my intent was a "parser hook" kind of feature. So when Grammer was getting ready to parse a token, it would first pass it through a third-party program in case they would alter parsing. Now I think it might be useful on the main menu during, say, the filtering step (when it is figuring out which programs to display), or for keypresses or something.
Title: Re: Grammer Feature Requests
Post by: NonstickAtom785 on November 05, 2019, 09:46:44 am
Ahh. I get it now. Thanks for explaining. I know how annoying that can get.  <_< 1337
Title: Re: Grammer Feature Requests
Post by: NonstickAtom785 on November 07, 2019, 09:54:04 am
The Menu( Command Feature Request

Menu(ᵒx,y,w,"Item 1"[Lbl pointer],"Item 2"[Lbl Pointer],etc...

If that's to hard then add + to it maybe?

Another Idea:
Menu('x,y,w,[Lbl pointer]*

*The Lbl would have a description, in the form of a String, that tells the menu what the name should be. If there is no description then the name of the label is used.
Title: Re: Grammer Feature Requests
Post by: Xeda112358 on November 07, 2019, 10:06:55 am
Quote
*The Lbl would have a description, in the form of a String, that tells the menu what the name should be. If there is no description then the name of the label is used.

I don't understand, sorry. As for the former, you can use the existing Menu(' command. You supply a pointer to a routine that gives the strings, and a routine that does something when an item is selected. In the latter routine, you could Goto different labels based on what is selected.