• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 704292 times)

0 Members and 5 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 #3030 on: March 19, 2012, 07:17:41 pm »
In retrospect, maybe it would have been better to make Fix # turn an option on and Fix #r turn the option off. But that would definitely break compatibility now :P
Now that you mention it, yeah. GAH compatibility. :P
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 #3031 on: March 19, 2012, 07:18:43 pm »
In retrospect, maybe it would have been better to make Fix # turn an option on and Fix #r turn the option off. But that would definitely break compatibility now :P

What if the old syntax was left in for compatibility, but a new syntax of Fix LETTER / Fix LETTERr was added? Letters might be easier to remember than numbers anyways.
« Last Edit: March 19, 2012, 07:19:04 pm by Runer112 »

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 #3032 on: March 19, 2012, 07:37:02 pm »
In retrospect, maybe it would have been better to make Fix # turn an option on and Fix #r turn the option off. But that would definitely break compatibility now :P

What if the old syntax was left in for compatibility, but a new syntax of Fix LETTER / Fix LETTERr was added? Letters might be easier to remember than numbers anyways.
I like that!
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: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Features Wishlist
« Reply #3033 on: March 26, 2012, 10:55:17 pm »
It would be nice if a negation followed by an addition was auto-optimized as a subtraction.

For example, ⁻(expr1)+(expr2) should be compiled as
Code: [Select]
 ;expr1 evaluate here
  push hl
  ;expr2 evaluate here
  pop de
  or a
  sbc hl,de

A more optimized example would be something like ⁻(expr)+A, like so:
Code: [Select]
 ;expr evaluate here
  ex de,hl
  ld hl,(axv_A)
  or a
  sbc hl,de

And of course, the classic subtract-HL-from-constant, like ⁻+96
Code: [Select]
 ex de,hl
  ld hl,96
  or a
  sbc hl,de
« Last Edit: March 26, 2012, 10:56:18 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Features Wishlist
« Reply #3034 on: March 26, 2012, 11:10:04 pm »
Select( is useful for saving values around an expression, but it does not allow saving values around a block of code.  It would be nice if there were a block statement that saved variables on the stack.

For example:
Code: [Select]
:Save A,B,C
:
:End
would save A, B, and C and restore their values at the End.

It would also be useful to have:
Code: [Select]
:Save A,B,C
:
:End C,A,B
which would store whatever the value of A is at the beginning of the block, to C at the end of the block, etc.

Hopefully, making it a block statement allows you to disallow jumps and make Return work correctly, like with For(EXPR).

Also, some optimization-related requests:

For(Xʳ) or For(X)ʳ which would loop X^256 times (More optimized than For(X^256)).

[alternative to calc84maniac's post]
A operator that performs "reverse-subtract".  For example A-ʳB is the same as B-A.  This is useful when you want something like A-(B*2) which can be replaced with the more optimized B*2-ʳA.  This might also be useful for the other order-dependent operators.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #3035 on: March 28, 2012, 04:56:41 pm »
Variables can move around in RAM, so I believe that Axe should have built-in access to asm_data_ptr1 and asm_data_ptr2 for pointer storage. Eiyeron had big problems with this here, but the solution is as simple as having variables that point to these address to hold OS variable pointers. However, I would not expect the average Axe user to figure this out and know to add something like ?84EB?°V1 to their program and then use that custom variable.

So the solution should be as simple as having two default Axe variables that point to asm_data_ptr1 and asm_data_ptr2. I would suggest Y1T and Y2T; they're literally perfect. They're in a menu right next to their closest relatives, the archived variable pointers. And they share similar names, except with an added T for "Tracker." You could even have X1T and X2T point to asm_sym_ptr1 and asm_sym_ptr2. The only Axiom I know of that uses these as Axiom variables (MemKit) would not only still work, but it would work better.


EDIT: Fixed the second copy of the suggested variables (the sym pointers) to be X variables as they're supposed to be. I hope this didn't cause too much confusion.
« Last Edit: March 28, 2012, 09:53:47 pm by Runer112 »

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 #3036 on: March 28, 2012, 08:50:49 pm »
Hmm... I'm not familiar with asm_data_ptr1 or asm_data_ptr2, I've never used them.  Can you explain a bit more how they work?  I can't find them on WikiTI.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #3037 on: March 28, 2012, 08:53:00 pm »
Whenever variables are rearranged in RAM (for instance, deleting any variable that's not the last variable in RAM), the pointers at these two locations are adjusted according to where the variable they point to/into has moved. asm_sym_ptr1 and asm_sym_ptr2 act similarly, except they track VAT entries.
« Last Edit: March 28, 2012, 08:53:53 pm by Runer112 »

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Features Wishlist
« Reply #3038 on: March 31, 2012, 12:40:25 pm »
Would it be possible to have something like a dictionary in Axe? That is, unless something like that already exists.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Features Wishlist
« Reply #3039 on: March 31, 2012, 01:43:41 pm »
What do you mean by dictionary?  Like a list of all Axe commands?

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Features Wishlist
« Reply #3040 on: March 31, 2012, 01:50:47 pm »
No, I mean like in C#/.NET you can do something like Dictionary<string, int> d; and you can add values where every string entered has a corresponding integer value. Like if you did d.Add("hi", 7); every time you tried to get the value of "hi" from the dictionary (by doing d["hi"]) you would get 7.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #3041 on: March 31, 2012, 02:16:52 pm »
Honestly I'm not sure this (probably large) feature is worth adding... It's a pretty high-level feature, and Axe is a pretty low-level language. A big issue I see is that it would require dynamic memory allocation for adding entries, and dynamic memory allocation does not work terribly well on our platform. Another issue I see is that Axe is a type-less language, so it would be challenging to properly handle the different types the dictionary could contain (it doesn't have to be <string, int>). Also, I'm not really sure what applications it would have to most users. Axe's main design purpose was to make games, whereas this sounds more like a feature that complex utilities would use.

The final reason why I don't believe it would be worth the size/difficulty of adding: if you really need a dictionary, you could actually implement it yourself in Axe. Since you're making it yourself and know what data types it will contain, that passes the hurdle of a type-less language keeping track of types. If you know it won't pass a size of 768 bytes, you could even skip the dynamic memory allocation and throw the dictionary into L₁ or L₃. But if you do need the dynamic memory allocation, you could still do it by putting the dictionary into an appvar and using MemKit to resize it as necessary when adding/removing entries.
« Last Edit: March 31, 2012, 02:21:27 pm by Runer112 »

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Features Wishlist
« Reply #3042 on: March 31, 2012, 07:09:35 pm »
Alright. I was thinking about it for a bit today and I could really only think of one instance where I could use a dictionary, but I could just as easily done something else.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Features Wishlist
« Reply #3043 on: April 06, 2012, 05:25:34 pm »
How about Pt-Mask(X,Y,PicF,PicB[,Buff]) ?
This could allow for some flexibility, ie with small variations you can re-use one part to save space.


Also bump for non-8*8 sprite drawing (read: 4*4) <_<
« Last Edit: April 07, 2012, 02:55:55 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

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 #3044 on: April 07, 2012, 10:52:35 am »
Aren't they bitmaps then?