| [Coke] | sjn: how would I attribute cleanly if I made a bunch of stickers of those and gave them away at a con? (have the folks at the table have a small placard out or something?) | 00:19 | |
| sjn | [Coke]: no worries about that. just tell them where the originals are, and if you have some improvements to them, please share them :-) | 00:55 | |
| Some of the stickers may benefit from an update, though I think raku-for-humans-1.2.1.png should be fine to use (I'm quite happy with it) | 00:57 | ||
| The "covers-Raku" sticker is meant for putting on Perl 6 books | 00:58 | ||
| [Coke]: give me a ping if you decide to use any of them, so we can give them a quick once-over to fix any issues :-) | 01:00 | ||
| [Coke] | sjn: you have case-colliding files in that repo | 01:16 | |
| under assets/fonts | 01:33 | ||
|
03:27
japhb left
03:28
japhb joined
|
|||
| sjn | [Coke]: fixed | 04:03 | |
| disbot2 | <melezhik.> So the issue happens even with single test run , it’s flaky , about 1-2 failures in 5 runs series , so definitely not due to system load like I thought at the beginning… | 04:47 | |
| <melezhik.> github.com/rakudo/rakudo/issues/6106 if someone would take a look I would appreciate it | 07:47 | ||
| <melezhik.> Added all the details | |||
|
10:19
david7832 joined
|
|||
| timo | instead of setting the output buffer to zero, try printing and immediately flushing instead | 10:36 | |
|
10:41
finanalyst joined
|
|||
| disbot2 | <melezhik.> timo: thanks, do you mean “instead of setting the output buffer” here ? github.com/melezhik/Sparrow6/blob/...kumod#L135 ? | 11:38 | |
|
11:39
david7832 left
|
|||
| disbot2 | <melezhik.> So, just after $*OUT.out-buffer = 0; github.com/melezhik/Sparrow6/blob/...kumod#L149 line ? | 11:57 | |
| <melezhik.> Wait a sec a I forgot to say that in Raku program the resulted outout also redirected to a file - github.com/melezhik/sparky/blob/24...unner#L362 , so maybe the issue is here ? Like where redirected to a file buffering is enabled again ? Or $*OUT.flush; should take care about that anyways ? | 12:00 | ||
| <melezhik.> $OUT.out-buffer = 0 -> $OUT.flush; meant that | 12:01 | ||
|
12:05
finanalyst left
|
|||
| disbot2 | <melezhik.> So could be that ? “The "Resource temporarily unavailable" (EAGAIN) error when redirecting stdout usually means the output buffer is full, and the program is trying to write faster than the file or pipe can accept data. It occurs frequently with Node.js or high-speed logging when non-blocking I/O is used, causing the write operation to fail.” | 12:06 | |
| <melezhik.> So we are taking about two probable causes … 1) Fast Producer/Slow Consumer: The program (e.g., node, php) generates data faster than the disk can write it, filling the 64k buffer. Solution: Use stdbuf to change the buffering behavior. For example, stdbuf -oL -eL command > file. 2) Non-Blocking I/O: The process is in non-blocking mode (O_NONBLOCK), so instead of waiting, the write fails. | 12:09 | ||
| <melezhik.> I wound if $.OUT.flush would be a fix ? | |||
| timo | i'm assuming that $*OUT.flush would block if the receiving side isn't ready to read | 12:10 | |
| disbot2 | <melezhik.> If Raku “say” is blocking or none blocking ? | ||
| timo | you'll have to check with strace how exactly it works with buffering and without, i don't know it by heart | ||
| disbot2 | <melezhik.> Then this is probably what we are looking for … blocking write | ||
| timo | the blocking or non-blocking isn't based on what "say" does but how the object you're calling it on is set up | 12:11 | |
| disbot2 | <melezhik.> Yeah. I will need to apply the patch and ask the user who has this issue check it works | ||
| <melezhik.> Or you mean file handler? | 12:12 | ||
| timo | handle, not handler, very big difference | ||
| what patch are you suggesting? | |||
| i was refering to the script you had in the very last comment on the issue that the output of qemu is passed through | 12:14 | ||
| disbot2 | <melezhik.> The one you did - add $.OUT.flush after github.com/melezhik/Sparrow6/blob/...kumod#L149 | ||
| <melezhik.> Ahhh . Ok | |||
| timo | i don't think the out-buffer of $*OUT and $*ERR in method !run-command-async is a good idea | 12:15 | |
| disbot2 | <melezhik.> However the exception happens inside main Raku program , not this script | ||
| <melezhik.> It’s been like that all the time . No issues so far . Why is that bad idea ? I want to automatically disable buffering as I want output comes from Sparrow without any delays and without any buffering | 12:17 | ||
| timo | i'm also not sure why you're still using :enc<utf8-c8> | ||
| disbot2 | <melezhik.> Cause it fixes malformed utf8 issue , at least it was the fix before I added this scripts sanitizer ( because I had another issue with segfault ) | 12:18 | |
| <melezhik.> Now don’t probably need it , but sanitizer only exist for one specific project and not part of Sparrow6 | 12:19 | ||
| <melezhik.> So I want keep utf8-c8 in sparrow to handle malformed utf8 symbols coming from external programs | 12:20 | ||
| timo | i'm also not sure if you should attempt to pass through the data from a program you're running mostly unchanged apart from trying to parse it as utf8 and encode it back to utf8 at the end | ||
| since your programs aren't guaranteed to output anything utf8-compatible in the first place | 12:21 | ||
| disbot2 | <melezhik.> What do you mean ? | ||
| timo | and if your program spits out ansi escape sequences, they can do whatever they want with the terminal you're running sparrow6 inside of | 12:22 | |
|
12:25
finanalyst joined
12:26
AlexDaniel joined
|
|||
| timo | if i were in your situation i would probably set encoding to latin1 on the way in and the way out, all you're doing is split into lines and put a timestamp in front of every line, right? | 12:27 | |
| decoding input as latin1 and encoding it back out as utf8 would make it look wrong | |||
| but latin1 on both sides should be fine | |||
| AlexDaniel | hey, just to be clear, I can't merge any of the whateverable PRs. I can review and approve but not merge | 12:28 | |
| disbot2 | <melezhik.> Ok, maybe I need to clarify 1) sparrow runs external program that produces some output with sometimes malformed utf8 symbols, if I don’t use utf8-c8 for reading stdout inside Raku I will get malformed utf8 exception 2) now there is issue - github.com/rakudo/rakudo/issues/6095 that results in random defaults after I added this utf8-c8 patch to my Sparrow code . And as a temporary fix I have to pass external program output through | 12:29 | |
| this one liner | raku -e ' loop { ($*OUT,$*ERR).map: {.out-buffer = 0}; my $buf = $*IN.read(512); last unless $buf.elems; print $buf.decode("utf8-c8", :!strict) } , I thought we were clear on that when discussing the issue . Once the issue is fixed in Rakudo I will remove this one liner sanitizer . But I still need ut8-c8 encoding to handle malformed utf8 symbols from external program ( qemu ) I don’t control | |||
| <melezhik.> Random defaults -> random segfaults | 12:31 | ||
| <melezhik.> The main “magic” of sanitizer is that read stdin in bytes mode, convert broken utf8 symbols into default utf8 symbol ( because of utf8-c8) and sanitize it in such way, I don’t know how it works but since that patch users stopped complaining on segfaults as they used to do before | 12:35 | ||
| <melezhik.> I can’t to that in Sparrow as it handles external program output in text mode ( proc.stdout.lines) in react block | 12:36 | ||
| <melezhik.> to that -> do that | |||
| <melezhik.> “<timo> if i were in your situation i would probably set encoding to latin1 on the way in and the way out, all you're doing is split into lines and put a timestamp in front of every line, right?” Also I am not sure why you are suggesting to use Latin1 encoding here if there is utf8-c8 encoding which is designed exactly for such a situation - to handle all malformed utf8 symbols if any … ? | 12:39 | ||
| <melezhik.> I don’t decide in Latin1 | 12:47 | ||
| <melezhik.> Decode | |||
| timo | sorry i was AFK for a bit there | 12:48 | |
| latin1 has the "special" property that every possible byte value is valid | 12:49 | ||
| but you can still use .lines because it'll be Str rather than Blob or Buf which is what you get when you use :!enc | 12:50 | ||
| also, there should be a way to get chomped lines already instead of having to do it by hand inside the "whenever" | 12:51 | ||