Welcome to MUGS ⚄♠♞🏹 (Multi-User Gaming Services)! | github.com/Raku-MUGS | v0.1.1 has been released! (github.com/Raku-MUGS/MUGS/blob/mai...v0.1.1.md)
Set by japhb on 16 April 2021.
raydiak xterm has TERM=xterm, while konsole has it set to xterm-256color 00:01
japhb Yeah, the real version of each of those should work. I think the problem is likely in one of these two functions: github.com/Raku-MUGS/MUGS-UI-CLI/b...kumod#L381 00:02
Can you see anything when you run this: raku -e 'say "\e[6n"; say "\e[18t"' 00:04
For me, the cursor location and window size appear as response strings
raydiak oh heck no. I get a couple blank lines, then all on one line I get ^[[48;1R[x@prism mugs]$ ;1R with my cursor at the end of it. the part that looks like a prompt is my usual prompt 00:05
japhb Weird
OK, so it looks like it's not responding correctly to the second one. 00:06
^[[48;1R is probably a correct response to the first one. 00:07
raydiak yeah the stuff even *after* my prompt is particularly cute :) I don't know much about the inner workings of terminals and escape codes and such, don't think I can be much help here besides testing 00:08
japhb raydiak: OK, I'll go see what I can figure out. Thanks for taking the time to try things. :-) 00:12
raydiak even in xterm the response is two blank lines and then ^[[2;1R^[[8;24;80t[x@prism mugs]$ 1R24;80t
maybe something to do with my color prompt? PS1 is \[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] 00:13
japhb OK, that part after your prompt is a bit strange, but that may be a timing issue. But that's at least a proper response string to both queries. 00:14
Those just look like color escapes, nothing fancy
Because ^[[2;1R^[[8;24;80t says "Cursor at (1,2); Screen size 80x24" 00:15
So I think my hunch was right, Konsole isn't responding to the "\e[18t" query ... apparently *at all* 00:16
raydiak I looked around for relevant stuff in the settings, it doesn't seem to have much for "terminal emulation features" kind of stuff I sometimes see in other terminals 00:17
I doubt it's relevant, but I have flow control turned off (e.g. ^S, ^Q) 00:18
and yes, I can conrifm that say "\e[18t" just gives me one blank line 00:20
I'm trying mugs-ui-websimple now, and it seems to be working from the module dir. first speedbump I encountered is that apprently user, persona, and character all have to have different names. that's pretty inconvenient. also the user-facing error just says "Unable to create ...", have to look at the server output to know what the actual error was 00:30
(where ... is e.g. character or whatever the thing I was trying to create was) 00:31
japhb raydiak: Yeah, all identities within a universe have to be unique, including via Unicode compatible decomposition 00:36
(NFKD)
I've also implemented PRECIS checking
AFK to feed fam 00:38
raydiak idk what PRECIS is, but just saying it's kinda awkward to have to create three different levels of names and they all have to be different. but besides that, at least the error message could be more helpful 00:47
also maybe the server output could be a little quieter unless a --debug flag is passed or something. lots of testing output there, and frequent "Use of Nil in string context in sub escape-text at /home/x/.rakubrew/versions/moar-2021.04/install/share/perl6/site/sources/6A3C744A4C03D3F2184D2210CC3CFBC8E0DBAFDA (Cro::WebApp::Template::AST) line 307" 00:48
good to see it working though, checked out the echo and adventure games. adventure game was driving me nuts not automatically focusing the input field in the web ui, but obviously the interface isn't the main point at this stage 00:52
japhb That's an understatement. :-) 01:56
Still, "Completely sucking" is also not a thing I desire.
I had to turn off autofocus because doing it wrong is worse than not doing it. 01:57
Odd, I wonder what is coming out as Nil ...
Going back through all the games in all the UIs and making sure they at least *function* is a gate for the 0.1.2 release 01:59
The different types of identities are to socialize a stronger security and pseudonymity stance -- by default, *everyone* has a pseudonym. However, I might not force them up front, or maybe I'll make a more obvious private/friends/public distinction. 02:01
raydiak I found somewhere recommending something along the lines of \e[9999;9999H\e[6n which does work in konsole and xterm both (wrapped in \e[s and \e[u if cursor position isn't set afterwards by whatever you're doing in there) 02:15
plus it works in an actual console outside of X (I assume) 02:16
adding the "autofocus" attribute to the input element seems to work in firefox and chromium on linux and firefox and chrome on android (everything I tested). on mobile browsers it doesn't automatically pull up the keyboard, but I'm pretty sure that's an intentional security restriction with no workaround 02:31
when you get to polishing the web ui, if it were turned into a single page app maybe it could keep the keyboard open while updating the page with new content...except once you're worried about ui polish you'd probably just provide buttons for common actions instead of an input field anyway 02:36
japhb raydiak: I also have to consider how screen readers view it. Autofocus was confusing Orca (at least, how I had it set). 02:40
But yeah, WebSimple is pretty basic. Eventually I had planned a WebSPA or so. 02:41
raydiak: "plus it works in an actual console outside of X" -- Do you mean the 'linux' terminal? 02:42
raydiak but autofocus is the clean modern standard way of doing it, afaik. if orca doesn't like it, I'd be questioning orca, not autofocus
yes that's what I mean
maybe orca needs a bit of hand-holding via aria or something? 02:43
japhb raydiak: Orca was autofocusing just fine -- but it wasn't reading anything *else* on the screen beforehand. So you'd submit your move, and a sighted person could see the response text and an input bar. A screen reader user just got sent directly to the input bar, no descriptive text spoken.
Yeah, quite possible. I'm still learning all of that.
raydiak sounds very much like a poor choice on orca's part 02:44
japhb It's possible, though I'd wager better odds that I just wasn't holding it right.
raydiak: OK, so it sounds like the recommendation you found said basically "Save the current cursor position, force the cursor into the lower right by taking advantage of clipping, read the cursor position as an indication of screen size, then restore the current cursor position" 02:46
raydiak yep
that's actually what it said, I looked up the escape codes myself just for education 02:47
japhb Was looking at some other terminal's compatibility and it certainly seems like the xterm screen size query has relatively poor portability. :-(
HEH
raydiak I kinda figured as much, it's not like Konsole is some obscure niche. I've never had any problems with it and I make very heavy usage of the terminal for nearly everything, to the extreme that I even considered abandoning GUI apps altogether except that I really do need a fast modern browser 02:53
japhb Yeah, almost all of my computer use happens in a terminal or a web browser. There are only a few remaining apps that aren't one of those (and frankly, I'd be happy with some of those being one of the first two). 02:54
raydiak: What game was giving you the frequent "Use of Nil in string context in sub escape-text" warnings? Or was it "all of them"? 02:59
raydiak I thought about just running a browser directly under X with no window/desktop manager and doing everything else in virtual terminals. but the truth is there are niceties I'd miss. having full-screen transparent terminal that I write in while I read docs/examples in the browser beneath it makes it so I don't have to task-switch much. and all the pretty little performance meters and such in my panels
it was the adventure game
looking back over the scrollback, apparently "frequent" was the wrong word to use 03:01
but now I have a phone call 03:02
japhb My perfmon has become `atop` sitting in a dedicated full-laptop-screen window in one of my virtual desktops. I used to use various graphical do-dads, but I found them taking too much of my performance when I was doing detailed perf tests.
Gotcha
raydiak I mostly just use the laptop screen for browsing and controlling music. everything else is on a 4k 60hz TV on my desk plugged into the laptop. it's my only computer for now. I'd say I was trying to keep the setup light, but that kinda went out the window with the 47" tv and 6.1 surround sound... 03:10
it looks like one of the Nils comes from when I start a new game after I'm logged in. thought I saw it more earlier, but still checking scrollback... 03:14
japhb Interesting 03:17
Yeah, my personal setup is also laptop with 4K monitor plugged in.
japhb converts today's feedback into a todo list, wheee ... :-D 03:18
raydiak also seems to have something to do with the area in the adventure game with the path to the door. I'll pay closer attention next time I test, but I have to go back to RL soon so that won't be until late tonight or tomorrow 03:22
japhb No worries, you've given me a lot to work on! :-) 03:34
raydiak happy to help break stuff! :) 03:36
japhb raydiak: Just pushed MUGS-UI-CLI 03:39
If you're still around, see if that fixes your mugs-cli hang
raydiak a few other things: you can leave the password empty when creating an account, dunno if that's intentional. without checking the source I can't figure out how to interact with the door, maybe needs a command reference or something. and when there's an error (like "Could not parse your input" from trying invalid commands), it doesn't show the description of the area you're in anymore, just has the error and the
input controls
sure, lemme try... 03:40
japhb Is that in the WebSimple UI still?
raydiak yes
japhb (I guess it would be, since the only other one was the CLI which was broken for you ...)
raydiak looks good, seems to work as intended 03:44
japhb (y)! 03:45
raydiak ooc, why are you getting the terminal size anyway? looks like everything is wrapped at 80 chars anyway, and it just flows like a regular terminal app, I don't see any ncurses-like stuff going on... 03:46
japhb So the debug output in the mugs-web-simple terminal and the mugs-ws-server terminal are because --debug is True by default ... Do you think *both* of these should default --debug to False? (I'm fine with that, just want to understand your feedback.)
raydiak: Try entering a realllllly long input line 03:47
raydiak ah, I see 03:48
japhb The scrolling prompt thing was just the *first* thing I was planning to do with having the screen size. The next thing would be to allow the *output* to wrap as intended in wider terminals. For right now the 80-character wrap is just being hard-coded in the description text.
raydiak makes sense. word-wrap is kinda important in something like a text adventure 03:51
japhb Actually, before that, I wanted to deal properly with SIGWINCH. I already have suspend/resume (SIGTSTP/SIGCONT) working for the CLI, but it doesn't re-read the screen size after SIGWINCH yet. 03:52
raydiak: Right, and I want it to work with narrower terminals as well (such as on a handheld device, a refreshible braille display, or zoomed terminal)
At some point, I'm going to have to teach the adventure map parser about e.g. Markdown descriptions or so. 03:53
raydiak: Pushed default --/debug (debug off) 03:57
(For both servers)
raydiak ohhh, that's why all that was in there :)
japhb Yup. :-) 03:58
raydiak alright, I'm afk for now. catch you again soon 03:59
japhb o/ 04:01
Pushed fixes for "Use of Nil in string context in sub escape-text" in WebSimple 04:41
Pushed some WebSimple README updates for the Gotchas you found 05:08
07:40 ChanServ sets mode: +o japhb
japhb Welcome to MUGS ⚄♠♞🏹 (Multi-User Gaming Services)! | github.com/Raku-MUGS | v0.1.2 has been released! (github.com/Raku-MUGS/MUGS/blob/mai...v0.1.2.md) 07:41
ChanServ sets mode: -o japhb
japhb Might as well copy the notice I sent to the other channels (#raku and #raku-gamedev): 07:47
🎉‭🎉‭🎉‭ v0.1.2 has been released and is uploaded to fez/zef! Now with higher performance, CBOR serialization, many more docs, and many bug fixes! See github.com/Raku-MUGS/MUGS/blob/mai.../v0.1.2.md for details. :-)