|
🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
| japhb | SmokeMachine: I don't use those particular modules myself, but generally if you want to get individual keypresses, you have to enter "raw" (character-oriented and unmodified) terminal mode. What you're seeing is the result of "cooked" (line-oriented and filtered) mode. | 00:13 | |
| I would have assumed that the modules would do that for you, but :shrug: | 00:14 | ||
| Voldenet | fwiw on linux just `use Terminal::ReadKey; react whenever key-pressed() { given .fc { done when "q"; .uniname.say }}` works | 00:26 | |
|
00:29
Aedil left
02:10
oodani left
02:16
oodani joined
02:36
Romanson joined
02:50
kylese left
02:51
kylese joined
03:15
kylese left,
kylese joined
04:11
lichtkind__ joined
04:14
lichtkind_ left
04:32
stanrifkin_ joined
04:33
wayland joined
04:34
wayland76 left,
stanrifkin left
05:54
Aedil joined
07:27
lizmat joined
07:34
soverysour joined
07:49
lizmat left
08:16
Romanson left
09:13
librasteve_ joined
09:16
lizmat joined
09:21
lizmat left
10:58
Sgeo left
11:23
librasteve_ left
|
|||
| SmokeMachine | I found this: stackoverflow.com/questions/726544...-a-program | 11:54 | |
| I tried using unbuffer, but even using `unbuffer -p` it did not print the presses, but waited to enter... :( | 12:01 | ||
|
12:26
lizmat joined
13:21
deoac joined
|
|||
| timo | that's strange, Terminal::ReadKey does already import Term::termios in order to set the terminal to unbuffered | 13:44 | |
| oh | 13:46 | ||
| Term::termios does have a little C helper that grabs the available constants from your system's headers, but it uses the same struct for all operating systems | 13:47 | ||
| compare with patrickb's Terminal::API which has different struct definitions for different OSes: git.sr.ht/~patrickb/Terminal-API/t...PI.rakumod | 13:49 | ||
| there was actually a crashbug in Terminal::LineEditor where attempting to use it on macos it would corrupt the heap by having the termios functions to read the terminal state write to a struct that was allocated too small to hold what the C function was writing | 13:50 | ||
|
13:52
deoac left
|
|||
| timo | feels like Term::Terrmios wants an issue created for it, or Terminal::ReadKey wants to switch to a different module to makeraw the terminal. there's actually a module patrickb made that's got only the makeraw functionality in it: git.sr.ht/~patrickb/Terminal-MakeR...aw.rakumod | 13:54 | |
| patrickb | makeraw is kind of the predecessor of terminal API. I recommend to only use the later. | 14:20 | |
| timo | sounds like something nice to have in the readme ;) | 14:46 | |
| also i wonder if something's already tracking that raku.land isn't showing the readme | |||
|
15:35
Guest70 joined
15:36
Guest70 left
|
|||
| timo | i missed that we already have a quote from jn that exposing libuv's "makeraw" thing with a syscall would be fine | 15:57 | |
|
16:18
johnjay left
|
|||
| timo | one benefit of a moarvm-native "make terminal raw" op would be that getting restoring the terminal with atexit working would probably be more reliable than trying that with just nativecall? for situations where something exits the process without allowing us to run END phasers and such | 16:37 | |
| that reminds me, I wanted to investigate what kind of stuff we could possibly do for reacting to a segfault. there's got to be a big subset of situations where we can be relatively graceful, right? | 16:38 | ||
|
16:59
Aedil left
17:03
Aedil joined
|
|||
| SmokeMachine | If anyone is interested, here how it’s going: github.com/FCO/App-ByWord | 18:11 | |
|
18:18
librasteve_ joined
|
|||
| librasteve_ | notable6: weekly | 18:19 | |
| notable6 | librasteve_, 4 notes: gist.github.com/23a730137f98f6bc38...7c1c74bd93 | ||
| Voldenet | SmokeMachine: cool, maybe it could handle sigusr1 and sigusr2 for speed changes and sigtstp and sigcont for reading control | 18:30 | |
| (play pause) | |||
| librasteve_ | notable6: weekly reset | 18:31 | |
| notable6 | librasteve_, Moved existing notes to “weekly_2026-02-01T18:31:38Z” | ||
| Voldenet | not the best ux, but a working one and rather easy to implement | 18:32 | |
| contrary to kbd one | |||
| SmokeMachine | Voldenet: sĂł, would the user call `kill` to change speed? | 18:35 | |
| Voldenet | …yes :D | ||
| It may seem weird, but some unix tools do this (dd, i think?) | |||
| SmokeMachine | But while you are writing the command, you will lose a big chunk of the text, no? | 18:36 | |
| Voldenet | hm, not necessarily, if you're presenting then you could bind buttons to execute commands | 18:37 | |
| and you could even interpret negative speed as going backwards | |||
| it would work well for bluetooth page turners | 18:38 | ||
| also, signals supply can be converted into separate `supply whenever` block, so it'd be easier to replace one source of signals to other | 18:40 | ||
| SmokeMachine | Do you think that would be useful for presentations? | ||
| Voldenet | maybe if you used it as a prompter | 18:41 | |
|
18:46
deoac joined
|
|||
| [Coke] is reminded to keep his mouth shut when working on new modules. | 18:49 | ||
| Looks nifty, SmokeMachine. | 18:50 | ||
| timo | Voldenet: i think I saw somewhere that USR1 and USR2 are used internally by pthreads | 18:52 | |
| [Coke]: no! tell us all early and often about new modules you're working on! | |||
| SmokeMachine | [Coke]: were you working on something like that? I know you have asked about something like that… but I didn’t know you was going to make it… I’m very sorry… | 18:54 | |
| [Coke] | eh. | 18:55 | |
| I was blocked on getting some docs from #mugs, which are now in progress, so that happened, anyway. | |||
| I had a local git repo, hadn't pushed anything yet. | |||
| don't be sorry | 18:56 | ||
| SmokeMachine | I can delete mine if you prefere… | ||
| [Coke] | why would you do that? that's crazy. | ||
| I'll just use yours and go find something else to hack on. no worries | 18:57 | ||
| left you a feature request. | |||
| SmokeMachine | Or you could help me on this one | ||
| timo | something something ants etc etc | 18:58 | |
|
19:11
Sgeo joined
|
|||
| Voldenet | timo: that's true for very old implementation of pthreads actually, modern ones don't use sigusr1 usually | 19:19 | |
| …I hope, because I've been using these signals everywhere :P | |||
| timo | cool | 19:25 | |
|
19:29
stanrifkin_ left
19:30
oodani left
19:39
oodani joined
19:50
eseyman left
19:52
manu_ joined,
manu_ is now known as eseyman
19:57
Guest96 joined
20:32
merp joined
21:03
sorenson joined
21:26
johnjay joined
21:33
Aedil left
21:58
wayland left
22:28
soverysour left
22:39
Guest96 left
23:30
oodani left
23:32
oodani joined
|
|||