🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:28 cheer[m] joined 00:32 aborazmeh left 00:33 finanalyst left 00:43 Noisytoot joined 00:51 Altai-man joined 00:53 sena_kun left 01:14 Noisytoot left, Noisytoot joined 01:20 Sgeo left 01:22 Sgeo joined
timotimo committable6: releases my SetHash[Int()] $a .= new; $a{"99"}++ 01:47
committable6 timotimo, gist.github.com/fff0ec9bf93f60d348...06a9d9f68c 01:48
02:06 Manifest0 joined 02:08 guifa` left
rypervenche I was watching Damian's video on regexes. He refers to Raku's regex by "PSIX". What does that stand for? 02:13
timotimo "perl six"? 02:14
rypervenche Hahaha. Wow, I was thinking something with POSIX. Welp, I think I need more sleep. 02:15
timotimo perl six improved eXpressions 02:17
(just a wild guess)
02:21 lucasb left 02:32 Cabanossi left, Cabanossi joined 02:52 fooist is now known as Fooist, Fooist is now known as fooist 02:55 fooist is now known as juts 02:56 dogbert11 left, juts is now known as fooist
jdv79 fooist: that file is most likely speculative 02:59
it might be deprecated and/or superceded 03:00
that includes all ?3? p6*gz files there 03:02
03:03 tejr joined
fooist /join telegram-foss 03:12
sry
03:21 hungrydonkey joined 03:48 bdju joined 04:12 gnufr33dom joined 04:13 hungryd6 joined 04:17 hungrydonkey left, hungrydonkey joined 04:20 hungryd6 left 04:52 sena_kun joined 04:53 Altai-man left 04:57 skids left
xinming m: sub a { return \("a", "hello")}; my $t = a().clone; $t[0] = "b"; $t.raku.say; 05:02
camelia Cannot modify an immutable Str (a)
in block <unit> at <tmp> line 1
xinming sub a { my $x = "a"; return \($x, "hello")}; my $t = a(); $t[0] = "b"; $t.raku.say;
evalable6 \("b", "hello")
xinming The second version works fine. So, for the first version, how can we build a capture can be modified as wish? 05:03
m: sub a { return \($ = "a", "hello")}; my $t = a().clone; $t[0] = "b"; $t.raku.say;
camelia \("b", "hello")
xinming This version works too, But I don't want to add $ = to all capture args. 05:04
05:43 rindolf joined 05:56 timeless joined, bocaneri joined, stux|RC-- joined 06:05 tejr left
Geth doc: 8faec6b1b9 | stoned++ (committed using GitHub Web editor) | doc/Type/List.pod6
Uniformize examples' output (#3568)

And while here, if we would like an example to produce an output, we might as well call `say` :)
06:06
linkable6 Link: docs.raku.org/type/List 06:07
DOC#3568 [closed]: github.com/Raku/doc/pull/3568 Uniformize examples' output
Geth doc: be0a68318f | stoned++ (committed using GitHub Web editor) | doc/Type/List.pod6
Rework List.join examples and description (#3570)

  - Remove duplicate note about the optional separator for the method form
  - It's the subroutine form that is slurpy and flattening
  - Group related examples
  - Correct a typo
06:08
linkable6 DOC#3570 [closed]: github.com/Raku/doc/pull/3570 Rework List.join examples and description
06:17 sena_kun left, sena_kun joined 06:29 tejr joined, Prince213 joined 06:30 Prince213 left 06:32 Prince213 joined, Prince213 left 06:39 patrickb joined 07:01 patrickb left 07:05 Mawile joined 07:13 dogbert11 joined 07:15 stoned75 joined 07:36 Sgeo left, dogbert17 joined 07:38 dogbert12 joined 07:39 dogbert11 left 07:40 dogbert11 joined 07:41 dogbert17 left 07:43 dogbert12 left, dogbert17 joined 07:44 dogbert17 left 07:45 dogbert17 joined 07:46 dogbert11 left 07:47 dogbert11 joined 07:48 skaji_ joined 07:50 rindolf left 07:51 dogbert17 left 07:59 dogbert11 left, dogbert11 joined 08:01 rindolf joined 08:06 rindolf left 08:13 dogbert11 left, dogbert11 joined, hungryd32 joined 08:15 rindolf joined, dogbert17 joined 08:16 hungrydonkey left, hungrydonkey joined 08:18 hungryd32 left 08:19 dogbert11 left 08:21 gnufr33dom left 08:22 dogbert17 left 08:23 dogbert17 joined, hungryd63 joined 08:24 hungrydonkey left 08:25 hungrydonkey joined 08:28 hungryd55 joined, hungryd63 left 08:30 skaji_ left, skaji_ joined, hungrydonkey left, hungrydonkey joined 08:32 hungryd55 left 08:33 hungryd8 joined 08:35 hungrydonkey left 08:36 fvox joined 08:37 dogbert11 joined, hungrydonkey joined 08:39 dogbert12 joined 08:40 hungryd8 left 08:41 dogbert17 left 08:42 dogbert11 left 08:47 hungryd4 joined 08:50 hungrydonkey left 08:51 cpan-raku left, Altai-man joined 08:52 cpan-raku joined, cpan-raku left, cpan-raku joined 08:54 sena_kun left 09:01 finanalyst joined 09:04 dogbert17 joined 09:05 hungryd4 left 09:06 dogbert12 left 09:57 wamba joined 10:03 rindolf left 10:04 thundergnat left
jjatria Hi~ Does anybody have any ideas re. stackoverflow.com/q/63486337/807650? It's about intercepting the output stream of a Proc::Async, and I haven't been able to figure out how to do it 10:07
10:08 sarna joined
jjatria I feel like I'm probably missing something, or getting something wrong, since I expected this to be the simpler part of what I'm working on 10:08
10:12 hungrydonkey joined
tobs jjatria: it seems that the producer is buffering its output and that it involuntarily dies (by your $p.kill) before it can flush the buffers. Under these circumstances, I see no way to get at the output. 10:19
jjatria I'm happy to hold off on the `$p.kill`, but it doesn't actually seem to flush the buffers. Or is there any way to tell it to flush more often? 10:22
10:24 squashable6 left
jjatria On the docs it says that you can use `$p.stdout` to get "chunks", which I expected to be a relatively more raw access to the output stream of the process, but that also looks like it's buffering for too long for what I want 10:25
10:25 squashable6 joined
tobs I don't even know how's doing the buffering: the raku standard library, moarvm, the C library or each of them at their respective layer? 10:26
Geth doc: codesections self-assigned Map.roll and Map.pick are not documented github.com/Raku/doc/issues/3563
d0c2c09e4d | (Daniel Sockwell)++ (committed using GitHub Web editor) | 2 files

  * Use full path for module name
Previously, modules were referred to just by their base name (e.g., Pod::Block::Code was Code). This could cause modules to be misidentified (e.g., for ForeignCode). This commit uses the full path ... (304 more lines)
10:27
10:27 stoned75 left
tobs In my limited experience with buffering issues, the problem was usually not that the low-level reader is holding back data from your program, it's that the producer doesn't even send it to you until it decides that it has accumulated enough data. Kill it before that and it all is lost. 10:28
jjatria Right, but what I think I'm trying to figure out (I may be wrong) is how to suggest to the process how much data is enough data (in my case: "as little data as you have") 10:30
The `$p.kill` there is just because I don't want the test script to run forever. I have the same problem if I remove it entirely 10:32
tobs no, when I lower the print interval to 0.01, I get a gush of data after a few seconds 10:35
10:38 xelxebar left, xelxebar joined
tobs I mean, yes you have the same problem, but it's not that the data won't arrive at all, just very late. And I have no idea which gear to talk to to make it come out faster, sorry. Also, this will most likely depend on the program you invoke from your run script, whether it has any additional buffering layers and whether you can influence them from the outside. 10:38
jjatria What I'm trying to say is that for what I'm trying to do, waiting a couple of seconds to get ~2000 lines of output won't work
I mean, there must be a way to specify what buffer size is appropriate for a spawned process... Or am I making a wrong assumption somewhere? 10:39
tobs There is an stdbuf(1) utility that you could look into. But I bet that this will only influence the buffering in the C standard library. Certainly worth a shot, but if Rakudo/MoarVM has its own buffering, you have to look elsewhere for how to disable that, too. 10:41
10:43 rindolf joined
tobs So, what I want to say is that I am not convinced that this is a Raku problem on the reader side. I think it's a generic problem of the writer side not pushing data early enough (which may happen with writers not written in Raku as well). 10:43
10:44 sarna left, molaf joined
jjatria But it does work if I do `$p.bind-stdout: $*OUT` on my side, which makes me think that if the Proc::Async has bin bound to an unbuffered output, it will DTRT. I just haven't been able to get that to work with any handles that are not $*OUT and friends, and certainly not ones that I can tap into to pre-process 10:46
tobs anyway, buffering problems are annoying and I might as well be the one overlooking something
jjatria: that is interesting. It could also mean that the writer, when bound to a TTY, is going into line buffering mode, so you get entire lines at once on the screen. 10:49
now if there was a way to make Proc::Async bind stdout to a PTY inside the run script, we could test this hypothesis... 10:50
linkable6 DOC#3571 [closed]: github.com/Raku/doc/pull/3571 Overhaul the list-missing-methods.p6 script
jjatria Seems like this is the same issue: www.reddit.com/r/rakulang/comments...buffering/ 10:56
tobs lunch 10:58
11:09 rindolf left 11:10 rindolf joined 11:17 stux|RC-- left 11:18 stux|RC joined 11:37 wamba left 11:38 wamba joined 11:45 guifa` joined 12:00 guifa` left 12:04 [Sno] left 12:06 sjm_uk joined, sno joined 12:09 Cabanossi left 12:14 zxcvz joined 12:19 Cabanossi joined 12:48 finanalyst left 12:52 sena_kun joined 12:53 Altai-man left 13:03 __jrjsmrtn__ joined 13:09 Kaiepi joined 13:10 gnufr33dom joined 13:48 orinthe joined
rypervenche Is there any place like the Most Wanted lists for getting Raku into syntax highlighting programs like highlight-js and rouge (although there's a stagnant PR for this one) 14:00
I feel like getting Raku into highlight-js would be very useful since a lot of places (e.g., Discord) use it.
14:02 squashable6 left 14:03 squashable6 joined
codesections When you say "like the Most Wanted lists", is there a reason that couldn't go on that list? 14:04
rypervenche No reason. I just didn't know if anything not written in Raku would go there. I'll submit an Issue. 14:07
14:08 vrurg_ joined
[Coke] rypervenche++ 14:09
14:13 aborazmeh joined, aborazmeh left, aborazmeh joined
kawaii came across this yesterday, wasn't sure if the behaviour was correct or not. when declaring a SetHash like this `my SetHash[Int()] $monitored-channels .= new();` it seems I'm unable to coerce values which should have no problem `Type check failed in binding; expected Int but got Str ("727594541955416185")` 14:20
codesections m: my Array[Int()] $a; $a.push('1') 14:24
camelia Type check failed in assignment to ; expected Int(Any) but got Str ("1")
in block <unit> at <tmp> line 1
codesections kawaii: looks like that's true in general with mutable types. Interesting 14:25
tobs m: my Int() @a 14:26
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion 'Int(Any)' is insufficiently type-like to qualify a variable.
Did you mean 'class'?
at <tmp>:1
------> 3my Int() @a7⏏5<EOL>
expecting any of:
constraint
tobs m: my @a of Int() 14:27
camelia ( no output )
tobs one of these is more telling than the other
codesections So, you're saying that Array[Int()] just isn't valid, and should be throwing an error? 14:28
tobs That's my reading of one of the error messages, at least in rakudo. 14:29
codesections kawaii: looks like it's a real bug :) One workaround is to move the coercion to the caller:
m: my Array[Int] $a; $a.push(+'1'); $a.push('2'.Int)
camelia ( no output )
lizmat well, I'm not sure whether this is a NYI or just something that will not be implemented 14:30
codesections m: my Array[Int] $a; $a.push(+'1'); $a.push('2'.Int); say $a
camelia [1 2]
kawaii codesections 🎉
14:30 MilkmanDan left
lizmat m: my Int(Str) $a = "42" 14:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Coercion 'Int(Str)' is insufficiently type-like to qualify a variable.
Did you mean 'class'?
at <tmp>:1
------> 3my Int(Str) $a7⏏5 = "42"
expecting any of:
constraint
tobs I don't know where coercions happen. Like, if a scalar container coerces, then arrays have them and could do it.
14:31 MilkmanDan joined, aborazmeh left
lizmat is not 100% sure either 14:31
guifa Coercion on types outside of signatures was explained to me as NYI when I asked a while back about it 14:32
But for the arrays… no go for parameterized stuff: 14:36
m: sub foo ( Array[Int()]() $a ) { say $a }; my Str @a = <a b c d>; foo @a 14:37
camelia No such method 'Array[Int(Any)]' for invocant of type 'Array[Str]'
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
guifa wonders even what a coercion method would look like for that
method Array ($paramaterized-type) {  …  } maybe? 14:39
tobs oh yeah, that's a hairy situation because Array[X] and Array[Y] do not match even if X is a subclass of Y or X does role Y or (hypothetically) X is a coercion that accepts Y. I think C++ people would call this covariance(?) and afaik this doesn't work with parameterized classes/roles in Raku. 14:40
moritz m: say Array[Int] ~~ Array[Cool] 14:42
camelia False
guifa Oof, yeah. I would have thought that X being a subclass of Y would work, but it does fail type checks
moritz m: say Positional[Int] ~~ Positional[Cool]
camelia True
tobs :O
is the difference in role vs. class? 14:43
guifa Oh wait
That might be it
There’s something funky about parameterizing classes, they’re not really designed for it
m: class A { }; class B is A { }; sub foo ( Array[A] $x ) { $x.say }; my Array[B] $b = B, B, B; foo $b 14:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling foo(Array[B]) will never work with declared signature (Array[A] $x)
at <tmp>:1
------> 3) { $x.say }; my Array[B] $b = B, B, B; 7⏏5foo $b
guifa m: class A { }; class B is A { }; sub foo ( A @x ) { @x.say }; my B @b = B, B, B; foo @b 14:45
camelia [(B) (B) (B)]
guifa o.O
m: class A { }; class B is A { }; sub foo ( A @x ) { @x.WHAT.say }; my B @b = B, B, B; foo @b; say @b.WHAT; 14:46
camelia (Array[B])
(Array[B])
xinming SmokeMachine: Do you plan to have view support in Red? 14:50
SmokeMachine Yes, I do. Any suggestions for the syntax for that? 14:52
14:54 xinming_ joined 14:56 xinming left
codesections has anyone else run into an issue where the docs generated by `documentable --update` stay one change behind where the file is? It's not a big deal; I've just been `touch`ing the file and updating again, which fixes it. But it is a bit odd 14:57
14:59 gnufr33dom left
xinming_ SmokeMachine: I don't have suggestions yet. I read the Red doc again, and found no doc about VIEW. :-) 15:01
SmokeMachine xinming_: that’s not what you want, but I plan to use Red::AST::Chained to run “WITH” queries (I forgot the name, sorry) 15:03
rypervenche Is there a difference between .list and .List? I saw in the documentation "Method List: Coerces the invocant to List, using the list method." 15:05
And if they're the same, is there a preferred one to use?
15:10 dogbert11 joined 15:14 dogbert17 left 15:16 hungrydonkey left, guifa` joined, hungrydonkey joined
xinming_ rypervenche: I think they are the same. List is just a convention, which is like Str method for various class, so the object can be converted to Str. 15:21
rypervenche: while list is a method which maybe called intentionally. :-)
But I'm not sure.
Geth doc: codesections++ created pull request #3572:
Add undocumented SetHash methods
15:25
15:35 mowcat joined 15:39 skids joined 15:55 Kaiepi left 15:57 Kaiepi joined 15:58 MasterDuke left 16:00 stoned75 joined 16:14 wamba left 16:16 wamba joined 16:27 guifa` left 16:28 MilkmanDan left 16:29 MilkmanDan joined
Mawile So, when installing p6doc, the docs suggest to just grab it with zef--but since zef builds things in my home folder, and because most installs don't require root, I was wondering if it's a good idea to run that particular install with sudo since it seems to want to place things in /usr/share/perl6/site/doc 16:40
The reason for my hesitation is because of how running some installs with other package managers with root can cause a number of things in the home folder cache to be owned by root, causing random permission issues later 16:41
16:43 mowcat left
[Coke] where are you getting p6doc from? 16:45
(it's moving to a new repo, just want to make sure you're in the right place.)
Mawile Oh! I was following docs.raku.org/programs/02-reading-...TRODUCTION
And it wanted me to install zef with the package manager, but Iafter doing quite a lot of searching, I didn't find many hints about whether or not it was a good idea to run it as root 16:46
after, even
[Coke] so is the question about installing the 'p6doc' binary, or zef? 16:47
(sorry, just trying to clarify)
Mawile zef, mostly!
I've been running it without root as much as I could
But I don't know if that's a thing I even need to worry about
rypervenche Yeah, I was never able to get p6doc to install as my user because it needs to be able to create a directory as root. 16:48
16:48 stoned75 left
[Coke] p6doc install has been broken for years, there's a ticket on it. 16:48
Mawile Ahh!
[Coke] regarding zef.. I never do it as root, but I don't share my raku with anyone. Not sure what state of the art is there.
Mawile I gotcha! 16:49
Because like, with Ruby, you can run gem as root, but if your system package manager updates your ruby install, sometimes you have to do a little bit of FS surgery
[Coke] hurls github.com/Raku/doc/issues/2896
Mawile Heck, I'm not sure how I missed that issue 16:50
16:50 Maylay left
Mawile Thanks for the link! 16:50
[Coke] re: p6doc; we never updated to follow the correct method of installing non-code files.
basically: you can't install it right now. Sorry.
16:51 Altai-man joined
Mawile That's okay! I can just use the doc site instead for now. 16:51
Thanks for pointing me in the right direction~ ^^ 16:52
16:52 rindolf left
[Coke] sure, apologies it's still borked. 16:53
16:54 sena_kun left, Maylay joined
Mawile That's okay! I mean, WIPs are WIPs. I'm not about to bug anyone about taking things at their own pace 16:56
I just had a fun time finding if my gut instinct of not running zef as root had any actual grounds 16:57
17:07 natrys joined 17:09 MasterDuke joined
kawaii Is it possible to use zef to install modules from private ecosystems? We have a private cpan server at work which our perl5 guys use for proprietary stuff, does anything similar exist for raku? 17:13
17:31 finanalyst joined 17:33 rindolf joined 17:40 Black_Ribbon joined
[Coke] I don't know if you can have your own ecosystem, but you can definitely install directly from a URL 17:43
17:45 epony left 17:54 MasterDuke left
moritz the repository URLs are in zef's resources/config.json file. Injecting something there is likely possible 17:56
caveat: I don't know how well the data format there is documented
but it looks pretty obvious :D 17:57
curl raw.githubusercontent.com/ugexe/Pe...cpan1.json | jq . |less
17:59 Sgeo joined 18:10 Cabanossi left 18:14 Cabanossi joined 18:21 stoned75 joined, bocaneri left 18:30 stoned75 left 18:32 stoned75 joined 18:42 guifa` joined 18:51 guifa` left
[Coke] what is "jq" ? 18:54
El_Che json parser for the cli
he's pretty printing the output 18:55
18:56 stoned75 left 19:52 rindolf left 20:03 dogbert17 joined 20:06 dogbert11 left 20:09 dogbert17 left 20:10 dogbert12 joined 20:11 dogbert17 joined 20:12 dogbert11 joined 20:14 dogbert12 left 20:15 epony joined, dogbert17 left 20:20 dogbert17 joined 20:22 dogbert11 left 20:32 stoned75 joined 20:33 natrys left
codesections Woo first PR to Rakudo :D Admittedly, I added under 10 characters in two lines, but still 20:41
El_Che \o/
guifa codesections: managed it before I did :-) 20:47
codesections well, oops, not really. Looks like I managed to duplicate a small piece of something lizmat had already submitted a PR for. So much for that... 20:48
lizmat codesections++ nonetheless! 20:49
codesections But at least I have the dev environment set up now!
lizmat :-)
20:50 melezhik joined
melezhik .tell kawaii "Is it possible to use zef to install modules from private ecosystems? We have a private cpan server at work which our perl5 guys use for proprietary stuff, does anything similar exist for raku?" I believe you might ask tony-o about that 20:51
tellable6 melezhik, I'll pass your message to kawaii
melezhik he's been doing something in this area
though I am not positive
20:51 melezhik left 20:52 dogbert17 left, sena_kun joined, dogbert17 joined 20:54 Altai-man left 21:06 epony left 21:11 finanalyst left 21:14 finanalyst joined 21:15 pecastro joined 21:19 kensanata joined 21:21 epony joined, skids left 21:34 terminatorul joined
terminatorul Hello 21:35
Is there a way please to check if a shared library is exporting some expected function name ?
The AdHoc exception thrown by NativeCall is unspecific, could mean anything, so I would like to check in adavance if the library function is there 21:38
I would use native dlopen(), but the flags argument is required and the possible values are system-specific ... so in the end I still need an XS module 21:40
timotimo if you're on moarvm as the backend, you can rely on one of libffi and dyncall being linked in, which isn't much better, but should at least not suck as much 21:41
21:42 wamba left
guifa Wow. I knew refactoring CLDR would result in speed improvements but … dang. Used to take about 2 seconds to load a language. Now it’s down to about .1s 21:44
rypervenche Nice! 21:49
21:51 dogbert11 joined 21:53 dogbert17 left
guifa I’ve got some ideas on how to improve it more but those are even more hideous refactors lol 21:58
21:59 kensanata left 22:00 tejr left 22:01 pecastro left 22:02 dogbert11 left 22:03 dogbert11 joined 22:05 tejr joined 22:09 dogbert17 joined, dogbert11 left 22:10 dogbert11 joined 22:13 dogbert17 left 22:21 finanalyst left 22:59 gordonfish joined 23:21 aborazmeh joined, aborazmeh left, aborazmeh joined 23:33 terminatorul left 23:41 MilkmanDan left 23:43 MilkmanDan joined
sena_kun releasable6, status 23:56
releasable6 sena_kun, Next release in ≈1 day and ≈19 hours. 1 blocker. Changelog for this release was not started yet
sena_kun, Details: gist.github.com/e577708edfa3a145e5...d50694bb86
23:56 zostay joined 23:58 Grinnz joined