Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-10

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:05 orbus RabidGravy: you have a pi or a pi2?
00:05 orbus on pi2 it's not super fast but if you do make -j5, that helps some
00:05 RabidGravy both
00:06 orbus I only have the pi2
00:07 orbus finally seem to have gotten it stable incidentally - the first sd card I made worked for a while and then started getting massive filesystem corruption
00:07 RabidGravy oh on the rev b pi it's go away and have a bunch of beer while you make perl
00:07 orbus until it wouldn't boot anymore
00:07 orbus haha, yeah, parallel make helps - put those cores to work
00:08 RabidGravy on the original pi there's only one core
00:09 orbus yeah, I know
00:09 orbus that's why when I started looking at getting one, I waited till the pi2 released
00:10 orbus perl builds a lot better on arm than it does on sparc at least
00:10 orbus I can just about get moar to build on sparc, but it segfaults as soon as you try to build nqp
00:10 orbus from what I've read, sparc is super picky about memory alignment and I think it doesn't like something moar is doing
00:11 stmuk__ I keep meaning to try qemu-arm and raspian
00:11 joydon joined #perl6
00:12 orbus I'm a rebel so I didn't use raspbian - I just took the arm fedora image and hacked in the pi kernel
00:12 orbus I'm kind of amazed it runs
00:13 RabidGravy yeah I use the fedora on the Pi, at least on one of them
00:15 grassass joined #perl6
00:16 orbus I implemented lock based compare and swap that seems to correspond to S17's intentions and seems to work
00:16 orbus m: multi casx($ref is rw, $expected, $new) {state $l=Lock.new; my $z; $l.protect({if $ref == $expected { $ref = $new; $z=True } else { $z=False };}); return $z; }; multi casx(\val, &code){my $o=val; while casx(val,$o,code(val))==False {$o=val}}; my $x=0; await start {for ^1000 { casx($x,{$_+1}) }} xx 8; put $x
00:16 camelia rakudo-moar a28270: OUTPUT«8000␤»
00:17 orbus only thing I changed is the 3 argument version of cas in the synopsis returns the original value of $ref
00:17 orbus which seems kind of useless to me
00:17 orbus so I changed it to true / false which seems more useful
00:18 vike1 joined #perl6
00:19 orbus hrm, except maybe it's intended that the 3 argument version always succeed
00:20 orbus maybe I better try this again
00:21 ely-se What's with all the all-caps language names? C, C++, C#, D, etc
00:22 Juerd ely-se: And PERL of course ;)
00:25 orbus Hrmm.  No, I think it's right how it is - the 3 argument version described in S17 returns the original value of $ref whether the comparison succeeds or not, when you really need to know whether or not it succeeded.
00:25 orbus and if you try to compare after doing cas, then there's a potential for race conditions
00:25 orbus so having true/false seems decidedly better
00:26 gfldex ely-se: back in the days folk used typewriters, easy to stand out if you don't git <i>c</i>
00:30 Timbus joined #perl6
00:37 RabidGravy also 7 bit, the style stuck
00:38 AlexDaniel joined #perl6
00:39 AlexDaniel m: say ⹂test”
00:39 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/jYZUvx1z1a:1␤------> 3say7⏏5 ⹂test”␤Bogus postfix␤at /tmp/jYZUvx1z1a:1␤------> 3say 7⏏5⹂test”␤    expecting any of:␤        infix␤        infix stopper…»
00:39 AlexDaniel .u ⹂”
00:39 yoleaux U+201D RIGHT DOUBLE QUOTATION MARK [Pf] (”)
00:39 AlexDaniel m: ‘⹂’.uniname.say; ‘”’.uniname.say
00:39 camelia rakudo-moar a28270: OUTPUT«DOUBLE LOW-REVERSED-9 QUOTATION MARK␤RIGHT DOUBLE QUOTATION MARK␤»
00:41 pjscott joined #perl6
00:42 lnrdo joined #perl6
00:42 lucasb AlexDaniel: can I suggest a puzzle? sort all uninames by length and find the longest name
00:42 AlexDaniel lucasb: easy
00:45 AlexDaniel m: say (0..0x1FFFF).sort(*.uninam​e.chars)[*-1].chr.uniname
00:45 AlexDaniel m: say (0..0x1FFFF).sort(*.uniname.chars)[*-1].chr
00:45 camelia rakudo-moar a28270: OUTPUT«ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM␤»
00:45 camelia rakudo-moar a28270: OUTPUT«ﯹ␤»
00:45 AlexDaniel lucasb: told ya, easy
00:45 lucasb AlexDaniel++, very good :)
00:46 AlexDaniel m: say (0..0x1FFFF).sort(*.uniname.chars)[*-2].chr
00:46 camelia rakudo-moar a28270: OUTPUT«ﯻ␤»
00:46 AlexDaniel m: say (0..0x1FFFF).sort(*.uninam​e.chars)[*-2].chr.uniname
00:46 camelia rakudo-moar a28270: OUTPUT«ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM␤»
00:46 RabidGravy m: say «foo»
00:46 camelia rakudo-moar a28270: OUTPUT«foo␤»
00:47 AlexDaniel is there anything non arabic
00:47 lucasb are these names canonical? can't a codepoint have more than one official name?
00:47 AlexDaniel m: say (0..0x1FFFF).sort(*.uninam​e.chars)[*-10].chr.uniname
00:47 camelia rakudo-moar a28270: OUTPUT«MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-2␤»
00:47 AlexDaniel lucasb: I don't think so. In fact, it cannot even have more than one group
00:47 AlexDaniel I might be wrong but I haven't ever seen that
00:47 RabidGravy so yeah it those quotes work *all* quotes should work
00:47 AlexDaniel RabidGravy: all quotes do work actually
00:48 AlexDaniel m: say “…”
00:48 camelia rakudo-moar a28270: OUTPUT«…␤»
00:48 AlexDaniel m: say ”…”
00:48 camelia rakudo-moar a28270: OUTPUT«…␤»
00:48 AlexDaniel m: „…“
00:48 camelia rakudo-moar a28270: OUTPUT«WARNINGS for /tmp/yTMyjC8KWS:␤Useless use of constant string "…" in sink context (line 1)␤»
00:48 AlexDaniel m: say „…“
00:48 camelia rakudo-moar a28270: OUTPUT«…␤»
00:48 RabidGravy you just showed the lower quotes don't
00:48 pjscott joined #perl6
00:48 AlexDaniel m: ,…’
00:48 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tQXomzasC7␤Comma found before apparent series operator; please remove comma (or put parens␤    around the ... listop, or use 'fail' instead of ...)␤at /tmp/tQXomzasC7:1␤------> 3,7⏏5…’␤»
00:48 AlexDaniel m: say ,…’
00:48 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OGMrrIVyNv␤Comma found before apparent series operator; please remove comma (or put parens␤    around the ... listop, or use 'fail' instead of ...)␤at /tmp/OGMrrIVyNv:1␤------> 3say ,7⏏5…’␤»
00:48 AlexDaniel .u ,
00:48 yoleaux U+002C COMMA [Po] (,)
00:48 AlexDaniel hey!! What?
00:49 geekosaur .u ¸
00:49 yoleaux U+00B8 CEDILLA [Sk] (¸)
00:49 geekosaur hm, wrong one
00:49 AlexDaniel m: say ‚…’
00:49 camelia rakudo-moar a28270: OUTPUT«…␤»
00:49 RabidGravy yeah uncomposed  ç
00:49 AlexDaniel here. Wikipedia got that wrong
00:49 AlexDaniel unless somebody is actually using a comma instead of a lower quote…
00:50 Quom__ .u ‚
00:50 yoleaux U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
00:50 AlexDaniel lucasb: in fact, these names are guaranteed not change
00:50 AlexDaniel not to*
00:51 AlexDaniel at least that's what I've read on unicode.org somewhere…
00:52 AlexDaniel RabidGravy: I showed that some new weird unicode char is not supported, yes
00:52 geekosaur .u ‚
00:52 yoleaux U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
00:53 geekosaur ok, that's how i compose it. sigh
00:53 AlexDaniel geekosaur: how, by the way?
00:53 geekosaur too much crap in the compose file >.>
00:53 geekosaur <compse> , '
00:53 RabidGravy to be honest I only care about things I can type without too much effort
00:53 AlexDaniel ‚oh’!
00:53 geekosaur (comma, apostrophe)
00:53 Skarsnik damn this Perl6 process is growing in memory :(
00:53 Skarsnik but it should not
00:54 AlexDaniel Skarsnik: time to buy more memory
00:54 AlexDaniel Skarsnik: memory is cheap!!
00:56 AlexDaniel RabidGravy: the thing is, there is a subset of combinations that are actually used by people. These are already supported by Perl 6. Should we support anything else? Well, do we actually want to support things like 🙶🙷 or ❮❯ or ❛❜ or ‹› …
00:56 dalek doc: e79fa57 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
00:56 dalek doc: better example for Cool::uniname (AlexDaniel++)
00:56 dalek doc: review: https://github.com/perl6/doc/commit/e79fa57d9d
00:56 dalek doc: 2f763ce | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
00:56 dalek doc: Merge pull request #336 from gfldex/master
00:56 dalek doc:
00:56 dalek doc: better example for Cool::uniname (AlexDaniel++)
00:56 dalek doc: review: https://github.com/perl6/doc/commit/2f763ced35
00:57 AlexDaniel RabidGravy: and why not leave those for user-defined things? :)
00:57 AlexDaniel gfldex: wrong snippet though. should be *-1, not *-2
00:58 RabidGravy well I think everyone should be fairly consevative in what they do and perl should be liberal in what it accepts
00:59 RabidGravy and the first thing there my computer no have a thing for that code point
00:59 dalek doc: 251eb2f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
00:59 dalek doc: late night copypasta error, fixed
00:59 dalek doc: review: https://github.com/perl6/doc/commit/251eb2f65c
00:59 dalek doc: 306013c | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
00:59 dalek doc: Merge pull request #337 from gfldex/master
00:59 dalek doc:
00:59 dalek doc: late night copypasta error, fixed
00:59 dalek doc: review: https://github.com/perl6/doc/commit/306013c4d6
00:59 AlexDaniel m: say ‚hello ‚nested’’
00:59 camelia rakudo-moar a28270: OUTPUT«hello ‚nested’␤»
01:00 RabidGravy but would you accept it in a code review?
01:01 AlexDaniel RabidGravy: if it used consistently, then yes
01:01 AlexDaniel is*
01:01 AlexDaniel m: say ‘»ö«’.uniname
01:01 camelia rakudo-moar a28270: OUTPUT«RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK␤»
01:02 AlexDaniel gfldex: hmm, what's the point of this? ↑
01:02 AlexDaniel gfldex: shouldn't it be this? ↓
01:02 AlexDaniel m: say ‘»ö«’.uninames
01:02 camelia rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)␤»
01:02 gfldex AlexDaniel: indeed
01:02 gfldex m: say ‘»ö«’>>.uniname
01:02 camelia rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)␤»
01:03 AlexDaniel or this, yes
01:03 gfldex that doesnt work either, because there is no split
01:03 AlexDaniel m: say ‘»ö«’.comb>>.uniname
01:03 camelia rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)␤»
01:04 AlexDaniel m: say ‘»ö«’.comb».uniname
01:04 camelia rakudo-moar a28270: OUTPUT«(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK LATIN SMALL LETTER O WITH DIAERESIS LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)␤»
01:05 AlexDaniel gfldex: that's why we have plural forms, I guess. To save the forest by not using .comb
01:05 lnrdo joined #perl6
01:06 AlexDaniel gfldex: also, I don't really see it documented. So perhaps this example should show .uninames :)
01:06 AlexDaniel use*
01:08 gfldex on it.
01:08 AlexDaniel gfldex: also, the night is really late, because it is not just *-1. This MAKSURA thing should be in ISOLATED form, not INITIAL
01:09 uruwi joined #perl6
01:09 AlexDaniel m: say (0..0x1FFFF).sort(*.unipro​p.chars)[*-1].chr.uniprop # just for fun
01:09 camelia rakudo-moar a28270: OUTPUT«So␤»
01:10 AlexDaniel m: say (0..0x1FFFF).sort(*.uniprop.chars)[0].chr.uniprop # just for fun
01:10 camelia rakudo-moar a28270: OUTPUT«␤»
01:10 AlexDaniel m: say ‘a’.uniprop
01:10 camelia rakudo-moar a28270: OUTPUT«Ll␤»
01:11 AlexDaniel ah right, there are some unused code points with no prop. Got it
01:14 mspo panda sucks
01:15 RabidGravy mspo, please feel free to improve upon it
01:15 AlexDaniel mspo: or at least submit bug reports, that works too
01:16 mspo where is --notests supposed to go?
01:16 AlexDaniel panda --notests install Something
01:16 * gfldex .oO( complaining and fixing are mutual inclusive )
01:16 RabidGravy no saying it sucks requires actual material fixing
01:16 mspo Usage: panda <action> [options]
01:16 AlexDaniel mspo: hahaha!
01:17 mspo and then
01:17 mspo Actions:
01:17 mspo install        Installs the modules listed on the command line, and their
01:17 mspo dependencies.
01:17 mspo --notests    Don't run tests for the modules being installed.
01:17 AlexDaniel but it says panda [options] <action> here
01:17 AlexDaniel so not hahaha…
01:17 RabidGravy mspo, in that case I think you mean Perl 6 sucks
01:17 mspo AlexDaniel: you mean your usage is different?
01:18 RabidGravy you can fix the MAIN implementation as a penance
01:18 AlexDaniel mspo: yeah, where did you find <action> [options] ?
01:18 mspo I typed panda -h
01:20 AlexDaniel mspo: yeah, I definitely see “panda [options] <action>” exactly in that order
01:20 RabidGravy it's a LTA result of the way the MAIN helpers work
01:21 mspo ?
01:21 AlexDaniel yeah. ?
01:22 mspo how do I get the version of my panda/
01:22 mspo it must be out of date
01:24 AlexDaniel I've tried 「panda info Panda」 but it does not show the version
01:24 mspo between 2015.11 and 2015.12 that help message was switched
01:30 RabidGravy panda has been changed frequently in the last month
01:31 mspo just keep repeating and it will work, I guess: https://gist.github.com/mspo​rleder/d0aa0318f78a5654560f
01:32 mspo notests was required to get past the pod coverage module
01:35 lsm-desktop joined #perl6
01:35 RabidGravy I'd forgotten about the pod coverage thing
01:36 mspo p6doc doesn't work on bsd because fmt takes different options from gnu
01:37 mspo why is p6doc calling out to the shell so much?
01:37 RabidGravy dunno, that sucks
01:38 mspo fmt feels like a perl-friendly thing ;)
01:38 RabidGravy probably because no one implemented fmt in perl 6 yet
01:39 RabidGravy there you go, job for you
01:39 mspo yeah
01:39 RabidGravy :)
01:40 mspo it might just be netbsd being weird in fmt, actually
01:40 dalek doc: 4f27969 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
01:40 dalek doc: get the first part of the example right and link to uninames
01:40 dalek doc: review: https://github.com/perl6/doc/commit/4f27969162
01:40 dalek doc: 6b1b6c8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
01:40 dalek doc: doc uninames
01:40 dalek doc: review: https://github.com/perl6/doc/commit/6b1b6c8a65
01:40 dalek doc: 9bf3a84 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
01:40 dalek doc: title Cool a class
01:40 dalek doc: review: https://github.com/perl6/doc/commit/9bf3a842a1
01:40 dalek doc: 54e9b9c | (Wenzel P. P. Peppmeyer)++ | /:
01:40 dalek doc: Merge remote-tracking branch 'upstream/master'
01:41 dalek doc: review: https://github.com/perl6/doc/commit/54e9b9c0ac
01:41 dalek doc: 37b0eaf | (Wenzel P. P. Peppmeyer)++ | doc/Type/ (2 files):
01:41 dalek doc: name Code and Ducation a class too
01:41 dalek doc: review: https://github.com/perl6/doc/commit/37b0eaf274
01:41 dalek doc: d19f3b7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/ (3 files):
01:41 dalek doc: Merge pull request #338 from gfldex/master
01:41 dalek doc:
01:41 dalek doc: name Cool, Code and Ducation a class | doc uninames | get the first part of the example right and link to uninames
01:41 dalek doc: review: https://github.com/perl6/doc/commit/d19f3b7cbc
01:42 nzkindest joined #perl6
01:43 psy_ joined #perl6
01:45 colomon joined #perl6
01:46 mspo how can I troubleshoot this? Variable '%?RESOURCES' is not declared
01:46 Skarsnik Oo
01:47 pjscott joined #perl6
01:47 travis-ci joined #perl6
01:47 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'Merge pull request #338 from gfldex/master
01:47 travis-ci https://travis-ci.org/perl6/doc/builds/101346339 https://github.com/perl6/doc/com​pare/306013c4d6eb...d19f3b7cbcd0
01:47 travis-ci left #perl6
01:54 RabidGravy mspo, pre-release rakudo I'd say
01:55 lichtkind am so happy
01:56 RabidGravy %?RESOURCES is fairly fundamental to the way most things find compiled helper libraries
01:56 lichtkind you can no write $matrix ** -2 and it does what oyu expect
01:56 lichtkind perl 6 makes it so easy
02:02 molaf__ joined #perl6
02:02 mspo I guess I should try deleting my local install before compiling next time
02:02 BenGoldberg lichtkind, Just because perl5's Math::Matrix does not have exponentiation, is not the fault of perl5, but rather the fault of the author of that particular module.
02:03 RabidGravy indeed
02:04 lichtkind i know you can define ops i p5 but its easier in perl 6
02:04 BenGoldberg Reading https://en.wikipedia.org/wiki/Matrix_exponential, it's really easy to see why he chose to omit it...
02:04 RabidGravy but there's the out of the box thing :)
02:05 RabidGravy anyway toodles
02:05 lichtkind BenGoldberg, matrix exponentiation is something different
02:05 lichtkind than power of an matrix
02:05 mspo does panda have a delete?
02:06 BenGoldberg Err, what's the difference between power and exponentiation?
02:08 lichtkind matrix exponential is a matrix of limits of series
02:08 lichtkind i speak about calculating with matrices like integer
02:08 lichtkind much more simler
02:08 lichtkind its analog to num math
02:09 lichtkind much more practical
02:09 lichtkind i only encountered matrix exponential in few ordinary differential tasks
02:13 jeturcotte joined #perl6
02:13 BenGoldberg Well, regardless, defining a math-like operator for a particular class is not very difficult, so long as you choose to use a "normal" operator, such as +, -, *, /, **, ^, etc.
02:13 xpen joined #perl6
02:14 jeturcotte ahoy; where can I find documentation on nqp::bindattr ?
02:14 BenGoldberg package MyMatrices { use overload '**' => 'my_method'; ... define sub my_method here ... }, and you're done.  But that's a discussion for #perl, not for #perl6.
02:19 lucs Is an identifier like $ɡfoo supposed to be allowed?
02:20 lucs (U-0261 LATIN SMALL LETTER SCRIPT G)
02:21 lucs Hmm... Seems to work with camelia (but not in my current version).
02:22 lichtkind BenGoldberg, thanks for syntax but i actually didnt wanted expand much into it :)
02:22 lichtkind jeturcotte, sorry i nevr heard of any docs about it
02:22 jeturcotte hm... seems heavily relied on in some of the core packages w/perl6, but I can't find any reference to how it works
02:23 cdg joined #perl6
02:24 lichtkind jeturcotte, maybe check chatlogs of this channel to see when jnthn is around
02:24 lichtkind he is the author
02:27 lucs (oops, it appears I has accidentally entered some kind of invisible combining character -- all is well)
02:28 BenGoldberg https://github.com/perl6/nqp/blob/​master/docs/ops.markdown#bindattr
02:32 jeturcotte oooh!
02:34 nzkindest joined #perl6
02:35 jeturcotte thank you; I think that tells me what I needed to know
02:42 zwu joined #perl6
02:46 yeahnoob joined #perl6
02:46 timotimo äh
02:46 livyathan 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!
02:56 lucs m: say <a s d f>.grep({$_ !~~ /d/});   # Okay, gives (a s f), but can it be usefully shortened?
02:56 camelia rakudo-moar a28270: OUTPUT«(a s f)␤»
02:57 lucs (but not golfbufscated)
02:58 lucs *golfbuscated
02:58 pjscott joined #perl6
02:59 sortiz joined #perl6
02:59 molaf_ joined #perl6
03:06 vendethiel joined #perl6
03:08 kid51_ joined #perl6
03:12 lucs (golbfuscated? Yeah, musnt' do that)
03:17 pjscott joined #perl6
03:23 nzkindest joined #perl6
03:24 pjscott joined #perl6
03:32 lolisa joined #perl6
03:33 Herby_ joined #perl6
03:33 Herby_ Good evening, everyone!
03:34 skids joined #perl6
03:35 Herby_ m: my @x <== 1..5; say @x;
03:35 camelia rakudo-moar a28270: OUTPUT«[1 2 3 4 5]␤»
03:35 kaare_ joined #perl6
03:35 Skarsnik Good night #perl6
03:35 Herby_ night!
03:36 Herby_ m: my @x = 1..5; @x ==> @y ==> print;
03:36 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_wK5uHrZF_␤Variable '@y' is not declared␤at /tmp/_wK5uHrZF_:1␤------> 3my @x = 1..5; @x ==> 7⏏5@y ==> print;␤»
03:36 Herby_ m: my @x = 1..5; @x ==> my @y ==> print;
03:36 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XbmGbydASH␤Preceding context expects a term, but found infix => instead␤at /tmp/XbmGbydASH:1␤------> 3my @x = 1..5; @x ==> my @y ==>7⏏5 print;␤»
03:36 Herby_ m: my @y; my @x = 1..5; @x ==> @y ==> print;
03:36 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sbcExETgwM␤Unsupported use of bare "print"; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument, or use &print to refer to the function as a noun␤at /tmp/sbcExETgwM:1␤----…»
03:37 Herby_ m: my @y; my @x = 1..5; @x ==> @y; say @y;
03:37 camelia rakudo-moar a28270: OUTPUT«[1 2 3 4 5]␤»
03:37 Herby_ m: my @y; my @x = 1..5; @x ==> @y ==> .print;
03:37 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BgUf46AnfK␤Sorry, do not know how to handle this case of a feed operator yet.␤at /tmp/BgUf46AnfK:1␤------> 3y @y; my @x = 1..5; @x ==> @y ==> .print7⏏5;␤»
03:37 Herby_ not sure who maintains this: https://en.wikibooks.org/wiki/Perl_​6_Programming/Lazy_Lists_and_Feeds
03:37 pecastro joined #perl6
03:37 lnrdo joined #perl6
03:37 Herby_ but the example with @x ==> @y ==> print doesn't seem to work currently
03:38 Herby_ unless I'm fudging something up
03:38 Herby_ m: my @y; my @x = 1..5; @x ==> @y ==> &print;
03:38 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GCvIZEisqU␤Sorry, do not know how to handle this case of a feed operator yet.␤at /tmp/GCvIZEisqU:1␤------> 3y @y; my @x = 1..5; @x ==> @y ==> &print7⏏5;␤»
03:39 Herby_ m: my @x = 1..5; my @y; @x ==> map {$_ * 2} ==> @y; say @y;
03:39 camelia rakudo-moar a28270: OUTPUT«[2 4 6 8 10]␤»
03:41 Herby_ m: my @x = 1..5; my @y; @x ==> map {$_ * 2} ==> @y; @x ==>> @y ==> @z; say @z;
03:41 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bNa57y4EA9␤Only identical operators may be list associative; since '==>>' and '==>' differ, they are non-associative and you need to clarify with parentheses␤at /tmp/bNa57y4EA9:1␤------> 3; @x ==> map {$…»
03:42 Herby_ m: my @x = 1..5; my @y; my @z; @x ==> map {$_ * 2} ==> @y; @x ==>> @y ==> @z; say @z;
03:42 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sEZewlXl7r␤Only identical operators may be list associative; since '==>>' and '==>' differ, they are non-associative and you need to clarify with parentheses␤at /tmp/sEZewlXl7r:1␤------> 3; @x ==> map {$…»
03:43 Herby_ m: my @x = 1..5; my @y; my @z; @x ==> map {$_ * 2} ==> @y; @x ==>> @y; say @y;
03:43 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZZGkyPxdAi␤==>> feed operator not yet implemented. Sorry. ␤at /tmp/ZZGkyPxdAi:1␤------> 3; @x ==> map {$_ * 2} ==> @y; @x ==>> @y7⏏5; say @y;␤»
03:44 Herby_ m: my $x = gather { take 5; } say $x;
03:44 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HBxQHFKJ9o␤Strange text after block (missing semicolon or comma?)␤at /tmp/HBxQHFKJ9o:1␤------> 3my $x = gather { take 5; }7⏏5 say $x;␤    expecting any of:␤        infix␤        infix stopper…»
03:44 Herby_ m: my $x = gather { take 5; }; say $x;
03:44 camelia rakudo-moar a28270: OUTPUT«(5)␤»
03:45 Herby_ m: my @x = gather for 1..5 { take $_ * 2; }; say @x;
03:45 camelia rakudo-moar a28270: OUTPUT«[2 4 6 8 10]␤»
03:46 glucosade joined #perl6
03:49 Herby_ m: my @a = 1, 2; my @b = 2, 3; my @c = @a X+ @b; say @c;
03:49 camelia rakudo-moar a28270: OUTPUT«[3 4 4 5]␤»
03:49 Herby_ m: my @a = 1, 2; my @b = 2, 3; my @c = @a X* @b; say @c;
03:49 camelia rakudo-moar a28270: OUTPUT«[2 3 4 6]␤»
03:49 Herby_ m: my @a = 1, 2, 3; my @b = 2, 3; my @c = @a X* @b; say @c;
03:49 camelia rakudo-moar a28270: OUTPUT«[2 3 4 6 6 9]␤»
03:51 Herby_ m: my $options = 1 | 2 | 3 | 4; if $options == 2 { say "its equal to 2"; };
03:51 camelia rakudo-moar a28270: OUTPUT«its equal to 2␤»
03:51 Herby_ m: my $options = 1 | 2 | 3 | 4; if $options == 6 { say "its equal to 2"; };
03:52 camelia rakudo-moar a28270: ( no output )
03:52 Herby_ well thats pretty handy
03:58 Herby_ dumb question here... but can perl 6 be used as a functional programming language?
03:58 Herby_ I've just started reading into functional programming and am trying to get a better grasp on it
03:59 noganex joined #perl6
04:01 Juerd Perl6 implements some ideas from functional programming but it's not purely a functional programming language. There are mutable variables and side-effects that you'd need to avoid if you want to keep everything functional...
04:02 Herby_ thanks, that makes sense
04:03 Juerd m: @fib = 1, 1, *+* ... Inf; @fib[4] = 42; say @fib[^10];
04:03 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DKrWlfjeul␤Variable '@fib' is not declared␤at /tmp/DKrWlfjeul:1␤------> 3<BOL>7⏏5@fib = 1, 1, *+* ... Inf; @fib[4] = 42; ␤»
04:03 Juerd m: my @fib = 1, 1, *+* ... Inf; @fib[4] = 42; say @fib[^10];
04:03 camelia rakudo-moar a28270: OUTPUT«(1 1 2 3 42 8 13 21 34 55)␤»
04:05 TEttinger joined #perl6
04:05 Herby_ as a learning exercise, I'm trying to do "99 problems of Haskell" in Perl 6
04:05 Herby_ https://wiki.haskell.org/H-99:​_Ninety-Nine_Haskell_Problems
04:06 Herby_ how do I slice an array?  For instance if I had an array of @array = <james peter robert sally> and I wanted to get the second to last value
04:06 Juerd Interesting. Are you documenting your answers somewhere?
04:06 Herby_ just started about 10 minutes ago :)
04:06 Herby_ but I should try to document
04:06 Juerd say: my @a = <j p r s>; say @a[*-1];
04:06 Juerd m: my @a = <j p r s>; say @a[*-1];
04:06 camelia rakudo-moar a28270: OUTPUT«s␤»
04:07 Juerd m: my @a = <j p r s>; say @a[*-2];
04:07 camelia rakudo-moar a28270: OUTPUT«r␤»
04:07 Juerd etc.
04:07 Herby_ is there a simple explanation of the * operator?
04:07 Juerd Which one? ;)
04:07 Herby_ lol
04:07 Herby_ @a[*-2]
04:08 Herby_ I see the * operator used a lot but I'm not really grasping when/why to use it
04:08 Juerd That's the whatever operator. I'm looking for a doc link for you
04:08 Juerd http://doc.perl6.org/type/Whatever
04:08 Juerd Basically, * + 2 is turned into { $_ + 2 }
04:09 Herby_ ok. how is that working with your   @a[*-2] example?
04:09 Juerd m: my $square = * * *; say $square(4);
04:09 camelia rakudo-moar a28270: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/ozsJ1SN3wN line 1␤␤»
04:10 Juerd m: my $times = * * *; say $times(4, 3);
04:10 camelia rakudo-moar a28270: OUTPUT«12␤»
04:10 Juerd Forgot that each * is its own argument :)
04:10 Juerd Herby_: The [ ] operator, when given a WhateverCode, calls that code with the number of elements in the array as its argument.
04:10 Herby_ m: my $squares = * ** *; say $squares(2,3);
04:10 camelia rakudo-moar a28270: OUTPUT«8␤»
04:11 Herby_ ah ok
04:12 Herby_ m: my @array = <james robert sally jesse raphael>; say @array[*-1];
04:12 camelia rakudo-moar a28270: OUTPUT«raphael␤»
04:12 Herby_ m: my @array = <james robert sally jesse raphael>; say @array[-1];
04:12 camelia rakudo-moar a28270: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_BDSq1k_7j␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/_BDSq1k_7j:1␤------> 3ert sally jesse raphael>; say @array[-1]7⏏5;␤»
04:12 Juerd m: my $year = 2016; .say for sort map *.value.tail, classify *.month, grep *.day-of-week == 5, Date.new("$year-01-01") .. Date.new("$year-12-31");
04:12 camelia rakudo-moar a28270: OUTPUT«(2016-01-29)␤(2016-02-26)␤(2016-03​-25)␤(2016-04-29)␤(2016-05-27)␤(2016-06-2​4)␤(2016-07-29)␤(2016-08-26)␤(2016-09-30)​␤(2016-10-28)␤(2016-11-25)␤(2016-12-30)␤»
04:12 Herby_ that makes sense
04:12 Juerd Those are the last fridays of each month of 2016
04:12 Herby_ that is pretty slick
04:12 Juerd Note how for example *.value.tail could also have been written as { *.value.tail }
04:13 Juerd NO. I should really go to bed.
04:13 Juerd Note how for example *.value.tail could also have been written as { $^month.value.tail }
04:14 Herby_ what is the $^month doing for you? specifically the '^'
04:14 Juerd $^foo is an implicitly declared argument
04:14 Herby_ hmm ok
04:14 Juerd They're sorted, so $^ape comes before $^beer, even if you have $^beer earlier in your code.
04:15 Juerd m: my $sub = -> $foo, $bar { say "$foo/$bar" }; say $sub(42, 23);
04:15 camelia rakudo-moar a28270: OUTPUT«42/23␤True␤»
04:15 Juerd m: my $sub = { say "$^foo/$^bar" }; say $sub(42, 23);
04:15 camelia rakudo-moar a28270: OUTPUT«23/42␤True␤»
04:16 Herby_ that hurts my brain
04:16 Herby_ let me take a look
04:16 Juerd m: my $sub = (* ~ "/" ~ *).say; say $sub(42, 23);
04:16 camelia rakudo-moar a28270: OUTPUT«42/23␤True␤»
04:16 Juerd I'm off to bed. Can't think straight and probably shouldn't try explaining things right now :)
04:17 Herby_ hah well thanks for the help, have a good night!
04:19 Herby_ m: my @array = <1 2 3 4 5>; say @array.last;
04:19 camelia rakudo-moar a28270: OUTPUT«Method 'last' not found for invocant of class 'Array'␤  in block <unit> at /tmp/opnFGRlojB line 1␤␤»
04:19 Juerd Try .tail
04:19 Herby_ m: my @array = <1 2 3 4 5>; say @array[*-1]
04:19 camelia rakudo-moar a28270: OUTPUT«5␤»
04:19 Herby_ m: my @array = <1 2 3 4 5>; say @array.tail
04:19 camelia rakudo-moar a28270: OUTPUT«(5)␤»
04:19 Herby_ m: my @array = <1 2 3 4 5>; say @array.tail; say @array;
04:19 camelia rakudo-moar a28270: OUTPUT«(5)␤[1 2 3 4 5]␤»
04:19 Herby_ :)
04:20 Juerd Also, try to use more creative values, so you know that what you're getting is actually your value, not the index or something
04:20 Herby_ lol good point
04:20 Herby_ maybe I should go to bed too
04:20 Herby_ and I'll try documenting my fledgling attempt at "99 problems of Haskell/Perl 6"
04:21 Juerd Good night :)
04:21 Herby_ night!
04:22 ugexe m: my &tap = -> $s { $s.say }; my $s = Supplier.new; $s.?blah.Supply.act(&tap); # bug?
04:22 camelia rakudo-moar a28270: OUTPUT«(Any)␤»
04:27 pjscott joined #perl6
04:27 Herby_ m: my @list = <james sally jesse raphael>; say @list.tail;
04:27 camelia rakudo-moar a28270: OUTPUT«(raphael)␤»
04:28 Herby_ m: my @list = <james sally jesse raphael>; say @list[*-1];
04:28 camelia rakudo-moar a28270: OUTPUT«raphael␤»
04:36 Herby_ m: my @a = <1 2 3>; my @b = <1 2 3>; if @a eq @b { say "they are equal" };
04:36 camelia rakudo-moar a28270: OUTPUT«they are equal␤»
04:37 Herby_ m: my @a = <1 2 3>; my @b = <3 2 1>; if @a eq @b { say "they are equal" };
04:37 camelia rakudo-moar a28270: ( no output )
04:37 Herby_ m: my @a = <1 2 3 2 1>; if @a eq @a.reverse { say "the list is a palindrome" };
04:37 camelia rakudo-moar a28270: OUTPUT«the list is a palindrome␤»
04:37 Herby_ m: my @a = <1 2 3 2 1>; if @a == @a.reverse { say "the list is a palindrome" };
04:37 camelia rakudo-moar a28270: OUTPUT«the list is a palindrome␤»
04:38 Juerd m: my @a = <1 2 3 2 1>; my @b = <x x x x x>; if @a == @b { say "the lists have the same number of elements" }
04:38 camelia rakudo-moar a28270: OUTPUT«the lists have the same number of elements␤»
04:38 Juerd !
04:38 Herby_ doh
04:39 Herby_ I'm sure that would have bit me at some point in time, thanks for pointing it out
04:39 Juerd Do positive *and* negative tests :)
04:40 Herby_ m: my @a = <x x x x x>; if @a eq @a.reverse { say "the list is a palindrome" };
04:40 camelia rakudo-moar a28270: OUTPUT«the list is a palindrome␤»
04:40 Herby_ lol
04:40 Herby_ i seriously need to go to bed
04:40 Herby_ m: my @a = <x x x y y>; if @a eq @a.reverse { say "the list is a palindrome" };
04:40 camelia rakudo-moar a28270: ( no output )
04:41 Juerd eqv
04:41 Herby_ but I shall press on, for science
04:44 Herby_ m: my @list = (1, 2, 3, (4,5), 6); say @list.flatten;
04:44 camelia rakudo-moar a28270: OUTPUT«Method 'flatten' not found for invocant of class 'Array'␤  in block <unit> at /tmp/wemZZmAXUy line 1␤␤»
04:44 Herby_ m: my @list = (1, 2, 3, (4,5), 6); say @list.flat;
04:44 camelia rakudo-moar a28270: OUTPUT«(1 2 3 (4 5) 6)␤»
04:45 sortiz Herby: Try @a.List.flat
04:45 Herby_ m: my @list = (1, 2, 3, (4,5), 6); say @list.List.flat;
04:45 camelia rakudo-moar a28270: OUTPUT«(1 2 3 4 5 6)␤»
04:45 skids m: my @list := (1, 2, 3, (4,5), 6); say @list.flat
04:45 camelia rakudo-moar a28270: OUTPUT«(1 2 3 4 5 6)␤»
04:45 Herby_ works like a charm, thanks
04:46 Herby_ why is that .List needed?
04:47 skids Arrays itemize their elements automatically.
04:47 skids As if they all had $ in front.
04:47 Herby_ ok
04:48 Herby_ On Problem 8 of "99 problems of haskell" and this one is tripping me up
04:49 Herby_ eliminate consecutive duplicates of a list of elements, with the order unchanged
04:49 Herby_ so <a a b c c a d> should output <a b c a d>
04:49 sortiz And using := you are "binding" the List, avoiding the Array.
04:50 Juerd Herby_: .squish
04:51 skids m: (1,1,2,2,1,1,3).squish.say;
04:51 camelia rakudo-moar a28270: OUTPUT«(1 2 1 3)␤»
04:51 Herby_ m: my @list = <a a b c c a d>; say @list.squish;
04:51 camelia rakudo-moar a28270: OUTPUT«(a b c a d)␤»
04:51 Herby_ thats built in? nice
04:53 pjscott joined #perl6
04:57 ugexe is there a phaser that fires inside a loop on LAST but also if the loop is left via a return?
05:00 skids m: sub a ($leaveat) { for (0..4) { return if $leaveat; LEAVE { "left".say } } }; a(2); a(5);
05:00 camelia rakudo-moar a28270: OUTPUT«left␤left␤»
05:00 skids oh nm.
05:19 Quom__ m: my @list = <a a b c c a d>; my $last; @list = eager gather for @list { take $last = $_ unless $last === $_ }; say @list
05:19 camelia rakudo-moar a28270: OUTPUT«[a b c a d]␤»
05:20 Quom__ m: my @list = <a a b c c a d>; my $last; @list.=map:{ $last = $_ unless $last === $_ }; say @list
05:20 camelia rakudo-moar a28270: OUTPUT«[a b c a d]␤»
05:22 pjscott joined #perl6
05:26 lnrdo joined #perl6
05:35 Cabanossi joined #perl6
05:40 pjscott joined #perl6
05:49 tonginbox joined #perl6
05:54 pjscott joined #perl6
05:57 Ch0c0late joined #perl6
06:09 havenwood joined #perl6
06:19 anaeem1_ joined #perl6
06:24 pjscott joined #perl6
06:28 darutoko joined #perl6
06:30 yurivish joined #perl6
06:30 pjscott joined #perl6
06:33 pjscott joined #perl6
06:35 nzkindest joined #perl6
06:36 pjscott joined #perl6
06:40 pjscott joined #perl6
06:41 Penguiniator joined #perl6
06:43 pjscott joined #perl6
06:49 pjscott joined #perl6
06:52 schnuppi joined #perl6
06:59 linuxuser9000 joined #perl6
07:04 Tonik joined #perl6
07:05 _nadim joined #perl6
07:06 pjscott joined #perl6
07:14 lnrdo joined #perl6
07:29 domidumont joined #perl6
07:32 anaeem1_ joined #perl6
07:35 domidumont joined #perl6
07:46 CIAvash joined #perl6
08:19 joydo joined #perl6
08:31 firstdayonthejob joined #perl6
08:40 gfldex m: dd so any((Nil, (Nil, Nil)))
08:40 camelia rakudo-moar a28270: OUTPUT«Bool::True␤»
08:58 rindolf joined #perl6
08:59 xpen joined #perl6
09:03 lnrdo joined #perl6
09:09 moritz m: say so (Nil, Nil)
09:09 camelia rakudo-moar a28270: OUTPUT«True␤»
09:12 wamba joined #perl6
09:15 vendethiel joined #perl6
09:21 rindolf joined #perl6
09:25 wollmers joined #perl6
09:26 woolfy joined #perl6
09:27 schnuppi joined #perl6
09:27 woolfy left #perl6
09:29 wollmers hello rakudistas
09:29 moritz \o wollmers
09:29 nine Good morning!
09:30 wollmers moritz: What's the current policy regarding changes of spec-tests and/or specs?
09:30 nine wollmers: from the backlog: we still have to establish good practices with regard to fixing spectests. On the one hand the 6.c tests are frozen, on the other hand straight forward bugs in there may be negotiable.
09:30 moritz wollmers: it's not really ironed out
09:30 moritz wollmers: is there a particular change you have in mind?
09:30 aindilis joined #perl6
09:31 moritz adding tests for stuff that already works and that isn't controversial or experimental should be fine, for example
09:31 nine wollmers: 6.d spec tests are there for the changing, but we haven't decided yet how to implement the distinction :) docs/language_versions.md is a proposal that's in discussion
09:32 wollmers moritz: there is a minor/cosmetic with sprintf and the binary format. IMHO the spec-test are wrong.
09:32 moritz wollmers: does rakudo implement the wrong tests?
09:33 wollmers P6: my uint64 $z = +^0;say sprintf("%064b",$z);
09:33 moritz m: my uint64 $z = +^0;say sprintf("%064b",$z);
09:33 camelia rakudo-moar a28270: OUTPUT«000000000000000000000000000000​00000000000000000000000000000000-1␤»
09:33 moritz eeks
09:34 moritz if that's what the test expects, feel free to fix it :-)
09:34 wollmers moritz: try it with uint8. Or try the same in Perl5 (which does it IMHO correct).
09:36 wollmers As a pull request? Or directly with an inactivated test?
09:37 moritz wollmers: the latter
09:39 stmuk__ .tell zoffix the perl6.org home page link to http://stevemynott.blogspot.com/2016/01​/fosdem-2016-perl-dev-room-lineup.html wrongly points to  http://stevemynott.blogspot.com/feeds​/1832060940683956756/comments/default .. AFAIK it's not my problem with the feed :) but if it is bounce to back to me
09:39 yoleaux stmuk__: I'll pass your message to zoffix.
09:39 moritz stmuk__: why not simply fix it yourself?
09:40 moritz stmuk__: it's in a public repo to which you should have push access
09:41 lnrdo joined #perl6
09:43 schnuppi joined #perl6
09:43 spider-mario joined #perl6
09:45 stmuk__ I'm not really a client side dev
09:45 moritz stmuk__: this is just changing an URL in a text file
09:45 moritz stmuk__: get over your self-categorization
09:46 stmuk__ is it? I'd have assumed it was an ajax call
09:46 moritz find the location with 'git grep http://stevemynott'
09:46 moritz edit the file, fix it, commit, push
09:46 bartolin_ by the way, there is also RT #123979 for problems with %064b in sprintf
09:47 stmuk__ I think it's more likely to be  misparsing the pl6anet.org/atom.rss feed
09:47 moritz stmuk__: oh wait, is this in the feed box? sorry, I thought it was hard-coded
09:47 moritz stmuk__: that might be non-trivial, sorry
09:47 stmuk__ yeah that's my guess too .. I'll look anyway
09:48 Actualeyes joined #perl6
09:48 stmuk__ it's probably out by one in some data structure parsing in javascript in some nasty way
09:50 moritz it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html"
09:50 stmuk__ actually it looks like CSS :/
09:52 * moritz waits for XLST
09:53 * stmuk__ does Awful Hack (tm) with source feed
09:55 stmuk__ hmmm something seems to be cached
09:57 dalek doc: 659c832 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Cool.pod:
09:57 dalek doc: Typo (while → whole)
09:57 dalek doc: review: https://github.com/perl6/doc/commit/659c83296a
09:57 AlexDaniel joined #perl6
09:59 wollmers How can I call a method of a class fully qualified, i.e. like Perl5 A::B->foo()
10:02 nine wollmers: just the same AFAIK, but what are you actually trying to do?
10:03 stmuk__ .tell zoffix I hacked the feed to fix it .. root issue is < moritz> it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html"
10:03 yoleaux stmuk__: I'll pass your message to zoffix.
10:03 wollmers If I have two packages with the same method names, and I won't instantiate an object.
10:03 stmuk__ moritz++
10:03 vendethiel joined #perl6
10:04 nine That's really just A::B.foo()
10:05 wollmers nine: thx, will try. Missing examples for call variants in docs.
10:06 frankjh joined #perl6
10:08 AlexDaniel m: say <a s d f>.grep({$_ !~~ /d/});
10:08 camelia rakudo-moar a28270: OUTPUT«(a s f)␤»
10:08 stmuk__ oh the atom.rss parsing is in perl
10:08 stmuk__ :D
10:08 glucosade joined #perl6
10:09 AlexDaniel m: say <a s d f>.grep: {!/d/}
10:09 camelia rakudo-moar a28270: OUTPUT«(a s f)␤»
10:09 AlexDaniel lucs: ↑ ?
10:10 moritz m: say <a s d f>.grep: none('d')
10:10 camelia rakudo-moar a28270: OUTPUT«(a s f)␤»
10:10 AlexDaniel nice
10:13 AlexDaniel m: say <a s d f>.grep: ‘d’ # too bad you cannot invert this easily
10:13 camelia rakudo-moar a28270: OUTPUT«(d)␤»
10:15 lizmat AlexDaniel: invert?  not sure what you mean?
10:15 AlexDaniel lizmat: so that it finds a s f instead of d
10:16 AlexDaniel m: say <a s d f>.grep: * !~~ ‘d’
10:16 camelia rakudo-moar a28270: OUTPUT«(a s f)␤»
10:16 AlexDaniel well perhaps this is easy enough
10:19 lizmat AlexDaniel: I have been thinking about a .filter counterpart, like .split and .comb are counterparts
10:22 masak good antenoon, #perl6
10:22 travis-ci joined #perl6
10:22 travis-ci Doc build passed. Aleks-Daniel Jakimenko-Aleksejev 'Typo (while → whole)'
10:22 travis-ci https://travis-ci.org/perl6/doc/builds/101384069 https://github.com/perl6/doc/com​pare/d19f3b7cbcd0...659c83296a94
10:22 travis-ci left #perl6
10:33 lnrdo joined #perl6
10:33 nine Is there a way to replace a class' method in a lexical scope? With augment I seem to only be able to add methods.
10:34 lizmat nine: subclass in a scope with that method ?
10:34 lizmat or mixin a role with but ?
10:35 nine When it's a static method?
10:35 nine (in Rakudo::Internals)
10:35 lizmat m: my $a = 42 but role { method gist { "The Answer" } }; say $a
10:35 camelia rakudo-moar a28270: OUTPUT«The Answer␤»
10:36 lizmat m: my $a = 42 but role { method gist { "The Answer" } }; say +$a
10:36 camelia rakudo-moar a28270: OUTPUT«The Answer␤»
10:36 lizmat hmmm...
10:36 lizmat m: my $a = 42 but role { method gist { "The Answer" } }; say $a.Str
10:36 camelia rakudo-moar a28270: OUTPUT«42␤»
10:37 dalek perl6.org: 061cbe2 | (Steve Mynott)++ | fetch-recent-blog-posts.pl:
10:37 dalek perl6.org: selector now pulls first 'text/html' link to fix wrong link with a blogger.com site
10:37 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/061cbe2265
10:38 lizmat stmuk__++
10:39 nine stmuk__: is the ".broked" in line 14 really deliberate?
10:43 nine m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { multi sub foo("foo") { say "inner"; }; sub bar() { foo("foo") }; { bar; } }
10:43 camelia rakudo-moar a28270: OUTPUT«outer␤»
10:43 nine lizmat: ^^^ this is the actual problem I'd like to solve. Overwriting the multi sub in the inner lexical scope doesn't seem to work
10:43 nine That means that I cannot replace multi sub INITIALIZE_DYNAMIC('$*ARGFILES') in the CORE.d setting
10:44 lizmat I see
10:44 lizmat maybe directly modify using the MOP ?
10:44 moritz m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { multi sub foo("foo") { say "inner"; }; sub bar() { say "inner bar";  foo("foo") }; { bar; } }
10:44 camelia rakudo-moar a28270: OUTPUT«inner bar␤outer␤»
10:45 lizmat hmmm... but that wouldn't be lexical  :-(
10:45 moritz m: multi sub foo("foo") { say "outer" }; sub bar() { foo("foo"); }; { only sub foo("foo") { say "inner"; }; sub bar() { say "inner bar";  foo("foo") }; { bar; } }
10:45 camelia rakudo-moar a28270: OUTPUT«inner bar␤inner␤»
10:45 [Tux] csv-ip5xs            50000    18.233    18.113
10:46 [Tux] test                 50000    23.223    23.104
10:46 [Tux] test-t               50000    12.669    12.550
10:46 [Tux] csv-parser           50000    50.363    50.244
10:46 lizmat moritz: afraid it will have to be a multi
10:46 nine Yep. Otherwise we kill all other dynamic variables
10:46 xpen joined #perl6
10:47 lizmat well, perhaps we will have to abandon the INITIALIZE_DYNAMIC mechanism then
10:47 lizmat it was an easy and elegant hack at the time, but it was that
10:47 nine m: multi sub foo("foo", Version) { say "outer" }; sub bar() { foo("foo", Version); }; { multi sub foo("foo", v6.d) { say "inner"; }; sub bar() { foo("foo", v6.d) }; { bar; } }
10:48 camelia rakudo-moar a28270: OUTPUT«inner␤»
10:48 nine Maybe use the Perl version as a tie breaker?
10:48 stmuk__ nine: errrm
10:48 xpen_ joined #perl6
10:49 lizmat nah, maybe we just need a Rakudo::Internals.REGISTER-DYNAMIC('$*ARGFILES', { ....  } )
10:49 lizmat and have DYNAMIC look in there
10:49 dalek perl6.org: 3929453 | (Steve Mynott)++ | fetch-recent-blog-posts.pl:
10:49 dalek perl6.org: remove debugging url nine++
10:49 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/3929453b04
10:49 nine lizmat: that was my second idea. But then we'd have to replace REGISTER-DYNAMIC in the 6.d setting, hence my question on how to do that lexically :)
10:51 lizmat mmm.. REGISTER-DYNAMIC could take the current $*PERL as an additional key
10:52 lizmat and the associated LOOKUP-DYNAMIC could use the current $*PERL also as a key ?
10:52 lizmat if not found with $*PERL key, then try without ?
10:52 lizmat I think I could make that work
10:52 lizmat unless you want to do it, nine
10:53 xpen joined #perl6
10:53 dalek rakudo/nom: f0cddab | lizmat++ | src/core/ (5 files):
10:54 dalek rakudo/nom: Move MAKE-ABSOLUTE-PATH to Rakudo::Internals
10:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0cddab30a
10:54 nine lizmat: I really don't want to let myself be dragged into another coding day. I haven't been to the airfield in two months, so I'll gladly let you take this one :)
10:55 AlexDaniel lizmat: perhaps it would make sense to have filter
10:55 nine I'll push my current changes
10:55 lizmat nine: will do, you deserve some flying time!
10:55 AlexDaniel lizmat: but I believe that there are other more important things to focus on… :)
10:55 lizmat AlexDaniel: wouldn't want to do this until we have a working 6.d dev model anyway :-)
10:56 nine no dalek?
10:56 nine anyway, pushed
10:58 dalek rakudo/language_versions: d43a998 | (Stefan Seifert)++ | / (5 files):
10:58 dalek rakudo/language_versions: First attempt at adding a CORE.d setting
10:58 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/d43a9989f3
10:58 dalek rakudo/language_versions: cba6766 | (Stefan Seifert)++ | / (8 files):
10:58 dalek rakudo/language_versions: Bring back IO::CatPath and IO::CatHandle in 6.d
10:58 dalek rakudo/language_versions:
10:58 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;'
10:58 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;'
10:58 dalek rakudo/language_versions: Could not find symbol '&ArgFiles'
10:58 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/cba67662a8
10:58 lucasb joined #perl6
11:00 xpen joined #perl6
11:00 xpen joined #perl6
11:01 lizmat nine: it's correct that you didn't touch the JVM makefile ?
11:04 pjscott joined #perl6
11:12 nine lizmat: yes, that's still TODO
11:12 lizmat okidok
11:13 Juerd Is .flat on an Array effectively a no-op?
11:13 moritz Juerd: I don't think so
11:14 moritz m: my @a = [(1, 2), (3, 4)]; say @a.perl; say @a.flat.perl
11:14 camelia rakudo-moar f0cdda: OUTPUT«[(1, 2), (3, 4)]␤($(1, 2), $(3, 4)).Seq␤»
11:14 moritz huh, why does that itemize the sublists?
11:14 moritz that looks vaguely buggy to me
11:14 dalek rakudo/nom: 807bf71 | lizmat++ | src/core/ (4 files):
11:14 dalek rakudo/nom: Move MAKE-BASENAME to Rakudo::Internals
11:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/807bf71534
11:14 Juerd 05:47 < skids> Arrays itemize their elements automatically.
11:14 Juerd 05:47 < skids> As if they all had $ in front.
11:14 Juerd That's why I was asking...
11:15 moritz ah, right
11:15 moritz m: my @a; @a[0] := (1, 2); @a[1] := (3, 4); say @a.perl; say @a.flat.perl
11:15 camelia rakudo-moar f0cdda: OUTPUT«[(1, 2), (3, 4)]␤((1, 2), (3, 4)).Seq␤»
11:15 Juerd But given this, I don't see much value in allowing .flat on them. It's just confusing if it returns practically the same, unflattened, thing...
11:16 AlexDaniel Juerd: https://rt.perl.org/Public/​Bug/Display.html?id=127121
11:17 * AlexDaniel is a bot that does efficient lookups on rt :)
11:17 Juerd It could warn that you want @array.List.flat, or it could just delegate to that because it's the only sensible thing to do anyway... Or there might be some surprising use for @array.flat after all :)
11:19 nine m: my @a = 1, (2, 3), 4; dd @a.List.flat
11:19 camelia rakudo-moar f0cdda: OUTPUT«(1, 2, 3, 4).Seq␤»
11:19 AlexDaniel yeah, I'd appreciate if it dwimmed
11:20 nine Juerd: is $a.flat useless?
11:20 lizmat m: use nqp; say nqp::getcomp('perl6').language_version  # nine, does that give the right answer when in 6.d setting ?
11:20 camelia rakudo-moar f0cdda: OUTPUT«6.c␤»
11:20 nine lizmat: not yet
11:20 lizmat ok
11:20 nine I really hacked it only far enough to demonstrate a nested 6.d setting
11:20 lizmat I'll make the version parameter obligatory then
11:21 Juerd nine: I see what you did there. You reworded my question, basically saying "what do you think?"... But sorry, I have no idea if it's useful :)
11:21 nine We can easily pass v6.d or even "6.d" or just "d" from the .d setting
11:21 _nadim joined #perl6
11:21 lizmat yeah, but more importantly, we need that to work for automatic selection of the right dynamic
11:22 nine Juerd: point is: $a could be anything. Could be an Array or a List or something else.
11:22 _nadim joined #perl6
11:22 lizmat nine: also, I guess we won't be able to have base values of dynamic variables live in PROCESS::
11:22 RabidGravy joined #perl6
11:23 lizmat nine: they would need to live higher, as PROCESS:: will be the same between settings, I suppose
11:23 Juerd nine: That's not a point. What's your actual point?
11:26 nine Juerd: Array.flat has to be there, so the user doesn't have to care what kind of iterable she got. And Arrays are speced as itemizing their contents, so it may not just go ahead and pretend that they arent.
11:28 nine lizmat: we will stumble upon lots of questions like that in the coming weeks :) But yes, it seems like we're gonna need some kind of lexical scoping for those dynamic variables... Could also be that it's gonna be some case by case decisions.
11:28 Juerd nine: But that does mean that there's a case where .flat is unlikely to dwim, or do anything useful really.
11:28 Juerd nine: It could provide a helpful warning, or just do the intended thing.
11:28 lizmat nine: testing $*ARGFILES living in SETTING now
11:29 lizmat that's the only one for now that would need this for sure, I guess
11:29 Juerd Especially if this is unintended fallout from design decisions, special casing it would be fine imho
11:29 nine Juerd: just because you would like .flat to flatten your array's items, doesn't mean that's the only use case. In other cases, users may actually want to flatten Lists but keep itemized values intact. If we ignored the itemization, that'd be quite impossible to do.
11:30 Juerd nine: What's the use case for .flat on an array, then?
11:30 nine lizmat: $*PERL will need to be different, too :) You really want $*PERL.version to give you 6.d in 6.d code :)
11:30 lizmat nine: yeah, but that's dependent on the nqp code I just posted anyway
11:31 Juerd We've already had several people running into this violation of the least surprise thing, some immediately considering it a bug.
11:31 nine Or....actually it's gonna be more complicated than that. The 6.c setting will have to know that, too. Because there will be some cases where the nested setting trick will just not be enough.
11:31 timotimo does that mean we'll get a $*COMPILER.supported-versions list/set/something?
11:31 lizmat nine: so making that work, will automagically fix $*PERL.version as well
11:32 nine In any case I'm gonna leave this highly interesting discussion and be afk for a couple of hours :) Bye.
11:32 lizmat nine++   # merry flying
11:32 user74747 joined #perl6
11:32 lizmat m: dd (1,(2,3),4).flat, [1,(2,3),4].flat   # seems inconsistent to me
11:32 camelia rakudo-moar 807bf7: OUTPUT«(1, 2, 3, 4).Seq␤(1, $(2, 3), 4).Seq␤»
11:33 lizmat but TimToady will have a reason for this behaviour, I assume...
11:34 timotimo hm.
11:34 timotimo is there actually a way to suppress a "potential difficulties" message?
11:35 timotimo i thought "# OK" might do it, but it doesn't
11:35 Juerd If there isn't, I'd like to propose "no worries;" ;-)
11:35 timotimo ah
11:35 Juerd That was not an answer :)
11:35 timotimo that doesn't suppress that particular warning though
11:35 timotimo m: 01234
11:35 camelia rakudo-moar 807bf7: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6.␤    Please use 0o1234 if you mean that.␤    at /tmp/NNuiJlLiKh:1␤    ------> 012347⏏5<EOL>␤WARNINGS for /tmp/NNuiJlLiKh:␤Useless use of constant integer 1234 in si…»
11:36 Juerd Oh, worries.pm already exists? /me goes to look for what it does
11:36 timotimo worries.pm doesn't exist, but we do have that pragma
11:37 AlexDaniel .u ¯
11:37 yoleaux U+00AF MACRON [Sk] (¯)
11:37 Juerd Ah, assuming a .pm exits is probably a p5ism
11:37 timotimo yeah :)
11:37 AlexDaniel m: say ‘¯’.uniname.say
11:37 camelia rakudo-moar 807bf7: OUTPUT«MACRON␤True␤»
11:37 Juerd Where we keep loading strict.pm :(
11:37 AlexDaniel m: say ‘¯’.uniname
11:37 camelia rakudo-moar 807bf7: OUTPUT«MACRON␤»
11:37 Juerd worries is not documented
11:43 pierre-vigier joined #perl6
11:44 dalek doc: 9e44aa1 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
11:44 dalek doc: Make it clear that “⁻” is a minus and “¯” is macron
11:44 dalek doc: review: https://github.com/perl6/doc/commit/9e44aa1376
11:59 sortiz joined #perl6
12:03 stmuk__ m: http://pl6anet.org/atom.xml
12:03 camelia rakudo-moar 807bf7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NTFLzVtNzZ␤Confused␤at /tmp/NTFLzVtNzZ:1␤------> 3http:7⏏5//pl6anet.org/atom.xml␤    expecting any of:␤        colon pair␤»
12:04 stmuk__ oops
12:04 stmuk__ m:  {no worries; say 0123}
12:04 camelia rakudo-moar 807bf7: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6.␤    Please use 0o123 if you mean that.␤    at /tmp/TVxLHdQtcU:1␤    ------> 3{no worries; say 01237⏏5}␤123␤»
12:08 sortiz .tell lizmat TimToady should comment on Array::flat, the recent Day 15 advent affirms that "Simple arrays could be flattened with the .flat method"
12:08 yoleaux sortiz: I'll pass your message to lizmat.
12:09 lizmat .botsnack
12:09 yoleaux :D
12:09 yoleaux 12:08Z <sortiz> lizmat: TimToady should comment on Array::flat, the recent Day 15 advent affirms that "Simple arrays could be flattened with the .flat method"
12:09 lizmat alas, one cannot tell TimToady that he should do anything  :-)
12:09 lizmat or anybody else for that matter :-)
12:09 DrForr Grumble. I found this once before... What's a module that modifies existing grammar? I thought masak's 007 did that, but I might have been wrong.
12:10 AlexDaniel DrForr: any Slang:: module does
12:10 DrForr Slang, thanks.
12:10 DrForr Knew there was a keyword...
12:10 funrep how do i check equality of strings?
12:11 DrForr Ah, Slang::Tuxic was what I was after.
12:11 AlexDaniel funrep: 「eq」
12:11 DrForr Just *one* page down.
12:11 AlexDaniel m: say ‘one’ eq ‘one’
12:11 camelia rakudo-moar 807bf7: OUTPUT«True␤»
12:11 DrForr And incidentally Travis is now enabled for Readline.
12:11 funrep aah, tried eq(x,y) and x.eq(y) :P thanks!
12:12 CIAvash AlexDaniel: What do you think about an empty circle as whatever? 🞅
12:12 AlexDaniel m: say [eq] ‘one’, ‘one’
12:12 camelia rakudo-moar 807bf7: OUTPUT«True␤»
12:12 AlexDaniel m: say &infix:<eq>(‘one’, ‘one’)
12:12 camelia rakudo-moar 807bf7: OUTPUT«True␤»
12:14 AlexDaniel funrep: ↑ there are other ways as well :)
12:14 AlexDaniel .u 🞅
12:14 yoleaux No characters found
12:14 funrep interesting! :)
12:14 AlexDaniel m: say ‘🞅’.uniname
12:14 camelia rakudo-moar 807bf7: OUTPUT«MEDIUM BOLD WHITE CIRCLE␤»
12:15 AlexDaniel m: say ‘🞆’.uniname # so ok, perhaps bold circle is sometimes not enough
12:15 camelia rakudo-moar 807bf7: OUTPUT«BOLD WHITE CIRCLE␤»
12:16 AlexDaniel m: say ‘🞇’.uniname # so we have heavy circles. But what if that's not enough as well?
12:16 camelia rakudo-moar 807bf7: OUTPUT«HEAVY WHITE CIRCLE␤»
12:16 AlexDaniel m: say ‘🞈’.uniname # surely we need a very heavy circle!
12:16 camelia rakudo-moar 807bf7: OUTPUT«VERY HEAVY WHITE CIRCLE␤»
12:16 AlexDaniel m: say ‘🞉’.uniname # and this, just in case…
12:16 camelia rakudo-moar 807bf7: OUTPUT«EXTREMELY HEAVY WHITE CIRCLE␤»
12:18 AlexDaniel CIAvash: I don't think that it fits very well. What does the circle represent?
12:21 RabidGravy If one applies a role to an object and then add a method to the role subsequently is it possible to have the object compose the new method?
12:21 CIAvash AlexDaniel: I don't know :| I was just thinking of something empty that will be filled or replaced.
12:21 AlexDaniel CIAvash: and why exactly this circle? Why not ◌ for example
12:22 AlexDaniel CIAvash: or ◯
12:22 AlexDaniel or ✪…
12:22 CIAvash It just looked better to me :)
12:23 AlexDaniel or ⭕ or 🔾
12:24 AlexDaniel CIAvash: Don't get me wrong, it's a good suggestion. But it has to have some reasoning behind it, I think
12:24 AlexDaniel CIAvash: e.g. ✪ is a star, as in whatever “star”. But besides that there's not much to it
12:25 AlexDaniel CIAvash: ⍰ looks great, just like in “something empty that will be filled or replaced”. But besides that, again, not so much
12:25 funrep is there any method of arrays that allows you to check if it contains a particular value?
12:25 AlexDaniel CIAvash: and I'm not sure if it's a good idea to use APL chars
12:27 kid51 joined #perl6
12:27 AlexDaniel by the way, what about having ⁇ and ‼ as non-texas versions of ?? and !! ?
12:28 sortiz lizmat: The current definition of method flat in core/Array.pm seems suspicious, where are the flattening??
12:29 joydo joined #perl6
12:30 lizmat List.flat probably lives in role Iterable
12:30 RabidGravy funrep, "grep"
12:31 RabidGravy m: my @a = <a b c>;  say so @a.grep('v')
12:31 camelia rakudo-moar 807bf7: OUTPUT«False␤»
12:31 RabidGravy m: my @a = <a b c>;  say so @a.grep('b')
12:31 camelia rakudo-moar 807bf7: OUTPUT«True␤»
12:37 sortiz lizmat: Yes, but Array.flat creates its own Seq, so, @foo.List.flat works, but @foo.flat no.
12:38 lizmat sortiz: yeah, it feels wrong to me too, but I hope TimToady will shine his light on this issue soon :-)
12:40 sortiz lizmat: I hope so, this issue is one of the most asked/questioned in #perl6. Thanks.
12:49 dalek doc: de8fc13 | (Siavash Askari Nasr)++ | doc/Language/unicode_texas.pod:
12:49 dalek doc: Change L<> to C<>
12:49 dalek doc: review: https://github.com/perl6/doc/commit/de8fc13c13
12:50 timotimo so, discourse (the thing jeff atwood started) seems kinda good
12:50 lizmat CIAvash++   # good catch!
12:50 lizmat timotimo: ??
12:51 timotimo see discourse.org
12:51 timotimo just a thing i randomly noticed
12:52 dalek rakudo/nom: 4680dc8 | (Dan Kogai)++ | src/core/Complex.pm:
12:52 dalek rakudo/nom: decent infix:<**> for Complex
12:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4680dc81f2
12:52 dalek rakudo/nom: 79f77f7 | lizmat++ | src/core/Complex.pm:
12:52 dalek rakudo/nom: Merge pull request #679 from dankogai/nom
12:52 dalek rakudo/nom:
12:52 dalek rakudo/nom: decent infix:<**> for Complex
12:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79f77f784d
12:52 * sortiz Need more unicode fonts
12:55 [Tux] CSV timings for more languages: https://gist.github.com/Tux/e2d49c06efcb6a27a75b
12:56 lizmat [Tux]: do they all have the flexibility that Text::CSV provides ??
12:57 timotimo we still have to get 100x faster at least, i see.
12:57 frankjh Hi, if I have I subroutine which is supposed to operate on various types(CArray, buf, ...) like in sub remove_leading_elems($buf!, Int $num_elems_to_remove) {loop ..} and which should return something of the same type as $buf with the leading elems removed, how to I do that?  I thought of querying the type of $buf, make a new thing of that type and then loop over $buf with an offset?
12:59 [Tux] lizmat: None :)
12:59 lizmat ok, so the comparison is not entirely fair  :-)
12:59 timotimo frankjh: you can usually just call .new on the instance to get a new instance of the same type
13:00 frankjh timotimo: Wow! Thanks.
13:01 timotimo m: my Buf[int8] $foo .= new(1, 2, 3, 4); say $foo; say $foo.new(9, 9, 9, 9); say $foo
13:01 camelia rakudo-moar 807bf7: OUTPUT«Buf[int8]:0x<01 02 03 04>␤Buf[int8]:0x<09 09 09 09>␤Buf[int8]:0x<01 02 03 04>␤»
13:01 timotimo ^- you get the same type and unless the ".new" method is horribly b0rked, it won't change the original
13:01 El_Che [Tux]: 3th column is rows? what are the times? max - min ?
13:01 AlexDaniel [Tux]: more is better, right?
13:02 timotimo El_Che: i think it's run time and run time minus start-up time
13:02 chienjo joined #perl6
13:02 chienjo Anyone know a solution to 'resolve stage failed for Task::Star: Dependency DBIish is not present in the module ecosystem' when running panda install Tast::Star?
13:03 lizmat no, but it sounds the same problem as CurtisOvidPoe had yesterday, perhaps there's something to be found in the backlog
13:04 El_Che timotimo: java startup time of 0.012? nah
13:04 timotimo chienjo: huh. can you try "panda update", then try installing again?
13:05 chienjo timotimo: On it.
13:07 Skarsnik joined #perl6
13:07 frankjh If I have a module and an internal helper subroutine like sub remove_leading_elems, is there a way to write a test for that subroutine without exporting it?
13:08 timotimo you can export it under a different tag than ":DEFAULT" or something?
13:08 timotimo i don't know if that'll give users that sub if they explicitly ask for :ALL with use
13:09 timotimo otherwise, "is export(:TESTING)" could do the trick?
13:09 Skarsnik It will :)
13:09 Skarsnik I have this in a NC test
13:10 Skarsnik m: use NativeCall :TEST; guess_library_name(Str); nativesizeof(int32);
13:10 camelia rakudo-moar 807bf7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FcUkwBxB1O␤Undeclared routine:␤    nativesizeof used at line 1␤␤»
13:10 Skarsnik m: use NativeCall :ALL; guess_library_name(Str); nativesizeof(int32);
13:10 camelia rakudo-moar 807bf7: ( no output )
13:11 sena_kun joined #perl6
13:12 frankjh Uh: What is the relation between : TESTING and :TEST. Or is this a name(tag?) which I can choose freeely?
13:13 Skarsnik it's just a name
13:13 frankjh Ok thanks
13:13 timotimo other tags commonly suggested are :YOLO, :ORLY, :WAT, and - curiously - :DOOD
13:14 [Tux] El_Che, I'll make a HTML page to explain …
13:15 [Tux] first column: language, second: test script, third: field count (should be 50000),  4th: time taken (lower is better), 5th: time taken without startup time
13:15 lizmat [Tux]: maybe we should also make a P6 version of Text::CSV version with as many features as the C version?
13:16 El_Che [Tux]: I apologise. I have the the impression I have asked you a few times and I forget after a while
13:16 [Tux] lizmat, I seriously doubt if that would cause considerable speedup
13:16 [Tux] 20% max
13:16 timotimo [Tux]: do you currently use native ints in some way?
13:17 lizmat timotimo: yes
13:17 [Tux] yes, I think I do
13:17 timotimo because native ints - when used with operators and subs and such - are currently a bit pessimized
13:17 timotimo because they always allocate IntLexRef and will never inline the operators
13:17 timotimo it may seem counter-intuitive, but could you try replacing int* with Int and re-time?
13:17 pierre-vigier joined #perl6
13:18 frankjh timotimo: I feed old now. None of these acronyms had any meaning for me. ... YOLO was here in Germany "Jugendwort des Jahres 2012"
13:18 timotimo YOLO is the only acronym in that list, actually
13:18 chienjo timotimo: Many thanks. running 'Panda update' solves the issue.
13:18 timotimo the others are just allcaps because export tags usually look like that
13:18 [Tux] timotimo: the repo is on github (eco system), feel free to experiment
13:18 timotimo [Tux]: ah, sure. it'll have to wait a few hours, though
13:19 timotimo frankjh: orly is from that meme/macro with the owl, wat is from that amusing talk about oddities in the javascript language, dood is used pretty much everywhere, but i usually associate it with a Prinny
13:20 frankjh timotimo: I am aging faster---
13:20 timotimo and, fwiw, "läuft bei dir" was jugendwort des jahres 2015 or 2014 and nobody i know has ever heard that phrase before it got elected
13:22 dalek rakudo/nom: 620d893 | lizmat++ | src/core/ (13 files):
13:22 dalek rakudo/nom: Re-imagine lazy init of system dynamic vars
13:22 dalek rakudo/nom:
13:22 dalek rakudo/nom: The old system was using MMD to select the right candidate for lazy
13:22 dalek rakudo/nom: initialization of system dynamic vars such as $*CWD.  This however
13:22 dalek rakudo/nom: appeared to be incompatible with the multiple settings idea of being
13:22 dalek rakudo/nom: able to support 6.c and 6.d by switching settings.
13:22 dalek rakudo/nom:
13:22 dalek rakudo/nom: The new system uses an internal method for registering the initialization
13:22 dalek rakudo/nom: of a system dynamic var.  And the internal method for looking up system
13:22 dalek rakudo/nom: dynamic vars, now uses another initial method to do the lookup and
13:22 dalek rakudo/nom: initialization.
13:22 dalek rakudo/nom:
13:22 dalek rakudo/nom: So, this should now be ready for settings.d
13:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/620d8931c6
13:22 DrForr Aah, finally have an actual bug to report :) #127230 - Pretty trivial, found it while playing.
13:23 lizmat .tell nine  https://github.com/rakudo/rakudo/commit/620d8931c6
13:23 yoleaux lizmat: I'll pass your message to nine.
13:25 frankjh timotimo:  Thanks. I will use "is export(:TESTING)" and stop googling for youth...
13:25 lizmat cycling&
13:40 nzkindest joined #perl6
13:46 dekiss joined #perl6
13:46 cognominal joined #perl6
13:49 [Tux] El_Che, does http://tux.nl/Talks/CSV6/speed5.html help?
13:53 Skarsnik Wow that freaking slow x)
13:55 [Tux] but fast compared to when I started testing: http://tux.nl/Talks/CSV6/speed4.html
13:56 lnrdo joined #perl6
14:00 awwaiid so "provides" in meta.json -- that needs to have ALL the modules I want installed, not just the ones users reference?
14:01 sjoshi joined #perl6
14:02 Skarsnik yes, all file your modules need to work
14:02 vendethiel joined #perl6
14:02 lichtkind joined #perl6
14:04 awwaiid k
14:10 lnrdo joined #perl6
14:14 lucasb o/ suggestion of links to include in the perl6.org/community page: stackoverflow, reddit, facebook group and maybe twitter #perl6 hashtag search
14:14 El_Che [Tux]++
14:15 El_Che [Tux]: fantastisch canary in the mine
14:15 lucasb And you should probably decide what to do with the perl6-announce mailing list. the last thing that was announced there was parrot, in the last year
14:18 leont joined #perl6
14:19 frankjh Hi, if I want to refactor my module, howdo I get rid of old copies installed somewhere? I have changed the name of my module, but my tests still pass.... I did panda install . and panda install git://github uptonow.
14:19 Skarsnik I am not sure panda have a uninstall?
14:20 frankjh I saw only --force
14:20 lucasb frankjh: does removing your ~/.perl6 folder helps?
14:20 frankjh Will try.
14:21 lucasb oh, maybe theres some .precomp hidden dir somewhere. remove those too.
14:22 Ven joined #perl6
14:22 psy_ joined #perl6
14:22 lucasb maybe this won't help. those folders only have the precompiled modules. the source modules will still be in the share directory
14:23 RabidGravy is there some way I can over-ride the way that multi dispatch works in a way that is localised to a particular method or sub?
14:24 frankjh lucasb: Yes .perl6 is gone,  .precomp gone, but tests still work. Where is /share/ located?
14:25 lucasb mine is at $MOARPREFIX/share/perl6/site. but if you are using rakudobrew, it's somewhere inside ~/.rakudobrew
14:27 sjn \o
14:27 funrep so perl6intro.com recommends .pl6 extension for perl6 files, but ive seen .pm and .pm6 used as well, what is the conventional naming convention?
14:27 * sjn would love to listen in on toolchain stuff, is there a separate channel for that?
14:27 funrep oh perhaps that stands for perl module
14:27 lucasb sjn: #perl6-toolchain
14:27 El_Che sjn: coming to fosdem?
14:28 sjn El_Che: yes
14:28 El_Che \o/
14:28 sjn lucasb: thanks! ^^
14:28 sjn El_Che: I'll arrive a few days early, even
14:28 RabidGravy funrep, it's really a matter of personal taste
14:29 frankjh lucasb: Yes there are references to my code inside ~/.radukobrew, but the filenames are binary.../moar-2015.12/install/share/perl6/site/​sources/E458F666F75270A91C1D018AE9D94510E1ED5487 not quite sure howto clean this up.
14:30 lucasb frankjh: I think removing install/share/perl6/site will remove all user modules you installed, like panda, etc.
14:31 RabidGravy yeah, I m not quite sure if you simple remove those files
14:31 RabidGravy ^ what will happen if ... rather
14:32 frankjh RabidGravy: Sounds like reinstalling is the safe path?
14:33 awwaiid [Tux]: would be interesting to see how that game plays with use csv:from<Ruby> :)
14:33 [Tux] sure. Code example please :)
14:34 awwaiid you're going off of this csv-game thing, ya? https://bitbucket.org/ewanhiggs/csv-game
14:34 [Tux] as you can see in speed5.html (at the bottom)
14:35 sftf joined #perl6
14:37 Skarsnik how the c++ version is slower than the c version x)
14:38 El_Che [Tux]: startup time on java is without jvm startup?
14:39 [Tux] the clean startup is </dev/null, that time is then subtracted from the </tmp/hello.csv in column5
14:39 El_Che i see
14:40 frankjh I removed ~/.radukobrew/moar-2015.12​/install/share/perl6/site, reinstalled panda and Linenoise and my tests are now failing as expected...
14:40 [Tux] hmm, actually it is a bit different. let me see if I can cange that to what I want
14:41 lucasb frankjh++ :)
14:41 psy__ joined #perl6
14:42 psy__ joined #perl6
14:48 RabidGravy frankjh, hopefully uninstall will come along at some point as that is quite a common use-case for developers
14:49 El_Che for everyone actually
14:49 El_Che a good admin (even admin of your own workstation) don't want ununused old libs all over the place
14:50 lucs class Foo { method postcircumfix:<< >>(Str $s) { $s.uc } }; say Foo.new<"bar">; # How can I fix this, wanting 「BAR␤」?
14:52 lucs (And ideally, I'd like to make it invocable as 「⋯<bar>」)
14:53 vendethiel lucs: you can't really define operator methods
14:53 lucs Oh :/
14:53 vendethiel also, << >> is not what you think it is :)
14:54 lucs I guess not :)
14:54 lucs I just concocted what kind of appeared reasonable, hoping you folks could help me fix it.
14:54 vendethiel m: say <<hey you>>
14:54 camelia rakudo-moar 620d89: OUTPUT«(hey you)␤»
14:54 lucs Ah, right.
14:55 vendethiel kinda like <>, but with quoting etc
14:55 moritz lucs: << >> as a post-circumfix is not a separate operator, but desugars to { } as a postcircumfix
14:56 lucs Basically, what I'm after is a way to have an instance of Class Foo, $foo for example, able to invoke one of its methods taking a string argument, "bar" for example, as 「$foo<bar>」
14:58 lucs Does that make sense?
14:58 moritz m: class Foo { method AT-KEY($bar) { say "|$bar|" } }; Foo.new<blubb>
14:58 camelia rakudo-moar 620d89: OUTPUT«|blubb|␤»
14:59 lucs Hmm... Where does that AT-KEY come from (which docs to read?)
14:59 lucs (I'll grep the specs.)
14:59 moritz lucs: https://doc.perl6.org/language/subscripts
15:00 Skarsnik wow building the doc is slow x)
15:01 lucs moritz: Thanks. Strange, but 'ack AT-KEY' finds nothing in the specs (S*.pod files)
15:01 moritz lucs: there has to be *something* where doc.perl6.org is better :-)
15:01 lucs :)
15:02 awwaiid m: class Foo { method say-hi($n) { say "hi $n!" } }; multi sub postcircumfix:<{ }>(Foo $f, $arg) { $f.say-hi($arg) }; Foo.new<bob>; # also works
15:02 camelia rakudo-moar 620d89: OUTPUT«hi bob!␤»
15:03 xdoctor joined #perl6
15:05 lucs awwaiid: Nice, but I'm missing how the 「<{ }>」 somehow works when invoked as 「<⋯>」 :/
15:06 * lucs saw moritz mention something about desugaring, but doesn't quite understand what it all means.
15:06 moritz lucs: as I said, foo<..> is syntactic sugar for foo{"..."}
15:06 lucs Ah, I see, gotcha.
15:06 moritz lucs: it's a special rule built into the language
15:07 lucs Excellent :-)
15:07 lucs Wow, super neato.
15:09 DrForr Do we have doco for Slangs yet?
15:09 awwaiid yep, neato and also very useful to realize it is sugar and not otherwise-special
15:10 DrForr (he says, *just* before pulling up d.p6.org...)
15:10 moritz DrForr: I'd be surprised if we did; slangs are very much experimental, afaict
15:11 DrForr Not surprising.
15:12 DrForr The %*LANG object is rather opaque, I was just going to figure out how to use nqp::atkey() to get at the grammar actions. As I think I need that.
15:14 moritz DrForr: might be easist to look at existing slangs in the ecosystem
15:14 DrForr None of them do.
15:15 Skarsnik We can't have link in a table? (pod)
15:16 DrForr At least not that I can tell... Looking again.
15:16 moritz Skarsnik: there are various forms to write tables; I'm sure some of them support links
15:16 DrForr Oh, never mind, missed one.
15:16 DrForr Yay, hacking.
15:17 Skarsnik in the pod doc that does not exist? x)
15:17 moritz S26 does exist
15:22 Skarsnik The table section is small ~~
15:26 pierre-vigier joined #perl6
15:26 Skarsnik I try to have
15:26 Skarsnik Module name                                            Description
15:26 Skarsnik ==========================​==========================   ============================================
15:26 Skarsnik L<App::Mi6|http://modules.perl6.org/dist/App::Mi6>     Minimal authoring tool for Perl6
15:26 Skarsnik but the L<> is not interpreted
15:30 Skarsnik interesting, putting a blank line after ==== make the parsin fail x)
15:31 balazs joined #perl6
15:32 [Tux] lizmat, http://tux.nl/Talks/CSV6/speed5.html <= column 5 now shows the actual processing time
15:32 espadrine joined #perl6
15:38 pjscott joined #perl6
15:41 funrep https://gist.github.com/fu​nrep/bf18880254e4355ccae2 could someone explain why $class.puthide prints (Any) and not "foo"?
15:42 zwu joined #perl6
15:43 Skarsnik I am not sure you can affect a private in new?
15:43 funrep so i need to define my own new initializing it?
15:45 pochi funrep: try to put in a submethod BUILD(:$!hidden, :$!public) {} in your class
15:47 funrep what is the difference between submethod BUILD and method new ?
15:48 mst overriding new is generally to be avoided because you get a lot of machinery for free if you do things via BUILD
15:49 mst over in perl5 land, the existence of BUILD and BUILDARGS basically means "overriding new is an error" at this point (barring exigent circumstances, as usual for any rule of thumb)
15:50 * grondilu is not sure he knows what :$!parameter means
15:50 funrep what does ":" mean?
15:51 Skarsnik : named parameter
15:51 pochi m: my $a; say :$a
15:51 camelia rakudo-moar 620d89: OUTPUT«Unexpected named parameter 'a' passed␤  in block <unit> at /tmp/uWa5k4r8RE line 1␤␤»
15:51 pochi m: my $a; :$a
15:51 camelia rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/vALvXWibSZ:␤Useless use of ":$a" in sink context (line 1)␤»
15:51 pochi :-(
15:52 caoutchouc joined #perl6
15:52 grondilu say it
15:52 pochi m: my $b = "hello"; say (:$b).gist
15:52 camelia rakudo-moar 620d89: OUTPUT«b => hello␤»
15:52 grondilu m: my $a; say :$a
15:52 camelia rakudo-moar 620d89: OUTPUT«Unexpected named parameter 'a' passed␤  in block <unit> at /tmp/UT0vTSoqTS line 1␤␤»
15:53 grondilu m: my $a; .say for :$a
15:53 camelia rakudo-moar 620d89: OUTPUT«a => (Any)␤»
15:53 funrep what is a named parameter?
15:53 grondilu it's a parameter with a name
15:53 funrep or well, a named parameter is a named parameter, but i dont quite understand it is this context
15:53 mst funrep: perl6 signatures have both positional and named, so you can supply options by name and etc.
15:53 funrep it automagically creates named params for the has'es in the bless method?
15:54 funrep s/has'es/attributes
15:54 mst I think that something somewhat equivalent to that happens but I'm fuzzy on the details, sorry
15:54 mst (I know Moo(se) rather better than perl6 at this point, I'm afraid)
15:55 grondilu m: class A { has $.attr; }; say A.new: :attr("foo");
15:55 camelia rakudo-moar 620d89: OUTPUT«A.new(attr => "foo")␤»
15:55 grondilu m: class A { has $.attr; }; say A.new(:attr("foo")).attr;
15:55 camelia rakudo-moar 620d89: OUTPUT«foo␤»
15:55 Skarsnik m: sub foo (:$a) {say 'foo'}; foo('hello');
15:55 camelia rakudo-moar 620d89: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub foo at /tmp/cQlu1qXyy4 line 1␤  in block <unit> at /tmp/cQlu1qXyy4 line 1␤␤»
15:56 Skarsnik m: sub foo (:$a) {say 'foo'}; foo(:a('hello'));
15:56 camelia rakudo-moar 620d89: OUTPUT«foo␤»
16:00 vividsnow joined #perl6
16:00 funrep still same problem https://gist.github.com/fu​nrep/b6b67edd788a2da663fe
16:01 Skarsnik you have affect $hidden to $!hidden
16:01 pochi you're missing the !'s
16:01 Skarsnik or that
16:02 funrep now it works awesome! :)
16:02 funrep what is it that BUILD handle that new doesnt?
16:03 nine m: dd (1, (2, 3), 4).flat; dd (1, $(2, 3), 4).flat;
16:03 pochi binding of the variables I think
16:03 yoleaux 13:23Z <lizmat> nine: https://github.com/rakudo/rakudo/commit/620d8931c6
16:03 camelia rakudo-moar 620d89: OUTPUT«(1, 2, 3, 4).Seq␤(1, $(2, 3), 4).Seq␤»
16:03 El_Che funrep: everything what new doesn't handle?
16:03 mst funrep: the default new() initializes the object, then calls all BUILD submethods from superclass to tip
16:03 funrep but why cant you assign private variables in new? or did i miss something
16:04 Skarsnik because they are privte x)
16:04 nine lizmat: cooool :) So to override a dynamic, I have to let nqp::getcomp('perl6').language_version give me v6.d?
16:04 mst private variables are private to the object - to things called on the object
16:04 mst new() is a class method that -creates- an object
16:04 funrep yes but the new method is the objects own method right? so it should have access to private variables?
16:04 mst but BUILD() is called -on- the object
16:04 mst no, the new method isn't
16:04 mst it's a class method that acts as a constructor -for- objects
16:04 mst it's called on the class, not the object
16:04 llfourn funrep: new is not special in any way other than there's a default for it
16:05 mst Class->new results in $obj->BUILD being called
16:05 zwu joined #perl6
16:05 mst bah, s/->/./ ;)
16:05 funrep i still dont get why it cant access private variables though, because that's what the whole point of the constructor usually is in other languages ive programmed in
16:05 pochi old habits :-)
16:06 mst funrep: yes, because their constructor is more equivalent to BUILD
16:06 llfourn funrep: yep. Unfortunetly private perl6 attributes are not like other languages
16:06 llfourn well maybe fortunetly :P
16:06 nine .tell sortiz I doubt that Array.flat's behavior is one of the most asked questions in #perl6. I usually read _all_ of #perl6 and cannot remember it coming up all that often.
16:06 yoleaux nine: I'll pass your message to sortiz.
16:06 mst funrep: if you're trying to do the equivalent of e.g. the constructor() block in ES6 classes, or a ruby initialize method - that's BUILD
16:06 funrep i understand that, that's why im asking so i can understand how it works in perl6
16:06 funrep so what i new then?
16:06 mst funrep: other languages have their 'new' as a language feature, ours is a plain method so you *can* override it
16:07 mst funrep: but generally there's no good reason to
16:07 llfourn funrep: private = can't be set in constructor and can't be seen by .perl and don't have accessors set up by default
16:07 sammers joined #perl6
16:07 mst llfourn: isn't set by default in the constructor
16:08 llfourn mst: can't be set by bless rather :)
16:08 mst right
16:08 mst but that's not the question at hand really
16:08 mst or at least, I don't think it is :)
16:08 mst funrep: javascript's 'new' is a language feature. ES6's constructor() block in a class declaration is our BUILD
16:08 llfourn well the point is that you can't pass the value of a private attribute into new/bless and have it set and attribute :)
16:09 mst llfourn: yes, but that's not what we've been discussing for some time now
16:09 llfourn ok I thought it was but I'll lurk more then
16:09 mst llfourn: started off with what, the question now is "what's the difference between new and BUILD"
16:10 mst funrep: perl6's new will do bless(), basic attribute population for public attributes, and call BUILD submethods. it's just it didn't -have- to be a hardcoded language feature, so it isn't
16:10 mst nine: I'm not on crack with the above, right?
16:11 zwu after exploration of perl 6, I think it was very attractive as a programming language. But I doubt if it is production ready. The features list for rakodu in http://perl6.org/compilers/features shows almost completed, but actually not. Such as the module loading support, there are quite a lot NYI (not yet implemented).
16:11 nine RabidGravy: why is uninstall important for developers?
16:11 funrep i dont understand how this is "Zero-boilerplate initiazation" as the documents states
16:11 mst funrep: it would be expect you've decided to make a private attribute that isn't entirely private
16:11 mst *except
16:12 llfourn funrep: tbh I agree with you on that point. If you want to have private attributes that are set by .new args it's not zero boilerplate
16:12 funrep how is it not private? i am printing it but the one who runs the method can have no idea that it prints a private variables (unless they read the source code ofc)
16:12 mst personally, if I'm passing it into the constructor, I tend to go for a public-but-readonly attribute
16:13 mst zwu: er, rakudo is only missing the last one in module loading and I'm not even sure what that means anyway
16:13 llfourn tbh that's outdated module loading is pretty solid now
16:13 llfourn thanks to nine++
16:13 funrep so public-but-readonly is possible to specifiy and possible to initialize in the consructor?
16:13 mst I'm wondering if that table needs updating
16:14 funrep what is the syntax for them?
16:14 llfourn funrep: yep it's the default
16:14 llfourn has $.a; #public read-only
16:14 nine mst: you're right
16:14 mst nine: just wanted my working checking, ta
16:15 RabidGravy nine,  well if you have a module X::Y::Z that is used by X::Y and you change it's name then it's hard to check if you have fixed X::Y properly if you still have an old version of X::Y::Z installed :)
16:15 mst nine: and given the way CUR works, being able to install a version-in-progress and then uninstall it after so nothing else uses it
16:15 nine llfourn: if new could automatically initialize private attributes, those private attributes would be part of your class' external interface and you couldn't rename or remove them anymore without your users noticing
16:15 funrep is there any syntax for a setter or do you have to define one yourself?
16:15 funrep ie read-and-write attributes
16:16 llfourn nine: yes I agree with that point :)
16:16 pochi funrep: has $.a is rw, declares a method a that you can read/write from
16:17 llfourn nine: I thikn what I was saying that if you want to break that idea you do have to write some boilerplate
16:17 mst yes. but I'm not really sure why you would
16:17 funrep pochi: but llfourn said read only was the default?
16:17 mst funrep: yes
16:17 pochi funrep: yes, has $.x is the same as has $.x is read-only
16:17 mst funrep: hence 'is rw'
16:17 nine RabidGravy, mst: thanks
16:17 mst funrep: 'is rw' is actual perl6 syntax :)
16:18 funrep "rw" == read write?
16:18 funrep or something else?
16:18 mst funrep: exactly
16:18 funrep but what
16:18 mst funrep: 'has $.a is rw' is actual code.
16:18 funrep read only != read write
16:18 mst funrep: that'll generate an accessor
16:18 funrep i hope :P
16:18 mst funrep: 'has $.a' <- ro
16:18 mst funrep: 'has $.a is rw' <- rw
16:18 funrep aah
16:18 funrep okey
16:18 pochi funrep: I meant readonly (not read-only)
16:19 mst llfourn: I can see a use case of "I want to construct and return an object that mediates for another object and therefore keeps the other object entirely private"
16:19 funrep i read "has $.a is rw" as an actual sentence and not code ;)
16:19 Skarsnik you can put class A is rw if you want everything on rw
16:19 RabidGravy yeah, bear in mind that it's the generated accessor that is affected to "is rw", the underlying attribute is always read/write
16:20 Skarsnik $.a is a method call: $!a is the real symbol
16:20 El_Che Skarsnik: if you're start playing with BUILD, one is oncused by that at the beginning :)
16:21 mst it does seem like it'd be helpful to have a trait that lets you can an attribute an init arg but not an accessor, but eh
16:21 awwaiid I bet we could write one in userspace :)
16:21 mst almost certainly
16:21 llfourn I already have haven't released it yet :)
16:21 * mst tickles llfourn
16:21 awwaiid 'has $!foo is constructable'
16:22 llfourn I has 'is param'
16:22 llfourn had*
16:22 awwaiid is constructable-param-despite-being-private
16:22 * pochi would like to see something like that in core
16:22 llfourn but I'm thinking of changing it to something like has $!attr is public;
16:23 mst I quite like constructable actually
16:23 mst public would imply settable, I think
16:23 awwaiid I think 'is public' implies a lifetime after construction
16:23 pochi public is confusing imo
16:23 llfourn I think that we are conflating "public" with having an accessor set up by default
16:23 awwaiid exactly
16:23 awwaiid feedback is that as a casual reader of your code I'd make that conflation
16:24 llfourn so you can have a attribute without accessors set up by defaul but it is public
16:24 mst llfourn: if I saw public I'd expect an external was to set it
16:24 mst *way
16:24 moritz attributes without accessors can't be public
16:24 llfourn hmmm yeah me too I'm not sold either way
16:25 mst what we really want is a shorter synonym for constructable
16:25 llfourn moritz: well it depends on your definition of public. I think public means can be seen in .perl and can be set in constructor
16:25 mst because just 'param' while neat doesn't imply constructor param
16:25 Skarsnik is init
16:25 llfourn or I think it could mean that
16:25 mst is init feels like bad english to me, but is at least short
16:25 khw joined #perl6
16:25 geekosaur newable?
16:26 mst hang on. could we do 'is init-arg' ?
16:26 RabidGravy yes
16:26 llfourn yeah that would be consistent with moose
16:26 llfourn and we could have 'is init-arg("some-alias")'
16:26 mst <3
16:27 pochi sexy
16:27 llfourn which could be used on $.attrs as well
16:27 mst we should probably check it seems equally good to people who didn't come from Moose though
16:27 mst there will be a fair number of us, but it needs to make sense to everybody else too :)
16:27 awwaiid seems ok to me, having never seen/used that in moose
16:29 mst hrm, would 'is buildarg' or 'is build-arg' be more in keeping with perl6? unsure
16:29 llfourn is 'init-named', 'init-arg', 'new-named','build-named','bl​ess-named','named-in-init'..
16:30 mst I'm still drawn to init-arg, but that could be pre-existing bias
16:31 llfourn I think arg makes sense because arg vs param, means from the callers perspective where as param means from the sub's persepective
16:31 funrep can one use given on lists?
16:31 llfourn funrep: yes
16:31 moritz funrep: yes
16:31 moritz m: given <a b c> { say .join }
16:31 camelia rakudo-moar 620d89: OUTPUT«abc␤»
16:31 awwaiid nine: I might start needing some common Inline:: things, like ObjectKeeper or trying to factor out some roles. I was thinking Inline::Lang for the namespace -- suggestions?
16:31 funrep is it possible to match just first element of a list?
16:32 moritz awwaiid: Inline::Base ?
16:32 moritz funrep: sure
16:32 awwaiid that would be great too
16:32 awwaiid some are base roles, but some might be utilities
16:32 nine If Inline weren't already taken...
16:32 * mst squints at using 'base' for something other than a superclass
16:32 awwaiid maybe those those are Inline::Util if I need
16:33 llfourn funrep: there area couple of ways. Most simple is given @list { when .[0] ~~ something }
16:33 mst awwaiid: Inlining::Kit
16:33 moritz or  given @list[0] {... }
16:33 awwaiid Inline:: doesn't even seem like the right thing for these lang integrations in the first place really
16:33 awwaiid but that is getting distracted
16:33 moritz Bridge::Perl5?
16:33 mst mm. Lang::Foo with an Inline:: wrapper or something would be nice
16:33 mst replace Lang:: with something better
16:33 pochi m: my @a = <a b c>; say @a.head
16:33 camelia rakudo-moar 620d89: OUTPUT«(a)␤»
16:34 pochi oh, it still returns a list :-(
16:34 funrep llfourn: perfect, thanks!
16:34 awwaiid distracted I say!
16:34 nine awwaiid: yes, Inline:: is not that good a name. It has seen a lot of marketing though.
16:35 awwaiid nine: yeah. Well anyway I'll pick a common spot at random, maybe PR against I::P5. What are you working on lately?
16:35 mst Embedded::Perl5 for the bridge and Embedding:: for the tools would be ok in my head
16:36 RabidGravy I had an Inline t-shirt that Ingy auctioed at some yapc years ago
16:36 nine awwaiid: I'd actually like to get support for creating wrappers for submodules out the door. So you use Foo; and will get a Perl 6 Foo class and also Foo::Bar;
16:36 nine awwaiid: but rakudo's core seem to be an infinite time sink
16:38 awwaiid nine: my current experiment kinda along those lines is in Ruby I hooked class-creation; you 'use csv:from<Ruby>' and it notices that CSV and CSV::Row, CSV::Table, etc. I had to because stupid ruby doesn't have filenames and class names predictably correspond (csv -> CSV for example)
16:39 awwaiid nine: but that required hte host language have that class-created hook feature
16:39 awwaiid er, target lang
16:48 AlexDaniel joined #perl6
16:50 Ch0c0late joined #perl6
17:03 BenGoldberg joined #perl6
17:06 pecastro joined #perl6
17:08 thom__ joined #perl6
17:18 El_Che http://blogs.perl.org/users/jt_smith/2​016/01/perl-6s-killer-app---async.html
17:20 llfourn mst, awwaiid, pochi -- would you expect to see $! attributes with init-arg in .perl?
17:20 llfourn (I writing AttrX::InitArg)
17:21 mst I wouldn't
17:21 mst largely because the primary use to me seems to be
17:22 mst method public_handler { return My::PublicHandler.new(:guts(self!guts)) }
17:22 mst where the guts object isn't meant to be visible outside
17:23 llfourn mst: I agree. But it will break .perl's EVALability
17:23 mst oooh
17:23 mst HRM
17:24 mst maybe .gist should exclude it but .perl include? unsure
17:25 llfourn I like that idea. I'll give it a shot.
17:25 _nadim joined #perl6
17:26 AlexDaniel .u 🄅
17:26 yoleaux U+1F105 DIGIT FOUR COMMA [No] (🄅)
17:26 AlexDaniel m: say 🄅 +5;
17:26 camelia rakudo-moar 620d89: OUTPUT«9␤»
17:26 AlexDaniel m: say 4, +5;
17:26 camelia rakudo-moar 620d89: OUTPUT«45␤»
17:34 _nadim joined #perl6
17:38 RabidGravy I know this is is a bit like poking a snake and being surprised at its reaction, but what's this all about?
17:38 RabidGravy m: multi sub trait_mod:<is>(Method:D $m, :$Zub!) { say $m.HOW.can('xFur'); }; class Foo { multi method bar() is Zub { } }
17:38 camelia rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0GgKcU1tCz␤Too few positionals passed; expected 3 arguments but got 2␤at /tmp/0GgKcU1tCz:1␤»
17:39 AlexDaniel oh finally I can see the colors
17:39 llfourn RabidGravy: I have found that capital letters in trait names is kinda broken
17:39 llfourn RabidGravy: but not sure if that's what it is
17:40 moritz iirc the compiler the case as a heuristic for distinguishing traits and type names
17:40 moritz m: role R { }; class A is R { };
17:40 camelia rakudo-moar 620d89: ( no output )
17:40 moritz should that warn/error?
17:41 RabidGravy ah, no
17:41 moritz "did you mean 'does R'?"
17:41 llfourn moritz: but isn't it the case that the 'is' which does .^add_parent is just another trait_mod<is>?
17:41 RabidGravy it's the can() on the methods HOW
17:42 RabidGravy requires an object orgument, as well as a method name
17:42 RabidGravy but the location of the error is weird
17:43 skids joined #perl6
17:43 RabidGravy yeah, is and does are just traits
17:43 dekiss joined #perl6
17:43 nine awwaiid: the same is quite true for Perl 5 (and Perl 6 for that matter). That's why I compare the list of available symbols before and after loading a module: https://github.com/niner/Inline-Perl5/​blob/master/lib/Inline/Perl5.pm6#L785
17:44 llfourn RabidGravy: ah then my problem must have been because I had a type name the same name as my trait name
17:44 RabidGravy yeah that will confuse it I guess
17:44 llfourn which now that I say it sounds like a terrible idea
17:45 llfourn but to be fair it was a trait_mod is on a routine like yours so I didn't think it would try and make the method do it
17:51 AlexDaniel So I decided to get all proposed unicode things into a list. See this gist and let me know what you think: https://gist.github.com/Alex​Daniel/c89bd2786f9b63f31e4c . If I forgot something then please yell at me :)
17:55 pmurias joined #perl6
17:57 pmurias AlexDaniel: does the unicode version of ?? !! offer benefits?
17:57 AlexDaniel pmurias: besides being shorter by one character? I'm not sure
17:58 pmurias I think one of the goal of ?? !! is to be visible
17:58 AlexDaniel pmurias: but the fact is that there is an operator that exists in the unicode, so I listed it
17:58 pmurias * goals
17:59 AlexDaniel pmurias: well, weird unicode characters also catch my attention, so I don't think that it is a downgrade :)
18:00 AlexDaniel pmurias: but you are right that some of those things are probably a bit too much… :)
18:01 AlexDaniel the first part of the list is more like “here we have a character that obviously fits”, not “oh, there's a unicode character for that, LET'S ADD IT NOW!!!”
18:02 skids joined #perl6
18:03 grondilu m: say "\u2047"
18:03 camelia rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IwDLeK4uMp␤Unrecognized backslash sequence: '\u'␤at /tmp/IwDLeK4uMp:1␤------> 3say "\7⏏5u2047"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
18:03 AlexDaniel m: say "\c2047"
18:03 camelia rakudo-moar 620d89: OUTPUT«߿␤»
18:03 AlexDaniel m: say "\x2047"
18:03 camelia rakudo-moar 620d89: OUTPUT«⁇␤»
18:04 grondilu print "\x2047   \x203C"
18:04 grondilu m: print "\x2047   \x203C"
18:04 camelia rakudo-moar 620d89: OUTPUT«⁇   ‼»
18:06 ab6tract joined #perl6
18:06 ab6tract those are lot less questionable to me than the bind character
18:07 ab6tract which i think will be hard to distinguish in many fonts
18:10 BenGoldberg .u ⁇   ‼
18:10 yoleaux U+0020 SPACE [Zs] ( )
18:10 yoleaux U+203C DOUBLE EXCLAMATION MARK [Po] (‼)
18:10 yoleaux U+2047 DOUBLE QUESTION MARK [Po] (⁇)
18:12 BenGoldberg .u ₙ
18:12 yoleaux U+2099 LATIN SUBSCRIPT SMALL LETTER N [Lm] (ₙ)
18:14 gtodd naïve p6 for sysadmins benchmark:  http://bit.ly/1kY3XTX
18:14 pmurias ab6tract: most unicode symbols look Perl 6 supports look a bit better then the texas variant (at the code of being harder to type), the unicode double question mark/eclamation mark just IMHO looks uglier and makes code harder to read for me
18:17 ab6tract pmurias: i'm not sold either, but relative to that bind they are clear as day
18:17 salv0 joined #perl6
18:17 ab6tract .u ≔
18:17 yoleaux U+2254 COLON EQUALS [Sm] (≔)
18:18 ab6tract nearly impossible to make out for me
18:18 _nadim joined #perl6
18:19 keix joined #perl6
18:24 xxpor_lap joined #perl6
18:28 pierre-vigier joined #perl6
18:28 RabidGravy does Signature.ACCEPTS have any role in determining which multi candidate is selrcted?
18:28 RabidGravy still struggling with this
18:28 havenwood left #perl6
18:31 telex joined #perl6
18:32 AlexDaniel ab6tract: well, one good thing about that bind character is that it is as long as regular assignment, so it's going to looking great with vertical alignment. It is pretty sad though that fonts don't render it good, I think that it could have been better
18:32 AlexDaniel ab6tract: but sure, one could say that it should stand out. And I wont argue! :)
18:33 AlexDaniel say $a < $b ¿ 42 ¡ 69 # hehe
18:35 BenGoldberg m: my $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆ = 3; dd $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆;
18:35 camelia rakudo-moar 620d89: OUTPUT«Int $y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆ = 3␤»
18:35 mspo that did weird things to my client
18:36 BenGoldberg And how does it appear on http://irc.perl6.org?
18:36 AlexDaniel it looks wrong in my browser
18:36 * BenGoldberg grins
18:37 AlexDaniel I have seen that a couple of time – combining characters apply on the next char instead of the previous one… what the?
18:37 AlexDaniel times*
18:39 BenGoldberg m: say '
18:39 BenGoldberg B̩̗̭ͣͭ͗͊̅ͧ̒̚Ę̗͍̠̦̝̔̌͒́͌ͫF͓͙̘̠̒ͯ͒̾ͩ́͠O͂̚​̵̨̫͔͓̩̤̺ͨ͗ͧ̋̈́̂R̛̤͎̗͛̑̈́͡E̞̺͒ͣ̅͆́̚Ḫ̢͇̺͐̅A​̸̯̯͚͎͉̭̜̪͒ͦ̋ͅŅ̦̠͓͕̳͂͌͑͡D̺͖͇̂ͩͅ:̬͖̔͛̓̈́ͪ͞ ͕͙͎̮̰͙̫͖͂ͮ͛̾̑ͬ̔c̆͊͒҉̡̮̗͎̥̱̥̰̬́l̙̣̼̓ͪ̀͠o​̻̜̻̻͗̇̊̎̔͋ͮ̓́͜s̵̖̰͕̫̜͎͙̙ͪͨ̍̒͋é͙̃͒ͧ̏́͞ ̭̝͙̼͓͖̼̄ͨ̾ͦ̍͑̇̕͠d̙̜̝̦͖̭ͧͤͤ͡o̓
18:39 BenGoldberg ̥̞ͫͩ̉̎͊ỏ̟͙̞̻̻̹̹r̵̨͇̫̦̺̮̼ͭ,̷̧̬̲͈̤̤̅̉͛ͫ͠ ̣͕̝̳̗̲̩̣͗̋͘e̼ͩ̔̿̾̋̾͘a͊ͯͪͤͬ͊͆​̸̙͙͔̜͙̳̻͠c̦̃̓̈̾͗́͝͝ḩ͉͓̦̯̞̆ ̵͇͍ͪ̀́w̷ͩ͗̃͒͏̲̼̯̕i̞̫̜̮̣̰͎̅̂͋̀ͅń̢̨̪̭̠̼͕̐́͆̅ͅ​͎d̰̤̝͎̹͕ͩ̃̏̃̍͊̔ȏ̶̼̺̪̾ͨ̈̄ͤ̄̚̕w̙̻̱̙̺͎͚̙ͧͪ̊̒̕͝ ̴̼̰̱͈̠ͤ̋̏̇͛&̠̺̟̞͎̳̻̙̽̓́̔̇ͩ͛ͧ̚ ̡̡̫̻͐̌̐̌ͬͦ̂͞
18:39 camelia rakudo-moar 620d89: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vtPMfW5A9Q␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/vtPMfW5A9Q:1␤------> 3say '7⏏5<EOL>␤    expecting any of:␤        argument list␤        single quotes…»
18:39 BenGoldberg ͚eͧͯ̿̽ͩ͏̴̛͕͖x̶̯͎̓̓i̬͍͇̬ͬͅt̶̴͈̏͑̒;̪̍ͥ̽̈ͦ ̸̣̠̻͚̼̩͕̩ͧ͗̍͑̉ͫ̅͟w̧̻̞̭͈̋̀͛̿́a͆͂ͩ​̧̭̥͕͎̜̥̌̿͛̌i̹͙̮͚̙̩̮̓̑́́̐t̮̩ͪ͒ͯͩ̽ ̥͉͓͙̆͛̒̊̋͊̅̔ͅu̦̠̖ͩ͛̿͞͝n̡ͫ͐͊̆̉̒͏͓̥͙̦̩̺͎ͅt͂​̈́ͥ͗͊̓͛́͏̵͖͖̘̥̺̝͓̼ͅi̝̤̊̄͂ͫ̍̔͘ḻ̟̞̭͓̩̠ͭ̌͘͢͡ ̛̫͍̤̳͙̪̙̺ͩͧ̏̅ͩ͌͠t͈̖̻̼̣̹ͦ̏̀͒͗̽͞i̴ͥ̒ͨ̽̎͂̈́̚
18:39 BenGoldberg ͔̤̘͓m̶̸͔̘͈̳͉ͬͫ̂ͦ̃̉͆ͫ̂͠e̪̖̼͕̺̔ͭ̋̏ͫ̅ͮ͌̇';
18:39 nebuchadnezzar erf
18:39 BenGoldberg Sorry about that
18:39 BenGoldberg it was supposed to be on one line.
18:40 llfourn cool the matrix
18:40 BenGoldberg Or at least, the output from http://eeemo.net/ :)
18:41 zwu joined #perl6
18:43 nine On thing is sure: Perl 6 added a whole new area for bikeshedding :)
18:44 vendethiel :D
18:44 vendethiel that's why lisp-case is so great :D.
18:46 AlexDaniel BenGoldberg: we've already tried some one-liner that printed 300 combiners on one char
18:47 AlexDaniel BenGoldberg: one of the bots on this channel ran away immediately
18:48 AlexDaniel ah no, it was 400
18:48 AlexDaniel here it is https://irclog.perlgeek.de/​perl6/2015-11-12#i_11522710
18:48 AlexDaniel but irclog broke it
18:51 BenGoldberg m: my $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็​็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ  = 'the future of black perl'; dd $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็​็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ;
18:51 camelia rakudo-moar 620d89: OUTPUT«Str $ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็​็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ = "the future of black perl"␤»
18:51 BenGoldberg .u ก้้้้้้้้้้้้้้้้้้้้ก็็็็็็็​็็็็็็็็็็็็็กิิิิิิิิิิิิิิิ
18:51 yoleaux U+0E01 THAI CHARACTER KO KAI [Lo] (ก)
18:51 yoleaux U+0E34 THAI CHARACTER SARA I [Mn] (◌ิ)
18:51 yoleaux U+0E47 THAI CHARACTER MAITAIKHU [Mn] (◌็)
18:51 AlexDaniel this is it, I guess: say ‘a’ ~ join ‘’, ((0..0x1FFFF) ==> grep { .uniname ~~ m/COMBINING/ } ==> map { .chr })
18:51 AlexDaniel here's the output: https://gist.github.com/Alex​Daniel/0521bc38fe827bd7d37b
18:57 * leont got the error «Type check failed in assignment to @!dependencies; expected Build::Simple::Node:D but got Build::Simple::Node:D», I suspect that last :D is a bug
18:58 dalek rakudo/language_versions: 9396718 | (Stefan Seifert)++ | / (6 files):
18:58 dalek rakudo/language_versions: First attempt at adding a CORE.d setting
18:58 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/9396718186
18:58 dalek rakudo/language_versions: 7fba273 | (Stefan Seifert)++ | / (8 files):
18:58 dalek rakudo/language_versions: Bring back IO::CatPath and IO::CatHandle in 6.d
18:58 dalek rakudo/language_versions:
18:58 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;'
18:58 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;'
18:58 dalek rakudo/language_versions: Could not find symbol '&ArgFiles'
18:58 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/7fba273f84
18:59 adhoc joined #perl6
18:59 nine .tell lizmat just pushed: > perl6 -e 'use v6.d; say $*ARGFILES.^name' # IO::Handle, > perl6 -e 'say $*ARGFILES.^name' # IO::ArgFiles
18:59 yoleaux nine: I'll pass your message to lizmat.
19:00 pjscott joined #perl6
19:00 RabidGravy nine++ that is quite cool
19:02 BenGoldberg m: my $base = 3585.chr; my $left = 3655.chr; my $right = 3656.chr; say $base ~ $left x 20; say $base ~ $right x 20;
19:02 camelia rakudo-moar 620d89: OUTPUT«ก็็็็็็็็็็็็็็็็็็​็็␤ก่่่่่่่่่่่่่่่่่่่่␤»
19:02 lizmat nine: cool!
19:02 yoleaux 18:59Z <nine> lizmat: just pushed: > perl6 -e 'use v6.d; say $*ARGFILES.^name' # IO::Handle, > perl6 -e 'say $*ARGFILES.^name' # IO::ArgFiles
19:03 llfourn nine: nicely done!
19:03 lizmat still, we're not of the hook yet, I'm afraid
19:03 nine Was easy building on lizmat++'s work :)
19:03 nine lizmat: sooo...what's next?
19:03 pjscott joined #perl6
19:03 El_Che nine: fix the performance numbers of [Tux] :)
19:04 lizmat well, what if: my $a = $*ARGFILES; use 6.d; my $b = $*ARGFILES
19:04 lizmat El_Che: that will need jnthn++
19:04 lizmat nine: as in, if the dynamic variable is already initialized, changing the setting won't automagically run the new initializtion code
19:05 El_Che I hope jnthn++ has been able to get some rest
19:06 nine lizmat: even if we could pull that off, I'm not sure if it would help all that much, since those objects do carry a bit of state. So changing the one should change the other. And that sounds like hell.
19:06 pmurias joined #perl6
19:07 nine lizmat: so I guess it will never be a 100 % perfect. But it doesn't have to be. It just has to be good enough for real life code.
19:07 lizmat nine: agree...  but it poses some interesting issues on using multiple settings leaking objects to each other
19:07 nine And yes, I fully expect people to show up throwing totally contrieved examples at us that show that Perl 6 is not perfect :)
19:07 lizmat but I really think we have a deeper problem wrt to fixing bugs in 6.c
19:07 Khisanth joined #perl6
19:08 lizmat take the Date.later bug that I fixed (moving from a leap-day by years to non-leap years)
19:08 nine lizmat: yes, hoelzro++ had an interesting idea about coercing versions of core objects. I have just no idea how we could do this automatically, since we'd have to detect moving the object across to code written in another version.
19:08 lizmat if you say "use 6.c" you cannot know which behaviour you're going to get
19:09 Sqirrel joined #perl6
19:09 lizmat of course, the Date.later issue is minor
19:09 lizmat it's just an example
19:09 lizmat we know there are several bugs with meta-operators
19:11 nine Meta operators sound like easy to manage, since they don't carry state. It's just changed behavior. Of course the interesting questions will be whether to fix them retroactively. But we'll have to decide that case by case.
19:12 lichtkind are there API guidlines for perl 6
19:13 lichtkind and i currently pondering about Math::Type
19:13 lichtkind a type collection to be eused my math modules
19:16 ghost_ joined #perl6
19:17 lizmat m: "foo" ~~ True   # there are versions of 6.c that don't warn
19:17 camelia rakudo-moar 620d89: 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/mGar7Dbmqu:1␤    ------> 3"foo" ~~ 7⏏5True   # there are versions of 6.c that ␤»
19:21 lizmat so, fwiw, I'm sold now on the multiple settings idea
19:21 lizmat well, I want to see if we can make this work
19:22 lizmat I'm definitely *not* sold on the idea of keeping the language now at 6.c while fixing bugs / making improvements
19:24 lizmat what I would really not like to see, is conditional code on $*PERL.compiler.version
19:24 lizmat m: $*PERL.compiler.version.say
19:24 camelia rakudo-moar 620d89: OUTPUT«v2015.12.165.g.620.d.893␤»
19:26 nine lizmat: btw. use v6.d; say $*PERL.version # now prints v6.d
19:26 lizmat nine: cool!
19:26 lizmat but I was talking about $*PERl.compiler.version
19:26 lizmat star-m: $*PERL.compiler.version.say
19:26 camelia star-m 2015.09: OUTPUT«v2015.9␤»
19:26 nine Sooo...I think before we merge language_versions, we'll have to change that so you have to say use v6.d.PREVIEW; as we don't support a 6.d yet. And update the JVM build
19:27 nine Zeah, compiler.version would be awful
19:27 leont Is there an easy way to automatically generate « method foo(Str $key) { %!foo{$key} } » ?
19:28 zakharyas joined #perl6
19:28 nine leont: https://github.com/niner/Inline-Perl5/​blob/master/lib/Inline/Perl5.pm6#L812
19:32 zwu mst: here is what sortiz said: Found that in rakudo much of import is NYI, see: https://github.com/perl6/roast/blob/​master/S11-modules/require.t#L22-L34
19:35 mst zwu: that's almost certainly a terrible idea, anyway - all of the features that are 'everyday use' -are- there, I think
19:36 llfourn hmmm https://github.com/perl6/roast/blo​b/master/S11-modules/require.t#L31 actually works
19:36 llfourn time to unfudge
19:36 zwu dynamic loading is a good feature I think, such as plugin system support.
19:37 llfourn although maybe require $name is meant to work right now it works as require ::($name);
19:37 zwu it looks like only the sub is support for the require;
19:37 llfourn m: my $name = "Test"; { require ::($name) <&ok>; ok 1};
19:37 camelia rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/7SiG1lfDX5:␤Useless use of $name in sink context (lines 1, 1)␤ok 1 - ␤»
19:38 llfourn oh...yeah that bug..
19:38 llfourn but that's just a warning doesn't count :P
19:40 llfourn require $name is not even meant to work according to S11
19:40 llfourn https://design.perl6.org/S1​1.html#Runtime_Importation
19:41 moritz require ::($name); or require $path;
19:41 zwu please note only the exported sub works, but not class.
19:42 llfourn moritz: ah right not looking closely enough thanks
19:42 hankache joined #perl6
19:43 llfourn zwu: classes are globalish you don't need to specify them I think.
19:43 llfourn m: require ::('Test'); say ::('Test').HOW.^name;
19:43 camelia rakudo-moar 620d89: OUTPUT«Perl6::Metamodel::ModuleHOW␤»
19:43 llfourn ^^ same should work for classes
19:44 llfourn if you do class Something is export though it should work... if it doesn't it's a bug
19:44 llfourn (IMO)
19:45 moritz llfourn: no
19:45 llfourn moritz: no?
19:45 moritz llfourn: require is run time, and lexical scopes are immutable at run time
19:45 moritz llfourn: so require can't ever install a new symbol, except if its name is known at compile time
19:46 moritz m: require Pod::To::Text; say Pod::To::Text
19:46 camelia rakudo-moar 620d89: OUTPUT«Could not find symbol '&Text'␤  in block <unit> at /tmp/9cCSNcSwxj line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/9cCSNcSwxj line 1␤␤»
19:46 hankache hello everyone
19:46 moritz that could work
19:46 llfourn moritz: yeah that's what the args after require are for. What I meant was require ::('SomeModule') <SomeClass>;
19:46 llfourn if SomeClass has been is export then it should work
19:46 moritz llfourn: right; and it needs to be a constant expression
19:46 moritz \o hankache
19:46 llfourn moritz: good we are on the same page :)
19:47 llfourn wait no it doesn't need to be a constant SomeClass = imo :\
19:47 zwu llfourn, can you please create a test for the module loading with class support?
19:47 moritz <SomeClass> is a literal
19:47 llfourn zwu: I will put it on todo list as soon as moritz agrees with me :P
19:48 moritz m: my $name = 'Pod::To::Text'; require ::($name) <Pod::To::Text>; say Pod::To::Text;
19:48 camelia rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/albzJ5ORaN:␤Useless use of $name in sink context (lines 1, 1)␤Trying to import symbols Pod::To::Text from 'Pod::To::Text', but it does not export anything␤  in block <unit> at /tmp/albzJ5ORaN line 1␤␤»
19:48 dalek perl6.org: 81c0cb6 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl:
19:48 dalek perl6.org: Fix incorrect blog URL for stmuk__'s blog
19:48 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/81c0cb6810
19:48 llfourn moritz: yes because Pod::To::Text doens't have is export
19:49 moritz TimToady: ^^ looks like a sink warning bug
19:49 moritz llfourn: aye
19:49 llfourn what I am saying is already how it's implemented AFAIK
19:49 llfourn is export will add it to UNIT::EXPORT::DEFAULT
19:49 llfourn which is where require is getting it from
19:49 ZoffixWin joined #perl6
19:49 ZoffixWin joined #perl6
19:50 * Zoffix pets the bot
19:50 yoleaux 09:39Z <stmuk__> Zoffix: the perl6.org home page link to http://stevemynott.blogspot.com/2016/01​/fosdem-2016-perl-dev-room-lineup.html wrongly points to  http://stevemynott.blogspot.com/feeds​/1832060940683956756/comments/default .. AFAIK it's not my problem with the feed :) but if it is bounce to back to me
19:50 yoleaux 10:03Z <stmuk__> Zoffix: I hacked the feed to fix it .. root issue is < moritz> it's picking up the first <link>, it should pick up <link rel="alternate" type="text/html"
19:50 Zoffix stmuk__, I don't see your fix.. Where is it?
19:51 llfourn and it will be exported with it's shortname like class Super { class Innner is export { } }. Then require Super <Inner>; say Inner.WHAT # Super::Inner
19:51 llfourn I'm at least 80% sure that's what happens right now :P
19:51 zwu a module file_path.pm6: module A { class TC is default {}; sub foo is default { say "foo" }}; in a script, I use 'require 'file_path.pm6' <&foo>; foo(); my $tc = TC.new; ";  but failed as I remembered when I tested yesterday.
19:51 zwu sorry, is default is a typo, it is export.
19:52 moritz m: require 'Test.pm6' <&plan>; plan 42;
19:52 camelia rakudo-moar 620d89: OUTPUT«Could not find Test.pm6 in:␤    /home/camelia/.perl6/2015.12-165-g620d893␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Reposito…»
19:52 llfourn zwu: you would have to require <&foo TC>
19:52 moritz m: require ::('Test') <&plan>; plan 42;
19:53 camelia rakudo-moar 620d89: OUTPUT«WARNINGS for /tmp/3wkBlNUVCg:␤Useless use of constant string "Test" in sink context (lines 1, 1)␤1..42␤# Looks like you planned 42 tests, but ran 0␤»
19:53 llfourn zwu: but yeah maybe require path aint working so good
19:53 pjscott joined #perl6
19:55 dalek perl6.org: a4ace53 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl:
19:55 dalek perl6.org: Close XLST attack vector
19:55 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/a4ace5364c
19:56 ely-se joined #perl6
19:57 yqt joined #perl6
19:57 zwu llfourn: the output is try to import symbol..., but it does not export anything..., I tested use require "full_path.pm6" <&foo, TC>, and require "full_path.pm6" <&A::foo, A::TC> both;
19:58 pjscott joined #perl6
19:59 llfourn zwu: Thanks. This means the test is still failing. See what happens if you do require ::('ModuleName') <&foo TC>;
20:00 llfourn (after putting whatever is in full_path.pm6 into lib/ModuleName.pm6)
20:03 orbus joined #perl6
20:08 pjscott joined #perl6
20:10 frankjh joined #perl6
20:10 mst .tell FROGGS https://github.com/andk/pause/issues/198 may be relevant to your interests
20:10 yoleaux mst: I'll pass your message to FROGGS.
20:14 stmuk__ .tell Zoffix I added at('link[type="text/html"]') (which I now see you improved)
20:14 yoleaux stmuk__: I'll pass your message to Zoffix.
20:14 zwu llfourn: thanks.
20:15 llfourn zwu: worked?
20:15 zwu no, just report the same failing
20:17 llfourn zwu: hmm there is this bug: https://rt.perl.org/Public/​Bug/Display.html?id=125951 which I repored a while back
20:17 llfourn but it should work unless you are doing something clever
20:17 llfourn also https://rt.perl.org/Public/​Bug/Display.html?id=126658
20:18 llfourn so yeah there are some problems with require even when not doing a filename
20:18 llfourn but it works for me usually
20:18 * llfourn goes and tries
20:19 moritz the German Perl Workshop 2016 is stil looking for talks on Perl 6 (and Perl 5, for that matter); anybody interested?
20:21 lizmat moritz: did jnthn submit already ?
20:22 llfourn zwu: you are correct. This is a bug in itself!
20:22 _nadim joined #perl6
20:24 llfourn wow it doens't even work with &foo by itself for me
20:24 llfourn zwu: ya it's super broken
20:25 dalek rakudo/nom: 9f64cec | lizmat++ | src/core/Complex.pm:
20:25 dalek rakudo/nom: Revert "decent infix:<**> for Complex"
20:25 dalek rakudo/nom:
20:25 dalek rakudo/nom: This reverts commit 4680dc81f2720cc50e2d144ebb12116f90a3b231.
20:25 dalek rakudo/nom:
20:25 dalek rakudo/nom: It severely borked t/spec/S32-num/power.t   :-(
20:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9f64cec10b
20:26 llfourn zwu: It looks like require ::('Test') <&ok> works but nothing from your non core dist modules
20:26 llfourn yikes!
20:26 llfourn roast only tests require Test ;_;
20:28 orbus I guess I really should get an rt account
20:30 * orbus doesn't like registering for more things - too many accounts already
20:33 llfourn orbus: I've been filing bugs for months and never bothered to get an account :)
20:33 orbus I saw something on the site about filing by e-mail
20:33 orbus but I couldn't figure out where to send to
20:33 orbus maybe I'm blind
20:33 llfourn orbus: rakudobug@perl.org
20:33 RabidGravy yeah
20:33 orbus ah, okay
20:34 orbus well I'll give that a shot
20:34 orbus I think I found a concurrency bug
20:34 orbus probably lots of those :p
20:34 llfourn please do :D
20:35 orbus I can reproduce it semi-regularly - seems there's a race condition around state variables and concurrent processing - namely if the timing's just right and two threads try to enter the sub at the same time, the state variable gets messed up
20:35 orbus seems to be on state variable initialization
20:36 llfourn zwu: https://rt.perl.org/Public/​Bug/Display.html?id=127233 Sorry about sending you on wild goose chase there :P
20:37 llfourn orbus: I am not surprised :)
20:37 orbus actually, come to think of it, maybe not on initialization
20:37 orbus hmm
20:37 orbus well I'm not really either
20:37 orbus concurrency is hard to get right and it's amazing it works as well as it does so far
20:37 orbus lots of wrinkles left to iron out
20:37 BenGoldberg m: sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) for 1..10;
20:37 camelia rakudo-moar 9f64ce: OUTPUT«3␤7␤11␤15␤19␤23␤Memory allocation failed; could not allocate 14816 bytes␤»
20:38 BenGoldberg m: sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) for 1..10;
20:38 orbus :)
20:38 camelia rakudo-moar 9f64ce: OUTPUT«3␤7␤11␤15␤19␤Memory allocation failed; could not allocate 14816 bytes␤»
20:38 orbus I ran into it on a state Lock
20:38 orbus sometimes it works
20:39 orbus sometimes on of the threads gripes that the state variable isn't a Lock
20:39 orbus like it hasn't been initialized
20:39 BenGoldberg m: for (1..10) { my sub foo { state $bar = 0; ++$bar }; say [+] await (start { foo } xx 2) };
20:39 camelia rakudo-moar 9f64ce: OUTPUT«3␤3␤3␤3␤3␤3␤Memory allocation failed; could not allocate 14816 bytes␤»
20:40 orbus is camelia running 2015.12?
20:40 BenGoldberg m: use v10000;
20:40 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cWj1_bNtfs␤No compiler available for Perl v10000␤at /tmp/cWj1_bNtfs:1␤------> 3use v100007⏏5;␤»
20:41 BenGoldberg m: use $*VERSION;
20:41 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wuu2OHNEua␤Undeclared routine:␤    use used at line 1␤␤»
20:41 BenGoldberg m: use $?VERSION;
20:41 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nQYkAFlST8␤Variable '$?VERSION' is not declared. Did you mean 'Version'?␤at /tmp/nQYkAFlST8:1␤------> 3use 7⏏5$?VERSION;␤»
20:41 BenGoldberg m: use $?Version;
20:41 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MtSpRzxRcf␤Variable '$?Version' is not declared. Did you mean 'Version'?␤at /tmp/MtSpRzxRcf:1␤------> 3use 7⏏5$?Version;␤»
20:41 BenGoldberg I kmnow there's a variable with the version....
20:41 * BenGoldberg looks around for his cheat sheet
20:42 orbus m: put $*PERLVERSION
20:42 RabidGravy m: say $*PERL.version
20:42 camelia rakudo-moar 9f64ce: OUTPUT«Dynamic variable $*PERLVERSION not found␤  in block <unit> at /tmp/n_YBrkQHdV line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/n_YBrkQHdV line 1␤␤»
20:42 camelia rakudo-moar 9f64ce: OUTPUT«v6.c␤»
20:42 orbus oh
20:42 BenGoldberg m: $*PERL
20:42 camelia rakudo-moar 9f64ce: ( no output )
20:42 orbus that's the perl version, not the rakudo version
20:42 BenGoldberg m: $*PERL.perl.say
20:42 camelia rakudo-moar 9f64ce: OUTPUT«Perl.new(compiler => Compiler.new(id => "61EFC50B7FEF96D41C933C212DA93​5F964BBF936.1452457829.90565", release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2015.12.166.g.9.f.64.cec'), signature => Blob, desc…»
20:42 orbus there we go
20:43 orbus m: for ^10 { my &x=sub ($x is rw) { state $l=Lock.new; $l.protect({ $x++ }); }; my $z=5; await start {&x($z)} xx 2; put $z }
20:43 camelia rakudo-moar 9f64ce: OUTPUT«7␤7␤7␤7␤7␤Memory allocation failed; could not allocate 15032 bytes␤»
20:43 orbus oh that's interesting
20:43 orbus that runs on my box
20:43 orbus at least sometimes
20:43 orbus sometimes it throws No such method 'protect' for invocant of type 'Any'
20:43 RabidGravy I think there's a ulimit or something on it
20:44 orbus could be
20:44 orbus to keep people from doing nutty things to camelia
20:44 BenGoldberg But wouldn't await cause the thread to be cleaned up?
20:45 yurivish_ joined #perl6
20:45 orbus there's probably a really small memory allocation limit on the account camelia runs under
20:45 orbus to keep somebody malicious from gobbling up all the memory on the host box
20:45 orbus camelia's for one-liners
20:46 zwu llfourn: I appreciated your filing a bug.
20:49 lizmat orbus: somehow it feels *VERY* wrong that you store a Lock in a state variable
20:50 ceronman joined #perl6
20:51 lizmat orbus: but it's more a gut feeling
20:51 lizmat ah, I see it now
20:51 lizmat yes, bad idea
20:52 BenGoldberg m: for ^10 { my &x=sub ($x is rw) { constant $l = Lock.new; $l.protect({ $x++ }); }; my $z=5; await start {&x($z)} xx 2; put $z }
20:52 camelia rakudo-moar 9f64ce: OUTPUT«7␤7␤7␤7␤7␤Memory allocation failed; could not allocate 15208 bytes7␤␤»
20:52 lizmat well, the lock appears to be shared between multiple threads
20:53 lizmat I'm not sure the lock itself is created to handle that evantuality
20:53 lizmat *eventuality
20:54 BenGoldberg m: sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; say 'after';
20:54 camelia rakudo-moar 9f64ce: OUTPUT«before␤when is this done␤after␤»
20:54 BenGoldberg m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; say 'after' }
20:54 camelia rakudo-moar 9f64ce: OUTPUT«before␤when is this done␤after␤before␤when is this done␤after␤»
20:54 BenGoldberg m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' }
20:54 camelia rakudo-moar 9f64ce: OUTPUT«before␤when is this done␤after␤before␤when is this done␤after␤»
20:55 ceronman Hi everyone, I just installed Perl 6 on OS X (via brew install rakudo-star). I'm just trying the language.
20:55 BenGoldberg m: for (1..2) { sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' }; foo
20:55 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UDU9xtrymd␤Undeclared routine:␤    foo used at line 1␤␤»
20:55 ceronman while playing with it, I ran into an error when running this: perl6 -e 'sub one { 1 }; one;'
20:56 BenGoldberg m: for (1..2) { our sub foo { state $bar = do { say 'when is this done' }; 42 }; say 'before'; foo; foo; say 'after' }; foo
20:56 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oBqEvQPfIG␤Undeclared routine:␤    foo used at line 1␤␤»
20:56 ceronman why is the error happening? it seems the name 'one' is colliding with something as it doesn't happen with other function names
20:56 spider-mario joined #perl6
20:56 BenGoldberg m: say one;
20:56 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U9LOJjZO5d␤Function "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)␤at /tmp/U9LOJjZO5d:1␤------> 3say one7⏏5;␤»
20:56 BenGoldberg m: sub one { 42 }; one;
20:56 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pTc51hLMH3␤Function "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)␤at /tmp/pTc51hLMH3:1␤------> 3sub one { 42 }; o…»
20:56 BenGoldberg m: sub one { 42 }; one();
20:56 camelia rakudo-moar 9f64ce: ( no output )
20:57 BenGoldberg m: sub one { 42 }; say one.WHAT;
20:57 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MHO9dMTX6S␤Function "one" may not be called without arguments (please use () or whitespace to denote arguments, or &one to refer to the function as a noun)␤at /tmp/MHO9dMTX6S:1␤------> 3sub one { 42 }; s…»
20:57 BenGoldberg m: sub one { 42 }; say &one.WHAT;
20:57 camelia rakudo-moar 9f64ce: OUTPUT«(Sub)␤»
20:57 BenGoldberg m: sub one { 42 }; say &one.perl;
20:57 camelia rakudo-moar 9f64ce: OUTPUT«sub one () { #`(Sub|81598528) ... }␤»
20:57 BenGoldberg m: say &one.perl;
20:57 camelia rakudo-moar 9f64ce: OUTPUT«sub one (+ is raw) { #`(Sub+{<anon|49450304>}|67143056) ... }␤»
20:57 BenGoldberg m: my $foo; one($foo);
20:57 camelia rakudo-moar 9f64ce: OUTPUT«WARNINGS for /tmp/7WEXfjzD9B:␤Useless use of "one($foo)" in expression "one($foo)" in sink context (line 1)␤»
20:57 BenGoldberg m: my $foo; say one($foo);
20:57 camelia rakudo-moar 9f64ce: OUTPUT«one((Any))␤»
20:57 BenGoldberg m: my $foo; say one($foo); say $foo
20:57 camelia rakudo-moar 9f64ce: OUTPUT«one((Any))␤(Any)␤»
20:57 BenGoldberg m: my $foo = ; say one($foo); say $foo
20:57 camelia rakudo-moar 9f64ce: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A0DGNFryKu␤Malformed initializer␤at /tmp/A0DGNFryKu:1␤------> 3my $foo =7⏏5 ; say one($foo); say $foo␤    expecting any of:␤        prefix␤        term␤»
20:57 BenGoldberg m: my $foo = 1; say one($foo); say $foo; # stupid fingers
20:57 camelia rakudo-moar 9f64ce: OUTPUT«one(1)␤1␤»
20:58 wollmers joined #perl6
20:58 BenGoldberg m: my $foo = 2; say one($foo); say $foo;
20:58 camelia rakudo-moar 9f64ce: OUTPUT«one(2)␤2␤»
20:58 BenGoldberg m: my $foo = 2; say one($foo++); say $foo;
20:58 camelia rakudo-moar 9f64ce: OUTPUT«one(2)␤3␤»
20:58 wollmers hello rekudistas
20:58 BenGoldberg m: my $foo = 2; say one(1); say $foo;
20:58 camelia rakudo-moar 9f64ce: OUTPUT«one(1)␤2␤»
20:58 BenGoldberg m: say one('what does this button do');
20:58 camelia rakudo-moar 9f64ce: OUTPUT«one(what does this button do)␤»
20:59 ely-se left #perl6
20:59 lizmat m: dd one(True,False,False), one(True,True,False)   # ceronman
20:59 camelia rakudo-moar 9f64ce: OUTPUT«Method 'name' not found for invocant of class 'Bool'␤  in any  at gen/moar/m-Metamodel.nqp line 3124␤  in block <unit> at /tmp/hIMatcxyJm line 1␤␤»
20:59 lizmat hmmm...
20:59 lizmat m: say one(True,False,False), one(True,True,False)
20:59 camelia rakudo-moar 9f64ce: OUTPUT«one(True, False, False)one(True, True, False)␤»
21:00 wollmers p6: my $h = {a => [[1,2]]}; for (@($h{'a'})) -> $x { say '$x: ',$x.perl; };
21:00 camelia rakudo-moar 9f64ce: OUTPUT«$x: 1␤$x: 2␤»
21:00 lizmat m: say so one(True,False,False), so one(True,True,False)
21:00 camelia rakudo-moar 9f64ce: OUTPUT«TrueFalse␤»
21:00 BenGoldberg m: say one(1).WHAT;
21:00 camelia rakudo-moar 9f64ce: OUTPUT«(Junction)␤»
21:00 lizmat one() creates a junction that yields True if only one of the values is True
21:01 leont How can I 'inherit' a method from a role, and also override it?
21:01 ceronman I understand that, but then why if I define my own 'one' function, I get that error?
21:01 leont Call it explicitly?
21:01 BenGoldberg Add parens.
21:02 wollmers How can I get the arrayref [1,2] out of [[1,2]] into a for loop?
21:02 ceronman ok, if I type the parens, I don't get the error, but why do I get it without the parens?
21:04 dalek rakudo/nom: 9927409 | lizmat++ | src/core/Rakudo/Internals.pm:
21:04 dalek rakudo/nom: Add IS-WIN as cheap way to know if we're on Win
21:04 dalek rakudo/nom:
21:04 dalek rakudo/nom: Having to create a Distro for this, is really stupid.
21:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9927409727
21:04 dalek rakudo/nom: 5cb4372 | lizmat++ | src/core/ (3 files):
21:04 dalek rakudo/nom: Use Rakudo::Internals.IS-WIN where appropriate
21:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5cb4372e6c
21:04 lizmat ceronman: *that* could actually be a bug
21:05 lizmat OTOH, one is just a sub in the setting... hmmm...
21:06 ceronman lizmat: it looks like a bug. It doesn't happen with other names, even if they collide with thigs: perl6 -e 'sub elems { 1 }; say elems;'
21:10 wollmers What's wrong with this: Malformed loop spec: ------>         for ( @($ranks{$rank}) ) -> ⏏$hunk {
21:10 moritz wollmers: do you want to iterate over 1 and 2? or get [1, 2] in a single iteration?
21:11 moritz m: my $ranks; my $rank; for ( @($ranks{$rank}) ) -> $hunk { }
21:11 camelia rakudo-moar 5cb437: ( no output )
21:11 moritz wollmers: maybe a syntax error before that?
21:12 dalek ecosystem/add-perl6-slang-roman: d74c047 | (Jeffrey Goff)++ | META.list:
21:12 dalek ecosystem/add-perl6-slang-roman: Add perl6-slang-roman
21:12 dalek ecosystem/add-perl6-slang-roman: review: https://github.com/perl6/e​cosystem/commit/d74c047bfa
21:12 wollmers moritz: the second case. I want array-refs as $x.
21:12 colomon joined #perl6
21:12 lizmat ceronman: indeed, could you please report this rakudobug@perl.org and quote the conversation here ?
21:13 ceronman lizmat: I will thanks for the help
21:13 moritz m: for [[1, 2],] -> $x { say $x.perl }
21:13 camelia rakudo-moar 5cb437: OUTPUT«$[1, 2]␤»
21:13 dalek ecosystem: d74c047 | (Jeffrey Goff)++ | META.list:
21:13 dalek ecosystem: Add perl6-slang-roman
21:13 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d74c047bfa
21:13 dalek ecosystem: 5278038 | drforr++ | META.list:
21:13 dalek ecosystem: Merge pull request #118 from perl6/add-perl6-slang-roman
21:13 dalek ecosystem:
21:13 dalek ecosystem: Add perl6-slang-roman
21:13 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5278038787
21:13 moritz wollmers: ^^
21:14 wollmers moritz: The AoA is constructed via push. Does push set the "magic comma"?
21:15 moritz wollmers: yes; it never flattens
21:15 moritz m: my @a; @a.push: [1, 2]; for @a -> $x { say $x.perl }
21:15 camelia rakudo-moar 5cb437: OUTPUT«$[1, 2]␤»
21:15 moritz wollmers: seems to do what you want: a single iteration with an array in $x
21:16 [particle] joined #perl6
21:17 wollmers moritz: thx. So I should isolate my syntax bug. Maybe a porting relict from P5.
21:18 moritz wollmers: also, the parens around the list expression isn't necessary (for ... -> $x instead of  for ( ... ) -> $x )
21:19 wollmers moritz: I know, that's just P5-ish.
21:20 pi4 joined #perl6
21:24 nine orbus: using a state variable like that looks like a classic test and set race condition. Does Perl 6 actually guarantee that state variable initialization is thread safe?
21:24 lizmat I'm pretty sure it doesn't
21:24 lizmat same for once blocks
21:25 nine orbus: oh an while I'm at it: your cas implementation seems to be using the same lock for all cas operations while it should be one lock per compared variable.
21:25 orbus that is a good point
21:26 nine One of these days I'm gonna have to start looking at parallelism in Perl 6 :)
21:26 orbus I changed it around some more already
21:26 orbus but that is a good point
21:26 geraud joined #perl6
21:26 orbus I've been looking for a writeup on what perl6 actually guarantees is thread safe
21:26 orbus I haven't found one
21:27 orbus scalar assignment seems to be atomic (seems to be)
21:27 orbus anything past that, maybe only jnthn knows
21:27 lizmat orbus: that's about the only thing that is guaranteed
21:27 nine Well the emphasis was really on higher level abstractions, so you shouldn't have to care about those as much.
21:28 orbus well, maybe that's true but I think it still ought to be in writing somewhere - it's really easy to trip over otherwise
21:28 orbus lizmat: that's about what I've been figuring
21:30 atweiden joined #perl6
21:30 orbus as far as whether perl6 guarantees state variable initialization to be safe - it may well not, but it seems like it probably should or it breaks a lot of assumptions I know I would probably make about when it's safe to use start
21:30 lizmat orbus: yes, that's a good point
21:30 nine Guaranteeing safety usually makes the common case of non-threaded access slower, too.
21:31 nine That's the opposite of what we'd like to do :)
21:31 orbus always a balance to strike
21:31 orbus you could just put a big red NOT THREAD SAFE warning on it
21:32 orbus but I feel like if it's not safe you're going to wind up with a lot of non thread-safe modules
21:32 dalek rakudo/nom: 5240dec | lizmat++ | src/core/ (5 files):
21:32 dalek rakudo/nom: Move MAKE-EXT to Rakudo::Internals
21:32 dalek rakudo/nom:
21:32 dalek rakudo/nom: Do some streamlining, and make sure all calls to MAKE-EXT are adapted
21:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5240deca19
21:32 colomon joined #perl6
21:32 lizmat nine: using a state variable in a module in the ecosystem, making that unsafe for use in async, that would be bad  :-(
21:33 cxreg whoever convinced JT to reconsider perl 6 and write about it, nice job
21:36 orbus anyway, I wrote a little test program that demonstrates the issue (usually)
21:36 DrForr Indeed.
21:36 orbus so when I get a chance I'll throw it in an email and send to rakudobug
21:37 orbus as far as the cas, I'm still just messing around with it - it's been a good opportunity to try to wrap my head around binding and containers
21:37 orbus but that's a good point about the locking - what I've done so far is probably suboptimal
21:37 wamba joined #perl6
21:37 zwu joined #perl6
21:40 orbus although I'm not sure how I'd do a separate lock per compared variable - keep a big hash?  could get large quickly
21:40 orbus have to think about it I guess
21:40 nine lizmat: I'd bet that pretty much all ecosystem code is thread unsafe. A user has to care for that by herself by stuffing the code into supplies and promises
21:41 orbus yeah, but with the state thing
21:41 nine orbus: or...you could just dive in an implement it properly in the vm ;)
21:41 orbus if there's a function in a module that uses a state variable
21:42 orbus ha - I think that's probably over my head
21:42 orbus the last C I did was a very long time ago
21:42 orbus but as I was saying, if you have a module function that uses a state variable
21:42 nine And if there's a module that uses objects with state and methods or lexical variables in the module's main line, you have the same issues. State variables are just one way to have kinda global state.
21:43 orbus those would get initialized when you call use right?
21:43 orbus I don't think it's the same
21:44 Psyche^_ joined #perl6
21:44 nine my $foo; sub do_something($bar) { $foo //= $bar; ... }
21:44 nine same race condition right there without state
21:45 nine Or if it's no lexical but an object's property and you pass that objects to multiple thread, same thing can happen.
21:45 orbus what's //= ?
21:45 nine defined or assign
21:46 orbus that's what I thought
21:46 orbus not in the operators document :p
21:47 lizmat hmmm... perhaps state variables are thread safe after all:
21:47 lizmat m: my int $a = 0; sub a() { once $a = $a + 1 }; await do for ^100 { Promise.start(&a) }; say $a
21:47 camelia rakudo-moar 5cb437: OUTPUT«Memory allocation failed; could not allocate 15504 bytes␤»
21:47 lizmat ooh, wow
21:47 orbus yeah
21:47 orbus we ran into that earlier
21:47 orbus our guess is camelia has a small memory cap
21:47 lizmat $ 6 'my int $a = 0; sub a() { once $a = $a + 1 }; await do for ^10000 { Promise.start(&a) }; say $a'
21:47 lizmat 1
21:48 orbus yeah I have an example like that
21:48 orbus sometimes it works
21:48 orbus sometimes it doesn't
21:48 lizmat I haven't been able to get this one to fail yet
21:48 orbus although
21:48 orbus come to think of it
21:48 orbus I was assigning an object
21:48 orbus so maybe it's falling down in the object construction
21:49 orbus that could well be
21:49 lizmat $ 6 'my Int $a; sub a() { once $a = $a + 1 }; await do for ^10000 { Promise.start(&a) }; say $a'
21:49 lizmat Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?
21:50 orbus there you go
21:50 lizmat now, in this case, we don't have an Int to start with
21:50 orbus that's the kind of thing I was getting
21:50 orbus in my case it was a Lock
21:50 orbus I was trying to assign a Lock to a state variable
21:50 lizmat if you initialize the Int $a = 0, then there is no problem, because there is container to begin with
21:50 nine Good night all!
21:51 lizmat good night, nine!
21:51 orbus and sometimes it would act like the Lock variable hadn't been initialized when it got to the point of trying to call protect
21:51 uvtc joined #perl6
21:51 orbus later nine
21:51 orbus I dunno - it just feels like there's a lot of landmines in concurrency
21:52 orbus which makes sense - it's a hard problem
21:52 orbus but it would be nice to start making a map of where the landmines are
21:52 lizmat yes, but we try to shield user from those landmines...
21:52 orbus that's kind of my hope
21:53 orbus protect people from what it's possible to protect from
21:53 orbus and put big warning signs around the stuff you can't
21:53 cxreg i believe in jnthn
21:53 orbus well he probably has some ideas around all this
21:53 cxreg he absolutely does
21:53 cxreg just needs more work
21:53 orbus yup
21:53 orbus that's my assumption
21:54 orbus I'm just trying to point things out as I trip over them to raise awareness :)
21:54 cxreg orbus++
21:54 uvtc m: my @a = 1, 2, 3;  my @b = 2, 1, 3; say @a == @b; # How do I compare two arrays?
21:54 camelia rakudo-moar 5240de: OUTPUT«True␤»
21:54 uvtc ^^ I'd expect that to return False.
21:55 RabidGravy m: my @a = 1, 2, 3;  my @b = 2, 1, 3; say @a ~~ @b;
21:55 camelia rakudo-moar 5240de: OUTPUT«False␤»
21:55 uvtc What is `@a == @b` doing?
21:55 RabidGravy m: my @a = 1, 2, 3;  my @b = 1, 2, 3; say @a ~~ @b;
21:55 camelia rakudo-moar 5240de: OUTPUT«True␤»
21:55 cxreg is there a non-smartmatch way of doing that?
21:55 RabidGravy comparing the lengths I think
21:55 uvtc Ah. Numerical.
21:55 uvtc Right.
21:55 El_Che uvtc: iirc, object identitiy
21:55 uvtc Oh.
21:56 wollmers Seems I need to write my own Test::is-deeply()
21:56 orbus m: my @a=1,2,3; my @b=2,1,3,4; put @a==@b
21:56 camelia rakudo-moar 5240de: OUTPUT«False␤»
21:56 uvtc I'd forgotten: `==` for numerical, `eq` for strings, `~~` for ... smart matching.
21:56 El_Che uvtc: have a look at the Array class, the doc about any, all, unique etc. That's also very nice
21:57 uvtc Ok. Thanks, El_Che.
21:57 wollmers in the test file: is-deeply([allLCS([<A B C>], [<D E F>])], [[[],],],);
21:58 wollmers The result: # expected: $[] #      got: $[[[],],]
21:58 El_Che m: my @a=1,2,3; my @b=1,3,2; say @a.sort ~~ @b.sort
21:58 camelia rakudo-moar 5240de: OUTPUT«True␤»
21:58 El_Che uvtc: in the case you only care about the contents
22:00 uvtc Is there a general rule Perl 6 follows regarding whether or not a method mutates its object (the "invocant"?) vs if it instead returns a new object?
22:00 lizmat the general rule is: return new object, but there are exceptions
22:01 lizmat like push/unshift/append/prepend  :-)
22:01 uvtc Nice. Thanks, lizmat and El_Che . Right, I see: with push/pop/shift/unshift/append/prepend you expect modification.
22:01 orbus I'm assuming that doesn't apply to ecosystem classes?
22:02 orbus just that the core tries to behave that way?
22:02 El_Che uvtc: kind of related, similar ro-behavious for method signature parameters. You need to add "is rw" or "is copy" if you want a different behaviouer
22:02 average joined #perl6
22:03 average http://blogs.perl.org/users/jt_smith/2​016/01/perl-6s-killer-app---async.html
22:03 uvtc El_Che, Ok. I see. Default is `ro` --- you need to ask for `rw`.
22:03 average I very much liked that blogpost ^^
22:03 average this was something I asked a week ago in this channel
22:04 El_Che uvtc: so is the default for Str.subst a new Str. For rw there is substr-mutate.
22:05 orbus the concurrency stuff is very much what got me interested
22:05 El_Che uvtc: so like Liz says: new obj except when not for obvious or explicit reasons
22:05 uvtc Ah, didn't know there was a `substr-mutate`. Ok. Thanks, El_Che .
22:05 orbus most other scripting type languages leave much to be desired in terms of concurrency support
22:05 lizmat orbus: fwiw, I'm not convinced anymore that state variables are inherently thread-unsafe
22:06 orbus lizmat: I think I need to do some more experiments
22:06 El_Che orbus: most? all
22:06 El_Che orbus: :)
22:06 orbus because I had object construction in the mix
22:06 orbus well
22:06 lizmat orbus: you see, a once block uses a hidden state variable
22:06 silug joined #perl6
22:06 lizmat and I have not been able to make that break
22:06 orbus of the available ones, groovy seems to come the closest from what I've seen - but that's because it's java in disguise
22:07 orbus lizmat: hmm - okay, I'll play with it some more
22:07 orbus thanks
22:07 orbus it might just be that it's not safe to try to assign it to like SomeObject.new
22:07 uvtc El_Che, Oops, typo. I see that besides `substr` there's also a `subst` and `subst-mutate` (but no "`substr-mutate`").
22:08 El_Che uvtc: typo indeed :)
22:08 El_Che uvtc: I am a s/// guy :)
22:10 uvtc Oh. Does `subst` mean "substitute"? (Where's `substr` means "substring".)
22:11 skids yep
22:11 uvtc Ah. Thanks skids .
22:12 skids substr-rw would be the mutable
22:13 frankjh left #perl6
22:13 uvtc Ah, nice.
22:14 uvtc left #perl6
22:16 dalek ecosystem: c081228 | skids++ | META.list:
22:16 dalek ecosystem: switch X::Protocol from META.info to META6.json
22:16 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c081228874
22:18 masak 'night, #perl6
22:20 wollmers In which repository lives the source of the module Test?
22:20 TEttinger joined #perl6
22:21 llfourn wollmers: https://github.com/rakudo/rakudo/tree/nom/lib
22:22 wollmers llfourn: thx. Found no link on rakudo.org.
22:23 llfourn when it doubt go to github :)
22:37 dalek ecosystem: cb23569 | LLFourn++ | META.list:
22:37 dalek ecosystem: Add AttrX::InitArg to ecosystem
22:37 dalek ecosystem:
22:37 dalek ecosystem: https://github.com/LLFourn/p6-AttrX-InitArg
22:37 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/cb23569117
22:37 llfourn mst: I did it!
22:38 llfourn awwaiid: ^
22:38 llfourn break &
22:41 skids How does one force panda to refresh a module's META?
22:48 leont Is it me, or does IO::Path not support anything like catfile/catdir?
22:49 dalek rakudo/nom: 34d2b6f | lizmat++ | src/core/ (3 files):
22:49 dalek rakudo/nom: Move MAKE-CLEAN-PARTS to Rakudo::Internals
22:49 dalek rakudo/nom:
22:49 dalek rakudo/nom: and streamline it
22:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/34d2b6f582
22:49 lizmat leont: $*SPEC supports that
22:49 lizmat it's a mess
22:49 lizmat yes
22:49 lizmat I know
22:49 * lizmat goes to bed
22:49 leont Yeah it is
22:50 lizmat good night, #perl6!
22:50 * leont has an open PR about $*SPEC
22:50 leont Night!
22:50 lizmat I still think $*SPEC needs to die
22:50 lizmat sleep&
22:50 skids m: my $a = IO::Path.new("/tmp"); $a.child("foo").say;
22:50 camelia rakudo-moar 5240de: OUTPUT«IO::Path is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/XkIxx7gbwK line 1␤␤»
22:51 leont I wouldn't mind $*SPEC dying, but we'd need something in its place instead
22:52 leont utime is documented as «Gone, see Path.times.», but there is no such method in IO::Path
22:54 niceperl joined #perl6
22:56 RabidGravy skids, "panda update"
22:56 skids That does not seem to, it only updates modules.list.
22:57 leont Seems my options are shelling out and using NativeCall…
22:58 Herby_ joined #perl6
22:58 Herby_ Good afternoon, everyone!
22:58 RabidGravy I just discovered that one can use an $!attribute in a where on a method parameter, against my expectations
22:59 skids Well, to be precise, "panda update" will pull new copies of individual module META files if it sees a change in the META.list, but not if just the module's META file changes.
23:01 RabidGravy ah right,
23:03 vendethiel joined #perl6
23:18 Herby_ what is the:  ->  operator used for?  I'm looking at an advent tutorial from last year
23:18 Herby_ $measurements.tap(-> $value {     say "Measured: $value"; });
23:18 Herby_ that is in the tutorial
23:19 Herby_ not sure what the ' -> ' does
23:19 awwaiid llfourn: nice! Also nice because I was telling people about traits the other day and this gives a wonderful example of user-defined attribute traits
23:19 Herby_ https://perl6advent.wordpress.com/2013/12​/19/perl-6-supplies-reactive-programming/
23:21 kid51 joined #perl6
23:23 geekosaur Herby_, http://design.perl6.org/S0​6.html#%22Pointy_blocks%22
23:23 Herby_ Thanks, geekosaur.  I'll give that a read
23:25 Herby_ m: my $sq = -> $val { $val ** 2 }; say $sq(10);
23:25 camelia rakudo-moar 34d2b6: OUTPUT«100␤»
23:34 leont zostay: IO::Glob is in the index as IO-Glob, that may be a bit confusing
23:34 Herby_ m: say 1..10;
23:34 camelia rakudo-moar 34d2b6: OUTPUT«1..10␤»
23:34 Herby_ m: say (1..3)
23:34 camelia rakudo-moar 34d2b6: OUTPUT«1..3␤»
23:34 Herby_ m: say (^5)
23:34 camelia rakudo-moar 34d2b6: OUTPUT«^5␤»
23:35 leont zostay: it's also failing its tests, apparently because it's assuming a particular order returned from IO::Path.dir
23:35 awwaiid m: say (^5).WHAT; say (1..3).WHAT
23:35 camelia rakudo-moar 34d2b6: OUTPUT«(Range)␤(Range)␤»
23:35 awwaiid m: say (^5).WHAT; say (1..3).WHAT; say (0..3).WHAT
23:35 camelia rakudo-moar 34d2b6: OUTPUT«(Range)␤(Range)␤(Range)␤»
23:35 awwaiid m: say (0..3)
23:35 camelia rakudo-moar 34d2b6: OUTPUT«0..3␤»
23:35 awwaiid *shrug*
23:36 Herby_ m: my $a = 1..5; say $a;
23:36 camelia rakudo-moar 34d2b6: OUTPUT«1..5␤»
23:36 Herby_ m: my @a = 1..5; say @a;
23:36 camelia rakudo-moar 34d2b6: OUTPUT«[1 2 3 4 5]␤»
23:36 Herby_ m: my @a = ^5; say @a;
23:36 camelia rakudo-moar 34d2b6: OUTPUT«[0 1 2 3 4]␤»
23:36 awwaiid it must have some metadata to know that ^5 is ^5 rather than 0..4
23:37 Herby_ hmm
23:59 Quom__ It's always ^5, but when flattened or accessed with [] brackets, it'll expand into a list
23:59 Quom__ m: say ^5
23:59 camelia rakudo-moar 34d2b6: OUTPUT«^5␤»
23:59 Quom__ m: say flat ^5
23:59 camelia rakudo-moar 34d2b6: OUTPUT«(0 1 2 3 4)␤»
23:59 Quom__ m: say List(^5)
23:59 camelia rakudo-moar 34d2b6: OUTPUT«(^5)␤»

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

Perl 6 | Reference Documentation | Rakudo