Author Topic: Features Wishlist  (Read 694005 times)

0 Members and 4 Guests are viewing this topic.

Offline Compynerd255

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +53/-4
  • Betafreak Games
    • View Profile
    • Betafreak Games
Re: Features Wishlist
« Reply #2265 on: May 12, 2011, 03:57:28 pm »
I like that idea, but not #Define but #def because that fits better, and maybe other symbols that are shorter...
Good point. Maybe for the hijacked BASIC tokens we could use nPr and nCr (#Def and #Undef respectively).
« Last Edit: May 12, 2011, 03:57:52 pm by Compynerd255 »
The Slime: On Hold, preparing to add dynamic tiles

Axe Eitrix: DONE

Betafreak Games: Fun filled games for XBox and PC. Check it out at http://www.betafreak.com



Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Features Wishlist
« Reply #2266 on: May 12, 2011, 04:06:14 pm »
I understand the use for a #def token, but I don't really understand why you'd need #undef...
By being able to reassign a value to a CONSTANT, it's no longer CONSTANT. That makes it function just like any other variable, I'd think... Am I wrong?
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2267 on: May 12, 2011, 04:28:02 pm »
The problem with this is the limited RAM space Axe has when compiling, and it already uses pretty much all of it. It would be a great feature, but it would be difficult to be implemented.

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 #2268 on: May 12, 2011, 06:58:50 pm »
Another reason for Axe to enforce parentheses:

Quote from: OmnomIRC
[16:47:34] <+Hot_Dog> wow, it's still not working
[16:47:51] <+Hot_Dog> even on hardware
[16:48:40] <+Hot_Dog> I just don't know
[16:48:55] <+Runer112> what does the source code look like
[16:48:59] <+Runer112> for your test program
[16:49:19] <+Hot_Dog> .ABC : AsmComp(AXIOM : 9
[16:49:30] <+Runer112> umm
[16:49:35] <+Runer112> add an ending parenthesis maybe?
[16:49:51] <+Hot_Dog> indeed, forgot that
[16:49:56] <+Hot_Dog> that was the problem all alone
[16:49:59] <+Hot_Dog> *along
[16:50:01] <+Runer112> wait
[16:50:03] <+Runer112> did that fix it?
[16:50:07] <+Hot_Dog> yes it did
[16:50:08] <+Runer112> lol
[16:50:20] * +Hot_Dog bangs head against wall again
[16:50:21] <@DThought> And that is why I think Quigibo should enforce it :/
[16:50:26] <+Runer112> and this is why Axe sorely needs to force parenthesis closing
[16:50:36] <+Runer112> so many bugs caused by open parentheses
[16:50:38] <@DThought> Ninja'd, Runer.

It just adds another thing to remember when debugging sometimes :-\




Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Features Wishlist
« Reply #2269 on: May 12, 2011, 07:07:08 pm »
Another reason for Axe to enforce parentheses:

Quote from: OmnomIRC
[16:47:34] <+Hot_Dog> wow, it's still not working
[16:47:51] <+Hot_Dog> even on hardware
[16:48:40] <+Hot_Dog> I just don't know
[16:48:55] <+Runer112> what does the source code look like
[16:48:59] <+Runer112> for your test program
[16:49:19] <+Hot_Dog> .ABC : AsmComp(AXIOM : 9
[16:49:30] <+Runer112> umm
[16:49:35] <+Runer112> add an ending parenthesis maybe?
[16:49:51] <+Hot_Dog> indeed, forgot that
[16:49:56] <+Hot_Dog> that was the problem all alone
[16:49:59] <+Hot_Dog> *along
[16:50:01] <+Runer112> wait
[16:50:03] <+Runer112> did that fix it?
[16:50:07] <+Hot_Dog> yes it did
[16:50:08] <+Runer112> lol
[16:50:20] * +Hot_Dog bangs head against wall again
[16:50:21] <@DThought> And that is why I think Quigibo should enforce it :/
[16:50:26] <+Runer112> and this is why Axe sorely needs to force parenthesis closing
[16:50:36] <+Runer112> so many bugs caused by open parentheses
[16:50:38] <@DThought> Ninja'd, Runer.

It just adds another thing to remember when debugging sometimes :-\

Yeah, I spent 2 days trying to find a bug that turned out to be just one missing parenthesis at the end

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Features Wishlist
« Reply #2270 on: May 12, 2011, 08:04:25 pm »
Question:
What exactly happens if I leave a parenthesis open?  Obviously, it'll start glitching the program up, but in what ways?  What precisely does it do to the code?
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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 #2271 on: May 12, 2011, 08:05:46 pm »
Actually, constant definitions would be very easy to do and are already implemented, kind of.  That's exactly what Str1, Pic1, GDB1 are!  They just hold a constant value that happens to be a ram location.  But I could easily allow the programer to specify other values for these constants and the syntax would be very intuitive:

9001->Str1

This would use symbol space though, so its still limited to ~150 static variables including the regular static pointers.  Bun nonetheless, still generally useful since I don't think that many people actually run out of symbol space. 

EDIT:
Question:
What exactly happens if I leave a parenthesis open?  Obviously, it'll start glitching the program up, but in what ways?  What precisely does it do to the code?
Axe will add the parenthesis for you at the end of the line.  So if you had:

sin(A+cos(B->C

It becomes:

sin(A+cos(B->C))

Instead of what you might be trying to do:

sin(A+cos(B))->C
« Last Edit: May 12, 2011, 08:10:26 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Features Wishlist
« Reply #2272 on: May 12, 2011, 08:18:31 pm »
I use all my symbols >8)

Anyway, sounds cool anyway. As for parentheses forcing, I think that it seems like a good idea, but I never close any of my pt-on('s for example....I think it is fine to leave it as it is. Last thing I want is to be hit with >9000 compile errors just because a bunch of Pt-On('s or Text('s were left unclosed :P I don't know, I'm sure it will definitely help some people  though. Maybe have it as an option?

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #2273 on: May 12, 2011, 08:24:28 pm »
Quigibo, if you add constant definitions to Axe programming, could you perhaps add it to Axiom programming as well? That's something I always thought would be quite useful. Perhaps add a new command type, AXM_CONST, that has a 2-byte value instead of a routine? And something that would be even more awesome is a type like AXM_VAR, that allows you to define custom variables that are fully compatible with variable auto-optimizations and dereferencing. Again, you'd probably want the routine data to be replaced by a 2-byte value, in this case a pointer to the variable.

EDIT: And while I'm talking about Axiom feature requests, I want to bump my request for support for offset calls. :)
« Last Edit: May 12, 2011, 08:28:22 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 #2274 on: May 12, 2011, 09:15:54 pm »
I'm trying to figure out what the purpose is behind these constants. Wouldn't it just be the same thing as, say, putting in the number?
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 ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Features Wishlist
« Reply #2275 on: May 12, 2011, 09:29:00 pm »
I'm trying to figure out what the purpose is behind these constants. Wouldn't it just be the same thing as, say, putting in the number?
Yes, but it's easier if you change something.  For instance, let's say you have a piece of code that draws a tilemap to the screen that's 8*12 sprites large.  But what if you wanted to add a HUD to the side of the screen and make it 8*10?  Then you'd have to find all of those 12s in your code and change them to 10s.  Or you could have used the (hopefully) soon to be Axe equivalent of a #define() when you wrote the code in the first place, so all you'd have to do is change the line with the #define() in it from a 12 to a 10 to fix all of those lines of code.

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 #2276 on: May 12, 2011, 09:55:10 pm »
Aha.
N^^M to do signed modulus
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 Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Features Wishlist
« Reply #2277 on: May 12, 2011, 09:56:18 pm »
I'm trying to figure out what the purpose is behind these constants. Wouldn't it just be the same thing as, say, putting in the number?
Yes, but it's easier if you change something.  For instance, let's say you have a piece of code that draws a tilemap to the screen that's 8*12 sprites large.  But what if you wanted to add a HUD to the side of the screen and make it 8*10?  Then you'd have to find all of those 12s in your code and change them to 10s.  Or you could have used the (hopefully) soon to be Axe equivalent of a #define() when you wrote the code in the first place, so all you'd have to do is change the line with the #define() in it from a 12 to a 10 to fix all of those lines of code.

Question: Why not just pick a random spot in memory near the end of a buffer or pick a variable, store the number, and resolve never to modify it?
« Last Edit: May 12, 2011, 09:56:29 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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 #2278 on: May 12, 2011, 10:02:28 pm »
Because then it's read as a variable and not a constant, and will result in larger code :)

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 #2279 on: May 12, 2011, 11:50:45 pm »
By the way, I finished adding the request for constants.  It was only about 10 lines of code extra.  :)
It works really nicely too!  You can even add, subtract, multiply, and divide constants with each other to make new constants, all with nothing added to the executable code!

I've added so many new features and bug fixes, probably the largest update so far, but I don't know if I'll have time for everything I was planning by tomorrow's release.  Of the most complicated new additions that I have yet to make and am not sure about making yet are: stack operators, alternative referencing syntax, and native register operations.
___Axe_Parser___
Today the calculator, tomorrow the world!