»ö« 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:01 hamhu3 left 00:03 w_richard_w joined, p6bannerbot sets mode: +v w_richard_w 00:04 w_richard_w left 00:05 sotona joined 00:06 p6bannerbot sets mode: +v sotona 00:10 hamhu3 joined 00:11 p6bannerbot sets mode: +v hamhu3 00:18 mcmillhj joined 00:19 p6bannerbot sets mode: +v mcmillhj 00:23 mcmillhj left 00:28 cjkinni left, aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 00:29 cjkinni joined, p6bannerbot sets mode: +v aborazmeh, p6bannerbot sets mode: +v cjkinni 00:37 sotona left 00:38 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 00:42 mcmillhj left 00:57 mcmillhj joined 00:58 p6bannerbot sets mode: +v mcmillhj 01:02 mcmillhj left 01:13 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 01:15 mahafyi joined, p6bannerbot sets mode: +v mahafyi 01:17 graphene left, mcmillhj left 01:19 graphene joined 01:20 p6bannerbot sets mode: +v graphene, mahafyi left 01:28 hamhu3 left 01:29 hamhu3 joined, mcmillhj joined 01:30 p6bannerbot sets mode: +v hamhu3, p6bannerbot sets mode: +v mcmillhj 01:31 ZzZombo left 01:34 mcmillhj left 01:39 chenyf_ joined 01:40 p6bannerbot sets mode: +v chenyf_ 01:44 mcmillhj joined 01:45 p6bannerbot sets mode: +v mcmillhj 01:48 mcmillhj left 01:55 sotona joined 01:56 p6bannerbot sets mode: +v sotona 02:12 Xliff left 02:16 mcmillhj joined 02:17 ufobat_ joined, p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v ufobat_ 02:20 ufobat left 02:21 mcmillhj left 02:28 sotona left, mcmillhj joined 02:29 p6bannerbot sets mode: +v mcmillhj 02:33 mcmillhj left 02:45 stux|RC-only left, kent\n left 02:47 kent\n joined, p6bannerbot sets mode: +v kent\n, stux|RC-only joined 02:48 p6bannerbot sets mode: +v stux|RC-only 02:54 ggoebel left 03:00 mcmillhj joined 03:01 p6bannerbot sets mode: +v mcmillhj 03:03 lindylex joined, p6bannerbot sets mode: +v lindylex 03:05 mcmillhj left 03:06 lindylex left 03:08 ggoebel joined 03:09 cog left, p6bannerbot sets mode: +v ggoebel 03:13 lizmat left 03:19 john_parr joined 03:20 p6bannerbot sets mode: +v john_parr 03:21 molaf joined, p6bannerbot sets mode: +v molaf 03:26 sotona joined 03:27 p6bannerbot sets mode: +v sotona 03:29 Ven` joined 03:30 p6bannerbot sets mode: +v Ven` 03:33 mcmillhj joined 03:34 Ven` left, molaf left, p6bannerbot sets mode: +v mcmillhj 03:38 mcmillhj left 03:44 mcmillhj joined 03:45 p6bannerbot sets mode: +v mcmillhj 03:48 mcmillhj left 03:55 lindylex joined 03:56 p6bannerbot sets mode: +v lindylex 03:58 sotona left
Kaiepi how come i get "Cannot look up attributes in a PSBot::Parser::MessageBlock type object" in this code? hastebin.com/alidosudup.cs 04:07
oh, i screwed up the grammar 04:18
never mind
04:19 mcmillhj joined 04:20 p6bannerbot sets mode: +v mcmillhj 04:21 aborazmeh left 04:24 mcmillhj left 04:25 Actualeyes joined, p6bannerbot sets mode: +v Actualeyes 04:31 Possum left
Kaiepi ok the grammar doesn't work when there's more than one <message> 04:36
like parsing '>foo\n|bar|baz\n|bar|baz' fails 04:37
04:37 mcmillhj joined 04:38 p6bannerbot sets mode: +v mcmillhj 04:40 Possum joined 04:41 p6bannerbot sets mode: +v Possum 04:42 mcmillhj left 04:46 dominix joined 04:47 dominix is now known as dominix_, p6bannerbot sets mode: +v dominix_
Kaiepi ok it only fails if i use parse instead of subparse 04:47
but why?
04:49 epony left 04:50 dominix_ is now known as dominix
dominix hi everyone 04:50
is there some documentation on how this naming convention works in perl6 ? 04:51
if I "use NativeCall" perl6 refer to error on /opt/rakudo-pkg/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 04:52
what is this 24DD121B5B4774C04A7084827BFAD92199756E03 ???
there is plenty of in share/perl6/sources share/perl6/precomp share/perl6/site/precomp ... 04:53
that is WEIRD 04:54
04:54 psychoslave joined 04:55 p6bannerbot sets mode: +v psychoslave
robertle perl 6 stores the pre-compiled sources to save time next time around, and they are stored in a content-addressable form. so the 24DD121B... is a hash of stuff to make it easy to look up the file required 05:01
05:06 cjkinni left 05:07 cjkinni joined, mcmillhj joined 05:08 p6bannerbot sets mode: +v cjkinni, p6bannerbot sets mode: +v mcmillhj 05:12 mcmillhj left
buggable New CPAN upload: PDF-Font-Loader-0.2.2.tar.gz by WARRINGD modules.perl6.org/dist/PDF::Font::L...n:WARRINGD 05:14
05:25 robertle left 05:32 cjkinni left 05:33 cjkinni joined
buggable New CPAN upload: IRC-Client-Plugin-UrlTitle-1.1.2.tar.gz by TYIL modules.perl6.org/dist/IRC::Client:...:cpan:TYIL 05:34
05:34 p6bannerbot sets mode: +v cjkinni 05:35 mahafyi joined, sauvin joined, p6bannerbot sets mode: +v sauvin
tyil weekly: www.tyil.nl/post/2018/09/13/hacker...l6-part-1/ 05:36
notable6 tyil, Noted!
05:36 p6bannerbot sets mode: +v mahafyi
mahafyi tyil, this is nice post! 05:37
tyil thanks :D
I intend to write more posts like this
05:37 lindylex left
tyil maybe I can do them with other languages than Python too 05:39
05:40 mcmillhj joined 05:41 p6bannerbot sets mode: +v mcmillhj
mahafyi i am trying to move up the JS world, through react and into redux, lol. I plan to make site for perl 6 bounties, where people can ask for some problem to be solved if they can pay for it. i'd use it (a lot) myself 05:42
tyil $work is also going to use React in the (near?) future 05:43
but that's for the frontenders, not me :p
on your site idea, while I like the idea, I'm not sure if it'll be used much, as you're dealing with moneys so people generally prefer to use a site with existing (positive) reputation 05:44
I know there's bountysource, but I don't know of any bounty site witha good rep
mahafyi what are existing popular sites?
ah ok 05:45
05:45 mcmillhj left
tyil if you're going to make it, check out Cro :> 05:45
they have a thorough tutorial to set it up with react 05:46
mahafyi yes sure. in fact i came upon redux, from cro docs only, hehe
tyil heh
heh, the post I made is getting downvotes on both /r/python and /r/programming 05:47
05:47 sena_kun joined
tyil not sure if the post is not as good as I hoped, or people still have a strong bias against Perl 05:48
05:48 p6bannerbot sets mode: +v sena_kun
sena_kun o/ 05:49
mahafyi its crazy, i told someone i am trying to use perl 6 as much as possible, and he said 'no problem using an antiquated stack, but there will be terrible and unique problems for you'
so, i would say it is bias
the mini maxi is , well extraordinary, i am trying to wrap my head around it 05:52
05:57 TreyHarris left 05:59 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
tyil its interesting that people can have this much hate towards something they dont know 05:59
I guess I can think about it positively in that the Perl community is more welcome to differing opinions than the Python community :p 06:00
perlawhirl tyil: cool stuff... i been working on hackerrank probs in p6 too.
tyil nice
do you keep notes about it too? 06:01
06:01 psychoslave left
perlawhirl i did plus-minus like this: xs.grep($_) ÷ @xs for * > 0, * < 0, * == 0; 06:01
yeah, i have been thinking about writing a post about it too 06:02
06:02 psychoslave joined
perlawhirl those haskellrank videos is what originally got me interested, so my solutions are more on the functional side 06:03
tyil that's a nice plus-minus, but a tad too terse for me
06:03 p6bannerbot sets mode: +v psychoslave
tyil that'd be cool to read, I want to become better at functional style programming 06:03
perlawhirl the function argument destructuring comes in real handy for later problems
tyil mahafyi: the Perl 6 solution to mini-maxi?
perlawhirl i didn't even create a sub for mini-maxi... just this: say "{.min} {.max}" with [words.combinations(4).classify(*.sum).keys] 06:05
El_Che mahafyi: I think it's mostly ignorance, not making a distinction between and older language (where the bias applies) and a newer language
perlawhirl that's the whole thing
not all my solutions are so golf-ish
tyil I'd like to see your solutions with explanations, if you have time to write a post about it perlawhirl 06:06
perlawhirl to given an example of the destructuring... for 'bon-appetit' you are given 3 lines, first line has 2 ints n and k, the second line is the bill (a list of ints), and the third line is another int b 06:07
i run my solve function as so: lines.map: *.words.map: *.Int 06:08
and then solve sig looks like this: my &solve := -> (($n, $k), $bill, ($b))
tyil that looks nice 06:09
06:09 khisanth_ joined
perlawhirl so the lines get turned into a list of lists, which then get destructured in the signature into 4 arguments. 06:09
i hope that makes sense... i will definitely have to do a write up
tyil wouldn't you want a @bill though, since it's a list of ints?
06:10 p6bannerbot sets mode: +v khisanth_
perlawhirl yes that works too 06:10
06:11 Khisanth left
perlawhirl i originally went with @bill... but $bill is immutable. so i figure that's more functional-ish 06:11
06:12 jdrab left
tyil do put a reference to your post in the weekly once you publish it, I'd love to read it :> 06:12
06:13 mcmillhj joined, TreyHarris left, p6bannerbot sets mode: +v mcmillhj
perlawhirl will do. FYI, i post stuff on 0racle.info ... though $life has been hectic lately, so I haven't had a chance to really play around much 06:14
06:15 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
tyil no https?: < 06:15
perlawhirl erm... i'll uh... get around to it one day :/ 06:16
06:17 mcmillhj left
perlawhirl dammit jim, i'm a network engineer not a web developer! 06:17
06:20 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo, ZzZombo left 06:21 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 06:22 robertle joined, p6bannerbot sets mode: +v robertle 06:29 psychoslave left
mahafyi El_Che : i agree, but i did want to participate in the naming / re-naming discussions, as I still on the peripharals of this community. However, this is the second example of this happening in my little world. It may be worth to pursue a name change IMHO. 06:32
06:35 Actualeyes left
El_Che mahafyi: yes, I have had the same experience 06:35
The *only* people that seem to know Perl 6 is a new language are Perl 5 people. We've had many discussions about it in the past, nothing sticked. 06:36
(my statement is not absolute, but my experience)
lookatme_q rename is a good idea 06:37
El_Che lookatme_q: that's a can of worms
lookatme_q When you searched Perl in search engine, there's only Perl 5 06:38
06:39 rindolf joined
moritz who's gonna rename the published, printed books? 06:39
ZzZombo Yeah, that complicates things...
06:40 p6bannerbot sets mode: +v rindolf
ZzZombo when you search basically anythiing and Google is like, what do you mean 6? 06:40
Here you go, Perl monks.
06:40 Possum left 06:41 zxcvz joined 06:42 p6bannerbot sets mode: +v zxcvz
El_Che moritz: books are outdated the day they are out 06:42
moritz: certainly on fastly changing languages
moritz: you should deliver stickers with possible names with your new books :) 06:43
06:43 TreyHarris left
robertle aftermarket upsell opportunity! 06:43
El_Che moritz: top 1 search result for Perl 6 on O'Reilly's safari was a Perl6 book from mid last decade 06:44
06:44 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 06:45 mcmillhj joined 06:46 p6bannerbot sets mode: +v mcmillhj 06:47 epony joined, p6bannerbot sets mode: +v epony 06:48 hamhu3_ joined 06:49 p6bannerbot sets mode: +v hamhu3_ 06:50 mcmillhj left 06:51 hamhu3 left 06:53 sena_kun left 06:54 dominix_ joined 06:55 p6bannerbot sets mode: +v dominix_ 06:57 dominix_ left 06:58 dominix left, TreyHarris left 06:59 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 07:00 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 07:01 Possum joined 07:02 p6bannerbot sets mode: +v Possum 07:05 mcmillhj left
moritz El_Che: I'm not aware of any code snippet in any of my books that has stopped working 07:08
07:13 TreyHarris left 07:18 domidumont joined 07:19 p6bannerbot sets mode: +v domidumont, rindolf left
jast isn't the new name already decided, I thought we'd all settled on TLFKAP 07:20
or TLFKAP6
07:21 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 07:26 rindolf joined 07:27 p6bannerbot sets mode: +v rindolf 07:30 zakharyas joined, mcmillhj joined 07:31 p6bannerbot sets mode: +v zakharyas, p6bannerbot sets mode: +v mcmillhj 07:35 TreyHarris left 07:36 mcmillhj left 07:40 dakkar joined 07:41 p6bannerbot sets mode: +v dakkar 07:43 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris, mcmillhj joined 07:44 p6bannerbot sets mode: +v mcmillhj 07:47 mcmillhj left, lizmat joined 07:48 p6bannerbot sets mode: +v lizmat
lizmat Q from FaceBook: can you run Perl 6 from Java? 07:51
07:51 Ven` joined 07:52 p6bannerbot sets mode: +v Ven` 07:53 graphene left 07:55 graphene joined 07:56 p6bannerbot sets mode: +v graphene 07:57 TreyHarris left 08:02 scimon joined 08:03 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris, p6bannerbot sets mode: +v scimon
lizmat weekly: www.tyil.nl/post/2018/09/13/hacker...l6-part-1/ 08:04
notable6 lizmat, Noted!
08:04 zakharyas left 08:05 zakharyas joined 08:06 p6bannerbot sets mode: +v zakharyas
Ulti tyil: you wrote @ar.reduce(sub ($a, $b) { $a + $b }) is that in preference to @ar.reduce({ $^a + $^b }) ? my personal pref is the latter but Im sort of aware it takes a lot more Perl 6 to know what its doing, but at least quite guessable 08:12
08:13 mcmillhj joined
tyil I went with the former because it's more readable to someone with no experience in Perl 6 (such as Python users) 08:13
AlexDaniel tyil: why use parens in `if ($_ > $size) {` ?
08:13 p6bannerbot sets mode: +v mcmillhj
tyil because I find it cleaner 08:13
08:14 graphene left
AlexDaniel but the same example in python has no () ? 08:15
tyil that's python 08:16
different languages, different syntax/style/preferences
08:17 TreyHarris left, mcmillhj left, graphene joined
AlexDaniel but you wrote `if (i > 0):` in a different example 08:18
08:18 p6bannerbot sets mode: +v graphene
AlexDaniel oops, I mean 08:18
`if a[i] > b[i]:`
or no… I actually meant the other one :) 08:19
point is, you use both
Geth doc: c8452d329b | 陈梓立++ (committed using GitHub Web editor) | CREDITS
update self info
08:22
08:23 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 08:24 renormalist left
tyil I guess I can take a closer look later if you have something to point out 08:25
don't forget you can also leave comments on the reddit thread, if that makes it easier to foramt 08:26
format, even
08:27 mcmillhj joined 08:28 p6bannerbot sets mode: +v mcmillhj 08:30 renormalist joined 08:31 p6bannerbot sets mode: +v renormalist, mcmillhj left, renormalist left 08:32 renormalist joined 08:33 p6bannerbot sets mode: +v renormalist 08:35 Ven` left 08:38 TreyHarris left 08:39 mahafyi left 08:42 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 08:43 x[LGWs4x4i]uG2N0 joined 08:44 p6bannerbot sets mode: +v x[LGWs4x4i]uG2N0
scimon My only sadness was that you can't acutally USE Perl6 on hackerrank. 08:48
08:50 Ven` joined 08:51 p6bannerbot sets mode: +v Ven`
tyil that is correct 08:56
08:56 TreyHarris left 09:00 psychoslave joined 09:01 mcmillhj joined, p6bannerbot sets mode: +v psychoslave 09:02 p6bannerbot sets mode: +v mcmillhj, zakharyas left, zakharyas joined 09:03 p6bannerbot sets mode: +v zakharyas 09:04 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 09:05 zakharyas left, zakharyas joined 09:06 mcmillhj left, p6bannerbot sets mode: +v zakharyas
scimon For "Birthday Cake Candles" could you put @ar in a Bag? Would that work? 09:07
El_Che moritz: patience :) 09:08
09:11 ufobat_ is now known as ufobat 09:18 TreyHarris left, graphene left 09:19 graphene joined 09:20 p6bannerbot sets mode: +v graphene 09:22 TreyHarris joined 09:23 p6bannerbot sets mode: +v TreyHarris, noganex_ left 09:37 TreyHarris left 09:41 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 09:43 mcmillhj joined 09:44 p6bannerbot sets mode: +v mcmillhj 09:46 hamhu3_ left, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 09:48 mcmillhj left 09:50 hamhu3 joined 09:51 p6bannerbot sets mode: +v hamhu3, cognominal-p6 joined 09:52 mahafyi joined, p6bannerbot sets mode: +v cognominal-p6 09:53 p6bannerbot sets mode: +v mahafyi, x[LGWs4x4i]uG2N0 left 09:55 domidumont left, domidumont joined 09:56 p6bannerbot sets mode: +v domidumont 09:57 mcmillhj joined, x[LGWs4x4i]uG2N0 joined 09:58 p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v x[LGWs4x4i]uG2N0 10:01 TreyHarris left, mcmillhj left 10:02 Hor|zon left 10:06 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 10:09 harrison joined 10:10 mahafyi left, p6bannerbot sets mode: +v harrison 10:16 ZzZombo left 10:20 TreyHarris left 10:25 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 10:26 mcmillhj joined, laminowany joined, p6bannerbot sets mode: +v mcmillhj 10:27 p6bannerbot sets mode: +v laminowany 10:28 noganex joined 10:29 p6bannerbot sets mode: +v noganex 10:30 mcmillhj left 10:33 spycrab0 joined, p6bannerbot sets mode: +v spycrab0 10:37 chenyf_ left 10:40 TreyHarris left 10:45 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 10:48 hamhu3_ joined, p6bannerbot sets mode: +v hamhu3_ 10:50 hamhu3 left 10:52 hamhu3_ left, sotona joined 10:53 hamhu3 joined, p6bannerbot sets mode: +v sotona, hamhu3 left 10:54 hamhu3 joined, p6bannerbot sets mode: +v hamhu3 10:56 lizmat left, Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix moritz: and who's going to rename my license plate! :D 10:56
10:57 sotona left
Zoffix I love how the argument against rename that started before we had published books has changed into troubles renaming published books 10:57
moritz as always, the longer you wait, the more pain you have 10:58
Zoffix At the Code'n'Coffee meeting I attend every 2nd week: people either don't know wtf Perl 6 is or assume I'm using Perl 5.
(the "never heard of it" crowd is the majority)
11:00 TreyHarris left 11:01 chenyf_ joined, p6bannerbot sets mode: +v chenyf_ 11:05 lizmat joined, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 11:06 p6bannerbot sets mode: +v lizmat 11:07 Ven` left 11:14 aborazmeh left, blackberry9900 joined 11:15 p6bannerbot sets mode: +v blackberry9900 11:16 Zoffix left, zakharyas left 11:20 TreyHarris left 11:23 japhb_ left
buggable New CPAN upload: Reaper-Control-0.0.1.tar.gz by SAMGWISE cpan.metacpan.org/authors/id/S/SA/...0.1.tar.gz 11:24
11:25 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 11:26 psychoslave left
El_Che Zoffix: maybe it's an age thing. "Older" people think Perl6 is the latest release of Perl 5. I can assume people just out of school haven't work or seen Perl (5 or 6) ever 11:32
11:39 TreyHarris left 11:42 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 11:44 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 11:53 psychoslave joined, mahafyi joined 11:54 p6bannerbot sets mode: +v psychoslave, p6bannerbot sets mode: +v mahafyi 11:56 cog joined, Zoffix joined, p6bannerbot sets mode: +v Zoffix 11:57 p6bannerbot sets mode: +v cog, TreyHarris left
Zoffix El_Che: nah, not an age. Experience. (an older person can be new to programming). The noobs at the meeting are usually trying out Python and some hardware nerds are in the C/C++ land. They are in the never heard of it crowd. And the more experienced ones that have heard of Perl, as you said, just think Perl 6 is one of the versions and even drop the "6" in later conversions ("you're the Perl guy, right"). 11:58
11:59 cognominal-p6 left
Zoffix And the people who were interested in learning some new language wanted to use something for hardware/web, and I had to mention the performance drawback 11:59
So it's not like the name is the only thing holding Perl 6 back. 12:00
12:00 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
Zoffix And I know some people say "you can just explain the difference between perl 5/perl 6".... I don't know what they're talking about. It's a hard thing to work into a discussion 12:03
12:05 Ven` joined
moritz agreed, that's not easy 12:05
Zoffix "What do you work on?" "I'm hacking on this RPi with C" "You?" "Doing AI with python" "You" "Making a media system for my car in Perl 6… YES YOU MAY HAVE HEARD OF PERL BUT IT'S NOT THE SAME THING AS MINE… IT'S LIKE A SYSTER LANGUAGE"
12:05 p6bannerbot sets mode: +v Ven` 12:10 Zoffix left
AlexDaniel and a bit later “he is working on a media system for his car in Perl” “Yes, Perl **6**” 12:12
12:12 blackberry9900 left
AlexDaniel “is “6” that important?” somebody asked me a few days ago :) 12:12
12:12 blackberry9900 joined 12:13 p6bannerbot sets mode: +v blackberry9900
tadzik :) 12:13
12:14 TreyHarris left, blackberry9900 left 12:16 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 12:18 sena_kun joined 12:19 p6bannerbot sets mode: +v sena_kun 12:31 TreyHarris left 12:34 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 12:36 psychoslave left 12:38 psychoslave joined 12:39 p6bannerbot sets mode: +v psychoslave 12:44 zakharyas joined 12:45 p6bannerbot sets mode: +v zakharyas, mcmillhj joined 12:46 p6bannerbot sets mode: +v mcmillhj
Geth doc: 5fcaa5e4b3 | (JJ Merelo)++ | doc/Type/Signature.pod6
Explains difference between default values for params and variables.

This closes #1669. Uses (slightly modified) example proposed by the OP, and tries to motivate the different treatment of default values.
12:47
synopsebot Link: doc.perl6.org/type/Signature
12:48 TreyHarris left 12:50 laminowany left 12:52 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 12:57 robertle left 13:04 zakharyas left
Geth doc: cd273909ec | (JJ Merelo)++ | doc/Type/Signature.pod6
Reflow and rephrasing
13:05
synopsebot Link: doc.perl6.org/type/Signature
13:05 zakharyas joined 13:06 p6bannerbot sets mode: +v zakharyas, TreyHarris left 13:10 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 13:11 araraloren joined, p6bannerbot sets mode: +v araraloren
araraloren Can I embed the document to my source code ? 13:16
13:25 TreyHarris left
El_Che araraloren: what document? the code documentation? 13:26
13:29 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
araraloren yeah El_Che 13:30
13:31 harrison left
araraloren I checkout the pod6 documents now 13:31
13:43 TreyHarris left 13:47 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 13:49 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 14:01 TreyHarris left 14:04 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 14:08 Herby_ joined, p6bannerbot sets mode: +v Herby_
Herby_ \o 14:10
14:15 zakharyas left 14:16 zakharyas joined 14:17 p6bannerbot sets mode: +v zakharyas 14:18 TreyHarris left, graphene left 14:19 ZzZombo_ joined 14:20 p6bannerbot sets mode: +v ZzZombo_, graphene joined, p6bannerbot sets mode: +v graphene 14:21 yqt joined, ZzZombo left 14:22 p6bannerbot sets mode: +v yqt 14:23 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 14:27 aborazmeh left 14:32 MasterDuke left 14:37 TreyHarris left 14:41 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 14:46 ZzZombo_ left, ZzZombo_ joined, card.freenode.net sets mode: +v ZzZombo_, p6bannerbot sets mode: +v ZzZombo_, ZzZombo_ is now known as ZzZombo 14:50 lizmat left 14:55 TreyHarris left 14:56 robertle joined 14:57 p6bannerbot sets mode: +v robertle, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 15:02 psychoslave left 15:03 psychoslave joined, p6bannerbot sets mode: +v psychoslave 15:04 zakharyas left, ExtraCrispy joined 15:05 zakharyas joined, p6bannerbot sets mode: +v ExtraCrispy 15:06 p6bannerbot sets mode: +v zakharyas 15:07 psychoslave left, Zoffix joined, p6bannerbot sets mode: +v Zoffix 15:10 Zoffix left 15:12 TreyHarris left, guest-68 joined, p6bannerbot sets mode: +v guest-68 15:14 guest-68 left 15:16 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 15:24 marcusramberg is now known as marcusr 15:26 marcusr left, marcusr joined, hitchcock.freenode.net sets mode: +v marcusr, p6bannerbot sets mode: +v marcusr 15:31 TreyHarris left, graphene left 15:33 graphene joined 15:34 p6bannerbot sets mode: +v graphene, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
araraloren m: sub f($*a) {}; given &f.signature.params.[0] { say .twigil; say . } 15:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at <tmp>:1
------> 3gnature.params.[0] { say .twigil; say . 7⏏5}
araraloren m: sub f($*a) {}; given &f.signature.params.[0] { say "{.sigil}{.twigil} - {.name}"; }
camelia $ - $*a
araraloren Where the twigil ?? 15:36
Is someone know it, I will go to sleep now :)
m: given :($*a).params.[0] { say .name; say .sigil; say .twigil; } 15:39
camelia $*a
$
araraloren A more quick test
15:42 dogbert17 left 15:44 araraloren left 15:48 TreyHarris left 15:51 yqt left 15:52 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 16:02 domidumont left 16:05 zakharyas left 16:06 TreyHarris left 16:09 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 16:12 zakharyas joined 16:13 p6bannerbot sets mode: +v zakharyas 16:14 scimon left, vrurg left 16:20 robertle left 16:22 mahafyi left 16:24 TreyHarris left, molaf joined, p6bannerbot sets mode: +v molaf 16:27 mahafyi joined, sotona joined, p6bannerbot sets mode: +v mahafyi, p6bannerbot sets mode: +v sotona 16:28 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 16:31 sotona left
ofperfection[m] sent a long message: < matrix.org/_matrix/media/v1/downlo...JNsPuwYnBV > 16:36
timotimo ofperfection[m]: the only thing missing is calling .Str on the result of the smart match operator to get from the match object (which has structure held in it if you have captures and such) to only the string that was matched 16:37
ofperfection[m] perfect, thank you! 16:38
16:38 dakkar left
ofperfection[m] is there a way to parse the output of the match object, such as returning just $0 or $1 16:39
timotimo well, in this case you don't have any capturing groups, so there's no $0 or $1 16:40
otherwise you can either use $0, $1, ... or $/[0], $/[1], ...
16:41 chenyf_ left 16:42 mahafyi left, TreyHarris left 16:44 zakharyas left
Herby_ timotimo: o/ 16:45
timotimo \o
Herby_ how goes your CA stuff?
timotimo haven't continued on it since last i posted
except i made it a bunch faster by making the code uglier
16:47 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
Herby_ there is beauty in ugliness 16:52
or something like that
timotimo eventually the project will turn into a compiler of sorts that'll build the fast code for you 16:53
based on individual pieces that should be able to cooperate
16:56 Ven` left
ofperfection[m] if I wanted to incorporate getting ~$0 in the code above, would I do that in the smart match or run a function on the match object 16:57
I'm going to do a simple write up on this probably for other noobs like myself once I've got a better grasp
timotimo you can put it into one line, still
m: my $input = "1 foo"; my $result = ($input ~~ / (\d+) \s* (\w+) /)[0].Str; say $result.perl 16:58
camelia "1"
timotimo m: my $input = "1 foo"; my $result = ($input ~~ / (\d+) \s* (\w+) /)[1].Str; say $result.perl
camelia "foo"
16:58 ccc joined 16:59 p6bannerbot sets mode: +v ccc
ofperfection[m] Thanks again timotimo, I really am trying to figure it out first. 16:59
ccc Is there a way for a role to "has" an attribute and expect the doers of the role to initialize it? 17:00
17:00 robertle joined
ccc Or must a role provide a new multi method to initialize any attribute it provides? 17:01
17:01 TreyHarris left, p6bannerbot sets mode: +v robertle
timotimo ccc: maybe you can set the default value inside the role to "= die 'must initialize attribute blah'" or something 17:01
ofperfection[m]: you can do the smart match in one line without an assignment and in the next line access ~$0 or $/ or what ever you need 17:02
17:03 kerframil joined, p6bannerbot sets mode: +v kerframil 17:05 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 17:06 noganex left
ccc Wem: role Tst {has Set $!set; method elems{$!set.elems}} class Foo does Tst{method new(Set $set) {self.bless($:set)} submethod BUILD(:$set) {$!set = $set}} my $x = Foo.new(set(2,3,5)); $x.elems 17:06
17:07 noganex joined
ccc m: role Tst {has Set $!set; method elems{$!set.elems}} class Foo does Tst{method new(Set $set) {self.bless($:set)} submethod BUILD(:$set) {$!set = $set}} my $x = Foo.new(set(2,3,5)); $x.elems 17:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3as Set $!set; method elems{$!set.elems}}7⏏5 class Foo does Tst{method new(Set $set)
expecting any of:
17:07 p6bannerbot sets mode: +v noganex 17:08 chenyf_ joined, p6bannerbot sets mode: +v chenyf_
ofperfection[m] timotimo Can you explain that syntactically? Do you mean in the sense that you access the match in brackets on the match object stored in the variable? 17:15
i.e. $match-object[0]
or $match-object~$0
17:18 lizmat joined
timotimo no, $0 is syntax for $/[0] 17:18
if you put the result of the smart match operator into, for example, $match-object, you'd just write $match-object[0] 17:19
17:19 p6bannerbot sets mode: +v lizmat
timotimo but smart matching against regexes will also set $/ for you 17:19
(which can cause errors when $/ is not read-write for some reason, for example if you have a parameter to your sub or block named $/)
17:19 TreyHarris left
ccc m: role Tst { 17:21
has Set $!set;
method elems {
return $!set.elems;
}
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3role Tst {7⏏5<EOL>
ccc }
class Foo does Tst {
method new(Set :$set) {
self.bless(:$set)
}
submethod BUILD (:$set) {
$!set = $set;
}
}
my $x = Foo.new(:set(set(2,3,5)));
say $x.elems
timotimo please don't put multi-line stuff into irc, it is very bad at handling that
17:22 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
ccc ok, just trying to demonstrate that I answered my own question: yes you can let the doers of your role do the initialization of a private attribute 17:22
17:24 natrys joined
ccc when I first tried it, I didn't leave a space between the rolename and the '{' starting the class Foo body 17:24
and got some error that I didn't understand 17:25
17:25 p6bannerbot sets mode: +v natrys
timotimo it was just missing a semicolon :) 17:25
that's what it meant when it said "missing semicolon or comma?" and put a little yellow triangle before "class Foo"
ccc is there a list of all contexts in the documents? Or is this an ignorant question 17:30
timotimo what do you mean by context?
ccc list context, flatten context ... 17:31
timotimo hm, not quite sure
ccc a state of the compilation where the meaning of a term or epressions "depends"
on the context
timotimo perl6 doesn't do context as much as perl5 does 17:33
functions don't behave differently whether you're calling them in "list" or "scalar" context
instead, you'd coerce the result after the function is done
ccc but junctions behave differently if they're not in a Bool context
timotimo when you .Bool them they'll collapse, yeah 17:34
ccc and there are others scattered all over the documentation
and what I'm asking is there a list of all these kind of contexts
timotimo not sure, i don't have a good idea of the docs 17:35
ccc I gather from what you said earlier that programmers can't define their own contexts (of this kind) other than by using existing "contexts"
17:36 TreyHarris left
ccc meaning there exists a concrete list, which perhaps doesn't yet exist in the documents 17:36
timotimo you can return something that implements a Bool method and a list method and a Numeric method
ccc by constraining the return type?
timotimo no 17:37
ccc then I don't understand what you mean
timotimo m: sub does-strange-things { return class :: { method Bool { say "bool context" }; method Numeric { say "numeric context" }; method list { say "list context" } }.new }; my @a = does-strange-thing; say 5 + does-strange-thing; say so does-strange-thing 17:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
does-strange-thing used at line 1. Did you mean 'does-strange-things'?
timotimo m: sub does-strange-thing { return class :: { method Bool { say "bool context" }; method Numeric { say "numeric context" }; method list { say "list context" } }.new }; my @a = does-strange-thing; say 5 + does-strange-thing; say so does-strange-thing
camelia numeric context
6
bool context
True
timotimo ok, list wasn't the right one, because it doesn't do Positional or Iterable
17:39 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
ccc docs say class List does Iterable 17:39
timotimo OK
i'll be afk in a bit
17:41 vrurg joined 17:42 p6bannerbot sets mode: +v vrurg
ccc m: (2,3,5,7,11).iterator -> {.say} 17:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> 3(2,3,5,7,11).iterator7⏏5 -> {.say}
expecting any of:
infix
ccc m: (2,3,5,7,11).iterator
camelia ( no output )
ccc m: my $lst = 2,3,5,7,11; say $lst.iterator.WHAT 17:45
camelia WARNINGS for <tmp>:
(ReifiedListIterator)
Useless use of constant integer 5 in sink context (lines 1, 1)
Useless use of constant integer 3 in sink context (lines 1, 1)
Useless use of constant integer 11 in sink context (lines 1, 1)
Useless u…
17:48 hamhu3_ joined 17:49 p6bannerbot sets mode: +v hamhu3_ 17:51 hamhu3 left 17:53 TreyHarris left 17:54 sotona joined 17:55 p6bannerbot sets mode: +v sotona 17:58 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
SmokeMachine m: my @lst = 2,3,5,7,11; say @lst.iterator.WHAT 18:03
camelia (ReifiedArrayIterator)
SmokeMachine m: my $lst = [2,3,5,7,11]; say $lst.iterator.WHAT 18:04
camelia (ReifiedArrayIterator)
SmokeMachine ccc: ^^
m: my $i = (2,3,5,7,11).iterator; while (my $a = $i.pull-one) !=:= IterationEnd { say $a } 18:06
camelia (signal XFSZ)2
3
5
7
11
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
IterationEnd
Iterati…
18:07 vrurg left
SmokeMachine m: my $i = (2,3,5,7,11).iterator; my $a; repeat { $a = $i.pull-one; say $a } while $a<> !=:= IterationEnd 18:08
camelia 2
Type check failed in binding to parameter '<anon>'; expected Any but got Mu (IterationEnd)
in block <unit> at <tmp> line 1

3
5
7
11
IterationEnd
SmokeMachine m: my $i = (2,3,5,7,11).iterator; my Mu $a; repeat { $a = $i.pull-one; say $a } while $a<> !=:= IterationEnd
camelia 2
Type check failed in binding to parameter '<anon>'; expected Any but got Mu (IterationEnd)
in block <unit> at <tmp> line 1

3
5
7
11
IterationEnd
SmokeMachine m: my $i = (2,3,5,7,11).iterator; my Mu $a; repeat { $a := $i.pull-one; say $a } while $a<> !=:= IterationEnd
camelia 2
Type check failed in binding to parameter '<anon>'; expected Any but got Mu (IterationEnd)
in block <unit> at <tmp> line 1

3
5
7
11
18:09
SmokeMachine m: my $i = (2,3,5,7,11).iterator; my Mu $a; repeat { $a := $i.pull-one; say $a } while $a !=:= IterationEnd
camelia 2
3
5
7
11
SmokeMachine m: my $i = (2,3,5,7,11).iterator; while (my $a := $i.pull-one) !=:= IterationEnd { say $a }
camelia 2
3
5
7
11
SmokeMachine ccc: ^^ 18:10
18:12 TreyHarris left
ccc thanks SmokeMachine 18:13
18:14 epony left 18:16 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 18:19 zakharyas joined 18:20 p6bannerbot sets mode: +v zakharyas 18:23 s0me0ne-unkn0wn joined, p6bannerbot sets mode: +v s0me0ne-unkn0wn 18:24 sauvin left
AlexDaniel weekly: Alex Schroeder is playing with the idea of writing a wiki engine in Perl 6: alexschroeder.ch/wiki/2018-09-08_W...muse_be%3f 18:28
notable6 AlexDaniel, Noted!
18:30 TreyHarris left
ccc Whats the syntax for constraining an argument to a Callable that takes two Int positional arguments that returns Int 18:32
18:33 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
moritz m: sub higher-order(&foo:(Int,Int-->Int)) { } 18:34
camelia ( no output )
moritz iirc
ccc so the multifarious colon strikes again 18:35
lizmat yup, though it makes sense if you realise that that is just what the .perl of that signature is 18:42
m: sub &foo(Int $a, Int $b --> Int) {}; dd &foo.signature
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub7⏏5 &foo(Int $a, Int $b --> Int) {}; dd &fo
expecting any of:
new name to be defined
lizmat m: sub &foo(Int $a, Int $b --> Int) { }; dd &foo.signature 18:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub7⏏5 &foo(Int $a, Int $b --> Int) { }; dd &f
expecting any of:
new name to be defined
lizmat m: sub foo(Int $a, Int $b --> Int) { }; dd &foo.signature
camelia :(Int $a, Int $b --> Int)
18:48 TreyHarris left
Kaiepi what sorts of modules not listed in the most wanted modules list would people want? i'm getting tired of writing networking-related ones 18:49
SmokeMachine m: say :($a, $b).^name 18:59
camelia Signature
SmokeMachine Kaiepi: what do you think of helping on an ORM? :) 19:00
github.com/FCO/Red
Kaiepi i know next to nothing about databases 19:01
diakopter I wish I knew nothing about databases 19:02
moritz erases what diakopter knows about databases 19:03
19:03 zakharyas left
diakopter watches salty wet air rip a flag www.youtube.com/watch?v=deG4NxkouGM 19:04
19:09 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
ccc To motivate my learning perl6 I'm working on a module that will allow playing around (initially) with finite magmas,semigroups & groups. I'm thinking of calling it Math::Algebra. I have a (currently unused) account on github that I could install it to. 19:09
diakopter ccc: what kind of logical foundations 19:11
ccc are you asking about my knowledge or about the what the basis of the project is 19:12
diakopter the basis of your algebra.. like, which axiomatic system for the category theory or the algebra 19:13
I'm merely curious 19:14
ccc I know a little bit about groups, I've played around with GAP (http:gap-system.org)
I'm currently reading (starting to read actually) Semirings http:/www-groups.mcs.st-and.ac.uk/~alanc/teaching/m431/ 19:15
magma (aka groupoid) is a set S with a binary operation (S X S -> S) 19:17
Geth doc: a81fe0a8f2 | (Elizabeth Mattijsen)++ | doc/Language/terms.pod6
Add documentation for 𝑒 (aka e)
synopsebot Link: doc.perl6.org/language/terms
ccc so currently the heart of the module is role Magma
semigroup is an associative magma
group is a semigroup with identity and inverses 19:18
when I say finite, I really mean smaller than some low N since magma will have method associative that is O(N**3) 19:20
19:21 sena_kun left 19:22 sena_kun joined, sena_kun left
AlexDaniel diakopter: that is awesome 19:23
19:23 TreyHarris left
diakopter in the very literal sense, I suppose 19:24
19:26 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
ccc how do I get a list of the robots here and what they do - I saw a list of them the 1st time I dropped in, but I'd like to see it again 19:29
timotimo github.com/perl6/whateverable/wiki - this is the list of whateverable bots at least 19:30
docs.perl6.org/language/glossary#i...-entry-IRC - this page has only yoleaux and camelia
and dalek, but dalek hasn't been in use for a while
diakopter dalek: leave 19:31
timotimo perl6.org/community/irc - this also has a list of bots
diakopter dalek: delete your account
(oh wait, I created it)
AlexDaniel ccc: also github.com/perl6/doc/issues/711#is...-235414744
diakopter: I think a new stripe is forming 19:32
19:32 kensanata joined, p6bannerbot sets mode: +v kensanata
ccc AlexDaniel: so up above you said :weekly and got a reply from :notable - what robot is that? 19:32
timotimo github.com/perl6/whateverable/wiki/Notable 19:33
AlexDaniel kensanata: btw let me know if it's too early colabti.org/irclogger/irclogger_log...09-13#l832
kensanata AlexDaniel: Works for me! No pressure! :) 19:34
yoleaux 8 Sep 2018 21:09Z <AlexDaniel> kensanata: hello :)
ccc u: butterfly 19:35
unicodable6 ccc, U+1F98B BUTTERFLY [So] (🦋)
ccc u: for all
unicodable6 ccc, U+06D8 ARABIC SMALL HIGH MEEM INITIAL FORM [Mn] ( ۘ)
ccc, U+06E2 ARABIC SMALL HIGH MEEM ISOLATED FORM [Mn] ( ۢ)
ccc, 11 characters in total: gist.github.com/ce907f6c424897097e...7038bb36a6
AlexDaniel kensanata: yeah, not at all. btw weeklies are usually posted on Mondays 19:37
19:37 Kaiepi left
ccc :u FOR-ALL 19:38
ilmari u: there exists 19:39
unicodable6 ilmari, U+2203 THERE EXISTS [Sm] (∃)
ccc u: FOR ALL 19:40
unicodable6 ccc, U+06D8 ARABIC SMALL HIGH MEEM INITIAL FORM [Mn] ( ۘ)
ccc, U+06E2 ARABIC SMALL HIGH MEEM ISOLATED FORM [Mn] ( ۢ)
ccc, 11 characters in total: gist.github.com/5f4484b4079bb65ec7...cb6a11a518
19:40 TreyHarris left
ccc u: U+2200 19:41
unicodable6 ccc, U+2200 FOR ALL [Sm] (∀)
19:43 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 19:48 regreg joined 19:49 p6bannerbot sets mode: +v regreg
[Coke] m: say e 19:56
camelia 2.718281828459045
kensanata AlexDaniel: The Swiss Perl Workshop made me do it, actually. :)
[Coke] there's a bug in the rendering of Experience with design/implementation of:
* Site Reliability
* Monitoring
* Alerting
* Performance
* Code Analytics
* Deployment Automation & Orchestration
* Continuous Integration
* Infrastructure Automation
* Infrastructure Planning
* Security
Exposure to/Experience in the following technologies a plus:
* prometheus
* grafana
* docker 19:57
timotimo %)
[Coke] * AWS
* Azure
diakopter heh
[Coke] * go
* python
* shell scripting
dammit.
very sorry
there's a bug in the rendering of docs.perl6.org/language/terms#Identifier_terms
it says The ASCII equivalent of 𝑒 is <e>.
that shouldn't be wrapped in <>'s
AlexDaniel C missing
19:57 TreyHarris left
Geth doc: 4f23ce6a22 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/terms.pod6
Add missing C in C<e>
19:58
synopsebot Link: doc.perl6.org/language/terms
AlexDaniel there
19:58 ccc left
[Coke] AlexDaniel++ 19:58
lizmat [Coke]++ AlexDaniel++ lizmat-- 20:02
AlexDaniel [Coke]: what about adding a test? ;) ;) ;)
“<foo bar>” in the docs is most likely an error 20:03
20:03 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
AlexDaniel maybe we should also check for ` ` because that's what people mistype 20:03
[Coke]: for example 20:06
docs.perl6.org/language/objects
Everything that is not a native value is an <object> 20:07
[Coke] lot going on at $dayjob, probably won't be able to get to it.
AlexDaniel again no C or I or whatever the writer meant
[Coke] should that be a pod error? 20:08
AlexDaniel I don't think so?
here's more: docs.perl6.org/language/5to6-perlv..._variables
“for more information use <.^methods> to introspect all the above.”
without a test resistance is futile, so not even fixing that… I'll file a ticket instead 20:10
[Coke] ok. I'll peek at it if tuits are ever a thing I have again. :) 20:12
AlexDaniel D#2306 20:15
synopsebot D#2306 [open]: github.com/perl6/doc/issues/2306 [xt] xt test for missing C in C<> (and let's use a whitelist for doc text)
AlexDaniel kensanata: maybe you'll find that interesting – we have tests in the documentation repo: github.com/perl6/doc/tree/master/xt 20:17
20:17 TreyHarris left
AlexDaniel kensanata: I remember we did something similar in oddmuse, although I don't remember what it was exactly 20:17
some sort of code style enforcement maybe?
oh yeah, file permissions, use strict, “use utf8” for files with non-ascii stuff, trailing whitespace… :) 20:19
github.com/kensanata/oddmuse/blob/...r/t/meta.t
20:23 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
AlexDaniel kensanata: in fact I think it started somewhere here: github.com/perl6/doc/issues/625 20:24
kensanata: so you can pretty much bet on where I stole the idea from
20:31 graphene left 20:33 graphene joined, p6bannerbot sets mode: +v graphene 20:38 TreyHarris left 20:41 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 20:50 xinming_ is now known as xinming
Herby_ Will there be any forthcoming Windows binaries for 2018.08? 20:53
AlexDaniel huggable: star 20:54
huggable AlexDaniel, Estimated Rakudo Star releases: .01, .04, .07 & .10
Herby_ from what I can see, 2018.06 was the last
AlexDaniel Herby_: that's correct, Star is released every 4 releases or so
Herby_ gotcha, thanks
AlexDaniel Herby_: .07 rakudo release was skipped entirely so Star was based on .06, I think the next one will be .10 as planned 20:55
20:55 TreyHarris left
AlexDaniel Herby_: I'm curious, any specific reason why you are looking for it? 20:55
Herby_: needing a performance boost somewhere or seeing some bug? 20:56
Herby_ Nope. I recently installed 2018.08 on my Ubuntu VM, I noticed that my Windows 10 was sitting a few versions behind. just curiousity :) 20:57
20:57 natrys left
kensanata AlexDaniel: Heh. I remember, that was a big push for Oddmuse, too. All those meta tests! 20:57
20:57 pecastro joined
AlexDaniel kensanata: good times. As you can see, I visited this channel and got stuck a bit 20:58
20:58 p6bannerbot sets mode: +v pecastro, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 21:06 lichtkind joined 21:07 lindylex joined, p6bannerbot sets mode: +v lichtkind, p6bannerbot sets mode: +v lindylex
kensanata AlexDaniel: I know! Of course the entire plan is to rewrite Oddmuse in Perl 6 to get you back on the team... 21:08
21:09 sotona left
lichtkind grondilu cheers I just made tiny change on clifford please accept 21:09
AlexDaniel kensanata: let's see if I still have code for something… 21:10
here it is 21:11
21:13 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke, TreyHarris left
AlexDaniel wow, well… it doesn't run anymore 21:13
21:14 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
kensanata AlexDaniel: Enjoy that JS feeling! 21:15
21:17 MasterDuke left
AlexDaniel kensanata: ok I guess I'll have to fix that before I show it 21:18
kensanata: but the idea was to have separate grammars for different markup languages, and then you use multiple inheritance to parse mixed stuff O_o 21:19
kensanata: it really doesn't sound like it should work, but it does
some trickery involved, obviously, but that's alright 21:20
21:23 aindilis left 21:24 mcmillhj left 21:26 graphene left 21:28 graphene joined, p6bannerbot sets mode: +v graphene 21:29 TreyHarris left
AlexDaniel kensanata: heh, I have the slides, but not the final version of the source code… I'd need to dig up my old laptop to recover that, so not today 21:30
and also don't hold your breath :)
kensanata AlexDaniel: No worries. I'm going to be in Barcelona and in Scotland for a bit and then that's the end of my summer break. 21:32
AlexDaniel kensanata: so yes, it's not that JS feeling, it's me not organizing my crap :(
21:33 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
AlexDaniel diakopter: why did the camera move? 21:34
I missed it :) 21:35
diakopter idk, it moves a lot
21:46 Kaiepi joined, pecastro left, p6bannerbot sets mode: +v Kaiepi 21:48 TreyHarris left 21:50 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris, kensanata left 21:59 graphene left 22:01 graphene joined 22:02 p6bannerbot sets mode: +v graphene 22:04 TreyHarris left 22:07 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 22:09 s0me0ne-unkn0wn left
lindylex Trying to get the following output one dot and one hyphen useing this say " .. - ... -- .... --- . " ~~ m:global/ <[.-]>? / ; It backtracks a tests for positive within the the longer strings. 22:11
timotimo how about this: 22:14
m: say " .. - ... -- .... --- . " ~~ m/^ [ .*? (".") .* ] & [ .*? ("-") .* ] $/
camelia 「 .. - ... -- .... --- . 」
timotimo er, of course you only want the matched pieces 22:15
lindylex yes
22:15 s0me0ne-unkn0wn joined
timotimo m: " .. - ... -- .... --- . " ~~ m/^ [ .*? (".") .* ] & [ .*? ("-") .* ] $/; say $/[0]; say $/[1] 22:15
camelia Nil
Nil
timotimo mhh
m: " .. - ... -- .... --- . " ~~ m/^ [ .*? (".") .* ] & [ .*? ("-") .* ] $/; say $/.gist
camelia 「 .. - ... -- .... --- . 」
timotimo :?
y u no capture
22:15 p6bannerbot sets mode: +v s0me0ne-unkn0wn 22:16 itaipu joined
lindylex I only want the ones that are single. 22:16
timotimo oh!
i though you only wanted a single one output %)
that's easier
lindylex Sorry I was not clear.
I though a word bound would do it.
That did not work.
22:16 p6bannerbot sets mode: +v itaipu
timotimo probably because of what \w matches? 22:17
m: say "-" ~~ / \w /
camelia Nil
timotimo so a word boundary won't be matched there
lindylex No I mean this.
say " .. - ... -- .... --- . " ~~ m:global/ << <[.-]>? >> / ;
evalable6 () 22:18
timotimo m: say " .. - ... -- .... --- . " ~~ m:global/ <!ww> <[.-]> <!ww> /;
camelia (「.」 「.」 「-」 「.」 「.」 「.」 「-」 「-」 「.」 「.」 「.」 「.」 「-」 「-」 「-」 「.」)
timotimo that's not quite it
lindylex I tried a rand.
range like this one sec.
say " .. - ... -- .... --- . " ~~ m:global/ <[.-]> ** 1 / ;
evalable6 (「.」 「.」 「-」 「.」 「.」 「.」 「-」 「-」 「.」 「.」 「.」 「.」 「-」 「-」 「-」 「.」)
timotimo ah, i thought ww is the one that only matches if the char before and at the cursor are the same 22:19
but it's called "same"
m: say " .. - ... -- .... --- . " ~~ m:global/ <!same> <[.-]> <!same> /;
camelia (「-」 「.」)
timotimo there we go.
that will also match if - and . are next to each other, which may not be what you want
another possibility is this: 22:20
m: say " .. - ... -- .... --- . " ~~ m:global/ <.ws> <[.-]> <.ws> /;
camelia (「 .」 「. 」 「- 」 「.」 「.」 「. 」 「-」 「- 」 「.」 「.」 「.」 「. 」 「-」 「-」 「- 」 「. 」)
timotimo nope, because - isn't a word char
lindylex "match if - and . are next to each other, which may not be what you want" do not want that. 22:21
timotimo then we'll have to be a little bit more verbose i think
22:21 TreyHarris left
timotimo m: say " .. - ... -- .... --- . " ~~ m:global/ [\s | ^] (<[.-]>) [\s | $] /; 22:22
camelia (「 - 」
0 => 「-」 「 . 」
0 => 「.」)
timotimo m: say " .. - ... -- .... --- . " ~~ m:global/ [\s | ^] <( (<[.-]>) )> [\s | $] /;
camelia (「-」
0 => 「-」 「.」
0 => 「.」)
lindylex Why does the quantifier not work?
timotimo since you're not anchoring or have another assertion, it's just fine to match a . that is followed by another .
22:26 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
lindylex I do not understand this >> [\s | ^] why search for a white space or the beginning of a string with ^ ? 22:27
timotimo because otherwise a . or - at the beginning of the string will not match
if only the \s is there
if the \s isn't there, then . in the middle of other . would also match 22:28
lindylex timotimo : how can I place a single white space in a character class? 22:33
something like this ? <[.-\s]>
timotimo yes, you can, but "a single" doesn't make sense for character classes :) 22:34
lindylex The or would be better? 22:35
timotimo not exactly sure what you mean 22:36
22:40 regreg left
SmokeMachine m: say " .. - ... -- .... --- . -." ~~ m:global/ <?after [\s|^]> <[.-]> <?before [\s|$]> /; 22:40
camelia (「-」 「.」)
22:40 zxcvz left 22:41 TreyHarris left
lindylex SmokeMachine : thanks that was nice. 22:41
This is my goal I am trying to find phone numbers that look like this 1.212.123.4567, 1-212-123-4567, 212.123.4567, 212-123-4567 This is what I have tried say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <[.-]>? [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; 22:43
I am trying to find one or none . or - before the number I am stuck there.
22:44 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
SmokeMachine lindylex: sorry, but: giving that input, what should it be the nresult? 22:47
s/nresult/result/
lindylex This should be the result 917.234.5678 1-526-553-1234 1.917.123.4567
Thought this might work say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <[.-]><?before \d> [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; not so 22:48
say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <[.-]><?before \d> [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ; 22:49
evalable6 (「-526-553-1234」 「.917.123.4567」 「.111.111.1111」 「-222-222-2222」)
lindylex Better : 22:50
say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/ <[.-]>? <?before \d> [ << \d ** 3..4 >> ] ** 3 % <[.-]> / ;
evalable6 (「917.234.5678」 「-526-553-1234」 「.917.123.4567」 「.111.111.1111」 「-222-222-2222」)
lindylex It is getting closer. I need to get rid of the more than one . in the capture. This should not be ther .111.111.1111 22:51
SmokeMachine m: my token sep {<!same><[.-]><!same>}; say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/[^|\s] [\d <sep>]? [\d ** 3] ** 2 % <sep> <sep> \d ** 4/ 22:52
camelia (「 917.234.5678」
sep => 「.」
sep => 「.」 「 1-526-553-1234」
sep => 「-」
sep => 「-」
sep => 「-」 「 1.917.123.4567」
sep => 「.」
sep => 「.」
sep => 「.」)
SmokeMachine m: my token sep {<!same><[.-]><!same>}; say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:global/[^|\s] [\d <.sep>]? [\d ** 3] ** 2 % <.sep> <.sep> \d ** 4/ # why <.sep> isnt working? 22:54
camelia No such method 'sep' for invocant of type 'Match'. Did you mean 'sec'?
in block <unit> at <tmp> line 1
22:54 lichtkind left 22:56 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 22:57 sotona joined 22:58 p6bannerbot sets mode: +v sotona, TreyHarris left 23:00 rindolf left 23:01 sotona left, |oLa| left 23:03 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
SmokeMachine m: my grammar Phone { token sep {<!same><[.-]><!same>}; token phone {<?after [^|\s]> [\d <.sep>]? [\d ** 3] ** 2 % <.sep> <.sep> \d ** 4}; regex TOP {[.*?<phone>+.*?]*} }; say Phone.parse: "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" 23:03
camelia 「Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54」
phone => 「917.234.5678」
phone => 「1-526-553-1234」
phone => 「1.917.123.4567」
SmokeMachine lindylex: ^^ not so beautiful... but I think it works...
lindylex Dud I have no idea how to decipher this one sec.
Dude 23:04
SmokeMachine: Ok I totally need to look at this and ask specific questions after I ingest. Thanks 23:05
SmokeMachine see if this helps: gist.github.com/FCO/458b6fef51ebd3...3a77c2ef9a 23:07
lindylex Thanks for doing this. 23:08
SmokeMachine m: gist.github.com/FCO/458b6fef51ebd3...3a77c2ef9a
camelia 「Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54」
phone => 「917.234.5678」
phone => 「1-526-553-1234」
phone => 「1.917.123.4567」
lindylex m: gist.github.com/FCO/458b6fef51ebd3...3a77c2ef9a 23:09
camelia 「Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54」
phone => 「917.234.5678」
phone => 「1-526-553-1234」
phone => 「1.917.123.4567」
lindylex Interesting that is how the m: works.
SmokeMachine lindylex: does the code make any sense now? 23:10
the 2 <!same> isnt needed... I think... 23:11
m: my grammar Phone { token sep {<[.-]>}; token phone {<?after [^|\s]> [\d <.sep>]? [\d ** 3] ** 2 % <.sep> <.sep> \d ** 4}; regex TOP {[.*?<phone>+.*?]*} }; say Phone.parse: "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" 23:12
camelia 「Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54」
phone => 「917.234.5678」
phone => 「1-526-553-1234」
phone => 「1.917.123.4567」
SmokeMachine m: gist.github.com/FCO/458b6fef51ebd3...3a77c2ef9a 23:13
camelia 「Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54」
phone => 「917.234.5678」
phone => 「1-526-553-1234」
phone => 「1.917.123.4567」
23:17 TreyHarris left
SmokeMachine m: grammar Phone { token sep {<[.-]>}; token phone {<?after [^|\s]> [\d <.sep>]? [\d ** 3] ** 2 % <.sep> <.sep> \d ** 4}; rule TOP {[.*?<phone>+.*?]*} }; Phone.parse: "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54", :actions(class :: { method phone($_) { say .Str.subst: /\D+/, "", :g } }) 23:19
camelia 9172345678
15265531234
19171234567
lindylex I am surprised that I was not able to do this with the quantifiers.
SmokeMachine : interesting let me look at this. 23:20
23:20 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 23:32 hamhu3_ left, hamhu3 joined 23:33 hamhu3 left, hamhu3 joined 23:34 hamhu3 left, hamhu3 joined 23:35 p6bannerbot sets mode: +v hamhu3, TreyHarris left, epony joined, p6bannerbot sets mode: +v epony 23:39 ZzZombo_ joined, TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 23:40 p6bannerbot sets mode: +v ZzZombo_ 23:41 ZzZombo left
SmokeMachine m: say "Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:g/<?after [^|\s]> [\d <[.-]>]? [\d ** 3] ** 2 % <[.-]> <[.-]> \d ** 4/ 23:42
camelia (「917.234.5678」 「1-526-553-1234」 「1.917.123.4567」)
SmokeMachine say ("Phone numbers 917.234.5678, 1-526-553-1234, 1.917.123.4567 or FAIL > 0.0.0.000.000.00000, 1..111.111.1111 , 22-222-222-2222 , 52-14-54" ~~ m:g/<?after [^|\s]> [\d <[.-]>]? [\d ** 3] ** 2 % <[.-]> <[.-]> \d ** 4/)>>.subst: /\D+/, "", :g # lindylex 23:43
evalable6 (9172345678 15265531234 19171234567)
lindylex Oh I see you did what others have suggested which is remove the space between. 23:44
SmokeMachine: that is elegant. 23:46
After you found what you searched for the you passed it to subst and removed the spaces there. 23:47
SmokeMachine : I see now what this does <?after [^|\s]> It stop the regex from matching everything withing the entire line. You are for forcing to not backtrack. Is this correct? 23:49
I see you lumped together the 1. or 1- zero or more times doing this >> [\d <[.-]>]? 23:51
Why this two times? <[.-]> <[.-]> 23:53
23:54 TreyHarris left, Herby_ left
lindylex Nevermind I understand what you did there. 23:56
Search for this two time ** 2 % <[.-]>
It is separate from the other. I get it. 23:57
23:58 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris
lindylex And this <[.-]> \d ** 4 cathes the last four digits. That was awesome! 23:58