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.
japhb Might have found a workaround. Trying it against Rakudo HEAD now ... 00:56
Geth Terminal-Widgets/main: 66121cb6ff | (Geoffrey Broadwell)++ | lib/Terminal/Widgets/StandardWidgetBuilder.rakumod
Work around change in object hash semantics

Object hash parameterization changed in Rakudo 2025.03-27-g8f8b95866f . This works around that change, and should work both before and after.
01:47
japhb Xliff: You should be able to pull T-W and be less frustrated now ^^ 01:48
lizmat: OOC, was that effect of the object hash change intentional? 01:55
Geth Terminal-Widgets/main: a594260252 | (Geoffrey Broadwell)++ | lib/Terminal/Widgets/Widget.rakumod
Greatly expand and clarify comments in draw-line-spans
05:36
Terminal-Widgets/main: 9d09d19b3c | (Geoffrey Broadwell)++ | lib/Terminal/Widgets/Widget.rakumod
Fix draw-line-spans bugs found by patrickb++

Also further improve clarity and comments while in that code.
japhb patrickb: The above two commits include your fixes from PR #21, so closed that one. 05:40
Need to be up early tomorrow, so will have to leave PR #20 review for later. 05:41
07:17 Xliff joined 07:53 wayland76 joined 07:55 wayland76 left
Xliff Think I found a bug. Ping me when you get this. I should be around. 08:03
08:06 wayland76 joined
japhb Xliff: Bug? 14:35
Xliff Well... oversight. 14:48
First off.. I ran into this gem... 14:49
diff --git a/lib/Terminal/Print/Grid.pm6 b/lib/Terminal/Print/Grid.pm6
index ae2a4c4..7766d59 100644
--- a/lib/Terminal/Print/Grid.pm6
+++ b/lib/Terminal/Print/Grid.pm6
@@ -117,7 +117,8 @@ method cell-string($x, $y) {
#| Return the escape string necessary to move to (x1, y) and output every cell (with color) on that row from x1..x2
method span-string($x1, $x2, $y) {
my $row = @!grid[$y];
- move-cursor($x1, $y) ~ $row[$x1..$x2].join.subst("\e\e[", "\e[0;", :g);
+ move-cursor($x1, $y) ~
+ $row[$x1..$x2].map({ $_ // '' }).join.subst("\e\e[", "\e[0;", :g);
}
And I'm wondering if that's the correct solve... because while that stopped Nil errors, I am getting weird behavior with my progress bar example. Gist incoming. 14:50
gist.github.com/Xliff/548e2177bc8c...ff503a7651 14:52
japhb You shouldn't end up with a case where a cell contains an undefined value ... that would usually only happened if you tried to access a location not actually on the grid. 14:57
For performance, T::P::Grid doesn't do coordinate clipping ... calling code should do that. 14:58
I have to be AFK for a bit, but I'll go over your gist when I get back.
Xliff kk 14:59
ab5tract Also, there should be no need to wrap the printing in a lock. That’s what the OO::Monitors dependency on T::P is for
japhb BAK 16:05
I agree with ab5tract, a T::P::Grid is already locked as a monitor, and this is relied on by lots of code in T::P itself and in other Terminal::* modules that depend on it. 16:06
The labels are so far over because you are doing `for $!lb-rendered`, which is treating the two-item array as a single item, which stringifies to a join of its members. 16:08
You can change that to `for $!lb-rendered.list` or `for @!lb-rendered` (changing the sigil on the member variable of course) 16:09
You don't need to `print T.current-grid`, since the draw methods in ProgressLine already print themselves. This is itself redundant, but also wasteful because in a full-screened terminal with the drawing area in the upper left, you're drawing mostly empty space on the right and bottom. 16:11
The reaction of the progress bars to MAX being changed seems slow because it's only happening at each bar's next cue'd time. 16:14
Changing `print T.current-grid;` in check-redraw-threads to `.head.set-value($v, :draw) for @threads;` will get them reacting much more in step. 16:15
Xliff ooh! 16:16
japhb There's still the inefficiency of treating every bar as its own hbar-chart, rather than treating the entire thing as a single chart with all of the progress bars in it, but that's a larger change with less effect than the above. 16:20
I commented on PR #20 as well, but for those not following that: 17:46
patrickb has pointed out that improvements to the role selection we have need either hackish workarounds or 6.e semantics. 17:48
(Sorry, where 'we' is 'people working on Terminal::Widgets')
Since 6.e roles can only be consumed by 6.e or later objects, that implies that we'll need to switch T-W *and any user code based on it* to `use 6.e.PREVIEW;` 17:49
Unless I hear any objections, I'll be going through and making those changes in T-W itself and the various examples. 17:50
patrickb This is limiting, but I believe an ok thing to do, since T-W is still pretty much beta-ware and 5.e is coming soon. 18:05
japhb Limiting in what way? Incompatibility with 6.d code? 18:13
Added an additional question to PR #20 18:33
patrickb Incompatibility with older Rakudos mostly. 21:51
Answered
On a different note, I just now finally got PTYs working on Windows. \o/ 21:53
It'll be more work to finish up all the loose ends, but the difficult problems are now all tackled. (I hope I don't regret saying this...) 21:54
japhb Yeah, that was pretty much jinxing yourself. :-P 22:26
The PR #20 conversation continues. :-D 22:28
23:00 wayland76 left