Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-26

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:16 adu joined #perl6
00:22 silug joined #perl6
00:32 adu joined #perl6
00:38 Cabanossi joined #perl6
00:42 Rawriful joined #perl6
00:53 aborazmeh joined #perl6
00:53 aborazmeh joined #perl6
00:57 TEttinger joined #perl6
01:00 lizmat joined #perl6
01:22 bloatable6 joined #perl6
01:23 rashipi joined #perl6
01:34 mudman joined #perl6
01:38 Cabanossi joined #perl6
01:38 konsolebox joined #perl6
01:39 adu joined #perl6
01:51 llfourn joined #perl6
01:58 comborico1611 joined #perl6
02:00 lizmat joined #perl6
02:08 Cabanossi joined #perl6
02:09 George joined #perl6
02:09 George hi
02:10 George what is this?
02:11 teatime It's a dream, George.
02:11 teatime (This is the user support / discussion channel for the Perl 6 programming language)
02:12 BenGoldberg joined #perl6
02:14 kitsunenokenja joined #perl6
02:21 comborico1611 Heh
02:22 comborico1611 I once showed my school buddy back in 1999 IRC connecting, and he thought i was "hacking".
02:23 comborico1611 I had the background black, and all the flashing text and colors looked hacker legitimate.
02:23 George I mean what kind of information can one ask for here?
02:24 comborico1611 Information about the programming language Perl 6.
02:25 George It says how to get started, but 'm just reading the tutorial, I was just curius about it
02:26 George I've never seen this sort of thing before
02:26 teatime You're welcome to ask questions etc. that come up as you go through it.
02:26 teatime Like Perl6?  Or an IRC help channel?
02:26 comborico1611 I was curious about programming back in 2000, then 17 years and by, and just this summer i got back into it.
02:27 comborico1611 I'm pretty sure he means irc.
02:27 adu joined #perl6
02:27 George both acually
02:27 comborico1611 I think his head is reeling a bit by the ircness of irc.
02:28 comborico1611 Heh
02:28 George I come from Haskell
02:28 comborico1611 Weird.  Know any others?
02:28 George they say perl 6 is functional so I was giving i a try
02:28 George like programming languages?
02:29 George yes
02:29 teatime it can be, I really like how successfully it is 'multi-paradigm'
02:29 George I mean I started learning haskell recently
02:29 comborico1611 Oh okay. Not weird anymore.
02:29 teatime I have tried to learn Haskell about 3 times.
02:29 teatime I think I must have been smarter when I was younger.
02:29 George I am liking it actually
02:30 comborico1611 I got the impression you were a young'n that hadn't been introduced to the programming culture.
02:30 rashipi At one point, a Perl6 compiler was the most important Haskell aplication and drove Haskell development.
02:30 teatime yiss
02:30 teatime although it was before my time with it
02:30 comborico1611 Hmm. Didn't know that.
02:30 rashipi As languages, they were developed togheter.
02:31 teatime but the links between haskell and perl6 become apparent from time to time
02:31 comborico1611 Hmm.
02:31 George yes I heard that
02:31 llfourn_ joined #perl6
02:31 George but if one has never coded in perl before is perl6 a good starting point?
02:32 geekosaur I'd argue it's a better starting point than perl 5, unless you need to use perl 5 later.
02:32 geekosaur perl6 is much less idiosyncratic --- it behaves consistently, whereas perl 5 is kinda infamously a mass of special cases
02:33 teatime perl6 is fun.  that's about all I can contribute.
02:34 teatime (perl5 was a lot of fun too, but I don't think it would be again if I were starting today.)
02:34 George yes I'm starting to get an idea from the pearl from Haskell  tutorial and the one from Python
02:36 rashipi Pearl is another language.
02:36 teatime George: the name misleads a lot of people into thinking they're super-closely-related; they're not so much, they're different languages.
02:36 teatime perl 6 and 5 I mean
02:36 George ok ok
02:37 geekosaur they're conceptually related, nbut that's as far as it goes
02:38 ido joined #perl6
02:38 geekosaur there's a number of core ideas that are in common, intentionally, which is why we call it perl. but perl 6 is taking advantage of a lot of general development in programming languages to express those core ideas in a more consistent and better organized way
02:41 comborico1611 George, what languages do you know?
02:41 George C/C++ Python and \JS
02:42 George and a little of PHP
02:42 comborico1611 I've never heard of the backslash one.
02:55 teatime "escape JavaScript" is a popular developer goal :)
02:55 George thats a typo
02:55 comborico1611 Lol
02:55 George ahahah
02:55 astronav_ joined #perl6
02:55 comborico1611 That's good stuff. I better get some sleep. Goodnight. Hope to see you on here George.
02:55 George Thanks  comborico1611!
02:56 ilbot3 joined #perl6
02:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:03 lizmat joined #perl6
03:06 pentashift joined #perl6
03:08 Cabanossi joined #perl6
03:14 Herby_ with regex and grammers, what is the difference between | and ||
03:14 Herby_ if any
03:14 teatime there is a difference, 1 second
03:15 teatime I beleive one matches in order given and the other matches longest alternative
03:15 teatime but let me find the actual docs
03:15 teatime https://docs.perl6.org/language/regexes#Alternation:_||
03:16 rashipi | is for longest match
03:16 rashipi || is left to right.
03:16 Herby_ thanks!
03:18 rashipi 'dog || doge' will never match doge
03:18 Herby_ teatime: thanks for the link
03:22 Herby_ rashipi: and 'dog | doge' will always match doge?
03:22 Herby_ assuming doge is actually in the string
03:22 teatime yiss
03:23 rashipi m: say 'doge is the word' ~~ /dog|doge/
03:23 camelia rakudo-moar a9ec5f924: OUTPUT: «「doge」␤»
03:24 rashipi m: say 'doge is the word' ~~ /dog||doge/
03:24 camelia rakudo-moar a9ec5f924: OUTPUT: «「dog」␤»
03:24 rashipi m: say 'doge is the word' ~~ /doge||dog/
03:24 camelia rakudo-moar a9ec5f924: OUTPUT: «「doge」␤»
03:32 adu joined #perl6
03:46 eliasr joined #perl6
03:57 konsolebox joined #perl6
03:57 noganex_ joined #perl6
04:01 cpage_ joined #perl6
04:03 konsolebox joined #perl6
04:21 Cabanoss- joined #perl6
04:26 cdg joined #perl6
04:34 lizmat joined #perl6
04:36 cdg joined #perl6
04:39 Herby_ grammars are hard
04:48 rashipi what you're trying to do?
04:48 Herby_ as an exercise, I'm trying to write a grammar to parse torrent names
04:52 Herby_ https://pastebin.com/jwbjyQCv
04:53 Herby_ the title matches everything except the end:  -ASAP[ettv]
04:53 Herby_ season, episode, and resolution dont match
04:54 rashipi because it's greedy
04:55 rashipi Put a ? to turn it frugal
04:55 rashipi that way it will match the least possible
04:55 Herby_ where do I put the ?
04:56 teatime heh I've never heard that called frugal... I like it
04:56 rashipi It's in the docs, haha
04:56 rashipi Then it will match a single letter
05:02 Herby_ no luck.
05:03 Herby_ i'll look at it with fresh eyes tomorrow
05:03 Herby_ o/
05:07 Cabanossi joined #perl6
05:14 ZzZombo Say, I have a grammar rule A that calls rule B, can I in my actions object get the match for A for the corresponding match B inside the action method?
05:21 thowe joined #perl6
05:23 pentashift joined #perl6
05:32 geekosaur uh? B doesn't know if it can only ever be called by A, and if tyhat *is* the case then there's likely some refactoring that will give you both
05:33 geekosaur now if you mean from A's action method, B should be available as a named submatch
05:46 konsolebox joined #perl6
05:50 araraloren joined #perl6
06:07 konsolebox joined #perl6
06:26 lizmat joined #perl6
06:44 zakharyas joined #perl6
06:49 kaare_ joined #perl6
06:51 cdg joined #perl6
07:07 darutoko joined #perl6
07:11 tim__ joined #perl6
07:23 pentashift joined #perl6
07:24 tim__ left #perl6
07:28 lizmat joined #perl6
07:29 HoboWithAShotgun joined #perl6
07:30 HoboWithAShotgun who is froggs? (https://github.com/FROGGS/p6-Archive-Tar)
07:41 lizmat joined #perl6
07:45 zakharyas joined #perl6
07:47 ribasushi joined #perl6
07:55 rindolf joined #perl6
08:06 Cabanossi joined #perl6
08:13 pmurias joined #perl6
08:18 lizmat joined #perl6
08:29 parv joined #perl6
08:36 sftp joined #perl6
08:38 domidumont joined #perl6
08:43 domidumont joined #perl6
08:44 konsolebox joined #perl6
08:50 poohman joined #perl6
08:56 wander joined #perl6
08:57 wamba joined #perl6
08:58 wander m: my %h; my @a = [1,2,3];  %h<k> = %(name=>"kk", :@a); .say for %h<k><a>; .say for %h<k><a>.Array;
08:58 camelia rakudo-moar a9ec5f924: OUTPUT: «[1 2 3]␤1␤2␤3␤»
08:59 wander Here is an interesting example, I think, of the topic "container"
09:02 wander "container" is considered as one of the most hard topic to understand of Perl 6 by people around me.
09:03 wander So I want to attempt to figure out how we design Perl 6 "container", the only article I found about it is from the doc site.
09:03 wander wonder if there someone ever talked about it, such like in a blog or something.
09:05 wander one of the most annoying cases is an Array `[ ... ]' sometimes becomes `$[ ...]`
09:22 Cabanossi joined #perl6
09:33 espadrine joined #perl6
09:33 mryan50 joined #perl6
09:33 zakharyas joined #perl6
09:35 mryan50 wander: [ … ] is an array container; $[ … ] is a scalar container holding a reference to an array container
09:36 mryan50 … well, at leat I think that’s how it is
09:37 mryan50 s/leat/least/
09:39 wander yes, i know this. you can see the example above about '%h' and '@a', so @a happens to be convert form array to a refer, interesting and confusing when you first meet it.
09:45 lizmat joined #perl6
09:47 wander scalar containers, callable containers and etc.. when they appear singly, things go well. but variable is passed and thus container changes, here things go, somehow, confusing
09:50 wander so i wonder if someone has had a talk about this topic :P
09:50 nativecallable6 joined #perl6
09:52 Foxymoron joined #perl6
09:55 lizmat wander: do you have an example of something that confuses you?
09:58 mryan50 joined #perl6
09:59 yqt joined #perl6
10:08 sena_kun joined #perl6
10:12 wander no. i don't remember it, some i have met but fixed in someway so i forget it. i will ask for help if facing a very issue. however, my friends who i recommend Perl 6 to tell me the concept "container" is not so clearly
10:13 wander so i don't ask for help to fix a particular issue, but look for a talk about "container"
10:19 lizmat wander: http://jnthn.net/papers/2015-spw-perl6-course.pdf  specifically the "Variables" chapter
10:22 Cabanossi joined #perl6
10:24 wander thank you ^_^
10:32 moritz wander: https://docs.perl6.org/language/containers
10:34 wander yes, i mention it above and be reading it :P
10:34 mryan50 joined #perl6
10:38 moritz sorry, didn't fully backlog
10:39 teatime morning moritz
10:39 teatime and was gonna say lizmat
10:41 cdg joined #perl6
10:46 geospeck joined #perl6
10:50 konsolebox joined #perl6
10:52 HoboWithAShotgun joined #perl6
11:00 konsolebox joined #perl6
11:13 robertle joined #perl6
11:14 mryan50 joined #perl6
11:17 xinming_ joined #perl6
11:17 konsolebox joined #perl6
11:28 konsolebox joined #perl6
11:35 kaare_ joined #perl6
11:37 Cabanossi joined #perl6
11:40 konsolebox joined #perl6
11:49 konsolebox joined #perl6
11:55 konsolebox joined #perl6
12:01 konsolebox joined #perl6
12:07 Cabanossi joined #perl6
12:09 konsolebox joined #perl6
12:10 markong joined #perl6
12:13 llfourn joined #perl6
12:15 konsolebox joined #perl6
12:16 ZzZombo m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl
12:16 camelia rakudo-moar b285aaf35: OUTPUT: «Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
12:25 konsolebox joined #perl6
12:41 epony joined #perl6
12:46 kitsunenokenja joined #perl6
12:46 Rawriful joined #perl6
12:49 stmuk_ joined #perl6
13:00 gagalicious joined #perl6
13:21 HoboWithAShotgun joined #perl6
13:21 domidumont joined #perl6
13:22 Cabanossi joined #perl6
13:39 astronav_ joined #perl6
13:45 adu joined #perl6
14:07 gagalicious joined #perl6
14:12 ShalokShalom joined #perl6
14:12 kaare__ joined #perl6
14:14 char_var[buffer] joined #perl6
14:20 markmont joined #perl6
14:20 lizmat joined #perl6
14:24 eliasr joined #perl6
14:28 poohman joined #perl6
14:29 poohman hello all - I say the method "into" being used in one of Jonathans old presentations. but when I use it, it says undeclared routine.
14:29 poohman I saw , I meant
14:33 masak on what type?
14:35 poohman I didnt mention any type - getting some content using a POST request - grepping it - and using into to shove it into a variable
14:36 poohman my $content =  await $resp.body;
14:36 poohman $content
14:36 poohman ==> grep(/\V*'HREF'\V*\v+/)
14:36 poohman ==> into my $href;
14:36 poohman something like this
14:36 HoboWithAShotgun ==> is a kind of into operator
14:36 ZzZombo remove `into`, be happy
14:37 poohman oh ok
14:37 Cabanossi joined #perl6
14:37 poohman wow cool
14:38 poohman thanks
14:39 poohman need to work on my regex - but it compiled - thanks
14:41 leedo joined #perl6
14:41 lizmat joined #perl6
14:46 masak HoboWithAShotgun++
14:49 markmont joined #perl6
14:50 HoboWithAShotgun what's the praise for, masak?
14:50 masak helping poohman
14:50 HoboWithAShotgun how do itell github to merge a fricking pull request?
14:50 masak oh, and ZzZombo++ also :)
14:50 masak HoboWithAShotgun: usually there's a button
14:51 masak or you can do it locally
14:51 HoboWithAShotgun for which i am loking for for quite a while now ^^
14:52 HoboWithAShotgun oh, there. nvm
14:52 timotimo so scimon's slides have examples that make me think junctions misbehave with chained operators:
14:53 konsolebox joined #perl6
14:53 timotimo m: say 4 < 1^2^3^4^5 < 2; say say 4 < 1^2^3^4^5; say 1^2^3^4^5 < 2
14:53 camelia rakudo-moar 78caeb6bc: OUTPUT: «one(True, False, False, False, False)␤one(False, False, False, False, True)␤True␤one(True, False, False, False, False)␤»
14:54 pecastro joined #perl6
14:59 geospeck joined #perl6
15:00 konsolebox joined #perl6
15:07 Cabanossi joined #perl6
15:12 dogbert17 joined #perl6
15:17 pecastro joined #perl6
15:44 lizmat joined #perl6
15:46 astronavt joined #perl6
15:50 preaction joined #perl6
15:50 steeznson joined #perl6
15:52 Cabanossi joined #perl6
15:56 ZzZombo <ZzZombo> m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl
15:57 ZzZombo err
15:57 ZzZombo m: class A{ has %.b is default(Nil)};my $c:=A.new.b<asd>; my $a is default(Int)=A.new.b<asd>; say $a.VAR.perl
15:57 camelia rakudo-moar 78caeb6bc: OUTPUT: «Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
15:57 ZzZombo ^
15:58 nightfrog joined #perl6
16:00 kitsunenokenja joined #perl6
16:02 Herby_ joined #perl6
16:02 Herby_ o/
16:02 APic \o
16:03 stmuk joined #perl6
16:03 ZzZombo Hey, is it normal for older Rakudo installations in Windows to remain in the list of installed applications?
16:03 ZzZombo on*
16:04 Herby_ It doesn't for me but I always make a point to uninstall the previous installation first before installing the new
16:05 ZzZombo I just install over, since the installer doesn't complain, and also wouldn't it force me to reinstall all modules every time?
16:06 lizmat m: say Int.VAR.perl
16:06 camelia rakudo-moar 78caeb6bc: OUTPUT: «Int␤»
16:06 lizmat hmmm
16:07 lizmat m: say (my Int $).VAR.perl   # ZzZombo: golfed
16:07 camelia rakudo-moar 78caeb6bc: OUTPUT: «Invocant of method 'perlseen' must be an object instance of type 'Mu', not a type object of type 'Int'.  Did you forget a '.new'?␤  in block <unit> at <tmp> line 1␤␤»
16:10 Herby_ ZzZombo: possibly.  I'm new to this :)
16:12 ZzZombo I wasn't even trying 😢 lizmat!
16:13 domidumont joined #perl6
16:13 ZzZombo it just appeared in this piece of code and it scared me, so I needed somebody to tell me this will go away from me
16:14 lizmat seems something gets confused
16:14 lizmat but it also feels a bit like DIHWIDT
16:14 lizmat (aka Doctor, It Hurts When I Do This)
16:14 lizmat so don't do that  :-)
16:15 lizmat using .VAR is generally a code smell
16:15 lizmat so why where you using that?
16:16 ZzZombo I'm not, the `.VAR.perl` part was only because I wanted be EXTRA sure I've got the right thing out of the hash, that is, Nil.
16:16 ZzZombo to be*
16:19 breinbaas joined #perl6
16:20 krunen joined #perl6
16:22 charsbar joined #perl6
16:22 khw joined #perl6
16:22 yoleaux joined #perl6
16:22 Geth ¦ doc: 7acf5e5f1f | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Period.pod6
16:22 synopsebot Link: https://doc.perl6.org/type/Telemetry/Period
16:22 Geth ¦ doc: Remove incorrect documentation from T:Period
16:22 Geth ¦ doc:
16:22 Geth ¦ doc: - this pod was from before the Instrument refactoring
16:22 Geth ¦ doc: - a Telemetry::Period object is the same as a Telemetry object, only
16:22 Geth ¦ doc:   the *meaning* of the values is different.
16:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7acf5e5f1f
16:22 tangible6 joined #perl6
16:24 lizmat m: class A{ has %.b is default(Nil)}; dd A.new.b<asd>  # ZzZombo: quicker way to find out it gives Nil
16:24 camelia rakudo-moar 78caeb6bc: OUTPUT: «Nil %!b = Nil␤»
16:25 ZzZombo yeah, but when assigning it to a variable, it turns into Any w/o asking, that all the fudge is about.
16:27 lizmat ZzZombo: "my $a" is short for "my Any $a", so assigning Nil to that *will* give you an Any
16:27 lizmat that's supposed to be the way it works
16:30 Geth ¦ doc: 2769ad2534 | (Elizabeth Mattijsen)++ | 2 files
16:30 Geth ¦ doc: Move snapper doc, it is not a Type
16:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2769ad2534
16:30 ZzZombo I see. The original issues wasn't even about that directly, it's about how could I pass a type in a hash to some function and use it or some default value if not present.
16:31 ZzZombo In a similar vein to `my $class=%h<class> // $default;$class.new`
16:37 Geth ¦ doc: 3354ac7e4f | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/snapper.pod6
16:37 synopsebot Link: https://doc.perl6.org/type/Telemetry/snapper
16:37 Geth ¦ doc: Make sure we link correctly to Telemetry
16:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3354ac7e4f
16:37 Geth ¦ doc: 0ed5cba7b1 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry/Period.pod6
16:37 Geth ¦ doc: Make sure we link correctly to Telemetry
16:37 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0ed5cba7b1
16:37 synopsebot Link: https://doc.perl6.org/type/Telemetry/Period
16:38 * lizmat goes back to driving&
16:38 setty1 joined #perl6
16:50 releasable6 joined #perl6
16:50 unicodable6 joined #perl6
16:50 statisfiable6 joined #perl6
16:54 travis-ci joined #perl6
16:54 travis-ci Doc build errored. Elizabeth Mattijsen 'Move snapper doc, it is not a Type'
16:54 travis-ci https://travis-ci.org/perl6/doc/builds/307527921 https://github.com/perl6/doc/compare/7acf5e5f1fce...2769ad253493
16:54 travis-ci left #perl6
16:54 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
16:56 travis-ci joined #perl6
16:56 travis-ci Doc build errored. Elizabeth Mattijsen 'Remove incorrect documentation from T:Period
16:56 travis-ci https://travis-ci.org/perl6/doc/builds/307525868 https://github.com/perl6/doc/compare/fc30df5bcbf4...7acf5e5f1fce
16:56 travis-ci left #perl6
16:56 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
17:05 poohman m:say("Hello")
17:05 evalable6 poohman, rakudo-moar 78caeb6bc: OUTPUT: «Hello»
17:05 poohman m:my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num
17:05 evalable6 poohman, rakudo-moar 78caeb6bc: OUTPUT: «»
17:06 poohman m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num
17:06 camelia rakudo-moar 78caeb6bc: ( no output )
17:07 travis-ci joined #perl6
17:07 travis-ci Doc build errored. Elizabeth Mattijsen 'Make sure we link correctly to Telemetry'
17:07 travis-ci https://travis-ci.org/perl6/doc/builds/307530100 https://github.com/perl6/doc/compare/2769ad253493...0ed5cba7b11a
17:07 travis-ci left #perl6
17:07 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
17:07 poohman m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";my @lines = $source.lines;@lines ==> grep(/\d+/) ==> my @num; say @num;
17:07 camelia rakudo-moar 78caeb6bc: OUTPUT: «[123 897 n1n2n3k]␤»
17:08 Geth ¦ doc: 8d7aaa52d3 | (Jan-Olof Hendig)++ | doc/Type/Complex.pod6
17:08 synopsebot Link: https://doc.perl6.org/type/Complex
17:08 Geth ¦ doc: Added documentation for sqrt
17:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8d7aaa52d3
17:09 Grrrr
17:10 Herby_ anyone know how to get hexchat to properly display camelia's unicode characters?
17:12 teatime Herby_: Can you see → my arrows ↔
17:12 Herby_ yep
17:12 teatime then I think your problem is just that your configured font lacks the glyphs being used
17:13 teatime maybe try DejaVu instead
17:13 teatime or Unifont, if you want an ugly font that has almost literally everything
17:13 teatime (if you can specify a "fontstack" to search for glyphs, ending it with Unifont works great.)
17:14 Herby_ teatime: i'll give that a shot, thanks!
17:14 poohman m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";$source ==>lines ==> grep(/\d+/) ==> my @num; say @num;
17:14 camelia rakudo-moar 78caeb6bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix ==> instead␤at <tmp>:1␤------> 3jk\n897\nn1n2n3k\n";$source ==>lines ==>7⏏5 grep(/\d+/) ==> my @num; say @num;␤»
17:17 teatime works if you do lines() instead of lines
17:17 poohman m: my $source = "abcd\n123\nyjk\n897\nn1n2n3k\n";$source ==>lines() ==> grep(/\d+/) ==> my @num; say @num;
17:17 camelia rakudo-moar 78caeb6bc: OUTPUT: «[123 897 n1n2n3k]␤»
17:17 poohman perfecto - thanks a lot
17:17 teatime well kindof
17:17 teatime oh, yes, nevermind
17:17 poohman kindof??
17:18 teatime didn't realize the grep wasn't anchored
17:18 poohman is there a difference
17:18 teatime it works
17:19 Herby_ joined #perl6
17:19 teatime Herby_: looks relevant:  http://hexchat.readthedocs.io/en/latest/tips.html#special-glyphs
17:20 Herby_ m: say "Hello world";
17:20 camelia rakudo-moar 78caeb6bc: OUTPUT: «Hello world␤»
17:20 teatime looks like you can indeed specify a "font stack"
17:20 Herby_ teatime: I think I got it installed
17:20 Herby_ went with unifont
17:20 Herby_ thanks for the help!
17:20 teatime any time
17:41 ramillies joined #perl6
17:53 travis-ci joined #perl6
17:53 travis-ci Doc build passed. Jan-Olof Hendig 'Added documentation for sqrt'
17:53 travis-ci https://travis-ci.org/perl6/doc/builds/307539704 https://github.com/perl6/doc/compare/0ed5cba7b11a...8d7aaa52d3ab
17:53 travis-ci left #perl6
17:56 Geth ¦ doc: 023ac493d1 | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod6
17:56 synopsebot Link: https://doc.perl6.org/type/Dateish
17:56 Geth ¦ doc: Fix formatting and a partly broken link
17:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/023ac493d1
17:57 poohman m: my token {[01 ... 31]}
17:57 camelia rakudo-moar 78caeb6bc: ( no output )
17:57 geospeck are Roles similar to interfaces from other languages eg Java?
17:58 poohman m: my token day {[01 ... 31]}
17:58 camelia rakudo-moar 78caeb6bc: ( no output )
17:59 poohman could I use something like this in Grammar - stringify it in some way
17:59 poohman ??
17:59 teatime you can use it in a grammar without stringifying
18:00 poohman really - will it work directly??
18:00 teatime yup
18:00 teatime that's what it's for :)
18:01 poohman wow
18:01 poohman let me try it
18:03 poohman back to programming after some years - so I dont really know how it is with other languages - but is something like this possible in the new generation languages
18:03 poohman i mean is this possible in most of the new generation languages
18:03 poohman or is it perl6  magic here??
18:04 teatime grammars like Perl6 has are pretty unique to perl6
18:05 teatime when feeling optimistic, I expect them to spread and be loved the same way perl5 advanced regular expressions
18:06 poohman 😆 - I tried the following just as a test - didnt want to be surprised again
18:06 poohman m: my $months=['Jan', 'Feb' ...'Dec']
18:06 camelia rakudo-moar 78caeb6bc: ( no output )
18:06 teatime there are grammar/parser implementations for other languages (e.g. Marpa), and there is the older tech of parser generators etc., but perl6 builds it into the language, and makes it very quick and easy to get started with
18:07 teatime heh, I don't expect that'll work
18:07 poohman It did give a result though
18:07 teatime m: say ['Jan', 'Feb' ... 'Dec'].first(12)
18:07 camelia rakudo-moar 78caeb6bc: OUTPUT: «Nil␤»
18:07 teatime m: say ['Jan', 'Feb' ... 'Dec']
18:07 camelia rakudo-moar 78caeb6bc: OUTPUT: «[Jan Feb Fea Fdz Fdy Fdx Fdw Fdv Fdu Fdt Fds Fdr Fdq Fdp Fdo Fdn Fdm Fdl Fdk Fdj Fdi Fdh Fdg Fdf Fde Fdd Fdc Fdb Fda Fcz Fcy Fcx Fcw Fcv Fcu Fct Fcs Fcr Fcq Fcp Fco Fcn Fcm Fcl Fck Fcj Fci Fch Fcg Fcf Fce Fcd Fcc Fcb Fca Fbz Fby Fbx Fbw Fbv Fbu Fbt Fb…»
18:07 teatime yup
18:08 poohman super cool
18:08 poohman no I meant integration of lazy lists etc in Grammars
18:08 teatime oh
18:08 teatime lists work like alternation, but I wouldn't think they stay lazy
18:12 poohman thanks teatime - time to hit the sack - seeya
18:12 teatime o/
18:19 travis-ci joined #perl6
18:19 travis-ci Doc build errored. Jan-Olof Hendig 'Fix formatting and a partly broken link'
18:19 travis-ci https://travis-ci.org/perl6/doc/builds/307553269 https://github.com/perl6/doc/compare/8d7aaa52d3ab...023ac493d1a6
18:19 travis-ci left #perl6
18:19 buggable [travis build above] ✓ All failures are due to: missing build log (1 failure).
18:21 jstuder joined #perl6
18:22 epony joined #perl6
18:35 astronavt joined #perl6
18:37 kaare__ joined #perl6
18:42 markmont joined #perl6
18:58 jstuder joined #perl6
19:04 Khisanth joined #perl6
19:16 kyan joined #perl6
19:46 lucs Where are string escape sequences documented? (like \n, \o, \c, etc.)
19:47 kybr joined #perl6
19:50 teatime lucs: there's more of it here than initially meets the eye, if you read the paragraphs: https://docs.perl6.org/language/quoting#Escaping:_q
19:51 teatime if I'm not overlooking an exhaustive list elsewhere, though, it could def. be improved.
19:52 lucs Yeah, maybe it would be nice to have a list somewhere, cross-referencing to the proper documentation.
19:54 lucs I'm actually wondering if there's an escape to enter a decimal value, like one enters an octal value (so \077 would be something like \d119).
19:56 teatime looks like \c[] should do it
19:56 teatime \c[119]
19:56 ilmari m: say "\c[65]"
19:56 camelia rakudo-moar 78caeb6bc: OUTPUT: «A␤»
19:56 teatime https://docs.perl6.org/language/unicode#Entering_Unicode_Codepoints_and_Codepoint_Sequences
19:56 lucs Looks good, thanks.
19:57 tyil I just noticed, there's no unicode op for -> and => in perl 6, is there?
19:57 tyil for pointy blocks and fat commas
19:58 ilmari m: for 42 → $a { say $a }
19:58 camelia rakudo-moar 78caeb6bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3for 427⏏5 → $a { say $a }␤    expecting any of:␤        block or pointy block␤        infix␤        infix stopper␤»
19:58 ilmari m: for 42 -> $a { say $a }
19:58 camelia rakudo-moar 78caeb6bc: OUTPUT: «42␤»
19:59 gfldex m: say a ⇒ 42;
19:59 camelia rakudo-moar 78caeb6bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus term␤at <tmp>:1␤------> 3say a 7⏏5⇒ 42;␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        postfix␤        prefix␤        statement e…»
20:00 ilmari m: sub infix:<⇒>($a, $b) { $a => $b }; say foo ⇒  42
20:00 camelia rakudo-moar 78caeb6bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix ⇒ instead␤at <tmp>:1␤------> 3nfix:<⇒>($a, $b) { $a => $b }; say foo ⇒7⏏5  42␤»
20:00 ilmari m: sub infix:<⇒>($a, $b) { $a => $b }; say 'foo' ⇒  42
20:00 camelia rakudo-moar 78caeb6bc: OUTPUT: «foo => 42␤»
20:01 gfldex m: constant term:<⇒> := &infix:«=>»; say 'a' ⇒ 42;
20:01 camelia rakudo-moar 78caeb6bc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3onstant term:<⇒> := &infix:«=>»; say 'a'7⏏5 ⇒ 42;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
20:06 HoboWithAShotgun joined #perl6
20:18 mson joined #perl6
20:30 s0me0ne-unkn0wn joined #perl6
20:31 SCHAPiE joined #perl6
20:33 lizmat joined #perl6
20:37 Cabanossi joined #perl6
20:39 moritz m: constant term:<⇒> := &infix:«=>»; say ⇒
20:39 camelia rakudo-moar 78caeb6bc: OUTPUT: «sub infix:«=>» (Mu $key, Mu \value) { #`(Sub+{is-pure}+{Precedence}|49597216) ... }␤»
20:48 ivans joined #perl6
21:07 Cabanossi joined #perl6
21:18 tyil https://docs.perl6.org/routine/unlink says unlink returns True if you give it a single path, but in practice it seems to return a list
21:18 tyil https://cry.nu/p/7ijn
21:18 tyil returns Array @ok = ["/tmp/0R14ZKUJ_U"]
21:19 tyil are the docs out of date here (if so, I'll make a pr), or is this a bug?
21:20 Geth ¦ doc: 0a93d3f44d | (Elizabeth Mattijsen)++ | 2 files
21:20 Geth ¦ doc: Move snapper pod into Telemetry
21:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0a93d3f44d
21:24 lizmat tyil: good question, please make an issue out of it so we can discuss
21:24 lizmat http://theperlfisher.blogspot.nl/2017/11/test-all-things.html  # new blogging by DrForr
21:24 tyil I'm just rereading it, and it seems correct, the method would return True, but I use it as a sub(), which is slurpy and returns a list
21:25 tyil "/tmp/filename".IO.unlink returns True as expected
21:26 tyil I was already in the making of a ticket when I realized I was reading it wrong
21:31 dustinm` joined #perl6
21:37 dustinm` joined #perl6
21:51 travis-ci joined #perl6
21:51 travis-ci Doc build failed. Elizabeth Mattijsen 'Move snapper pod into Telemetry'
21:51 travis-ci https://travis-ci.org/perl6/doc/builds/307614490 https://github.com/perl6/doc/compare/023ac493d1a6...0a93d3f44d85
21:51 travis-ci left #perl6
21:51 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
21:51 lizmat *sigh*
21:57 AlexDaniel joined #perl6
22:00 lizmat hmmm... the errors all seem to be in stuff I didn't touch ?
22:01 Geth ¦ doc: 8e8acb4556 | (Elizabeth Mattijsen)++ | doc/Type/Telemetry.pod6
22:01 Geth ¦ doc: Oops, =head 2 should be =head2
22:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8e8acb4556
22:01 synopsebot Link: https://doc.perl6.org/type/Telemetry
22:14 wander morning ~
22:15 wander lizmat: I close #1684 for your commit. Thanks for your effort :-)
22:16 lizmat wander: yw
22:19 mudman joined #perl6
22:35 gfldex I'm stuck with an error message, that goes:
22:35 gfldex X::Multi::NoMatch+{X::Await::Died}: Cannot resolve caller report(List, :html); none of these signatures match:
22:35 gfldex (*%_ --> Str:D)
22:35 gfldex (@s, :@columns is copy, :$header-repeat is copy, :$legend is copy, :$csv is copy, :@format --> Str:D)
22:35 gfldex (List, :$html is copy)
22:35 gfldex I'm pretty sure the last candidate could match
22:37 Juerd It does look rather matching :)
22:38 gfldex the first two candidates are in module A and the last one in module B
22:38 gfldex could that confuse Rakudo?
22:39 timotimo it shouldn't
22:39 timotimo you could try to output the candidates at the exact point it breaks
22:40 timotimo to make sure the list isn't different because of error reporting issues?
22:40 gfldex there is some nqp trickery in module A involved
22:41 gfldex in this line https://github.com/rakudo/rakudo/blob/master/lib/Telemetry.pm6#L714
22:42 gfldex (to me that nqp spell could very well open a gate to hell :)
22:42 gfldex no sorry, wrong line, right line: https://github.com/rakudo/rakudo/blob/master/lib/Telemetry.pm6#L721
22:44 timotimo ah, no
22:45 timotimo that's just a shorthand for "assign a value to this attribute and return the object that was assigned into"
22:45 timotimo i.e. do { bindattr($obj, Type, '$!attr', $value); $obj }
22:50 Ven joined #perl6
22:59 lizmat gfldex: do you have a gist of what you're trying to do?
23:00 gfldex lizmat: https://gist.github.com/e61d9f6153bffd743884b10c70d061ec
23:05 noganex joined #perl6
23:08 lizmat gfldex: why the is copy?
23:09 lizmat also, have you tried: (@s, :$html!) ?
23:10 Herby_ m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns -> $key, $value { say $key; say $value;};
23:10 camelia rakudo-moar 78caeb6bc: OUTPUT: «(s \d\d)␤(e \w\w)␤»
23:11 Herby_ I'm messing something up.  how do I loop through a multidem list?
23:14 lizmat @patterns.kv -> $key, $alue
23:14 Herby_ m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns.kv -> $key, $value { say $key; say $value;};
23:14 camelia rakudo-moar 78caeb6bc: OUTPUT: «0␤(s \d\d)␤1␤(e \w\w)␤»
23:14 lizmat .oO( looks like my v key bounces )
23:15 lizmat Herby_: then I'm not getting what you want (but then again I'm pretty tired)
23:15 Herby_ i'm not great at explaining myself :)
23:16 Herby_ in the first loop, i'd like $key = 's', $value ='\d\d'
23:16 jnthn Try for @patterns -> [$key, $vlaue] { }
23:16 jnthn To unpack the sublist
23:17 gfldex lizmat: then I get:
23:17 gfldex X::Multi::NoMatch+{X::Await::Died}: Cannot resolve caller report(List, :html); none of these signatures match:
23:17 Herby_ m: my @patterns = ('s', '\d\d'; 'e', '\w\w';); for @patterns -> [$key, $value] { say $key; say $value;};
23:17 camelia rakudo-moar 78caeb6bc: OUTPUT: «s␤\d\d␤e␤\w\w␤»
23:17 gfldex (*%_ --> Str:D)
23:17 gfldex (@s, :@columns is copy, :$header-repeat is copy, :$legend is copy, :$csv is copy, :@format --> Str:D)
23:17 gfldex (@s, :$html is copy)
23:17 Herby_ jnthn: that was it, thanks
23:18 BenGoldberg joined #perl6
23:21 lizmat gfldex: and with just (:$html!) ?
23:21 gfldex lizmat: same
23:22 Cabanossi joined #perl6
23:23 lizmat gfldex: you are calling report with only named parameters, right ?
23:24 gfldex lizmat: yes
23:26 jnthn multi sub report(List, :$html is copy) { will require a List to be passed, but I only see calls passing named arguments to it, and none passing an initial list positional
23:27 jnthn Am I missing something?
23:27 jnthn (Probably, 'cus I only glanced the discussion... :))
23:27 gfldex jnthn: I tried a proper @s too, both in the sig and the caller
23:27 lizmat gfldex: the @s is wrong: you don't need that
23:28 gfldex I know, I tried without too, to no avail
23:29 gfldex I shall golf and issue tomorrow.
23:31 Herby_ m: my $p = '(\d\d)'; say '23' ~~ / $p /
23:31 camelia rakudo-moar 78caeb6bc: OUTPUT: «Nil␤»
23:31 Herby_ m: my $p = '(\d\d)'; say '23' ~~ / $($p) /;
23:31 camelia rakudo-moar 78caeb6bc: OUTPUT: «Nil␤»
23:32 jnthn <$p>
23:32 Herby_ m: my $p = '(\d\d)'; say '23' ~~ / <$p> /;
23:32 camelia rakudo-moar 78caeb6bc: OUTPUT: «「23」␤»
23:32 Herby_ :)
23:32 Herby_ thanks
23:36 pecastro joined #perl6
23:42 Herby_ m: my $p = '(\d)\d'; if '23' ~~ / <$p> / { say $0; }
23:42 camelia rakudo-moar 78caeb6bc: OUTPUT: «Nil␤»
23:42 Herby_ where am I going wrong? (sorry to pepper with questions)
23:44 jnthn Expecting regexes to be stringier than they are. In fact, they're more like subs, and the match state is per sub
23:45 jnthn m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / { say $<p>[0]; }
23:45 camelia rakudo-moar 78caeb6bc: OUTPUT: «「2」␤»
23:45 Herby_ my ultimate goal is I have an array of pattens, and I want to loop through the array and apply the patterns to a string and extract the captures
23:45 jnthn Can explicitly capture it like that
23:46 jnthn m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / -> :p($/) { say $0; } # hmm :)
23:46 camelia rakudo-moar 78caeb6bc: OUTPUT: «Cannot resolve caller postcircumfix:<[ ]>(Mu, Int); none of these signatures match:␤    (\SELF, Any:U $type, |c is raw)␤    (\SELF, int $pos)␤    (\SELF, int $pos, Mu \assignee)␤    (\SELF, int $pos, Mu :$BIND! is raw)␤    (\SELF, int $pos, …»
23:47 jnthn m: my $p = '(\d)\d'; if '23' ~~ / <p=$p> / -> (:p($/)) { say $0; } # hmm :)
23:47 camelia rakudo-moar 78caeb6bc: OUTPUT: «「2」␤»
23:47 jnthn That lets you refer to the inner things as $0 etc.
23:48 Herby_ jnthn: thanks. i'll have to try and parse that mentally :)
23:48 perlawhirl Herby_: alternatively... eval your string into an Regex... unless it makes you feel dirty
23:48 perlawhirl ie: my $s = '(\d)\d'; my $p = EVAL("/$s/"); if '23' ~~ $p { say $0; } # Can camelia EVAL?
23:49 perlawhirl m: use MONKEY-SEE-NO-EVAL; my $s = '(\d)\d'; my $p = EVAL("/$s/"); if '23' ~~ $p { say $0; }
23:49 camelia rakudo-moar 78caeb6bc: OUTPUT: «「2」␤»
23:50 jnthn If you're going to apply them many times, that would probably be more performant, yes
23:50 jnthn Well, if doing all the EVALs up front I mean
23:50 Herby_ perlawhirl: thanks. I don't feel dirty cause I still am trying to figure out what I'm doing :)
23:51 perlawhirl yeah... @patterns = @strings.map: -> $s { EVAL("/$s/") } # now you have a list of Regex's
23:53 Herby_ perlawhirl and jnthn: thanks for the ideas
23:57 perlawhirl lizmat: I tried out toggle. I like it so far... provides something akin to takewhile/dropwhile, but more general.
23:58 poohman joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo