💾 Archived View for zaibatsu.circumlunar.space › ~solderpunk › phlog › looking-at-long-stuff-with-vf… captured on 2022-06-03 at 23:19:42.
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
Looking at long stuff with VF-1 ------------------------------- Tomasino recently asked me[1] how I view his phlog in my VF-1 client, since it contains a lot of long menus and posts which don't fit on a single screen. I answered him on IRC last night but figured I should document my responses here in case anybody else was wondering, and also because there are some newish ways to handle this problem that I haven't well publicised yet that old-time VF-1 users might not be aware of yet. So, here's my definitive guide to looking at long stuff with VF-1. In the case of very long menus (e.g. the gopher.club phlogosphere listing), you should know that after you've visited a menu, entering a blank line at the prompt, i.e. just hitting Enter, will display the first 10 items in that menu, then the next 10 items after that each time you hit it. This lets you gradually page through a long menu that flowed off the top of your screen. Since normally in this situation you just want to see the most recent entries (e.g. most recently updated phlogs, or most recent posts, or whatever), just whacking Enter once immediately after the long list has loaded is enough. This is probably my most-often used solution, because it is just a single keystroke and it quickly becomes a totally automatic reflex. Note that this only shows the *selectors* in the menu. The informational lines are stripped out, just like with "ls". This usually works fine, but there are certain HEATHENS in Gopherspace who design menus with *lots* of informational lines providing essential context to understand the menu and with meaningless, non-unique selector names. VF-1's "ls" is not much use here. These people are WRONG and Shai'hulud will come for them, but sometimes they write nice stuff, so one has to be able to deal with it. Thus... VF-1 has had a "less" command since the very beginning, but it originally did not work on menus, only on "real content" (which is to say anything with an item type other than 1). This was a frequent source of complaint because of all the HEATHENS who serve their content as item type 1. VF-1 was originally designed around a very clean, elegant, beautiful (some might say "strict" or "pedantic") conceptual model in which menus are menus and content is content, just like directories and directories and files are files. I have caved on this issue a bit, and now "less" and a bunch of other stuff also works on menus, and so you can read long phlog posts by heathens just fine. As a side effect, you can now also less through long menus like the SDF phlog listing, which gives you an alternative to the blank-line pagination technique outlined above, in case you don't like that for some reason and would rather type 5 keystrokes instead of 1. Finally, you can run "set auto_page true" (putting in your .vf1rc file for persistence across sessions if you like it). This will display menus which are 40 lines long or less normally (you can do e.g. "set auto_page_threshold 60" if 40 lines is too short for you), but for menus which are longer than 40 lines, after displaying the first 40 it will stop (telling you that it has truncated a long menu) and then you have to use the blank line pagination technique from the beginning of this post in order to continue down through the rest of the menu. When operating in this mode, informational lines from the first 40 (or whatever) lines of the menu *will* be displayed, so you can still see title ASCII art etc.), but when you page through the rest of the menu they will be hidden, as per usual for blank-line pagination. Yeah, is pretty ugly and hackish. I have this mode enabled by default in my SDF .vf1rc but not in other places, and having lived like this for a month or so, I don't really like the auto-pagination. It's pretty ugly in the code as well, so I may remove it. If this sounds like something you would *like*, please test it in the near future and if you love it, let me know somehow, Otherwise it might disappear. In related news, I have been playing with the sacc[2] gopher client from the bitreich folks over at circumlunar.space, because VF-1 is *by far* the most bloated thing that sees regular use over in that beautiful RAM-constrained world of tiny tools. No matter how small and sleek your Python application is, it still relies on the Python interpreter, which is not a small thing. I'm thinking of learning Lua or Go or some other language that is a nice match for memory-constrained environments. But as for sacc, it certainly is nice and light, but I have to say after months of VF-1 use, the idea of having to actually move a kind of cursor item-by-item up or down through menus to get to where I want to be feels like trying to run through molasses or something! Also I seem to have hit some weird bug where I can't select the second item in any menu? I need to look into that. I assume it is some odd quirk of my environment, because it is such a glaring bug that if it happened for everybody it would surely have been spotted and fixed by now. [1] gopher://gopher.black:70/1/phlog/20180322-a-question-for-solderpunk [2] gopher://bitreich.org:70/1/scm/sacc