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

PHASM: label jumping feature, with poll

Started by Hayleia, November 14, 2015, 02:02:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

What interface do you like most ?

type label name
list all labels and navigate
display nearest label, use up/down to change choice and confirm
don't display anything, jump directly to nearest with up/down

Hayleia

Hello there.

Epharius wants to implement a feature like zStart's label menu (if zStart is installed press ON+Vars while editing a program and you'll see a list of all your labels which allows you to select the one you want and jump to it). But he is hesitating on the interface of that feature.

You have the choice between these features: press/hold a key (or two or whatever, we'll see what triggers the hook later) while editing...

  • then type the name of the label you want to jump to and PHASM will jump to it
  • and you see a menu listing all labels, which allow you to navigate through labels and select the one you want to jump to (zStart's way)
  • and you see the name of the nearest label in the code relative to the current cursor position, use Up and Down to choose previous/next and validate somehow (release keys, timeout, press a key, whatever, we'll see)
  • then press up/down to jump directly to the previous/next label without displaying any menu
  • a combination of the aforementioned choices

Dream of Omnimaga

I voted the last option. While it's more simple, it's also the fastest, and since label names are only 2 characters long, we can't use meaningful names for them and I remember always forgetting them before. I would like such feature, though, because it takes several minutes to scroll through code on that calc. Typing the label name as a search feature would be nice as well, though.
  • 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

novenary

Well, an easy way to have longer label names is to comment the label out (eg write "Lbl ASDF). I'm voting for the second option because that's how it is in zstart and it works well. Also make sure to keep the labels in the order they are in the code, don't sort them by alphabetical order.

Dream of Omnimaga

But then that slows down program execution and makes Ans unuseable. Storing a string into Ans takes like 0.1 seconds in TI-BASIC, which is a lot when you desperately try to keep your game above 3 FPS. This is why nobody comments their code in TI-BASIC.
  • 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

novenary

Fair enough, I did it in Axe myself (commented out labels for easy navigation), but that doesn't work as well for basic. Maybe some custom label token could be added for basic ? Or a comment token I guess. Since PHASM already uses the parser hook I think it's a good idea.

Adriweb

What I proposed most was a catalog-like menu listing things (but also with the first menu item as a special case to let the user type stuff), I think it's the more convenient

(details of what I mean here)
  • Calculators owned: TI-Nspire CX CAS, TI-Nspire CX, TI-Nspire CAS (x3), TI-Nspire (x2), TI-Nspire CM-C CAS, TI-Nspire CAS+, TI-80, TI-82 Stats.fr, TI-82 Plus, TI-83 Plus, TI-83 Plus.fr USB, TI-84+, TI-84+ Pocket SE, TI-84+ C Silver Edition, TI-84 Plus CE, TI-89 Titanium, TI-86, TI-Voyage 200, TI-Collège Plus, TI-Collège Plus Solaire, 3 HP, some Casios
Co-founder & co-administrator of TI-Planet and Inspired-Lua

Hayleia

(Also, as you may have noticed, there is the same poll on TI Planet (except for the third choice that Epharius decided to remove) but you obviously only vote on one so we know exactly what people want without having people who voted twice :P)

Dream of Omnimaga

Has he made his decision yet by the way? I know he doesn't post as much outside TI-Planet but he didn't post a lot there either so I wasn't sure if there were any updates.
  • 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

Hayleia

He doesn't post a lot on TI Planet either :P
More than here, I agree, but he mostly tells about progress on the chat.

From what I recall, he plans on doing the menu listing all labels first, then he'll see about the other methods.

Dream of Omnimaga

I hope it helps speeding  up development nonetheless. Did he have any luck implementing routines to go to specific code instantly?
  • 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

Hayleia

Seems like he has something working about this since you can press (alpha) (enter) to jump directly to the end of the code. At least according to the archive description because I did not remember reading this anywhere else -.-

Dream of Omnimaga

That would be another nice feature actually. Casio calcs have this feature.
  • 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