• Axe Q&A 5 5
Currently:  

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

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1800 on: October 01, 2014, 11:00:05 am »
It brings up the menu. I want a way to skip the menu (because it messes up if the user clicks no) and garbage collect on its own :/

There may be a way to bypass the menu and force a garbage collection. But the menu has good reason to exist because, although uncommon, there are valid reasons why a user would want to avoid garbage collection. So I would not recommend trying to force a garbage collect without the user's confirmation. If the user says no, that means they'd rather your program, as you said, "mess up" rather than a garbage collection occur. You can at least ensure that your program "messes up" gracefully, though.


Hmm, I guess no way if its archived then?

Although there may be weird edge cases where it is possible to safely resize a variable in place in archive, this should generally be considered impossible to do. Unarchiving, resizing, and then re-archiving a variable is the simplest way to resize an archived variable.

As a side note: if your project design involves treating archived variables as anything but read-only data, you might need to redesign your project.
« Last Edit: October 01, 2014, 11:30:41 am by Runer112 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Q&A
« Reply #1801 on: October 01, 2014, 11:05:07 am »
Yeah if you don't force GC just make sure that if the user says no, either intentionally or by being impatient and mashing up the ENTER button non-stop while the program loads, that his calculator will not be permanently bricked or anything. But I think you have more chances to brick your calc in long terms by constantly garbage collecting than by refusing to garbage collect in the middle of a game/program, because the Flash chip can only be rewritten between 100,000 and 2,000,000 times, according to some people.
« Last Edit: October 01, 2014, 11:06:52 am by DJ Omnimaga »

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Axe Q&A
« Reply #1802 on: October 02, 2014, 11:26:22 pm »
Ah okay, thank you for the help everyone. I understand GC better now.
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Axe Q&A
« Reply #1803 on: October 23, 2014, 12:51:07 am »
New question. Am I doing something wrong or did I just find an error with Axe? The following is a very simplified version of some code I'm working on.

Code: [Select]
.ERROR
ClrHome
While 1
ReturnIf getKey(41)
ClrHome
If getKey(26)
Disp ,"[2] key pressed."
End
If getKey(28)
Disp ,"[8] key pressed."
End
Pause 300
End

The program should display "[8] key pressed" when 8 is pressed and "[2] key pressed" when two is pressed. Here's the problem: if you hold the up arrow and left arrow while pressing either 8 or 2 (not both at the same time), the program thinks that both were pressed (and displays "[2] key pressed [8] key pressed")...
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Axe Q&A
« Reply #1804 on: October 23, 2014, 02:06:09 am »
This is a well-known electric problem. The thing is that in the keypad cardboard, some keys were accidentally made dependent, so that when some keys are pressed together, pressing one certain key will make another key "pressed".

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1805 on: October 23, 2014, 02:38:39 am »
Here is a program that helps you check that the key combinations you choose don't have this problem. Basically press keys on the keyboard and check on screen that only the keys you pressed are detected.
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 ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Axe Q&A
« Reply #1806 on: October 24, 2014, 09:46:38 pm »
Texas Instruments, I hate you so much...  :P

Thanks for the link Hayeia.
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #1807 on: November 06, 2014, 04:22:39 pm »
ok so here I have a question.

Can you safely edit a program you are running.

for example:
[0000]->pic0 .2bytes
5->{pic0}
3->{pic0+1}

Would this modify your code do that pic0 would be [0503] on next run?

I would test this, but changing something outside the general scope can be dangerous if you don't know what you're doing (like I).
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Q&A
« Reply #1808 on: November 06, 2014, 04:43:34 pm »
Yes, just make sure that that only works if you do NOT compile it as an app and that you would change program code if you were to accidentally write too far than you setted your area

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

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 #1809 on: November 06, 2014, 05:22:01 pm »
Yes, just make sure that that only works if you do NOT compile it as an app and that you would change program code if you were to accidentally write too far than you setted your area

Note that it does NOT work if you use the Asm() command to run the program from the homescreen.  When a program is run it is copied to a new location in memory to be executed, after the program is finished the TiOS does NOT copy it back, and so changes made to the program will not be saved.  If you use a shell such as DoorsCS or MirageOS however, they will copy the changes back to the original files location (possibly also if the program is in archive too!) and the changes will be saved. 

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #1810 on: November 06, 2014, 05:24:54 pm »
So the only dangers are
a) Program will not save if without shell
b) it can break your calc if in an app?

How would i go about writing a code checking if its an app?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Q&A
« Reply #1811 on: November 06, 2014, 05:27:41 pm »
Nah in an app the changes just won't take effect

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #1812 on: November 11, 2014, 10:27:22 pm »
When compiling a large program in Axe, I get an error of 'APP TOO BIG' around 16,500 bytes or so. I'm compiling for MirageOS and NOT an app, so I'm not sure why it has a problem with this?

EDIT: I'm using 1.1.2

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #1813 on: November 12, 2014, 12:48:37 am »
This has been reported and fixed (you'd have posted 1 day later it would have been one year ago exactly :P) here. The dev build also fixes some other bugs you have not come into so upgrading is recommended ;)
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 Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Q&A
« Reply #1814 on: November 12, 2014, 12:49:48 am »
Well apps can be max 16384 bytes large

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!