Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Quigibo

Pages: 1 ... 18 19 [20] 21 22 ... 135
286
Miscellaneous / Re: Do you work a job programming?
« on: July 28, 2011, 10:42:59 pm »
My last job was making a lunar navigation system interface for astronauts.  For my current job, I'm working at (and helping found) a new startup in augmented reality hyper-local search for mobile phones.  Fun stuff... now you know why my activity has been going downhill for a while :P

287
Wait.... Runer!  What were you thinking!  The App code for file reading can be the same as the program code, but just use port 7 instead of port 6 and set the high bits of hl for the $8000-$BFFF range.  That's what the Axe app does. :)

EDIT: Also, another thing that the routines would need is to disable interrupts and then restore them afterwards... which I can use the "Safety" code for, but its going to be slower and even larger.

288
Hmm, I'm still not sure if the extra speed is worth the size increase.  I guess a new argument for the speed is to make file reads more consistent (a program using a file from archive might run slower than one reading from ram). But I will put this up in the poll since I'd like to know how may people this would benefit or hurt.

The 8-bit logical operators I don't do that optimization because then I'd need duplicate commands and have even more special casing.  This is something that can easily be peephole optimized in the future however so it might become a non-issue.

I was trying to recursively parse constants in parenthesis in the last update, but it was extremely complicated so I gave up.  I will have to modify the core number reading system to get it to work (which I was planning to do eventually anyway) so I will get to it then.

289
The Axe Parser Project / Re: Axe Parser
« on: July 25, 2011, 02:47:59 pm »
Haha! Just realized something... There is no reason for me to require a comma. In the next version, I will make it so that you can do a simple "A?B?C" to 'and' conditionals and "A??B??C" to 'or' them.  That should be more intuitive.  So now there really will be boolean operators!

290
Axe / Re: Axe Q&A
« on: July 25, 2011, 08:01:02 am »
Shade().

To restore the OS's original contrast before you quit, use Shade(Shade()).  I've specifically optimized this nesting.

291
The Axe Parser Project / Re: Axe Parser
« on: July 25, 2011, 07:56:59 am »
Even though this isn't a new feature, its new in the fact that it's now optimized enough to be useful.  Calc84maniac gave me the idea over chat:

You can use the ternary operator to short circuit a list of conditions for any statement.  For example, instead of doing:
Code: [Select]
:If A
:If B
:If C
:<code>
:End:End:End
You can now inline the comparisons using the ternary:
Code: [Select]
:If A?B?C,,
:<code>
:End

These both compile to essentially the same code.  To break it down since its not immediately obvious why these 2 are the same, consider the grouping Axe is doing internally:
Code: [Select]
If (A?(B?(C),<b is false>),<a is false>)Basically it checks A, if A is false, there is no code, so it returns the last statement evaluated which is 0 since it was false.  If true, it checks B and again returns false if B is false.  Finally, if B is true, it just returns C's condition which will determine if the entire statement is true or false :)

Its a really nice shorthand! (even though the trailing commas might look ugly)  You can also use it for while and repeat statements which I don't think was possible before.

292
The Axe Parser Project / Re: Latest Updates (***DO NOT POST HERE!***)
« on: July 25, 2011, 07:44:13 am »
Axe Parser
Omega 1.0.2


If you've used 1.0.0 or 1.0.1, I highly recommend you BACKUP your data and do a FULL ROM CLEAR before installing!

Sorry about the bugs!

New Features:
  • Files now work in both RAM and archive!
  • Ternary operator is optimized for short circuit statements.

Changed:
  • Fixed major bug with sector leaking.
  • Fixed error checking with inline blocks.
  • Fixed a few issues with colons.
  • Fixed character conversions for prgm, grp, and appv.
  • Fixed possible bug with GetCalc() when overwriting archived vars.
  • Fixed possible bug with backups missing a hash in the compile menu.
  • Fixed a bug that prevented labels to start with a number.
  • Fixed Zeros(0) causing a freeze.

293
The Axe Parser Project / Re: Axe Parser
« on: July 24, 2011, 02:36:58 am »
Actually, the slowdown is entirely due to yet another major feature, the one that required the most core rewriting, which is the peephole optimizations.  The parser now writes commands instruction by instruction instead of byte by byte so it can optimize out any sub-optimal patterns it sees along the way, cutting code size an extra 1-2% and setting it up for future reductions of probably 5% or more.  It should eventually allow you to write code in a more natural way and then automatically convert it to code that is more "Runer Style" as I like to call it ;)

294
The Axe Parser Project / Re: Features Wishlist
« on: July 20, 2011, 02:26:11 am »
Yeah, I keep wanting to add it... but its so annoying because I need to special case it for 4 possibilities: (var,var) (const,var) (var,const) and (const,const).  In addition, I also have to incorporate the optimizations for modulus with powers of 2.  Without these optimizations, the command would be pointless because no one would use it knowing they could do the exact same thing faster and smaller with just as much code.

295
Unfortunately I can't add an extra space to the token because of ReturnIf.  I don't think adding in a space is messy, and you can ignore the space if you want, its still valid.

296
By the way, just thought I'd mention since this is all about programming style, I think the code looks better and is more intuitive to have the expression you are returning on the same line as the return instead of the previous one:

Code: [Select]
Lbl MULT
  r1->r2
Return λ(r1*r2)

I notice a lot of people still aren't using that form.  I would enforce it if it were possible, but that's an impossible check to make.

297
The Axe Parser Project / Re: Bug Reports
« on: July 19, 2011, 02:42:02 am »
I know I know, I've been meaning to update but I've been so busy IRL, as soon as I have free time again, I'm going to fix all the bugs.  Sorry about that.

298
The Axe Parser Project / Re: Speed
« on: July 19, 2011, 02:24:26 am »
"getkey" has to test ALL the keys and return the one that's pressed.  Its also an OS routine, which makes it even slower.  In addition, the arrow keys repeat very slowly when held down.

getkey(KEY) only checks ONE key so its super super fast.

299
The Axe Parser Project / Re: Bug Reports
« on: July 14, 2011, 10:34:40 pm »
Alright, I guess its another update tonight then.  ::)

300
The Axe Parser Project / Re: Bug Reports
« on: July 14, 2011, 10:24:15 pm »
Ah okay.  Yeah I just realized now that that could happen if the parsing doesn't complete as a result of an error.  Is that bug as serious as requiring a ROM clear?

Pages: 1 ... 18 19 [20] 21 22 ... 135