[2021-03-18 00:13:24] ⇐ inode quit (~inode@unaffiliated/inode): Remote host closed the connection [2021-03-18 00:14:00] → gravicappa joined (~gravicapp@h109-187-17-216.dyn.bashtel.ru) [2021-03-18 02:05:49] ⇐ dzho quit (~dzho@unaffiliated/dzho): Ping timeout: 260 seconds [2021-03-18 02:06:54] → dzho joined (~dzho@unaffiliated/dzho) [2021-03-18 02:07:32] ⇐ WojciechK quit (~wojciechk@2001:41d0:a:5be4::449): Ping timeout: 260 seconds [2021-03-18 02:21:32] → f-a joined (~f-a@151.34.157.165) [2021-03-18 02:25:15] → hosewiejacke joined (~hosewieja@i5C741581.versanet.de) [2021-03-18 03:06:32] ⇐ jedb quit (~jedb@177.67.80.187): Remote host closed the connection [2021-03-18 03:08:43] → jedb joined (~jedb@181.215.46.113) [2021-03-18 03:33:10] → jedb_ joined (~jedb@210.1.209.100) [2021-03-18 03:35:36] ⇐ jedb quit (~jedb@181.215.46.113): Ping timeout: 265 seconds [2021-03-18 03:36:49] → jedb__ joined (~jedb@177.67.80.187) [2021-03-18 03:39:43] ⇐ jedb_ quit (~jedb@210.1.209.100): Ping timeout: 256 seconds [2021-03-18 03:44:40] ⇐ jedb__ quit (~jedb@177.67.80.187): Ping timeout: 276 seconds [2021-03-18 03:54:24] → inode joined (~inode@unaffiliated/inode) [2021-03-18 04:28:10] → dave0 joined (~davezero@069.d.003.ncl.iprimus.net.au) [2021-03-18 04:54:38] ⇐ f-a quit (~f-a@151.34.157.165): Ping timeout: 245 seconds [2021-03-18 05:00:43] → f-a joined (~f-a@151.44.45.214) [2021-03-18 05:43:02] ⇐ f-a quit (~f-a@151.44.45.214): Quit: leaving [2021-03-18 06:27:20] → f-a joined (~f-a@151.44.45.214) [2021-03-18 06:53:55] ⇐ f-a quit (~f-a@151.44.45.214): Quit: leaving [2021-03-18 07:56:33] → tech_exorcist joined (txrcst@gateway/shell/hashbang/x-ipfcnqfykihefofq) [2021-03-18 08:04:32] ⇐ tech_exorcist quit (txrcst@gateway/shell/hashbang/x-ipfcnqfykihefofq): Quit: tech_exorcist [2021-03-18 08:04:45] → tech_exorcist joined (txrcst@gateway/shell/hashbang/x-wbrfczkofnuivuhw) [2021-03-18 08:48:52] ⇐ hosewiejacke quit (~hosewieja@i5C741581.versanet.de): Ping timeout: 276 seconds [2021-03-18 09:38:22] → hosewiejacke joined (~hosewieja@i5C741581.versanet.de) [2021-03-18 09:46:28] ⇐ dave0 quit (~davezero@069.d.003.ncl.iprimus.net.au): Quit: dave's not here [2021-03-18 10:56:06] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-18 11:00:12] ⇐ shmorgle quit (~patrick@gw.neurotica.com): Quit: [TalkSoup] via NEXTSPACE [2021-03-18 11:03:26] → shmorgle joined (~patrick@gw.neurotica.com) [2021-03-18 12:17:08] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Ping timeout: 256 seconds [2021-03-18 12:27:48] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-18 12:44:40] ⇐ gravicappa quit (~gravicapp@h109-187-17-216.dyn.bashtel.ru): Ping timeout: 265 seconds [2021-03-18 12:48:17] → gravicappa joined (~gravicapp@h109-187-17-216.dyn.bashtel.ru) [2021-03-18 13:22:05] https://ttm.sh/ut4.fs I'm really unsure about the way I'm handling changed? etc in this, I'm not sure what the better way would be. Currently I'm storing a value and if it's changed as two cells with the change flag after the value, which is fine except I have one value that takes two cells itself and I have to put those in cells 0 and 2 with the change flag being in cell 1, which feels inelegent. [2021-03-18 13:22:29] I could put the change flag in cell 0, but then accessing the value would require using 1 cells + a bunch [2021-03-18 13:37:28] ⇐ hosewiejacke quit (~hosewieja@i5C741581.versanet.de): Ping timeout: 276 seconds [2021-03-18 13:42:05] one way could be to have the words like CHANGED? accept an additional parameter to indicate how many cells to skip from addr [2021-03-18 13:42:47] ie. : changed? ( addr -- flag ) 1 cells + @ ; -> : changed ( addr skip -- flag ) cells + @ ; [2021-03-18 13:43:43] (also 1 CELLS is the same as saying CELL) [2021-03-18 13:45:30] guessing you might end up wrapping it as : membercost-changed? membercost 1 changed? ; [2021-03-18 13:45:50] the additional parameter idea works [2021-03-18 13:45:57] thanks [2021-03-18 13:46:23] I have another question but it's not directly forth related and rather just rellated to working in a terminal so I'm not sure where is best to ask it [2021-03-18 13:46:26] otherwise have an array of changed-flags where each variable in question is associated with a particular index [2021-03-18 13:48:27] it doesn't hurt to ask off-topic stuff, someone here might be able to help [2021-03-18 13:50:55] is it possible to detect a key being pressed rather than typed, ignoring key repeat etc, in an application that runs in a terminal? Like, the physical key press [2021-03-18 13:54:17] do you want to get the event without any noticable output to the tty? [2021-03-18 13:54:37] at least before you've decided what to do with it frist [2021-03-18 13:55:54] i'm guessing you want to put the tty into raw mode [2021-03-18 13:56:00] raw mode? [2021-03-18 13:56:56] https://en.wikipedia.org/wiki/Terminal_mode [2021-03-18 13:57:44] ah ok [2021-03-18 13:58:46] so if the terminal is in raw mode, I get the keystrokes directly rather than them going through the terminal's line stuff, but I think then I still get key repeat? because it's done in the OS before it gets to the terminal I think. don't know [2021-03-18 13:59:42] wait, am I in raw mode already if I can get single keystrokes? I'm already doing that [2021-03-18 13:59:57] or is it not doing single keystrokes and the program is just eating the first character of the cooked input [2021-03-18 14:01:54] i don't see anything in your shared code to change your terminal settings, so i'm guessing you're in cooked mode [2021-03-18 14:03:38] yeah the only terminal setting I'm changing is hiding the cursor [2021-03-18 14:03:53] I'm not sure how to enter raw mode. Everything I can see seems to be making use of a C library [2021-03-18 14:04:44] you'll probably need to make the calls to tcgetattr and tcsetattr through ffi yourself [2021-03-18 14:04:55] i don't think gforth has any bindings for termios stuff [2021-03-18 14:07:43] oh ok [2021-03-18 14:07:51] time to learn how, and if, ffi works [2021-03-18 14:16:45] actually the manual says stdin already should be in raw mode [2021-03-18 14:17:06] https://gforth.org/manual/General-files.html [2021-03-18 14:17:26] key-file ... "Read one character n from wfileid. This word disables buffering for wfileid. If you want to read characters from a terminal in non-canonical (raw) mode, you have to put the terminal in non-canonical mode yourself (using the C interface); the exception is stdin: Gforth automatically puts it into non-canonical mode." [2021-03-18 14:20:49] huh [2021-03-18 14:21:07] that makes sense I guess, given that I can read single keystrokes in from stdin [2021-03-18 14:21:30] so that only leaves the question of key repeat which I might need to filter out manually [2021-03-18 14:27:45] or just make things large enough for any cell size/ [2021-03-18 14:28:15] nihilazo: yes it is, you would use the poll call [2021-03-18 14:28:18] and pollfd's [2021-03-18 14:28:53] poll call? (sorry I know nothing about terminals) [2021-03-18 14:28:54] i have some example code you might like to see in my ucurses [2021-03-18 14:28:55] hang on [2021-03-18 14:29:03] poll is a linux system call [2021-03-18 14:29:34] https://github.com/mark4th/uCurses/blob/master/src/keys.c [2021-03-18 14:29:42] thats got some stuff in there you might like to study [2021-03-18 14:29:48] thanks [2021-03-18 14:30:05] key() returns a key, keys() returns how many are available for read i think [2021-03-18 14:30:46] the call to poll in keys() is non blocking here [2021-03-18 14:31:10] read_key will read a complete key seauence because some keys return more than one byte [2021-03-18 14:31:17] like cursor keys and function keys etc [2021-03-18 14:31:22] ok [2021-03-18 14:36:22] I'm not sure if I could call poll from gforth, hmm [2021-03-18 14:36:31] because it uses structs in arguments [2021-03-18 14:36:37] which from the docs doesn't seem to be supported [2021-03-18 14:40:04] I guess maybe I'd have to write C to interface to the C interface in gforth? [2021-03-18 14:42:27] you can look at how i did it in x4 sources too. src/kernel/io.f i believe at the top [2021-03-18 14:42:47] i just manually created a flat pollfd structure which is just a few bytes in size [2021-03-18 14:42:55] and then called the sys poll systemcall [2021-03-18 14:47:01] ok [2021-03-18 14:47:14] and could using poll mean I don't get key repeats? [2021-03-18 14:47:22] this is literally just to stop people cheeseing my game lol [2021-03-18 14:48:19] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Ping timeout: 276 seconds [2021-03-18 15:34:28] → hosewiejacke joined (~hosewieja@i5C741581.versanet.de) [2021-03-18 15:36:54] ⇐ jess quit (jess@freenode/staff/jess): Quit: update innit [2021-03-18 15:38:25] → j joined (jess@freenode/staff/jess) [2021-03-18 15:41:16] * j → jess [2021-03-18 15:53:43] ⇐ hosewiejacke quit (~hosewieja@i5C741581.versanet.de): Quit: Leaving [2021-03-18 15:58:05] ⇐ gravicappa quit (~gravicapp@h109-187-17-216.dyn.bashtel.ru): Ping timeout: 256 seconds [2021-03-18 16:14:11] ⇐ Guest68981 quit (~micro@a9.lence.net): Quit: leaving [2021-03-18 16:14:42] → rprimus joined (~micro@unaffiliated/micro) [2021-03-18 17:19:02] → f-a joined (~f-a@151.36.127.192) [2021-03-18 17:31:12] ⇐ Gromboli quit (~Gromboli@pool-72-88-91-89.bflony.fios.verizon.net): Read error: Connection reset by peer [2021-03-18 17:31:33] → Gromboli joined (~Gromboli@pool-72-88-91-89.bflony.fios.verizon.net) [2021-03-18 17:31:54] ⇐ veltas quit (~veltas@104.236.34.215): Ping timeout: 246 seconds [2021-03-18 17:32:01] → veltas joined (~veltas@104.236.34.215) [2021-03-18 17:33:44] ⇐ f-a quit (~f-a@151.36.127.192): Ping timeout: 240 seconds [2021-03-18 17:35:55] → [1]MrMobius joined (~MrMobius@208.58.206.154) [2021-03-18 17:37:31] → f-a joined (~f-a@151.36.127.192) [2021-03-18 17:38:21] ⇐ MrMobius quit (~MrMobius@208.58.206.154): Ping timeout: 264 seconds [2021-03-18 17:38:22] * [1]MrMobius → MrMobius [2021-03-18 17:43:51] → Zarutian_HTC joined (~bj@85-220-19-213.dsl.dynamic.simnet.is) [2021-03-18 18:37:58] ⇐ Zarutian_HTC quit (~bj@85-220-19-213.dsl.dynamic.simnet.is): Ping timeout: 260 seconds [2021-03-18 18:50:31] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-18 19:02:32] → dave0 joined (~davezero@069.d.003.ncl.iprimus.net.au) [2021-03-18 19:12:24] ⇐ tech_exorcist quit (txrcst@gateway/shell/hashbang/x-wbrfczkofnuivuhw): Quit: tech_exorcist [2021-03-18 19:44:06] nihilazo: Key repeat is done by the keyboard [2021-03-18 19:44:21] With P/S2 keyboards at least [2021-03-18 19:44:28] It's done at a very low level [2021-03-18 19:44:54] Regardless, your terminal can't distinguish repeat keys, and doesn't get info about key releases [2021-03-18 20:50:53] ⇐ f-a quit (~f-a@151.36.127.192): Read error: Connection reset by peer [2021-03-18 20:51:45] i think there might be an ioctl to disable it [2021-03-18 20:51:50] or configure it [2021-03-18 20:55:22] → f-a joined (~f-a@151.82.66.167) [2021-03-18 20:55:31] ⇐ f-a quit (~f-a@151.82.66.167): Client Quit [2021-03-18 21:10:45] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Remote host closed the connection [2021-03-18 21:11:05] → jedb joined (~jedb@185.204.1.181) [2021-03-18 21:11:14] ⇐ jedb quit (~jedb@185.204.1.181): Remote host closed the connection [2021-03-18 21:11:27] → jedb joined (~jedb@185.204.1.181) [2021-03-18 21:14:49] → lispmacs joined (~user@fsf/member/lispmacs) [2021-03-18 21:25:21] got the menu bar listing all the pulldown menus now and i can see which items are disabled and what the current item is etc [2021-03-18 21:25:29] but the pulldowns themselves dont work yet [2021-03-18 21:25:46] i can enable and disable menu bar entries via string match [2021-03-18 21:26:33] so basically once i got the pulldown menus themselves displaying right i need to do some way to load the UI layout from a config file.... and then im basically done with this [2021-03-18 21:41:03] → batflu joined (~stallman@static.252.55.21.65.clients.your-server.de) [2021-03-18 21:41:04] hi [2021-03-18 21:41:13] oh, i found another channel that doesn't require signup [2021-03-18 21:41:19] i can now speak in two channels [2021-03-18 21:41:57] what's the other one [2021-03-18 21:43:21] #freenode [2021-03-18 21:51:36] nice [2021-03-18 21:52:18] do they have anything good to say over there? [2021-03-18 21:52:56] lol [2021-03-18 22:37:20] → boru` joined (~boru@unaffiliated/boru) [2021-03-18 22:37:22] ⇐ boru quit (~boru@unaffiliated/boru): Disconnected by services [2021-03-18 22:37:25] * boru` → boru [2021-03-18 22:47:16] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-18 23:26:50] ⇐ sts-q quit (~sts-q@212.53.219.194): Ping timeout: 260 seconds [2021-03-18 23:31:25] → sts-q joined (~sts-q@212.53.219.143) [2021-03-18 23:34:46] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Read error: Connection reset by peer [2021-03-18 23:35:01] → Zarutian_HTC joined (~bj@173-133-17-89.fiber.hringdu.is) [2021-03-18 23:53:00] ⇐ Zarutian_HTC quit (~bj@173-133-17-89.fiber.hringdu.is): Quit: Bye