[2021-03-22 00:02:41] well i sort of fixed it [2021-03-22 00:02:43] sort of [2021-03-22 00:03:12] its just causing all kinds of other problems lol [2021-03-22 00:05:47] yea i might just have to now allow overlapping windows grr [2021-03-22 00:06:05] i can fix it but it makes the menu windows flicker because they are not being drawn fast enough [2021-03-22 00:08:42] and nope it does not fix it anyway [2021-03-22 00:32:40] → gravicappa joined (~gravicapp@h109-187-18-186.dyn.bashtel.ru) [2021-03-22 00:35:59] this is a freeeeeeking tough one lol [2021-03-22 00:38:42] → dave0 joined (~davezero@069.d.003.ncl.iprimus.net.au) [2021-03-22 00:40:54] ⇐ dave0 quit (~davezero@069.d.003.ncl.iprimus.net.au): Client Quit [2021-03-22 00:41:59] mark4: I'm going to guess that it's because you're only overwriting one of the bytes of the character? [2021-03-22 00:42:41] Oh I didn't keep reading, it's the drawing code, not the buffer itself [2021-03-22 00:45:19] what i do when i write a wide character into a window is mark the next cell of the window as DEAD [2021-03-22 00:45:39] so the cell_t code = DEADCODE [2021-03-22 00:46:01] so. when i write the chinese character into the display that obliterates the border char [2021-03-22 00:46:11] when i go to write the border char its not changed [2021-03-22 00:46:15] so its not updated [2021-03-22 00:46:26] and remains obliterated [2021-03-22 00:47:09] I've written some (mediocre) terminal utilities in my day and now I'm imagining how much some of them might break with multibyte chars D: [2021-03-22 00:47:21] heh [2021-03-22 00:47:50] the solution might be to NOT emit any multi byte char whose next cell is not dead [2021-03-22 00:48:02] thats also non trivial :/ [2021-03-22 00:51:04] There's only like 20 users of my lib that I know of on Github, so luckily it probably hasn't affected anyone but now I need to add an issue just in case [2021-03-22 00:51:22] heh [2021-03-22 00:52:14] Are you buffering each menu as its own thing before compositing them? [2021-03-22 00:52:53] Or drawing them straight into the display buffer and optimizing the redraws? [2021-03-22 00:59:03] Looks like the latter, since the menu borders stay corrupted until force redrawn [2021-03-22 00:59:17] Nice looking demo though [2021-03-22 01:00:04] Even if it does make my CPU fans go into turbojet mode [2021-03-22 01:05:02] omg i think i fixed it lol [2021-03-22 01:05:17] every window has a its own buffer [2021-03-22 01:05:21] the screen has two buffers [2021-03-22 01:05:31] every frame every window is drawn into screen frame 1 [2021-03-22 01:05:44] when i update the screen i look for only those chars that have changed between frames [2021-03-22 01:06:21] im also doing optimized output of each frame to the display [2021-03-22 01:06:52] i set an attribute fg/bg/bold/etc and then write every character with the same attribs out by bouncing the cursor all over the map [2021-03-22 01:10:13] What do you define as a window? [2021-03-22 01:10:46] what do you mean? [2021-03-22 01:10:59] a window is a buffer that has a position in the screen [2021-03-22 01:11:22] its a structure and one of the elements of that structure is a pointer to the buffer [2021-03-22 01:11:30] a window can be attached to a screen [2021-03-22 01:11:31] Gotcha. Every system seems to use its own lingo so I wanted to be sure :) [2021-03-22 01:11:45] and when the screen is updated it writes all its windows into its own buffer1 [2021-03-22 01:11:59] everything in the screen is a window currently [2021-03-22 01:12:08] you do not get to direct write into the screen [2021-03-22 01:12:38] Hmm. Ctrl-cing doesn't restore cusor visibility when the program exists [2021-03-22 01:12:43] exits^ [2021-03-22 01:14:19] yea i need to either disable control c or handle it lol [2021-03-22 01:14:21] escape to quit [2021-03-22 01:14:26] space to pause [2021-03-22 01:14:43] f10 to activate menus. cursor keys to move around [2021-03-22 01:15:03] up/down handlers are not written yet so the activve pulldown cant DO anything yet heh [2021-03-22 01:15:22] Ah, esc does reset the terminal cursor. I instincitvely hit "q" instead of esc for some reason [2021-03-22 01:15:46] well handling control c gracefully or ignoring it IS on the todo heh [2021-03-22 01:15:54] ncurses has a thing it does for that [2021-03-22 01:16:00] turning it off or something [2021-03-22 01:16:14] Yeah you just trap the signal [2021-03-22 01:17:09] yup [2021-03-22 01:17:16] btw all of that is single threaded btw :) [2021-03-22 01:17:31] Looks like it doesn't handle sigwich yet [2021-03-22 01:18:16] Oh it does, partially [2021-03-22 01:18:34] no you can make the window bigger [2021-03-22 01:18:46] that wont affect it. making it smaller will screw things up because it dont know lol [2021-03-22 01:19:06] thats not really part of the library btw [2021-03-22 01:19:06] There's some redrawing errors, at least in tmux, and when it's paused it doesn't update the size, so the results are hilarious when you unpause [2021-03-22 01:19:11] user code would have to handle that [2021-03-22 01:19:33] Ah, I figured that would be part of the lib [2021-03-22 01:19:33] main.c is not really a demo or even a valid use case scenario, its for me to help debug and find issues :) [2021-03-22 01:19:55] i can add a function to handle it but i would not know what to do [2021-03-22 01:19:59] the user code would have to [2021-03-22 01:20:30] because it would have to affect a cold restart [2021-03-22 01:20:39] on the UI at least [2021-03-22 01:22:10] Hmm. Yeah, you'd have to create the trap with a reference to the screen struct at the very least, which it wouldn't have unless the users set that up. [2021-03-22 01:25:23] pushed the fix [2021-03-22 01:25:39] its not 100% perfect but what im doing here is not a normal use case lol [2021-03-22 01:25:51] windows flying around like this would not be normal :) [2021-03-22 01:27:03] It's a really good stress test for the library.. and my CPU ;) [2021-03-22 01:27:14] smoke test :) [2021-03-22 01:27:19] what CPU? [2021-03-22 01:27:43] im going to have some real demos such as shaded 3d rotating dots [2021-03-22 01:27:53] either with gray scales or full 24 bit rgb or both :) [2021-03-22 01:28:10] maybe a breakout game? [2021-03-22 01:28:14] not sure :) [2021-03-22 01:28:28] mark4: I'd rather have external displays with different DPIs and no screen tearing with wayland than deal with those problems on X [2021-03-22 01:28:37] guess it depends on the user [2021-03-22 01:28:57] siraben: waland deals with that? [2021-03-22 01:29:03] Yes and yes :) [2021-03-22 01:29:04] what about different resolutions? [2021-03-22 01:29:09] it's honestly the only reason I switched [2021-03-22 01:29:12] 1080 built in monitor and 4k external? [2021-03-22 01:29:20] yeah exactly [2021-03-22 01:29:27] because I have a HIDPI laptop screen and 1080 monitor [2021-03-22 01:29:33] x needs to pull their head out and fix that lol [2021-03-22 01:29:44] and if you scale in the X settings it looks bad on one or the other [2021-03-22 01:29:49] I'm actually running it in a VM, but the host CPU is an i7 6700HQ [2021-03-22 01:29:51] i could have gotten a 4k built in monitor on my new laptop [2021-03-22 01:30:04] but that would have made it more expensie by quite a bit and it was already over 2k :) [2021-03-22 01:30:08] almost 3 [2021-03-22 01:30:09] yeah you'd have experienced the pain of X with different res displays [2021-03-22 01:30:25] screen tearing was always there but I didn't really mind [2021-03-22 01:30:35] but the external display stuff, yeah I want it to just work [2021-03-22 01:30:51] i always want the TOP edges of my monitors aligned [2021-03-22 01:30:59] freeking wm's in linux always align the bottom edge [2021-03-22 01:31:00] grrr [2021-03-22 01:31:08] not using a tiling window manager? [2021-03-22 01:31:16] I wonder what would happen if I ran your demo on my server and looked at it through nested tmuxes over mosh [2021-03-22 01:31:16] FUCK no! [2021-03-22 01:31:22] what do you mean by top edges aligned? [2021-03-22 01:31:31] i might have stated that backwards [2021-03-22 01:31:34] lol tiling WMs are the greatest [2021-03-22 01:31:40] i want the menu bars on each screen aligned [2021-03-22 01:31:49] Tiling WMs are great, that's why I use tmux ;) [2021-03-22 01:31:52] they would drive me batshit craszy [2021-03-22 01:32:03] xybre: that's more a terminal thing though heh [2021-03-22 01:32:09] I use emacs for that [2021-03-22 01:32:19] your host cpu is no slouch xy [2021-03-22 01:32:20] mark4: what do you mean by aligned? are they not already? [2021-03-22 01:32:40] might be a KDE specific thing [2021-03-22 01:32:48] mark4: yeah it's mobile but very solid [2021-03-22 01:33:03] if the top edges of the monitors are aligned and you try move the cursor from one screen to the other when it is at the bottom of the screen it will BLOCK [2021-03-22 01:33:12] because there is no screen at that posion on the other monitor [2021-03-22 01:33:33] mark4: oh yeah I hate that [2021-03-22 01:33:36] isn't that intentional? [2021-03-22 01:33:41] yes but [2021-03-22 01:33:52] move your cursor from one screen to another [2021-03-22 01:34:03] i want to set the alignment so the bottom edge of monitor 1 is aligned with the bottom edge of monitor 2 [2021-03-22 01:34:05] NOT the top edges [2021-03-22 01:34:11] i want the BLOCK at the top edge [2021-03-22 01:34:27] my mouse is more likely to cross the barrier when it is closer to the bottom [2021-03-22 01:34:31] so if you move your cursor down monitor 1, it appears where? [2021-03-22 01:34:33] It would be amazing if it just teleported it to the correct coordinate, unless I told it not to (like if I was using a heterogenous monitor grid) [2021-03-22 01:34:43] no i never align monitors vertically [2021-03-22 01:34:47] i align them horizontally [2021-03-22 01:34:58] move cursor right from the built in and it moves into the external [2021-03-22 01:35:05] the external is 4k [2021-03-22 01:35:24] the problem is not when moving from the internal to the external but the other way round [2021-03-22 01:35:30] that's strange [2021-03-22 01:35:38] i can seemlessly move between the monitors [2021-03-22 01:36:03] only if they are exactly the same resolution [2021-03-22 01:36:05] If they're aligned and the same res it should be fine [2021-03-22 01:36:12] mark4: ah, yes X tings :P [2021-03-22 01:36:15] s/yes/just/ [2021-03-22 01:36:33] never had that problem on wayland [2021-03-22 01:36:38] yes it would be [2021-03-22 01:36:48] like why can't they fix different res monitors [2021-03-22 01:36:52] do this. put one window on the screen and align it with another smaller window on the screen [2021-03-22 01:36:53] if they fixed that I'd still be using X [2021-03-22 01:36:55] Happens on Windows too. Not sure about MacOS. [2021-03-22 01:37:00] align them horizontally next to each other [2021-03-22 01:37:08] one window ill come lower down on the screen [2021-03-22 01:37:19] immagine your mouse being bound to the boundries of both windows [2021-03-22 01:37:31] xybre: macOS external displays seem to just work [2021-03-22 01:37:35] you can move between windows where they connect along the edge [2021-03-22 01:37:41] it's real hard to discuss visual things in text heh [2021-03-22 01:37:43] but you cannot move the mouse outside either window [2021-03-22 01:38:07] put the mouse at the bottom of the taller window and try moving it towards the smaller one and it will block [2021-03-22 01:38:12] mark4: huh what [2021-03-22 01:38:24] i might need to try this out in KDE sometime [2021-03-22 01:38:35] i3/sway didn't seem to block things weirdly [2021-03-22 01:39:01] mark4: the demo actually looks worse now, chunks of borders missing even not near 2w chars, and the left side of the menu still gets obliterated. I did make clean and git clean before the build. [2021-03-22 01:39:07] if you go into display confiruation in KDE it shows you two virtual monitors [2021-03-22 01:39:18] which you can stack one on top of the other or one to the left of the other [2021-03-22 01:39:38] redo a ../configure ? [2021-03-22 01:39:49] what term do you use? [2021-03-22 01:40:19] Yeah I ran the whole build script with the configure [2021-03-22 01:40:48] it works on my machine! (tm) [2021-03-22 01:40:48] lol [2021-03-22 01:41:04] It's tmux 3.1b inside gnome-term 3.38.3 [2021-03-22 01:41:15] oh it may not work at all in a tmux lol [2021-03-22 01:41:21] or screen [2021-03-22 01:41:29] try it outside tmux? [2021-03-22 01:41:34] It was working 99% fine in tmux before [2021-03-22 01:41:36] just a normal v term? [2021-03-22 01:42:10] its still not 100% perfect but for me its better than it was [2021-03-22 01:42:18] Sure, sec [2021-03-22 01:43:08] runs great in both gnome-terminal and konsole here [2021-03-22 01:44:06] Here's what I see on startup in a fresh terminal, no tmux https://i.imgur.com/vOeiTm6.png [2021-03-22 01:44:14] what cols.rows do you have? [2021-03-22 01:44:25] hrm [2021-03-22 01:44:26] thats weird [2021-03-22 01:44:37] and i set mine to 100x30 so i see the windows overlapping [2021-03-22 01:44:39] xybre: which window manager is that [2021-03-22 01:44:47] oh it's a terminal entirely [2021-03-22 01:45:19] siraben: Yeah I usually just fullscreen my terminal and do everything in it [2021-03-22 01:45:31] try it at 100x30? [2021-03-22 01:46:12] im not getting those glitches here at all [2021-03-22 01:46:40] Hmm. I don't like how it writes black to the screen on exit. There's another way to do that, lemme see if I can remember. [2021-03-22 01:47:11] im setting black bg, white fg, clearing screen and exiting i think [2021-03-22 01:47:19] which might not be your preferences lol [2021-03-22 01:47:32] but main.c is not really an application or demo lol [2021-03-22 01:47:39] YOUR main.c would handle that diff :) [2021-03-22 01:47:43] you can edit main.c tho [2021-03-22 01:47:59] set_fg(WHITE); [2021-03-22 01:47:59] set_bg(BLACK); [2021-03-22 01:48:05] flipflop those or something [2021-03-22 01:48:16] Still happens on a smaller window, thought the pattern is different https://i.imgur.com/L27wnI9.png [2021-03-22 01:48:50] it actually makes no sense for those chars on the left edge to be broken like that [2021-03-22 01:48:59] the chars to the left of them are also single width chars [2021-03-22 01:49:22] mark4: right but writing out anything to clear the screen isn't ideal. It's fine to throw it into the user's court, but it would be nice to have lib support for cleanup is all :) [2021-03-22 01:49:52] xybre: theres a way to save screen state on entry into a console app and to restore it on exit [2021-03-22 01:50:07] but the library would not be the one to handle that [2021-03-22 01:50:27] or maybe it would [2021-03-22 01:50:28] hrn [2021-03-22 01:50:32] have to thunk about that [2021-03-22 01:50:35] Yeah clear screen is just \e[2J [2021-03-22 01:50:57] heh i dont need to hard code that [2021-03-22 01:51:08] i compile the escape seauence by parsing the terminfo format string :) [2021-03-22 01:51:11] Right, pull it from termux or whatever [2021-03-22 01:51:15] look in parse.c :) [2021-03-22 01:51:16] terminfo I mean [2021-03-22 01:51:44] clear=\E[H\E[2J, [2021-03-22 01:52:10] that looks like two operations maybe the first is home? [2021-03-22 01:52:16] home=\E[H, [2021-03-22 01:52:18] yup :) [2021-03-22 01:52:25] CLEAR is a HOME and then a cear [2021-03-22 01:52:28] \e[H means home [2021-03-22 01:52:30] Yeah [2021-03-22 01:52:45] i dont have the escape seauences memorized, my parser handles that for me [2021-03-22 01:52:46] I've written a lot of ANSI by hand, for good or ill [2021-03-22 01:53:09] wish terminfo gave the format strings for shifted cursor up and down and left and right [2021-03-22 01:53:14] i ferget which 2 are missing [2021-03-22 01:53:17] up and down i think [2021-03-22 01:53:51] A is up, B is down [2021-03-22 01:54:07] ? [2021-03-22 01:54:24] \e[A ? [2021-03-22 01:54:25] E and F according to my notes should do the same but might not work on all terms. The comments don't explain why [2021-03-22 01:54:37] \e[5A to move up 5 lines [2021-03-22 01:55:41] the cursor up and down keys will not report the same sequences if keyboard transmit mode is off [2021-03-22 01:56:14] Weird [2021-03-22 01:56:14] you send an smkx and it turns keyboard transmit mode and now the cursor keys give the escape sequences given in terminfo [2021-03-22 01:56:45] if you do rmkx and log the escape seuences with cursor u/down then do smkx and log them [2021-03-22 01:56:47] they are different [2021-03-22 01:57:04] Is that the difference between A and E? [2021-03-22 01:57:15] no idea what sequences either return lol [2021-03-22 01:57:43] the cursor up keys should not move the cursor at all ever [2021-03-22 01:58:05] im not talking about OUTPUTTING cursor up [2021-03-22 01:58:18] Oh you mean ... right sorry [2021-03-22 01:58:22] im talking about INPUTTING the escape sequences returned by the keyboard when you hit those kehys [2021-03-22 01:58:34] Yup I'm caught up now [2021-03-22 01:59:03] the cursor up and down keys will report different values in keyboard transmit mode [2021-03-22 01:59:29] are relatives cursor moves faster than absolute cursor moves? [2021-03-22 02:01:01] Hmm. My keyboard parser shows the same sequences for keyboard input. Just \e[A for up and \e[D for left, for example. [2021-03-22 02:01:18] But I think I assume it's always in the correct mode. [2021-03-22 02:01:41] there are cud1 cuf1 cuu1 cud1 and cud cuf cuu and cud which take parameters [2021-03-22 02:01:49] output an smkx and check those again :) [2021-03-22 02:02:22] smkx=\E[?1h\E=, [2021-03-22 02:02:26] I never tested, but would *hope* that relative is faster for a single operation [2021-03-22 02:02:58] It likely depends on the terminal's internal representation [2021-03-22 02:03:39] erm the comma on the end of that smkx is not part of the escape seq [2021-03-22 02:04:08] the way to test if one is faster than the other is to do 100 million absolute cursor moves [2021-03-22 02:04:26] and then do 100 million relative cursor moves where you are only adjusting in either the X or Y coord at one timne [2021-03-22 02:05:05] thers also hpa and vpa which are absolute moves but only in one axis [2021-03-22 02:07:24] It's funny you're using all the terminfo shortnames I've never heard of and I'm using all the raw VT codes you never have to deal with [2021-03-22 02:07:54] heh [2021-03-22 02:08:07] i learned how to do all this by doing man 5 terminfo for 8 hours [2021-03-22 02:08:47] Yeah all my ANSI stuff was learned across several years of pain and misery ahaha [2021-03-22 02:08:53] thomas dicky is also not much help but i do not hold that against him at all [2021-03-22 02:09:00] heh [2021-03-22 02:09:49] I intend to build at least 1 more terminal library before I die, but I want to finish the one I've been playing around with in Crystal before I get to that one [2021-03-22 02:10:52] you planning on dieing any time soon? heh [2021-03-22 02:10:57] And it looks like I was in the middle of a bunch of changes to another lib back in June and never committed them. woo [2021-03-22 02:11:13] Not planning on it :) [2021-03-22 02:11:23] good plan :) [2021-03-22 02:13:08] where are you located? [2021-03-22 02:18:43] Ah I see, the modes you're talking about are for the keypad, so it can do numbers or arrows on the terminal level. I guess numlock was too complicated to put into the keyboard itself back then [2021-03-22 02:19:01] ooooh thats what it does? [2021-03-22 02:19:02] ! [2021-03-22 02:19:12] but it changes the codes for the dedicated cursor keys too [2021-03-22 02:19:31] im still looking for my break key and my clear key lol [2021-03-22 02:20:28] Yeah, it changes the prefixes for the input codes in general [2021-03-22 02:21:48] I *think* it has something to do with compatibility between different protocols or models at the time [2021-03-22 02:21:48] is there a rule for determining shift, alt, control, shift+alt, shift+control, alt+control, shift+alt+control? [2021-03-22 02:21:52] for ANY key? [2021-03-22 02:22:17] on ANY terminal lol [2021-03-22 02:22:37] Well for "any" terminal is always going to be false haha [2021-03-22 02:22:48] But for any Xterm/Vt100-ish one, just maybe [2021-03-22 02:22:56] without hard coding the escape sequences for every single one of those codes for every terminal type [2021-03-22 02:23:28] for example the console editor joe [2021-03-22 02:23:32] control y is delete a line [2021-03-22 02:23:42] except control y is not listed in terminfo on ANY terminal [2021-03-22 02:23:58] so... it hard codes those for every terminal for every command keypress it has? [2021-03-22 02:24:46] Probably [2021-03-22 02:25:13] this cluster fuck console input is exactly why the guy that wrote vi also created termcap [2021-03-22 02:25:14] Most apps only use terminfo for some things [2021-03-22 02:25:18] which then morphed into terminfo [2021-03-22 02:25:28] That's why I want one (modern) ANSI lib to rule them all [2021-03-22 02:25:53] is that not what vte is? [2021-03-22 02:26:15] Most libs are giant and slow and incomplete [2021-03-22 02:26:30] imm tiny and fast and incomplete :P [2021-03-22 02:27:06] I don't want 30MB of terminals from the 70s that only exist in museums and still have to write my own handlers for iTerm or whatever [2021-03-22 02:27:11] -rwxr-xr-x 1 mark4 mark4 37440 Mar 22 02:27 u [2021-03-22 02:27:30] See, if it's tiny and fast, incomplete isn't such a thing [2021-03-22 02:27:39] support for that dead garbage should be removed from terminfo and ncurses [2021-03-22 02:28:09] and there should be a minimum set of format strings that EVERY terminal must supply in their terminfo [2021-03-22 02:28:37] for example. most terminals give the format string for the sgr0 but almost none of them give the format string for the sgr [2021-03-22 02:29:21] sgr0=\E(B\E[m [2021-03-22 02:29:54] rep=%p1%c\E[%p2%{1}%-%db i should try to use this :) [2021-03-22 02:30:11] repeat character in parameter 1 parameter 2 times [2021-03-22 02:30:21] can you read terminfo format strings? [2021-03-22 02:32:53] that emits parameter 1 as a char then decrements p2 then i have NO freeking idea what %db means beause %d is to output a number lol [2021-03-22 02:33:21] oh it must be outputting p2-1 as a number then a b and the terminal repeats the last char emitted by that many [2021-03-22 02:34:58] Okay so I modified my lib to output the raw seq from the keyboard, looks like it's pretty straight forward for control/shift/etc handling [2021-03-22 02:35:36] So, for example, this is F1: \eOP [2021-03-22 02:37:08] shift f1 \e[1;2P control f1 \e[1;5P control shift f1 \e[1;6P [2021-03-22 02:37:28] alt f1 is eaten by my WM ... [2021-03-22 02:38:14] aha [2021-03-22 02:38:24] is that an e zero p for f1 ? [2021-03-22 02:39:06] But \e[1;3R is alt-f3, so you get the idea [2021-03-22 02:39:07] or an Oh [2021-03-22 02:39:17] Like OPerator [2021-03-22 02:39:23] ya [2021-03-22 02:39:39] OP OQ OR OS for f1 f2 f3 f4 [2021-03-22 02:40:24] But it's \e[15~ through \e[21~ for f5-f10 because reasons I guess [2021-03-22 02:40:30] if i see a 1; in the seq i know its modified. and the 5/6 tells me if its shift/alt/ctrl [2021-03-22 02:40:32] etc [2021-03-22 02:40:40] lol [2021-03-22 02:41:08] I wonder if that keypad mode thingy changes those too [2021-03-22 02:41:09] those keys were an afterthough back in the day and someone else added the codes LO [2021-03-22 02:42:55] rep=%p1%c\E[%p2%{1}%-%db, : foo 'x' emit $1b emit '[' emit '5' emit 'b' emit ; [2021-03-22 02:43:01] foo emits 5 xs lol [2021-03-22 02:43:17] 6 i mean 5 more after the initial one emitted [2021-03-22 02:44:41] its almost 3am here and my brain is getting tired and still running full tilt boogie lol [2021-03-22 02:45:49] Also, for normal keys "alt" is usually just a prefix added to the usual key, so like \eB is shift-alt-b [2021-03-22 02:46:21] aha [2021-03-22 02:46:28] Yeah it's 2am here in Chicago [2021-03-22 02:46:41] that universal across all terminals? [2021-03-22 02:46:44] i doubt it lol [2021-03-22 02:47:12] the shift made it capital the alt put an escape on the front [2021-03-22 02:47:14] ezpz [2021-03-22 02:48:00] And for ctrl+key you'll end up with fun stuff like 0x02 for ctrl-b and you don't get the shift info at all [2021-03-22 02:48:22] so shift and control dont cooperate with each other? [2021-03-22 02:48:30] control alt should tho [2021-03-22 02:49:12] Shift+control works for the f keys [2021-03-22 02:49:28] but not for a b c ? [2021-03-22 02:49:48] And control alt b does the expected \e0x02 [2021-03-22 02:50:05] :) [2021-03-22 02:50:40] (I mean \u0002 not a literal zero ex) [2021-03-22 02:50:45] just need a state machine to decompile those into their respective keys and then i can set a glbal shift/alt/control flag and return the key :) [2021-03-22 02:51:06] aha [2021-03-22 02:51:40] oh yea i read it as meaning TWO not '0' 'x' '0' '2' heh [2021-03-22 02:51:54] but good catch to clarify that :) [2021-03-22 02:52:06] anyway i need to go into power saving mode and recharge :) [2021-03-22 02:52:15] Oh dear. . ? \u001F \u007F [2021-03-22 02:52:25] awesome talking to someone who knnows about this kind of stuff :) [2021-03-22 02:52:36] backspace and delete? [2021-03-22 02:52:50] So some keys return different data for control shift and some return only control [2021-03-22 02:53:19] well nobody uses control shift alt f1 alt shift b control alt q in an editor lol [2021-03-22 02:53:25] so its purely academic [2021-03-22 02:53:28] sort of :) [2021-03-22 02:53:52] anyway, time for zzz [2021-03-22 02:54:04] Delete works like an f key which is nice, \e[3;6~ [2021-03-22 02:54:08] gn! [2021-03-22 03:15:02] → f-a joined (~f-a@151.82.43.183) [2021-03-22 03:49:44] → hosewiejacke joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 04:22:36] ⇐ f-a quit (~f-a@151.82.43.183): Ping timeout: 246 seconds [2021-03-22 04:24:46] → f-a joined (~f-a@151.68.153.222) [2021-03-22 05:43:37] ⇐ f-a quit (~f-a@151.68.153.222): Quit: leaving [2021-03-22 05:46:15] → f-a joined (~f-a@151.68.153.222) [2021-03-22 05:57:02] ⇐ _whitelogger_ quit (~whitelogg@uruz.whitequark.org): Remote host closed the connection [2021-03-22 06:00:03] → _whitelogger_ joined (~whitelogg@uruz.whitequark.org) [2021-03-22 06:05:22] ⇐ hosewiejacke quit (~hosewieja@i5C743944.versanet.de): Ping timeout: 276 seconds [2021-03-22 06:22:40] → hosewiejacke joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 06:40:13] → andrei-n joined (~andrei-n@109.130.156.104) [2021-03-22 07:43:30] ⇐ andrei-n quit (~andrei-n@109.130.156.104): Quit: Leaving [2021-03-22 08:08:26] → tech_exorcist joined (txrcst@gateway/shell/hashbang/x-zndrxxvvmvizorur) [2021-03-22 08:20:21] ⇐ f-a quit (~f-a@151.68.153.222): Read error: Connection reset by peer [2021-03-22 08:24:23] → f-a joined (~f-a@151.44.37.69) [2021-03-22 08:32:56] ⇐ hosewiejacke quit (~hosewieja@i5C743944.versanet.de): Ping timeout: 240 seconds [2021-03-22 08:35:55] → hosewiejacke joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 11:18:33] ⇐ tech_exorcist quit (txrcst@gateway/shell/hashbang/x-zndrxxvvmvizorur): Ping timeout: 264 seconds [2021-03-22 11:23:56] → tech_exorcist joined (txrcst@gateway/shell/hashbang/x-bzegchqtudcbfxhw) [2021-03-22 11:36:09] ⇐ hosewiejacke quit (~hosewieja@i5C743944.versanet.de): Read error: Connection reset by peer [2021-03-22 11:36:09] → hosewiejacke2 joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 11:50:40] up down left right now work in the menus [2021-03-22 11:50:42] ⇐ cantstanya quit (~chatting@gateway/tor-sasl/cantstanya): Ping timeout: 268 seconds [2021-03-22 11:51:07] that took 2 hours of making cofree, procrastinating, watching youtube and 5 minutes of coding lol [2021-03-22 11:51:37] there are still some visual glitches but i understand whats causing them and can fix one of them fairly easily i think [2021-03-22 11:54:25] → cantstanya joined (~chatting@gateway/tor-sasl/cantstanya) [2021-03-22 12:20:26] ⇐ f-a quit (~f-a@151.44.37.69): Read error: Connection reset by peer [2021-03-22 12:24:32] → f-a joined (~f-a@151.38.122.15) [2021-03-22 12:28:19] ⇐ lonjil quit (~quassel@45.76.33.14): Quit: Quit. [2021-03-22 12:29:42] → lonjil joined (~quassel@2001:19f0:5001:38f6:1593:b567:7f90:a70) [2021-03-22 12:38:33] ⇐ cantstanya quit (~chatting@gateway/tor-sasl/cantstanya): Remote host closed the connection [2021-03-22 12:38:55] ok so my backspace key on xterm returns a 0x08 and terminfo says 0x08 [2021-03-22 12:39:09] on konsole a backspace returns 0x7f but terminfo says 0x08 [2021-03-22 12:41:01] → cantstanya joined (~chatting@gateway/tor-sasl/cantstanya) [2021-03-22 12:47:34] just reported a bug against konsole beause its utter fucking bullshit for a key to return a value thats inconsistent with the terminfo data [2021-03-22 13:00:56] ⇐ hosewiejacke2 quit (~hosewieja@i5C743944.versanet.de): Ping timeout: 240 seconds [2021-03-22 13:12:15] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-22 13:18:56] ⇐ a3f quit (~a3f@chimeria.ext.pengutronix.de): Ping timeout: 240 seconds [2021-03-22 13:19:20] → a3f joined (~a3f@chimeria.ext.pengutronix.de) [2021-03-22 13:45:12] → hosewiejacke joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 13:51:35] is there a tutorial anywhere about doing string stuff in forth? I'm really confused about how strings work [2021-03-22 13:51:39] especially building strings [2021-03-22 13:52:51] ⇐ f-a quit (~f-a@151.38.122.15): Quit: leaving [2021-03-22 14:09:12] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Remote host closed the connection [2021-03-22 14:11:18] nihilazo: there is a short tutorial in the gforth manual [2021-03-22 14:11:24] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Characters-and-Strings-Tutorial.html [2021-03-22 14:14:25] thanks [2021-03-22 14:15:38] I found the Forth Programmer's Handbook to be a helpful reference but you have to buy it [2021-03-22 14:15:41] https://www.amazon.com/Forth-Programmers-Handbook-Elizabeth-Rather/dp/1419675494 [2021-03-22 14:28:52] i would find that book to be utterly unhelpful for learning forth but good for learning ans forth which is not forth :) [2021-03-22 14:43:23] ⇐ gravicappa quit (~gravicapp@h109-187-18-186.dyn.bashtel.ru): Ping timeout: 240 seconds [2021-03-22 14:44:05] → gravicappa joined (~gravicapp@h109-187-21-33.dyn.bashtel.ru) [2021-03-22 14:54:38] → f-a joined (~f-a@151.38.122.15) [2021-03-22 15:05:31] ⇐ a3f quit (~a3f@chimeria.ext.pengutronix.de): Ping timeout: 272 seconds [2021-03-22 15:07:27] → a3f joined (~a3f@chimeria.ext.pengutronix.de) [2021-03-22 15:18:28] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-22 15:23:56] mark4: you submitted a bug to terminfo, right? [2021-03-22 15:25:14] to konsole [2021-03-22 15:25:22] i think terminfo is 100% correct [2021-03-22 15:25:27] it says delete is ^h [2021-03-22 15:25:36] but the terminal returns 0x7f [2021-03-22 15:27:12] My terminal also returns 0x7f for backspace [2021-03-22 15:30:24] Traditionally 0x08 would be backspace, as in one-space-back I think, but a lot of modern systems use 0x7f which is actually the delete *character*, rather than the delete command output that the actual delete key uses [2021-03-22 15:31:17] Terminal emulators and terminal applications vary wildly about how they treat the backspace and delete keys due to conflicting/overlapping historical uses, though it's gotten much better in the last decade [2021-03-22 15:31:41] If you have ever used Putty there's like a whole config page dedicated just to backspace and delete sequence options [2021-03-22 15:32:45] Is it bullshit? Absolutely! But since terminfo is supposed to be descriptive, I would argue that terminfo is the one with the bug [2021-03-22 15:42:10] 0x08 is backspace, that is move one space back, 0x7f is delete or 'punch out'. I have seen systems that send 0x08 followed by 0x7f [2021-03-22 15:49:27] Yep, it's a minefield [2021-03-22 15:49:47] It's similar to carriage return + line feed [2021-03-22 16:09:38] ⇐ hosewiejacke quit (~hosewieja@i5C743944.versanet.de): Ping timeout: 245 seconds [2021-03-22 16:14:25] ⇐ mark4 quit (~mark4@cpe-75-191-74-68.triad.res.rr.com): Read error: Connection reset by peer [2021-03-22 16:20:13] ⇐ f-a quit (~f-a@151.38.122.15): Read error: Connection reset by peer [2021-03-22 16:22:01] → f-a joined (~f-a@151.34.170.11) [2021-03-22 16:37:02] ⇐ gravicappa quit (~gravicapp@h109-187-21-33.dyn.bashtel.ru): Ping timeout: 265 seconds [2021-03-22 17:33:41] → hosewiejacke joined (~hosewieja@i5C743944.versanet.de) [2021-03-22 17:34:00] ⇐ hosewiejacke quit (~hosewieja@i5C743944.versanet.de): Client Quit [2021-03-22 17:45:54] → mark4 joined (~mark4@cpe-75-191-74-68.triad.res.rr.com) [2021-03-22 17:45:54] * ChanServ set +v mark4 [2021-03-22 18:36:43] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Remote host closed the connection [2021-03-22 19:00:06] → jedb joined (~jedb@185.204.1.181) [2021-03-22 19:04:00] ⇐ tech_exorcist quit (txrcst@gateway/shell/hashbang/x-bzegchqtudcbfxhw): Quit: tech_exorcist [2021-03-22 19:26:34] ⇐ jess quit (jess@freenode/staff/jess): Quit: K-Lined [2021-03-22 19:27:46] → j joined (jess@freenode/staff/jess) [2021-03-22 20:23:27] ⇐ f-a quit (~f-a@151.34.170.11): Ping timeout: 272 seconds [2021-03-22 20:24:42] → f-a joined (~f-a@151.34.144.222) [2021-03-22 20:35:50] * j → jess [2021-03-22 20:49:53] ⇐ jedb quit (~jedb@185.204.1.181): Remote host closed the connection [2021-03-22 20:52:04] → jedb joined (~jedb@210.1.209.100) [2021-03-22 20:53:40] → jedb_ joined (~jedb@177.67.80.187) [2021-03-22 20:56:18] ⇐ jedb quit (~jedb@210.1.209.100): Ping timeout: 245 seconds [2021-03-22 20:57:28] → dave0 joined (~davezero@069.d.003.ncl.iprimus.net.au) [2021-03-22 21:05:28] ⇐ dave0 quit (~davezero@069.d.003.ncl.iprimus.net.au): Ping timeout: 245 seconds [2021-03-22 21:14:49] getting majorly PISSED OFF with llvm [2021-03-22 21:15:12] my code is literally peppered full of bullshit branch target alignment and thers no fucking way to get rid of it [2021-03-22 21:20:44] ⇐ f-a quit (~f-a@151.34.144.222): Quit: leaving [2021-03-22 21:50:07] simple - write your kernel in assembly, and have it compile directly to machine code - of course, that limits you to one platform (without doing rewriting) [2021-03-22 22:33:03] → boru` joined (~boru@unaffiliated/boru) [2021-03-22 22:33:05] ⇐ boru quit (~boru@unaffiliated/boru): Disconnected by services [2021-03-22 22:33:08] * boru` → boru [2021-03-22 22:35:41] → jedb__ joined (~jedb@181.215.46.113) [2021-03-22 22:37:14] ⇐ tabemann quit (~travisb@2600:1700:7990:24e0:101f:ae79:c83b:6c90): Remote host closed the connection [2021-03-22 22:37:29] → tabemann joined (~travisb@2600:1700:7990:24e0:b0d9:c8e5:6265:88f4) [2021-03-22 22:38:19] ⇐ jedb_ quit (~jedb@177.67.80.187): Ping timeout: 256 seconds [2021-03-22 22:45:28] mark4, have you actually run it with and without the alignment? [2021-03-22 22:46:05] i have now, and the code is just fine without it [2021-03-22 22:46:15] there is a video from I think cppcon that I cant find where the guy goes through a bunch of examples of the compiler outputting longer and less efficient looking code than a human but when you run it the compiler outperforms hand written code [2021-03-22 22:46:19] the lack of code optmization is not the bottleneck [2021-03-22 22:46:42] yes its very difficult these days to be the compilers performance [2021-03-22 22:46:58] however. this code will perform no worse at -O0 than at -O3 [2021-03-22 22:47:04] so.. -Oz or -Os make sense [2021-03-22 22:47:17] right. also seems hard to even evaluate compiler output too since just looking at it is now not even enough. you cant really conclude anything until you run both versions [2021-03-22 22:48:34] i have [2021-03-22 22:48:47] i am now compiling with no padding to align anything [2021-03-22 22:48:50] right I just mean generally speaking [2021-03-22 22:48:59] ya. i see no difference [2021-03-22 22:49:15] i wish i had my old p3-650 to run it on :) [2021-03-22 22:49:18] that would tell me [2021-03-22 23:21:23] ⇐ sts-q quit (~sts-q@91.200.108.227): Ping timeout: 256 seconds [2021-03-22 23:23:55] → sts-q joined (~sts-q@91.200.108.225)