• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 422702 times)

0 Members and 2 Guests are viewing this topic.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2190 on: April 20, 2011, 10:26:04 pm »
Are you sure? That's never happenned to me.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2191 on: April 20, 2011, 10:30:27 pm »
Here, screenshot, just because:
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Ashbad

  • Guest
Re: Features Wishlist
« Reply #2192 on: April 20, 2011, 10:32:56 pm »
Yeah, they are bitwise, which is why you need parenthesis around statements in a logic sentence with more than one logic check, such as:

Code: [Select]
If (X=0 And (Y>5)) Or (Y=16)
Because the equals, not equals, greater than, etc. return 1 or 0 if it is true, and the logic operators handle the bitwise comparisons.  With the sentences out of the way, this is what it looks like otherwise:

Code: [Select]
If ((1) And (0)) Or (1)
I think its 8 bit comparisons, but I'm not sure about that part.  However, it is bitwise, though usually all it does compare is 1's and 0's.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Features Wishlist
« Reply #2193 on: April 21, 2011, 11:20:33 am »
Yap, every If that uses a and or a or or any other operation like this requires parentheses in all the ones that aren't the first.

Just like Ashbad said and calc84maniac proofed.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Features Wishlist
« Reply #2194 on: April 22, 2011, 08:31:53 pm »
*calcdude/calcdude84se/calcdude84pse
Actually, what I proved is that " and " etc. are bitwise and not logical. ;)
A more realistic example than the "1 and 2" one is in the potential optimization of this code segment:
Code: [Select]
If A=/=0 and (B=/=0You might think "Hey, it's testing =/=0; I can just remove that!" But, if A=1 and B=2, for example, "A and B" will yield a different result. That's part of how I encountered bugs a few times.
Also, Ashbad, your code works just the same as
Code: [Select]
If X=0 and (Y>5) or (Y=16)(You don't need the parentheses around the arguments to " and ")
Note too that just because they are bitwise doesn't mean that you need parentheses. Those rules apply for any infix (taking arguments like "ArgA OPERATION ArgB") operator, and probably others.
What you said is just a direct effect of Axe's utter lack of order of operations ;)

Also, after someone else posts another feature request, if we want to talk about this more could we do it in another thread? Otherwise it makes it a bit hard to see feature requests ;D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #2195 on: April 23, 2011, 06:56:54 pm »
An update on my progress today:

Something I thought would be useful, but not requested yet, was to made rand dereferencable.  So now orand returns the pointer to the seed.  One use is to use {orand}r to return the most recent number generated from a rand call.  Another unintended consequence which I was at first about to fix but decided to keep is that you can use rand as the variable in a for loop!  so For(rand,0,10) will actually work and use the seed as the location to store the counter.  This is great for programs that don't use random numbers and want an extra variable.  Just beware that any call to rand will change its value (which would screw your for loop)

Another thing I added was the ability to stack Fix commands.  So "Fix 135" is the same as "Fix 1:Fix 3:Fix 5".  Also, there is now a fixed jump table built into the app so hopefully applications like DoorsCS and zStart can take advantage of using some useful Axe features externally once I release the API.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Features Wishlist
« Reply #2196 on: April 23, 2011, 09:15:33 pm »
Another thing I added was the ability to stack Fix commands.  So "Fix 135" is the same as "Fix 1:Fix 3:Fix 5".  Also, there is now a fixed jump table built into the app so hopefully applications like DoorsCS and zStart can take advantage of using some useful Axe features externally once I release the API.

Whoa! Those are all features immediately useful to me :w000000000000t:

Thanks Quigibo! Glad you're still actively making Axe better :D
« Last Edit: April 23, 2011, 09:15:52 pm by Deep Thought »




Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2197 on: April 23, 2011, 09:18:20 pm »
getkey(key1,key2...)
This would check all of the keys with the corresponding getkey numbers and return the getkey number of the one that was pressed.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2898
  • Rating: +467/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2198 on: April 23, 2011, 09:21:19 pm »
getkey(key1,key2...)
This would check all of the keys with the corresponding getkey numbers and return the getkey number of the one that was pressed.
What if more than one is pressed?
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2199 on: April 23, 2011, 09:21:56 pm »
getkey(key1,key2...)
This would check all of the keys with the corresponding getkey numbers and return the getkey number of the one that was pressed.

I can't really think of a use for that, it seems to me like plain old getKey would do what you want. Although perhaps I'm not quite understanding your suggestion. Could you give me an example of how it might be used?

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Features Wishlist
« Reply #2200 on: April 23, 2011, 09:49:50 pm »
calc84manic: It would return the first value in the list
Runer112: Instead of having to check if getkey (not getkey()) is part of a list of accepted values and then do getkey->VAR, you'd do getkey(list) and get the same speed and keyholding abilities of getkey()
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2201 on: April 23, 2011, 09:49:50 pm »
I don't feel great about bumping my own suggestion because I don't want to make it seem like I think my suggestion is more important than others. But in reality, it sort of is. I know you (Quigibo) have been leaning away from adding new commands and instead implementing parser and general application improvements, leaving new commands for Axiom programmers. I think this is a great idea, leaving the deep down technical stuff to the person who knows it best and leaving the job of writing commands to the general assembly programming populous. But it would be useful if Axiom programmers had a programming tool that currently only you have. There are commands that I'm literally just waiting for this ability to finally implement.

The Axiom system is great. Things like automatic jump and call replacements and manual 16-bit load replacements are great, which even the hard-coded Axe commands cannot do. But there's one thing that internal Axe commands can do whereas Axioms can't that I would love to be able to do. Would it be possible to add a new internal Axiom compiler feature that allows calls to be made with offsets? Perhaps a new macro like ld b,b \ .db BYTE \ .org $-2? Because this would be incredibly useful for calling a command in slightly different ways, like you often use with an optional buffer argument for drawing commands.


There are a few other command-adding abilities that only you have that would also be useful. For instance custom token replacements would be nice, even if they had limitations such as requiring Axioms to be at the very start of the program or only loading token replacements upon opening the program editor. The closer that Axiom programmers come to your ability to add new commands, the less we would have to bug you about adding commands. ;)
« Last Edit: April 23, 2011, 10:09:45 pm by Runer112 »

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2898
  • Rating: +467/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #2202 on: April 23, 2011, 10:06:40 pm »
calc84manic: It would return the first value in the list
Runer112: Instead of having to check if getkey (not getkey()) is part of a list of accepted values and then do getkey->VAR, you'd do getkey(list) and get the same speed and keyholding abilities of getkey()
This should work in theory:
Code: [Select]
Data(key1,key2,key3,...,keyN,0)-1->A
While {A+1->A}->B
EndIf getKey()
.B now holds the resulting key or 0 if none match
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Features Wishlist
« Reply #2203 on: April 24, 2011, 04:30:35 am »
Runer, how do you suggest I do the token replacement?  The first problem I had was that you have to know ahead of time what Axioms are being used in the program so it knows what to replace.  That can easily be solved with your first suggestion of always requiring the Axioms to come first, but this does remove a possible convenience, however its probably worth it.  The next problem is that for each token the Axioms have to be searched for in the symbol table to find their pointers, which could be costly with a large number of programs.  Then, when finally found, each Axiom would have to be scanned completely to find if the token matches by transversing the offset list (again, for each token).  So if you had 2 Axioms with 25 new commands each, and about 20 tokens on the screen, that's 40 symbol table searches + 1000 checks + the built in checks.  I could definitely see this causing lag in the scrolling.  There might be another way of caching the data in ram somewhere, and maybe setup a binary search, but this would greatly complicate things.  The token hook is only called when tokens are being printed and I don't want to use other hooks so its difficult to have some sort of "pre-parsing".  I am however still open to suggestions of what to name the rest of the custom override tokens.

Your other suggestion, If I'm reading this correctly, is a static offset to optimize doing ld hl,dynamic_ptr; ld de,offset; add hl,de; correct?  This might be an option in the future.  There are other useful features I can think of too, like adding the ability to create Axioms that take a label as their first argument, like how the current interrupt setup command works.
« Last Edit: April 24, 2011, 04:38:50 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Features Wishlist
« Reply #2204 on: April 24, 2011, 07:55:10 am »
Quote
Another thing I added was the ability to stack Fix commands.  So "Fix 135" is the same as "Fix 1:Fix 3:Fix 5".  Also, there is now a fixed jump table built into the app so hopefully applications like DoorsCS and zStart can take advantage of using some useful Axe features externally once I release the API.

:D That is great, thanks. Does that optimize the program or just the source size?