Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-24

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:04 tony-o_ r: Proc::Async;
00:04 camelia rakudo-moar 2ec563: ( no output )
00:04 camelia ..rakudo-jvm 2ec563: OUTPUT«Could not find symbol '&Async'␤  in block <unit> at /tmp/tmpfile:1␤␤»
00:05 ugexe i was confused because it compiled fine. But I didnt realize there was a Proc object
00:07 tony-o_ weird
00:08 tony-o_ weird
00:08 tony-o_ oops
00:19 raiph joined #perl6
00:25 mr-foobar joined #perl6
00:39 skids m: sub f(*$f) { }; f(); # Not the way I'm given to interpret the spec.
00:39 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JHnEFhQh7W␤Calling f() will never work with declared signature (Any $f)␤at /tmp/JHnEFhQh7W:1␤------> 3sub f(*$f) { }; 7⏏5f(); # Not the way I'm given to interpre␤»
00:54 aborazmeh joined #perl6
00:54 aborazmeh joined #perl6
00:58 tony-o_ skids: ??
00:58 laouji joined #perl6
01:06 ugexe m: sub f(*@f) { }; f()
01:06 camelia rakudo-moar 2ec563: ( no output )
01:06 ugexe m: sub f(*%f) { }; f()
01:06 camelia rakudo-moar 2ec563: ( no output )
01:06 ugexe slurpy can take 0 arguments
01:17 tony-o_ skids: was that in ref to a slurpy $_ ?
01:18 ugexe slurpy anything
01:18 skids Yes, the way I read it a slurpy $ should not be a mandatory parameter.
01:18 tony-o_ no i know your thing but skids comment about it ans the spec
01:19 Khisanth joined #perl6
01:22 aborazmeh joined #perl6
01:22 aborazmeh joined #perl6
01:24 atroxaper joined #perl6
01:28 Khisanth joined #perl6
01:31 dalek specs: a964d4b | hoelzro++ | S32-setting-library/IO.pod:
01:31 dalek specs: Fix typo
01:31 dalek specs: review: https://github.com/perl6/specs/commit/a964d4bd6a
01:31 bjz joined #perl6
01:38 telex joined #perl6
01:40 dayangkun joined #perl6
01:59 Khisanth joined #perl6
02:07 Khisanth joined #perl6
02:11 laouji joined #perl6
02:12 noganex joined #perl6
02:12 laouji joined #perl6
02:25 Khisanth joined #perl6
02:27 BenGoldberg joined #perl6
02:38 rmgk_ joined #perl6
02:44 Khisanth joined #perl6
02:57 Khisanth joined #perl6
03:07 bin_005 joined #perl6
03:18 TEttinger joined #perl6
03:21 TEttinger hmm. I'm not sure what quoting means in NQP, or perl in general.  if I want to read in the match of one grammar rule, but not evaluate it, is there a standard way to do that?
03:21 TEttinger lisp's single quote reader macro, as in '(1 2 3) or '(a b c)   (where a b and c are not defined variables, it still won't evaluate them so it doesn't care)
03:25 TEttinger I think quote_EXPR is something like this but I don't know if it means "like double quoted stuff" or "like a code quotation" or both
03:36 mtj_- joined #perl6
03:49 TEttinger masak: when you get the chance, I'd like to talk to you about your 007 project
04:05 atroxaper joined #perl6
04:10 Khisanth joined #perl6
04:20 laouji joined #perl6
04:23 _mg_ joined #perl6
04:27 dalek specs: 2b0a478 | hoelzro++ | S32-setting-library/IO.pod:
04:27 dalek specs: Fix typos
04:27 dalek specs: review: https://github.com/perl6/specs/commit/2b0a478b42
04:31 ilbelkyr_ joined #perl6
04:44 yeahnoob joined #perl6
04:51 atroxaper joined #perl6
04:55 dalek doc: c8c4cad | hoelzro++ | lib/Type/IO (2 files):
04:55 dalek doc: Document rename()
04:55 dalek doc: review: https://github.com/perl6/doc/commit/c8c4cadec4
04:55 dalek doc: 5f737bd | hoelzro++ | lib/Type/IO (2 files):
04:55 dalek doc: Document move()
04:55 dalek doc: review: https://github.com/perl6/doc/commit/5f737bde7b
04:55 dalek doc: d2313a5 | hoelzro++ | lib/Type/IO (2 files):
04:55 dalek doc: Document unlink()
04:55 dalek doc: review: https://github.com/perl6/doc/commit/d2313a5899
05:01 raiph joined #perl6
05:11 [Sno] joined #perl6
05:16 kaare_ joined #perl6
05:19 atroxaper joined #perl6
05:25 [Sno] joined #perl6
05:32 TimToady wow, finally caught up on backlog
05:32 yoleaux 23 Jun 2015 20:15Z <pmichaud> TimToady: in post-GLR, should arguments of cross/zip still flatten?
05:32 yoleaux 23 Jun 2015 23:10Z <[Coke]> TimToady: you ok with adding "is required" as a trait for attributes?
05:35 TimToady .tell pmichaud I'm fine with args to X/Z not flattening by default, I think, as well as circumfix:<[ ]> (but postcircumfix:<[ ]> should still be a list of flattened lists for multi-dim slicing)
05:35 yoleaux TimToady: I'll pass your message to pmichaud.
05:35 TimToady .tell [Coke] I'm okay for adding it as a toy, but maybe we want the ! modifier as someone suggested for sugar
05:35 yoleaux TimToady: I'll pass your message to [Coke].
05:36 * TimToady plans to drive 700 miles tomorrow, so had better sleep now...
05:36 TimToady zzz &
05:46 raiph joined #perl6
06:09 diana_olhovik_ joined #perl6
06:09 ][Sno][ joined #perl6
06:11 laouji joined #perl6
06:14 CIAvash joined #perl6
06:16 domidumont joined #perl6
06:20 FROGGS joined #perl6
06:33 domidumont joined #perl6
06:36 domidumont joined #perl6
06:39 laouji joined #perl6
06:41 Khisanth joined #perl6
06:42 [Tux] jnthn++, now that you fixed RT#124191 (YEAH!) I'd suggest RT#124298 for something difficult to fix :)
06:42 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124191
06:43 RabidGravy joined #perl6
06:46 RabidGravy marnin
06:49 Ven joined #perl6
06:49 CIAvash joined #perl6
06:55 laouji_ joined #perl6
06:55 bjz joined #perl6
06:57 espadrine joined #perl6
07:00 CIAvash joined #perl6
07:07 tony-o_ finally got hiker up and running
07:13 Ven \o #perl6
07:14 tony-o_ yo
07:23 masak the `!` modifier as sugar for `is required` is a really nice idea, the kind that I wish I'd thought of. :)
07:23 tony-o_ what is that going to look like?
07:23 masak (morning, #perl6)
07:24 tony-o_ sup masak
07:24 masak tony-o_: `has $.attr!;`, presumably
07:29 El_Che masak: it looks ruby-ish
07:34 masak El_Che: oh? Ruby has something similar?
07:35 abraxxa joined #perl6
07:36 El_Che masak: syntax-wise but not in that meaning
07:36 El_Che masak: they have .method, .method? and .method!
07:37 El_Che the latest returns nil if failure
07:37 TEttinger hey masak! I'm curious about your work on 007
07:38 TEttinger do you do anything like macroexpansion?
07:40 masak El_Che: oh, that one.
07:40 masak El_Che: well, it's worth pointing out that Perl 6 already has the `$foo!` syntax in parameter lists. (also with the meaning "required")
07:40 El_Che "Let's fix Perl by adding more puntuation FTW!!" :)
07:41 masak El_Che: it's tastefully placed punctuation ;)
07:41 masak TEttinger: hi! I'd love to discuss 007!
07:41 masak TEttinger: yes, macro expansion works already, at about the same level as Rakudo.
07:41 masak TEttinger: very simple example at the bottom of http://masak.github.io/007/
07:41 TEttinger click
07:42 masak TEttinger: (I'm currently working in a branch to make it work for macro operators, too)
07:42 masak TEttinger: see https://github.com/masak/007/issues for all the crazy ideas that I/we haven't gotten to yet
07:42 atroxaper joined #perl6
07:46 tony-o_ m: class A { method B { "B".say; } }; my $r = A.new; $r = &$r.B; $r.();
07:46 camelia rakudo-moar 2ec563: OUTPUT«B␤Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/a8ke4v22Zc:1␤␤»
07:46 tony-o_ m: class A { method B { "B".say; } }; my $r = A.new; $r = &$r.B; $r();
07:46 camelia rakudo-moar 2ec563: OUTPUT«B␤Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/sJhQxo_PlT:1␤␤»
07:46 TEttinger masak, so as I understand it, your user-written macros return an AST, that then gets put in place of the macro's call positions at compile time?
07:47 TEttinger (like common lisp)
07:47 atroxaper joined #perl6
07:53 masak TEttinger: that is right.
07:53 masak m: macro foo { quasi { say "OH HAI" } }; foo()
07:53 camelia rakudo-moar 2ec563: OUTPUT«OH HAI␤»
07:53 TEttinger whaaaat it's in rakudo?
07:54 zakharyas joined #perl6
07:57 RabidGravy unfortunately it's doesn't work soon enough for types,
07:57 RabidGravy m: macro blip { quasi { Int } }; my blip $a
07:57 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5===␤Type 'blip' is not declared␤at /tmp/JkIzhQ9bzv:1␤------> 3macro blip { quasi { Int } }; my blip7⏏5 $a␤Malformed my␤at /tmp/JkIzhQ9bzv:1␤------> 3macro blip { quasi { Int } }; my7⏏5 blip $a␤␤»
07:57 RabidGravy which is a peculiar use case I have right now
07:57 tony-o_ what is the benefit of that?
07:58 masak TEttinger: it's in Rakudo, but part of the reason I'm doing 007 is to scout ahead, because I see we need something better in Rakudo.
07:59 masak TEttinger: see my blog for details.
07:59 RabidGravy well, the actual code I want is "macro NInt { if $?BITS == 64 { quasi { num64 } } else { quasi { num32 } } }"
07:59 RabidGravy or something like that
08:00 moritz note that this won't work as a type constraint
08:00 moritz marcos are only allowed in term position right now
08:07 masak S06 is a bit vague on this.
08:07 masak it only gives examples of macros in term position, and it only really makes sense for them the way they are presented to be in term position.
08:08 masak but practically everyone wants them to work in a wider context than that.
08:08 masak I don't have a good solution to that yet.
08:12 darutoko joined #perl6
08:17 mst expression macros are awesome
08:18 dakkar joined #perl6
08:22 masak mst: in RabidGravy's case, he wants to write something like `my NInt $foo;`, but the problem is that the parser is not looking for the macro `NInt` when it's about to parse a type.
08:22 mst ah
08:22 masak Lisp has an easier time there, because "everything is an expression" in some sense.
08:22 masak in Perl, not everything is.
08:23 mst that's interesting actually
08:23 mst their example sounds like it doesn't need macros
08:23 ShimmerFairy masak: question: do macros have a way of being classified by what type of thing they return? I wonder what it would be like if you could do things like    macro foobar makes QAST::Something::Type { ... }
08:23 mst I mean, in perl5 I'd just alias it to one or the other
08:24 masak if I were to handwave a solution, I'd go "well, expressions are one of many contexts where macros could occur. we just need to catalogue and allow all the other contexts."
08:24 mst but the problem's quite fascinating
08:24 ShimmerFairy I've always found Lisp's "everything is an expression" to make it impossible to figure out what macros exactly _are_.
08:24 mst I prefer fexprs
08:25 mst macros are kinda restrictive, having access to the full power at runtime rather than compile time is way more fun
08:26 colomon joined #perl6
08:26 moritz TIL that there aren't only sexprs, but also fexpres
08:26 moritz are there also exprs for the other letters of the alphabet?
08:27 RabidGravy the type thing is because you can't use an expression everywhere you might want a type so
08:27 RabidGravy m: $?BITS == 64 ?? num64 !! num32; my $nint⏏ $thing;
08:27 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mlv5_MAYSG␤Variable '$?BITS' is not declared␤at /tmp/Mlv5_MAYSG:1␤------> 3<BOL>7⏏5$?BITS == 64 ?? num64 !! num32; my $nint␤»
08:27 RabidGravy won't fly either
08:27 RabidGravy except I failed to copy the entire line
08:27 RabidGravy m: use NativeCall; my $nint = $?BITS == 64 ?? num64 !! num32; my $nint $thing;
08:27 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/K_qUlmouF8␤Variable '$?BITS' is not declared␤at /tmp/K_qUlmouF8:1␤------> 3use NativeCall; my $nint = 7⏏5$?BITS == 64 ?? num64 !! num32; my $nint␤»
08:28 moritz m: constant myname = rand() < 0.5 ?? num64 : num32; my myname $x = 3e5;
08:28 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZHULYlLpRw␤Unsupported use of rand(); in Perl 6 please use rand␤at /tmp/ZHULYlLpRw:1␤------> 3constant myname = rand7⏏5() < 0.5 ?? num64 : num32; my myname $x ␤»
08:28 moritz m: constant myname = rand < 0.5 ?? num64 : num32; my myname $x = 3e5;
08:28 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/By7RH7fui7␤Please use !! rather than :␤at /tmp/By7RH7fui7:1␤------> 3constant myname = rand < 0.5 ?? num64 :7⏏5 num32; my myname $x = 3e5;␤    expecting any of:␤        colon pair␤»
08:28 moritz m: constant myname = rand < 0.5 ?? num64 !! num32; my myname $x = 3e5;
08:28 camelia rakudo-moar 2ec563: ( no output )
08:28 TEttinger hm
08:28 RabidGravy ooh
08:28 RabidGravy will try that in the actual code later
08:28 ShimmerFairy masak: would it be correct to think of macros as just generators for various kinds of things? For some reason I want to think of C++ templates as kind of class/function macros, based on that "generator" definition.
08:30 RabidGravy right, now to finish this patio. Catch you all later
08:31 [Sno] joined #perl6
08:33 [ptc] .tell hoelzro what is your opinion regarding the use of panda in Travis builds?  Should we retain panda and use panda-test, or remove panda support and just use a prove incantation?
08:33 yoleaux [ptc]: I'll pass your message to hoelzro.
08:34 bin_005 joined #perl6
08:34 itz joined #perl6
08:34 itz non specific tz greeting
08:37 rindolf joined #perl6
08:41 moritz itz: it is always morning in UGT
08:46 eternaleye joined #perl6
08:53 atroxaper joined #perl6
08:58 tadzik https://github.com/FourMan/4 this may amuse some of you :)
09:08 masak ShimmerFairy: "generate, analyze, typecheck" is the slogan, yes.
09:08 masak ShimmerFairy: see link about this in http://strangelyconsistent.org/blog/mac​ros-progress-report-after-a-long-break
09:09 espadrine joined #perl6
09:10 smls joined #perl6
09:10 gcole joined #perl6
09:11 amurf joined #perl6
09:13 ShimmerFairy masak: btw, when writing C++ I've found that macros are nice for abstracting repetitive code. In particular implementing the basic arithmetic ops for a type (+-*/%), where the only change is the symbol for the operator. Can P6 macros take care of something like that currently?
09:14 ShimmerFairy something like  macro classoper($op) { sub infix:<{{{$op}}}>($a, $b) { ... } }  , or whatever the proper syntax is :P
09:16 vendethiel joined #perl6
09:21 kaare_ joined #perl6
09:26 rarara joined #perl6
09:27 tadzik feels like there should be an easier way, like "does Numeric"
09:28 smls .oO(  class Vector does Numeric { method ADD { ... }; ... }  )
09:29 smls masak's 007 looks interesting btw. Though of course requiring parens for function calls, is heresy... :P
09:30 ShimmerFairy You don't want to see my toy language then :P
09:31 smls I guess it's the price to pay for getting rif of sigils.
09:31 smls *rid
09:31 masak no, I could support listops, even without sigils.
09:31 masak it's just I don't feel it's worth the extra complexity.
09:31 smls when then you'd give up reliable TTIAR based errors?
09:32 masak also not a problem. Perl 6 has listops.
09:32 masak but yeah, there are some warts. I tried to solve them in another toy language of mine, Nugget.
09:32 masak like what does `foo;` mean?
09:33 masak and how do you refer to the function as a noun?
09:33 smls yeah
09:34 smls Though I must admit, the lack of sigils in itself doesn't bother me as much as it maybe should (as a Perl/Perl 6 advocate)... :P
09:35 smls In fact, there are times when I wonder if they still pull their weight in Perl 6.
09:35 smls now that the "..{EXPR}.." syntax has significantly reduced advantage regarding string interpolation
09:36 smls and the GLR seems to be significantly reducing their automatic flattening advantage
09:38 bin_005_l joined #perl6
09:41 masak I still like them, and I especially like how Perl 6 promises to fit "non-standard" data types into the $@%& model.
09:41 smls yeah, they're nice as syntactic sugar in variable declarations and routine signatures
09:42 smls my @foo;   is nicer than   my Positional foo = [];
09:44 smls Also, without sigila how would we have twigils  :D
09:44 masak probably the way Ruby has them, as sigils.
09:44 smls heh, I suppose so
09:47 masak anyway, I figure if I/we can use 007 as a "playground", that might be the quickest path to finding out exactly how Perl 6 macros should look.
09:47 masak I'm really close to being able to do cool things with synthetic Qtree objects in 007. looking forward to when that works and is effortless.
09:48 masak it already made me realize that we need an "AST strengthening" operation/phase: https://github.com/masak/007/issues/5
09:52 lue joined #perl6
09:58 jaffa4 joined #perl6
09:58 jaffa4 hi all
09:59 jaffa4 How can I match a string with different regex, continueing matching... or trying to match the same string if the previous regex fails?
10:00 JimmyZ m: say 'foobar' ~~ / 'fr' | 'foo '/
10:00 camelia rakudo-moar 2ec563: OUTPUT«Nil␤»
10:00 JimmyZ m: say 'foobar' ~~ / 'fr' | 'foo'/
10:00 camelia rakudo-moar 2ec563: OUTPUT«「foo」␤»
10:00 JimmyZ m: say 'foobar' ~~ / 'fr' || 'foo'/
10:00 camelia rakudo-moar 2ec563: OUTPUT«「foo」␤»
10:00 atroxaper joined #perl6
10:00 jaffa4 if regexes are separate
10:01 JimmyZ you can make it a token
10:01 JimmyZ two token, and combine it as a regex?
10:02 jaffa4 IN perl5, this was if ( $instr ~~ /\G([\"\'])/gc ) {
10:02 jaffa4 g+ c switches
10:03 * JimmyZ knows nothing about it in perl5
10:09 atroxaper joined #perl6
10:09 smls jaffa4: http://design.perl6.org/S05.html#line_318
10:10 jaffa4 thanks, smls
10:10 smls jaffa4: Though it is much less neede in Perl 6
10:11 smls because we can now get nested capture trees from a single match
10:12 smls so in your example, you may be able to simply do    $instr ~~ /[.*? (<["']>)]+/  and have all matches in $0
10:17 Ven joined #perl6
10:18 masak m: my $r1 = /foo/; my $r2 = /bar/; my $r = / $r1 | $r2 /; say "foo" ~~ $r; say "bar" ~~ $r; say "baz" ~~ $r
10:18 camelia rakudo-moar 2ec563: OUTPUT«「foo」␤「bar」␤Nil␤»
10:18 masak m: my $r1 = /foo/; my $r2 = /bar/; my $r = / $r1 | $r2 /; say so "foo" ~~ $r; say so "bar" ~~ $r; say so "baz" ~~ $r
10:18 camelia rakudo-moar 2ec563: OUTPUT«True␤True␤False␤»
10:18 masak jaffa4: maybe something like ^ ?
10:21 jaffa4 say so?
10:23 jaffa4 Where can I see what modules are being translated?
10:23 jaffa4 or would be good to be translated?
10:24 atroxaper joined #perl6
10:24 [ptc] jaffa4: have a look at the most wanted modules file: https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/modules.md
10:25 [ptc] jaffa4: there's a link to it from modules.perl6.org.
10:25 [ptc] hope that helps :-)
10:26 masak jaffa4: `say so` means "I'm only interested in True/False, not the whole Match"
10:27 masak jaffa4: `so` is a lower-precedence version of `prefix:<?>`
10:27 masak jaffa4: just like `not` is of `prefix:<!>`
10:28 jaffa4 Does it force boolean context?
10:29 [ptc] tadzik: panda seems to only support installing modules that have source-url set in the metainfo, however some modules use only repo-url (e.g. Tardis) and some others use only support => source (e.g. Kains)
10:29 moritz repo-url is probably quite old, and should be deprecated
10:29 [ptc] tadzik: support => source is actually what's in the design documents, however isn't used much in metainfo in the ecosystem modules
10:30 tadzik [ptc]: yeah. repo-url is obsolete for ages, as for support.source... I don't know where it came from :D
10:30 [ptc] moritz: I think so too
10:30 moritz panda should support support => source and source-url
10:30 tadzik oh? I really don't like that then
10:30 [ptc] tadzik: so should I try implementing 'support => source' support in panda?
10:30 tadzik I don't think support section is an appropriate place for a mandatory field like that
10:30 smls jaffa4: That's one way to put it. Though Perl 6 has not actually have 'context' in the Perl 5 sense. I believe prefix:<?> and prefix:<so> simply calls .Bool on their argument, and return the result.
10:30 * moritz doesn't care much where it came from, but that it's consistent
10:30 * [ptc] agrees
10:31 jaffa4 then casting....
10:31 tadzik [ptc]: I'd rather argue with spec a bit first :P
10:31 [ptc] tadzik: go for it :-)
10:31 tadzik So I need to get ahold of FRO<TAB><TAB> and lizmat
10:32 smls jaffa4: Yes. Though we don't always think of it that way; you'll still hear people say
10:32 smls "evaluate in boolean context"
10:32 [ptc] to clear that issue up would be really good, then I can patch the few modules that use repo-url, and those that use support => source
10:32 [ptc] ... and possibly submit patches to update the design docs
10:34 sqirrel joined #perl6
10:34 tadzik I like your enthusiasm :)
10:34 [ptc] thanks!
10:34 tadzik hey, what's the name of that translation library that all projects use?
10:34 tadzik gnu thing, iirc
10:35 [ptc] I'd really like to have most of the modules working and almost all of the deprecated code out of the modules before "Xmas"
10:35 DrForr Gettext?
10:35 tadzik yes, thank you
10:36 DrForr Who in their right mind uses mozzarella for a Caesar salad?...
10:38 atroxaper joined #perl6
10:38 * masak .oO( I said "Caesar salad", not "Käse salad" )
10:39 sue somebody generous (i like mozzarella)
10:40 * [ptc] .oO( "Ceasar salad"?  "Yes, I see ze salad" )
10:41 FROGGS joined #perl6
10:44 atroxaper joined #perl6
10:44 itz Caesar salad? No I paid for mine
10:49 mst beware the iceberg of march
10:51 kaare__ joined #perl6
10:55 itz Greek Salad? No someone else paid for it
10:55 atroxaper joined #perl6
10:57 atroxaper joined #perl6
10:59 b2gills joined #perl6
11:00 amurf joined #perl6
11:03 atroxaper joined #perl6
11:04 [ptc] Waldorf salad?  Sorry, we're completely out of Waldorf.
11:18 telex joined #perl6
11:19 leont joined #perl6
11:19 moritz Geek Salad?
11:20 jaffa4 What should user as eval {} in Perl 6?
11:20 [ptc] Beware geeks bearing gifts
11:21 itz jaffa4: EVAL
11:21 moritz no, try
11:21 moritz eval { } in perl 5 catches exception, nothing more
11:21 moritz (well, a bit more, but not much more; no code evaling, at least)
11:22 jaffa4 Does try catch all?
11:22 moritz yes
11:22 Emeric joined #perl6
11:22 Emeric left #perl6
11:22 moritz except if you add a custom CATCH block that lets through some exceptions
11:23 Begi joined #perl6
11:24 Begi Hello ! Do someone use Perl6 (Rakudo) with Windows 8 ?
11:25 ShimmerFairy joined #perl6
11:27 abraxxa joined #perl6
11:30 FROGGS Begi: I only used it on Win7 and Windows XP yet
11:31 pdcawley joined #perl6
11:31 dakkar joined #perl6
11:34 jaffa4 what is this Placeholder variable @_ may not be used here because the surrounding block takes no signature?
11:37 moritz jaffa4: it means exactly what it says
11:38 moritz pro tip: don't try to program Perl 5 in Perl 6
11:38 jaffa4 sub process_this_file {
11:39 jaffa4 I have similar code, and I do get this error message
11:39 nwc10 I forget - is there a way to get any (obviously) unnamed arguments, if one calls that as process_this_file('foo', 'bar');  ?
11:39 itz I spent 30 mins this morning trying to program perl5 in perl6 before I spent the 5 mins reading the docs :)
11:39 jaffa4 moritz:  I have similar code and I do not get this error message
11:40 moritz m: sub f() { return { @_ } }
11:40 camelia rakudo-moar 2ec563: ( no output )
11:40 moritz m: sub f() { return -> { @_ } }
11:40 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z5rzFzTf3I␤Placeholder variable '@_' cannot override existing signature␤at /tmp/Z5rzFzTf3I:1␤------> 3sub f() { return 7⏏5-> { @_ } }␤»
11:40 moritz jaffa4: then maybe show the code that produces the error
11:40 nwc10 m: -> { @_ }
11:40 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I_s4D9maf0␤Placeholder variable '@_' cannot override existing signature␤at /tmp/I_s4D9maf0:1␤------> 3<BOL>7⏏5-> { @_ }␤»
11:40 moritz m: sub f { return { @_ } }
11:40 camelia rakudo-moar 2ec563: ( no output )
11:41 moritz m: { @_ }
11:41 camelia rakudo-moar 2ec563: ( no output )
11:42 Begi FROGGS : When I launch my .pl file with Windows 8, I have this error : Bytecode stream shorter than header....
11:42 jaffa4 moritz:  https://gist.github.com/ja​ffa4/50d6cf69507335368fba
11:43 Begi I laaunch it with moar.exe
11:43 lizmat m: sub f() { return -> (*@_) { @_ } }
11:43 camelia rakudo-moar 2ec563: ( no output )
11:44 FROGGS Begi: you should launch it with perl6
11:45 moritz jaffa4: which line number?
11:45 jaffa4 3546
11:46 jaffa4 you can see the error message if you run it with perl6-m
11:47 Begi FROOGS : perl6, what's the name of the file ?
11:47 jaffa4 moritz: I do not get an error for the sub only
11:48 jaffa4 Is there way to see what is surronding block?
11:49 moritz m: module Perl::Tidy; sub check_syntax {
11:49 camelia rakudo-moar 2ec563: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y8pHnSPnEG␤Missing block␤at /tmp/Y8pHnSPnEG:1␤------> 3module Perl::Tidy; sub check_syntax {7⏏5<EOL>␤Saw 1 occurrence of deprecated code.␤==========================​==============================…»
11:49 moritz m: module Perl::Tidy; sub check_syntax { @_ }
11:49 camelia rakudo-moar 2ec563: OUTPUT«Saw 1 occurrence of deprecated code.␤==========================================​======================================␤Semicolon form of 'module' without 'unit' seen at:␤  /tmp/5raVnvIrKM, line 1␤Deprecated since v2015.4, will be removed with releas…»
11:49 moritz jaffa4: dunno; but I'd recommend to use a proper signature instead
11:50 jaffa4 I get an error in that case too
11:50 jaffa4 moritz:
11:51 moritz jaffa4: I don't
11:51 moritz I just get the deprecation warning
11:52 moritz oh yes, I do
11:52 moritz no, for a different sub
11:54 jaffa4 Which one did you modify?
11:54 jaffa4 I get variable truth is not declared
11:56 moritz jaffa4: I modified check_syntax
11:57 moritz anyway, I currently don't have the time to wade through several thousand lines of half-converted Perl 5
11:57 moritz my advise would just be write more 6-y code
11:57 jaffa4 I think the problem is , the compiler does not give enough information
11:58 jaffa4 it is a guessing game
11:58 moritz if you can boil it down to a minimal test case, you are free to submit it as a rakudo bug
11:59 moritz though my suspicion is that if if you do reduce it to a minimal test case, you'll actually find your error in the process (likely incorrect nesting of scopes/packages/subs/whatever)
12:00 masak jaffa4: Rakudo used to give very little information in error messages. nowadays, it's much better.
12:00 cognominal joined #perl6
12:00 jaffa4 improving I can say
12:00 jaffa4 in this case, it is weird
12:01 moritz the boundary between "giving helpful error messages" and "garbage in => garbage out" is often fluid
12:01 masak jaffa4: if you have a case with too little information, that is something we're interested in fixing. so yes, please submit a minimal case that triggers your problem.
12:01 itz as a perl5 programmer I was pleasantly surprised by the helpful rakudo messages
12:01 masak jaffa4: but please make it minimal. I agree with moritz; it's hard to know whether it's you or the compiler that's confused until you've golfed it down to a small piece of code.
12:01 itz is it possible to reverse moarvm bytecode to source?
12:01 jaffa4 I saw many helpful ones but I stumbled into unhelpful one
12:01 masak itz: possible? yes.
12:01 masak itz: has someone actually done it? not that I know.
12:03 dalek rakudo/nom: 8988d39 | lizmat++ | src/core/EnumMap.pm:
12:03 dalek rakudo/nom: Remove deprecated scheduled for deletion
12:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8988d39816
12:03 ][Sno][ joined #perl6
12:03 * moritz would like a command line switch that makes all deprecations fatal, and use that when running the spectest suite
12:03 dalek roast: 2c82fd6 | lizmat++ | S02-types/deprecations.t:
12:03 dalek roast: Remove test for removed deprecated code
12:03 dalek roast: review: https://github.com/perl6/roast/commit/2c82fd6100
12:04 lizmat moritz: would an env variable do the trick as well ?
12:04 moritz lizmat: aye
12:04 lizmat ok, that should be easily done  :-)
12:05 masak ++lizmat
12:05 jaffa4 I figure out $truth ius reserved?
12:05 moritz jaffa4: most certainly not
12:06 moritz m: my $truth = 42; say "{$truth / 2} is only half the truth!"
12:06 camelia rakudo-moar 2ec563: OUTPUT«21 is only half the truth!␤»
12:06 dalek roast: 891df00 | lizmat++ | S02-types/assigning-refs.t:
12:06 dalek roast: Unfudge now passing tests
12:06 dalek roast: review: https://github.com/perl6/roast/commit/891df00f6d
12:18 cognominal It is fascinating in the paper pointed by lizmat, that the guy uses Perl 6 but must provide excuses for that. Interesting that Perl (here 6) "does the job" even in academic setting, but like in most company settings it is a shameful thing you would shove under the rug if you could.
12:23 hoelzro o/ #perl6
12:23 yoleaux 08:33Z <[ptc]> hoelzro: what is your opinion regarding the use of panda in Travis builds?  Should we retain panda and use panda-test, or remove panda support and just use a prove incantation?
12:23 * Ven missed said paper
12:24 Ven cognominal: mind pointing me to it?
12:24 cognominal probably, one of the Perl "sins" is that, unlike lisp, you cannot write a reader as one of the first exercices.  Grammar.nqp is ~5k long. So an accident, lisp lack of syntax is turned into a dogma, homoiconicity.
12:25 cognominal Ven, http://www.pps.univ-paris-diderot.fr​/~gc/papers/contravarianceagain.pdf
12:26 hoelzro [ptc]: if we remove panda support, we need to find a way to generate our own Makefiles to build and test more complex modules
12:26 hoelzro I see ugexe's point, though
12:26 cognominal Ven, the guy who wrote that works for the CNRS at Paris Diderot  :)
12:27 Ven cognominal: I inferred that from the domain name :P
12:27 Ven the name rings a bell
12:27 xiaomiao cognominal: deviating from (socially expected?) norms is expensive
12:27 cognominal in such setting, may be, not using OCaml is a sin  :)
12:28 cognominal ...or Coq(orico)
12:28 hoelzro I tried building the docs last night, but I got a 'const_iX NYI' failure.  I tried again with a checkout of 2015.05, same thing.  Has anyone else been running into this?
12:30 lizmat hmmm... a suprising number of spectest fail with deprecations being fatalized
12:34 moritz which means we should have done that sooner :-)
12:35 colomon moritz++ lizmat++
12:35 * moritz only did the talking, lizmat++ did the work :-)
12:35 lizmat talking is good  :-)
12:35 smls so for the other side of the coin, can we now make deprecation warning in release builds opt-in? :P
12:36 moritz no
12:36 smls :(
12:36 moritz nobody ever enables opt-in warnings
12:36 moritz which means they don't fix the deprecations
12:37 moritz and then there's no point in having them at all
12:37 smls well, end-user seldom fix upstream code anyway
12:37 moritz that's one of the lessons perl 5 learned the hard way
12:37 lizmat yeah, but the report should be easily forwardable
12:37 dalek perl6-most-wanted: 63e9b23 | timo++ | most-wanted/modules.md:
12:37 lizmat even by end-users
12:37 dalek perl6-most-wanted: it'd be cool to have access to DBus
12:37 dalek perl6-most-wanted:
12:37 dalek perl6-most-wanted: sd-bus seems kinda nice.
12:37 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/63e9b23a34
12:37 moritz smls: but at least they can report them to the author
12:37 smls people who should see the warnings:  1) developers, 2) testers, 3) packagers
12:37 smls not end-users
12:37 lizmat or by packagers
12:37 moritz in real live, end-users also act as testers
12:38 lizmat who could also use the info to patch themselves before moving them upstream
12:38 smls well, packagers run unit tests (assuming the build system does it automatically, as it does in panda)
12:39 moritz smls: then in our ideal world, the packers fix the deprecations, and the user doesn't see them anymore
12:39 smls so they don't need to see the warnings outside of test runs
12:39 smls that leaves no grace period though
12:39 moritz if that doesn't work, it's better to bother the user with deprecation warnings than to swallow them whole, and later break the code (which the unit tests won't catch; otherwise they'd be fixed)
12:40 smls if warning were only visible during building, packagers would have to "fix" them when they create the next package revision
12:40 smls now, they have to fix all Perl 6 program packages as soon as a new Rakudo or upstream module deprecates something
12:40 moritz smls: that might work well for compile-time warnings, but not for run-time warnings
12:40 Ven cognominal: I already caught an error in the paper :P
12:41 smls unit tests (which are run before pre-compiling) should check run-time stuff
12:41 moritz but often enough don't
12:42 smls well, that's up to the program devs
12:42 smls I don't think compiler writers should force that "safety" on down-stream devs at the expense of end-users.
12:42 lizmat Ven: I'm pretty sure the author would like to know  :-)
12:43 Ven lizmat: who should I ping? it's only errors in the code, though
12:43 lizmat Giuseppe Castagna <gc@pps.univ-paris-diderot.fr> by mail I guess
12:43 lizmat and/or invite him to the channel  :-)
12:44 smls moritz: End-users will also report to the author if the program starts failing because a previously deprecated feature has been removed altogether.
12:44 lizmat smls: yeah, but that should be prevented, no?
12:44 smls By forcing them to adabt immediately to a deprecation, undoes the whole point of having a grace period which is what deprecatios are for
12:45 smls lizmat: prevented by forcing it to happen earlier?
12:45 lizmat ah, yes, RAKUDO_DEPRECATIONS_FATAL should only be optional
12:45 lizmat so there should be a grace period, indeed
12:46 smls well, a non-fatal deprecation warning is as bad as a fatal one, if your program considers its STDOUT/STDERR its user interface
12:46 moritz also, deprecations only activate in versions higher than the release
12:46 smls which should be kept tidy and user-facing
12:46 moritz so if you switch to releases, the module and program authors have a month of grace period
12:46 lizmat smls: please note that deprecations are only written to STDERR *after* the program is done
12:47 lizmat so in a lot of cases, there should be no issue
12:47 moritz if you use a bleading edge rakudo from git, you can be bothered to submit deprecations warnings to the module authors
12:47 moritz smls: please ask nwc10 how well (or not well) opt-in deprecation warnings worked for Perl 5
12:48 moritz lizmat: if you push your RAKUDO_DEPRECATIONS_FATAL patch to rakudo (without enabling it in the tests yet), I could start going through roast
12:48 kaare__ joined #perl6
12:49 lizmat moritz: I'm seeing odd things in the patch, checking whether it is something I did
12:49 * [Coke] waves.
12:49 yoleaux 05:35Z <TimToady> [Coke]: I'm okay for adding it as a toy, but maybe we want the ! modifier as someone suggested for sugar
12:50 smls moritz: So why not suppress them on *all* stable released Rakudo versions, and *only* force users of git builds to become deprecation testers?
12:51 moritz smls: because experience in perl 5 shows that this doesn't work well.
12:51 smls well for whom?
12:51 moritz smls: it doesn't work well for anybody
12:52 smls .oO( Maybe sympathy for keeping STDERR fully under the program's control is underdeveloped among programmers who tend to write server or GUI apps?)
12:52 moritz not for the perl 5 core devs, who write deprecation warnings that nearly nobody actually sees
12:52 moritz nor for the developers, who don't get feedback on their use of deprecated features
12:52 smls You wouldn't want GTK::Simple to force a label with deprecation warning on the tope of the main window?
12:52 smls Or your server app to send them at the top of every HTML page?
12:53 moritz nor for the end-users, who get broken software when the deprecated feature was removed
12:53 lizmat smls: would you be happier if we would send deprecation output to a file optionally?
12:53 moritz smls: I prefer it over completely broken software
12:54 moritz but then I'm not the perfectionist that I used to be when I was younger
12:54 smls lizmat: How would that be controlled?
12:55 smls If it with a pragma, care shoudl be taken that it does not affect unit-test runs.
12:56 smls moritz: Having 1 month (=1 Rakudo release cycle) grace period, is at least something.
12:57 moritz smls: did a deprecation warning cause you some actual trouble?
12:57 smls If post-6.0 releases start to be spaced out more (akin to Perl 5), this should period will automatically become longer right?
12:57 moritz yes
12:58 smls Then I might actually be fine with that system.
12:58 smls Basically a 3-stage approach:  First the warning is endabled for testers and bleeding-edge users;  later for everyone;  later becomes fatal.
13:01 dalek rakudo/nom: 98e36a3 | lizmat++ | src/core/Deprecations.pm:
13:01 dalek rakudo/nom: Introduce RAKUDO_DEPRECATIONS_FATAL env var
13:01 dalek rakudo/nom:
13:01 dalek rakudo/nom: When set to a true value, will die with the deprecation error report
13:01 dalek rakudo/nom: as soon as the deprecation is seen.
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/98e36a37ff
13:01 aborazmeh joined #perl6
13:01 aborazmeh joined #perl6
13:01 lizmat lunch&
13:01 smls re "actual trouble": not in the sense of systems crashing and rockets exploding, no. But in the sense of not standing in the way of delivering the best possible user experience. (Which, imo, includes forward-compatibility. Even if you fix a deprecation warning in your program right away, users may not install your new version right away.
13:02 smls (but they may get a new compiler version during that time from their distro etc.)
13:03 [Coke] it's easier in java, when you can get the deprecation warnings at compile time, not runtime.
13:07 jaffa4 rakudo: my $b = Mu;  if ($b) { print "do";}
13:07 camelia rakudo-moar 8988d3: ( no output )
13:07 jaffa4 rakudo: my $b = 1;  if ($b) { print "do";}
13:07 camelia rakudo-moar 8988d3: OUTPUT«do»
13:08 atroxaper joined #perl6
13:09 muraiki joined #perl6
13:12 moritz m: if 'abc' !~~ /['"]/ { say "foo" }
13:12 camelia rakudo-moar 8988d3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ASXzRhBTpo␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/ASXzRhBTpo:1␤------> 3if 'abc' !~~ /['"]/ { say "foo" }7⏏5<EOL>␤    expecting any of:␤        single quot…»
13:13 geekosaur joined #perl6
13:19 FROGGS moritz: I already replied to that ticket
13:26 [ptc] hoelzro: I see ugexe's point as well.  However, feel that using panda is the better way.
13:26 hoelzro agreed
13:26 moritz FROGGS: yes, just saw it in RT
13:28 dalek specs/substr-range: e337b93 | hoelzro++ | S32-setting-library/Str.pod:
13:28 dalek specs/substr-range: Propose Str.substr(Range)
13:28 dalek specs/substr-range: review: https://github.com/perl6/specs/commit/e337b938b4
13:30 JimmyZ_ joined #perl6
13:30 [ptc] hoelzro: it'd be good to have the build scripts that we've got running on the TravisCI infrastructure just to see if everything works.
13:31 [ptc] hoelzro: surely we can update the code later to improve things if necessary
13:32 masak hoelzro: maybe say something about the indices needing to be Real?
13:32 [ptc] hoelzro: I'll tell BanzaiMan to roll out the build scripts the way they are.  Are you OK with that?
13:32 skids joined #perl6
13:39 dalek roast: a7b55f7 | lizmat++ | S02-types/ (2 files):
13:39 dalek roast: Make sure deprecations tests don't die
13:39 dalek roast: review: https://github.com/perl6/roast/commit/a7b55f738c
13:43 dalek ecosystem: 07cf973 | (Steve Mynott)++ | META.list:
13:43 dalek ecosystem: add App::p6tags - editor tag generator
13:43 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/07cf9735d6
13:45 bjz joined #perl6
13:48 masak hm, https://en.wikipedia.org/wiki/Fexpr sounds kind of similar to http://strangelyconsistent.org/​blog/macros-thunkish-parameters
13:49 TimToady .oO(The only thing we have to fexpr is fexpr itself...)
13:52 masak feh :P
14:01 * TimToady ->
14:01 * TimToady -> Tahoe
14:04 jnthn .oO( of gotahoe.com fame... )
14:05 colomon .oO( is that like the current American TV show Got Ham? )
14:06 [Sno] joined #perl6
14:11 hoelzro masak: alright, I'll put that in there
14:11 hoelzro [ptc]: I'm good with that
14:18 hoelzro when you all get a chance, could you provide feedback on https://github.com/perl6/specs/pull/93, and whether that would be a good addition to the standard library?
14:18 skids joined #perl6
14:29 * smls just realized that the Artistic License 2.0 inherently allows the code to be redistributed under the GPL (or similar free software licenses), and that's why Rakudo/Perl6 no longer needs the dual-licensing which Perl 5 used (Artistic 1.0|GPL1+).
14:30 jaffa4 how would you write that in Perl 6?  @token_short_names{@identifier} = ('i') x scalar(@identifier);
14:30 timotimo just xx *
14:31 timotimo though you'd of course write %token_short_names instead of @token_short_names
14:31 jaffa4 xx instread of x?
14:31 masak yes.
14:32 timotimo x is for string repetition only in perl6
14:33 rindolf joined #perl6
14:33 jaffa4 What would be  the benefit of having perl tidy in Perl6?
14:34 jaffa4 It is in the list of doable modules
14:35 timotimo having a tidy-up-my-code tool is always nice
14:35 smls I guess that was meant to refer to creating a perl6tidy in Perl 6 (not doing a plain port of perltidy)
14:36 tadzik a Perl6::Grammar subclass that emits the source, but with spaces rearranged :)
14:38 amurf joined #perl6
14:44 muraiki p6fmt
14:44 muraiki heh :)
14:46 raiph joined #perl6
14:48 zakharyas1 joined #perl6
14:58 atroxaper joined #perl6
14:58 aborazmeh joined #perl6
14:58 aborazmeh joined #perl6
14:59 jaffa4 How can I override signals n Perl6?
15:00 timotimo http://design.perl6.org/S17.html#​System_events_exposed_as_Supplies
15:14 ugexe should a module installer try to compile/install a distribution that does not list all its files `use`d in the 'provides'? if the file is listed but uses an absolute path instead of a relative, could this safely be turned into a relative path to see if it matches any modules to correct a leading mistaken '/' (like /lib/Some/Module instead of lib/Some/Module)?
15:18 jaffa4 Is there way to declare a list of variable without using comma, like using space?
15:19 PerlJam jaffa4: you have something against commas? :)
15:19 jaffa4 qw(....
15:19 jaffa4 in Perl 5
15:20 PerlJam jaffa4: Perl 6 uses < > for qw()
15:20 PerlJam assuming you mean  my ($foo,$bar,$baz) = <foo bar baz>;   # like this?
15:22 jaffa4 my ($foo $bar $baz)
15:24 PerlJam jaffa4: why do you want to do this?  What's wrong with using comma?
15:25 PerlJam ugexe: your first question doesn't make sense to me.  the "files used" is more of a "depends" thing than a "provides" thing.
15:25 dha joined #perl6
15:26 jaffa4 PerlJam: I was convering Perl5 code which uses use vars(.......
15:27 PerlJam oh.
15:29 PerlJam "use vars" was kind of a mistake IMHO.  while it doesn't do exactly the same thing, you can convert it to   our ($foo,@bar,%baz);
15:29 PerlJam in fact, I think the docs for vars says not to use it
15:31 moritz Perl 6 code should try to avoid 'our' variables too
15:31 moritz lexicals generaly work much better
15:31 moritz (or OO, and no globals)
15:31 PerlJam moritz: sure, but ... one thing at a time  :)
15:32 moritz PerlJam: I have to object
15:32 moritz if you write crappy / unidiomatic Perl 6 code, your Perl 6 experience will suck
15:33 moritz so it's good for mental sanity to start out with not-too-bad code
15:33 PerlJam moritz: in converting Perl 5 code to Perl 6, the introduction of too many new concepts into the code too fast will also cause the experience to suck (IMHO)
15:34 PerlJam or, put another way,  "I just wanted to convert this code, not redesign the thing!"
15:35 smls m: my $x = 42; class A { method a { say $x } }; A.a
15:35 camelia rakudo-moar 98e36a: OUTPUT«42␤»
15:35 smls ^^ In Perl 5 this would fail
15:35 moritz it would?
15:35 PerlJam yeah, because that's Perl 6, not Perl 5  ;)
15:35 smls hm
15:35 smls ah, with subroutines it would fail
15:36 PerlJam smls: why exactly?
15:36 smls m: sub x { 42 }; class A { method a { say x } }; A.a
15:36 camelia rakudo-moar 98e36a: OUTPUT«42␤»
15:36 moritz $ perl -wE 'my $x = 42; { package A; sub a { say $x } }; bless({}, A)->a()'
15:36 moritz 42
15:36 moritz perl -wE 'my $x = 42; { package A; sub a { say $x } }; A::a()'
15:36 moritz also works
15:36 smls right, I mixed that up, it works with my variables
15:36 PerlJam smls: but not with ... ??
15:37 smls but subroutines attach to their module in Perl 5, not to their lexical scope
15:37 moritz yes
15:37 smls So even if your class is defined in the same file as the main program, it must use the main:: prefix to call its subroutines.
15:38 PerlJam or do what moritz did
15:39 smls no, that was for variables
15:40 smls $ perl -wE 'sub x { 42 }; package A { sub a { say x() } }; bless({}, A)->a()'
15:40 smls Undefined subroutine &A::x called at -e line 1.
15:41 ugexe PerlJam: you have to either 1. know the location of the pm6 files before hand (the provides) or 2. walk the directory tree and grep them. This is so you can determine build order. Anyway the question then is: should a package manager be grepping a directory for files? or should it only "see" the files in the metafile it knows beforehand?
15:41 smls But, this has nothing to do with  my/our  variables, that was just a thinko on my part
15:42 khw joined #perl6
15:43 PerlJam ugexe: I would think the latter.
15:45 pmichaud good morning, #perl6
15:45 yoleaux 05:35Z <TimToady> pmichaud: I'm fine with args to X/Z not flattening by default, I think, as well as circumfix:<[ ]> (but postcircumfix:<[ ]> should still be a list of flattened lists for multi-dim slicing)
15:47 hoelzro morning pmichaud
15:47 * pmichaud backlogs
15:48 pmichaud for those of you who weren't active/around about 5 or 6 years ago, here's a restatement of the iteration conundrum
15:49 pmichaud if a programmer writes
15:49 pmichaud for 1, 3 ... 1_000_001 { ... }
15:49 pmichaud we'd like to have the loop go through the sequence, but not keep the already-processed values around
15:50 diana_olhovik joined #perl6
15:50 pmichaud in other words, we don't want to be holding onto a list of 500K entries while processing the loop
15:50 pmichaud however
15:50 pmichaud if a programmer writes
15:50 pmichaud my @a := 1, 3 ... 1_000_001;  for @a { ... }
15:51 TEttinger joined #perl6
15:51 pmichaud the natural expectation is that @a will still have values (500K of them) once the loop has completed
15:51 pmichaud so, how do we detect the difference between the two?  Do we have to have bindings mark the bound value somehow ?
15:52 * FROGGS nods
15:52 FROGGS hmmm
15:52 FROGGS good question :o)
15:52 japhb pmichaud: That's not my natural expectation, even though I know it is the current Perl 6 expectation.  My *natural* expectation is that he for loop iterates along @a, but does not keep the reified values.  After the loop, @a still is bound to the unreified sequence.
15:53 pmichaud japhb:  how about if I rewrite it slightly?
15:53 pmichaud sub foo(@a) { for @a { ... };  say @a.elems; };     foo( (1, 3 ... 1_000_001) );    # what gets output for @a.elems ?
15:53 * japhb looking
15:53 PerlJam japhb: doesn't that become the opposite of laziness if we have to keep reifying the values over and over again?
15:55 steve_mc joined #perl6
15:55 japhb PerlJam: I'm not claiming it's optimal in a CPU usage sense.  It's just that pmichaud asked about (well, spoke of) "natural expectation", and it occurred to me that I had a different subconscious response.
15:55 pmichaud doesn't matter.  replace the sequence with lines() and you'll see that one can't really do "unreified sequence"
15:55 pmichaud for lines() { ... }    vs     my @a ;= lines();  for @a { ... };  say @a.elems
15:55 pmichaud vs
15:56 japhb pmichaud: Your rewrite with @a.elems does indeed leave me conflicted.
15:56 japhb Hmmm
15:56 pmichaud sub xyz(@a) { for @a { ... };  say @a.elems };    xyz( lines() )
15:57 japhb Yeah, that argues in favor of your interpretation.  I'm still bothered that I respond differently to the different cases.
15:57 pmichaud it should bother you, at least a little.  :)
15:57 japhb Like there's a way in which '1, 3 ... 1_000_001' is 'static', where 'lines()' is not.
15:58 japhb (But yes, I know, what if the sequence had a closure in it)
15:58 japhb :-/
15:58 pmichaud anyway, the only way I've been able to resolve this is to force the system to keep track of bindings.  But even then I worry about things like binding to 'self' -- i.e., that probably shouldn't be treated a sa binding
15:59 japhb (I'm too old not to trust my "gut", and yet all too aware that the brain is an easily confused thing.)
15:59 pmichaud jnthn++ will also note that there's a difference between  :=   and  ::=   and perhaps it's only the latter that we need to keep track of.   Still, it means doing some sort of marking on every parameter binding.
16:00 * japhb has forgotten the true meaning of ::=
16:00 lizmat perhaps the reified version should be indicated differently
16:00 PerlJam japhb: IIRC, it's a compile-time :=
16:00 pmichaud ::= is what happens when you pass an argument to a parameter
16:00 nys joined #perl6
16:00 lizmat my @a[1, 3 ... 1_000_001];
16:00 lizmat std: my @a[1, 3 ... 1_000_001];
16:00 camelia std 28329a7: OUTPUT«ok 00:00 140m␤»
16:01 lizmat or:
16:01 lizmat std: my @a[1, 3 ... 1_000_001] := *;
16:01 camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
16:02 pmichaud lizmat: I don't see how that applies to the question I'm asking.
16:03 lizmat let me rephrase: what does:
16:03 lizmat my @a[1..10];
16:03 lizmat currently (supposed to) mean
16:03 lizmat ?
16:03 pmichaud afaik, it creates an array indexed from 1..10.  I'd have to re-read S09.
16:03 muethos joined #perl6
16:04 lizmat hmmmm....
16:04 kaare__ joined #perl6
16:05 pmichaud reading S09, I don't see that it's a valid syntax.
16:05 lizmat ah, but std says it's ok
16:05 pmichaud well, std will often pass things as being valid syntactically even if they don't make sense semantically or aren't permissible semantically
16:06 Khisanth joined #perl6
16:06 lizmat in any case, by moving the sequence inside the slice spec, one would indicate one wants a reified array with thos values
16:06 lizmat as opposed to an iterator
16:06 pmichaud how does one do it for the sub parameter case, then?
16:06 lizmat which what would my @a := 1..10 would mean
16:06 * lizmat looks
16:06 pmichaud I'm using a sequence as a simplified instance of lines()
16:07 lizmat you mean the "sub xyz(@a) { for @a { ... };  say @a.elems };    xyz( lines() )" case ?
16:07 pmichaud lizmat: yes
16:07 pmichaud I'm using a sequence as an example of something that generates a large number of values
16:07 pmichaud which we don't want to hold all in memory if they're just being iterated
16:08 lizmat I would see the lines() as an iterator
16:08 domidumont joined #perl6
16:08 lizmat if one would want to keep the values around, one would do xyz( @ = lines() ) ??
16:09 pmichaud that seems quite unnatural.
16:09 lizmat perhaps because we didn't think of it before?
16:09 pmichaud well, we did go through this about 6 or 7 years ago.
16:10 pmichaud that's what led to the current implementation using "immutable iterators"
16:10 lizmat I'm sorry I didn't partake in it then, please forgive any reiterations on my part (no pun intended)
16:10 pmichaud right, that's why I'm re-bringing it up now, and trying to get a couple of quick concrete examples for people to work with
16:10 pmichaud to see if there are any new ideas.
16:11 lizmat fwiw, we're talking mostly syntax at this point, right?
16:11 pmichaud the immutable iterators was an attempt to solve the memory consumption problem, but it didn't work.
16:11 pmichaud I'm primarily focused on the runtime, actually.
16:11 nine lizmat: intentionally or not, that was a great pun :)
16:12 lizmat perhaps we need to (re-?) entertain the idea that iterators are iterators, and sequences are sequences and never shall the two meet ?
16:12 lizmat and that we need syntactic sugar to differentiate between the two ?
16:13 nine Probably this is crystal clear to people who've been around 6 years ago, but isn't this a rather plain GC problem? If the sequence is bound to a container (my @a = 1..10), it will be kept around by that and if not, then who will do that?
16:13 pmichaud okay, everyone, do me a favor:  forget the sequence.  Obviously I goofed by trying to simplify it there.
16:13 pmichaud Just focus on lines()
16:13 lizmat lines() is an iterator in my book
16:14 pmichaud so is a sequence, in reality, but let's focus on lines()
16:14 lizmat a sequence is a reified iterator in my book
16:14 moritz nine: the real problem is this: my @lines := lines(); for @lines { do something }; @lines[0]; # must keep all lines
16:14 moritz nine: but   for lines() -> $x { do something } # must not keep all lines in memory
16:15 pmichaud lizmat: I disagree, but I'd like to keep focused on the other problem for now.
16:15 nine moritz: s/must not/need not/ in your second example?
16:15 moritz nine: must not
16:15 nine moritz: why?
16:15 pmichaud imagine a 10-billion line input file
16:16 moritz nine: because then using 'for lines() { }' will become an anti-pattern
16:16 pmichaud I'd compromise with "should not"
16:16 PerlJam This feels kinda like a type-inference problem to me (except we're trying to infer "keep" vs "don't keep")
16:16 moritz because it uses too much memory
16:16 * smls had hoped that this had all been figured out at APW2014... :/
16:17 nine Ok, so this is _only_ about the memory usage optimization problem? Not something else that I haven't noticed yet?
16:17 moritz fwiw python solves this by using separate iterator types, and forcing you to do sometimes explicitly iterate (or coerce via list())
16:17 pmichaud I'm focusing on memory usage atm, yes.
16:17 moritz nine: well, it shouldn't be too slow, either
16:18 pmichaud My current conjecture is that there is a separate iteration type, yes.
16:18 pmichaud it's possible that the solution is that iterators aren't positional, and thus do not bind to @ variables
16:18 nine moritz: but any slowness would be the result of a fix for the memory problem, wouldn't it?
16:19 moritz nine: I don't have a good enough overview of possible implementations to comment on that
16:19 pmichaud if we say that iterators aren't positional, then
16:19 pmichaud sub xyz(@a) { ... };    xyz(lines())    would fail
16:20 pmichaud the programmer would have to use  @(lines()) or lines().list  to coerce it to a list (which of course would then properly keep the values around, as intended)
16:20 nine sounds sucky
16:20 moritz or maybe @ really means Iterable, not Positional
16:21 pmichaud please not that
16:22 uncleyear joined #perl6
16:23 gfldex joined #perl6
16:23 lizmat need to be afk now  :-(  &
16:25 dha So, the example in the docs for chmod is C<$*CWD.chmod(0o700);> Shall I assume that that applies the mode to all the files in the specified directory? Followup: Could you use C<$fh.chmod> to apply a mode to an individual file via filehandle?
16:25 nine Ok, I think I understand now why this seems to require a binding count at runtime.
16:26 moritz dha: I'd assume it only applies to to the directory itself
16:26 pmichaud dha: what moritz++ said
16:27 pmichaud I'll have to leave in a few; at the moment I see three possible resolutions
16:28 dha Ah. In that case, that example strikes me as confusing. Also, the p5 behavior of C<chmod> was that it applied to a list of files. Is that no longer the case, or can it only be done by using it this way: C<chmod (0o755, "file1, "file2"...>?
16:28 pmichaud dha: the p5 behavior of chmod isn't that it applies to all files in a directory, is it?
16:28 * pmichaud checks
16:28 pmichaud there's a difference between "list of files" and "all files in a directory"
16:29 moritz pmichaud: p5 chmod doesn't descend recursively either
16:29 pmichaud moritz: yeah, that's what I remember
16:29 dha no. But to a list of files. My assuming that applying it to the files in a directory was clearly a thinko on my part. I saw "CWD" and thought "that contains a bunch of files!"
16:30 pmichaud anyway, if someone has a list of files I'd expect     @flist.»chmod(0o700)     or something like that
16:30 moritz dha: clearer examples are very welcome
16:31 pmichaud or just    chmod 0o700, @flist
16:31 pmichaud three possible resolutions:
16:31 dha I guess I should figure out what the C<»> operator does, then..
16:32 pmichaud 1.  iterators aren't Positional, so they don't bind to @-variables.  Someone passing an iteration value to a position argument has to explicitly cast it into a list
16:33 pmichaud 2.  The runtime marks an iterable whenever something is bound to it, the iterable then knows it has to keep values around
16:33 pmichaud ...i forgot #3.  :-|
16:34 dha moritz - I'd suggest something like C<$filehandle.chmod(0o700);> for the example. But maybe I'm the only person to have that mistaken thought about cwd containing a bunch of files. :-)
16:34 pmichaud dha: I agree with changing the example to be something other than $*CWD
16:34 moritz years ago, but isn't this a rather plain GC problem? If the
16:35 dha oh, and in pmichaud's example of C<@flist.»chmod(0o700)> should it be assumed that C<@flist> contains a list of filehandles?
16:35 pmichaud dha: yes, or things that understand .chmod :)
16:35 dha right.
16:35 pmichaud and I'm not sure I had that syntax exactly right.
16:35 pmichaud I can never remember where the » goes in relation to the dot
16:36 pmichaud (because I don't use it that often yet)
16:38 nine pmichaud: on a more abstract level your solutions are: have the programmer be explicit or have the runtime do expensive book keeping
16:39 pmichaud I'm not sure the runtime bookkeeping has to be all that expensive, but it may be intricate from an implementor side.
16:39 pmichaud more to the point, it becomes a jnthn++ issue or something that someone dealing with the binder has to get right
16:39 dha What does » do, anyway? I don't see it in the operator doc page.
16:39 pmichaud dha:  "hyper operator"
16:39 PerlJam from the peanut gallery, runtime bookkeeping seems like the "right" thing.
16:40 dha Aha. Documented anywhere?
16:40 pmichaud dha: http://design.perl6.org/S03.html#Hyper_operators
16:41 dha *nod* thanks
16:41 dha Maybe I'll just leave that part out...
16:42 dalek doc: bd9f7a3 | smls++ | lib/Type/IO/Path.pod:
16:42 dalek doc: Show better example for IO::Path.chmod
16:42 dalek doc: review: https://github.com/perl6/doc/commit/bd9f7a3f83
16:42 nine But why not utilize the GC? Knowing if something needs to be kept around is its job. I'm fantasizing about asking the GC whether there are any references to the iterator other than the for loop and using that to decide, whether to keep the values around or not.
16:42 dha Ah. Looks like it should actually be C<@files».chmod>
16:42 smls the subroutine forms of several methods on that page still need to be documented
16:43 smls but possibly on the type/IO page instead
16:43 dalek doc: b1f566d | pmichaud++ | WANTED:
16:43 dalek doc: Add lines()/$*ARGFILES to WANTED.  (#96)
16:43 dalek doc: review: https://github.com/perl6/doc/commit/b1f566d664
16:44 PerlJam nine: how is the GC to know about that for loop?
16:44 DrForr I take it github is having drama at the moment?
16:44 smls moritz: Should the subroutine forms of the IO::Path methods be documented together with their method forms, or together with the other io subroutines (like mkdir) on the type/IO page?
16:45 * smls is not quite happy with how that part of the docs is structured.
16:45 PerlJam nine: also, if you leave it up to the GC, you'll have to force a run or wait until one happens to free all of the memory that you didn't want to keep around anyway.  That could defeat the purpose of "saving memory"
16:45 pmichaud nine: the purpose of immutable iterators was to let the GC try to take care of it.  The problem is that we end up having inadvertent references to the earlier values
16:45 dha DrForr -  how so?
16:46 captain-adequate joined #perl6
16:46 nine Doesn't even have to happen before iteration starts. When iterating over a billion lines, the GC is bound to run soon. I imagine it saying "hey, cleaning up, I noticed that the values you produce are referenced by no one else. You may stop keeping them around"
16:46 moritz smls: along with the methods
16:46 smls ok
16:46 pmichaud nine: I think you have the role of GC backwards in this scenario.  (more)
16:47 pmichaud although perhaps better communication between GC and objects is warranted.  :)
16:47 smls moritz: Hm, even though the subroutine forms also accept filename strings instead of IO::Path objects?
16:47 moritz smls: then ideally they'd go into both places
16:47 DrForr Rather, something up with the rakudo github pull.
16:48 pmichaud DrForr: github pull worked fine for me just now
16:48 DrForr Eeh, something in the VM.
16:48 pmichaud I have to go; important phone call in 12
16:48 pmichaud bbl
16:48 DrForr GL
16:48 nine pmichaud: I think that's my point. Maybe the current implementation is not actually that far off and the solution is trying to get rid off those pointers to the list's start and making the GC communicate with the iterator so it can tell it to stop keeping values around.
16:49 pmichaud nine: jnthn++ and I explored the idea of trying to release all of the pointers to the list.  It's much harder than that. (more)
16:49 pmichaud it's not just the pointers that may exist at the p6 library level, but every register within the VM as well.
16:50 pmichaud also, in many cases, we don't actually control the GC  (i.e., JVM)
16:50 hoelzro tony-o_: could you share some of your concerns regarding https://github.com/travis-​ci/travis-build/pull/415?
16:51 PerlJam nine: in my imagination, the compiler can markup the AST to build trees of how iterative values are connected and if there's any instance of an op that requires the values be kept around, it generates code to keep them, but if there's not, it doesn't.
16:51 pmichaud PerlJam: that doesn't work for when an iterator is passed as a argument
16:51 pmichaud that's a runtime thing.
16:51 PerlJam well, that's where it becomes type-inferency in my imagination :)
16:52 pmichaud but you can't infer type at runtime for things like method calls
16:52 nine Or when the iterator is returned by a function as in for give_me_the_iterator() { ... }
16:53 jaffa4 rakudo: my %t = ( 'Goatse'            => [q:w != ( ) =!]);
16:53 camelia rakudo-moar 98e36a: ( no output )
16:53 nine Prohibiting iterators from binding to @-variables sounds like losing most of the advantages of laziness.
16:53 PerlJam indeed.
16:53 tony-o_ hoelzro: my concern is the same as ugexe's, panda is fairly consistently broken for me and i don't like the idea of being married to it when right now i have the option to a) manually download depends b) install panda as part of my travis-ci config, or c) build my package in a way that i don't depend on something - i like having the option to *not* be mandatory broken because something i don't need in many cases isn't workin
16:54 pmichaud I don't see that it affects laziness at all
16:54 pmichaud binding to a @-variable doesn't make something non-lazy
16:54 hoelzro tony-o_: fair point. but then how do we handle modules that have dependencies, or those that have a Build.pm for custom build logic?
16:54 hoelzro maybe we should have Travis have some sort of use_panda_test config in .travis.yml
16:54 ugexe Build.pm is not the standard. Hooks/ is
16:55 PerlJam pmichaud: it doesn't directly, but it seems that you have to circumvent laziness to bind iterators to @things.
16:55 hoelzro [ptc]: ^
16:55 nine pmichaud: foo(lines().list) # will this cause Perl 6 to read in all lines and build the list in memory?
16:55 tony-o_ ugexe++
16:55 pmichaud PerlJam: how so?
16:55 pmichaud .list is still lazy
16:55 pmichaud it's .eager that forces non-laziness
16:55 hoelzro I've not heard of Hooks
16:55 PerlJam Hrm.
16:55 ugexe hooks is to contain code to be run by the packagae manager during the various phases of install
16:56 pmichaud m: my @a = 1 .. *;   my @b = @a.list;   1;    # still lazy!
16:56 camelia rakudo-moar 98e36a: ( no output )
16:56 pmichaud m: my @a = 1 .. *;   my @b = @a.list;   say "hello";    # still lazy!
16:56 camelia rakudo-moar 98e36a: OUTPUT«hello␤»
16:56 PerlJam I guess my mental model is a little off on that then.
16:56 PerlJam (was :)
16:56 pmichaud lists are lazy
16:56 nine Ok, the .list would tell the iterator that it's most probably bound now so it has to keep the values around?
16:56 pmichaud therefore .list is something that can be lazy  :)
16:57 hoelzro ah, interesting
16:57 pmichaud .list would produce something that is a list, getting its elements from the iterator
16:57 pmichaud (which isn't a list)
16:57 tony-o_ hoelzro: even for the 'hooks' piece, i still have the option to manually do that stuff (same for Build.PM) in t-ci. agree that it doesn't test the package with panda but that seems like a very specific case which can be tested/used by manually installing panda in t-ci config
16:58 nine Definitely sounds like a working solution. But also loses some of Perl's magic and have its users care a bit more about types (which we tell them is an optional part)
16:58 hoelzro ugexe, tony-o_: you can override the default test command to use prove
16:58 ugexe the travis-ci deal uses rakudobrew as it is, so the user can simply do 'rakudobrew build-panda'
16:58 hoelzro ok, good point
16:59 hoelzro I'm just trying to think about what the best default setup is
16:59 PerlJam runtime bookkeeping still feels "right" to me.
16:59 pmichaud the only place I can see where it might expose itself is when passing something iterated to a function
16:59 pmichaud I mean,    my @a = lines();   #  still works
17:00 pmichaud ...passing something iterated to a Positional function parameter
17:01 nine I could live with that if it makes iteration much faster without causing jnthn++ headaches :)
17:01 pmichaud iterated things are generally the results of gather/take, loops, and lines()
17:01 pmichaud phone call
17:03 tony-o_ hoelzro: i think until things are more stable, my ideal set up is building panda explicitly so i know whether it's my commit or something else
17:03 hoelzro tony-o_: so you're nervous that panda failures will present you with false tests failures?
17:06 tony-o_ i'd appreciate any feedback anyone has on: https://github.com/tony-o/perl6-hiker
17:08 tony-o_ hoelzro: yes, i like having the option to do something but not having the option to not do something, if that makes sense
17:08 dha Hm. so C<chown> is gone?
17:09 tony-o_ dha: doesn't seem so
17:09 hoelzro tony-o_, ugexe: I'm ok with just using prove until panda stablizes a bit, or until a better way of running tests arises.  I'm still concerned about the boilerplate for testing modules with dependencies, though
17:10 dha tony-o_ -  oh? I'm not seeing any indication of it anywhere, and when I tried it I got spat at.
17:11 ugexe the boiler plate is just rakudobrew build-panda. you still have to do the equivilent of 'cpanm --install-deps .'
17:11 tony-o_ dha: ahh, i was having a problem with my shell - looks like you're right
17:12 dha whew.
17:12 hoelzro ugexe: except here, you also have to do something to the effect of perlbrew install-cpanm
17:12 tony-o_ i believe there is a function for chown in nqp though
17:12 ugexe yeah, a single line of boilerplate.
17:13 ugexe and considering cpanm is stable as can be expected, thats not bad
17:14 skids joined #perl6
17:14 ugexe otherwise might as well just supply Star
17:15 ugexe if your concern is ease of use for dependencies vs a line of boilerplate anyway
17:15 dalek ecosystem: 35337a7 | tony-o++ | META.list:
17:15 dalek ecosystem: Hiker - PP6 MVC for the masses
17:15 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/35337a7bee
17:15 [ptc] hoelzro: backlogging...
17:17 ugexe travis also allows you to execute commands if nothing else was entered in the travis.yml, so you can automate the 'rakudobrew build-panda && panda install-deps .' etc  by setting it as the default cmd
17:17 [ptc] sure, we just need to document that nicely, so that the user knows what to do
17:18 [ptc] ugexe, tony-o_, hoelzro: is it worthwhile leaving build-panda in there?
17:19 ugexe i dunno, none of that type of stuff is even documented in p5. try running a TCI test (using the current p5 method) without anything in the 'install' block
17:19 pmichaud back again
17:19 hoelzro [ptc]: if it's not used by default, I don't think so
17:19 ugexe i.e., if you put nothing in your install block it defaults to cpanm --install-deps ., which obviously wont work with a perl6 module :)
17:20 pmichaud (GLR/iterators/memory)   I'm wondering if we can actually do this in stages.
17:21 pmichaud I very much agree with PerlJam++'s comment that runtime bookkeeping feels like the right thing.  Torment implementors on behalf of users and all that.
17:21 [ptc] it shouldn't be a problem for me to strip the panda stuff out of the build scripts; the code is still in the repo if we need it again in the future anyway
17:21 pmichaud on the other hand, I'm thinking perhaps it's good enough to do this in stages
17:21 tony-o_ [ptc]++
17:21 pmichaud in the first stage, we disallow binding iterated results into Positional variables, and see how much of a burden that imposes (and if it solves the problem)
17:21 [ptc] we just need to have in the docs what the standard incantation would be for someone using perl6
17:22 hoelzro that works for me!
17:22 pmichaud if it's too much of a burden, or if it doesn't resolve the issue, we can relax it later without undue hardship.
17:22 raiph pmichaud: how about if one binds an Iterable to a Positional all reified values are kept (modulo GC); to avoid ram consumption, bind to a Scalar?
17:23 pmichaud raiph: this still requires that we do some bookkeeping on binding at runtime.
17:23 tony-o_ hoelzro++
17:24 [ptc] tony-o_: do you also want to be listed as a maintainer?
17:24 raiph pmichaud: I'm not looking to avoid book keeping, rather trying keep things simpler for users
17:24 tony-o_ sure
17:24 [ptc] cool
17:24 pmichaud raiph: well, once we have an accurate binder bookkeeper, keeping things for users isn't really a problem.
17:25 pmichaud it's the "once we have an accurate binder bookkeeper" part that is non-trivial, not the part that comes after :)
17:25 [ptc] tony-o_: your email address as mentioned on GH is ok to mention?
17:25 nine If bookkeeping eats performance we're tormenting users again anyway :)
17:25 tony-o_ [ptc]: yes, thank you for asking first
17:25 pmichaud well, I don't expect the bookkeeping to be expensive, just intricate.
17:26 timotimo hm. we can't really put values already iterated into a list without refering to said list ...
17:26 timotimo otherwise the "only keep values around if they are referenced" thing would work
17:26 pmichaud timotimo: actually, we can :)
17:26 timotimo now if we could reverse the dependency and somehow not call into the keep-around-thing
17:26 timotimo ... we can?
17:26 pmichaud that's what immutable iterators effectively did
17:27 pmichaud iterators don't place things into lists... rather, lists keep track of iterators
17:27 timotimo oh, right, it required the thing nomming from the iterator to go from iterator piece to iterator piece
17:27 pmichaud exactly
17:27 timotimo didn't you just say that wasn't implementable in the end?
17:27 pmichaud one problem with the current model is that we end up encapsulating all iterators inside of lists... which means we end up holding the entire chain
17:28 timotimo mhm
17:28 pmichaud I'm trying to break that "encapsulate all iterators in lists" part.
17:28 pmichaud so,    for lines() { ... }    never sees a List associated with lines()
17:28 timotimo right
17:28 timotimo sounds sensible to me
17:28 pmichaud so the iterator chain can be GCd, since there's no "list" holding onto the head of the chain
17:28 [ptc] ugexe, tony-o_, hoelzro: so what should the default test script incantation be?  By default it's 'rake test', I believe...
17:28 timotimo tony-o_: what is this PP6 you seem to have invented? :)
17:29 pmichaud also, now that we have a Slip type, the chain can be much more robust than the simple head->next->next->next chain we had previously.
17:30 [ptc] ugexe, tony-o_, hoelzro: sorry, I just switched my brain off.  Please ignore me...  *sigh*
17:31 pmichaud so, if someone puts an iterator inside of a list  (as in .list), the list will end up holding all of the values for us.  But if we never .list the iterator, its values will be discarded upon use
17:31 dalek perl6-roast-data: 5c04a8b | coke++ | / (9 files):
17:31 dalek perl6-roast-data: today (automated commit)
17:31 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5c04a8bc1b
17:32 pmichaud another problem with the current model is that the parts doing the iteration *do* have to have a reference back to their containing list, so they can massage values going into the list.  I'm breaking that dependency also.
17:33 dha Can  safely assume C<chroot> is gone from p6?
17:34 pmichaud I see chroot mentioned in S29  (which is highly fossilized).
17:35 pmichaud but that's the only place it's mentioned, so assume it's gone for now.
17:35 pmichaud (it's not in any of the sources or other docs or ...)
17:35 dha ok.
17:42 TEttinger masak: I'm trying to find how macros are expanded in 007. I don't understand what roles or multi methods do yet, but I see this: https://github.com/masak/007/blo​b/master/lib/_007/Runtime.pm#L14
17:43 TEttinger I do see that roles are used heavily in 007, can anyone tell me if that's a common perl 6 practice?
17:46 ugexe yes?
17:47 smls What's this: "const_iX NYI  in sub  at ./htmlify.p6:750"
17:47 ugexe looks like a precomp bug
17:49 ugexe ive seen it a few times. in my case it would occur only with the module precompiled at least.
17:51 colomon joined #perl6
17:51 colomon TEttinger: Roles are commonly understood to be a fundamental part of p6’s OOP support.
17:52 TEttinger that's good to know! I wasn't familiar with the keyword in any other language
17:53 ugexe you may have heard them referred to as mixins
17:53 TEttinger ah, like in ruby or any prototype-oop lang?
17:54 muraiki TEttinger: you can also use roles as interfaces / traits by omitting the body of a method
17:54 muraiki well, replacing the body with "..."
17:55 muraiki TEttinger: there's some more info in https://github.com/perl6/specs/blob/mas​ter/S14-roles-and-parametric-types.pod
17:55 muraiki but yeah, they are everywhere
17:55 muraiki :)
17:55 TEttinger so I see a lot of "role Thing does Q" ; the "does" keyword is like implementing a role?
17:58 smls I believe the official terminology is "composing a role", but yes.
17:59 ugexe S12 is definately worth looking over
18:02 yqt joined #perl6
18:03 espadrine joined #perl6
18:11 dha So C<NEXT> blocks replace C<continue> blocks. How about just a C<continue;> with no block? C<NEXT;>? gone? something else?
18:13 ugexe https://github.com/perl6/specs/blob/​4932a71206131f76c7064295bc70ef785260​adeb/S04-control.pod#loop-statements
18:17 dha Maybe I'm missing it, but I'm not seeing an answer there. It just tells me about blocks, and talks about C<next> which it says is the same as in p5, so I'm thinking that's not an equivalent for C<continue;>
18:18 skids dha: perl's bare "continue" is closest to "proceed" and "succeed"
18:18 skids *perl5
18:19 dha Aha.
18:19 skids http://docs.perl6.org/language/control#given
18:20 TEttinger thanks muraiki, I read what I understood of that
18:21 muraiki TEttinger: :) just keep playing with stuff and it'll make sense eventually
18:21 [ptc] ugexe, tony-o_, hoelzro: just updated the Travis Perl 6 docs, please review : https://github.com/paultcochrane/docs-travis-ci-c​om/blob/pr/add-perl6-docs/user/languages/perl6.md
18:23 hoelzro [ptc]: should the example versions in "Choosing Perl 6 versions" be changed to 2015.06 and 2015.05 ?
18:23 hoelzro also, does "latest" imply the latest release of the compiler, or what's on nom?
18:23 TEttinger wow, this is confusing... this submethod doesn't ever get explicitly called as far as my searching can tell. https://github.com/masak/007/blo​b/master/lib/_007/Runtime.pm#L14
18:25 dha I'm feeling pretty secure in telling people that C<crypt> is gone.
18:26 hoelzro [ptc]: regarding the "rakudobrew panda-install 2015.04" bit, is there a way we could have an environment variable with the current tag so that users can use panda-install with more than one Perl 6 version?
18:26 [ptc] hoelzro: latest is what's on nom
18:27 hoelzro alright, we might want to clarify that
18:27 [ptc] hoelzro: will do.  will also update the "Choosing Perl 6 versions" bit
18:27 hoelzro :+1:
18:28 [ptc] hoelzro: I don't know if there's a way to control the panda version via env var though...  I need to think on that one.  Patches welcome :-)
18:29 hoelzro [ptc]: do you think "rakudobrew panda-install $TRAVIS_PERL6_VERSION" will work?
18:30 [ptc] that's effectively what I had there before
18:30 telex joined #perl6
18:30 [ptc] the version is passed around as a variable at the Ruby level of the build script
18:31 [ptc] what probably won't work is `rakudobrew build-panda 2015.06`: this requires panda to have the 2015.06 tag (which I haven't yet added....)
18:32 [ptc] what would be required is that rakudobrew falls back to the next panda version, but that isn't implemented in rakudobrew yet
18:35 atroxaper joined #perl6
18:35 [ptc] hoelzro: "latest" simply runs `rakudobrew build moar`, which builds Moar, NQP and Rakudo all from the relevant HEAD commit
18:36 hoelzro ah ha
18:36 foo_ joined #perl6
18:37 [ptc] it's for those who like to live life on the edge
18:37 [ptc] I just pushed an update to the docs
18:38 * [ptc] is still waiting for moar to build on his vagrant vm...
18:39 timotimo dha: what is (was) crypt?
18:40 dha Created a digest string a la crypt(3)
18:40 dha the docs admit that it is poorly named.
18:43 dalek Inline-Perl5: 713e208 | (Stefan Seifert)++ | / (2 files):
18:43 dalek Inline-Perl5: Pass on named arguments to constructors of imported P5 classes
18:43 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/713e208d06
18:45 bin_005 joined #perl6
18:45 nowan joined #perl6
18:47 hoelzro [ptc]: do you happen to know if the Git revisions when building with latest are printed out? that would be useful to a user tracking nom for finding commits responsible for regressions
18:51 b2gills Has anybody encouraged Giuseppe Castagna the author of http://www.pps.univ-paris-diderot.fr​/~gc/papers/contravarianceagain.pdf / http://www.pps.univ-paris-didero​t.fr/~gc/papers/perl6-typing.pdf to join us here?
18:51 [ptc] hoelzro: not off hand.  Although I have a feeling rakudobrew does do something like that
18:51 jaffa4 rakudo: my $tok = ""; $tok ~= "something"; say "hello $tok";
18:51 camelia rakudo-moar 98e36a: OUTPUT«hello something␤»
18:52 [ptc] hoelzro: am just running rakudobrew build moar on a power7 machine, and yes, lots of info about commit ids are printed out
18:52 hoelzro ok, cool
18:52 atweiden joined #perl6
18:58 TEttinger so, in an NQP actions class, I want to increment a counter every time a certain method is called (whenever an identifier is read in, the counter increments to ensure that if someone needs a unique suffix within a macro, it will be unique for that form)
18:59 kaare__ joined #perl6
18:59 TEttinger is this reasonable usage for a lexical, dynamic, or package variable in the Actions class? I don't understand package scope yet
18:59 dha I assume that the behavior of C<do> with an expression instead of a block, i.e. that it treats the expression as a filename and executes the contents of that file, has gone away?
18:59 TEttinger nice, dha, onto d alphabetically :D
19:00 b2gills dha: It has sort of been replaced with EVALFILE
19:00 dha TEttinger -  yes!
19:01 dha b2gills -  Ah, I'll look at that. Thanks.
19:01 jaffa4 rakudo: say (1,2,3,4).fmt
19:01 camelia rakudo-moar 98e36a: OUTPUT«1 2 3 4␤»
19:01 jaffa4 rakudo: say ((1,2,3,4).fmt)
19:01 camelia rakudo-moar 98e36a: OUTPUT«1 2 3 4␤»
19:01 dha b2gills -  also thanks for the patch. My first for this project! :-)
19:01 lichtkind joined #perl6
19:02 jaffa4 rakudo: my @e= (1,2,3,4); say @e.fmt;
19:02 camelia rakudo-moar 98e36a: OUTPUT«1 2 3 4␤»
19:02 mr-foobar joined #perl6
19:02 jaffa4 is .fmt working>
19:03 jaffa4 ??
19:03 b2gills I was thinking about going through the documents and finding more features like that which could be useful to mention
19:03 dalek tablets: 23ea403 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
19:03 dalek tablets: more infos and links about sets in glossary
19:03 dalek tablets: review: https://github.com/perl6/tablets/commit/23ea403571
19:03 pmichaud jaffa4: looks to me like it's working.
19:03 pmichaud The default format is '%s'
19:04 b2gills rakudo: say (1,2,3,4).fmt: "%f"
19:04 camelia rakudo-moar 98e36a: OUTPUT«1.000000 2.000000 3.000000 4.000000␤»
19:04 jaffa4 It should remote the last element
19:04 jaffa4 return
19:04 jaffa4 like $#
19:04 jaffa4 Unsupported use of $# variable; in Perl 6 please use .fmt
19:04 pmichaud using .fmt on a list maps to all elements of the list
19:05 smls Hrm, The  "const_iX NYI"  error persists even after nuking ~/.rakudobrew and rebuilding r-m and modules. The line in question is "return qqx{$command};".
19:05 b2gills m: $#
19:05 camelia rakudo-moar 98e36a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GrRSmuM6pI␤Unsupported use of $#variable; in Perl 6 please use @variable.end␤at /tmp/GrRSmuM6pI:1␤------> 3$#7⏏5<EOL>␤»
19:05 hoelzro smls: I managed to golf that down
19:05 jaffa4 rakudo:  $#ewewe
19:05 camelia rakudo-moar 98e36a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Unsupported use of $#variable; in Perl 6 please use @variable.end␤at /tmp/tmpfile:1␤------> 3$#7⏏5ewewe␤»
19:05 dha jaffa4 -  heck, $# is deprecated in p5!
19:06 hoelzro https://gist.github.com/ho​elzro/b5a5a7e368adda3797b8 # smls
19:06 flussence dha: not deprecated, removed entirely
19:06 jaffa4 rakudo:  my @b =4 ; $#ewewe
19:06 camelia rakudo-moar 98e36a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Unsupported use of $#variable; in Perl 6 please use @variable.end␤at /tmp/tmpfile:1␤------> 3my @b =4 ; $#7⏏5ewewe␤»
19:06 dha Oh, this is a fun one. Do we still have C<dump>?
19:06 hoelzro it's actually the LEAVE phaser that's messing things up
19:06 smls oh
19:06 pmichaud I'm pretty sure that $#ewewe  should instead become   @ewewe.end
19:06 jaffa4 rakudo:  my @b =4 ; say ewewe.end
19:06 hoelzro smls: if you want to work on docs, I think using Inline::Python should still work
19:06 camelia rakudo-moar 98e36a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤    ewewe used at line 1␤␤»
19:06 dha flussence -  ah, yes. I saw the deprecation line, didn't notice the following removal line.
19:06 jaffa4 rakudo:  my @b =4 ; say @ewewe.end
19:06 camelia rakudo-moar 98e36a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Variable '@ewewe' is not declared␤at /tmp/tmpfile:1␤------> 3my @b =4 ; say 7⏏5@ewewe.end␤»
19:07 pmichaud in this case, you'd want  @b.end
19:07 jaffa4 rakudo:  my @b =4 ; say @b.end
19:07 camelia rakudo-moar 98e36a: OUTPUT«0␤»
19:07 jaffa4 rakudo:  my @b =<4 2>; say @b.end
19:07 camelia rakudo-moar 98e36a: OUTPUT«1␤»
19:07 pmichaud rakudo:   say (1,2,3,4).end
19:07 camelia rakudo-moar 98e36a: OUTPUT«3␤»
19:07 b2gills rakudo:  my @b =4 ; say @b[@b.end]
19:07 camelia rakudo-moar 98e36a: OUTPUT«4␤»
19:07 pmichaud perhaps it'd better if you tell us what you're trying to get, though.  :)
19:08 pmichaud the canonical method for "get the last element" is to use   [*-1]
19:08 smls hoelzro: You mean  ./htmlify.p6 --no-inline-python  ?
19:08 hoelzro smls: no, you *want* to use Inline::Python
19:09 hoelzro have you installed it?
19:09 smls how do i specify that?
19:09 smls oh just install it, got it
19:09 dha I wonder when the last time someone actually used C<dump> was.
19:10 jaffa4 ===SORRY!=== Cannot invoke this object (REPR: Null, cs = 0)
19:10 dalek Inline-Perl5: ae9f31b | (Stefan Seifert)++ | / (3 files):
19:10 dalek Inline-Perl5: Delegate Any's methods to the Perl 5 parent class
19:10 dalek Inline-Perl5:
19:10 dalek Inline-Perl5: Many Perl 5 classes use method names that are provided by Any in Perl 6, like
19:10 dalek Inline-Perl5: list, end, say. Explicitly delegating these methods to the Perl 5 parent
19:10 dalek Inline-Perl5: object seems to be the safer course and prevents very confusing error messages
19:10 dalek Inline-Perl5: from appearing.
19:10 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/ae9f31b720
19:11 smls hoelzro: d'oh, installing Inline::Python fails with "unable to find Inline/pyhelper.so IN @*INC"
19:11 hoelzro smls: how are you installing it? just panda install?
19:11 smls yeah
19:13 hoelzro =(
19:13 nine smls: sounds like it fails to compile?
19:13 smls the error is below "Testing Inline::Python"
19:13 nine smls: do you have a python-devel libpython-dev or whatever it's called package installed?
19:13 smls lemme check
19:14 nine smls: the unable to find message is the result, not the origin of the error. If the library is not there it failed to compile
19:14 jaffa4 Is there way to trace compilation?
19:14 jaffa4 I do not get a line number for error message
19:15 dalek specs: 70b0ca3 | pmichaud++ | S07-glr-draft.pod:
19:15 dalek specs: Updates to latest design concepts for GLR.
19:15 dalek specs:
19:15 dalek specs: Added a status summary at the top of the document.
19:15 dalek specs: Reintroduced Parcel as an immutable List type.
19:15 dalek specs: Other small cleanups.
19:15 dalek specs: review: https://github.com/perl6/specs/commit/70b0ca3fd9
19:15 dalek specs: 8682eb6 | pmichaud++ | S32-setting-library/IO.pod:
19:15 dalek specs: Merge branch 'master' of github.com:perl6/specs
19:15 dalek specs: review: https://github.com/perl6/specs/commit/8682eb6403
19:16 smls nine: I don't think Arch has a seperate -devel package (it tends to install all include files with the main packages)
19:16 smls However, it installs Python 2  as "python2"
19:16 smls could that be the problem?
19:17 nine smls: probably. I don't think I support Python 3 yet
19:17 vendethiel- joined #perl6
19:18 smls well, it would probably easier to add support for finding Python under the name "python2"
19:19 nine Yes. Though not by much. I have a good template for Python 3 support in Perl 5's Inline::Python
19:19 hoelzro jaffa4: have you tried --ll-exception? what's the error?
19:20 jaffa4 Cannot invoke this object (REPR: Null, cs = 0)
19:20 nine smls: for now you could probably just symlink /usr/bin/python to /usr/bin/python2
19:20 smls yeah
19:21 [Coke] (attr is required) is it ok if the error message refers to $!x if the "is required" is on $.x ? or must it report the same twigil used?
19:21 dha Hm. S29 indicates that for C<each>, one should see the C<.pairs> method, but the dont appear equivalent.
19:21 marel joined #perl6
19:21 [Coke] (I have no idea why it's reporting differently now, will have to investigate)
19:21 smls nine: It worked!
19:21 nine smls: great :)
19:22 marel hello. I know python very well, but I never used perl5 or perl6. were should I start?
19:22 dha s/the/they/
19:22 jaffa4 hoelzro: you know something
19:22 hoelzro oh, great, that error =(
19:23 b2gills dha: I used to use `dump` regularly, though that subroutine came from Data::Dump
19:23 hoelzro marel: a good start would be http://learnxinyminutes.com/docs/perl6/
19:23 nine marel: http://learnxinyminutes.com/docs/perl6/ or http://doc.perl6.org/
19:23 dha b2gills -  ah, of course. I was referring to the builtin. :-)
19:23 TEttinger masak: woah, I just noticed that 007 isn't written in NQP; it's in perl 6?
19:24 marel hoelzro: thank you, is there good book I can use? I find using perl6 but it is 2012, is it still relevant ?
19:24 PerlJam [Coke]: I wouldn't mind a twigil difference.
19:25 hoelzro marel: are you talking about https://github.com/perl6/book?
19:25 PerlJam marel: It's relevant, but needs severe updating.
19:25 * hoelzro got into Perl 6 because of that book
19:26 marel hoelzro, PerlJam yes that book, can I use it or will I learn outdated parts from it ?
19:26 PerlJam marel: you can use it fine, but you may run into some things that have changed.  I dunno.  I haven't looked at the book in a while.
19:26 dha Ok, I'm stumped. Is there no equivalent to C<each(%hash)> anymore?
19:26 hoelzro dha: %hash.kv
19:26 PerlJam dha: %hash.kv
19:26 hoelzro we should have a book jam or something
19:27 pmichaud dha: canonical is     for %hash.kv -> $k, $v { ... }
19:27 hoelzro one Saturday, just fix/improve that book...
19:27 pmichaud I suspect the book has a lot of fossils, sadly.
19:27 b2gills I wonder if there should be a page that links to videos of good talks about Perl 6 for new Perl 6 programmers
19:27 PerlJam b2gills: +1
19:28 marel I will use http://learnxinyminutes.com/docs/perl6/ until book is updated, too sad there are no up to date book about this language :(
19:28 PerlJam There were a few good talks like that this past YAPC :)
19:28 dha Yeah, that doesn't do what each is documented to do. <.kv> gives you a list of keys and values. C<each> gave you the *next* key/value pair.
19:28 PerlJam dha: some iterators are less exposed in P6
19:28 hoelzro dha: let's say you had each(), what would you do with it?
19:29 pmichaud dha: if you're looking for an exact equivalent, there isn't one.  The canonical way of iterating through keys and values in a hash is to use the for loop I gave above.
19:30 dha I'm not looking for an exact equivalent, I'm just looking to know if there's an exact equivalent, so I can tell people. :-)
19:30 pmichaud in particular, .kv is allowed to be lazy.
19:30 pmichaud so yes, it gives a list of keys and values, but it can be a lazy list
19:30 pmichaud (and I suspect that post-GLR, .kv will give back an iterated sequence and not a list)
19:32 b2gills dha: I think a P5=>P6 document should indicate where someone should look, even if it isn't an exact equivalent
19:32 PerlJam pmichaud: as along as I don't have to worry about what an "iterated sequence" is to use it  ;)
19:32 dha b2gills -  indeed. but it should probably also point out that it *isn't* an exact equivalent.
19:32 dha Or not, I suppose. YMMV.
19:33 dha *shrug*
19:33 pmichaud PerlJam: for the most part I suspect it'll just work out.
19:33 pmichaud Things are a lot nicer now that flattening has been taken away from 'for'
19:33 pmichaud and parcels as positionals
19:36 skids joined #perl6
19:36 pmichaud lunchtime needed here -- bbl
19:37 colomon joined #perl6
19:39 dha Where is C<< -> >> documented?
19:40 geekosaur I think you're looking for pointy blocks?
19:40 FROGGS dha: like in this? -> { }
19:40 zakharyas joined #perl6
19:41 smls joined #perl6
19:41 dha yeah.
19:43 FROGGS http://doc.perl6.org/language/control contains it but does not explain it
19:44 FROGGS -> { } is in fact a routine declaration... after the arrow comes the signature (often an implicit one), and the the routine body (the block)
19:45 FROGGS so when you know how to write a nice signature, you can apply it to loops also...
19:45 dha Yeah, I saw the examples, but would love to be able to point someone at an actual explanation.
19:45 FROGGS m: for < a b c d e > -> $a, $b, $c? { say "$a $b {$c || '?'}"}
19:45 camelia rakudo-moar 98e36a: OUTPUT«a b c␤d e ?␤»
19:46 jaffa4 bye
19:46 FROGGS o/
19:49 FROGGS dha: http://design.perl6.org/S04.html#The_for_statement
19:51 dha Hm. I guess I'll point to that and punt.
19:53 smls sha: Also, http://design.perl6.org/S0​6.html#%22Pointy_blocks%22
19:56 muethos joined #perl6
19:58 smls *dha
19:58 dha Ta.
20:07 domidumont joined #perl6
20:09 raiph b2gills, PerlJam: "videos of good talks about Perl 6" mebbe http://tinyurl.com/p6videos
20:10 b2gills I was thinking having a page on perl6.org or other community editable site
20:16 dha So, C<shell> seems to be the analog to p5's C<system>. Is there an equivalent of C<exec>?
20:16 khw joined #perl6
20:16 lizmat run() ?
20:16 masak dha: is that "execute a command and don't return to script"?
20:16 dha yes.
20:16 hoelzro smls: I created a ticket for the issue: https://rt.perl.org/Ticket/Display.html?id=125480
20:17 masak dha: I guess `shell(); exit()` is a first approximation :)
20:17 lizmat ah, not run()
20:17 raiph b2gills: the page I linked is a shortcut to the "Curated perl6 videos" link on the http://perl6.org/documentation/ page; I started and am maintaining the Perl Six youtube account but would prefer it was a community thing
20:17 dha lizmat -  no. run() appears to be shell() without using the shell. :-)
20:17 lizmat yeah, figured that  :-)
20:17 dha masak -  Yeah, i guess that makes sense.
20:18 lizmat dha: wouldnt that be "exit shell()' ?
20:18 lizmat or conversely: exit run() ?
20:19 dha lizmat -  Could be.
20:19 TEttinger ...hmmm.   in this action method body, what is the precedence doing?      make ~$/.ast;
20:19 TEttinger is it stringifying $/ first, then getting its ast?
20:20 TEttinger or the other way around?
20:21 zacts joined #perl6
20:21 raiph masak: I just reread the wikipedia fexpr page and your macros-thunkish-parameters blog post and I feel I understood the latter much better
20:22 masak hah
20:22 nys joined #perl6
20:22 * vendethiel- waves
20:22 masak raiph: when I re-read my blog post, I'm not sure why I kept {{{$expr}}}, instead of going with $expr.eval
20:22 masak vendethiel-: \o
20:23 raiph masak: I though the same then at the end understood why
20:23 raiph *thought
20:23 TEttinger hey masak! how are things going?
20:23 masak TEttinger: things are going fine! how's with you?
20:23 TEttinger I sent some messages that probably should have been via .tell
20:24 masak I backlog quite badly these days.
20:24 TEttinger things are decent, I need to commit some code today
20:24 masak yes, you do :)
20:24 raiph masak: Because you were explicitly NOT willing to confuse one issue with another if you could help it (the {{{ ... }}} thing is listed at the end as not being dealt with)
20:24 TEttinger commit streak must get to 400
20:24 masak raiph: oh, ok.
20:24 vendethiel- TEttinger: I see someone's taking this seriously :P
20:25 TEttinger heeh
20:25 masak raiph: just felt like an easy thing to drop if I also dropped quasi
20:25 TEttinger it's at 375!
20:25 vendethiel- TEttinger: (for the record, I got to 531 days streak and stopped)
20:25 TEttinger oh woah
20:25 raiph masak: troo
20:25 masak TEttinger: remember, it's not the quality that counts, it's the quantity. :P
20:25 TEttinger masak, haha my C# would agree
20:26 vendethiel- masak: sometimes I just commit out of frustration, anyway. example: I spent the last two days trying to use intellij, android, scala and SBT experience. this was very, very painful
20:26 TEttinger vendethiel-, yes, I actually managed to get those all working together at one point
20:26 TEttinger but it was pain.
20:26 TEttinger sbt is not very good.
20:26 vendethiel- TEttinger: oh, it's working now (except for strings completion).
20:26 vendethiel- sbt is pretty much madness; what I'd like us to avoid for perl6 :P
20:28 hoelzro jjjj
20:28 vendethiel- hoelzro: 4j
20:28 TEttinger m: "hello" ~ 11111;
20:28 camelia rakudo-moar 98e36a: ( no output )
20:29 TEttinger m: say "hello" ~ 11111;
20:29 camelia rakudo-moar 98e36a: OUTPUT«hello11111␤»
20:29 TEttinger good.
20:31 TEttinger hm, the learn x in y minutes thing doesn't say what ':=' as an operator does
20:31 TEttinger I'm guessing either destructive assignment or assignment to a key's value in a hash?
20:32 ugexe m: my $a = 1; my $b := $a; $a = 2; say $b
20:32 camelia rakudo-moar 98e36a: OUTPUT«2␤»
20:32 TEttinger so it assigns a reference?
20:32 [Coke] dha++ for jumping in on the 5-6 stuff.
20:33 lizmat TEttinger: it binds
20:33 dha Thanks. As always, comments welcome.
20:33 timotimo it binds a different container "into" a variable
20:33 TEttinger ah. ok
20:33 lizmat m: my $a := 42; $a = 1  # cannot change a constant
20:33 camelia rakudo-moar 98e36a: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/nGkBLBdeDZ:1␤␤»
20:33 TEttinger so it's making $b be a container around $a there
20:34 lizmat not, it makes them equivalent
20:34 TEttinger oh ok
20:34 TEttinger interesting
20:34 colomon joined #perl6
20:35 lizmat m: my $a; my $b := $a; say $b.VAR.name
20:35 camelia rakudo-moar 98e36a: OUTPUT«$a␤»
20:35 lizmat even to the point of introspecting the name of the variable
20:38 b2gills m: subset Huh of Int where { Bool.pick }; say (0..100).grep: Huh
20:38 camelia rakudo-moar 98e36a: OUTPUT«0 2 3 5 6 9 11 13 15 17 20 22 30 32 34 36 38 41 43 47 48 50 51 52 54 56 57 60 61 62 65 66 68 71 72 73 74 75 78 79 82 83 84 85 88 91 92 93 94 96 97 98␤»
20:38 b2gills ^ Proof that http://www.pps.univ-paris-didero​t.fr/~gc/papers/perl6-typing.pdf won't work for Perl 6
20:40 vendethiel- https://twitter.com/tpoleca​t/status/613380313650049024 *chuckles*
20:41 spider-mario joined #perl6
20:43 raiph masak: Am I miles off base thinking the general issue (related to your blog post and fexprs) is how a user gets in to the source code processing stream after a construct has been recognized by the parser and before the AST for its matching elements has been generated; that slangs are very well poised to handle this; that macros can't do the same wi
20:43 raiph thout support from the parser?
20:43 hoelzro vendethiel-: I'm having a lot of wrong windows today!
20:44 vendethiel- hoelzro: a vim window can't be a wrong window :)
20:44 hoelzro =)
20:47 raiph vendethiel: If you can understand and answer my question ^^ for masak, I'd appreciate hearing that answer :)
20:47 vendethiel- raiph: I think "is parsed" is meant to die, at that point
20:48 masak raiph: I don't know. I'm not used to thinking of it in terms of fexprs. the problem I was trying to solve was the ability to create thunks in userland.
20:48 vendethiel- so "all" that's left is the operators and others we already have
20:48 masak "is parsed" feels both overpowered and underpowered at the same time.
20:49 masak overpowered, because it completely takes over the parse and allows any old weird thing to happen.
20:49 masak underpowered, because it doesn't even try to connect with the Perl 6 grammar.
20:49 dha Is C<flock> gone?
20:49 raiph I'm thinking slangs occupy the fexpr form of macro niche
20:49 raiph (capability wise; the semantics seem totally different)
20:50 lizmat dha: it is at the moment
20:50 raiph (and that slangs also cover, more nicely, what "is parsed" was aiming at)
20:50 dha *nod*
20:51 masak raiph: you may have a point.
20:51 PerlJam lizmat: it's in IO.pod  :)
20:51 masak raiph: I'd much rather hand over to a fully-formed grammar than leave things in the hands of "is parsed".
20:51 lizmat PerlJam: yeah, in the slushy POSIX section
20:53 captain-adequate joined #perl6
20:53 dalek rakudo/nom: 9e66416 | FROGGS++ | t/04-nativecall/08-callbacks.t:
20:53 dalek rakudo/nom: test doubles as num64 not num in nativecall callbacks
20:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e664160cb
20:54 dha S29 indicates that C<fork> exists. Is that a reasonable thing to believe?
20:56 masak dha: I'd say so.
20:56 masak dha: how else would we fork? :P
20:56 FROGGS dha: btw: https://en.wikibooks.org/wiki/Perl_6_Prog​ramming/Blocks_and_Closures#Pointy_Blocks
20:56 masak it's such a Unix thing to do.
20:56 jnthn I don't think fork is going in core, more likely in a POSIX module
20:56 dha masak -  I was just going to say "you don't use windows, do you?" :-)
20:56 jnthn It's already been noted you can implement it using NativeCall
20:57 FROGGS hehe, says the Windows guys :P
20:57 * FROGGS .oO( What the heck is fork? )
20:57 dha jnthn -  So, no C<fork> at the moment?
20:58 dha FROGGS -  Is that page actually kind of up to date/accurate?
20:58 jnthn dha: Not as a sub in the core built-ins, no
20:58 FROGGS m: use NativeCall; sub fork returns int32 is native { * }; say fork
20:58 camelia rakudo-moar 98e36a: OUTPUT«0␤3359␤»
20:58 FROGGS dha: see^^
20:58 jnthn But it's a 2-liner, as FROGGS++ just beat me to demonstrating :)
20:59 FROGGS dha: no idea about the updateness of that page, but I skimmed the pointy blocks section and it looked fine
20:59 dha ok, so if I was telling a Perl 5 programmer what to do with a fork in Perl 6... ?
20:59 dha FROGGS -  ok. I'll throw that in. Thanks.
21:00 FROGGS dha: tell him to chose a better layer of abstraction? I dunno...
21:00 dha In general, that might well be a good response. In my current context, however.
21:00 dha ..
21:00 TEttinger hm, is BEGIN present in NQP, or am I confusing it with 007 or something else?
21:01 jnthn TEttinger: NQP has a rather restricted form of BEGIN
21:01 jnthn It can only access types in the surrounding context, not ordinary variables like the full Perl 6 one can.
21:01 dha I don't believe James Bond has a BEGIN.
21:02 smls joined #perl6
21:02 TEttinger I'm wondering how to handle compile-time state for lisp macros.
21:02 smls *  is the canonical way to specify a matcher that smart-matches against everything, right?
21:02 TEttinger there are only a few that this matters for though.
21:03 [Coke] dha - (how to fork) point at the code snippet FROGGS posted above.
21:03 dha Ok.
21:04 masak dha: 007 has BEGIN.
21:05 FROGGS has BEGUN*
21:05 masak $ bin/007 -e='say(2); BEGIN { say(1) }'
21:05 masak 1
21:05 masak 2
21:05 dha masak -  I was joking. :-)
21:05 japhb dha: Does 'Dr. No' count?
21:06 smls m: dd all(); dd all(1)
21:06 camelia rakudo-moar 98e36a: OUTPUT«all() = all()␤Method 'name' not found for invocant of class 'Int'␤  in any  at src/gen/m-Metamodel.nqp:2917␤  in block <unit> at /tmp/iXzcW9zw6C:1␤␤»
21:06 smls ^^ dd doesn't like junctions, does it
21:06 FROGGS I bet Dr. Nō does count
21:07 japhb m: &dd.signature.say
21:07 camelia rakudo-moar 98e36a: OUTPUT«(Any |)␤»
21:07 japhb smls: ^^ That's why
21:07 smls heh
21:07 dha Arguably no. http://www.imdb.com/title/tt0310853/
21:08 japhb "American spy James Bond"?!?
21:08 bin_005 joined #perl6
21:08 geekosaur *eyeroll*
21:09 [Coke] m: DUMP(all(1))
21:09 camelia rakudo-moar 98e36a: ( no output )
21:09 [Coke] m: DUMP(all(1)).say
21:09 camelia rakudo-moar 98e36a: OUTPUT«Junction<1>(␤    :$!storage(Array<2>(␤        :$!flattens(True),␤        :$!items(BOOTArray<4>(▶1)),␤        :$!nextiter(▶Mu)␤    )),␤    :$!type("all")␤)␤»
21:09 * japhb does a happy dance
21:10 [Coke] m: DUMP(DUMP).say
21:10 camelia rakudo-moar 98e36a: OUTPUT«Not enough positional arguments; needed at least 1␤  in block <unit> at /tmp/FPxnYs3xJ5:1␤␤»
21:10 [Coke] m: DUMP(&DUMP).say
21:10 camelia rakudo-moar 98e36a: OUTPUT«(signal SEGV)Use of uninitialized value <element> of type Any in string context  in sub DUMP at /home/camelia/rakudo-inst-2/share/per​l6/runtime/CORE.setting.moarvm:1␤Use of uninitialized value <element> of type Any in string context  in sub DUMP at /home…»
21:10 [Coke] uhoh
21:11 [Coke] m: DUMP(Nil).say
21:11 camelia rakudo-moar 98e36a: OUTPUT«Nil␤»
21:12 TEttinger masak: I wasn't aware that language stuff like 007 could be written in perl 6 instead of NQP, or am I mistaken by the .pm extension?
21:12 uncleyear joined #perl6
21:13 masak TEttinger: it's written in Perl 6.
21:14 masak TEttinger: I just happen to do it the hard way.
21:14 TEttinger heh
21:14 masak handling all the parsing, compiling, AST, and runtime stuff myself.
21:14 TEttinger so NQP is easier? I would think having more features for the compiler would be nice
21:14 masak NQP is a compiler toolkit.
21:14 TEttinger ah, I did see Runtime.pm
21:15 masak I'm just saying I built my own tools instead.
21:15 masak thing is, it's not a lot of code.
21:15 TEttinger yep!
21:15 TEttinger I think my NQP is longer than 007 right now, mostly copy pasted from rubyish and NQP's src
21:15 TEttinger *think my NQP code
21:16 dha Ok. I've made it through "f".
21:16 TEttinger nice, dha++!
21:16 FROGGS_ joined #perl6
21:17 dha Although, to be honest, I've been staring at the screen long enough that I'm not sure how good any of it is, but, hey, f!.
21:17 PerlJam dha: something is better than nothing.
21:17 PerlJam It's always easier to modify and existing thing than to create a new thing
21:17 PerlJam s/and/an/
21:18 dha Yeah, I know. As I am, currently, creating a new thing. ;-)
21:18 vike joined #perl6
21:19 japhb m: &DUMP.DUMP.say  # curious ...
21:19 camelia rakudo-moar 9e6641: OUTPUT«(signal SEGV)Use of uninitialized value <element> of type Any in string context  in block <unit> at /tmp/md707kgEe9:1␤»
21:20 * japhb wonders why that blows up, but is lacking cycles to trace it at the moment
21:24 pmichaud back for a bit
21:29 jnthn o/ pmichaud
21:29 pmichaud is there a link to dha++'s document from perl6.org yet?  I'm thinking there ought to be.
21:30 pmichaud o/ jnthn
21:30 pmichaud jnthn: anything in glr-draft look especially spooky or worrying yet?
21:33 masak 'night, #perl6
21:33 pmichaud 'night, masak
21:34 lizmat good night, masak
21:36 hoelzro good night masak
21:36 colomon joined #perl6
21:36 jnthn pmichaud: I didn't catch up on the latset changes yet; been tied up with my apartment/country move :)
21:37 pmichaud jnthn: no problem.
21:37 jnthn Should fine a moment for it tomorrow. :)
21:37 jnthn *find
21:37 jnthn Anything in particular you want my input on?
21:37 pmichaud not at the moment.
21:37 jnthn ok
21:37 jnthn Then I'll give it a read over and let you know
21:37 pmichaud I'm _hoping_ to be able to get iteration efficiency w/o having to deal with binder reference marking... but we may need that ultimately.
21:38 jnthn Either tomorrow, or during Friday's long train journey :)
21:38 pmichaud having the binder mark lists isn't (yet) a blocker, at any rate.
21:38 jnthn OK
21:38 jnthn I don't imagine implementing that will take me long if we do need it...provided mark means "call a method" or so
21:38 pmichaud I think I have enough of the big picture stuff down that I'll be able to commit code soonish.
21:39 pmichaud I'm going to start by writing much of the GLR as a module and evaluate it there.
21:39 jnthn +2
21:40 pmichaud how goes the moving?  :)
21:40 pmichaud last week I had to do house stuff myself.
21:40 jnthn Smoothly overall; it's just quite a bit of work.
21:40 jnthn In 5 years, it's possible to accumulate quite a lot of stuff.
21:41 pmichaud try 11 years.  :)
21:41 jnthn Oh my... :)
21:41 pmichaud or, try 11 years with a wife + kids :)
21:54 yqt joined #perl6
22:06 dalek rakudo/nom: 545e69d | lizmat++ | src/core/Str.pm:
22:06 dalek rakudo/nom: Implement substr(-rw)(Range)
22:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/545e69d5a3
22:06 lizmat hoelzro: ^^   :-)
22:06 hoelzro \o/
22:06 hoelzro lizmat++
22:07 hoelzro guess I'll merge in that design PR =)
22:07 hoelzro we should probably roast that, too
22:10 lizmat yeah, working on that
22:10 lizmat or: if you would do the honors, that would be brill as well!
22:11 lizmat necessary changes were only needed in an internal sub or so
22:12 hoelzro I can do it tonight or tomorrow
22:13 hoelzro the specs changes has been written, and the docs/tests won't take long
22:13 atroxaper joined #perl6
22:17 hoelzro s/has/have/
22:18 dalek doc: 89c2bc8 | smls++ | lib/Type/IO/Path.pod:
22:18 dalek doc: Document &chmod
22:18 dalek doc: review: https://github.com/perl6/doc/commit/89c2bc8170
22:18 dalek doc: 005b719 | smls++ | lib/Type/IO (2 files):
22:18 dalek doc: Merge &dir, &mkdir, &rmdir documentation into /type/IO/Path.pod
22:18 dalek doc:
22:18 dalek doc: ...where the methods of the same name are documented. Previously the sub
22:18 dalek doc: forms lived in /type/IO.pod. Joining them removes unnecessary
22:18 dalek doc: duplication and makes the docs easier to navigate.
22:18 lizmat tonight would work for me
22:18 dalek doc:
22:18 dalek doc: The remaining path'y subroutines in /type/IO.pod shall follow.
22:18 dalek doc: review: https://github.com/perl6/doc/commit/005b719d48
22:18 dalek doc: e6928eb | smls++ | WANTED:
22:18 dalek doc: Merge branch 'master' of github.com:perl6/doc
22:18 dalek doc: review: https://github.com/perl6/doc/commit/e6928eb6f0
22:25 dalek specs: e337b93 | hoelzro++ | S32-setting-library/Str.pod:
22:25 dalek specs: Propose Str.substr(Range)
22:25 dalek specs: review: https://github.com/perl6/specs/commit/e337b938b4
22:25 dalek specs: ab86846 | lizmat++ | S32-setting-library/Str.pod:
22:25 dalek specs: Merge branch 'substr-range'
22:25 dalek specs: review: https://github.com/perl6/specs/commit/ab86846b16
22:26 dalek rakudo/nom: 553f0ea | lizmat++ | docs/ChangeLog:
22:26 dalek rakudo/nom: Mention addition of Range to substr(-rw)
22:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/553f0ea0d2
22:27 lizmat and with that, I call it a night
22:27 lizmat so good night, #perl6!
22:32 hoelzro night lizmat
22:33 jnthn o/ lizmat
22:49 zostay joined #perl6
22:52 raiph .tell tony-o https://github.com/tony-o/per​l6-template-protone/issues/1
22:52 yoleaux raiph: I'll pass your message to tony-o.
23:11 amurf joined #perl6
23:13 skids joined #perl6
23:14 dalek doc: d59d2b3 | smls++ | lib/Type/IO (2 files):
23:14 dalek doc: Merge &rename, &move, &unlink documentation into /type/IO/Path.pod
23:14 dalek doc: review: https://github.com/perl6/doc/commit/d59d2b33bb
23:21 hoelzro ah, thanks smls
23:21 pochi joined #perl6
23:21 pdcawley_ joined #perl6
23:27 FROGGS joined #perl6
23:30 vendethiel joined #perl6
23:41 hoelzro it's not often that *unoptimizing* code makes it break =/
23:42 * hoelzro is looking into RT #125480
23:52 LLamaRider joined #perl6
23:58 tony-o_ raiph++ - i'll take a look at that more later
23:58 tony-o raiph: re-protone
23:58 yoleaux 22:52Z <raiph> tony-o: https://github.com/tony-o/per​l6-template-protone/issues/1

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

Perl 6 | Reference Documentation | Rakudo