»ö« 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.
00:20 kktt_ joined, bolangi left, kktt_ is now known as kktt007, p6bannerbot sets mode: +v kktt007 00:22 bolangi joined, p6bannerbot sets mode: +v bolangi 00:28 kurahaupo left, kurahaupo joined 00:29 p6bannerbot sets mode: +v kurahaupo 00:33 Rawriful joined 00:34 p6bannerbot sets mode: +v Rawriful 00:41 kurahaupo left 00:42 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo 00:45 graphene left 00:47 graphene joined, p6bannerbot sets mode: +v graphene 00:53 |oLa| left 00:57 ryn1x left 01:20 coet left 01:27 ryn1x joined 01:28 p6bannerbot sets mode: +v ryn1x 01:34 Rawriful left 01:41 yatung joined, p6bannerbot sets mode: +v yatung
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
01:58 finanalyst joined 01:59 p6bannerbot sets mode: +v finanalyst, jackfly26 joined 02:00 p6bannerbot sets mode: +v jackfly26
jackfly26 idk if the last 2 messages came through 02:00
02:17 molaf left
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
02:30 molaf joined, p6bannerbot sets mode: +v molaf 03:01 jackfly26 left
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
03:20 leont left 03:32 hythm_ joined, p6bannerbot sets mode: +v hythm_
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
03:57 w_richard_w joined, p6bannerbot sets mode: +v w_richard_w 04:09 Cabanossi joined, Cabanoss- left, aindilis joined 04:10 p6bannerbot sets mode: +v Cabanossi, p6bannerbot sets mode: +v aindilis 04:22 w_richard_w left 04:34 ferreira left 05:05 hythm_ left 05:09 jmerelo joined 05:10 p6bannerbot sets mode: +v jmerelo 05:25 Sgeo joined 05:26 p6bannerbot sets mode: +v Sgeo 05:27 Sgeo_ left
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
05:45 curan joined, p6bannerbot sets mode: +v curan 05:47 ponbiki left 05:50 vike left 05:51 cgfbee left 05:55 molaf left 05:57 vike joined 05:58 p6bannerbot sets mode: +v vike 06:00 cgfbee joined 06:01 p6bannerbot sets mode: +v cgfbee
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
06:12 ufobat_ joined 06:13 p6bannerbot sets mode: +v ufobat_
buggable New CPAN upload: Pod-Load-0.3.1.tar.gz by JMERELO modules.perl6.org/dist/Pod::Load:cpan:JMERELO 06:14
06:17 nadim joined 06:18 p6bannerbot sets mode: +v nadim
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.
06:20 vike left
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
06:35 domidumont joined
holyghost ryn1x : AFAIK, the dll must be in tour path or current dir 06:35
06:35 p6bannerbot sets mode: +v domidumont 06:39 graphene left 06:41 kktt007 left 06:43 holyghost left
ryn1x holyghost: it seems current directory is working, but not path. At least somthins is working now =) 06:44
06:44 holyghost joined 06:45 p6bannerbot sets mode: +v holyghost 06:50 nadim left 06:54 sno left 06:55 domidumont left 06:59 sno joined 07:00 p6bannerbot sets mode: +v sno
Geth Pod-To-HTML/master: 5 commits pushed by (JJ Merelo)++ 07:02
jmerelo ryn1x: thanks!
07:03 jmaslak left
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.
07:05 nadim joined, p6bannerbot sets mode: +v nadim
ryn1x Oh.... yeah.... I didn't do that yet since holy ghost led me to trying the current dir again.... 07:06
07:07 sno left
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?
07:12 ponbiki joined, p6bannerbot sets mode: +v ponbiki
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
07:17 domidumont joined 07:18 p6bannerbot sets mode: +v domidumont
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
07:27 abraxxa joined 07:28 p6bannerbot sets mode: +v abraxxa 07:29 jmerelo left 08:15 rindolf joined 08:16 p6bannerbot sets mode: +v rindolf 08:21 kensanata joined, p6bannerbot sets mode: +v kensanata 08:24 nelsonhb joined 08:25 p6bannerbot sets mode: +v nelsonhb
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/
08:44 ryn1x left 08:45 finanalyst left, finanalyst joined 08:46 p6bannerbot sets mode: +v finanalyst 08:47 dakkar joined, p6bannerbot sets mode: +v dakkar 08:57 zakharyas joined, |oLa| joined, p6bannerbot sets mode: +v zakharyas 08:58 p6bannerbot sets mode: +v |oLa| 09:08 sno joined, p6bannerbot sets mode: +v sno 09:15 sno left 09:16 sno joined 09:17 p6bannerbot sets mode: +v sno 09:25 yqt joined, p6bannerbot sets mode: +v yqt
lizmat Perl is 31 today 09:41
[ptc] \o/ 09:42
09:48 vike joined, Cabanossi left, p6bannerbot sets mode: +v vike 09:49 Cabanossi joined 09:50 p6bannerbot sets mode: +v Cabanossi 09:56 yatung left 10:08 tobs` joined 10:09 p6bannerbot sets mode: +v tobs` 10:44 sno left 10:49 Ulti left 10:55 Ulti joined 10:56 p6bannerbot sets mode: +v Ulti 11:05 finanalyst left, finanalyst joined 11:06 p6bannerbot sets mode: +v finanalyst, domidumont left 11:09 finanalyst left 11:10 finanalyst joined, p6bannerbot sets mode: +v finanalyst
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?
11:25 sno joined 11:26 p6bannerbot sets mode: +v sno 11:28 finanalyst left 11:30 kurahaupo left 11:31 kurahaupo joined, lichtkind left 11:32 p6bannerbot sets mode: +v kurahaupo
kensanata nadim: Weird. Sounds like you're missing a p. perl 5 is required to compile it, I think. 11:34
11:35 sno left
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
11:44 lichtkind joined, p6bannerbot sets mode: +v lichtkind 11:47 hotbobby20 joined 11:48 p6bannerbot sets mode: +v hotbobby20
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
11:52 hotbobby20 left
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 :)
12:10 |oLa| left
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?
12:18 schmjueg joined 12:19 p6bannerbot sets mode: +v schmjueg 12:21 schmjueg left 12:22 lucasb joined, p6bannerbot sets mode: +v lucasb, schmjueg joined, schmjueg left 12:27 sno joined 12:28 p6bannerbot sets mode: +v sno
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
12:55 zakharyas left 12:57 domidumont joined 12:58 p6bannerbot sets mode: +v domidumont 13:10 babayaga joined, p6bannerbot sets mode: +v babayaga 13:11 babayaga left 13:30 mowcat left 13:33 jmerelo joined 13:34 p6bannerbot sets mode: +v jmerelo
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.
13:58 finanalyst joined
jmerelo I mean, there might be a solid use case for doing that... 13:58
13:58 p6bannerbot sets mode: +v finanalyst
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
14:13 zakharyas joined, p6bannerbot sets mode: +v zakharyas 14:15 nelsonhb left 14:19 sno left, jmerelo left 14:29 lookatme_q left, leont joined 14:30 p6bannerbot sets mode: +v leont 14:31 lookatme_q joined 14:32 domidumont left, p6bannerbot sets mode: +v lookatme_q 14:33 domidumont joined 14:34 p6bannerbot sets mode: +v domidumont 14:42 domidumont left 14:45 domidumont joined 14:46 p6bannerbot sets mode: +v domidumont 14:48 curan left, Cabanossi left 14:49 Cabanossi joined 14:50 p6bannerbot sets mode: +v Cabanossi 14:51 domidumont1 joined 14:52 p6bannerbot sets mode: +v domidumont1 14:54 domidumont left 15:10 Xliff_ joined 15:11 p6bannerbot sets mode: +v Xliff_ 15:12 Xliff left 15:18 nelsonhb joined, nelsonhb left 15:32 nadim left 15:42 nadim joined, p6bannerbot sets mode: +v nadim 16:12 ferreira joined 16:13 p6bannerbot sets mode: +v ferreira 16:14 nadim left 16:21 xinming joined
ufobat_ the | in foo(bar => | <something> ); is not this one, is it? docs.perl6.org/syntax/%7C 16:21
16:22 p6bannerbot sets mode: +v xinming, rindolf left
jnthn No, it'll be the prefix:<|> which makes a Slip 16:23
16:23 xinming_ left
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?
16:24 irdr left 16:26 kurahaupo left
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
16:26 rindolf joined
jnthn Because attribute initialization is assignment semantics, and parameters use binding semantics 16:27
16:27 p6bannerbot sets mode: +v rindolf
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
16:33 lichtkind left
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
16:38 jmerelo joined 16:39 p6bannerbot sets mode: +v jmerelo
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
16:48 finanalyst left 16:56 kensanata left
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
17:02 tobs` left
jmerelo .tell jnthn how's your article for the 22th coming up? 17:04
yoleaux jmerelo: I'll pass your message to jnthn.
17:04 hythm_ joined, p6bannerbot sets mode: +v hythm_
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
17:08 rindolf left 17:11 hythm_ left 17:13 loops left 17:14 loops joined, sena_kun joined 17:15 p6bannerbot sets mode: +v loops, p6bannerbot sets mode: +v sena_kun, rindolf joined 17:16 p6bannerbot sets mode: +v rindolf 17:24 loops left 17:26 SqrtNegInf left
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
17:31 dakkar left, loops joined 17:32 p6bannerbot sets mode: +v loops
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?
17:36 mowcat joined, sno joined
Geth advent: f90521b570 | (Aleks-Daniel Jakimenko-Aleksejev)++ | perl6advent-2018/schedule
Define topic for 23rd

Although I can change my mind…
17:37
17:37 khisanth__ left, p6bannerbot sets mode: +v mowcat, p6bannerbot sets mode: +v sno
sena_kun lol 17:37
AlexDaniel xD
sena_kun AlexDaniel, that's a nice joke. :D 17:38
jmerelo AlexDaniel: good!
17:39 hythm_ joined, p6bannerbot sets mode: +v hythm_
jnthn haha :) 17:40
17:42 SqrtNegInf joined 17:43 p6bannerbot sets mode: +v SqrtNegInf
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
17:47 roguelazer joined, roguelazer left
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
17:49 khisanth__ joined
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
17:50 p6bannerbot sets mode: +v khisanth__
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)]]
17:53 domidumont1 left
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
18:02 nadim joined
jmerelo Some using Windows could help here? github.com/perl6/doc/issues/2513 18:02
18:03 p6bannerbot sets mode: +v nadim
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
18:09 sno left 18:16 hythm_ left, nadim left 18:18 sno joined 18:19 p6bannerbot sets mode: +v sno, hythm_ joined, p6bannerbot sets mode: +v hythm_
hythm_ github.com/rakudo/rakudo/issues/2554 18:20
18:20 hythm_ left 18:27 sno left 18:28 irdr joined
jmerelo New question about BEGIN in Stackoverflow stackoverflow.com/questions/538390...-or-is-run 18:28
18:29 p6bannerbot sets mode: +v irdr
jmerelo remember, post your questions (also) there :-) 18:29
Still some questions unanswered, like this one by tyil stackoverflow.com/q/53692507/891440
18:55 molaf joined 18:56 p6bannerbot sets mode: +v molaf 19:30 zakharyas left 19:36 Okinz0 joined 19:37 p6bannerbot sets mode: +v Okinz0 19:42 Okinz0 left
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
19:51 jmerelo left
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
20:25 marmor joined 20:26 p6bannerbot sets mode: +v marmor 20:30 sno joined 20:31 p6bannerbot sets mode: +v sno 20:32 lizmat left 20:38 melezhik joined, p6bannerbot sets mode: +v melezhik
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
20:40 nadim joined
sena_kun `:$foo` maybe? 20:40
moritz $foo?
just like other optional params
or give it a default value 20:41
20:41 p6bannerbot sets mode: +v nadim
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
20:46 molaf left
nadim hmm, there a #perl6 channel on scuttlebutt, we're obviously everywhere 20:56
21:01 lizmat joined, p6bannerbot sets mode: +v lizmat
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
21:21 rindolf left 21:22 rindolf joined 21:23 p6bannerbot sets mode: +v rindolf
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
21:42 marmor left
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
22:01 lucasb left 22:02 felher left 22:07 kent\n left 22:10 rindolf left 22:11 kent\n joined, p6bannerbot sets mode: +v kent\n 22:16 sena_kun left, kent\n left 22:19 kent\n joined, p6bannerbot sets mode: +v kent\n, jast left 22:21 jast joined 22:22 p6bannerbot sets mode: +v jast 22:24 kent\n left 22:28 kent\n joined, p6bannerbot sets mode: +v kent\n 22:33 kent\n left 22:39 kent\n joined, p6bannerbot sets mode: +v kent\n 23:03 go|dfish left
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
23:11 melezhik left 23:12 nadim left 23:13 go|dfish joined, p6bannerbot sets mode: +v go|dfish
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
23:22 yqt left
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