»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
ryn1x is there return type I can use for a native sub that returns std::string? 01:49
leont I don't think so 01:52
Encapsulation and ffi aren't friends
jackfly26 idk if the last 2 messages came through 02:00
ryn1x hmm... maybe i'll try to return a const char* instead by just modifyig the return values with .c_str() 02:19
that worked... easy enough... 02:27
jackfly26 nice 02:28
i progressed a little on the grammar parser thingy
still stops at the while statement 02:29
Elronnd how can I loop over the characters in a string? 03:09
ryn1x: you can't really wrap even a simple c++ class (without tying yourself to one platform) since c++ doesn't have a defined ABI like c does 03:10
ryn1x m: 'for "hello world".comb { say $_ };' 03:13
camelia WARNINGS for <tmp>:
Useless use of constant string "for \"hello world\".comb { say $_ };" in sink context (line 1)
ryn1x m: for "hello world".comb { say $_ }; 03:14
camelia h
e
l
l
o

w
o
r
l
d
hythm_ Hello #perl6, is it possible to set background color for buttons in GTK::Simple, or it's not implemented yet ( I could not find it in the examples) 03:34
buggable New CPAN upload: HTTP-Request-Supply-0.2.0.tar.gz by HANENKAMP modules.perl6.org/dist/HTTP::Reques...:HANENKAMP 03:44
holyghost hi jmerelo 05:27
jmerelo morning
holyghost I'm working on a C++ lexer for perl6, just saying 05:28
jmerelo Great
holyghost UTF 05:31
and it's portable code ;-) 05:32
Visual Studio, XCode, linux, BSD, ... 05:36
jmerelo How could it be otherwise 05:37
Today's Advent Article is about Christmas trees perl6advent.wordpress.com/2018/12/...tmas-tree/ Who does not love Christmas trees? 05:39
holyghost makes me think about the fern fractal :-) 05:43
ryn1x So I got my first nativecall module working on my laptop, but now I need to get it to work on windows also... does anyone know where I need to place .dll files so that native call will find them? 06:09
buggable New CPAN upload: Pod-Load-0.3.1.tar.gz by JMERELO modules.perl6.org/dist/Pod::Load:cpan:JMERELO 06:14
jmerelo ryn1x: Saw your issue in perl6/doc. Really have no idea, don't use Windows at all or even have a Windows machine handy... 06:18
I would suggest StackOverflow as usual, but I seem to remember this issue has been raised in the past. Let me check
ryn1x: this might help... stackoverflow.com/questions/357828...urce-files (or maybe not) 06:19
ryn1x Yeah... I need to use linux , mac, and windows, and I know the least about windows... always gives me a hard time.
ryn1x thanks, Ill take a look 06:20
jmerelo: That stackoverflow is about building automatically... which I want to to eventually, but manually I can get my c++ dependancy to build just fine on Windows... I just don't know where to put the .dll or how to tell perl to find it. 06:24
jmerelo ryn1x: Well, it helps to see that there are actual people who know that stuff in StackOverflow... So I would suggest to use it. 06:26
ryn1x Yeah... I'll make a post 06:27
holyghost ryn1x : AFAIK, the dll must be in tour path or current dir 06:35
ryn1x holyghost: it seems current directory is working, but not path. At least somthins is working now =) 06:44
Geth Pod-To-HTML/master: 5 commits pushed by (JJ Merelo)++ 07:02
jmerelo ryn1x: thanks!
ryn1x jmerelo: i don't know what i did... for the thanks... 07:04
buggable New CPAN upload: Pod-Load-0.4.0.tar.gz by JMERELO modules.perl6.org/dist/Pod::Load:cpan:JMERELO
jmerelo ryn1x: could be a general thanks :-) But you said you were going to post it in StackOverflow.
ryn1x Oh.... yeah.... I didn't do that yet since holy ghost led me to trying the current dir again.... 07:06
ryn1x speaking of current dirs... is it ok to rely on zef running test from the top directory in the module... I currently have a test image in my /t dir and have it's path hard-coded like ./t/img.tif in a test 07:08
timotimo you could go sideways from $?FILE
jmerelo ryn1x: zef certainly may do that, but it's always good to check if it's running from t/ itself, because you might do that while testing. I certainly do it myself. 07:09
ryn1x m: $?FILE 07:11
camelia ( no output )
ryn1x m: say $?FILE
camelia <tmp>
ryn1x will that give a full path if in a script?
ryn1x cool it does... didnt know about that one. thank timotimo 07:13
timotimo :)
ryn1x $?FILE.IO.dirname seems to do the trick 07:16
buggable New CPAN upload: Term-Choose-p6-1.4.6.tar.gz by KUERBIS cpan.metacpan.org/authors/id/K/KU/...4.6.tar.gz 07:24
buggable New CPAN upload: Graphics-TinyTIFF-0.0.1.tar.gz by RYNIX cpan.metacpan.org/authors/id/R/RY/...0.1.tar.gz 08:34
ryn1x \o/
lizmat Perl is 31 today 09:41
[ptc] \o/ 09:42
nadim morning, latest gives this error "Command failed (status 256): git checkout 2018.11-58-g6e229d8d2" when running "erl Configure.pl --gen-moar --gen-nqp --backends=moar" 11:24
any document I forgot to read?
kensanata nadim: Weird. Sounds like you're missing a p. perl 5 is required to compile it, I think. 11:34
nadim full error message is this paste.scsys.co.uk/582541, I have no idea what this can be 11:39
robertle I think the cehckout of the third-party fails because there are modified files in there 11:40
if you clean these up, so that git status no longer shows modified files, the Configure.pl will succeed 11:41
I have the same every now and then, just on different and fewer files
nadim maybe I can remove the whole nqp directory, I'll try 11:42
timotimo greetings nadim 11:48
cool to see you're back
nadim timotimo: hi, thank you, I got so many mails complaining about a module I need to fix that I had to come back ;) 11:52
nadim it's building, I m looking forward to see all the great work you guys have been putting in, it's like a Christmas present. 11:52
now we're talking: This is Rakudo version 2018.11-82-ge7b61aff7 built on MoarVM version 2018.11-39-g987269ea9 11:55
timotimo nadim: did you see 6pad? having a little integration between DDT and 6pad and the html output could be pretty darn cool. 12:06
nadim no I haven't but I will look into it ASAP 12:07
timotimo my advent calendar post, "automatic on a cellular level" has a few examples for 6pad in it
nadim I still have problems installing with zef (I tried installin jmp but got errors), any idea what this is? paste.scsys.co.uk/582542 12:08
I guess I need to update zef in some way
6pad looks cool! I also say that there was a Jupyter kernel, that's even more fun, we could use that to show exercises/examples 12:09
timotimo: I'll fix DDT over the holidays and then I can look at the integration 12:10
timotimo nice :)
timotimo can you verify if zef is running on top of the right perl6 version? i.e. is devel/repositories/rakudo/install where your fresh perl6 got installed to? 12:11
nadim yes there
timotimo hmm
perhaps first "zef upgrade zef"?
the error it finds is surprising to me, though
nadim upgrade of zef failed, paste.scsys.co.uk/582543 12:15
timotimo that looks like it's not splitting commandline arguments somewhere 12:16
nadim tried a "zef install LWP::Protocol::https" but got error: ailed to open file /home/nadim/nadim/devel/repositories/rakudo/install/share/perl6/site/dist/61309D903821CE1CB6CA7093A21C0FFD7AF9ECB7: No such file or directory
timotimo can you download zef and install it locally? 12:17
nadim will do
timotimo what version of zef were you running just now?
nadim I fetched the latet version and build it, it went through 12:29
didn't check which version before but it is either one that is a year old or one that was installed at the same time as rakudo (if rakudo installs it) 12:30
timotimo rakudo does not install it 12:31
so it'll be the one year old one probably
nadim then I was just 144 commits behind :) 12:33
Geth ecosystem: 921ee66151 | thundergnat++ (committed using GitHub Web editor) | META.list
Change module / repository name
13:41
jmerelo So quiet. Everybody's having lunch? Siesta? 13:47
lizmat it's the dark days... :-) 13:50
lizmat never gets used to sunrise at 8:30 and sunset at 16:30
but in reality it doesn't get light until 10:00 and it already gets dark at 15:00
jmerelo: I guess that's a lot better in Granada, right ? 13:51
jmerelo lizmat: it is. Plus there's much more light when there's actual light... 13:52
jnthn After enduring Stockholm at this time of year in the past, I find the day length here in Prague at this time of year quite acceptable. 13:53
jmerelo 8:23 to 17:59 today, actually...
hi, jnthn
jnthn hi :)
jmerelo Thanks a lot for your answers in SO...
Although they mean that we will probably never, ever, have Pod6 rendered in GitHub...
jnthn np...though in a way the answer is kind of "there's not a good way to do this" 13:54
jmerelo (I seem to remember Zoffix said that, a long time ago...)
jnthn Well, we will, or at least most of it, we just need a parser that does the required cheating to do it without running any code.
jmerelo jnthn: which is way above my pay grade, I'm afraid. 13:55
it might be a good thing, however. We might find it useful for parsing the documents faster than we do it now. 13:56
It takes a good amount of time to statically generate the documentation right now. not to mention test it.
jmerelo I mean, there might be a solid use case for doing that... 13:58
jmerelo hi, finanalyst 13:59
We were just talking about document generation and related headaches...
jnthn We've got realtime Pod 6 document preview on our Comma feature list (admittedly not quite at the top); I wonder if that work might produce something we could open source.
And that would help with this problem
jmerelo jnthn: if it works for you, it works for everyone else...
jnthn Will see how we end up solving that :) 14:00
jmerelo I mean, I'm hearing realtime and I'm starting to salivate...
(also, it's almost lunchtime)
Nothing in the documentation is nowhere near realtime. 14:01
This could help a tiny bit: github.com/rakudo/rakudo/issues/2552 It wouldn't help Github render pod6, but it might help us. 14:02
ufobat_ the | in foo(bar => | <something> ); is not this one, is it? docs.perl6.org/syntax/%7C 16:21
jnthn No, it'll be the prefix:<|> which makes a Slip 16:23
ufobat_ m: class Foo { has Str @.foo}; Foo.new( foo => | $["jahr", "monat"]).perl.say 16:24
camelia Foo.new(foo => Array[Str].new("jahr", "monat"))
ufobat_ vs
m: sub foo(Str :@bar) { say @bar }; foo(bar => | $["jahr", "monat"])
camelia Type check failed in binding to parameter '@bar'; expected Positional[Str] but got Slip ($(slip("jahr", "monat")))
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
ufobat_ why does this happen?
ufobat_ maybe that is something jj knowns, i am wondering how you find the infix thingy when you enter "|" on docs.perl6.org because it is /syntax/ as well, no? 16:26
jnthn Because attribute initialization is assignment semantics, and parameters use binding semantics 16:27
jnthn So in the first, with assignment, all it cares about is that it can iterate the specified thing and produces values to copy into @!foo 16:27
Whereas in the second, it means you must pass something that does Positional[Str] 16:28
And a Slip certainly doesn't do that, and even if that wasn't there, the Array being passed isn't typed anyway
ufobat_ so for the 1st one a .flat would also work 16:30
but for the 2nd, what would be the way to make it work? i dont have an idea
the Array $["foo", "bar"] comes from yamlish 16:31
jnthn m: sub foo(Str :@bar) { say @bar }; foo(bar => Array[Str]("jahr", "monat"))
camelia [jahr monat]
jnthn m: sub foo(Str :@bar) { say @bar }; foo(bar => Array[Str](["jahr", "monat"]))
camelia [jahr monat]
jnthn You'll have to explicitly coerce it
ufobat_ ah 16:32
buggable New CPAN upload: IO-Socket-Async-SSL-0.7.2.tar.gz by JNTHN modules.perl6.org/dist/IO::Socket::...cpan:JNTHN 16:34
Geth Pod-To-HTML: 3b9ca671c1 | (JJ Merelo)++ | ChangeLog
Adds changes
16:40
Pod-To-HTML: 4c81132e62 | (JJ Merelo)++ | .travis.yml
It no longer works with 2017.x
tobs` jmerelo: good news. I have all my bits together and will finish the article tonight (CET). 16:58
jmerelo tobs`: I think the article for tonight, by Scimon, is already in draft, since we did the swap. 17:01
tobs`: let me check
tobs` no, no, that's fine. 17:02
I'm aiming for the 20th
jmerelo Ah, OK, great.
Schedule it for the 20th, 00:01
and thanks!
tobs` will do and I gotta go now
jmerelo .tell jnthn how's your article for the 22th coming up? 17:04
yoleaux jmerelo: I'll pass your message to jnthn.
jmerelo .tell AlexDaniel how is it going with your article for the 23rd? 17:05
yoleaux jmerelo: I'll pass your message to AlexDaniel.
jmerelo Today, from Jonathan Stowe (who keeps using different aliases all over the place and I'm totally lost about the one he uses here), how to build an SVG Christmas Tree in Perl 6 perl6advent.wordpress.com/2018/12/...tmas-tree/ 17:08
AlexDaniel . 17:29
yoleaux 17:05Z <jmerelo> AlexDaniel: how is it going with your article for the 23rd?
AlexDaniel jmerelo: I'm hoping to release rakudo at least tomorrow if not today, then I'll work on it. Ask me a bit later, please :)
jmerelo++ # I love the organization of the advent calendar this year 17:30
jnthn jmerelo: Well, I've decided what to write about...and I don't need to invent anything new to write it... :) 17:32
yoleaux 17:04Z <jmerelo> jnthn: how's your article for the 22th coming up?
Geth advent: f90521b570 | (Aleks-Daniel Jakimenko-Aleksejev)++ | perl6advent-2018/schedule
Define topic for 23rd

Although I can change my mind…
17:37
sena_kun lol 17:37
AlexDaniel xD
sena_kun AlexDaniel, that's a nice joke. :D 17:38
jmerelo AlexDaniel: good!
jnthn haha :) 17:40
hythm_ Hello #perl6, I have two questions, the easy one first: what is the difference between Int @a and @a[Int]. The second one I hope if i can find a suggestion to below question, im writing a linux package manager in perl6 and stuck in this issue for sometime 17:43
www.stackoverflow.com/questions/53...-traversal 17:45
jmerelo m: my Int @a = [1,2,3]; say @a.perl; my @b[Int] = [1,2,3]; say @b.perl 17:46
camelia Array[Int].new(1, 2, 3)
[1, 2, 3]
jmerelo hythm_: ^^^
OK, I think I got this.
With the first, you are actually declaring the type of the object; as you see, it's an array of Int. With the second, you are just constraining the types of every item in a Positional, but it's just a Positional, it does not have any type. 17:47
jmerelo m: my Int @a = [1,2,3]; say @a.^name; my @b[Int] = [1,2,3]; say @b.^name 17:48
camelia Array[Int]
Array
AlexDaniel didn't get it
jmerelo m: my Int @a = [1,2,3]; say @a.^name; my @b[Int] = [1,2,3]; say @b.^name; @b.push('c')
camelia Array[Int]
Array
jmerelo m: my Int @a = [1,2,3]; say @a.^name; my @b[Int] = [1,2,3]; say @b.^name; @b.push('c'); say @b.perl
camelia Array[Int]
Array
[1, 2, 3, "c"]
jmerelo m: my Int @a = [1,2,3]; say @a.^name; class Foo {}; my @b[Foo] = [1,2,3]; say @b.^name; @b.push('c'); say @b.perl 17:49
camelia Array[Int]
Array
[1, 2, 3, "c"]
AlexDaniel m: my @b[Int] = [1,2,‘foo’]; say @b
camelia [1 2 foo]
jmerelo So it's actually useless.
tobs m: my @b[Hash] = [1,2,3]; say @b
camelia Died with X::Multi::NoMatch
in block <unit> at <tmp> line 1
jmerelo m: my @b[Nil] = ^3; say @b 17:50
camelia [0 1 2]
jmerelo m: my @b[False] = ^3; say @b
camelia Illegal dimension in shape: 0. All dimensions must be integers bigger than 0
in block <unit> at <tmp> line 1
AlexDaniel oh it's dimensions
d'oh
hythm_ Hmm
jmerelo m: say Hash.Int 17:50
camelia Use of uninitialized value of type Hash in numeric context
0
in block <unit> at <tmp> line 1
AlexDaniel m: my @b[5]; say @b.shape 17:51
camelia (5)
AlexDaniel m: my @b[Int]; say @b.shape
camelia (*)
AlexDaniel m: my @b; say @b.shape
camelia (*)
jmerelo m: my @b[Nil]; say @b.shape
camelia (*)
jmerelo m: my @b[Hash]; say @b.shape
camelia Died with X::Multi::NoMatch
in block <unit> at <tmp> line 1
jmerelo m: my @b[+Hash]; say @b.shape 17:52
camelia Use of uninitialized value of type Hash in numeric context
in block <unit> at <tmp> line 1
Illegal dimension in shape: 0. All dimensions must be integers bigger than 0
in block <unit> at <tmp> line 1
tobs beats me
AlexDaniel hythm_: so [Int] is a no-op, does nothing. [] is for specifying the shape
hythm_ Got it. Thank you.
AlexDaniel m: my @b[5,2]; say @b
camelia [[(Any) (Any)] [(Any) (Any)] [(Any) (Any)] [(Any) (Any)] [(Any) (Any)]]
AlexDaniel m: my Int @b[5,2]; say @b
camelia [[(Int) (Int)] [(Int) (Int)] [(Int) (Int)] [(Int) (Int)] [(Int) (Int)]]
AlexDaniel hythm_: that was a good question, got me really confused at first :) 17:53
I guess I don't use shaped arrays often enough
lizmat Array.new has "nqp::defined($shape)"
so it is set to ignore type objects or anything else it doesn't understand 17:54
maybe that's LTA
sena_kun m: my @a[Array];
camelia Died with X::Multi::NoMatch
in block <unit> at <tmp> line 1
sena_kun ^ and sometimes it dies
AlexDaniel hythm_: also I don't know how to answer your second question :) 17:55
greppable6: \[Int\] 17:56
greppable6 AlexDaniel, 164 lines, 19 modules: gist.github.com/3b8524bcefea210369...862a318289
hythm_ Thank you for taking the time to look AlexDaniel
AlexDaniel lizmat: yeah, that's definitely LTA. It is confusing. So to get `Array[Int]` you have to write `Int @foo` but not `@foo[Int]` 17:57
or `my Array[Int] $foo` ? 17:58
lizmat well, we could make my @a[Int] be the same as my Int @a 18:01
jmerelo Some using Windows could help here? github.com/perl6/doc/issues/2513 18:02
jmerelo (not sure if that's a doc problem of a Rakudo problem) 18:03
lizmat AlexDaniel: I mean, enums already have special handling:
m: my @a[Endian]; dd @a
camelia Array element = Array.new(:shape(3,), [Any, Any, Any])
lizmat m: my @a[Bool]; dd @a
camelia Array element = Array.new(:shape(2,), [Any, Any])
lizmat m: my Int @a[Bool]; dd @a 18:04
camelia Array[Int].new(:shape(2,), [Int, Int])
AlexDaniel lizmat: o_o
I think a warning or an error message is more appropriate… 18:05
but uh… maybe DWIM-ing is not that bad :s
hythm_: can you file a ticket?
lizmat m: my Int @a[Str]; dd @a 18:06
camelia Array[Int].new()
lizmat AlexDaniel: ^^^ what would that do :-)
I guess a warning would be best
hythm_ Yes, will do. Where should i create the ticket? Can you provide a link for the correct repo? 18:07
jmerelo hythm_: Rakudo, probably... github.com/rakudo/rakudo 18:08
hythm_ Thank you jmerelo 18:09
hythm_ github.com/rakudo/rakudo/issues/2554 18:20
jmerelo New question about BEGIN in Stackoverflow stackoverflow.com/questions/538390...-or-is-run 18:28
jmerelo remember, post your questions (also) there :-) 18:29
Still some questions unanswered, like this one by tyil stackoverflow.com/q/53692507/891440
TreyHarris There's a script somewhere for downloading all the Perl 6 ecosystem modules, isn't there? I could make a stab at the question jmerelo just posted about Windows NativeCall, but I figured before doing too much work I'd grep through all the modules and see if any are already doing it successfully 19:44
moritz github.com/moritz/perl6-all-modules/
TreyHarris moritz: thank you, I forgot it was your personal repo, I went to github.com/perl6/perl6-all-modules and /perl6/all-modules in vain :-) 19:45
moritz: Sorry, after buying and forgetting about your book for a year I feel like I need to pay better attention to you ;-) 19:46
...OR, I could have just run "z all-m" and would've gotten the repo I'd last pulled almost a year ago. Oops. *blush* 19:48
moritz TreyHarris: no worries :) 19:49
Kaiepi wait there's a perl 6 ecosystem repo? 20:18
shit
Geth ecosystem: 780cc3505e | (Ben Davies)++ (committed using GitHub Web editor) | META.list
Add Kaiepi's repos to META.list
20:23
melezhik hi perl6 folks! I am reading this - docs.perl6.org/language/create-cli . How do I declare optional $foo parameter? sub MAIN($foo) makes it obligatory ... 20:40
sena_kun `:$foo` maybe? 20:40
moritz $foo?
just like other optional params
or give it a default value 20:41
moritz m: sub MAIN($foo?) { say $foo.perl } 20:41
camelia Any
melezhik what I need is to run perl6 app.pl6 foo and perl6 app.pl6
moritz yes, add the ? after the parameter 20:42
melezhik moritz: thanks. this is what I looked for ... 20:43
nadim hmm, there a #perl6 channel on scuttlebutt, we're obviously everywhere 20:56
moritz .tell jmerelo: would you find something like gist.githubusercontent.com/moritz/...aving.pod6 helpful in the p6 docs? 21:02
yoleaux moritz: What kind of a name is "jmerelo:"?!
moritz .tell jmerelo would you find something like gist.githubusercontent.com/moritz/...aving.pod6 helpful in the p6 docs?
yoleaux moritz: I'll pass your message to jmerelo.
TreyHarris nadim: what is a "scuttlebutt"? 21:04
speaking of CLI, how do you implement the common "color" flag behavior: "--color" is equivalent to "--color=yes", "--nocolor" to "--color=no", but "--color=always" and "--color=never" are also allowed? 21:12
Kaiepi Str $color and figure it out from within the program? 21:13
wait i don't think that'd work
hm
timotimo wowza, scuttlebutt?
that's based on DAT and such, right?
TreyHarris Kaiepi: as far as I've been able to work out, no, that doesn't work. It seems like if you want this one relatively common behavior you have to take over argument-processing manually 21:16
timotimo does one of the getopt modules on the ecosystem do it? 21:17
TreyHarris timotimo: dunno, that's why I asked :-) I'll have a look at them 21:23
tyil melezhik: named params are optional, positional arguments are (mostly) mandatory 21:24
so if you have a sub MAIN (:$foo) it's optional, you can make it required by making it :D (or a :$foo! iirc)
timotimo for a required parameter you want the !, otherwise you're not allowed to pass undefined values 21:25
tyil good point
timotimo i.e. whether you've passed a parameter is orthogonal, or something
but i suppose having the :D is often what you want, and of course you're free to use both
tyil really depends on what you're going for, I guess 21:26
TreyHarris two people asked in privmsg, so I imagine this is a more general-interest question: "--color=never" is for when you have aliases that may invoke --color in some way; "... --color ... --color=yes ... --color=never" makes "never" win. ("--color=always", OTOH, means send color even to things you ordinarily wouldn't, like file redirection) 21:28
nadim timotimo: TreyHarris: a p2p disconected protocol with some app running on top of it 21:37
timotimo: www.scuttlebutt.nz/ 21:38
it's not like there's a lot going on (and even less on #perl6) but it's fun to see the interest lives, albeith in dark corners of the internet
melezhik tyil: timotimo: , thanks 21:41
melezhik how do I get programmatic access to module version number? 21:42
say if I want to print out a module's version in my program? 21:46
no-n what can I do instead of %h<a> //= []; %h<a>.push: $x? in perl 5 it was something like push @{$h{a}}, $x 21:50
sena_kun m: my %h; %h<a>.push(1); say %h; 21:52
camelia {a => [1]}
no-n o
sena_kun no-n, like this?
no-n didn't know you could do that, cheers
sena_kun it is called audo-vivification if I am not mistaken.
and is kind of neat. :) 21:53
no-n yup
sena_kun *auto
TreyHarris melezhik: I don't know if it's the best way, but: 21:58
m: for $*REPO.repo-chain.map(*.loaded).flat { say .gist, ':', .version; }
camelia ( no output )
TreyHarris erm.
m: use Test; for $*REPO.repo-chain.map(*.loaded).flat { say .gist, ':', .version; } 21:59
camelia Test:v6.d
melezhik thanks TreyHarris: ... maybe something more human readable? exist (-: 22:01
buggable New CPAN upload: IO-Socket-Async-SSL-0.7.3.tar.gz by JNTHN modules.perl6.org/dist/IO::Socket::...cpan:JNTHN 23:04
mornfall how can i clean up a resource in a CATCH block? it's running with this weird scope where it may run before a variable it refers to is created? 23:20
(in this case, i have a promise that i want to await, but await $promise will tend to die of undefinedness, and if $promise { await $promise } doesn't seem so nice) 23:22
mornfall hmm, especially since it's wrong 23:23
.Bool on promise does exactly the opposite of what i want :\
jnthn await $_ with $promise
mornfall thanks 23:25
Kaiepi what does with do? 23:30
mornfall run the block with its parameter topicalized if it was defined (i think) 23:31
(skip the block otherwise)
i wrote .&await with $promise; 23:32
it's still not working, but probably the problem is somewhere else now 23:33
i don't understand supply blocks :( 23:37
tapping a supply and also calling .Promise on it seems to run it again 23:40
jnthn .Promise on a Supply implies a .tap
mornfall but p6doc says it will give me a promise that's kept when the supply is done 23:41
hmm
jnthn Think of a `supply` block like a class, and tapping it like making an instance of the class
mornfall so it's really just a shortcut for a .tap that throws everything but the last value away
jnthn Pretty much that, yes. It's useful when you want to use the supply/whenever construct in a situation that will produce a single value in the end 23:42
mornfall i would really need to wait for a supply to end in a CATCH block :\
this doesn't seem to be possible (other than with explicit taps perhaps)
jnthn What does "a supply to end" really mean here? 23:43
mornfall wait until it calls 'done' on itself
jnthn What tapped it in the first place?
mornfall a react block
Kaiepi i'm still thinking about how to deal with the breaking changes in my networking grant
jnthn And how is the react block left? 23:44
mornfall an exception happens in one of its supplies
jnthn When a react block is done (or dies from an exception), it closes all of the supplies subscribed to using `whenever`
Is the CATCH inside of a react block? 23:45
mornfall no, that didn't actually catch anything for me
it's at the same level as the react and supply blocks in question
jnthn Ah, you probably wanted QUIT rather than CATCH (QUIT gets the async exceptions) 23:46
mornfall but basically what i wanted is, have an exception handler that will let the react block run its course and then .rethrow
jnthn OK, and if there are multiple exceptions?
mornfall it's okay to forget about those i suppose, the first one is going to kill the program anyway (but i guess it'd be nice to have them queued in general) 23:47
(context being, i have a somewhat fragile process to babysit with Proc::Async... i put all the babysitting in a supply block, so it's somewhat composable; i need that supply block to get to its 'done' before anything else is allowed to happen, including the entire program dying on an exception) 23:49
i had it in a react before, but that runs into deadlocks because whetever's in a single react can't run concurrently 23:50
jnthn mornfall: gist.github.com/jnthn/2a350ca7d977...129428e393 23:51
mornfall whenever's*
hmm, but that'll also wait until $s2 ends? 23:53
i have two supplies, but only want to wait for one of them
(and collect exceptions from both, but presumably i can do that by moving the QUIT one level up?) 23:54
jnthn Ah, I thought you wanted it to wait until $s2 ends 23:57
You can stick in a `done` to get out of the react block when one of them finishes though 23:58