Author Topic: Axe Q&A  (Read 588209 times)

0 Members and 3 Guests are viewing this topic.

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Q&A
« Reply #1320 on: January 13, 2012, 07:21:13 pm »
 *.*

I understand it sort of now that youve explained it, but i must say that im shocked that you can come up with code like this.

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: Axe Q&A
« Reply #1321 on: January 13, 2012, 09:16:17 pm »
* Freyaday is in Awe
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 chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Axe Q&A
« Reply #1322 on: January 15, 2012, 04:51:10 pm »
Can you optimize:
Code: [Select]
X*4->Y
!If Y=4
.stuff
End
to:
Code: [Select]
X*4->Y
!If =4
.stuff
End

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1323 on: January 15, 2012, 04:54:12 pm »
Yes, that is a perfectly valid optimization. However, with the introduction of the peephole optimizer in Axe 1.0, Axe will perform simple optimizations like that automatically so you don't have to. ;)

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: Axe Q&A
« Reply #1324 on: January 15, 2012, 08:48:10 pm »
Is Axe supposed to check for pairing of types of parenthesis?  Because I had a bug because of an on-calc typo of something like If {A}=2 or ({A}=5) or ((A}=8) and it compiled without error.
Vy'o'us pleorsdti thl'e gjaemue

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: Axe Q&A
« Reply #1325 on: January 15, 2012, 10:22:18 pm »
Yeah this is more of a "Be lazy on purpose to make the parsing simpler with less error checking".  The right parentheis ) and } are identical in nearly every situation.  However, left parenthesis ( and { are obviously different.  When I said nearly, sometimes Axe checks for a specific kind of parenthesis so don't abuse this.  Also I could add error checking in later versions if there is ever ambiguity.

EDIT: For your specific example, the left parenthesis was the typo so it didn't work the way I presume you expected it to.
« Last Edit: January 15, 2012, 10:24:59 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Axe Q&A
« Reply #1326 on: January 27, 2012, 02:04:03 am »
is there any way to draw a single column of pixels that's faster than drawing the same column with Pt-On(?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1327 on: January 27, 2012, 12:02:52 pm »
is there any way to draw a single column of pixels that's faster than drawing the same column with Pt-On(?
Maybe with a rectangle like Rect(X,0,96,1) or something (and if I didn't do any mistake) ?
Or maybe I didn't understand the question right -.-°

Also, I can't remember but do Bitmap clip ? Nvm, it does since 1.1.0
« Last Edit: January 27, 2012, 12:12:56 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: Axe Q&A
« Reply #1328 on: January 27, 2012, 12:12:50 pm »
well, bitmap wouldn't help as much because we want is to be fast :P

and yes, I believe so.
« Last Edit: January 27, 2012, 12:13:13 pm by turiqwalrus »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1329 on: January 27, 2012, 12:15:04 pm »
Yes, but it is said here
Quote
Redesigned Bitmap() command is clipped, faster, and works with any buffer.
So it should be ok :)
« Last Edit: January 27, 2012, 12:15:30 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Axe Q&A
« Reply #1330 on: January 27, 2012, 12:25:09 pm »
is there any way to draw a single column of pixels that's faster than drawing the same column with Pt-On(?
If you already use Rect( somewhere else, then you should use Rect(X,0,+1,63).
If you already use Line( somewhere else, then you should use Line(X,0,X,63).
If you use both, then I guess the above Rect( command is slightly smaller.
Also, it seems that Rect( is 47 cycles faster (about how long it takes to subtract two variables).

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1331 on: January 27, 2012, 12:48:16 pm »
Rect() is a good amount faster at drawing horizontal or vertical lines than Line(). Pretty much, you'd only not want to use Rect() if speed is not critically important and you already use Line() in your program, but not Rect(). This would save some size by not having to include the 113-byte rectangle routine.

Method   Speed (cycles)   Code size (bytes)   Routine size (bytes)
Rect(X, and 0,+1, or 255)331514113
Line(X, and 0,X,63)609417140
« Last Edit: January 27, 2012, 02:14:28 pm by Runer112 »

Offline zero44

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 128
  • Rating: +21/-0
  • <!--//www.ustr.net/infrared/infrared1.shtml-->
    • View Profile
    • zero44
Re: Axe Q&A
« Reply #1332 on: January 27, 2012, 02:21:44 pm »
I already asked this question in another topic, but how can we simply use the port commands to easily send and receive datas to/from  another calculator ?
And does it works between two different types of calcs, like 83+ & 84+SE ?
____________

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1333 on: January 27, 2012, 03:38:19 pm »
What kind of data are we talking about?  Axe has built in Send() and Get() commands for sending bytes over the link port, but anything that was restricted to only using Port() to send bytes would basically be rewriting those commands.  Why do you need to use the Port command instead of using the Send() and Get() commands? 

Oh and the link port communication works across all Ti83+ through Ti84+SE if I remember correctly.

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: Axe Q&A
« Reply #1334 on: January 28, 2012, 05:12:06 pm »
So I want to use SMC to store high scores directly into a program, in a way that they'll remain after writeback.  How many bytes into the program would I write to not be editing the wrong part?
Or would simply writing to a static pointer i.e. GDB1 work?
« Last Edit: January 28, 2012, 05:19:04 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue