Welcome to MUGS ⚄♠♞🏹 (Multi-User Gaming Services)! | github.com/Raku-MUGS | v0.1.4 has been released! (github.com/Raku-MUGS/MUGS/blob/mai...v0.1.4.md) | This channel is logged for historical purposes; logs at irclogs.raku.org/mugs/index.html Set by japhb on 3 March 2024. |
|||
Geth | Terminal-QuickCharts/master: 7 commits pushed by (Geoffrey Broadwell)++
|
02:05 | |
japhb | Xliff: T-QC 0.0.2 is for you. :-) | 02:06 | |
Xliff | :) | 03:04 | |
japhb: I'm trying to use hbar-chart with Terminal::Print, and I'm still seeing nothing on the screen. The examples work though. | 05:09 | ||
I'm trying to do T.current-grid.set-span($r, $c, $hbar.head, $color) and nothing is showing up. Am I doing this right? | 05:10 | ||
japhb | Xliff: Can you paste your code somewhere? I'm also still trying to figure out what you're actually trying to do and getting confused by it. | 05:27 | |
Xliff | LOL. One sec. | 05:47 | |
gist.github.com/Xliff/8e30d56b753d...90887a5763 | 05:49 | ||
japhb | Xliff: OK, I need to understand your modality. Are you trying to create a full-screen TUI interface on the "alternate screen", like vim or irssi? Or are you trying to output this onto the normal screen like docker or `cro run`? | 06:04 | |
Also, I am still bisecting the T-W lockup. I'm having to do completely fresh builds every time to rule out confounding variables | 06:05 | ||
Xliff | OK. No. The source I showed you abandoned the Terminal::Widgets approach for a pure Terminal::Print one. | 06:10 | |
Once I'm familiar with the underlining T::P, I'll go back to T::W | |||
So all I am trying to do is to print a horizontal bar chart at a given row. The label starts at C=0 and the chart should be printed at C=32 | 06:11 | ||
japhb | Xliff: Right, but the critical bit is *are you trying to make a full-screen app*? | 06:13 | |
Xliff | I'm using T.current-grid, so I guess so. | 06:18 | |
japhb | Is that what you *want* to create? I guess I'm asking what your end goal is, so I can help guide you there. :-) | 06:19 | |
Xliff | Y'know.... it would be nice if you could do a distributed git-bisect, wouldn't it? | 06:20 | |
Yeah. Clear the screen. Show the chart, Restore the screen. | |||
japhb | If it's just "I'm learning APIs" that's one thing. If it's "I'm creating a roguelike" that's a complete other thing. ;-) | ||
Xliff | More the former than the later. | ||
I'm a bit far away from that. | 06:21 | ||
japhb | AH! OK, now we're getting somewhere. | ||
Also, totally agree with you about distributed git-bisect. :-P | |||
Xliff | The ultimate goal is to have the Progress lines printed one per row for each detected thread. Each progress bar tracking time taken to perform a task. | ||
japhb | OK, so you are trying to understand how the APIs work with something that seems like a basic concept, drawing a progress bar? | 06:22 | |
Oh, wait, I see. | |||
Threads detected in *what*? | |||
Xliff | Your system. | ||
Threads... cores... whichever you prefer. | |||
japhb | The whole thing? You realize there's like 1000 threads going at any given moment, right? | 06:23 | |
Xliff | Logical cores, then. | ||
Some camps call those threads, now. | |||
It's confusing... | |||
japhb | OK, so you're creating a system monitor for something that chews CPU? | 06:24 | |
Xliff | Something like that. | ||
japhb | Yay, I'm getting closer to understanding! :-D | ||
Xliff | lol | ||
japhb | Are the threads that you want to look at within the same Raku process that is doing the monitoring? | 06:25 | |
*Rakudo process | |||
Xliff | Yes. | ||
japhb | \o/ | ||
Xliff | 🤣 | ||
Is't communication at 2:30 in the morning, grand? | |||
japhb | OK, I understand *so much better* now. | ||
It is indeed! | 06:26 | ||
All right, so you've got a Rakudo process that runs a number of worker threads, and you want to show how those workers progress towards their goals? | 06:27 | ||
Xliff | Yep | ||
japhb | Man, I had *such* the wrong idea before of what you were trying to do. | ||
Xliff | So... Full screen T::P, right? | ||
Yeah... that might have something to do with my lack of caffine | 06:28 | ||
japhb | Most likely, yeah. Unless you're doing something like the docker CLI does where it is scrolling up completed work tasks and showing progress bars for the incomplete ones, I suppose. | ||
Xliff | Nah. | 06:29 | |
Clear screen. Print shifty bars. Restore screen | |||
japhb | "Pffft. Who needs caffeine?" Chorus: "WE DO!" | ||
Xliff | My cup sayeth: "Do not fsck with me without bringing good coffee!' | ||
japhb | OK, can you give me like a day to whip up a demo for you? | ||
Do not annoy Happy Fun Cup. | 06:30 | ||
Xliff | No. Problem. I'm so grateful to you! | ||
But do you bounce on Happy Fun Balls? | |||
japhb | Not if you value your legs. Happy Fun Ball is not safe for children under 75. | ||
Xliff | Can you at least give me a hit with what's wrong with the sample code in the gist? | ||
Pppfft. I'm a Happy Fun Ball Whisperer. I risk my life for fun and profit... | 06:31 | ||
s/hit/hint/ | 06:32 | ||
japhb | :-D | 06:33 | |
Your call to hbar-chart isn't quite right. I'm thinking more: my @b = hbar-chart([$!value], min => 0, max => 100, style => { max-width => 40 }); | 06:35 | ||
Then @b is your list of chart lines, and as you guessed, you'll want @b.head as the text to draw | |||
Xliff | $!value.Array should do the same thing as [$!value] | 06:36 | |
japhb | :shrug: | 06:38 | |
In any case, 'default' is not a color known to Terminal::ANSIColor | |||
But since you just want the default color, just skip setting it. :-) | |||
(The default being 'no color commands', thus allowing you to use .set-span to control the color) | 06:40 | ||
Xliff | Um. Do I need to "print T.current-grid" somewhere? | 06:43 | |
japhb | Yes, because you are using .set-span instead of .print | 06:44 | |
The former is used when you want to draw a bunch of things -- like, say, 20 progress bars -- before updating the screen all at once, so as not to show the user partial changes. | 06:45 | ||
If you want to have the progress bars all individually update asynchronously, you can just .print each span (which will do the equivalent of setting the span *and* printing the output) | 06:46 | ||
I think my capacity for awake is fading. I need to call it a night and pick this back up tomorrow. | 06:49 | ||
Xliff | OK. I have output. I think that's a good place to call it. | 06:53 | |
Thanks for the help! | |||
hahahaha! YATA! | 06:56 | ||
Xliff kicks himself for reversing X and Y. | |||
08:06
wayland76 joined
14:29
wayland76 left,
wayland joined
|
|||
japhb | OK, now I'm finally getting somewhere. With Terminal::Widgets at HEAD, along with all key dependencies, the T-W examples work fine on 2025.03, and lock up reliably on 2025.04. | 20:38 | |
Now to figure out what broke between them, wheee | |||
Xliff | Nice work! | 20:54 | |
How long have you been at this? | |||
Let me know if you want me to confirm anything or run checks on my end. | 20:55 | ||
japhb | Will do. And I'd say so far maybe 12 hours? | 21:11 | |
Geth | Terminal-Widgets: patrickbkr++ created pull request #27: Fix printing duospaced text |
21:30 | |
Terminal-Widgets/main: 70f3e05a2e | (Patrick Böker)++ | lib/Terminal/Widgets/Widget.rakumod Fix printing duospaced text |
21:55 | ||
Terminal-Widgets/main: 49dae6d4b2 | (Geoffrey Broadwell)++ (committed using GitHub Web editor) | lib/Terminal/Widgets/Widget.rakumod Merge pull request #27 from patrickbkr/patrickbkr-fix-printing-duospaced-text Fix printing duospaced text |
|||
japhb | Merged, thank you patrickb++ | 21:56 | |
Any changes you need to make in #20-24 before I start going through them? | 21:58 | ||
patrickb | I pushed the respective changes a few seconds ago | 22:00 | |
I just noticed a completely unrelated bug in the tree view PR, but that shouldn't stop you from looking at it. I'll deal with that bug. | 22:02 | ||
(The TreeView has a bad interaction with word-wrapping.) | |||
japhb | OK, fair enough. | 22:04 | |
I see #24 has to go before #22 ... Any other transpositions, or is the commit order 20, 21, 24, 22? | 22:07 | ||
patrickb | 21 can go first | 22:19 | |
japhb | OK, 21 20, 24, 22? | 22:21 | |
patrickb | But then it doesn't really matter. 20 and 21 are just fixes I pulled out of the huge RichText PR. | ||
Yes. | |||
japhb | OK, thank you! | ||
patrickb | The TreeView bug I hinted at above is now fixed. (Was actually 3 bugs, all gone.) Two commits in the RichText PR and one in the TreeView PR. | 23:28 | |
Xliff | patrickb++ | ||
japhb | Good on ya! | 23:52 |