Join us on Discord!
You can help CodeWalrus stay online by donating here.

HP Prime and HP-PPL Statistics and useful tips and tricks

Started by alexgt, May 10, 2016, 11:34:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

Do you mean AFiles can send images to the PC or make transfers easier?  There would still be the issue about animating the walrus sprite, though, since not everyone is aware that animated GIF makers that don't cost money actually exist.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Well in a round about way you could transfer AFiles to your PC but you would have to drag and drop the whole app file from the connectivity kit to your file explorer and open up the directory where AFiles are kept, so yeah. But what I meant is that GROBs no matter if you are just making it without the help of AFiles will always be a png image. Meaning that you can create AFiles right on the calc and store GROBs to them without the use of a PC.

EDIT: Also in testing today I found that by creating matrices manually you decrease their size in RAM by 50% O.O I made one matrix with MAKEMAT() to be 100x199 (the max size for that command) and then I made one manually within a program the same size except the one made using my program was only 155KB instead of 311KB *.*. Here is the program I used to make the matrix manually:


MakeUserMat()
BEGIN
LOCAL Loop; //just a loop variable to use in loops :P
M1:=[[0,0],[0,0]]; //To make sure M1 is a matrix and not a vector and also to reset it's size
FOR Loop FOR 1 TO 100 DO
  M1(Loop,1):=0; //Remember matrix coordinates are in rows columns format ;)
END;
FOR Loop FOR 1 TO 199 DO
  M1(1,Loop):=0;
END;
END;
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Hm that sounds like a bug. I know that on the 84+ a full matrix requires three times more RAM than the matrix takes in order to be stored (one copy for Ans, one copy for the storage and I think another copy in safe RAM or perhaps the program version?), but the matrix size is the same no matter how it was stored.


Nowadays I tend to avoid matrices altogether, though, because on the TI-84+CE they cannot be larger than 400 elements. I prefer using lists and some extra code.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

I would lime to not use matrices but it would just bee too hard (for my level and speedwise) and believe me I tried every single different idea I could think of for MinePrime. But I do think that it is a bug, you just have to make sure you quit properly so you won't leave another 290 or so KB in RAM <_<
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

I didn't realize that lists were slower on the HP Prime. On the 84+ the speed difference is negligible. I hope that the bug won't cause memory leaks, though (that gets worse until you reboot)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Well for lists it is more of a size and convenience thing, first they take up more space when storing the same amount of data, this is because they can have any data type stored in them. And with matrices you only have to reference them like this: M1(row,column).
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

That sucks. I was sure they were smaller. Is there a way on the HP Prime to switch to integers by default so that each number only takes a few bytes?

That said, I guess matrices are fine as long as they can be of any size. I don't understand why they added an hard limit on the CE considering that calculator has 150 KB of RAM (which could hold matrices of 16500 elements fine). Maybe TI just got too many support questions asking why an ERR:MEMORY occurred when trying to store a 11 KB matrix despite having 24 KB of RAM.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Quote from: DJ Omnimaga on May 18, 2016, 04:24:23 AM
That sucks. I was sure they were smaller. Is there a way on the HP Prime to switch to integers by default so that each number only takes a few bytes?

That said, I guess matrices are fine as long as they can be of any size. I don't understand why they added an hard limit on the CE considering that calculator has 150 KB of RAM (which could hold matrices of 16500 elements fine). Maybe TI just got too many support questions asking why an ERR:MEMORY occurred when trying to store a 11 KB matrix despite having 24 KB of RAM.
No, I don't think you could do that with the Prime.

the biggest world size would boast ~296KB in the RAM Which should be fine but just make sure you exit the program without pressing ON (like I said before since it keeps it in RAM until the code is compiled again <_< ). If you have that much in a single variable it seems to slow down the calc...
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

So by exiting with ON it clears the RAM from temporary variables? What about GROB's? Do we still need to do the following at the start of every program?

DIMGROB_P(G1,1,1);
DIMGROB_P(G2,1,1);
DIMGROB_P(G3,1,1);
DIMGROB_P(G4,1,1);
DIMGROB_P(G5,1,1);
DIMGROB_P(G6,1,1);
DIMGROB_P(G7,1,1);
DIMGROB_P(G8,1,1);
DIMGROB_P(G9,1,1);
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Well when you exit it doesn't clear the RAM from GROBs so yeah, you have to run that at the start of your programs. And also if you use LOCAL MyVar; to make global vars for your program it will not clear them once that program exits, but if you edit the source without running it will clear it, so you have to clear all large variables.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Wait, exiting programs doesn't clear local variables? Doesn't that defeat the point of local variables? ???
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Nope, it doesn't clear them but you can't change them outside the program. Unless you use EXPORT MyVar; then it creates a new Home variable that you can access and modify out of the program. I am pretty sure it is a bug that it keeps them though, and this was also present in the previous OS so it is not an upgrade issue
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

I hope they fix that one day. Not that variables are big in general, but sometimes people might use incredibly large lists.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Yeah true. By the way what's the max size for matrices and strings?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal