Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 22:22:42 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 87 88 [89] 90 91 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59485 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
C0deH4cker
LV5 Advanced (Next: 300)
*****
Offline Offline

Gender: Male
Last Login: 19 December, 2012, 22:22:42
Date Registered: 18 October, 2011, 23:19:08
Location: $9D95
Posts: 258


Total Post Ratings: +10

View Profile WWW
« Reply #1320 on: 14 January, 2012, 02:21:13 »
0

 I must have had too much radiation for breakfast...

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.
Logged

Freyaday
The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 20:33:48
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1890


Total Post Ratings: +110

View Profile WWW
« Reply #1321 on: 14 January, 2012, 04:16:17 »
0

* Freyaday is in Awe
Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


Beware the Bitulator! ,.,./`My Artwork!
chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Total Post Ratings: +27

View Profile
« Reply #1322 on: 15 January, 2012, 23:51:10 »
0

Can you optimize:

1
2
3
4
X*4->Y
!If Y=4
.stuff
End
to:

1
2
3
4
X*4->Y
!If =4
.stuff
End
Logged
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 21:51:10
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1323 on: 15 January, 2012, 23:54:12 »
0

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. Wink
Logged
Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Gender: Male
Last Login: Today at 22:02:23
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1324 on: 16 January, 2012, 03:48:10 »
0

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.
Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Interactive Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 02:03:21
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Total Post Ratings: +1019

View Profile
« Reply #1325 on: 16 January, 2012, 05:22:18 »
0

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: 16 January, 2012, 05:24:59 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
shmibs
bonsai bok choy wiseguy waterboy
Administrator
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Last Login: Today at 20:58:41
Date Registered: 11 June, 2010, 19:36:15
Location: 89B6
Posts: 1850


Total Post Ratings: +238

View Profile
« Reply #1326 on: 27 January, 2012, 09:04:03 »
0

is there any way to draw a single column of pixels that's faster than drawing the same column with Pt-On(?
Logged



We're not human, are we?
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 19:39:26
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2055


Total Post Ratings: +256

View Profile
« Reply #1327 on: 27 January, 2012, 19:02:52 »
0

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: 27 January, 2012, 19:12:56 by Hayleia » Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
turiqwalrus
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: Today at 17:20:51
Date Registered: 25 November, 2010, 00:38:42
Location: In a shadowed grotto far from the eyes of the world.
Posts: 708


Total Post Ratings: +42

View Profile
« Reply #1328 on: 27 January, 2012, 19:12:50 »
0

well, bitmap wouldn't help as much because we want is to be fast Tongue

and yes, I believe so.
« Last Edit: 27 January, 2012, 19:13:13 by turiqwalrus » Logged
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 19:39:26
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2055


Total Post Ratings: +256

View Profile
« Reply #1329 on: 27 January, 2012, 19:15:04 »
0

Yes, but it is said here
Quote
Redesigned Bitmap() command is clipped, faster, and works with any buffer.
So it should be ok Smiley
« Last Edit: 27 January, 2012, 19:15:30 by Hayleia » Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Today at 20:14:38
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #1330 on: 27 January, 2012, 19:25:09 »
0

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).
Logged
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 21:51:10
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1331 on: 27 January, 2012, 19:48:16 »
0

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: 27 January, 2012, 21:14:28 by Runer112 » Logged
zero44
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: Today at 21:45:11
Date Registered: 24 January, 2011, 17:34:18
Location: France
Posts: 113


Total Post Ratings: +18

View Profile WWW
« Reply #1332 on: 27 January, 2012, 21:21:44 »
0

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 ?
Logged

____________
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 20:30:28
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #1333 on: 27 January, 2012, 22:38:19 »
0

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.
Logged

Darl181
Vy'o'us pleorsdtu tlh'e gjaemue.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Online Online

Gender: Male
Last Login: Today at 22:02:23
Date Registered: 10 June, 2010, 00:32:08
Location: {I*9+L₁+1},{I*9+L₁+3}
Posts: 3280


Total Post Ratings: +267

View Profile WWW
« Reply #1334 on: 29 January, 2012, 00:12:06 »
0

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: 29 January, 2012, 00:19:04 by Darl181 » Logged




 
Spoiler for Stuff:



OS 2.43  Boot 1.02  Hardware Rev. B

OS 1.04.32

OS 3.1.0.392  Boot1 3.0.99  Boot2 3.10.16
Spoiler for Misc:
Quote
You'll understand / It's not a shame / To be always / Losing the game / Burma-Shave
"Dynamic userbars!"
Omnimaga radio
Interactive Omnimaga radio
Our World of Text
Draw on websites
Then blow them up
In-browser flight simulator
Haxball: MMO soccer/air hockey game
  Draw with sand.  Yay?
The Game
You just lost the game
Zombo.com
light post color is #dfefff
dark post color is #cae4ff
quote box color is #6699ff
transparent color is...transparent 0.o
Spoiler for Forum search alternative (bookmarklet):
https://www.squarefree.com/bookmarklets/search.html
javascript:q=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!q)q=prompt("No%20selected%20text;%20enter%20search%20term.").replace(/\s\+/g,"%252B");if(q!=null)location="http://www.google.com/search?q="+q.replace(/\s+/g,"+")+"+site:"+location.hostname;void(0);
Pages: 1 ... 87 88 [89] 90 91 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.289 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.