Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-21

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:00 seatek skink: slurpy: MAIN(*@stuff)
00:02 skink danke
00:02 seatek bitte
00:02 bazzaar joined #perl6
00:07 bazzaar o/ perl6
00:09 bazzaar I've just submitted a PR for doc changes to the Grammar_Tutorial, hopefully folks will think they are ok :)
00:11 bazzaar I found that the PR dialoque text box doesn't seem to like <tokens> however
00:13 geekosaur dmaestro, those missing symbols are a misbuilt readline. you are missing either -lncurses or -ltinfo
00:13 geekosaur in the link for libreadline
00:16 geekosaur (which one you need depends on how slackware builds ncurses. separate is the convention for BSDish systems and some Linux distributions [notably RH/Fedora and Debian], combined is the convention for System V and some other Linux distributions)
00:24 skink ... Ever sit back and just be like, "what on earth did I just write?"
00:24 skink sub MAIN(*@folders) { my $images = (@folders.map: { .IO.dir(test => /:i '.' (jpe?g|png) $/)>>.Str }).flat; ... }
00:27 BenGoldberg Why only jpegs and pngs?  No support for gifs, tifs, etc?
00:28 skink Sshhh. I have to check the format support of the lib I'm using.
00:30 notostraca joined #perl6
00:31 AlexDaniel BenGoldberg: and the most important format is missing!
00:31 AlexDaniel SVG!!
00:32 BenGoldberg :)
00:33 skink This is a pHash wrapper/util for finding duplicate image, where said duplicates are resized/recompressed/reformatted versions, rather than the same file
00:33 skink I can post the code, if anyone's interested
00:38 awwaiid joined #perl6
00:41 seatek bazzaar: I like the extra bit on <sym>s! A question though - that's a pretty detailed excursion into <sym>'s. Do you think it might be good to have a <sym> section in the actual grammar page? We don't go into detail like that anywhere else in the tutorial I think. I don't know though.
00:41 seatek bazzaar: the point of the tutorial was to get people's heads to wrap around just the concept of grammars themselves... not the detail really
00:42 seatek but i'm open to anything always ;)
00:43 seatek but the main grammar doc could really use A LOT of stuff like that sym piece you did
00:43 pierre_ joined #perl6
00:44 seatek whatcha think? i don't know really. i know grammars are a stumbling block conceptually at first until they click
00:44 seatek and my fear is that without that knowledge first, the sym details will just be so much noise.. ? but i can't tell any more for sure.
00:47 viki skink: sub MAIN(*@folders) { my $images = (@folders.map: { .IO.dir(test => *.extension eq any <jpeg jpg png>)>>.Str }).flat;
00:47 viki hmmmm
00:47 viki m: "foo.JPG".IO.extension.say
00:47 camelia rakudo-moar 014d4c: OUTPUT«JPG␤»
00:47 viki well, that sucks
00:48 viki *.extension.lc eq any <jpeg jpg png> :)
00:48 Praise joined #perl6
00:48 Praise joined #perl6
00:50 imcsk8 joined #perl6
00:50 m0ltar joined #perl6
00:55 AlexDaniel viki: lc? But what about unicode extensions? :P
00:58 viki What about them?
00:59 AlexDaniel well, just joking. Have never seen extension with characters out of ascii range
00:59 skink Is there a shorter way of recursively finding those files than the one on the dir docs page?
00:59 AlexDaniel source: "foo.JPG".IO.extension
00:59 viki You mean to use .fc? Then you'd need to .fc the extensions too and .. meh
01:00 AlexDaniel viki: yea
01:00 AlexDaniel SourceBaby: "foo.JPG".IO.extension
01:00 AlexDaniel SourceBaby: help?
01:00 AlexDaniel :(
01:00 viki s: "foo.JPG".IO, 'extension', \()
01:00 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/IO/Path.pm#L66
01:00 viki SourceBaby: help
01:00 SourceBaby viki, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
01:00 viki s: "foo.JPG".IO, 'basename', \()
01:00 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/IO/Path.pm#L65
01:01 viki s: Rakudo::Internals, 'MAKE-EXT', \("foo.JPG")
01:01 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/Rakudo/Internals.pm#L1765
01:01 viki so basically a substr of extension :)
01:01 viki using nqp ops
01:02 AlexDaniel m: ‘blah.’.IO.extension.say
01:02 camelia rakudo-moar 014d4c: OUTPUT«␤»
01:02 pierre_ joined #perl6
01:02 viki m: ‘.bashrc’.IO.extension.say
01:02 camelia rakudo-moar 014d4c: OUTPUT«bashrc␤»
01:03 AlexDaniel great
01:05 pierre_ joined #perl6
01:05 dalek doc: d1d5f70 | bazzaar++ | doc/Language/grammar_tutorial.pod6:
01:05 dalek doc: Attempt to tighten up the description of how the proto token works,
01:05 dalek doc: and specifically focus on the utilisation of the <sym> token.
01:05 dalek doc: review: https://github.com/perl6/doc/commit/d1d5f70910
01:05 dalek doc: 606cb55 | seatek++ | doc/Language/grammar_tutorial.pod6:
01:05 synopsebot6 Link: http://doc.perl6.org/language/grammar_tutorial
01:05 synopsebot6 Link: http://doc.perl6.org/language/grammar_tutorial
01:05 dalek doc: Merge pull request #1017 from bazzaar/roundrobin-edits
01:05 dalek doc:
01:05 dalek doc: Grammar Tutorial : attempt to tighten up the description of how the proto token works.
01:05 dalek doc: review: https://github.com/perl6/doc/commit/606cb5503c
01:06 AlexDaniel m: dd Rakudo::Internals.MAKE-CLEAN-PARTS(‘/foo/foo.jpg’)
01:06 camelia rakudo-moar 014d4c: OUTPUT«("", "foo", "foo.jpg", "")␤»
01:06 AlexDaniel interesting
01:06 AlexDaniel m: dd Rakudo::Internals.MAKE-CLEAN-PARTS(‘//foo/foo.jpg’)
01:06 camelia rakudo-moar 014d4c: OUTPUT«("//foo", "foo.jpg", "")␤»
01:06 AlexDaniel m: dd Rakudo::Internals.MAKE-CLEAN-PARTS(‘///foo/foo.jpg’)
01:06 camelia rakudo-moar 014d4c: OUTPUT«("//", "foo", "foo.jpg", "")␤»
01:06 labster joined #perl6
01:07 AlexDaniel m: dd Rakudo::Internals.MAKE-CLEAN-PARTS(‘////////foo/foo.jpg’)
01:07 camelia rakudo-moar 014d4c: OUTPUT«("//", "foo", "foo.jpg", "")␤»
01:07 AlexDaniel doesn't look right to be honest
01:07 AlexDaniel but don't know what would be the effect of this
01:08 AlexDaniel is there anything that uses MAKE-CLEAN-PARTS ?
01:11 dogbert17 joined #perl6
01:12 MasterDuke it isn't called by anything
01:23 BenGoldberg s: Rakudo::Internals, 'MAKE-CLEAN-PARTS', ‘///foo/foo.jpg’
01:23 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Rakudo::Internals, Str, Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
01:24 BenGoldberg s: Rakudo::Internals, 'MAKE-CLEAN-PARTS', \(‘///foo/foo.jpg’)
01:24 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/Rakudo/Internals.pm#L1774
01:24 skink Anyone know why .race doesn't get me any speedups here?
01:24 skink https://gist.github.com/skinkade/a9a0ebf8855aad59edaa3cf86ca0a022
01:26 MasterDuke i seem to recall some weirdness with .race/.hyper and laziness. does anything change if you add a .eager?
01:27 samcv anybody here got Inline::Perl5 working on Travis CI?
01:27 samcv with perl 6 template it only has like perl 5.12... and inline perl 5 needs 5.18 :(
01:30 skink MasterDuke, per se, .race, and .eager all gives nearly the exact same times
01:30 samcv will try updating perl in the .travis.yml but kinda lame it comes with such an old perl
01:30 pierre_ joined #perl6
01:31 skink .race.eager makes the script finish instantly without doing anything @_@
01:31 MasterDuke .eager.race?
01:32 skink semantic satiation is already setting in
01:32 timotimo you need to .hyper.map or .hyper.for or something
01:32 timotimo not the other way around
01:32 timotimo at least i think so ...
01:32 timotimo maybe you're putting the hyper or race in the wrong place?
01:34 skink I'll try race.map
01:37 skink Could be something's blocking in the C lib
01:38 Actualeyes joined #perl6
01:40 aborazmeh joined #perl6
01:40 skink .eager.race and .race.map prevent it from ever finishing, which is... interesting
01:40 aborazmeh joined #perl6
01:43 timotimo well, if you first .eager it, then .race it, it'll try to make the whole list first, then continue with multi-threading whatever comes after that
01:43 timotimo like .eager.race.for would first slurp all results, then do the .for in parallel
01:47 skink I don't think .race.for is a thing
01:49 skink for foo.eager.race, also sticks
01:51 timotimo oh, right, we don't have .for as a method any more
01:51 timotimo but .map will do the trick
01:52 skink right, and .race.map causes it to hang :(
01:54 timotimo well, .race and .hyper have been buggy at least in the past ... i haven't looked into them for a few months
01:58 finanalyst joined #perl6
01:58 cdg joined #perl6
01:59 MasterDuke jnthn said pretty recently (couple days ago?) he was going to look at them soon, but hasn't yet
02:01 Actualeyes joined #perl6
02:34 ssm joined #perl6
02:35 resol joined #perl6
02:38 FreezerburnV joined #perl6
02:47 ilbot3 joined #perl6
02:47 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:12 mattp__ joined #perl6
03:13 Unavowed joined #perl6
03:15 vytas joined #perl6
03:15 smash joined #perl6
03:20 canopus joined #perl6
03:33 FreezerburnV joined #perl6
03:34 noganex_ joined #perl6
04:01 pierre_ joined #perl6
04:20 resol p6: class Node { has $!name; }
04:20 camelia rakudo-moar 014d4c: ( no output )
04:20 resol class Edge { has Node $!first; has Node $!second; }
04:21 resol for me this generates are whole mess of errors ..  Package 'Edge' already has an attribute named '$!first'   in any add_attribute at gen/moar/m-Metamodel.nqp line 368   in any pkg_add_attribute at src/Perl6/World.nqp line 2830   in any declare_variable at gen/moar/m-Perl6-Actions.nqp line 3162   in any variable_declarator at gen/moar/m-Perl6-Actions.nqp line 3073   in any variable_declarator at src/Perl6/Grammar.nqp line 2525   in any declarator
04:22 resol Trying to follow some of the hands on tutorials for classes.
04:23 resol Obviously I'm doing something incorrectly ... just don't know quote what it is.
04:25 gfldex m: class Edge { has Node $!first; has Node $!second; }
04:25 camelia rakudo-moar 014d4c: OUTPUT«5===SORRY!5===␤Type 'Node' is not declared. Did you mean 'Code'?␤at <tmp>:1␤------> 3class Edge { has Node7⏏5 $!first; has Node $!second; }␤Malformed has␤at <tmp>:1␤------> 3class Edge { has7⏏5 Node $!first; has Node $!second; }…»
04:25 gfldex m: class Node {}; class Edge { has Node $!first; has Node $!second; }
04:25 camelia rakudo-moar 014d4c: ( no output )
04:26 gfldex resol: what does perl6 --version say?
04:27 resol This is Rakudo version 2016.10 built on MoarVM version 2016.10 implementing Perl 6.c.
04:28 timotimo resol: are you doing this in a file or in a REPL?
04:29 resol Hi there timotimo, yes, was trying it in REPL ... maybe that's the problem ... can't experiment there?
04:29 timotimo well, it'll potentially already have a class Edge and try to add the attributes to it again
04:29 timotimo the REPL is ... kind of problematic sometimes
04:30 resol It also does the same if I try the example in the intro
04:30 resol class Human { has $.name ; has $.age; }
04:31 aries_liuxueyang joined #perl6
04:31 timotimo huh, so when you open a fresh repl, and copy-paste that code in, it explodes with that error?
04:32 resol Ha, oddly enough, I just tried to close and re-open REPL, and voila the one for the Human worked.
04:32 resol So my choice of Edge and Node are the problem.
04:32 timotimo maybe not
04:32 timotimo try doing it again
04:32 resol I was trying to do a quick test to set up a directed graph
04:33 resol And I chose Node and Edge as classes
04:33 timotimo it works fine on my machine, fwiw
04:33 timotimo and it should most definitely work when put into a file
04:35 timotimo i need to sleep :)
04:35 timotimo good luck!
04:35 resol Thanks ... I put things into a file, and changed the name of Edge to Link and it works fine.
04:36 resol Thanks for the help
04:37 geekosaur joined #perl6
04:38 vendethiel joined #perl6
04:39 geekosaur joined #perl6
05:10 pierre_ joined #perl6
05:11 daph joined #perl6
05:16 Cabanossi joined #perl6
05:41 labster joined #perl6
05:42 Tonik joined #perl6
05:45 xtreak joined #perl6
06:10 xiaomiao joined #perl6
06:10 xiaomiao joined #perl6
06:20 aborazmeh joined #perl6
06:20 aborazmeh joined #perl6
06:26 domidumont joined #perl6
06:30 domidumont joined #perl6
06:34 bjz joined #perl6
06:35 seatek m: class C { method a_12() { say 'hi' }};
06:35 camelia rakudo-moar 014d4c: ( no output )
06:35 seatek m: class C { method a-12() { say 'hi' }};
06:35 camelia rakudo-moar 014d4c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class C { method a7⏏5-12() { say 'hi' }};␤»
06:35 seatek m: class C { method a12() { say 'hi' }};
06:35 camelia rakudo-moar 014d4c: ( no output )
06:36 seatek m: class C { method a-bc() { say 'hi' }};
06:36 camelia rakudo-moar 014d4c: ( no output )
06:36 psch m: my $a-12
06:36 camelia rakudo-moar 014d4c: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "my $a-12" in sink context (line 1)␤Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤»
06:37 psch m: my $a12-a;
06:37 camelia rakudo-moar 014d4c: ( no output )
06:37 seatek yeah it thinks it might be math after method
06:38 psch it always commits to math if there's a number on the RHS of -
06:39 seatek ok
06:39 raiph joined #perl6
06:40 pierre_ joined #perl6
06:41 wamba joined #perl6
06:48 RabidGravy joined #perl6
06:51 psch m: class A { method ::("a12-5") { "baz" } }; say A."a12-5"()
06:51 camelia rakudo-moar 014d4c: OUTPUT«baz␤»
06:51 psch seatek: ^^^ if you *have* to...
06:52 bjz joined #perl6
06:52 seatek no, i just get all happy about being able to use $this-stuff instead of $this_stuff, but then i keep running into places where that's not always possible
06:53 seatek just trying to find the happy ground level ;)
06:53 psch well, it works as long as you have an alphabetical grapheme on the right side of the dash
06:54 brillenfux joined #perl6
06:54 seatek it's true - and i've adjusted my creativity to conform to such fascism that is expedient. ;)
06:56 seatek i tried method 123-abc() btw too ;)
06:56 psch well, it does have to start with alpha too
06:57 seatek :)
06:57 seatek i feel so oppressed
06:57 psch great
06:57 seatek hehe :)
06:57 seatek actually never have seen anything that could start with numbers
06:57 seatek i wonder why that is.
06:57 seatek no language i can think of does
06:58 seatek except assembly
06:59 seatek i guess i have all of unicode as my canvas though, except for numbers. curse my feeble keyboards
07:00 seatek actually, it's probably for the best
07:09 ufobat joined #perl6
07:12 rpburkholder joined #perl6
07:16 darutoko joined #perl6
07:21 ZzZombo joined #perl6
07:22 ZzZombo I have not been following Perl 6 development for a while, but today I learned a new RC is out. So on the scale from 0 till 10, how good is it this time to start using it?
07:22 psch ZzZombo: it's not an RC, it's a release
07:22 psch ZzZombo: as for "using it", it depends on what you want to use it for
07:23 ZzZombo I want to switch over to it.
07:23 psch for what?  system programming?  web dev?  glue?
07:23 ZzZombo For new applications.
07:24 seatek I've been having lots of fun with it :)
07:25 psch i'd assume the biggest concern for developing new applications is deployability
07:25 ZzZombo I'm mostly doing nothing but coding random pieces of programs for my own use. More of playing with the language, like with LEGO.
07:25 psch assuming you're not exclusively doing stuff inhouse
07:27 seatek it's been working out well for me ZzZombo. Definitely worth playing around with. And it's not changing fast -- it's pretty stablized
07:28 psch the "1.0" of the specification has been released last christmas, "1.1" is slowly starting to emerge
07:28 psch the recommended compiler Rakudo largely complies to that specification
07:29 psch specifically the MoarVM backend.  jvm is kind of a mess in a few spots, due to big architectural differences
07:29 ZzZombo Hm, but I assume there is lack of editor support. Is there Perl 6 support for Eclipse?
07:29 psch it's still useable, though
07:29 seatek I use an Emacs major mode for Perl6 - not sure about anything else
07:29 psch i think atom has syntax highlighting, there's a vim plugin too
07:30 psch i personally find the language intuitive and visually distinctive enough to not use syntax highlighting
07:30 seatek you know i wonder if notepad++ on windows has support yet for it
07:30 ZzZombo I dismissed Atom, because most of claimed features were working wrong.
07:30 psch as for auto completion and such, i'm not sure.  we have some support for that in the REPL, but i'm not aware of anyone utilizing that in an editor
07:32 firstdayonthejob joined #perl6
07:35 ZzZombo Hm, http://rakudo.org/downloads/star/ is missing the latest version for Windows. Shame.
07:35 domidumont joined #perl6
07:35 seatek someone just said a day or 2 ago that the new windows build was out...
07:38 seatek http://pl6anet.org/drop/ was that it?
07:40 psch it does look like a R* MSI from here... :)
07:40 seatek yeah just skipping .10 altogether and going on to .11 eh?
07:41 psch star is every 3 months
07:41 psch ...i thought at least?
07:41 psch star-m: say $*PERL.compiler
07:41 camelia star-m 2016.10: OUTPUT«rakudo (2016.10)␤»
07:41 ZzZombo Wait, what? The installer won't even let me change installation directory??
07:41 * psch has been wrong before, and apparently is wrong now
07:42 ZzZombo Ugh, uh oh
07:42 ZzZombo how odd
07:42 ZzZombo I have NO desire to let it settle on C:
07:42 psch ZzZombo: the vm unfortunately still has some hardcoded paths.  there's usually more pressing issues, patches welcome :)
07:42 samcv is it normal for comb :match to show the wrong number of elements? if i add a .eager after it, it works fine
07:42 seatek yeah there's something about that on windows... that's it's locked in
07:42 samcv but unless I do that it misses the second half of everything it combs through
07:43 psch samcv: do you have an example?
07:43 samcv yes
07:44 andrzejku hey
07:44 andrzejku :)
07:44 samcv hold on maybe that's not the issue. give me some more time to check some things
07:45 ZzZombo P6 XML module lacks XPath support. A pity.
07:45 moritz patch it in!
07:45 ZzZombo Guess I'll have to fiddle with getting XML::LibXML work in P6?
07:45 ZzZombo I know way too little for that to happen, I fear.
07:45 samcv ugh it's showing different numbers every time. and i tried slurping the file it's processing, instead of getting it thrcough curl
07:46 samcv and then it hangs on comb, and uses 100% cpu
07:46 samcv lemme upload it
07:47 samcv ok here's the perl 6 file https://gist.github.com/66ac86ada35cf24ba18dd14e552556de
07:47 samcv here is the file i'm slurping https://gist.github.com/66ac86ada35cf24ba18dd14e552556de
07:48 stux|RC-only joined #perl6
07:48 samcv it slurps fine i can print out the variable it puts it in, but it hangs. and curling the page using qx, it will work but have inconsistent numbers of matches, tho now 100% sure if that's comb's fault or something else, the site not always replying the same.
07:48 samcv but it always hangs for me when i slurp that file
07:48 andrzejku :-)
07:49 pierre_ joined #perl6
07:49 samcv so had nothing to do with eager/lazy or not, must have been coincidence i added that, and got a higher number of matches
07:50 psch hm, it does look pretty reasonable, what you're doing
07:50 psch although i suspect you pasted the wrong link for the file that's being slurped :)
07:50 samcv yeah... and it ''works'' if i curl it into a variable
07:50 samcv oh
07:50 samcv yes
07:51 samcv https://gist.github.com/50209bf6ba2716860d36c803b64c40b5 here it is :)
07:52 domidumont joined #perl6
07:54 psch hm, i'm not seeing anything that i'd would expect to match your pattern in the second file
07:54 psch ...it is a big file though, so yeah :)
07:55 pierre_ joined #perl6
07:57 psch yeah, there's not even a single '<span>' in there afaict
07:57 psch as in, all opening span tags have attributes
07:57 CIAvash joined #perl6
07:57 samcv yeah shouldn't hang tho :\
07:57 psch soo i'd guess it loops because it finds a \d+ followed by a '</span>', then non-greedy walks through the whole file, doesn't find anything, tries the next \d+...
07:58 psch i suspect it'd finish eventually :)
07:58 samcv hahah
07:58 seatek sometimes it pays to be greedy?
07:59 psch eh, i think greedy wouldn't help here, it'd just shift to backtracking instead of "forwardtracking"
07:59 psch ahh, github truncated the file
07:59 psch so maybe there *is* a '<span>' somewhere...
08:00 psch hm, browser still says no
08:00 seatek you could use greedy grammar rules :)
08:01 samcv my $matches = $data.comb( / (\d+) '</span>' (.** 1..10  '<span>'   /, :match, ∞); doing this finishes
08:01 samcv so yeah it was just uh. i guess going through everything again and again haha
08:01 psch still curious that i don't see the string '<span>' anywhere in the file :)
08:01 andrzejku joined #perl6
08:01 samcv though. it should notice there isn't any <span> or something
08:02 samcv ah i saved it from my browser. so it must have totally changed it
08:02 psch the all have attribute, hence '<span .+>'
08:13 trnh joined #perl6
08:13 trnh joined #perl6
08:17 salva joined #perl6
08:18 xtreak joined #perl6
08:23 labster joined #perl6
08:33 domidumont joined #perl6
08:33 seatek yet again i weep in thankfulness for multi-line comments
08:37 ZzZombo How do I install modules in Perl 6? I don't seem to see that anywhere.
08:38 seatek you should have gotten the program panda along with your distro i think
08:38 seatek zef also does it
08:39 seatek panda pulls modules from the repository at https://modules.perl6.org/
08:40 ZzZombo Does it come with the installer?
08:40 ZzZombo because for me it says unknown program "panda"
08:40 seatek i don't know.. i think it's part of rakudo-star distribution
08:40 seatek hmm
08:40 moritz it is
08:41 g4 joined #perl6
08:41 g4 joined #perl6
08:43 seatek is it in c:\rakudo\bin?
08:44 seatek i don't know what terminals and paths and whatnot of windows ways
08:45 ZzZombo It's not here, but I made a mistake of not launching a new cmd.exe instance, since the one I used of course missed the new PATH values.
08:45 ZzZombo now it works.
08:45 seatek ah ok :)
08:45 rindolf joined #perl6
08:49 cibs joined #perl6
08:52 masak good morning, #perl6
08:55 mj41 joined #perl6
08:56 seatek good morning masak
09:00 ocbtec joined #perl6
09:04 [ptc] o/
09:05 samcv ZzZombo, welcome to perl 6"
09:05 samcv perl6! i mean
09:05 DrForr o/
09:18 dakkar joined #perl6
09:34 grondilu oh we have a str type?
09:34 grondilu m: say my str $ = "foo"
09:34 camelia rakudo-moar 014d4c: OUTPUT«foo␤»
09:34 ZzZombo samcv, thanks.
09:37 ZzZombo speaking of it, how do I nicely translate a P5 module into P6? I have a class module named X, invoked via the usual X->new(blah).
09:37 ZzZombo in P6, if I leave it in the same named file, I would have to use X::X->new for the same purpose, wouldn't I? And it is not pretty to repeat yourself.
09:38 domidumont left #perl6
09:39 seatek m: class MyClass { has $.x; method doit() { say $.x } }; my $c = MyClass.new(x => 3); $c.doit;
09:39 camelia rakudo-moar 014d4c: OUTPUT«3␤»
09:39 grondilu if it's a class it's not a module.  So 'use X; X.new(blah);'
09:40 psch if you have a Perl 5 class and want to use it, install Inline::Perl5 and 'use Perl5Class:from<Perl5>', i'd say :)
09:40 ZzZombo hm
09:40 grondilu unlinke in P5, there is an explicit distinction between packages, modules and classes.
09:41 ZzZombo no, I'm translating my own class into P6 for learning
09:41 psch probably start at https://docs.perl6.org/language/classtut
09:41 seatek there are actual keywords now to define classes
09:41 seatek class Blah { define_in_here }
09:41 ZzZombo so, I'm feel like I miss where should I define that class for using that in other modules.
09:42 psch a class is a module is a package
09:42 grondilu ZzZombo: define your class as a computing unit
09:42 grondilu unit class X;  <= your file will begin as such
09:43 grondilu and then you do 'use X;'
09:44 grondilu 'use X; X.new' as psch said : a class *is* a module
09:44 seatek that class tutorial is pretty good
09:45 ZzZombo so I can add a :ver to it, for example>
09:45 ZzZombo ?*
09:45 ggoebel joined #perl6
09:46 psch the version of a module is defined in its META6.json
09:46 seatek you can do version in unit stuff
09:46 seatek and author
09:46 psch at least if i'm still up-to-date on CURI stuff...
09:46 ZzZombo ugh, there is a lot to learn. Not that it's bad, just exhausting :)
09:46 seatek it's very much like Moose if you've ever used it. Or moose is a lot like it
09:48 xtreak joined #perl6
09:51 domidumont joined #perl6
10:11 FROGGS joined #perl6
10:11 bazzaar joined #perl6
10:15 FROGGS[mobile] joined #perl6
10:16 bazzaar seatek: thanks for approving/merging my edits of the proto-regex part of the grammar tutorial doc
10:17 El_Che Update Linux Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases/tag/2016.11 (not rakudo star, just monthly rakudo)
10:20 seatek bazzaar: thank you for helping others out! was a little worried it might be too detailed for the tutorial, but unfounded worry i think!
10:22 bazzaar I understand your concern, as to how much detail should be in the tutorial. I quess it was the use of this mysterious <sym> token in the doc, that prompted me to make those edits :)
10:22 FROGGS[mobile]2 joined #perl6
10:23 seatek yeah, i wrestled with that exact question when i was writing it, and decided to gloss over it... but i think you did it in a very clear way that only helps and shouldn't derail new learners
10:29 dalek mu: b808a67 | (brian d foy)++ | misc/perl6advent-2016/schedule:
10:29 dalek mu: I'll do the advent calendar
10:29 dalek mu:
10:29 dalek mu: Zoffix pinged me on Twitter.
10:29 dalek mu: review: https://github.com/perl6/mu/commit/b808a67219
10:29 dalek mu: b4b3b5f | RabidGravy++ | misc/perl6advent-2016/schedule:
10:29 dalek mu: Merge pull request #16 from briandfoy/patch-1
10:29 dalek mu:
10:29 dalek mu: I'll do the advent calendar
10:29 dalek mu: review: https://github.com/perl6/mu/commit/b4b3b5f357
10:29 bazzaar seatek: Thank you for writing the Grammar Tutorial doc, it's certainly helped me to better understand the use of Grammars and Action classes.
10:35 seatek oh well that made me feel good
10:36 gfldex :)
10:37 gfldex it's a funny feeling to look some detail up in the docs and to realise that I wrote that
10:43 ilmari[m] joined #perl6
10:43 seatek :)
10:45 tadzik joined #perl6
10:45 Matthew[m] joined #perl6
10:45 M-Illandan joined #perl6
10:45 Matias[m] joined #perl6
10:55 CIAvash joined #perl6
10:57 ZzZombo hm
10:58 ZzZombo I just found something I don't like about P6:
10:58 ZzZombo new syntax for the ternary operator!
10:58 ZzZombo whyyyy...
10:58 psch m: say ?"0"
10:58 camelia rakudo-moar 014d4c: OUTPUT«True␤»
10:58 psch because LTM means we cannot have a prefix:<?> *and* the old ternary operator
10:58 FROGGS[mobile]2 we needed the colon
10:59 * psch came after that meme
10:59 ZzZombo what does that do, psch?
10:59 FROGGS[mobile]2 boolify
10:59 ZzZombo So "0" is true?
11:00 psch ZzZombo: it's the high precedence for of &so, which is the opposite of &not, so yes, as FROGGS[mobile]2++ says, boolify
11:00 FROGGS[mobile]2 sure
11:00 psch s/for/form/
11:00 ZzZombo hmm
11:00 FROGGS[mobile]2 it is a non-empty string
11:00 ZzZombo add that the the list of things I don't like, then. :P
11:00 ZzZombo to*
11:00 jnthn Also, the various other conditional-y operators that short-circuit are double-chars (consider &&, || and //)
11:00 FROGGS[mobile]2 *g*
11:01 jnthn And : doesn't suggest "not" in any way, while !! does
11:01 jnthn So a ?? b !! c is more consistent in various ways
11:01 FROGGS[mobile]2 ZzZombo: you have to admit that "0e0" in P5 is a hack
11:01 jnthn (We had it as a ?? b :: c at some point)
11:02 ZzZombo I don't really care about that, I just think '0' should be false.
11:02 psch m: say so +'0'
11:02 camelia rakudo-moar 014d4c: OUTPUT«False␤»
11:02 psch it *can* be
11:02 psch :)
11:02 ZzZombo ugh
11:02 ZzZombo what
11:02 ZzZombo the
11:02 ZzZombo ???
11:02 FROGGS[mobile]2 consistency
11:03 ZzZombo m: say ?"0"
11:03 camelia rakudo-moar 014d4c: OUTPUT«True␤»
11:03 ZzZombo ^ ?
11:03 jnthn + just numifies it first
11:03 FROGGS[mobile]2 a string is not the same type as an integer
11:03 ZzZombo yes, I got it.
11:03 FROGGS[mobile]2 we can destinguish, and we do
11:04 ZzZombo anyway, I was about to write that '' and '0' out of all string values should be false, IMO.
11:04 FROGGS[mobile]2 P5 cannot always, so it does not
11:04 FROGGS[mobile]2 why "0"?
11:04 psch ...and why ' ' not?
11:05 FROGGS[mobile]2 and why not "0.0" too then?
11:05 psch and '0+0i'
11:05 TEttinger "zero"
11:05 ZzZombo is there a difference between '' and "" other than interpolation?
11:05 FROGGS[mobile]2 no
11:05 ZzZombo well, that's it.
11:05 ZzZombo I just omitted it
11:08 ZzZombo May I suggest an edit to docs, and where?
11:08 viki ZzZombo: http://github.com/perl6/doc
11:08 viki ZzZombo: why would "0" be False? It's a string with content in it!
11:08 FROGGS[mobile]2 ZzZombo: there are things that feel foreign the first days, but when you accepted it you can start loving it for its consistency and logic
11:09 FROGGS[mobile]2 I certainly do
11:09 viki ZzZombo: as for the ternary.... you'll get used to it. It's far more visible than traditional one. I actually hate how other languages do it now, because it just blends with the rest of the code.
11:10 ZzZombo I guess I too accustmed to Perl 5, but I have some other reasons behind that, that are too hard to explain for me. Especially since I'm not a native English speaker.
11:10 FROGGS[mobile]2 especially when there is no whitespace
11:10 FROGGS[mobile]2 me neither
11:11 jnthn We did actually have "0" as True at first. It was quite funny when we changed it, because reivewing places we'd need to tweak showed that various pieces of code were already assuming it meant "string is not empty", so we got some free bug fixes. :-)
11:11 viki ZzZombo: well, then if you're accustomed to Perl 5 you know that "0" being false was a giant pain in the ass as you always had to do if (defined $user_input and length $user_input) {} and after 5.14 you could finally write if (length $user_input) {} but in Perl 6 you can just write if $user_input { ... }
11:17 ZzZombo viki: thanks, edited the page.
11:21 wamba joined #perl6
11:23 jonas1 joined #perl6
11:23 wamba joined #perl6
11:23 xtreak joined #perl6
11:31 pmurias joined #perl6
11:32 pmurias ZzZombo: I really like the new ternary operator as it visually stands out more
11:44 smls joined #perl6
11:45 smls bisectable6: say (1...5).list.WHAT
11:45 bisectable6 smls, On both starting points (old=2015.12 new=014d4cf) the exit code is 0 and the output is identical as well
11:45 bisectable6 smls, Output on both points: (List)
11:46 smls Hm, I thought a lower-case .list used to pass through any Iterable as-is
11:47 psch bisectable6: old=2014.12 say (1...5).list.WHAT
11:47 bisectable6 psch, On both starting points (old=2014.12 new=014d4cf) the exit code is 0 and the output is identical as well
11:47 bisectable6 psch, Output on both points: (List)
11:47 psch that must've been quite some time ago
11:47 smls guess I misremembered
11:47 tbrowder hi #perl6
11:47 psch oh, except Iterable... those are rather new
11:48 smls Problem of the current behavior is that  `for @$foo { ... }`  is not memory-efficient if $foo is a large Seq
11:49 smls I guess this means .list enforces "positional iterable" context, not just "iterable" context?
11:50 psch m: say { :1a, :2b }.list.keys
11:50 camelia rakudo-moar 014d4c: OUTPUT«(0 1)␤»
11:50 psch i always took it as such, yes
11:50 smls ok
11:50 jnthn @ actually does .cache these days rather than .list
11:51 jnthn m: my $a = 1..5; for $a { .say }
11:51 camelia rakudo-moar 014d4c: OUTPUT«1..5␤»
11:51 jnthn m: my $a = 1..5; for |$a { .say }
11:51 camelia rakudo-moar 014d4c: OUTPUT«1␤2␤3␤4␤5␤»
11:51 jnthn That doesn't cause any caching though
11:51 smls ok
11:51 jnthn So is preferable to for @$a { .say }
11:51 tbrowder I'm trying to test a CGI script and need to provide the %*ENV normally expected with Apache.  I have a test module that provides that hash for my CGI utils module but it doesn't seem to hold its values after it's first loaded.  I have declared it as a state variable.  Ideas?
11:52 tbrowder Maybe put it in a BEGIN block?
11:53 wamba joined #perl6
11:53 viki ZzZombo: I'm not seeing the edit....
11:54 tbrowder BEGIN block didn't help.  I'll but code in a gist...
11:54 ZzZombo https://github.com/ZzZombo/doc
11:54 tbrowder s/but/put/
11:55 ZzZombo @array[$i]:exists tests if @array has element at $i, not if it has a value of $i, doesn't it?
11:55 moritz it checks if it has an index of $i
11:55 viki ¯\_(ツ)_/¯
11:55 viki I guess you'll send a PR :)
11:55 ZzZombo I did already, didn't I?
11:56 viki Nope
11:56 jonas1 joined #perl6
11:56 viki ZzZombo: right, has element at.... $i is the index
11:56 viki m: my @a; say @a[5]:exists
11:56 camelia rakudo-moar 014d4c: OUTPUT«False␤»
11:56 viki m: my @a = ^10; say @a[5]:exists
11:56 camelia rakudo-moar 014d4c: OUTPUT«True␤»
11:56 viki m: my @a = ^10; @a[5]:delete; say @a[5]:exists
11:56 camelia rakudo-moar 014d4c: OUTPUT«False␤»
11:58 viki ZzZombo: oh sorry you did
11:58 viki ZzZombo: I forgot I have notifications turned off in that repo
11:58 dalek doc: 80b5ce9 | ZzZombo++ | doc/Language/5to6-nutshell.pod6:
11:58 dalek doc: I believe this emphasis was wrong
11:58 dalek doc:
11:58 dalek doc: At first I got the impression I DO HAVE to take care with ranges.
11:58 dalek doc: review: https://github.com/perl6/doc/commit/80b5ce9f4c
11:58 synopsebot6 Link: http://doc.perl6.org/language/5to6-nutshell
11:58 dalek doc: aeabf1a | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod6:
11:58 dalek doc: Merge pull request #1018 from ZzZombo/patch-1
11:58 synopsebot6 Link: http://doc.perl6.org/language/5to6-nutshell
11:58 dalek doc:
11:58 dalek doc: I believe this emphasis was wrong
11:58 dalek doc: review: https://github.com/perl6/doc/commit/aeabf1a249
11:59 ZzZombo eh, I almost started to curse Github for somehow losing my PR.
12:00 ZzZombo I frantically searched it, but for some reason I indeed couldn't find it.
12:00 ZzZombo sigh
12:00 gfldex ZzZombo: the docs are free for all. If you comtribute often, you are more then welcome to skip the RPs and mess things up directly. :->
12:01 ZzZombo Nice to know.
12:01 ZzZombo I guess I'll hang around here, so maybe I will be of some use after all.
12:01 viki \o/
12:02 dogbert17 o/
12:02 dogbert17 is moritz around by any chance?
12:03 viki But on the topic of '0' being true. It makes sense in Perl 6 because Perl 6 has types. 0 is an Int and '0' is a Str. BUT, if you're dead bent on it being false, you can make it false.
12:03 viki m: say my $v = '0' but False; say so $v
12:03 camelia rakudo-moar 014d4c: OUTPUT«0␤False␤»
12:03 viki hehe
12:03 viki m: my $v = '0' does False; say so '0'
12:03 camelia rakudo-moar 014d4c: OUTPUT«True␤»
12:03 viki m: my $v = '0' does False; say so $cv
12:03 camelia rakudo-moar 014d4c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$cv' is not declared␤at <tmp>:1␤------> 3my $v = '0' does False; say so 7⏏5$cv␤»
12:04 viki m: my $v = '0' does False; say so $v
12:04 camelia rakudo-moar 014d4c: OUTPUT«False␤»
12:04 jonas1 joined #perl6
12:05 moritz dogbert17: I am, on and off
12:05 * viki doesn't really get why that works. False ain't a role....
12:05 viki m: my $v = '0' but 1; say +$v
12:05 camelia rakudo-moar 014d4c: OUTPUT«0␤»
12:05 viki m: my $v = '0' but 1; say $v
12:05 camelia rakudo-moar 014d4c: OUTPUT«0␤»
12:05 viki :|
12:05 dogbert17 moritz: take a look at this, time permitting: https://gist.github.com/dogbert17/511c3dd5f6524278d9a0623204be40c0
12:06 dogbert17 trying to remove the duplicated .from documentation
12:06 moritz dogbert17: by adding a third? :-)
12:06 moritz dogbert17: no, looks good
12:07 dogbert17 moritz: thx, will update
12:08 nowan_ joined #perl6
12:08 sufrostico joined #perl6
12:09 viki s: &infix:<but>, \(0, 1)
12:09 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/operators.pm#L83
12:10 viki m: my $v = '0' but 1; say $v.Int
12:10 camelia rakudo-moar 014d4c: OUTPUT«1␤»
12:10 viki Ah
12:10 ZzZombo "# pi, e, i are built-in constants in  Perl 6"
12:10 ZzZombo what is i?
12:11 viki m: say i.^name
12:11 camelia rakudo-moar 014d4c: OUTPUT«Complex␤»
12:11 moritz ZzZombo: sqrt(-1)
12:11 ZzZombo is it for complex numbers?
12:11 moritz yes
12:11 ZzZombo oh
12:11 ZzZombo ninja'd
12:11 viki τ is also built-in
12:12 viki m: my $v = '0' but class { method ^name { Numeric }; method gist { "meows!" } }; say +$v
12:12 camelia rakudo-moar 014d4c: OUTPUT«X::Mixin::NotComposable exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
12:12 pierre_ joined #perl6
12:12 viki bah
12:12 viki m: my $v = '0' but class { method ^name { Numeric }; method gist { "meows!" } }.new; say +$v
12:12 camelia rakudo-moar 014d4c: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method name at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:12 ZzZombo produced no message
12:12 ZzZombo how funny
12:12 viki m: my $v = '0' but class { method ^name ($) { Numeric }; method gist { "meows!" } }.new; say +$v
12:12 camelia rakudo-moar 014d4c: OUTPUT«0␤»
12:12 viki :(
12:12 viki Well, so much for that!
12:13 viki m: my $v = '0' but class { method ^name ($) { 'Numeric' }; method gist { "meows!" } }.new; say +$v
12:13 camelia rakudo-moar 014d4c: OUTPUT«meows!␤»
12:13 viki win!
12:14 dalek doc: 7b42420 | (Jan-Olof Hendig)++ | doc/Type/List.pod6:
12:14 dalek doc: The docs for .from was incorrect. moritz++
12:14 synopsebot6 Link: http://doc.perl6.org/type/List
12:14 dalek doc: review: https://github.com/perl6/doc/commit/7b42420785
12:16 viki m: X::Mixin::NotComposable.new(:target('0'), :rolish(class { method ^name { Numeric }; method gist { "meows!" } })).throw;
12:16 camelia rakudo-moar 014d4c: OUTPUT«X::Mixin::NotComposable exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
12:17 viki dafuq
12:17 viki m: X::Mixin::NotComposable.new(:target('0'), :rolish(class { method ^name { 'Numeric' }; method gist { "meows!" } })).throw
12:17 camelia rakudo-moar 014d4c: OUTPUT«X::Mixin::NotComposable exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
12:19 viki Ahhh
12:20 viki It's cause I messed around with ^name. So when it calls it, inside the exception things hexplode
12:20 viki m: X::Mixin::NotComposable.new(:target('0'), :rolish(class { method ^name ($) { 'Numeric' }; method gist { "meows!" } })).throw
12:20 camelia rakudo-moar 014d4c: OUTPUT«Cannot mix in non-composable type Numeric into object of type Str␤  in block <unit> at <tmp> line 1␤␤»
12:20 kurahaupo__ joined #perl6
12:22 khw joined #perl6
12:23 tbrowder problem solved: I put this line **inside** the subs needing %*ENV:     state %*ENV = get-env();
12:23 chienjo joined #perl6
12:24 chienjo /nick hchienjo
12:25 viki tbrowder: what was the original problem?
12:26 viki "trying to test a CGI script" ah... well, there's your proble m^_^
12:26 viki ^_^
12:26 viki But the fact that you got a Perl 6 CGI script and you aren't complaining that it's unbearably slow makes me happy :)
12:27 viki And I'm guessing it didn't work before is 'cause it's a dynamic variable
12:29 arnsholt tbrowder: There may be shenanigans going on with persisting %*ENV across process boundaries
12:29 arnsholt Depending on exactly how you've got the testing stuff set up
12:33 FROGGS[mobile] joined #perl6
12:41 dalek doc: 049f91e | (Jan-Olof Hendig)++ | doc/Type/List.pod6:
12:41 synopsebot6 Link: http://doc.perl6.org/type/List
12:41 dalek doc: Some tidying up
12:41 dalek doc: review: https://github.com/perl6/doc/commit/049f91e109
12:47 rindolf joined #perl6
12:49 tbrowder so far it seems to be working, at least enough so i can test the subs from Perl 5 CGI i want.
12:50 tbrowder I will provide gist if anyone is interested
12:51 tbrowder BTW, what about putting a link to brian d foy's kickstarter campaign on Perl 6 somewhere?
12:52 gfldex it's on reddit
12:59 kalkin- joined #perl6
12:59 kalkin- hi
13:01 kalkin- A few days ago i had some issues, because I assumed that foo: arg1, arg2. is a valid way to call a function. (Now I know it isn't, it's a label). Now I'm rereading https://docs.perl6.org/language/functions.html#Arguments and notice that i can do f: { say "foo" }; to pass a block to function f
13:02 psch kalkin-: please taboo "function", use "sub" or "method", as appropriate
13:02 kalkin- why does this work? shouldn't 'f:' be a label?
13:02 kalkin- psch: ok, thanks
13:02 viki m: sub f(&c) { c xx 10 }; f: { say "wat" }
13:02 camelia rakudo-moar 014d4c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    xx used at line 1␤␤»
13:02 viki :|
13:02 viki m: sub f(&c) { c() xx 10 }; f: { say "wat" }
13:02 camelia rakudo-moar 014d4c: OUTPUT«wat␤»
13:02 viki kalkin-: seems to be a mistake in the docs
13:03 viki m: sub f(&c) { c() xx 10 }; f { say "wat" }
13:03 camelia rakudo-moar 014d4c: OUTPUT«wat␤wat␤wat␤wat␤wat␤wat␤wat␤wat␤wat␤wat␤»
13:04 jnthn I think confused docs too. Maybe somebody over-abstracted from the method call colon syntax
13:04 jnthn ($foo.bar: $arg1, $arg2)
13:04 pierre_ joined #perl6
13:04 kalkin- I think viki mentioned last time, that I'm not the first one assuming it, this may be the source of the confusion
13:05 dalek doc: fde45f2 | (Zoffix Znet)++ | doc/Language/functions.pod6:
13:05 synopsebot6 Link: http://doc.perl6.org/language/functions
13:05 dalek doc: Fix up function arguments prose to exclude erroneous "adverbial form"
13:05 dalek doc: review: https://github.com/perl6/doc/commit/fde45f2af2
13:07 kalkin- Hmm, why can i do colon syntax on methods?
13:07 viki Because it's a thing that exists.
13:08 kalkin- ok but whats' the motivation behind adding a unique way to pass parameters to a method, which subs don't have?
13:08 viki Makes it cleaner, especially when nesting. say @foos.map(*.base: 16).grep: * eq '2212';
13:08 jnthn Subs have listop syntax. Methods don't.
13:09 dalek doc: 8858b54 | seatek++ | doc/Language/traps.pod6:
13:09 synopsebot6 Link: http://doc.perl6.org/language/traps
13:09 dalek doc: documented tail method for last elements too
13:09 dalek doc: review: https://github.com/perl6/doc/commit/8858b54150
13:09 viki and you have ambiguity with labels too
13:09 jnthn foo bar 42; # foo(bar(42))
13:09 jnthn $x.foo $y.bar 42 # illegal
13:09 jnthn $x.foo: $y.bar: 42 # $x.foo($y.bar(42))
13:09 * viki calls the police
13:10 * jnthn watches viki
13:11 * viki puts more clothes on
13:11 jnthn .oO( That sounds freaky if you miss the reference... )
13:12 kalkin- hmm, i see
13:12 kalkin- Thank you for the explanation
13:14 cosimo @madamski: would appreciate if you could have a look at HSD-7409
13:14 cosimo (sorry)
13:17 bazzaar joined #perl6
13:18 bazzaar o/
13:18 viki \o
13:20 ZzZombo Do I read it right that each time I create an object, it's possible that a field will be initialized several times by different inherited constructors?
13:20 bazzaar moritz: I tried to subscribe to the mailing list for your new perl6 book project, but when I hit the subscribe button on your blog page, nothing seems to happen.
13:21 viki ZzZombo: don't think so, where'd ya read that?
13:21 DrForr \o/ \o\ /o/ /o\ HEY MACARENA
13:21 kalkin- m: say f(|c) { .say }; f :a:b
13:21 camelia rakudo-moar 014d4c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3say f(|c)7⏏5 { .say }; f :a:b␤    expecting any of:␤        infix␤        infix …»
13:21 ZzZombo "BUILDALL walks all subclasses in reverse method resolution order (i.e. from Mu to most derived classes) and in each class checks for existence of a method named BUILD. If it exists, it is called, again passing all named arguments from method new to it. If not, the public attributes from this class are initialized from named arguments of the same name."
13:21 viki bazzaar: did you get an email?
13:22 kalkin- m: sub f(|c) { .say }; f :a:b
13:22 camelia rakudo-moar 014d4c: OUTPUT«(Any)␤»
13:22 psch m: class A { has $.a is default(Proxy.new(FETCH => -> $ { say "fetched" }, STORE => -> $, $ { say "stored" })) }; class B is A { }; class C is B { }; C.new(:1a).perl.say
13:22 camelia rakudo-moar 014d4c: OUTPUT«fetched␤fetched␤fetched␤fetched␤C.new(a => 1)␤»
13:23 bazzaar viki: no email, it's been about 10mins
13:23 viki bazzaar: try one on https://perl6book.com/
13:24 viki ZzZombo: ah, yeah BUILD will be called on each. That's why it's a submethod
13:24 kalkin- m: sub f(|c) { .say }; f :a:b # how do I access all the arguments stored in c?
13:24 camelia rakudo-moar 014d4c: OUTPUT«(Any)␤»
13:24 viki m: sub f(|c) { c.say }; f :a:b
13:24 camelia rakudo-moar 014d4c: OUTPUT«\(:a, :b)␤»
13:24 kalkin- ahh no sigil
13:25 viki "c" in that syntax is just a name... you could write f(|whatever)
13:25 wamba joined #perl6
13:26 viki and it's a Capture
13:26 viki huggable: Capture
13:26 huggable viki, Argument list suitable for passing to a: https://docs.perl6.org/type/Capture
13:27 viki huggable: Capture :is: Argument list suitable for passing to a Signature: https://docs.perl6.org/type/Capture
13:27 huggable viki, Added Capture as Argument list suitable for passing to a Signature: https://docs.perl6.org/type/Capture
13:28 ZzZombo so, there is a caveat of redudant initialization; say I have has $.a=MyClass.new, each constructor in the chain will allocate a new object, won't it?
13:29 moritz no
13:29 viki ZzZombo: don't think so. It'll just call submethod BUILD for each thing in the chain
13:29 moritz there's one allocation for the object
13:29 viki if it exists
13:29 moritz and possibly multiple different BUILD methods are called on the same instance
13:30 moritz bazzaar: if you /msg me your email address and first name, I can add you manually to the list
13:30 bazzaar viki: nice link, the form also asks for 'Last Name' which the blog form did not, however still nothing seems to happen when the subscribe button is clicked
13:30 kalkin- Is there a way to alias subroutine arguments? What i want to achieve is that ls :a is the same as ls :all
13:30 viki kalkin-: yeah...
13:30 viki umm
13:30 moritz kalkin-: yes, sub ls(:all(:$a)) { }
13:30 viki s: 'foo', 'match', \()
13:30 SourceBaby viki, Something's wrong: ␤ERR: Could not find candidate that can do \()␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤  in block <unit> at -e line 6␤␤
13:31 viki well, there :)
13:31 viki s: 'foo', 'match', \(/x/)
13:31 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/Str.pm#L1013
13:31 lucasb_ joined #perl6
13:31 psch m: sub f(:everything(:all(:$a))) { say "$a" }; f :a; f :all; f :everything
13:31 camelia rakudo-moar 014d4c: OUTPUT«True␤True␤True␤»
13:31 psch to arbitrary depths \o/
13:31 psch although i think the parser pays a bit when there's many of those
13:32 kalkin- psch: how does it work?
13:32 psch kalkin-: how does what work?  the parser?
13:33 viki I think that's part of destructuring, innit?
13:33 kalkin- or can i wrap passed arguments in anything inside a the () of a subroutine?
13:34 kalkin- btw very awesome, that this works :)
13:34 viki There's a blurb in https://docs.perl6.org/type/Signature#index-entry-destructuring_arguments_%28Signature%29
13:34 psch m: sub f(% (:$a, *%)) { $a }; say f { :a }
13:34 camelia rakudo-moar 014d4c: OUTPUT«True␤»
13:34 bazzaar moritz: will do, thanks. PS. the book news is really exciting
13:34 psch viki: i suppose it fit at least thematically to destructuring, yeah
13:35 psch i don't have it there in my head, i just have it as "aliasing named parameters" or so
13:35 kalkin- I think destructuring is the keyword I wanted to know, thank psch & viki
13:35 jnthn Me too fwiw; it's just a way to give a named param another name
13:36 jnthn s/another/an alternative/
13:36 kalkin- btw: this feature makes perl6 useful as a shell language
13:36 kalkin- I mean as a _shell_
13:37 lucasb_ when I call methods that use $*ARGFILES (implicitly or explicitly), is it supposed to consume @*ARGS?
13:38 lucasb_ when I'm done reading $*ARGFILES, then @*ARGS is empty
13:38 lucasb_ should it operate on a copy of it?
13:39 lucasb_ *shouldn't ...
13:39 viki heh
13:40 viki "write string requires an object with REPR MVMOSHandle"
13:40 viki with perl6 -e 'for $*ARGFILES { .say }; say @*ARGS' foo.txt
13:40 pmurias kalkin-: you mean as a comman line shell of the sorts bash etc. is?
13:40 pmurias * command
13:40 viki lucasb_: well, what are you doing to $*ARGFILES?
13:40 lucasb_ perl6 -e 'for $*ARGFILES.lines { .say }; say @*ARGS' file...
13:40 kalkin- pmurias: yes
13:40 lucasb_ viki: I'm just reading it using lines()
13:41 viki yeah, weird.
13:41 viki lucasb_: I'd say that's a bug, at least as far as what my expectations of behaviour would be
13:41 viki s: $*ARGFILES, 'lines', \()
13:41 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/014d4cf/src/core/IO/ArgFiles.pm#L79
13:42 lucasb_ the thing is that ARGFILES is initialized with IO::ArgFiles.new(:args(@*ARGS))
13:42 lucasb_ and IO::ArgFiles just goes "shifting" the same array passed as argument, the original array, not a copy
13:43 dalek doc: 90da8ef | (Jan-Olof Hendig)++ | doc/Type/Match.pod6:
13:43 dalek doc: Added some examples to .prematch and .postmatch
13:43 synopsebot6 Link: http://doc.perl6.org/type/Match
13:43 dalek doc: review: https://github.com/perl6/doc/commit/90da8efc05
13:44 jnthn lucasb_: That could well be intentional. Suppose you found some input error and wanted to report the remaining files that were not processed...
13:44 wamba joined #perl6
13:44 * jnthn didn't implement it though, so doesn't actually know if it was a concious choise
13:44 jnthn *choice
13:44 jnthn I can see the use of it being in-place though
13:45 viki Wouldn't that information be preserved in $*ARGFILES.args ?
13:45 * viki shrugs
13:45 viki Well, the fix is technologically simple :) But I now don't know what the right thing is :)
13:46 viki lucasb_: why did you need @*ARGS to remain?
13:46 lucasb_ I didn't need it for anything... yet :)
13:47 lucasb_ I was just surprised the array changed
13:47 lucasb_ IO::ArgFiles iterates over the files in @*ARGS... wouldn't it be better if this information be kept inside the object itself
13:48 viki Actually, I call that a bug. The second loop doesn't run here, for example: perl6 -e 'for $*ARGFILES.lines.cache { .say }; for $*ARGFILES.lines { .say }; say @*ARGS' foo.txt
13:48 lucasb_ information like, the original :args argument passed, the current filename, the remaing ones, etc.
13:48 viki So you can only do stuff with $*ARGFILES once and then you're screwed
13:49 viki will spectest a fix after my current commit stresstests and goes in
13:49 lucasb_ well, I consider ARGFILES, a *pseudo-handle*, so I wouldn't expect to be able to rewind it, after having read to the end
13:49 ZzZombo am I missing something? All examples only show how to add a getter for a property, but not setters.
13:49 ZzZombo Why?
13:50 viki hm
13:50 ZzZombo Am I forced to use "set_$prop" names for them, separate from the underlying attribute and the getter?
13:50 viki ZzZombo: use `is rw`
13:50 viki class Foo { has $.meow is rw }
13:51 ZzZombo but if I __NEED__ a custom setter?
13:51 psch 'is rw' gives you an lvalue method
13:51 viki ZzZombo: then write a method
13:51 psch you can just write a multi if you need special logic
13:51 psch or a Proxy
13:51 * psch &
13:51 ZzZombo I'll keep it mind to learn them then.
13:52 viki m: my $cat = class Foo { has $.meow; method whatever is rw { $!meow } }; $cat.new: :meow<mew>; say $cat.meow; $cat.whatever = "moo"; say $cat.meow
13:52 camelia rakudo-moar 6d726f: OUTPUT«Cannot look up attributes in a Foo type object␤  in block <unit> at <tmp> line 1␤␤»
13:52 viki camelia: your mother!
13:52 viki m: my $cat = class Foo { has $.meow; method whatever is rw { $!meow } }.new: :meow<mew>; say $cat.meow; $cat.whatever = "moo"; say $cat.meow
13:52 camelia rakudo-moar 6d726f: OUTPUT«mew␤moo␤»
13:53 viki ZzZombo: ^ that's one way to do it. Another is to make the method take an arg instead, so you'd use it ast $cat.whatever($some-new-value)
13:54 viki lucasb_: OK, then I won't fix anything. Will leave it to someone more familiar with that area
13:55 lucasb_ viki, jnthn: ok, thanks
13:55 pierre_ joined #perl6
14:10 dalek doc: af750fd | coke++ | doc/Language/ (3 files):
14:10 dalek doc: remove trailing whitespace
14:10 dalek doc: review: https://github.com/perl6/doc/commit/af750fd187
14:10 dalek doc: d3a0a01 | coke++ | doc/Language/grammar_tutorial.pod6:
14:10 dalek doc: e.g./i.e. have periods.
14:10 synopsebot6 Link: http://doc.perl6.org/language/grammar_tutorial
14:10 dalek doc:
14:10 dalek doc: Replace the i.e. here with an e.g. as it appears to be giving an example, not
14:10 dalek doc: providing a definition
14:10 dalek doc: review: https://github.com/perl6/doc/commit/d3a0a01a66
14:10 dalek doc: 8b1dd9f | coke++ | / (3 files):
14:10 dalek doc: learn new words, correct small typo
14:10 dalek doc: review: https://github.com/perl6/doc/commit/8b1dd9fd32
14:14 dalek mu/advent_volunteer_day4: c1b0abb | (Brian Duggan)++ | misc/perl6advent-2016/schedule:
14:14 dalek mu/advent_volunteer_day4: advent day 4: bduggan
14:14 dalek mu/advent_volunteer_day4: review: https://github.com/perl6/mu/commit/c1b0abbe5a
14:14 pierre_ joined #perl6
14:14 ZzZombo m: my @a=42,13,666;.say for @$@a;
14:14 camelia rakudo-moar 6d726f: OUTPUT«42␤13␤666␤»
14:14 ZzZombo m: my @a=42,13,666;.say for @$@@@$@a;
14:14 camelia rakudo-moar 6d726f: OUTPUT«42␤13␤666␤»
14:14 ZzZombo xD
14:15 stux|RC-only joined #perl6
14:16 * [Coke] grumbles at DrForr for mentioning the macarena, now it's stuck in his head again.
14:17 stux|RC-only joined #perl6
14:17 * [Coke] sees he's still on the hook for Dec-01
14:18 ZzZombo there isn't a module for an array that triggers events for item insertion, replacement and deletion, is there?
14:19 timotimo item insertion is a bit tricky, unless you mean only actually creating new slots
14:19 timotimo other than that, that should be easy to build
14:19 ZzZombo yeah, I think so too, just don't want another wheel on my desk ;)
14:20 kalkin- The REPL can't complete history backwards with a prefix or haven't i just figured out the keybinding?
14:20 kalkin- left #perl6
14:21 dalek mu: c1b0abb | (Brian Duggan)++ | misc/perl6advent-2016/schedule:
14:21 dalek mu: advent day 4: bduggan
14:21 dalek mu: review: https://github.com/perl6/mu/commit/c1b0abbe5a
14:21 dalek mu: bec01fb | RabidGravy++ | misc/perl6advent-2016/schedule:
14:21 dalek mu: Merge pull request #17 from perl6/advent_volunteer_day4
14:21 kalkin- joined #perl6
14:21 dalek mu:
14:21 dalek mu: advent day 4: secret santa
14:21 dalek mu: review: https://github.com/perl6/mu/commit/bec01fb45a
14:21 timotimo kalkin-: depends on whether you have Readline or Linenoise, i suppose
14:21 kalkin- Linenoise
14:21 timotimo don't know much about that, but i expect it should have that feature
14:21 timotimo it may not have logs from previous sessions?
14:21 kalkin- it does
14:21 timotimo OK
14:21 kalkin- normal backward completion works, but not with prefix
14:22 timotimo huh
14:22 timotimo hm, we do ship linenoise source code with the Linenoise module, don't we?
14:22 timotimo maybe we ought to update that. it could be like a year old by now :P
14:24 [Coke] kalkin - should be the bindings for whatever module you installed, Linenoise, or Readline
14:24 [Coke] ... I need to make sure I'm caught up in backlog before responding.
14:24 gfldex m: class SpammyArray is Array { multi method ASSIGN-POS(int $pos, Mu \assignee){ say 'oi‽'; callsame } }; my @a is SpammyArray = SpammyArray.new; @a[1] = 42;
14:24 camelia rakudo-moar 6d726f: ( no output )
14:25 gfldex m: class SpammyArray is Array { multi method ASSIGN-POS(Int:D $pos, Mu \assignee){ say 'oi‽'; callsame } }; my @a is SpammyArray = SpammyArray.new; @a[1] = 42;
14:25 camelia rakudo-moar 6d726f: OUTPUT«oi‽␤»
14:25 moritz m: class SpammyArray is Array { multi method ASSIGN-POS(int $pos, Mu \assignee){ say 'oi‽'; callsame } }; my @a := SpammyArray.new; @a[1] = 42;
14:25 camelia rakudo-moar 6d726f: ( no output )
14:26 moritz m: class SpammyArray is Array { method ASSIGN-POS(|c){ say 'oi‽'; callsame } }; my @a := SpammyArray.new; @a[1] = 42;
14:26 camelia rakudo-moar 6d726f: OUTPUT«oi‽␤»
14:26 moritz when you make it a method, you don't compete for specificity with the multis of the parent class
14:26 moritz m: class SpammyArray is Array { method ASSIGN-POS(|c){ say 'oi‽'; callsame } }; my @a := SpammyArray.new; @a[1] = 42;; say @a
14:26 camelia rakudo-moar 6d726f: OUTPUT«oi‽␤[(Any) 42]␤»
14:27 * jnthn suggests emitting the events using a Supply too ;)
14:27 gfldex that's a ENODOC I shall fix later
14:28 ZzZombo say (1, 2)[-1]; # Error
14:28 ZzZombo sigh
14:28 jnthn m: say (1, 2)[*-1]
14:28 camelia rakudo-moar 6d726f: OUTPUT«2␤»
14:28 ZzZombo m: my @a=1,2;say @a[-1];
14:28 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at <tmp>:1␤------> 3my @a=1,2;say @a[-1]7⏏5;␤»
14:28 ZzZombo what
14:28 jnthn Heh, it even tells you what I just did :)
14:29 ZzZombo I see but why?
14:29 timotimo don't forget that putting in more values can also happen through autovivivfication via AT-POS.
14:29 ZzZombo m: my @a=1,2;say @a[*-1];
14:29 camelia rakudo-moar 6d726f: OUTPUT«2␤»
14:29 gfldex because that collects a lot of-by-one bugs
14:29 skids joined #perl6
14:30 timotimo now if you want to actually go from the end, it's not enough to (even accidentally) give a negative number. you have to state explicitly that you want it
14:30 timotimo also, it generalizes well to percentiles when your array is sorted
14:30 gfldex m: say (1,2).tail
14:30 camelia rakudo-moar 6d726f: OUTPUT«2␤»
14:31 ZzZombo m: my @a=1,2;say @a[*-2..*-1].perl;
14:31 camelia rakudo-moar 6d726f: OUTPUT«(1, 2)␤»
14:31 ZzZombo m: my @a=1,2;say @a[*-2..-1].perl;
14:31 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at <tmp>:1␤------> 3my @a=1,2;say @a[*-2..-1]7⏏5.perl;␤»
14:31 ZzZombo ...I guess I'll just have to accept this and move on.
14:32 chris2 joined #perl6
14:33 viki m: my @a = ^10; say @a[{$_-1...0}]
14:33 camelia rakudo-moar 6d726f: OUTPUT«(9 8 7 6 5 4 3 2 1 0)␤»
14:33 viki ZzZombo: the *-1 is a fancy way to write sub ($arg) { return $arg - 1 }
14:33 viki ZzZombo: and in this case, the $arg is the length of the array
14:33 ZzZombo m: @a := (1,2; 3,4);
14:33 ZzZombo say @a.flat;
14:33 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5@a := (1,2; 3,4);␤»
14:33 ZzZombo eh
14:34 ZzZombo m: my @a := (1,2; 3,4);say @a.flat;
14:34 camelia rakudo-moar 6d726f: OUTPUT«(1 2 3 4)␤»
14:34 zakharyas joined #perl6
14:34 viki And going off from that idea, you can go all sorts of things vis-a-vis indexing, other than the limiting "passing negative means from end"
14:34 ZzZombo I see.
14:35 viki m: my @a = ^10; say @a[{$_-1, *-2, ...0}]
14:35 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5===␤Two terms in a row␤at <tmp>:1␤------> 3my @a = ^10; say @a[{$_-1, *-2, ...7⏏0}]␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement modifi…»
14:35 viki /o\
14:35 ZzZombo https://docs.perl6.org/language/list#The_@_sigil has an error, the line with "# OUTPUT«((1 2 3 4)␤»" mismatches the output I just got.
14:35 viki m: my @a = ^10; say @a[{$_-1, *-2 ...0}]
14:35 viki weeeeeeeeeeeeeeee
14:35 ZzZombo a curly brace is excessive.
14:35 viki Halting Problem strikes again
14:35 camelia rakudo-moar 6d726f: OUTPUT«(timeout)»
14:36 viki m: my @a = ^10; say @a[{$_-1, *-2 ... * > 0}]
14:36 camelia rakudo-moar 6d726f: OUTPUT«(9)␤»
14:36 viki m: my @a = ^10; say @a[{$_-1, *-2 ... * < 0}]
14:36 camelia rakudo-moar 6d726f: OUTPUT«Effective index out of range. Is: -1, should be in 0..Inf␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:36 * viki shakes fist at the cloud
14:36 kalkin- Replacing Linenoise with Readline and adjusting .inputrc solved my issues
14:36 kalkin- All hail the GNU Project
14:37 mspo libedit++
14:37 DrForr Thanks :) Need to figure out what to do with version numbers this weekend...
14:38 viki m: my @a = ^10; say @a[{$^curly-brace-is-awesome-and-is-not-excessive-1, *-2 ... * <= 1}]
14:38 camelia rakudo-moar 6d726f: OUTPUT«(9 7 5 3 1)␤»
14:39 viki ZzZombo: would you submit a PR to fix that?
14:40 mj41 joined #perl6
14:40 ZzZombo IDK, I'd rather not to do it for each minor occurence.
14:40 viki ZzZombo: why not? :)
14:40 viki ZzZombo: would you like a commit bit so you could commit such fixes directly?
14:41 ZzZombo yea, that.
14:41 FROGGS joined #perl6
14:41 ZzZombo m: say $(2, 3).perl
14:41 camelia rakudo-moar 6d726f: OUTPUT«$(2, 3)␤»
14:41 FROGGS o/
14:41 ZzZombo eh
14:41 ZzZombo m: say $(2, 3).WHAT
14:41 camelia rakudo-moar 6d726f: OUTPUT«(List)␤»
14:42 viki "ZzZombo has been invited!"
14:42 ZzZombo sec
14:42 viki Yeah, the sigil stuff is completely different from Perl 5.
14:42 viki m: my $list = <w a a a aa t>; say $list.elems
14:42 camelia rakudo-moar 6d726f: OUTPUT«6␤»
14:42 viki m: my $list = <w a a a aa t>; say $list
14:42 camelia rakudo-moar 6d726f: OUTPUT«(w a a a aa t)␤»
14:43 psch m: my $list = <w a a a aa t>; .say for $list
14:43 camelia rakudo-moar 6d726f: OUTPUT«(w a a a aa t)␤»
14:43 viki m: my $list = <w a a a aa t>; $list does Iterable; .say for $list
14:43 camelia rakudo-moar 6d726f: OUTPUT«(w a a a aa t)␤»
14:43 viki dang :)
14:43 viki m: my $list = <w a a a aa t>; .say for |$list # proper way
14:43 camelia rakudo-moar 6d726f: OUTPUT«w␤a␤a␤a␤aa␤t␤»
14:45 dalek doc: 0602581 | ZzZombo++ | doc/Language/list.pod6:
14:45 dalek doc: Unneeded curly brace
14:45 synopsebot6 Link: http://doc.perl6.org/language/list
14:45 dalek doc: review: https://github.com/perl6/doc/commit/0602581dc1
14:45 ZzZombo Hope I didn't break it
14:46 viki Looks fine
14:46 timotimo it's easier to ask for forgiveness than permission :)
14:47 ZzZombo yet now I have to go through all 30+ repos that you automatically subscribed me to... :)
14:47 timotimo oh crap ;)
14:48 viki oops
14:48 ZzZombo if anybody knows bulk unsubcribe, be my guest.
14:48 cdg joined #perl6
14:49 viki heh the Perl 6 group description: "Members of this team have push access to most repositories in the perl6 organization. Because we like to trust, and are too lazy to manage permissions more fine-grained"
14:50 ZzZombo aaand done.
14:50 ZzZombo looks like my previous job
14:51 FROGGS hehe
14:51 viki m: say +'-10-i'
14:51 camelia rakudo-moar 6d726f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3-10-⏏5i' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:51 ZzZombo where everybody had sudo shell access to the servers, regardless of ranks and areas of responsibility.
14:51 psch uh, i think a root shell and commit access to a git repo are somewhat different o.o
14:52 cosimo ZzZombo: that's how it should be :-)
14:52 viki m: say +'-i'
14:52 camelia rakudo-moar 6d726f: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3-⏏5i' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:52 mspo psch: not really
14:52 viki Should these work?
14:52 mspo if you can commit the code you can commit a vulnerability/backdoor/whatever
14:52 viki I wrote some tests on the assumption that it should and now I feel bad about just deleting them :P
14:53 DrForr But other people are watching as well :)
14:53 ZzZombo wait, you aren't a bot since you have feelings? :o
14:53 viki mspo: except you have like a 1000 eyes reviewing everything :)
14:53 timotimo except people are lazy :D
14:53 viki ZzZombo: I'm a bot that can emulate feelings :)
14:53 ZzZombo wow
14:54 psch mspo: oh, sure, commit access to the repo can escalate to a root shell somewhere
14:54 psch mspo: but that just brings you to the same point -- you have a root shell
14:54 mspo viki: that sounds like an overestimation ;)
14:55 psch and well, if commit access is means of getting you that other thing you're comparing commit access to... well they clearly are different
14:55 mspo psch: sure
14:55 viki mspo: perhaps the number of eyes, but at least with rakudo, people comment on my committes minutes after I make an error....
14:55 mspo oh yeah
14:55 mspo viki: I thought you were talking about a job
14:55 viki Oh
14:56 timotimo viki: i bet the irc bot helps a whole lot there :)
14:56 viki Yeah
14:56 mspo backdooring something like perl is obviously more valuable and there should be more scrutiny
14:56 ZzZombo so my evil plan is to DDoS the bot, then commit backdoor into p6. Anything else?
14:57 mspo especially perl6 with its multi stage compilation and many runtime tricks and stuff
14:57 mspo trusting trust and all that
14:57 ZzZombo did I just hear Crusty Crabs somewhere here?
14:57 psch ZzZombo: the bot DoSes itself often enough vOv
14:57 ZzZombo ORLY
14:58 ZzZombo poor wee thing
14:58 viki Well, not DoS. It's just a really dumb bot. If you submit too many commits at once or write a long commit message it reports only X number of lines
14:58 ZzZombo I see
14:58 psch viki: oh, we did get it to not Excess Flood anymore?
14:58 psch FSDO "we"
14:58 ZzZombo LOL
14:59 timotimo right, it's easy to get past the irc bot reports
14:59 timotimo prefix your evil commit with a benign commit that has sufficiently many lines of descriptive text and voila
14:59 viki psch: from what I see... the Excess Flood was prevented by just cutting off long messages, instead of doing something sane, like abridging them or pastebinning them
14:59 andrewalker joined #perl6
15:00 timotimo well, it'd also be possible to just not send these messages as quickly ...
15:00 viki psch: oh, actually I do recall excess floods too
15:00 viki so...
15:00 * viki shrugs
15:00 finanalyst joined #perl6
15:00 viki Someone *wink* *wink* Needs to rewrite it with IRC::Client
15:01 kyclark joined #perl6
15:02 kyclark What’s the best way to model a deck of shuffled cards from which I want to draw so that I don’t get duplicates.  I.e., I can’t draw “2 Clubs” twice from a single deck.
15:02 AlexDaniel joined #perl6
15:03 viki kyclark: a SetHash?
15:04 viki kyclark: there's even a .grab method: https://docs.perl6.org/type/SetHash#(Setty)_method_grab
15:04 kyclark Hmm, yes, I’ll look at that.
15:04 ZzZombo m: (1, 2, 3)[1, 2, :c(3)]
15:04 camelia rakudo-moar 6d726f: OUTPUT«No such method 'Int' for invocant of type 'Pair'␤  in block <unit> at <tmp> line 1␤␤»
15:05 viki :c(3) is a Pair
15:05 viki m: say Hash ~~ Cool
15:05 camelia rakudo-moar 6d726f: OUTPUT«True␤»
15:05 viki Kinda weird Hashes are Cool but Pairs aint
15:06 psch kyclark: i'd say a Bag probably.  those are for taking things out or putting them in
15:06 ZzZombo my jacket is cool, can I use it here as well? *wink*
15:06 cog_ joined #perl6
15:06 psch although i suppose that might also need to be a BagHash for mutability..?
15:06 psch m: say (1, 1, 2).SetHash.perl
15:06 camelia rakudo-moar 6d726f: OUTPUT«SetHash.new(1,2)␤»
15:07 DrForr m: my (@s,@n)=<C H D S>,('A',2..10,'J','Q','K'); say @s X @n
15:07 camelia rakudo-moar 6d726f: OUTPUT«()␤»
15:07 viki Well, a deck of cards has just 1 of each
15:07 viki card
15:07 psch well, and it can have any given card more than once.  if you explicitely don't want that... yeah
15:07 psch the Bag{,Hash} that is
15:07 ZzZombo m: Array ~~ List
15:07 camelia rakudo-moar 6d726f: ( no output )
15:07 psch m: my @a = ("\x1f0a1"..."\x1F0DE").Set; say @a.grab(10); say +@a
15:07 camelia rakudo-moar 6d726f: OUTPUT«No such method 'grab' for invocant of type 'Array'␤  in block <unit> at <tmp> line 1␤␤»
15:07 psch oh shoo
15:07 ZzZombo m: say Array ~~ List
15:07 camelia rakudo-moar 6d726f: OUTPUT«True␤»
15:07 ZzZombo m: say Array is List
15:07 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say Array7⏏5 is List␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤…»
15:08 psch m: my $a = ("\x1f0a1"..."\x1F0DE").SetHash; say @a.grab(10); say +@a
15:08 camelia rakudo-moar 6d726f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared. Did you mean '$a'?␤at <tmp>:1␤------> 3 = ("\x1f0a1"..."\x1F0DE").SetHash; say 7⏏5@a.grab(10); say +@a␤»
15:08 psch m: my $a = ("\x1f0a1"..."\x1F0DE").SetHash; say $a.grab(10); say +$a
15:08 camelia rakudo-moar 6d726f: OUTPUT«(🃉 🂣 🂬 🂽 🂿 🃊 🃜 🃏 🂡 🂲)␤52␤»
15:08 DrForr m: my @s=<C H D S>;my @n=('A',2..10,'J','Q','K'); say (@s X @n).perl
15:08 camelia rakudo-moar 6d726f: OUTPUT«(("C", "A"), ("C", 2..10), ("C", "J"), ("C", "Q"), ("C", "K"), ("H", "A"), ("H", 2..10), ("H", "J"), ("H", "Q"), ("H", "K"), ("D", "A"), ("D", 2..10), ("D", "J"), ("D", "Q"), ("D", "K"), ("S", "A"), ("S", 2..10), ("S", "J"), ("S", "Q"), ("S", "K")).Seq␤»
15:08 psch hah, chrome renders exactly *one* of those cards...
15:09 FreezerburnV joined #perl6
15:09 psch probably not quite the right range either i think, 'cause the one it does render is a joker..?
15:09 Praise- joined #perl6
15:09 DrForr irssi renders 8, though I'd swear one's a ... ah, yeah, joker.
15:09 viki ZzZombo: List is immutable, while Array is mutable
15:09 viki weechat doesn't render any :(
15:09 ZzZombo ye, I'm reading on them right now.
15:10 kyclark m: dd (cross <1 2 3>, <D H>).SetHash
15:10 camelia rakudo-moar 6d726f: OUTPUT«SetHash.new(IntStr.new(1, "1"),"H",IntStr.new(2, "2"),IntStr.new(3, "3"),"D")␤»
15:10 ZzZombo I just wanted to say if 'is' can be used for inheritance checks like smartmatch.
15:10 ZzZombo see*
15:10 kyclark Not what I expect
15:10 kyclark m: my @cards = cross <1 2 3>, <D H>; dd @cards.SetHash
15:10 camelia rakudo-moar 6d726f: OUTPUT«SetHash.new($(IntStr.new(3, "3"), "D"),$(IntStr.new(3, "3"), "H"),$(IntStr.new(2, "2"), "H"),$(IntStr.new(1, "1"), "D"),$(IntStr.new(2, "2"), "D"),$(IntStr.new(1, "1"), "H"))␤»
15:11 kyclark Why doesn’t the first way work?
15:11 viki m: dd (cross <1 2 3>, <D H>)
15:11 camelia rakudo-moar 6d726f: OUTPUT«((IntStr.new(1, "1"), "D"), (IntStr.new(1, "1"), "H"), (IntStr.new(2, "2"), "D"), (IntStr.new(2, "2"), "H"), (IntStr.new(3, "3"), "D"), (IntStr.new(3, "3"), "H")).Seq␤»
15:11 psch m: say (< 1 2 3 > X <D H>)
15:11 camelia rakudo-moar 6d726f: OUTPUT«((1 D) (1 H) (2 D) (2 H) (3 D) (3 H))␤»
15:11 psch m: say (< 1 2 3 > X <D H>).perl
15:11 camelia rakudo-moar 6d726f: OUTPUT«((IntStr.new(1, "1"), "D"), (IntStr.new(1, "1"), "H"), (IntStr.new(2, "2"), "D"), (IntStr.new(2, "2"), "H"), (IntStr.new(3, "3"), "D"), (IntStr.new(3, "3"), "H")).Seq␤»
15:11 psch eh, yeah, &val
15:12 psch m: say Array.isa(List)
15:12 camelia rakudo-moar 6d726f: OUTPUT«True␤»
15:12 psch ZzZombo: i suspect you wanted that ^^^
15:12 ZzZombo yep
15:12 viki kyclark: I suspect in the former the inner lists aren't itimized
15:12 viki *itemized
15:12 viki m: dd (cross (1, 2, 3,), <D H>)
15:12 camelia rakudo-moar 6d726f: OUTPUT«((1, "D"), (1, "H"), (2, "D"), (2, "H"), (3, "D"), (3, "H")).Seq␤»
15:13 viki m: dd @ = (cross (1, 2, 3,), <D H>)
15:13 camelia rakudo-moar 6d726f: OUTPUT«Array @ = [(1, "D"), (1, "H"), (2, "D"), (2, "H"), (3, "D"), (3, "H")]␤»
15:13 viki hm
15:13 viki m: dd @ = (cross (1, 2, 3,), <D H>).SetHash
15:13 camelia rakudo-moar 6d726f: OUTPUT«Array @ = [SetHash.new(3,1,"H",2,"D")]␤»
15:13 viki s: (cross (1, 2, 3,), <D H>), 'SetHash', \()
15:13 SourceBaby viki, Something's wrong: â�¤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|50466544>} (Method+{<anon|5046654...)â�¤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42â�¤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29â�¤  in block <unit> at -e line 6â
15:13 synopsebot6 joined #perl6
15:14 viki that bug annoys me
15:14 viki m: Seq.new, 'SetHash', \()
15:14 camelia rakudo-moar 6d726f: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "SetHash" in sink context (lines 1, 1)␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
15:14 viki s: Seq.new, 'SetHash', \()
15:14 SourceBaby viki, Something's wrong: ␤ERR: Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at -e line 6␤␤
15:14 viki :(
15:14 FreezerburnV joined #perl6
15:15 viki m: say .file, .line given (1...*).^lookup('SetHash')
15:15 camelia rakudo-moar 6d726f: OUTPUT«SETTING::src/core/Any.pm414␤»
15:15 viki \o/
15:15 viki m: say .file, .line given [].^lookup('SetHash')
15:15 camelia rakudo-moar 6d726f: OUTPUT«SETTING::src/core/Any.pm414␤»
15:16 viki m: dd @ = (cross (1, 2, 3,), <D H>).list
15:16 camelia rakudo-moar 6d726f: OUTPUT«Array @ = [(1, "D"), (1, "H"), (2, "D"), (2, "H"), (3, "D"), (3, "H")]␤»
15:16 viki m: dd (@ = (cross (1, 2, 3,), <D H>)).list
15:16 camelia rakudo-moar 6d726f: OUTPUT«Array @ = [(1, "D"), (1, "H"), (2, "D"), (2, "H"), (3, "D"), (3, "H")]␤»
15:16 viki m: dd (cross (1, 2, 3,), <D H>).list
15:16 camelia rakudo-moar 6d726f: OUTPUT«((1, "D"), (1, "H"), (2, "D"), (2, "H"), (3, "D"), (3, "H"))␤»
15:17 Woodi hi #perl6 :)
15:17 viki \o
15:18 ZzZombo "Any Scalar will be stripped from each value and a new Scalar will be wrapped around it." -- why?
15:18 viki context?
15:18 ZzZombo https://docs.perl6.org/language/list#Assigning
15:18 dalek doc: 0a33561 | (Jan-Olof Hendig)++ | doc/Type/Match.pod6:
15:18 synopsebot6 Link: http://doc.perl6.org/type/Match
15:18 dalek doc: Added example to .Str
15:18 dalek doc: review: https://github.com/perl6/doc/commit/0a335618f6
15:18 Woodi just installed R* 2016.10 and .tgz have some modules but I think make install do not installed them... and I remember make modules-install or something but it don't work. any way to install supplied modules ?
15:19 CIAvash joined #perl6
15:19 viki ZzZombo: I think it's so this doesn't leave the $a and its value in @a tangled my $a = 42; my @a = $a;
15:20 viki Scalar is a container, so here you're moving the value into a separate container
15:20 viki or something or other :)
15:20 jnthn m: my $a = 42; my @a = $a, $a; $a++; say @a
15:20 camelia rakudo-moar 6d726f: OUTPUT«[42 42]␤»
15:20 jnthn It's so that doesn't say [43 43] which would be...rathr nasty action at a distance at scale :)
15:20 viki m: my $a = 42; my @a; @a[0] := $a; $a++; say @a
15:20 camelia rakudo-moar 6d726f: OUTPUT«[43]␤»
15:20 viki yeah
15:21 canopus joined #perl6
15:22 ZzZombo but the wording suggests (to me at least) that the scalar of $a will be left with -- IDK, nothing? -- and not that it's simply copied into a new one that is then assigned to a slot into the array.
15:23 viki Maybe reword it to "any Scalar values will be copied into a new container"?
15:23 * viki doesn't know much about containers... still
15:23 ZzZombo ye
15:24 mj41 joined #perl6
15:25 ZzZombo there is also an odd 'each value' in a context of 'any scalar', that is, 1-to-1 relation, with nothing more.
15:25 Woodi Woodi: A: cd .. from rakudo dir and do make modules-install :)
15:26 Woodi Woodi: not, that's not working...
15:26 psch m: 5.VAR; my $x = 5; say $x.VAR
15:26 camelia rakudo-moar 6d726f: OUTPUT«5␤»
15:26 psch m: 5.VAR.say; my $x = 5; say $x.VAR
15:26 camelia rakudo-moar 6d726f: OUTPUT«5␤5␤»
15:26 psch oh meh, i keep forgetting how that works
15:27 viki m: sub (*@pairs) {dd @pairs[0] }(   (cross (1, 2, 3,), <D H>).list  )
15:28 camelia rakudo-moar 6d726f: OUTPUT«Int <element> = 1␤»
15:28 viki m: sub (*@pairs) {dd @pairs[0] }(   [cross (1, 2, 3,), <D H>].list  )
15:28 camelia rakudo-moar 6d726f: OUTPUT«List <element> = $(1, "D")␤»
15:28 moritz m: my $x = 5; say $x.VAR ~~ Scalar
15:28 camelia rakudo-moar 6d726f: OUTPUT«True␤»
15:28 moritz m: my $x = 5; say $x.VAR.^name
15:28 camelia rakudo-moar 6d726f: OUTPUT«Scalar␤»
15:28 viki kyclark: ^ that's why basically... Gonna test a fix to see if any of the tests explode
15:28 psch moritz++
15:28 kyclark Rock on
15:29 psch m: my $x = 5; my @a = $x,; say $x.VAR.WHICH; say @a[0].VAR.WHICH
15:29 camelia rakudo-moar 6d726f: OUTPUT«Scalar|77880080␤Scalar|77880296␤»
15:36 ZzZombo m: say @array.tail(1..2);
15:36 camelia rakudo-moar cb9df2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@array' is not declared. Did you mean any of these?␤    Array␤    array␤␤at <tmp>:1␤------> 3say 7⏏5@array.tail(1..2);␤»
15:36 ZzZombo m: my @a=1,2,3;say @array.tail(1..2);
15:36 camelia rakudo-moar cb9df2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@array' is not declared. Did you mean any of these?␤    Array␤    array␤␤at <tmp>:1␤------> 3my @a=1,2,3;say 7⏏5@array.tail(1..2);␤»
15:37 ZzZombo m: my @a=1,2,3;say @a.tail(1..2);
15:37 camelia rakudo-moar cb9df2: OUTPUT«(2 3)␤»
15:37 kurahaupo__ joined #perl6
15:39 ZzZombo m: my @a=1,2,3;say "$foo(" ~ @a ~ ")"
15:39 camelia rakudo-moar cb9df2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$foo' is not declared␤at <tmp>:1␤------> 3my @a=1,2,3;say "7⏏5$foo(" ~ @a ~ ")"␤»
15:39 ZzZombo m: my @a=1,2,3;my $foo='foo';say "$foo(" ~ @a ~ ")"
15:39 camelia rakudo-moar cb9df2: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
15:39 ZzZombo m: my @a=1,2,3;my $foo='foo';say "$foo\(" ~ @a ~ ")"
15:39 camelia rakudo-moar cb9df2: OUTPUT«foo(1 2 3)␤»
15:40 moritz $foo(...) is a call, even inside a quoted string
15:40 ZzZombo ye, since the docs didn't clarify that, I had to poke the bot a few times.
15:40 timotimo we should add that to the docs
15:43 viki kyclark: no love. There are explicit tests for the current behaviour: https://github.com/perl6/roast/blob/master/S02-types/set.t#L332
15:44 ZzZombo alright, gonna sleep. Thank everyone :)
15:44 viki \o
15:45 cdg_ joined #perl6
15:47 [ptc] o/
15:47 viki \o
15:51 timotimo ō
15:52 * [ptc] wonders what ö would mean in this context...
15:53 ilmari a de-winged camelia
15:53 timotimo :(
16:10 AlexDaniel .u ōö
16:10 yoleaux U+00F6 LATIN SMALL LETTER O WITH DIAERESIS [Ll] (ö)
16:10 yoleaux U+014D LATIN SMALL LETTER O WITH MACRON [Ll] (ō)
16:11 ilmari uh, that's the wrong order
16:11 AlexDaniel .u ōö
16:11 ilmari .u æøå
16:11 yoleaux U+00F6 LATIN SMALL LETTER O WITH DIAERESIS [Ll] (ö)
16:11 yoleaux U+014D LATIN SMALL LETTER O WITH MACRON [Ll] (ō)
16:11 yoleaux U+00E5 LATIN SMALL LETTER A WITH RING ABOVE [Ll] (å)
16:11 yoleaux U+00E6 LATIN SMALL LETTER AE [Ll] (æ)
16:11 yoleaux U+00F8 LATIN SMALL LETTER O WITH STROKE [Ll] (ø)
16:12 AlexDaniel heh
16:12 AlexDaniel by the way
16:12 AlexDaniel .u 🦋
16:12 yoleaux No characters found
16:12 AlexDaniel if anybody has nothing to do, please rewrite yole in perl 6 :)
16:13 AlexDaniel … or just update it…
16:13 kyclark joined #perl6
16:13 psch m: say uniname("🦋")
16:13 camelia rakudo-moar cb9df2: OUTPUT«BUTTERFLY␤»
16:17 AlexDaniel hmmm or I can do it myself…
16:17 AlexDaniel yoleaux: help
16:17 AlexDaniel yoleaux: url
16:17 AlexDaniel yoleaux: source
16:17 psch .help
16:17 yoleaux psch: I'm yoleaux. Type .commands to see what I can do, or see http://dpk.io/yoleaux for a quick guide.
16:18 AlexDaniel .mangle I love Perl 6
16:18 yoleaux AlexDaniel: Sorry, that command (.mangle) crashed.
16:20 AlexDaniel .at 2016-12-31T23:59 Happy New Year!
16:20 yoleaux AlexDaniel: Sorry, that command (.at) crashed.
16:22 sufrostico joined #perl6
16:22 nicq20 joined #perl6
16:24 kent\n joined #perl6
16:25 lostinfog joined #perl6
16:33 viki heh
16:34 viki Well, it's a Ruby bot... I wonder if Ruby has been updated for BUTTERFLY and stuff
16:35 viki Cool, P6Intro is now in... Chinese, I'm guessing: http://zh.perl6intro.com/
16:48 FreezerburnV joined #perl6
16:48 moritz \o/
16:49 [ptc] cool!
16:49 [ptc] I'm trying to test Test::Builder at present.  Anyone have an idea how to hide invocations of ok, is, etc. from the enclosing TAP instance?
16:49 [ptc] I've managed to confuse TAP since the test ordering is 1,2,1,3,4  etc.
16:49 [ptc] but I don't need the enclosed invocations, just their output
16:49 [ptc] I've tried EVAL, but that's, well, evil, and also doesn't hide the enclosed ok calls from the wrapping TAP instance...
16:50 FreezerburnV joined #perl6
16:50 psch [ptc]: redirect $*OUT for the calls you don't want to reach all the way... out?
16:51 [ptc] psch: ok, I'll give that a go, thanks for the tip, I'd not thought of that yet
16:53 kyclark joined #perl6
16:58 cibs joined #perl6
17:02 [ptc] psch: tried something like this: my $*OLDOUT = $*OUT; $*OUT = IO::Handle.new; my $ok = $tb.ok(1, "This is a test"); $*OUT = $*OLDOUT;
17:03 [ptc] psch: however that still prints the output from the "inside" 'ok' call
17:03 [ptc] psch: was that what you meant, re: redirection?
17:04 psch [ptc]: sort of, yes.  i was thinking more along the lines of a IO::Handle subclass or so that doesn't print but stores in an array or something
17:04 ufobat_ joined #perl6
17:04 psch [ptc]: i'm not sure assigning IO::Handle.new actually gives you a different $*OUT
17:05 psch #: class DummyHandle is IO::Handle { has @.lines; method say(DummyHandle:D: +@lines) { @.lines.push: |@lines } }; $*OUT = DummyHandle.new; say "hi"; say "by"; # sorta like this
17:09 [ptc] ah, ok.  Was thinking along the lines of reassigning STDOUT á la Perl5...
17:10 psch i don't know how one would do "redirect into an array" in Perl 5, actually
17:10 psch probably way more spooky looking than we do it here... :)
17:10 ocbtec joined #perl6
17:10 [ptc] heh :-)
17:11 psch ah, actually open() does that pretty easily, although into a scalar
17:11 psch http://www.perlmonks.org/?node_id=737134
17:12 [ptc] psch: the standard stuff is under open() in perlfunc: http://perldoc.perl.org/perlfunc.html
17:12 [ptc] ah, you got there before me
17:13 [ptc] hence why I was trying to simply reassign the variable rather than create a subclass or so
17:14 psch yeah, i suppose it is massively easier in Perl 5, actually
17:14 viki There *is* Test::Output https://github.com/zoffixznet/perl6-Test-Output
17:14 psch m: class A { method foo { say "foo" } }; (A.new but role { method foo { say "bar" } }).foo
17:14 camelia rakudo-moar cb9df2: OUTPUT«bar␤»
17:15 psch ^^^ that'd be the simplest way i can think of
17:15 psch well, with IO::Handle instead of A and print,say,... instead of foo
17:15 psch ...but if we have a module that's probably the cleanest solution :)
17:18 * [ptc] tries Test::Output...
17:18 labster joined #perl6
17:22 [ptc] hrm, that still passes information up to the enclosing TAP instance
17:22 [ptc] thanks for your help everyone!  I might have to leave this one 'til the morrow
17:23 viki What sort of information?
17:24 viki You can use IO::MiddleMan to contain the output and test it manually whichever way you want, then, I guess.
17:24 viki https://modules.perl6.org/repo/IO::MiddleMan
17:25 [ptc] viki: I'm trying to test Test::Builder, so the object under test actually affects the plan and the ordering of the tests seen by e.g. prove
17:25 [ptc] I guess I haven't described the problem well enough... :-/
17:25 dalek joined #perl6
17:26 nicq20 left #perl6
17:26 nicq20 joined #perl6
17:30 kyclark m: subset Face of Str where * (elem) <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; put 'Jack' ~~ Face; put '2' ~~ Face;
17:30 camelia rakudo-moar cb9df2: OUTPUT«True␤False␤»
17:31 kyclark Why isn't "2" recognized as a Face?
17:31 arnsholt IntStr shenanigans maybe?
17:33 arnsholt Yeah, I think so:
17:33 arnsholt m: say <2>.WHAT
17:33 camelia rakudo-moar cb9df2: OUTPUT«(IntStr)␤»
17:40 psch m: subset Face of Str where * (elem) <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>>>.Str; put 'Jack' ~~ Face; put '2' ~~ Face;
17:40 camelia rakudo-moar cb9df2: OUTPUT«True␤True␤»
17:40 viki kyclark: because (elem) coerces to a Set, which is sensitive to allomorphs, so <2> is IntStr and isn't the same as plain Str
17:40 viki (there's Quantum::Collapse module on the topic FWIW)
17:41 kyclark Is there a workaround?
17:41 psch well, more general, Set doesn't coerce
17:41 psch and <>-quotes are allomorphic
17:41 viki kyclark: don't use (elem) :)
17:42 psch kyclark: because you're using <> quotes, everything you get is allomorphed if possible.  Set doesn't do anything to those values, and (elem) doesn't stringify
17:42 psch m: say <2> ~~ "2"
17:42 camelia rakudo-moar cb9df2: OUTPUT«True␤»
17:42 viki m: subset Face of Str where * eq any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; put 'Jack' ~~ Face; put '2' ~~ Face
17:42 camelia rakudo-moar cb9df2: OUTPUT«True␤True␤»
17:42 psch m: say "2" ~~ <2>
17:42 camelia rakudo-moar cb9df2: OUTPUT«True␤»
17:42 psch meh, stupid liskov :)
17:43 viki .oO( who's liskov )
17:43 psch that one guy who said it's all the same if it's related
17:43 viki heh
17:43 psch so, i guess everyone is liskov..?
17:43 kyclark viki: Thanks!
17:45 psch m: subset Face of Str where * eq any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say 2 ~~ Face
17:45 camelia rakudo-moar cb9df2: OUTPUT«False␤»
17:45 viki 2 is not "of Str"
17:46 psch right, nominal before *post* constraints
17:46 moritz m: subset Face of Str where any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say '2' ~~ Face
17:46 camelia rakudo-moar cb9df2: OUTPUT«True␤»
17:46 moritz m: subset Face of Str where any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say '1' ~~ Face
17:46 camelia rakudo-moar cb9df2: OUTPUT«False␤»
17:46 viki moritz: try to match Jack ;)
17:47 moritz m: subset Face of Str where any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say 'Jack' ~~ Face
17:47 camelia rakudo-moar cb9df2: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Jack' (indicated by ⏏)␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3435␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any a…»
17:48 moritz eeks
17:48 viki :)
17:48 moritz m: subset Face of Str where any ~«<2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say 'Jack' ~~ Face
17:48 camelia rakudo-moar cb9df2: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Jack' (indicated by ⏏)␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3435␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any a…»
17:48 timotimo yeah, smart match against a number, and we try to numify
17:49 viki m: subset Face of Str where any <2 3 4 5 6 7 8 9 10 Jack Queen King Ace>».Str; say 'Jack' ~~ Face
17:49 camelia rakudo-moar cb9df2: OUTPUT«True␤»
17:49 psch yeah, that's the thing i did at the start :P
17:50 psch texan though vOv
17:50 viki This is kinda weird tho:
17:50 viki m: .^name.say for +«<2 3 4 5 6 7 8 9 10>
17:50 camelia rakudo-moar cb9df2: OUTPUT«Int␤Int␤Int␤Int␤Int␤Int␤Int␤Int␤Int␤»
17:50 viki m: .^name.say for ~«<2 3 4 5 6 7 8 9 10>
17:50 camelia rakudo-moar cb9df2: OUTPUT«IntStr␤IntStr␤IntStr␤IntStr␤IntStr␤IntStr␤IntStr␤IntStr␤IntStr␤»
17:51 viki So + collapses to Int, but ~ preserves the allomorphs :S
17:51 psch m: say (~<1>).WHAT; say (<1>.Str).WHAT
17:51 camelia rakudo-moar cb9df2: OUTPUT«(IntStr)␤(Str)␤»
17:51 psch m: say (+<1>).WHAT; say (<1>.Int).WHAT
17:51 camelia rakudo-moar cb9df2: OUTPUT«(Int)␤(Int)␤»
17:51 psch yeah that's inconsistent
17:51 viki s: &prefix:<~>, \(<1>)
17:51 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/cb9df2b/src/core/Str.pm#L2616
17:51 viki lol
17:52 viki There's your problem :D
17:52 viki s: &prefix:<+>, \(<1>)
17:52 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/cb9df2b/src/core/Numeric.pm#L41
17:52 * viki spectest a fix
17:54 japhb .tell tadzik You'd asked me to create a PR to improve Terminal-ANSIColor's example.pl, which I did a couple weeks ago in https://github.com/tadzik/Terminal-ANSIColor/pull/7 ... are you still interested in that?
17:54 yoleaux japhb: I'll pass your message to tadzik.
17:54 pierre_ joined #perl6
17:55 viki hmmm... a thought occurs....
17:56 viki never mind
17:58 nicq20 left #perl6
17:59 viki moritz: FYI: https://www.reddit.com/r/perl6/comments/5dsn4a/another_perl_6_book_in_the_works_perl_6_by_example/da9rmlr/
17:59 * viki points at username
18:00 roguelazer joined #perl6
18:01 kyclark Re: http://pastie.org/10966908, why do I not get 1 when Ace and ! aces-high?
18:01 kyclark I get 11 both times, so I must not be pattern-matching correctly
18:02 psch m: say False ~~ True
18:02 camelia rakudo-moar cb9df2: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at <tmp>:1␤    ------> 3say False ~~ 7⏏5True␤True␤»
18:02 psch kyclark: does that ^^^ warning help?
18:03 psch kyclark: or, well, the suggestion inside that warning :)
18:05 viki bdfoy kinda scares me with articles like that: https://www.learningperl6.com/2016/11/17/quick-tip-2-fancier-sequences/
18:05 kyclark Hmm, sort of.  Does it mean I can't use that "given" construct?  I have to write an if/elsif chain?
18:05 viki DrForr: if LP6 will have lots of un-idiomatic Perl 6 it'll be all on you! I'll blame you forever :)
18:06 mspo TMTOWTDI?
18:07 viki m: https://gist.github.com/zoffixznet/82b9cc8a3abe481e65523d8f1a3b2734
18:07 camelia rakudo-moar cb9df2: OUTPUT«2 (False) = 2␤Jack (False) = 10␤Ace (True) = 11␤Ace (False) = 1␤»
18:07 viki kyclark: just use :so/:!so instead of True/False
18:08 kyclark Ah! Thanks.
18:08 kyclark I was writing !:so
18:08 viki mspo: there's a fine line between TMTOWTDI and weird constructs ;)
18:09 psch m: say 1 [&({$^a.&infix:<+>($^b)})] 2
18:09 camelia rakudo-moar cb9df2: OUTPUT«3␤»
18:09 * psch whistles innocently
18:10 viki Especially that last example with variable shuffling It's just a Perl-5-ism
18:12 viki psch: I'll rrrrrrrraise ya
18:12 viki m: say 1 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR[&({$^a.&infix:<+>($^b)})] 2
18:12 camelia rakudo-moar cb9df2: OUTPUT«3␤»
18:12 viki ^_^
18:19 Raimondii joined #perl6
18:21 eiro joined #perl6
18:21 eiro hello
18:21 eiro is there an equivalent of prove in perl6 ?
18:22 viki eiro: not yet
18:22 viki eiro: you can use Perl 5's prove with prove -e 'perl6'
18:22 firstdayonthejob joined #perl6
18:24 FROGGS what about that? https://github.com/tony-o/perl6-flow
18:24 kyclark Given "enum Dir <N S E W>" can I get all the Dirs?
18:24 eiro OMG! so i can use prove to test my zsh test suites, also! awesome
18:25 * eiro testing
18:27 viki FROGGS: well, it has one professional license :) http://www.wtfpl.net/about/
18:28 viki We have TAP in core, but last I recall there were still crashes when running many tests at the same time
18:28 AlexDaniel m: enum Dir <N S E W>; say Dir.pick(*) # haha
18:28 camelia rakudo-moar cb9df2: OUTPUT«(N S W E)␤»
18:28 viki and, I'm guessing once that's done we'd ship some sort of a prove-like thing? (maybe?)
18:28 psch don't we have prove6 somewhere in the works?
18:29 viki AlexDaniel: I don't get it :/
18:29 psch https://github.com/perl6/mu/blob/master/util/prove6 humm
18:29 psch not really "in the works" i'd say :)
18:30 viki There's t/harness6 in rakudo...
18:30 viki "Last commit: Jan 21, 2008"... should work with a couple of changes ;)
18:31 stux|RC-only joined #perl6
18:32 AlexDaniel m: enum Dir <N S E W>; say Dir::.values
18:32 camelia rakudo-moar cb9df2: OUTPUT«(W E S N)␤»
18:32 AlexDaniel why in reverse?
18:32 psch m: enum Dir <NW SE NE SW>; say Dir::.values
18:32 camelia rakudo-moar cb9df2: OUTPUT«(NW SE SW NE)␤»
18:32 AlexDaniel m: enum Dir <N S E W>; say Dir::.keys
18:32 camelia rakudo-moar cb9df2: OUTPUT«(W E S N)␤»
18:33 AlexDaniel so now keys and values are the same thing, hmm…
18:33 lizmat m: enum Dir <N S E W>; dd Dir::.keys
18:33 camelia rakudo-moar cb9df2: OUTPUT«("W", "E", "S", "N").Seq␤»
18:33 lizmat m: enum Dir <N S E W>; dd Dir::.values
18:33 camelia rakudo-moar cb9df2: OUTPUT«(Dir::W, Dir::E, Dir::S, Dir::N).Seq␤»
18:33 AlexDaniel ah
18:33 lizmat AlexDaniel: they only looks the same in a gist
18:34 AlexDaniel okay
18:34 psch and they are not in reverse, but deterministically not-in-order
18:34 AlexDaniel why?
18:34 psch because Associative isn't in-order
18:34 jonadab Hashes do not preserver order.
18:35 jonadab Because they gain significant perf advantages by not doing so.
18:35 AlexDaniel well, enums are pretty much ordered
18:35 psch i'm just explaining my assumed reason for the current behavior, not judging if it's a good choice vOv
18:36 psch i do agree that an Enum(eration) could be in-order, because, well, it's kinda in the name
18:36 AlexDaniel m: say False.succ
18:36 camelia rakudo-moar cb9df2: OUTPUT«True␤»
18:36 AlexDaniel m: say True.succ
18:36 camelia rakudo-moar cb9df2: OUTPUT«True␤»
18:36 jonadab Enums tend to be ordered in other languages, granted.
18:37 AlexDaniel m: enum Dir <N S E W>; say +«(N S E W)
18:37 camelia rakudo-moar cb9df2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside S␤at <tmp>:1␤------> 3enum Dir <N S E W>; say +«(N S7⏏5 E W)␤    expecting any of:␤        infix␤        infix stopper␤»
18:37 AlexDaniel m: enum Dir <N S E W>; say +«(N, S, E, W)
18:37 camelia rakudo-moar cb9df2: OUTPUT«(0 1 2 3)␤»
18:37 jonadab (Other languages also have things that are in some ways similar to Perl hashes, but preserver order, e.g., alists in lisp.  But there are performance tradeoffs there.)
18:37 jonadab *preserve
18:38 viki m: enum Dir <N S E W>; say Dir::.list
18:38 camelia rakudo-moar cb9df2: OUTPUT«(W => W E => E S => S N => N)␤»
18:38 viki m: enum Dir <N S E W>; say Dir.enums
18:38 camelia rakudo-moar cb9df2: OUTPUT«Map.new((:E(2),:N(0),:S(1),:W(3)))␤»
18:38 AlexDaniel m: enum Dir <N S E W>; say Dir.^enum_values
18:38 camelia rakudo-moar cb9df2: OUTPUT«{E => 2, N => 0, S => 1, W => 3}␤»
18:38 lizmat m: enum E (A => 666, B => 42); dd E.enums   # which order should these be ?
18:38 camelia rakudo-moar cb9df2: OUTPUT«Map.new((:A(666),:B(42)))␤»
18:39 kyclark m: subset Dir1 of Str where * eq any <N S E W>; put 'N' ~~ Dir1
18:39 camelia rakudo-moar cb9df2: OUTPUT«True␤»
18:39 kyclark m: my @dirs = <N S E W>; subset Dir1 of Str where * eq any <N S E W>; put 'N' ~~ Dir2
18:39 camelia rakudo-moar cb9df2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Dir2 used at line 1. Did you mean 'Dir1'?␤␤»
18:39 lizmat 1. order of definition, 2. alphabetical order on name, 3. order on value ?
18:39 AlexDaniel order of numeric value
18:39 kyclark m: my @dirs = <N S E W>; subset Dir2 of Str where * eq any @dirs; put 'N' ~~ Dir2
18:39 camelia rakudo-moar cb9df2: OUTPUT«True␤»
18:40 lizmat AlexDaniel: fwiw, order of definition feels more natural to me
18:40 kyclark Wait, I get "False" on my Rakudo
18:40 cdg joined #perl6
18:40 AlexDaniel lizmat: except that it never matters
18:41 viki AlexDaniel: isn't using an enum in the first place is so that the numerical order doesn't matter?
18:41 AlexDaniel and it matches the numeric order unless you tell it to do otherwise
18:41 viki Or order at all for that matter.
18:41 viki kyclark: what's the perl6 -v ?
18:41 kyclark I'm on 2016.10.
18:41 viki commitable: 2016.10 m: my @dirs = <N S E W>; subset Dir2 of Str where * eq any @dirs; put 'N' ~~ Dir2
18:41 committable6 viki, ¦«2016.10»: True
18:41 kyclark Hmm, it works fine in a script.  I must be confused.
18:41 viki Did you quote the quotes correctly?
18:42 viki in the shell
18:42 AlexDaniel ‘N’ ;)
18:42 viki m: enum Dir <N S E W>; say Dir.enums.sort: *.value
18:42 camelia rakudo-moar cb9df2: OUTPUT«(N => 0 S => 1 E => 2 W => 3)␤»
18:43 AlexDaniel m: enum Dir <N S E W>; say Dir.^enum_value_list
18:43 camelia rakudo-moar cb9df2: OUTPUT«(N S E W)␤»
18:43 AlexDaniel m: enum Dir <N S E W>; dd Dir.^enum_value_list
18:43 camelia rakudo-moar cb9df2: OUTPUT«(Dir::N, Dir::S, Dir::E, Dir::W)␤»
18:43 viki 0.o
18:43 AlexDaniel m: enum Dir <N S E W T N S L R Z>; dd Dir.^enum_value_list
18:43 camelia rakudo-moar cb9df2: OUTPUT«Potential difficulties:␤    Redeclaration of symbol 'N and S'␤    at <tmp>:1␤    ------> 3enum Dir <N S E W T N S L R Z>7⏏5; dd Dir.^enum_value_list␤(Dir::N, Dir::S, Dir::E, Dir::W, Dir::T, Dir::N, Dir::S, Dir::L, Dir::R, Dir::Z)␤»
18:43 AlexDaniel m: enum Dir <N S E W T L R Z>; dd Dir.^enum_value_list
18:43 camelia rakudo-moar cb9df2: OUTPUT«(Dir::N, Dir::S, Dir::E, Dir::W, Dir::T, Dir::L, Dir::R, Dir::Z)␤»
18:43 AlexDaniel there we go
18:44 AlexDaniel kyclark: note that ^enum_value_list is not part of the spec, and in fact is probably considered internal
18:44 kyclark Cool, thanks.
18:44 AlexDaniel kyclark: so don't use it
18:45 AlexDaniel :)
18:45 kyclark Right.
18:45 AlexDaniel I mean, you can, but expect it to break one day because there are no guarantees
18:46 viki In fact, we'll break it on purpose, just to point and laugh at you!
18:47 domidumont joined #perl6
18:47 AlexDaniel m: enum Dir ( N => 9999, S => 250, E => 99, W => 50 ); say Dir.^enum_value_list
18:47 camelia rakudo-moar cb9df2: OUTPUT«(N S E W)␤»
18:47 AlexDaniel so it is in declaration order
18:49 * lizmat starts working on the Perl 6 Weekly
18:49 kyclark Check this error: http://pastie.org/10966970  Why are the two "subset"s equivalent?
18:49 girafe joined #perl6
18:50 andrzejku_ joined #perl6
18:53 viki kyclark: likely 'cause you want @faces.any instead of any @faces
18:53 viki I don't think it flattens like that.
18:53 Juerd lizmat: ♥ p6w
18:53 andrzejku_ hey guys
18:54 andrzejku_ what do you think about Ruby
18:54 viki m: my @a = ^2; say "0 1" ~~ any @a
18:54 camelia rakudo-moar cb9df2: OUTPUT«Cannot convert string to number: trailing characters after number in '0⏏5 1' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:54 andrzejku_ isn it a Perl6?
18:54 AlexDaniel m: my @a = <a b c d>; say ‘a’ ~~ any @a
18:54 camelia rakudo-moar cb9df2: OUTPUT«True␤»
18:54 viki kyclark: oh nevermind, I guess it does
18:54 AlexDaniel m: my @a = <a b c d>; say ‘z’ ~~ any @a
18:54 camelia rakudo-moar cb9df2: OUTPUT«False␤»
18:54 andrzejku_ the same feature I mean
18:54 viki andrzejku_: no
18:54 viki m: 42.put
18:54 camelia rakudo-moar cb9df2: OUTPUT«42␤»
18:54 viki Try that in Ruby.... Totally different features.
18:55 AlexDaniel xD
18:55 AlexDaniel ahhhh
18:56 AlexDaniel no…
18:56 viki ?
18:57 viki Well, 42.puts too...
18:57 viki Weren't they advertising it as "everything is an object"?
18:58 AlexDaniel ah nvm I'm trying to figure out the Face issue
18:58 viki same
18:58 viki works if class is not involved
18:59 AlexDaniel it should be { $_ eq … } I think
18:59 viki oh
19:00 AlexDaniel eval: https://gist.githubusercontent.com/AlexDaniel/62ed16676f6f2260aa57b1e0ae6ac7a4/raw/bacc49523ac6aa8bf2a8321ee5145795bbf0aaf5/test.p6
19:00 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
19:00 evalable6 AlexDaniel, rakudo-moar cb9df2b: OUTPUT«Card2.new(face => "Ace", suite => "Diamond")»
19:00 viki Well, yeah, it works if you make it like that, but it's supposed to work with the Whatevercode too
19:00 AlexDaniel eval: https://gist.githubusercontent.com/AlexDaniel/62ed16676f6f2260aa57b1e0ae6ac7a4/raw/9b21fc25f1622c4ec2f53d563631fee9a7ac0baa/test.p6
19:00 evalable6 AlexDaniel, Successfully fetched the code from the provided URL.
19:00 evalable6 AlexDaniel, rakudo-moar cb9df2b: OUTPUT«(exit code 1) Type check failed in assignment to $!face; expected Card2::Face but got Str ("Face")␤  in block <unit> at /tmp/HLjBl2_nvE line 11␤»
19:01 viki or should it
19:01 El_Che lizmat: I created Linux rakudo packages for 2016.11 in case you're announcng that realease
19:02 viki lizmat: may be worth asking people for Advent posts too?
19:02 viki huggable: advent
19:02 huggable viki, https://github.com/perl6/mu/blob/master/misc/perl6advent-2016/schedule
19:02 vendethiel joined #perl6
19:02 lizmat El_Che viki: will do
19:03 viki lizmat++
19:03 viki m: https://gist.github.com/zoffixznet/28a0b593032e191fe13ea73385f0966f
19:03 camelia rakudo-moar cb9df2: OUTPUT«[]␤Type check failed in assignment to $!face; expected Card2::Face but got Str ("2")␤  in block <unit> at <tmp> line 6␤␤»
19:03 AlexDaniel yeah tried that too
19:04 viki kyclark: ^^ my interpretation is that the WhateverCode form gets made during compile time, when the class is created when the array doesn't have anything in it. Or something along those lines. At a guess, sticking that subset outside the class will work
19:04 kyclark Yes, that fixes it!
19:05 AlexDaniel well or just use {} I guess
19:05 viki aye, and sticking a BEGIN before the array also corroborates my hypothesis:
19:05 viki m: https://gist.github.com/zoffixznet/09a9b0bca9460df8936df0c88c7459d9
19:05 camelia rakudo-moar cb9df2: OUTPUT«Card2.new(face => "2")␤»
19:05 viki kyclark: yeah, the cleanest way is to just use the { $_ eq any @blah } instead of moving it outside the class
19:06 viki now... is this a bug or not? :)
19:06 AlexDaniel a trap for sure
19:06 AlexDaniel even if it is not a bug, perhaps it should throw a warning?
19:07 AlexDaniel committable6: all https://gist.githubusercontent.com/zoffixznet/28a0b593032e191fe13ea73385f0966f/raw/54bc89647d533c235d1bc576898ce5baefae005e/p6.p6
19:07 committable6 AlexDaniel, Successfully fetched the code from the provided URL.
19:07 committable6 AlexDaniel, https://gist.github.com/5368a4dad5611cd1d9f2ab933bd92ea7
19:08 viki If there *is* a way to make it work, that'd be nice
19:09 viki m: https://gist.github.com/zoffixznet/4cc505781009411d4f1b50915b0a5df9
19:09 camelia rakudo-moar cb9df2: OUTPUT«CardWorks1.new(face => IntStr.new(2, "2"))␤CardWorks2.new(face => IntStr.new(2, "2"))␤Type check failed in assignment to $!face; expected CardBroken::Face but got IntStr (IntStr.new(2, "2"))␤  in block <unit> at <tmp> line 21␤␤»
19:09 xinming joined #perl6
19:09 viki .ask jnthn is this a bug? A subset‒*located inside a class*‒with a WhateverCode that closes over an array doesn't get the values of that array: https://gist.github.com/zoffixznet/4cc505781009411d4f1b50915b0a5df9
19:09 yoleaux viki: I'll pass your message to jnthn.
19:12 kyclark So it's the same error if I move the code to a module: http://pastie.org/10966991
19:12 cdg joined #perl6
19:12 kyclark I guess those arrays don't exist?
19:14 awwaiid Come to DC for YAPC::NA 2017 / TPC::NA 2017! June 18-23. I think flights from EU will be affordable. http://news.perlfoundation.org/2016/11/the-perl-conference-save-date-2017.html
19:16 labster joined #perl6
19:16 awwaiid I see "tadzik: Perl 5, Perl 6, and threading one with the other" -- shall I do one on another day that talks about other Inline::* ?
19:16 perlpilot Maybe WhateverCode doesn't actually close over anything .... or it takes the closure in different phase-space.
19:16 briandfoy joined #perl6
19:16 * tadzik notices a lot more Inline::s that he knew existed
19:16 yoleaux 17:54Z <japhb> tadzik: You'd asked me to create a PR to improve Terminal-ANSIColor's example.pl, which I did a couple weeks ago in https://github.com/tadzik/Terminal-ANSIColor/pull/7 ... are you still interested in that?
19:17 tadzik oh!
19:17 tadzik japhb: yes, thanks! :)
19:18 lucasb_ joined #perl6
19:18 AlexDaniel joined #perl6
19:18 DrForr viki: I'm not sure how much influence I have/will have that way :/
19:21 awwaiid tadzik: ya ... Inline::Ruby works pretty well, and this would give me an excuse to work on Inline::Python and others. I need to update https://gist.github.com/awwaiid/01fe0e56e2c1220548a1
19:22 viki DrForr: actually, based on the invite I just got, I may have the chance to complain loudly first hand :)
19:22 DrForr Oh.
19:22 maybekoo2 joined #perl6
19:23 perlpilot awwaiid++ something on Inline::* would be nice, if nothing else to get the word out there about what's possible
19:23 awwaiid I like to tell people that the subtitle of Perl 6 is "Perl 6: The Polyglot Language", and Inline::* is a great example thereof :)
19:24 awwaiid Tangentally, I watched Matz's keynote on the latest Ruby3 ideas, and he said that they are going to avoid type annotations after all and depend completely on "duck-inference" typing. Very interesting.
19:24 Ven_ joined #perl6
19:25 * viki wants to work on Inline::Rust ...
19:25 viki It involves learning things tho :(
19:25 awwaiid viki: go for it! You should sign up to give a talk on it, that helps me get things done
19:25 jonadab viki: Not Inline::Intercal?
19:26 viki No idea what Intercal even is :)
19:26 viki awwaiid: meh, I'm not giving any more talks. I'm not cut out for it.
19:26 awwaiid It's the opposite of Extracal
19:27 viki Staring at confused faces while talking is a bit too much for me :)
19:27 awwaiid I thought you did well in that one video that one time
19:28 perlpilot viki: I had that exact same experience while teaching a class in college.   I don't see how profs do it day in and day out.
19:29 viki :)
19:29 huf they probably imagine some other faces that arent confused and pretend they're talking to them
19:30 huf lends itself especially well to physics: "take an ideal audience of uniform sense"
19:32 eisen74 joined #perl6
19:33 perlpilot you'll have to tweak the knob for "senseness" a little though
19:36 jonadab viki: Consider yourself fortunate :-)
19:39 lucasb_ I found a little problem with the $*ARGFILES.lines($n) method
19:39 psch i liked tutoring in uni
19:39 psch talks a probably a lot different though
19:39 viki jonadab: heh
19:39 viki lucasb_: whatisit?
19:40 lucasb_ viki: https://gist.github.com/anonymous/5e10718042896ffd3baa5370d8f13ede
19:41 dha joined #perl6
19:42 viki Aha
19:42 lucasb_ viki: does it make sense? :)
19:43 viki lucasb_: yeah, building a fix
19:45 viki Oh, I guess I should've read far enough to see your patch
19:45 viki Wouldn't it pull 1 extra time tho?
19:46 viki Oh never mind, it's a postfix
19:46 wamba joined #perl6
19:52 viki fix works. spectesting
19:52 cdg joined #perl6
19:56 viki I need a faster computer... all this spectesting is cutting into my gaming time ^_^
19:56 pierre_ joined #perl6
20:00 tony-o vps
20:00 tony-o is anyone out there using green ?
20:01 viki lucasb_: it's in. Thanks.
20:02 Tonik joined #perl6
20:03 lucasb_ viki: yay, thank you!
20:03 sufrostico joined #perl6
20:04 tojo joined #perl6
20:07 perlpilot briandfoy++ nice chrysalis
20:09 viki ?
20:09 viki oh god
20:09 perlpilot update #6 on the kickstarter
20:10 viki That's gross really... Bugs are gross >_<
20:11 domidumont joined #perl6
20:11 perlpilot viki: bugs are the dominant form of living protein on the planet  ;>
20:12 viki perlpilot: and manure is the dominant nitrogen source for the plants?
20:12 viki :)
20:12 mj41 joined #perl6
20:13 viki TBH I thought the original butterfly he had on the cover had a bit of entomophob's nightmare thing going on...
20:13 viki But now with the thing and the legs :o
20:13 ZzZombo joined #perl6
20:13 * viki shudders
20:13 * dha goes to look at the latest update
20:13 yoleaux 9 Nov 2016 03:35Z <ugexe> dha: can you tell me what OS you are on and send me the output of `ZEF_PLUGIN_DEBUG=1 zef --debug install $problem-module-name`? That should be enough for me to solve your 'no fetching backend available' issue
20:14 dha Oh. Now I have to remember what the problem was...
20:19 viki m: subset Face of Str where any ~«<2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; say 'Jack' ~~ Face
20:19 camelia rakudo-moar bd4236: OUTPUT«True␤»
20:19 viki So this now works on HEAD
20:19 * viki wonders
20:21 viki m: class Foo { my @stuff = ~«<2 3 4 5 6 7 8 9 10 Jack Queen King Ace>; subset Face of Str where any @stuff; has Face $.face; }.new: :face('2')
20:21 camelia rakudo-moar bd4236: OUTPUT«Type check failed in assignment to $!face; expected Foo::Face but got Str ("2")␤  in block <unit> at <tmp> line 1␤␤»
20:21 mohae joined #perl6
20:21 viki oh well
20:24 ufobat_ joined #perl6
20:25 ugexe dha: you said you keep getting 'no fetching backend found' error with zef
20:28 AlexDaniel boom!
20:28 dha yeah. unfortunately, that was a while ago now, and I don't remember what module was spitting up at me. I'm now trying to install stuff to see if I can reproduce the problem.
20:30 RabidGravy Oh weird I've just had a recruiter send me an informix 4gl job
20:30 bisectable6 joined #perl6
20:31 committable6 joined #perl6
20:31 evalable6 joined #perl6
20:31 RabidGravy I must be the only person in the country owning up to that
20:31 benchable6 joined #perl6
20:36 AlexDaniel soooo… I can't use TWEAK to change an attribute of a parent?
20:36 AlexDaniel ah no
20:37 AlexDaniel needs “is rw”
20:37 tony-o tweaker
20:44 jferrero m: fi(9).join("-").say; sub fi($N){(0,1,*+*…∞)[0..$N]}
20:44 camelia rakudo-moar bd4236: OUTPUT«0-1-1-2-3-5-8-13-21-34␤»
20:45 jferrero m: fi(9).join("-").say; sub fi($N){(0,1,*+*…∞)[0‥$N]}
20:45 camelia rakudo-moar bd4236: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3).join("-").say; sub fi($N){(0,1,*+*…∞)[07⏏5‥$N]}␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statemen…»
20:49 wamba joined #perl6
20:50 telex joined #perl6
20:52 viki m: fi(9).join("-").say; sub fi{(0,1,*+*…∞)[^($^N+1)]}
20:52 camelia rakudo-moar bd4236: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of $^N variable; in Perl 6 please use $/[*-1]␤at <tmp>:1␤------> 3).join("-").say; sub fi{(0,1,*+*…∞)[^($^N7⏏5+1)]}␤»
20:52 viki lolwut
20:53 viki stupid Perl 5 and its variables
20:53 viki m: fi(9).join("-").say; sub fi{(0,1,*+*…∞)[^($^n+1)]}
20:53 camelia rakudo-moar bd4236: OUTPUT«0-1-1-2-3-5-8-13-21-34␤»
20:53 psch m: my &fi={(0,1,*+*…∞)[^($^a+1)]};fi(9).join("-").say;
20:53 camelia rakudo-moar bd4236: OUTPUT«0-1-1-2-3-5-8-13-21-34␤»
20:54 psch oh of course that doesn't help
20:54 viki .u ‥
20:54 yoleaux U+2025 TWO DOT LEADER [Po] (‥)
20:54 psch well, it's the same #-chars vOv
20:54 pmurias why was split('', 'foo') changed from what it does in Perl 5?
20:55 viki Is that the only thing that changed? :)
20:56 psch isn't that "magically use the last pattern we used before which no one remembers because it could be in a different file"?
20:56 psch oh, no, that's split(//, 'foo'), sorry
20:56 viki I don't think it's special
20:56 [Coke] the diff is the blank spaces before and after.
20:57 viki Well, yeah, it's 'cause we have .comb for that
20:57 [Coke] some kind of consistency. if you want that particular p5 behavior, the new idiomatic way to get it is with:
20:57 [Coke] m: say "foo".comb
20:57 camelia rakudo-moar bd4236: OUTPUT«(f o o)␤»
20:57 [Coke] (some kind) but I don't remember what kind. :)
20:57 TEttinger joined #perl6
20:57 viki With everything else.
20:58 viki You need :skip-empty if you want Perl 5's behaviour
20:58 [Coke] m: dd split('', 'foo', :skip-empty);
20:58 camelia rakudo-moar bd4236: OUTPUT«("f", "o", "o")␤»
20:59 jferrero fi(0).join("-").say }; sub fi{(0,1,*+*…∞)[^$^a+1]}
20:59 jferrero m: fi(0).join("-").say }; sub fi{(0,1,*+*…∞)[^$^a+1]}
20:59 camelia rakudo-moar bd4236: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3fi(0).join("-").say 7⏏5}; sub fi{(0,1,*+*…∞)[^$^a+1]}␤»
20:59 jferrero m: fi(0).join("-").say; sub fi{(0,1,*+*…∞)[^$^a+1]}
20:59 camelia rakudo-moar bd4236: OUTPUT«␤»
21:00 viki You're missing a paren
21:00 viki ^$^a+1 shifts the whole range up
21:00 viki m: say eager ^3+1
21:00 camelia rakudo-moar bd4236: OUTPUT«(1 2 3)␤»
21:00 viki m: say eager ^(3+1)
21:00 camelia rakudo-moar bd4236: OUTPUT«(0 1 2 3)␤»
21:00 jferrero Ouch!
21:02 rindolf joined #perl6
21:11 seatek joined #perl6
21:25 AlexDaniel m: 8490.chr.ord.say
21:25 camelia rakudo-moar bd4236: OUTPUT«75␤»
21:26 labster joined #perl6
21:27 viki erl6 -e 'm: 8490.chr.say'
21:27 viki erl6 -e 'm: 8490.chr.say'
21:27 viki grrr
21:27 viki That 8490 sure doesn't like my copy/paste feature :/
21:27 viki m: 8490.chr.uniname.say
21:27 camelia rakudo-moar bd4236: OUTPUT«LATIN CAPITAL LETTER K␤»
21:27 [Coke] Decomposition    LATIN CAPITAL LETTER K (U+004B)
21:27 [Coke] ^^ from http://www.fileformat.info/info/unicode/char/212a/index.htm
21:28 trnh joined #perl6
21:28 trnh joined #perl6
21:28 [Coke] perl6 respects decomposition. (see also the weird greek semicolon)
21:28 AlexDaniel yea-yea, of course
21:33 wamba joined #perl6
21:33 Juerd [Coke]: That's not a greek semicolon, but a greek question mark :P
21:35 [Coke] ah, right, it just LOOKS like a semicolon. :)
21:35 Juerd They probably think our semicolons look like question marks :)
21:35 wamba joined #perl6
21:37 caruzo joined #perl6
21:38 ruddur joined #perl6
21:50 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/11/21/2016-47-perl-6-入门/
21:55 seatek lizmat++
21:57 AlexDaniel m: say 9000000000000000.uniprop
21:57 camelia rakudo-moar bd4236: OUTPUT«should eventually be unreachable␤  in block <unit> at <tmp> line 1␤␤»
21:57 AlexDaniel :D
21:58 AlexDaniel well, that's true
21:59 dha joined #perl6
22:00 perlpilot lizmat++
22:03 obfusk joined #perl6
22:16 dha FWIW, I haven't come across any fetching backend errors with zef today, but I'm seeing a whole bunch of test errors.
22:16 dha Maybe I should check how far out of date I am on my Rakudo
22:21 bjz joined #perl6
22:21 zilti joined #perl6
22:23 espadrine joined #perl6
22:25 nicq20_ joined #perl6
22:28 kyclark_ joined #perl6
22:43 viki lizmat++ good weekly
22:44 viki So the Next YAPC::NA is close enough to me I could drive to it (8hr drive)
22:45 * viki would go, but don't wanna risk being detained or searched, like last time.... :(
22:49 nicq20_ viki: Well, you Canadians are know for being aggressive about your Maple Syrup. :)
22:49 viki :)
22:52 tbrowder ditto viki's comment: lizmat++ good weekly, as usual!
22:54 tony-o where is YAPC this year?
22:54 tony-o ::NA
22:57 lizmat Alexandria, VA
23:01 pierre_ joined #perl6
23:01 tbrowder re YAPC::NA 2017: in
23:02 tbrowder i plan to go if there is enough p6 activity-
23:03 * lizmat is not too worried about p6 activity
23:03 lizmat I'm more worried about the trumpification of the US  :-(
23:04 viki :)
23:06 viki We obviously need to relocate YAPC::NA to a safer country... umm.. just a random location: Toronto, Canada ^_^
23:11 * lizmat would welcome that
23:11 lizmat never been to Toronto yet
23:13 lizmat but first, some sleep
23:13 lizmat so good night, #perl6!
23:13 viki -night
23:13 dha night lizmat
23:14 dha There has been a YAPC::NA in Toronto.
23:14 lizmat there has been a YAPC::EU in Amsterdam  :-)
23:14 timotimo "should eventually be unreachable" ought to instead read "are you from the future? what horrible things does the unicode consortium have in store for us?!"
23:14 lizmat so there will be a precedent for 2018 NA  :-)
23:14 lizmat afk&
23:19 viki I would go for YAPC::EU in Amsterdam :)
23:20 viki heh... it's the first place I found that doesn't have a travel advisory from canuk gov :P
23:20 viki (even in US there's thread of Zika virus)
23:22 skink joined #perl6
23:23 skink timotimo, I --profile'd that image matching code and all of runtime is stop, wait-for-result, etc
23:24 timotimo stop? wait-for-result? do you have some multi-threading or something?
23:25 skink This was that thing about .race not improving performance at all
23:25 skids joined #perl6
23:25 tbrowder lizmat: don't worry about Trumpification, the news you see from the US is not generally reliable
23:26 timotimo it'd be more interesting to "perf record -g" and see how much time is spent in invocation-related things
23:26 timotimo like fixed_size_alloc and allocate_frame and stuff like that
23:28 skink --profile has negligible time for allocs/gc funny enough
23:28 timotimo yeah
23:29 timotimo those aren't part of what the profiler considers allocation
23:29 timotimo more invocation
23:29 timotimo also, the profiler doesn't understand multi-threading yet
23:29 unicodable6 joined #perl6
23:30 AlexDaniel Welcome our new bot :)
23:30 AlexDaniel u: ✓∞×
23:30 unicodable6 AlexDaniel, U+2713 CHECK MARK [So] (✓)
23:30 unicodable6 AlexDaniel, U+221E INFINITY [Sm] (∞)
23:30 unicodable6 AlexDaniel, U+00D7 MULTIPLICATION SIGN [Sm] (×)
23:30 AlexDaniel u: if there are too many, it will gist it
23:30 unicodable6 AlexDaniel, U+0069 LATIN SMALL LETTER I [Ll] (i)
23:30 unicodable6 AlexDaniel, U+0066 LATIN SMALL LETTER F [Ll] (f)
23:30 unicodable6 AlexDaniel, U+0020 SPACE [Zs] ( )
23:30 unicodable6 AlexDaniel, https://gist.github.com/436dbdcdbd5ddc526f0ee70afc2e5b6c
23:30 AlexDaniel you can also search for names
23:30 AlexDaniel u: fly butter
23:31 unicodable6 AlexDaniel, U+1F98B BUTTERFLY [So] (🦋)
23:31 AlexDaniel and also filter by properties
23:31 AlexDaniel u: five Nd
23:31 unicodable6 AlexDaniel, U+0035 DIGIT FIVE [Nd] (5)
23:31 unicodable6 AlexDaniel, U+0665 ARABIC-INDIC DIGIT FIVE [Nd] (٥)
23:31 unicodable6 AlexDaniel, U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE [Nd] (۵)
23:31 unicodable6 AlexDaniel, https://gist.github.com/826524db6b55625c6c7dcae6ef3c4b28
23:31 AlexDaniel but most importantly you can pass code blocks!
23:31 AlexDaniel u: { .uniname.chars > 60 }
23:31 unicodable6 AlexDaniel, U+069C ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE [Lo] (ڜ)
23:31 unicodable6 AlexDaniel, U+0753 ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW AND TWO DOTS ABOVE [Lo] (ݓ)
23:31 unicodable6 AlexDaniel, U+0759 ARABIC LETTER DAL WITH TWO DOTS VERTICALLY BELOW AND SMALL TAH [Lo] (ݙ)
23:31 unicodable6 AlexDaniel, https://gist.github.com/7f7a16100d045149b15ba45a15fd3e82
23:33 timotimo skink: FWIW, whenever an invocation happens at the moar level, so like a sub call or method call, we run to a single-threaded allocator and have two pieces of memory allocated. each time we take and release a globally shared lock. it's currently far from optimal how this all works.
23:34 AlexDaniel there are some tiny issues with it (occasional MoarVM panic in complex cases), but otherwise it is fine :)
23:35 nicq20_ AlexDaniel++
23:37 viki AlexDaniel++ neat
23:41 Guest85310 joined #perl6
23:41 * timotimo just pushed a nice memory saving thingie to moarvm's master branch
23:41 firstdayonthejob joined #perl6
23:41 timotimo it'd be nice if people would test it out and report savings for their real world programs
23:41 timotimo because i've just been measuring perl6 -e ''
23:41 dalek joined #perl6
23:44 rpburkholder joined #perl6
23:46 dha Hm. JSON::RPC does not like me. That this has come up in the context of installing Task::Star is concerning. :-
23:48 dalek whateverable: 196ba7d | (Aleks-Daniel Jakimenko-Aleksejev)++ | Whateverable.pm6:
23:48 dalek whateverable: Add $.always-upload attribute
23:48 dalek whateverable:
23:48 dalek whateverable: For things that should be gisted rather than being sent
23:48 dalek whateverable: with ␤ characters.
23:48 dalek whateverable: review: https://github.com/perl6/whateverable/commit/196ba7dafe
23:48 dalek whateverable: a368d2b | (Aleks-Daniel Jakimenko-Aleksejev)++ | Unicodable.p6:
23:48 dalek whateverable: Add Unicodable
23:48 dalek whateverable:
23:48 dalek whateverable: This is a quick and dirty draft of Unicodable, hoping to improve the
23:48 dalek whateverable: code in the future.
23:48 dalek whateverable: review: https://github.com/perl6/whateverable/commit/a368d2b424
23:51 sufrostico joined #perl6
23:53 dalek whateverable: b7fd9e0 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Unicodable.p6:
23:53 dalek whateverable: Oops, delete debugging stuff
23:53 dalek whateverable: review: https://github.com/perl6/whateverable/commit/b7fd9e074e
23:54 unicodable6 joined #perl6
23:55 AlexDaniel .u 2²
23:55 yoleaux U+0032 DIGIT TWO [Nd] (2)
23:55 yoleaux U+00B2 SUPERSCRIPT TWO [No] (²)
23:55 xinming joined #perl6
23:55 AlexDaniel u: 2²
23:55 unicodable6 AlexDaniel, U+0032 DIGIT TWO [Nd] (2)
23:55 unicodable6 AlexDaniel, U+00B2 SUPERSCRIPT TWO [No] (²)
23:55 AlexDaniel I wonder why yoleaux has a delay
23:59 viki dha: I think that module has been buggy for ages.
23:59 viki And wasn't it removed from R*?

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

Perl 6 | Reference Documentation | Rakudo