| [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 | ||
| but the important part is that you have to write the text you decoded as latin1 back to bytes using the latin1 encoding, because otherwise you get strange results for anything outside of the first 127 character values | 12:52 | ||
| so just "say" won't be the right tool for the job there, you will have to either create a Buf with the whole line and $*OUT.write it or switch between say and write and something for the newline at the end | 12:53 | ||
| but you'll never get an "invalid codepoint" or "invalid utf8" with latin1 because it has no concept of that at all | |||
| really, here it's just a hack to be able to conveniently use methods focused on lines rather than having to work with bytes | 12:54 | ||
| AlexDaniel | lizmat: ↑ a few messages up about whateverable PRs | 13:00 | |
|
13:09
unicodable6 left,
coverable6 left,
committable6 left,
sourceable6 left,
bloatable6 left,
greppable6 left,
quotable6 left,
linkable6 left,
notable6 left,
shareable6 left,
benchable6 left,
evalable6__ left,
nativecallable6 left,
tellable6 left,
releasable6__ left,
bisectable6 left
|
|||
| disbot2 | <melezhik.> Yes. I don’t want to work with bytes on Sparrow side, And I would like to use utf8-c8 , and it should not segfault when used in proc.stdout.lines . Of course I probably can handle things like you say in Latin1 but honestly it feels abit low levelish to me. Also standard ProcAsync rakudoc shows these react { whenever proc.stdout.lines } approach | 13:10 | |
|
13:12
bisectable6 joined,
unicodable6 joined,
quotable6 joined
13:13
notable6 joined,
nativecallable6 joined,
linkable6 joined
|
|||
| timo | remind me to write a proper issue for the raku docs about Proc::Async's :translate-nl arguments and the "traps" page about reading lines needs to point out that that exists, rather than claiming you can't get Proc::Async's .lines to split lines "correctly" | 13:13 | |
|
13:13
coverable6 joined
|
|||
| AlexDaniel | btw I think it's worth checking out the last usage of each bot and maybe disabling the ones that are not that useful, to minimize the rejoin spam :) | 13:13 | |
| timo | AFKBBL | ||
|
13:14
bloatable6 joined,
shareable6 joined,
greppable6 joined,
committable6 joined,
benchable6 joined,
releasable6 joined,
tellable6 joined,
evalable6 joined
13:15
sourceable6 joined
|
|||
| AlexDaniel | hmmmmm not seeing the new one so far 🤔 | 13:17 | |
| disbot2 | <melezhik.> Ok. Let’s put this problem aside , I guess I get you view, thank you. What your suggestion on this “ resource temporary unavailable” issue ? | 13:18 | |
| lizmat | .hug AlexDaniel | 13:19 | |
| indeed | |||
| AlexDaniel | hmm it has a wrong data mount for it | 13:20 | |
| I can just create it I guess | |||
| like this is simply unnecessary: github.com/Raku/whateverable/blob/...#L334-L335 | 13:21 | ||
| but we can leave it be, I'll just create it | |||
| lizmat: can you make a quick commit to rename the extension of the huggable bot? there was a small conflict between the two PRs | 13:27 | ||
| disbot2 | <melezhik.> One more thoughts “<timo> also, there should be a way to get chomped lines already instead of having to do it by hand inside the "whenever"” - I need react/whateverable because often sparrow runs long running / infinite external programs and I want to get output from them in realtime | ||
| AlexDaniel | that would make huggable work | ||
|
13:53
notable6 left,
committable6 left,
bloatable6 left,
linkable6 left,
releasable6 left,
evalable6 left,
shareable6 left,
tellable6 left,
quotable6 left,
nativecallable6 left,
sourceable6 left,
coverable6 left,
unicodable6 left,
greppable6 left,
bisectable6 left,
benchable6 left
13:56
unicodable6 joined,
tellable6 joined,
bloatable6 joined,
greppable6 joined,
nativecallable6 joined,
evalable6 joined,
coverable6 joined,
shareable6 joined
13:57
benchable6 joined,
releasable6 joined,
linkable6 joined
13:58
bisectable6 joined,
notable6 joined,
committable6 joined,
quotable6 joined,
sourceable6 joined
|
|||
| timo | i know you need react/whenever, I was saying I would expect Proc::Async to be able to do the chomping for you | 13:59 | |
|
13:59
bisectable6 left,
sourceable6 left,
evalable6 left,
coverable6 left,
nativecallable6 left,
quotable6 left,
tellable6 left,
notable6 left,
bloatable6 left,
shareable6 left,
unicodable6 left,
releasable6 left,
benchable6 left,
linkable6 left,
greppable6 left
|
|||
| timo | i think the proper solution to the "resource temporarily unavailable" thing should be to 1) not set .out-buffer to 0 and 2) after writing to the output, flush the output immediately, and see if that makes it work | 14:00 | |
|
14:02
linkable6 joined,
evalable6 joined,
releasable6 joined,
committable6__ joined,
tellable6 joined,
unicodable6 joined,
sourceable6 joined
14:03
quotable6 joined,
committable6 left,
notable6 joined,
coverable6 joined,
bloatable6 joined,
shareable6 joined
14:04
bisectable6 joined
|
|||
| disbot2 | <melezhik.> I got you. So to call $.OUT.flush after console-wo-prefix call inside react { whenever {} } block ? | 14:04 | |
|
14:04
greppable6 joined,
benchable6 joined,
nativecallable6 joined
|
|||
| timo | you could call it inside or outside, depends on what you prefer | 14:04 | |
|
14:05
patrickb left,
tellable6 left,
shareable6 left,
sourceable6 left,
notable6 left,
releasable6 left,
committable6__ left,
nativecallable6 left,
evalable6 left,
bloatable6 left,
greppable6 left,
quotable6 left,
unicodable6 left,
bisectable6 left,
benchable6 left,
coverable6 left,
linkable6 left
|
|||
| disbot2 | <melezhik.> I was thinking about after this line github.com/melezhik/Sparrow6/blob/...kumod#L149 cause this where exception happen | 14:07 | |
| <melezhik.> Basically to make write blocking rather then none blocking | |||
|
14:08
releasable6 joined,
benchable6 joined,
shareable6 joined,
committable6 joined
|
|||
| timo | if the flush goes into the console-wo-prefix method you don't have to put `unless self.silent-stdout` twice, or make it a block | 14:08 | |
|
14:09
notable6 joined,
linkable6 joined,
sourceable6 joined,
quotable6 joined,
bloatable6 joined,
bisectable6 joined,
unicodable6 joined
|
|||
| timo | `my @arr = $cmd.split(/\s+/);` this seems suspicious. it doesn't do anything about quoted items | 14:09 | |
|
14:09
nativecallable6 joined
14:10
greppable6 joined,
coverable6 joined,
tellable6 joined,
evalable6 joined
14:12
patrickb joined
|
|||
| disbot2 | <melezhik.> It’s ok . As content of $cmd is controlled by sparrow and it does not have quoted items | 14:22 | |
|
14:26
finanalyst left
|
|||
| timo | ok, but still you'll never be able to have one item in there that has a space inside it, it will always split into two elements | 14:29 | |
| there actually is something about .stdout and .lines but it's interrupted by a section about .print | 14:31 | ||
| disbot2 | <melezhik.> Sorry ? What do you mean ( your last statement ) | 14:32 | |
| AlexDaniel | folks it'd be really nice if raku.land/ explained how to install modules | ||
| disbot2 | <melezhik.> Also should I add $. OUT.flush before or after each “say” call ? | 14:33 | |
| timo | the "traps" page from the docs page | ||
| you should flush after writing. before writing doesn't make as much sense i think | 14:34 | ||
| disbot2 | <melezhik.> Ok . | ||
| <melezhik.> Btw. What about “traps” ? How does this relate to our topic ? | 14:36 | ||
| timo | unrelated to our topic | ||
| disbot2 | <melezhik.> Ok | 14:43 | |
| <melezhik.> Why btw do you suggest to remove setting .out-buffer to 0 ? | 14:44 | ||
| <melezhik.> Isn’t it serving the same purpose as $.OUT.flush ? | 14:45 | ||
|
15:05
finanalyst joined
|
|||
| timo | I'm thinking it's causing your problem of "resource temporarily unavailable" | 15:05 | |
| disbot2 | <melezhik.> Interesting … why it happens only on this single specific machine then ? And never happened before … | 15:13 | |
| timo | not sure. but are you sure that using utf8-c8 is really fine the way you're doing it now? | 15:18 | |
| disbot2 | <melezhik.> All I know it fixes segfault and it fixes malformed utf8 , that’s for sure . I am not against switch to latin1 I just need to know how to implement it considering the fact I use react whenever block now … | 15:35 | |
|
15:47
david7832 joined
15:55
david7832 left
15:56
david7832 joined
16:22
finanalyst left
|
|||