00:00:00 --- log: started retro/12.10.17 03:01:40 --- join: ncv (~quassel@79.114.104.81) joined #retro 03:01:40 --- quit: ncv (Changing host) 03:01:40 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 04:30:50 --- quit: ncv (Ping timeout: 256 seconds) 04:40:42 https://gist.github.com/3905080 07:13:33 --- join: tangentstorm (~michal@108-218-151-22.lightspeed.rcsntx.sbcglobal.net) joined #retro 07:15:19 (matching) appears not to be defined. 07:15:29 apart from that, it looks really cool 07:15:34 hi tangentstorm 07:16:34 heya 07:16:41 what looks cool? 07:16:59 https://gist.github.com/3905080 07:17:29 crc is working on integrating keybinding with the help system 07:17:51 cool :) 07:26:36 I was having it use a struct to store the prefix data in my approach: https://gist.github.com/3895813 07:27:57 but I have to admit crc's way of using the dictionary is less complicated 07:28:15 I wonder if we should just use the dictionary for all objects? 07:29:27 anyway, the cool thing is that he uses the prefix "key:" and whatever is after that is the key it searches for. 07:30:33 hmm. you can't do a colon-define for something containing a space. however "key: " header would probably do the trick. 07:36:31 : key:_ "User pressed space" puts ; @last d->name 4 + 32 swap ! 07:36:35 does the trick 07:38:27 this approach is similar to what we used for editor.rx 07:41:14 the main difference is that this time we are allowing the interpreter to continue without interruption unless someone hits the prefix. 07:46:44 interesting, ctrl-i does not behave as prefix despite being mapped to ascii character 9 07:48:28 wait, apparently I was wrong. it does. 07:55:54 --- join: kumul (~kumul@173.215.130.73) joined #retro 09:45:08 docl: this could be useful: 09:45:09 : bindTo: ( quote "character" - ) getc prefix:key [ 4 + ! ] sip dup find [ nip !d->xt ] [ drop header @last !d->xt &.word reclass ] if ; 09:45:54 takes a quote, parses for a char (including space), creates a new header if not existing, or updates the existing one if it's already there 09:46:08 so: [ bye ] bindTo: 09:46:28 would generate a header key: which would work with the dictionary based lookups 09:50:29 wonderful :) 10:05:43 --- join: ncv (~quassel@79.114.104.81) joined #retro 10:05:43 --- quit: ncv (Changing host) 10:05:43 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 10:40:49 --- quit: crc (Ping timeout: 260 seconds) 10:42:17 --- join: crc (~crc@li125-93.members.linode.com) joined #retro 10:45:35 I wonder if using : as a prefix would be useful. 10:46:04 the space keybinding could do the function that : normally does 10:47:57 well, any single character word could work this way. the prefixes system already kind of does that. 10:49:35 hmm. you could have a set of prefixes that open a particular chain full of key: bindings when used. 11:05:48 docl: you know you can type all 32 of the first ascii characters with the control key, right? 11:17:10 tangentstorm: I just realized that :) 11:22:06 if we're running in a terminal, we can also get at the f1-f12 keys through various escape-code mechanisms 11:22:31 otherwise we need an actual keyboard device 11:57:24 docl: https://gist.github.com/3907395 for a third approach 14:02:35 --- quit: ncv (Ping timeout: 246 seconds) 14:17:37 oh I get it. it adds the character number to the prefix:TABLE xt and uses that. 14:21:05 --- join: arescorpio (~arescorpi@222-206-17-190.fibertel.com.ar) joined #retro 14:21:17 That's powerful. We could set up as many 256-cell tables as we want, in case we want to shift modes. 14:45:22 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 15:34:39 --- quit: ncv (Ping timeout: 264 seconds) 15:38:07 docl: yes, and less dictionary pollution 15:38:38 crc , docl : at that point you can just drop the whole notion of prefixes and just call it a keymap 15:39:10 just have the default code stand for "add this character to the input buffer" 15:46:38 --- join: impomatic (~digital_w@105.19.112.87.dyn.plus.net) joined #retro 15:55:34 --- quit: arescorpio (Read error: Connection reset by peer) 15:57:44 ahh, so that's what a keymap is 16:09:05 it's what it is in emacs anyway :) 16:09:32 then if you want a prefix, you just have the prefix evaluate the next character in a different keymap 17:55:43 nice. 19:32:38 --- join: arescorpio (~arescorpi@222-206-17-190.fibertel.com.ar) joined #retro 21:45:12 --- quit: kumul (Quit: WeeChat 0.3.9) 21:48:37 --- quit: arescorpio (Read error: Connection reset by peer) 22:28:20 --- join: ncv (~quassel@unaffiliated/neceve) joined #retro 22:42:55 --- quit: impomatic (Quit: http://BASICcomic.com) 23:59:59 --- log: ended retro/12.10.17