Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 ZoffixW Is there something wrong with this: https://gist.github.com/zoff​ixznet/0c5da7c4a9eaa0c80079 I'm getting  "Use of uninitialized value of type Str in string context Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed."
00:00 timotimo ZoffixW: you're stringifying $paste.WHAT by way of "eq"
00:00 timotimo you should just $paste ~~ Hash, IMO.
00:00 ZoffixW Ah. Thanks
00:00 ZoffixW timotimo++
00:00 * timotimo goes to bed
00:11 Util joined #perl6
00:12 PerlJam joined #perl6
00:13 ZoffixW Is there a way of making this work? I want the last element:
00:13 ZoffixW m: my $what = 'https://gist.github.com/zoffi​xznet/f6a610ce9200059ec969'; $what = $what.split('/')[-1]; say $what
00:13 camelia rakudo-moar 6432dd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/429VDmJwXK␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/429VDmJwXK:1␤------> 0059ec969'; $what = $what.split('/')[-1]7⏏5; sa…»
00:15 Hor|zon joined #perl6
00:16 skids ZoffixW: [*-1] should work.
00:18 ZoffixW skids++ it does thanks. I wasn't sure what "use a function such as *-1" meant :)
00:19 skids When a subscript gets a Callable as an argument, it feeds in the length of the array, calls it, and uses that as an index.
00:20 skids '*-1' makes a function that is like sub a($x) { $x - 1 }
00:22 ZoffixW Ah
00:23 thou joined #perl6
00:29 Xor_ left #perl6
00:33 tokuhirom joined #perl6
00:41 hohoho joined #perl6
00:50 thundergnat left #perl6
01:10 llfourn joined #perl6
01:10 n0tjack joined #perl6
01:14 dalek ecosystem: d53aa2f | (Zoffix Znet)++ | META.list:
01:14 dalek ecosystem: Add Pastebin::Gist to eco
01:14 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/d53aa2fea3
01:14 ZoffixW Comments on the suckety of my code welcome :) https://github.com/zoffixznet/perl6-Pasteb​in-Gist/blob/master/lib/Pastebin/Gist.pm6
01:16 Hor|zon joined #perl6
01:16 pochi joined #perl6
01:22 leont What is the provides meta-data used for currently?
01:22 leont My module has 44 classes/roles, maintaining this by hand is kind of cumbersome…
01:26 ShimmerFairy leont: provides is supposed to link 'use' statement names to files, as I understand it
01:26 ShimmerFairy (not that anything handles it correctly as of yet)
01:26 ShimmerFairy leont: http://design.perl6.org/S22.html#provides
01:29 ShimmerFairy basically, it's meant to let you write a Foo::Bar module and not have to put it in lib/Foo/Bar.pm6, letting you put it in, say, lib/FooBar.pm6 in your distribution instead.  :)
01:33 diakopter joined #perl6
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:48 leont Right, so classes that are mostly internal don't need to be listed?
01:48 leont fg
01:49 geekosaur No such job.
01:55 TimToady m: say v6a after v6;
01:55 camelia rakudo-moar 6432dd: OUTPUT«False␤»
01:55 TimToady slight problem there ^^
01:56 ShimmerFairy leont: yeah, AIUI it basically says "when someone types 'use Foo::Bar', don't expect to find it in lib/Foo/Bar.pm6. It's actually at lib/Somewhere/Else/Entirely.pm6."
01:56 leont geekosaur: No Jobs, no Cash, no Hope, Kevin Bacon please don't die
02:03 Exodist joined #perl6
02:03 aborazmeh joined #perl6
02:03 aborazmeh joined #perl6
02:11 thou joined #perl6
02:17 Hor|zon joined #perl6
02:21 noganex_ joined #perl6
02:36 chenryn_ joined #perl6
02:43 dayangkun joined #perl6
02:45 dalek rakudo/nom: 89d1b4f | TimToady++ | src/ (2 files):
02:45 dalek rakudo/nom: switch to 'use v6b+;' notation
02:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89d1b4f5e0
02:47 [Coke] we lose the nice perl 5 error with v6b, fwiw.
02:47 yoleaux 11 Oct 2015 15:45Z <moritz> [Coke]: as the next release manager, please mark the 2015.10 release as the first Perl 6 Beta release in the announcement
02:47 [Coke] .tell moritz that was the plan!
02:47 yoleaux [Coke]: I'll pass your message to moritz.
02:49 TimToady well v6.b doesn't help
02:52 [Coke] yah, I don't think there's a way to keep it.
02:53 leont Seems someone forked all p6 modules in the list to send PRs for travis.yml files
02:54 Zoffix heh
02:55 Zoffix Not all. But I'm guessing this [16:06:37] <szabgab> I hope tomorrow all the modules will have Travis enabled :)
02:59 TimToady I wonder if the syntax highlighters check for 'v6' or 'v6;'
03:04 dalek modules.perl6.org: e9d3a10 | (Zoffix Znet)++ | web/lib/P6Project/Info.pm:
03:04 dalek modules.perl6.org: standardize Travis error status <=> icon
03:04 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/e9d3a109af
03:04 dalek modules.perl6.org: 1dd35f3 | (Zoffix Znet)++ | web/ (4 files):
03:04 dalek modules.perl6.org: Add shadow to Camelia
03:04 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/1dd35f30a9
03:04 Zoffix timotimo, done and done :)
03:06 dalek modules.perl6.org: b69e76a | (Zoffix Znet)++ | web/index.tmpl:
03:06 dalek modules.perl6.org: Add Camelia as favicon
03:06 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/b69e76a60a
03:07 KCL joined #perl6
03:07 [Coke] rant: linenoise loses characters if you start typing at the REPL before the prompt appears.
03:13 [Sno] joined #perl6
03:18 Hor|zon joined #perl6
03:42 TimToady m: use v6;
03:42 camelia rakudo-moar 89d1b4: ( no output )
03:42 TimToady m: use v6a;
03:42 camelia rakudo-moar 89d1b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A2IBZMQxiG␤No compiler available for Perl v6a␤at /tmp/A2IBZMQxiG:1␤------> 3use v6a7⏏5;␤»
03:42 TimToady m: use v6a+;
03:42 camelia rakudo-moar 89d1b4: ( no output )
03:43 TimToady m: use v6b;
03:43 dalek modules.perl6.org: d829e03 | (Zoffix Znet)++ | web/build-project-list.pl:
03:43 dalek modules.perl6.org: Fix Camelia logo path
03:43 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/d829e0392e
03:43 camelia rakudo-moar 89d1b4: ( no output )
03:43 TimToady m: use v6c;
03:43 camelia rakudo-moar 89d1b4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jeCBAYQ1Xn␤No compiler available for Perl v6c␤at /tmp/jeCBAYQ1Xn:1␤------> 3use v6c7⏏5;␤»
03:49 sufrostico joined #perl6
03:56 vendethiel joined #perl6
03:59 thou joined #perl6
04:07 diakopter oy
04:08 llfourn joined #perl6
04:08 [Coke] aye.
04:13 hohoho .u »
04:13 yoleaux U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK [Pf] (»)
04:19 Hor|zon joined #perl6
04:29 chenryn_ joined #perl6
04:31 dalek doc: 355783e | coke++ | htmlify.p6:
04:31 dalek doc: remove unused $*DEBUG & command line flag
04:31 dalek doc: review: https://github.com/perl6/doc/commit/355783e0e6
04:48 dalek nqp: a79e4ab | TimToady++ | src/ (3 files):
04:48 dalek nqp: canonicalize operator names to legal perl
04:48 dalek nqp:
04:48 dalek nqp: Operator names containing < or > are now enclosed in « and ».
04:48 dalek nqp: review: https://github.com/perl6/nqp/commit/a79e4abbe6
04:48 hohoho joined #perl6
04:48 dalek rakudo/nom: 091637f | TimToady++ | src/ (4 files):
04:48 dalek rakudo/nom: canonicalize operator names to legal perl
04:48 dalek rakudo/nom:
04:48 dalek rakudo/nom: Operator names containing < or > are now enclosed in « and », unless they
04:48 dalek rakudo/nom: also contain « or », in which case they use < > and backslash anything
04:48 dalek rakudo/nom: that needs it.
04:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/091637fd5a
04:48 dalek rakudo/nom: 16e2b07 | TimToady++ | tools/build/NQP_REVISION:
04:48 dalek rakudo/nom: bump nqp to get legal opnames patch
04:48 dalek rakudo/nom:
04:48 dalek rakudo/nom: (won't compile without this)
04:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/16e2b07507
04:49 * TimToady has been wanting to fix that one for years now
04:50 [Coke] TimToady++
04:50 ShimmerFairy TimToady: I've also wanted to alias texas variants, but unfortunately trying to set up the 'constant's caused the optimizer to eat up all memory when a texas variant was used in CORE
04:59 dalek roast: dc3e133 | TimToady++ | S02-names/name.t:
04:59 dalek roast: test that opnames are canonicalized legally
04:59 dalek roast:
04:59 dalek roast: fixes RT #126241
04:59 dalek roast: review: https://github.com/perl6/roast/commit/dc3e133523
04:59 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126241
05:06 chenryn_ joined #perl6
05:20 Hor|zon joined #perl6
05:22 dalek roast: f21fe41 | TimToady++ | S02-names/name.t:
05:22 dalek roast: add more tests for weird opnames with angles
05:22 dalek roast: review: https://github.com/perl6/roast/commit/f21fe417ba
05:22 TimToady m: sub infix:«~~>» { "$^a -> $^b\n" }; say &[~~>].name
05:22 camelia rakudo-moar 89d1b4: OUTPUT«infix:<~~>>␤»
05:23 Ch0c0late joined #perl6
05:24 TimToady m: sub infix:«~~>» { "$^a -> $^b\n" }; say &[~~>].name
05:24 camelia rakudo-moar 16e2b0: OUTPUT«infix:«~~>»␤»
05:30 llfourn joined #perl6
05:32 |Tux| joined #perl6
05:42 tokuhirom joined #perl6
05:48 thou joined #perl6
05:51 jkva joined #perl6
05:58 bjz joined #perl6
06:17 diana_olhovik_ joined #perl6
06:21 Hor|zon joined #perl6
06:23 domidumont joined #perl6
06:28 firstdayonthejob joined #perl6
06:28 domidumont joined #perl6
06:29 bjz joined #perl6
06:35 moritz good morning
06:35 yoleaux 02:47Z <[Coke]> moritz: that was the plan!
06:38 [ptc] o/
06:39 llfourn joined #perl6
06:50 FROGGS joined #perl6
06:55 Ven joined #perl6
06:58 zakharyas joined #perl6
07:00 moritz anybody want to help me with a naming problem? (not Perl 6 related)
07:00 moritz at $work, we collect all sorts of data which we later use for billing
07:01 moritz this data is for example IP traffic size, size of backup data, number of text messages sent etc.
07:01 moritz grouped by customer, service (ip, backup, sms, ...), date and size
07:01 moritz how would you name such a database table?
07:01 [Tux] traffic
07:02 moritz but it's not all traffic
07:02 [Tux] most of it is?
07:03 moritz dunno; my sample might well be biased
07:03 moritz we also store things like number of MS Exchange mail boxes
07:03 [Tux] that is traffic related too imho
07:03 FROGGS usage?
07:04 moritz resource_usage maybe
07:04 [Tux] somebody likes typing :)
07:04 FROGGS :P
07:04 dalek rakudo/nom: 03f84ee | TimToady++ | src/ (2 files):
07:04 dalek rakudo/nom: allow comma to constant fold, but distribute sink
07:04 dalek rakudo/nom:
07:04 dalek rakudo/nom: A comma in sink context is not necessarily an error, since the bits
07:04 dalek rakudo/nom: of the comma may have side effects (especially in a loop ()).  So
07:04 dalek rakudo/nom: we treat comma as a lightweight semicolon there and evaluate each of
07:04 dalek rakudo/nom: its arguments for "useless use" instead.
07:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03f84eea11
07:05 moritz [Tux]: the table already has a (horrible) name; I'm looking for a mapped name in the ORM, actually
07:05 * TimToady --> bed &
07:05 [Tux] sleep tight
07:05 FROGGS gnight TimToady++
07:06 masak morning, #perl6
07:07 FROGGS morning masak
07:08 moritz FROGGS, [Tux]: thanks for your input
07:09 brrt joined #perl6
07:10 brrt good *
07:10 aborazmeh joined #perl6
07:10 aborazmeh joined #perl6
07:10 RabidGravy joined #perl6
07:12 [Tux] test             50000    38.896    38.778
07:12 [Tux] test-t           50000    39.823    39.704
07:14 rurban joined #perl6
07:18 Ven joined #perl6
07:22 Hor|zon joined #perl6
07:29 ely-se joined #perl6
07:35 abraxxa joined #perl6
07:36 thou joined #perl6
07:39 abraxxa joined #perl6
07:44 tokuhirom joined #perl6
07:48 moritz in p5, there's an environment variable that's commonly used for tests that must be able to access the Internet, no?
07:48 moritz if so, what's its name?
07:51 FROGGS moritz: I've not seen something like that yet...
07:51 FROGGS BinGOs: do you know perhaps?
07:53 ShimmerFairy m: my token foo { {say "A is {$*A.gist}"} <?{$*A}> foo :my $*A }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
07:53 camelia rakudo-moar 03f84e: OUTPUT«A is (Any)␤A is (Any)␤A is (Any)␤A is (Any)␤Nil␤»
07:53 ShimmerFairy Is this expected behavior, the  :my $*A  bit affecting earlier parts of the grammar? Because that's really surprising.
07:54 moritz earlier?
07:54 spider-mario joined #perl6
07:54 ShimmerFairy m: my token foo { {say "A is {$*A.gist}"} <?{$*A}> foo }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
07:54 camelia rakudo-moar 03f84e: OUTPUT«A is 1␤「foo」␤ foo => 「foo」␤»
07:54 lizmat m: wait do for 1..5 { start {} }   # seems borked with b85ea62d52736f916e1e1ac FROGGS ?
07:54 camelia rakudo-moar 03f84e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qdPNvS7KrE␤Missing block␤at /tmp/qdPNvS7KrE:1␤------> 3ed with b85ea62d52736f916e1e1ac FROGGS ?7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤        postfix␤»
07:55 ShimmerFairy moritz: apparently having a   :my $*A;    declaration affects the entire rule it's in, including parts before the decl
07:55 lizmat m: await do for 1..5 { start {} }   # seems borked with b85ea62d52736f916e1e1ac FROGGS ?
07:55 camelia rakudo-moar 03f84e: OUTPUT«Must specify a Promise or Channel to await on (got a List)␤  in block <unit> at /tmp/nFP2Mq69F9:1␤␤»
07:55 FROGGS >.<
07:55 moritz ShimmerFairy: I see no parts of a rule in your example that is prior to the declaration of $*A
07:55 moritz ShimmerFairy: you do know that $*A is dynamically scoped, right?
07:56 ShimmerFairy moritz: ... I'm talking about the more lexical $*A that lets you "take" a dynamic variable for just that dynamic scope
07:56 eliasr joined #perl6
07:57 lizmat FROGGS: shall I add a await(List) candidate ?
07:57 ShimmerFairy m: my token foo { {say "A is {$*A.gist}"} <?{$*A}> foo :my $*A = 5; }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
07:57 camelia rakudo-moar 03f84e: OUTPUT«A is (Any)␤A is (Any)␤A is (Any)␤A is (Any)␤Nil␤»
07:57 ShimmerFairy ^^^ even more fun, it turns out it's just the existence of the variable, with an initial assignment not being considered before the inner declaration :/
07:58 moritz m: sub f { say $*A; my $*A = 42 }; my $*A = 42; f()
07:58 camelia rakudo-moar 03f84e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RdneqGtOIg␤Illegal post-declaration of dynamic variable '$*A';␤earlier access must be written as CALLERS::<$*A>␤if that's what you meant␤at /tmp/RdneqGtOIg:1␤------> 3sub f { say $*A; my $*A7⏏5 =…»
07:58 FROGGS m: multi foo(Int) { 'Int' }; multi foo(Any) { 'Any' }; multi foo(*@a) { for @a { foo $_ } }; say foo [1, 2, 3] # lizmat: I was under the impression that the slurpy is preferred...
07:58 camelia rakudo-moar 03f84e: OUTPUT«Any␤»
07:58 lizmat well, maybe that is the bug...
07:58 moritz ShimmerFairy: ^^ that's the error you would get if the {} from the block wouldn't introduce a new scope
07:58 FROGGS lizmat: so yes, please add the needed candidate
07:58 FROGGS lizmat: no, might be a bug in my brain
07:59 ShimmerFairy moritz: I'm not talking about $~MAIN though, I don't get quite what you're trying to say
07:59 moritz ShimmerFairy: and yes, that's by design. Variables are valid for the block they are declared in, and it's only parse time that complains about undeclared that aren't dynamic
07:59 moritz ShimmerFairy: variables are scoped to blocks, not to sections of blocks
07:59 ShimmerFairy moritz: I don't think you're getting me. I was expecting the $*A to keep the value of 1 _until_ the second :my $*A; declaration
08:00 FROGGS ShimmerFairy: you cannot redeclare $*A like you did in your first paste
08:00 moritz ShimmerFairy: I get that you want that
08:00 ShimmerFairy FROGGS: except you totally can, and various grammars (including rakudo) make use of it
08:00 moritz ShimmerFairy: example?
08:00 FROGGS ShimmerFairy: but not the way you did
08:01 FROGGS m: my token foo { :my $*A = 2; {say "A is {$*A.gist}"} <?{$*A}> foo }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
08:01 camelia rakudo-moar 03f84e: OUTPUT«A is 2␤「foo」␤ foo => 「foo」␤»
08:01 FROGGS that's what you usually see
08:01 ShimmerFairy :my $*POD_ALLOW_FCODES := nqp::getlexdyn('$*POD_ALLOW_FCODES');   occurs in a few places, for example
08:01 FROGGS m: my token foo { :my $*A = 2; {say "A is {$*A.gist}"} <?{$*A}> foo }; say "foo" ~~ /:my $*A = 1; {say "A is {$*A.gist}"} <?{$*A}> <foo>/
08:01 camelia rakudo-moar 03f84e: OUTPUT«A is 1␤A is 2␤「foo」␤ foo => 「foo」␤»
08:02 ShimmerFairy m: my token foo { :my $*A = 2; { say $*A } }; "A" ~~ /:my $*A = 1; {say $*A} <foo> {say $*A}/
08:02 camelia rakudo-moar 03f84e: OUTPUT«1␤2␤1␤»
08:02 ShimmerFairy m: my token foo { { say $*A } }; "A" ~~ /:my $*A = 1; {say $*A} <foo> {say $*A}/
08:02 camelia rakudo-moar 03f84e: OUTPUT«1␤1␤1␤»
08:02 FROGGS ShimmerFairy: but that decl is either at the top of the token (which implies that it is bound to the entire token anyway), or the variables is not used within the loken at all
08:02 ShimmerFairy m: my token foo { { say $*A } :my $*A = 2; }; "A" ~~ /:my $*A = 1; {say $*A} <foo> {say $*A}/
08:02 camelia rakudo-moar 03f84e: OUTPUT«1␤(Any)␤1␤»
08:03 dalek rakudo/nom: 70a94d9 | lizmat++ | src/core/asyncops.pm:
08:03 dalek rakudo/nom: Unbreak await do for ^5 { start {} }
08:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/70a94d9d2b
08:03 ShimmerFairy FROGGS: as you can see, declaring the dynamic inside the token wipes out the previous value at the beginning of the token, and not where it's declared.
08:04 ShimmerFairy FROGGS: either it DWIMs, or it should at least set the appropriate initial value (2 in my last examples) in addition to clearing it out. In any case I consider it a bug.
08:04 FROGGS ShimmerFairy: yes, and that's correct
08:04 FROGGS the more correct behaviour would be though explode with 'Illegal post-declaration of dynamic variable'
08:04 FROGGS or 'use before decl' or something
08:05 FROGGS m: my $x; { say $x; my $x }
08:05 camelia rakudo-moar 03f84e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pAtAFccdGv␤Lexical symbol '$x' is already bound to an outer symbol;␤the implicit outer binding must be rewritten as OUTER::<$x>␤before you can unambiguously declare a new '$x' in this scope␤at /tmp/pAtA…»
08:05 FROGGS that's the same
08:06 ShimmerFairy I still say it's incredibly LTA that it magically acts as though the declaration happened where it didn't :/
08:06 FROGGS that's why it should throw
08:08 FROGGS (most) variables are bound to a lexical scope, which is the block they are in, not the piece of text they appear
08:08 brrt i disagree FROGGS... what if the $* thingy was defined in another module alltogether
08:09 brrt dynamic variables are (useful) evil, and i don't think you can tame that
08:09 FROGGS ohh, I was talking about declarations
08:09 brrt but it's a dynvar, right
08:09 FROGGS it is, sure
08:09 brrt you can't really assume anything about it's declaration?
08:10 brrt its
08:10 FROGGS but if you redeclare a dynvar in your block, you only see that dynvar declared in your block
08:10 ShimmerFairy FROGGS: if it's not supposed to do what I want, then it should definitely throw upon the :my that comes after a use of it.
08:10 FROGGS m: my $*x; { say $*x; my $*x }
08:10 camelia rakudo-moar 03f84e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nny7jGcNhS␤Illegal post-declaration of dynamic variable '$*x';␤earlier access must be written as CALLERS::<$*x>␤if that's what you meant␤at /tmp/nny7jGcNhS:1␤------> 3my $*x; { say $*x; my $*x 7⏏…»
08:10 brrt well, that's... hmmmmmm
08:10 FROGGS ShimmerFairy: aye
08:11 FROGGS m: my $*x = 1; { say CALLERS::<$*x>; my $*x = 2 }
08:11 camelia rakudo-moar 03f84e: OUTPUT«1␤»
08:11 kjs_ joined #perl6
08:11 FROGGS m: my token foo { {say "A is {CALLERS::<$*A>.gist}"} <?{CALLERS::<$*A>}> foo :my $*A }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
08:11 camelia rakudo-moar 03f84e: OUTPUT«A is (Any)␤A is (Any)␤A is (Any)␤A is (Any)␤Nil␤»
08:12 larion joined #perl6
08:12 FROGGS m: my token foo { {say "A is {CALLERS::<$*A>.gist}"} <?{CALLERS::<$*A>}> foo }; say "foo" ~~ /:my $*A = 1; <?{$*A}> <foo>/
08:12 camelia rakudo-moar 03f84e: OUTPUT«A is 1␤「foo」␤ foo => 「foo」␤»
08:13 FROGGS now that *is* weird
08:13 FROGGS or maybe not
08:13 FROGGS or...
08:15 darutoko joined #perl6
08:16 dakkar joined #perl6
08:23 Hor|zon joined #perl6
08:24 ab6tract joined #perl6
08:25 vytas joined #perl6
08:26 nine timotimo: if you can explain a bit more what exactly that means, I'd be happy to do it.
08:27 timotimo nine: you can put a custom QAST::Op( :op('yourchosenname'), ... ) into the resulting qast tree
08:27 timotimo the desugar you'll add to the top of the Actions.nqp will tell the compiler how exactly to turn it into a QAST tree that it knows how to compile
08:32 g4 joined #perl6
08:40 timotimo the idea is that we'd end up with a "p6forloop" (or something) op that still has the thing to loop over directly as a child, so that the optimizer can more easily introspect it
08:40 timotimo and if it deems the for loop fit for turning into a while loop, it can just replace the op and keep the block
08:41 timotimo i'm not sure what the part near the beginning is for; the one inside the if statement
08:45 rindolf joined #perl6
08:45 chenryn_ p6: class A { submethod DESTROY { say "die A" }; submethod BUILD { say "new A" }; }; my $o = A.new; undefine $o;
08:45 camelia rakudo-moar 70a94d: OUTPUT«new A␤»
08:45 espadrine joined #perl6
08:46 chenryn_ why DESTROY not exec?
08:47 timotimo DESTROY is not guaranteed to run; it will not run at process exit, either
08:48 timotimo i mean, exiting will not cause DESTROY to be run; only garbage collection cycles will
08:50 chenryn_ https://github.com/perl6/roast/blob/m​aster/S12-construction/destruction.t but here?
08:50 timotimo # no guaranteed timely destruction, so replace $a and try to force some GC here
08:53 mrsolo joined #perl6
08:54 sergot hi #perl6
08:54 sergot timotimo: what do you mean about perl6-encode?
08:54 moritz the more reliable way is to use a LEAVE phaser on the caller side
08:54 moritz \o sergot
08:54 timotimo sergot: it's just about travis
08:54 sergot moritz \o
08:54 sergot timotimo: I've just turned it on :)
08:54 gonz_ joined #perl6
08:54 timotimo you have a .travis.yml, but in github you have to turn it on
08:54 timotimo great! :)
08:55 sergot heh, someone pushed the .travis.yml yesterday I didn't even notice. thanks timotimo++ ! :)
08:55 FROGGS it is easier to turn on via travis though
08:55 timotimo oh, i hadn't realized
08:55 sergot FROGGS: I did so :)
08:55 FROGGS otherwise you have to enter a token you might not know :o)
08:56 sergot and it's super easy in travis-ci.org
08:57 FROGGS *nod*
08:59 chenryn_ timotimo: I use perl6 2015.09 to run such test, got "failed 4 tests of 6".
08:59 brrt timotimo - what, a forloop into a single op? or a virtual op?
08:59 timotimo yeah, DESTROY is unreliable ... and that test is unreliable, too
09:00 timotimo brrt: yeah, just virtual
09:00 brrt phew :-)
09:04 chenryn_ --!
09:05 FireFly joined #perl6
09:06 Ven joined #perl6
09:13 [Sno] joined #perl6
09:18 leont joined #perl6
09:21 kjs_ joined #perl6
09:24 Hor|zon joined #perl6
09:24 thou joined #perl6
09:27 vytas` joined #perl6
09:27 vytas joined #perl6
09:28 CIAvash joined #perl6
09:28 bjz joined #perl6
09:32 larion joined #perl6
09:34 telex joined #perl6
09:44 jnthn morning, #perl6
09:44 yoleaux 11 Oct 2015 11:01Z <lizmat> jnthn: Iterator.push-exactly has a $no-sink catch, is that needed in all custom iterator methods that do $target.push ??
09:44 yoleaux 11 Oct 2015 11:24Z <nine> jnthn: I rejected https://rt.perl.org/SelfSer​vice/Display.html?id=125199 because I think it was just an error in the test script. Am I right?
09:44 RabidGravy marnin
09:45 * jnthn had a nightmare about having nightmares, and wonders if that's a sign to stop working on meta-circular object systems and self-hosting compilers...
09:45 bjz joined #perl6
09:45 tokuhirom joined #perl6
09:45 timotimo http://pbfcomics.com/44/ - jnthn
09:45 jnthn .tell lizmat It can be wise, yes...
09:45 yoleaux jnthn: I'll pass your message to lizmat.
09:46 lizmat .botsnack
09:46 yoleaux :D
09:46 synbot6 om nom nom
09:46 yoleaux 09:45Z <jnthn> lizmat: It can be wise, yes...
09:46 edehont joined #perl6
09:46 lizmat ok, will follow up on that
09:46 jnthn lizmat: I wish we had a nicer solution...
09:46 jnthn timotimo: heh :)
09:46 lizmat it'll work for now
09:49 lizmat http://shop.oreilly.com/product/9781​680500882.do?sortby=publicationDate   # interesting choice of cover for a book updated for 5.22  :-)
09:50 timotimo whoa
09:50 timotimo sudenly
09:51 Ulti So I'm getting 'Parameter '$self' expected a writable container, but got Str value' in a regex substitution I notice there was a previous bug report that looks similar (I have an _ in my substitution too) http://irclog.perlgeek.de/p​erl6/2015-09-26#i_11278343
09:51 Ulti might just be I'm being dumb
09:51 timotimo right, perhaps forgot to put the string into a variable first or something?
09:51 Ulti say $line ~~ s:sigspace/CREATE INDEX \"/CREATE INDEX \""$table_name"_/;
09:51 Ulti is the line
09:51 timotimo hm, looks correct
09:51 jnthn .tell nine The "# Rakudo prohibits calling .accept in a different thread to the one opening the connection" bit is something I want to address pre-Christmas, I think. But I agree on the missing .close
09:51 yoleaux jnthn: I'll pass your message to nine.
09:56 llfourn joined #perl6
09:56 ely-se joined #perl6
09:57 jnthn lizmat: re 70a94d9d2b I'd maybe have gone with Iterable:D instead of List:D: for the first multi-candidate there
09:57 lizmat ok
09:58 lizmat will change and spectest soonish
09:58 jnthn Cool
09:58 jnthn Otherwise looks fine
09:58 jnthn Though I wonder if we should just single-arg-rule await instead...
09:58 lizmat ok, will try that as well...
09:58 * masak just learned about stableperl
09:59 masak has that been discussed here on #perl6?
09:59 lizmat well, one shouldn't mention the one who shouldn't be mentioned  :-)
09:59 lizmat masak: how would that apply to Perl 6 ?
10:00 masak there's a tenuous connection: that of discussions of stability, deprecations,  and backwards-compat
10:00 masak but if there's nothing for us to learn from whatever's going on in p5-land, then let's just pretend I didn't mention it ;)
10:00 jnthn lizmat: One day, somebody will disagree strongly with $perl6-pumpking about something and decided to fork off instead. :) Such is open source.
10:01 lizmat well, I think we *have* learned from it
10:01 btyler from a peanut gallery perspective, stableperl is just a sign of "no matter how much effort you invest in back compat, someone will always disagree about which bits of the internals are public API, and get annoyed when they change"
10:01 lizmat P6 is utterly customizable
10:01 * masak .oO( we don't fork -- we slang! )
10:01 lizmat right!
10:02 jnthn lizmat: We're still plenty vulnerable. We've plenty of things we consider implementation details that somebody *could* come to depend on. And we don't yet have the testing infrastructure Perl 5 does to catch them as early as we'd like.
10:02 lizmat in P6, stableperl would just be YAM  (Yet Another Module)
10:02 lizmat well, I started moving things to Rakudo::Internals
10:02 lizmat and if you're using nqp, you're bound to internals anyway
10:03 lizmat but yes, people will find internals, use them, and complain when they're changed
10:03 masak there's also a connection because this (panic) blog post mentions "emigrat[ing] to [Perl 6]": http://blogs.perl.org/users/xiaoayfeng​/2015/10/whats-the-perl5s-future.html
10:03 lizmat such is life
10:03 jnthn Not bound to, but will quite possibly get your module broken by said bond at some point.
10:03 btyler but it seems likely that people will write some things in nqp, because performance
10:03 hohoho joined #perl6
10:03 jnthn *Not only bound to
10:04 masak I think what's going on with p5 forks is not ideal, but maybe a net positive in the long run
10:05 btyler masak: I think it might look like a bigger event than it is. I'm not sure any of the p5 forks are getting much serious attention yet
10:05 jnthn Wow, I take a day off and y'all get loads done :)
10:06 mrf jnthn: thus the only answer is to take more days off right?
10:06 jnthn Well, next week I'm going for honeymoon, so will have a *week* off. Mebbe I'll come back and find Christmas came early ;)
10:07 mrf jnthn: I think thats wishful thinking. You would need to take at least *2" weeks off :D
10:07 * masak .oO( honey-week )
10:09 Ven joined #perl6
10:10 jnthn lizmat: I just saw 7003c7a52058a47 ("Give MapIterator its own fast sink-all") and nearly had heart failure. :P I think it's actually giving *HashIterator* one? :)
10:12 lizmat jnthn: don't think so, in any case it spectests clean...
10:12 lizmat but will also look at that  :-)
10:12 jnthn lizmat: sink-all on a MapIter *has* to iterate, otherwise for loops would do nothing :)
10:13 lizmat yes, which basicallly means it doesn't give HashIterator a sink-all
10:13 lizmat in any case, maybe MapIterator is a bad name  :-)
10:13 jnthn Oh...my, *that* Map
10:13 jnthn bah!
10:13 jnthn Yes, maybe just maybe :)
10:14 jnthn .oO( Which idiot suggested calling that type Map...oh, me! )
10:14 masak we have MapIter and MapIterator, and they're largely unrelated?
10:14 lizmat yeah...
10:14 jnthn masak: Thankfully, not publicly visible. :)
10:14 masak but still, confusing and not ubiq lang
10:14 lizmat I'll rename MapIterator to something less confusing (I hope :-)
10:14 jnthn But yeah, just 'cus it's internals doesn't mean we should confuse ourselves :P
10:16 jnthn .tell nine 86731df15f works for the anon case, but not the "two different lexical roles called A" case, I think.
10:16 yoleaux jnthn: I'll pass your message to nine.
10:16 ShimmerFairy Just rename them all to "Internal_" ~ rand  , that'll help :P
10:18 * jdv79 wonders if there will come a day soon where its impractical to backlog
10:18 yoleaux 9 Oct 2015 20:44Z <_itz_> jdv79: sorry for the deplay in adding your RSS feed, I've been away from the computer but it's added now
10:18 jdv79 i feel like its taking longer and longer
10:19 * jnthn skipped yesterdays, and read commit logs instead :)
10:19 jnthn lizmat: I guess nobody designed a module pre-comp solution while I took the day off? :)
10:20 lizmat jnthn: no, because I think we want to know *your* ideas about what I wrote in my CURLI gist
10:21 jnthn :)
10:24 nine timotimo: ah I think I understand. Will have a look.
10:24 yoleaux 09:51Z <jnthn> nine: The "# Rakudo prohibits calling .accept in a different thread to the one opening the connection" bit is something I want to address pre-Christmas, I think. But I agree on the missing .close
10:24 yoleaux 10:16Z <jnthn> nine: 86731df15f works for the anon case, but not the "two different lexical roles called A" case, I think.
10:25 Hor|zon joined #perl6
10:26 * jnthn figures he'll finish up the last bit of the case change work first
10:29 Ulti m: say "A" ~~ s:s/A/B/;
10:29 camelia rakudo-moar 70a94d: OUTPUT«Parameter '$self' expected a writable container, but got Str value␤  in block <unit> at /tmp/0nIa5xP17A:1␤␤»
10:29 Ulti m: my $var = "A"; say $var ~~ s:s/A/B/;
10:29 camelia rakudo-moar 70a94d: OUTPUT«「A」␤»
10:31 jnthn Those two are correct; foo ~~ s expects to update foo
10:31 jnthn Error might be better, though
10:32 jnthn Having is rw and non-rw distinguishable by multi-dispatch is in my todo list
10:32 jnthn So it'll be eaiser to add a fallback that gives a good error soonish
10:32 jnthn m: say say "A" ~~ S:s/A/B/;
10:32 camelia rakudo-moar 70a94d: OUTPUT«False␤True␤»
10:32 jnthn m: say "A" ~~ S:s/A/B/;
10:32 camelia rakudo-moar 70a94d: OUTPUT«False␤»
10:32 Ulti yeah so if I do an  'is rw' on the for loop thats doing .lines I get the error there
10:33 jnthn Ulti: is copy
10:33 Ulti that would explain why a copy of the var works :D
10:33 jnthn As in "give me my own mutable copy of this" :)
10:33 Ulti thanks
10:34 nine jnthn: so relying on WHICH for === is just a bad idea or .WHICH should give a better result. Don't know enough about WHICH yet.
10:36 lizmat nine: .WHICH is supposed to return an ObjAt
10:36 lizmat perhaps we need a smarter === for ObjAt's
10:37 jnthn nine: .WHICH should give a better result
10:37 jnthn ObjAt is...not the most ideal thing at present
10:38 * jnthn suspects ObjAt needs a constructor that takes a type along with other things that should be factored in to the identity
10:38 jnthn Where the type is the .WHAT of the thing in question
10:39 nine And I guess an infix:<===> candidate for ObjAts?
10:40 nine That way we can still stringify the ObjAt to a readable type name while considering the objectid of the type object for === comparison
10:40 jnthn I don't think we should expect ObjAt to stringify to anything interesting at all; that's really an implementation detail
10:41 jnthn We'll want to swtich it over to producing an integer hash code later
10:41 espadrine joined #perl6
10:41 nine ok
10:45 Erendis42 joined #perl6
10:47 mattprelude joined #perl6
10:51 llfourn joined #perl6
10:51 Hor|zon joined #perl6
10:51 masak what's the expected semantics/laws of ObjAt? comparing two for equality, I guess. anything else?
10:53 bpmedley joined #perl6
11:09 literal @foo[*-1] seems really unintuitive compared to @foo[-1]. So you're passing a function that does "whatever minus 1". So I'd expect [*-1] to give me the element at index 1 (so the 2nd element), but it just gives (Any). Then what was being subtracted in *-1 ?
11:09 literal s/expect [*-1]/expect [*+1]/
11:09 timotimo huh?
11:09 timotimo the * gets the length of the list
11:10 timotimo and it's a nice thing to have in general, because now you get things like @values[* div 2] and such
11:10 leont I have a Seq $foo, if I do «for @$foo { last }» it seems to eagerly evaluate it, that isn't what I expected :-s
11:10 literal ah, sorry, I was confused there
11:10 leont (or would the problem be in my code, it might be)
11:11 literal but seems weird when compared to @foo[*] (which gives you the full list), but I guess that's because in that case the star means something different than the whatever-star
11:11 timotimo mhm, though i think you'd rather want to spell that @foo[] instead
11:12 literal of course
11:12 literal but is the @foo[*] result intentional?
11:12 jnthn leont: It may well be that the @ there shoves it into a List, caching the values, and a List is allowed to "work ahead"
11:12 jnthn leont: If you're going to keep Seqs around then it's best to keep them in sigilless vars that don't imply any context on them
11:12 thou joined #perl6
11:12 jnthn Then you can just for foo { last } which will consume the Seq without caching its contents
11:13 jnthn Yeah, seems TimToady decided the @ contextualizer would do .cache
11:14 leont But how do I use a gather/take lazily then?
11:14 lizmat leont: if you slip the Seq ?
11:14 timotimo m: my $foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for $foo { .say; last }
11:14 camelia rakudo-moar 70a94d: OUTPUT«(...)␤»
11:15 timotimo m: my $foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for $foo { .say; last if Bool.pick }
11:15 camelia rakudo-moar 70a94d: OUTPUT«(...)␤»
11:15 timotimo m: my $foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for $foo { .say; last if Bool.pick }
11:15 camelia rakudo-moar 70a94d: OUTPUT«(...)␤»
11:15 timotimo hum?
11:15 jnthn timotimo: sigilless
11:15 jnthn timotimo: for $foo { } is always one item
11:15 timotimo m: my foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for foo { .say; last if Bool.pick }
11:15 camelia rakudo-moar 70a94d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/atVlIL1l5B␤Malformed my (did you mean to declare a sigilless \foo or $foo?)␤at /tmp/atVlIL1l5B:1␤------> 3my foo7⏏5 = lazy gather { take 1; say "one"; take␤»
11:15 timotimo right of course
11:15 timotimo m: my \foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for foo { .say; last if Bool.pick }
11:15 camelia rakudo-moar 70a94d: OUTPUT«1␤one␤2␤two␤3␤three␤»
11:15 timotimo m: my \foo = lazy gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for foo { .say; last }
11:15 camelia rakudo-moar 70a94d: OUTPUT«1␤»
11:15 timotimo there we go
11:15 timotimo leont: ^- lazy gather
11:15 timotimo m: my \foo = gather { take 1; say "one"; take 2; say "two"; take 3; say "three"; }; for foo { .say; last }
11:15 camelia rakudo-moar 70a94d: OUTPUT«1␤»
11:15 jnthn I don't think you need the lazy there
11:15 timotimo you're right
11:15 cyg07 joined #perl6
11:16 timotimo do i need to spell it "lazy gather" if i want to put it into a @ var?
11:16 jnthn Yeah
11:16 leont I'm returning the lazy gather from a sub, it doesn't seem to be working :-s
11:17 timotimo what do you put/bind it into?
11:17 awwaiid joined #perl6
11:20 llfourn is there any reason p6 docs hasn't s/EnumMap/Map/ yet?
11:21 cognominal joined #perl6
11:22 cygx joined #perl6
11:22 cygx o/
11:22 cygx m: sub MAIN($arg, *%flags) {}
11:22 camelia rakudo-moar 70a94d: OUTPUT«Usage:␤  /tmp/XhOhInS31h =<Associative> <arg> ␤»
11:23 timotimo how do you pronounce your name, cygx?
11:23 cygx as written :p
11:23 timotimo zügiks
11:24 cygx s/i//
11:27 leont Tried various things, possibly my logic is broken
11:28 leont https://github.com/Leont/path-iterator/​blob/master/lib/Path/Iterator.pm6#L186
11:29 timotimo probably depends on how you use that function?
11:32 dalek nqp: 1a9207c | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
11:32 dalek nqp: On JVM, map nqp::tc to nqp::uc for now.
11:32 dalek nqp:
11:32 dalek nqp: Means we can use nqp::tc in Rakudo without breaking the JVM build.
11:32 dalek nqp: review: https://github.com/perl6/nqp/commit/1a9207c252
11:33 leont Ah, it seems my testing code was broken, not the actualy code itself. D'oh!
11:34 jnthn Quis custodiet ipsos custodes? :)
11:34 leont jnthn: funny you say that today, it's exactly 30 years after the start of Watchmen today ;-)
11:34 masak jnthn: did you look that one up in one of our courses? :P
11:35 jnthn masak: Remembered it from one of our courses :P
11:35 leont (and those happen to be the very last words of the book)
11:35 masak jnthn: you *remembered* it? kudos.
11:35 jnthn masak: Yeah, but I'm sure my pronunciation of it is awfully wrong :)
11:35 masak jnthn: of course. you're British.
11:35 timotimo as long as you're not pronouncing your latin like an american or brit would :)
11:35 leont There is no right pronounciation of Latin, it's a dead language…
11:35 masak the British has the worst Latin pronunciation of all peoples of the Earth, hands down.
11:35 jnthn On the upside, Latin's a pretty great language to speak wrong 'cus there's no native speakers around any more to correct me :D
11:36 masak leont: well, except for the Living Latin movement... :)
11:36 timotimo just try to get rid of the diphtongs
11:36 rurban joined #perl6
11:36 AlexDaniel joined #perl6
11:36 leont masak: I know they exist, a friend of a friend of mine was apparently raised bilingual English-Latin, which I think is somewhat hilarious
11:36 dalek nqp: 6ac0c44 | jnthn++ | tools/build/MOAR_REVISION:
11:36 dalek nqp: Bump MOAR_REVISION for NFG/casefold integration.
11:36 dalek nqp: review: https://github.com/perl6/nqp/commit/6ac0c44f92
11:37 frithnanth joined #perl6
11:38 masak leont: I studied Latin for two semesters. it's a good language to know. it often struck me how many English words are basically complicated/distorted loans from Latin, with an unnecessary prefix glued on to the Latin word.
11:38 masak like Latin "paro" -- "I prepare".
11:38 masak there's half a dozen examples like that.
11:38 dalek rakudo/nom: 362f0b5 | jnthn++ | tools/build/NQP_REVISION:
11:38 dalek rakudo/nom: Bump NQP_REVISION for case-folding bits.
11:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/362f0b54d9
11:38 dalek rakudo/nom: 06fef86 | jnthn++ | src/core/Str.pm:
11:38 dalek rakudo/nom: Make .tc actually use the nqp::tc op.
11:38 dalek rakudo/nom:
11:38 dalek rakudo/nom: So it actually, y'know, titlecases.
11:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06fef86dfe
11:38 DrForr_ Unless you've watched Harry Potter :)
11:39 kid51 joined #perl6
11:39 masak DrForr_: have you seen the HPMoR deliberations around... "wingardium leviosa"? :P
11:39 dalek roast: d87b60f | jnthn++ | S15-nfg/case-change.t:
11:39 dalek roast: Unfudge NFG/casefold integration tests.
11:39 dalek roast: review: https://github.com/perl6/roast/commit/d87b60f420
11:39 DrForr_ *cough* Neeeeeeeerd! :)
11:41 dalek roast: 57bff55 | jnthn++ | S32-str/tc.t:
11:41 dalek roast: Unfudge .tc tests we now pass.
11:41 dalek roast: review: https://github.com/perl6/roast/commit/57bff552bd
11:41 masak DrForr_: stipulated.
11:41 leont masak: I've studied Latin (4 semesters) and Old Greek (one semester), I know their uses, but raising a child in either is another matter
11:42 masak indeed
11:43 * leont 's first high school was a classically oriented one, I learned that 6 languages at the same time was too much for me :-/
11:43 moritz zikes
11:43 moritz *yikes
11:44 ShimmerFairy jnthn: for the record I'm still a bit uncomfortable with how nqp::tc and Str.tc act differently, as well as the fact that .tc is different in behavior from .uc and .lc
11:45 jnthn ShimmerFairy: TimToady++ gets to design Str.foo, I get to design nqp::foo ;)
11:46 moritz m: say 's'.tc
11:46 camelia rakudo-moar 70a94d: OUTPUT«S␤»
11:46 moritz m: say 'ß'.tc
11:46 camelia rakudo-moar 70a94d: OUTPUT«SS␤»
11:46 moritz m: say 'ßable'.tc
11:46 camelia rakudo-moar 70a94d: OUTPUT«SSable␤»
11:46 jnthn moritz: ^^ is the one I just fixed and unfudged tests fro :)
11:46 jnthn *for
11:46 moritz :-)
11:47 tokuhirom joined #perl6
11:47 jnthn ShimmerFairy: But more seriously: we could arguably make nqp::tc do exactly what .tc does, but from a composability perspective it's quite cheap to get the Perl 6 .tc behavior out of the current nqp::tc one, but getting the current nqp::tc behavior out of the Perl 6 .tc method semantics would be costly.
11:47 jnthn ShimmerFairy: So I'm inclined to leave it as it is
11:48 ShimmerFairy jnthn: btw, I think nqp::tc() (titlecase every character) is more correct and consistent :)
11:48 moritz ShimmerFairy: tell that to TimToady
11:48 jnthn Sure, well, we tend to push consistency harder at the VM level than DWIM. The Perl 6 choice for .tc is probably, tbh, the more useful one for msot people.
11:49 ShimmerFairy I agree it's likely more useful, it just also happens to be one of those things where you can't help but wonder when you take a look at it :)
11:51 timbunce_ joined #perl6
11:51 Fluor joined #perl6
11:52 timbunce_ left #perl6
11:52 jnthn OK, I'm done with CaseFolding and SpecialCasing and their integration with NFG :)
11:53 jnthn Think that gets us down to 1 outstanding Unicode-related issue before xmas, which is the NFG algo change.
11:53 jnthn But I'm going to care about the module stuff a bit before taking that one on.
11:53 jnthn lunch &
11:56 vytas m: say ».WHAT
11:56 camelia rakudo-moar 70a94d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qD5uBmK_tM␤Missing « or »␤at /tmp/qD5uBmK_tM:1␤------> 3say ».7⏏5WHAT␤»
11:57 loren joined #perl6
11:59 cygx how should the MAIN usage message for slurpy hashes look?
11:59 cygx we have [--opt=<Any>] and [<slupy> ...], maybe something like [--<flags...>=...]
12:00 cygx or just [--<flags>=...]
12:00 travis-ci joined #perl6
12:00 travis-ci Rakudo build failed. TimToady 'allow alphabetic version components'
12:00 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84814691 https://github.com/rakudo/rakudo/c​ompare/5f9f4c08316a...d16d88e50aba
12:00 travis-ci left #perl6
12:04 travis-ci joined #perl6
12:04 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Unbreak Baggy.kv
12:04 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84814736 https://github.com/rakudo/rakudo/c​ompare/d16d88e50aba...b05dda30a45a
12:04 travis-ci left #perl6
12:06 Woodi joined #perl6
12:07 loren m: my &f := &substr.assuming('hello world'); say f(0, 3);
12:07 camelia rakudo-moar 70a94d: OUTPUT«hello world␤»
12:09 loren Seems like not correct.
12:12 * moritz agrees
12:12 moritz m: my &f := &substr.assuming(*, 0); say f 'hello world', 3
12:12 camelia rakudo-moar 70a94d: OUTPUT«hello world␤»
12:14 colomon joined #perl6
12:15 colomon loren: … huh
12:15 travis-ci joined #perl6
12:15 travis-ci Rakudo build failed. Tobias Leich 'add await candidate that catches non-awaitables'
12:15 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84827710 https://github.com/rakudo/rakudo/c​ompare/b05dda30a45a...b85ea62d5273
12:15 travis-ci left #perl6
12:15 colomon m: say substr(“hello world”, 0, 3)
12:15 camelia rakudo-moar 70a94d: OUTPUT«hel␤»
12:15 loren haha ..
12:16 loren It's oblivious right..
12:16 ely-se joined #perl6
12:17 bjz joined #perl6
12:17 loren m: my &f := &substr.assuming('hello world'); say f(0, 2);
12:17 camelia rakudo-moar 70a94d: OUTPUT«hello world␤»
12:18 moritz m: say &substr.assuming('hello world')(0, 2)
12:18 camelia rakudo-moar 70a94d: OUTPUT«hello world␤»
12:18 moritz wtf (the "w" stands for "weird", here)
12:18 * moritz would have thought we had tests for assuming
12:20 moritz m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')(0, 3)
12:20 camelia rakudo-moar 70a94d: OUTPUT«hello, world␤»
12:20 moritz m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')()
12:20 camelia rakudo-moar 70a94d: OUTPUT«Cannot call substr(Str); none of these signatures match:␤    (Str:D \what, Int:D \start)␤    (Str:D \what, \start)␤    (Str:D \what, Int:D \start, Int:D \want)␤    ($what, \start, $want?)␤  in sub my-substr at /tmp/6Vcs9I232W:1␤  in sub __PRIME…»
12:20 FROGGS m: my &f := &substr.assuming('hello world'); say &f.signature
12:20 camelia rakudo-moar 70a94d: OUTPUT«(|_ is raw)␤»
12:20 moritz m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')(3)
12:20 camelia rakudo-moar 70a94d: OUTPUT«lo, world␤»
12:20 loren m: my &f := &substr.assuming('hello world'); say f(2, 3);
12:20 moritz m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')(0, 3)
12:20 camelia rakudo-moar 70a94d: OUTPUT«llo world␤»
12:20 camelia rakudo-moar 70a94d: OUTPUT«hello, world␤»
12:20 moritz m: sub my-substr(*@a) { substr |@a }; say &my-substr.assuming('hello, world')(1, 3)
12:20 camelia rakudo-moar 70a94d: OUTPUT«ello, world␤»
12:21 moritz so it only passes one more argument on to the original function?
12:21 FROGGS maybe assuming does not work well with multies?
12:21 moritz m: sub d(*@x) { say @x.perl }; &d.assuming('a', 'b')('c', 'd', 'e')
12:21 camelia rakudo-moar 70a94d: OUTPUT«["a", "b", "c"]␤»
12:21 loren Maybe the implement ignore the second argument
12:21 moritz FROGGS: no
12:21 moritz FROGGS: it ignores anything from the second argument onwards
12:22 FROGGS m: multi f(1) {'a'}; multi f(1, 2) {'b'}; multi f(1, 2, 3) {'c'}; say &f.assuming(1)(2, 3)
12:22 camelia rakudo-moar 70a94d: OUTPUT«b␤»
12:22 FROGGS m: multi f(1) {'a'}; multi f(1, 2) {'b'}; multi f(1, 2, 3) {'c'}; say &f.assuming(1)(2, 3, 4)
12:22 camelia rakudo-moar 70a94d: OUTPUT«b␤»
12:22 FROGGS wow
12:22 moritz who wants to write the bug report?
12:24 * masak submits rakudobug
12:27 travis-ci joined #perl6
12:28 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Speed up Bag/BagHash/Mix/MixHash
12:28 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84832976 https://github.com/rakudo/rakudo/c​ompare/b85ea62d5273...6432ddf302ba
12:28 travis-ci left #perl6
12:29 dalek doc: da16879 | (Lloyd Fournier)++ | lib/Language/modules.pod:
12:29 dalek doc: added documentation for UNIT::EXPORT::* packages and made some minor clarifications
12:29 dalek doc: review: https://github.com/perl6/doc/commit/da168790c2
12:29 dalek doc: a8dcd11 | (Lloyd Fournier)++ | / (520 files):
12:29 dalek doc: merging changes before push
12:29 dalek doc: review: https://github.com/perl6/doc/commit/a8dcd11f04
12:30 moritz 520 files touched
12:30 moritz ah, probably merged in the lib -> doc rename
12:31 llfourn hmm sorry i think i just goofed that :\
12:32 llfourn I merged from master and then committed and then pushed
12:32 * cygx sent https://github.com/rakudo/rakudo/pull/549
12:32 llfourn and git said I was only changing one file...
12:33 * masak .oO( push the commit, they said. you've only changed one file, they said )
12:34 llfourn I did git diff --stat --cached upstream/master to see what was changing (which I got from google)
12:34 llfourn Did I actually change that many files? o.o
12:35 llfourn can someone clean that up for me and I'll redo that one
12:36 llfourn I am now discovering that I understand git less than I thought
12:36 loren They said 'File renamed without changes'
12:36 hohoho joined #perl6
12:37 moritz llfourn: all is fine
12:37 llfourn "1 file changed, 69 insertions(+), 11 deletions(-)" is what they literally said
12:37 moritz llfourn: don't let masak or me confuse you
12:37 travis-ci joined #perl6
12:37 llfourn moritz: ok I will stop panicking then
12:37 travis-ci Rakudo build failed. TimToady 'switch to 'use v6b+;' notation'
12:37 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84852330 https://github.com/rakudo/rakudo/c​ompare/6432ddf302ba...89d1b4f5e004
12:37 travis-ci left #perl6
12:38 llfourn thanks!
12:38 moritz llfourn: you changed one file, and then pulled in changes that renamed 520 files
12:38 moritz llfourn: and somehow the merge commit ended up being marked as renaming so 520 files
12:38 moritz llfourn: but that's just git being weird (or consistent)
12:38 moritz llfourn: thank you for your patch!
12:39 llfourn moritz: Yes I thought git would ignore that part of the commit
12:45 jkva joined #perl6
13:00 thou joined #perl6
13:08 RabidGravy joined #perl6
13:13 itz_stmuk why was the lib->doc renaming done in the first place?
13:14 n0tjack joined #perl6
13:15 moritz itz_stmuk: so that we have a clearer distinction between code used in the repo (by htmlify and p6doc; in lib/) and the documentation
13:15 Ven joined #perl6
13:17 n0tjack joined #perl6
13:18 RabidGravy it was somewhat confusing
13:18 itz_stmuk why is that distinction needed? surely pod is pod .. it's broken things like p6doc -f
13:19 * RabidGravy is easily confused
13:20 moritz itz_stmuk: then we must fix p6doc
13:20 moritz itz_stmuk: but it's very handy when doing a 'git grep', to see if stuff is documented (or used by the tools)
13:21 itz_stmuk an alternative would have been to split doc into supporting utils and docs proper
13:21 itz_stmuk which wouldn't have created extra work
13:21 moritz you mean the splitting wouldn't have been work?
13:21 * moritz confused
13:22 itz_stmuk well less work IMO
13:22 leont When was the push/unshift flattening change committed?
13:22 PerlJam Good morning #perl6
13:23 itz_stmuk its also made p6doc-index probably twice as slow since it has to look in "lib" and "doc" directories
13:24 RabidGravy leont, somewhere between a week and two weeks ago
13:24 itz_stmuk unless you are proposing user module documentation also lives under "doc" rather than "lib"
13:24 n0tjack morning browser tab maintenance is now functionally mandatory
13:24 RabidGravy really need to get around to adding append/prepend to the Array docs
13:25 n0tjack m: (^10).append(6*^5);
13:25 camelia rakudo-moar 06fef8: OUTPUT«Cannot call append(Range: Range); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at /tmp/X4VT4eIrvU:1␤␤»
13:26 n0tjack m: say ^10;
13:26 camelia rakudo-moar 06fef8: OUTPUT«0..^10␤»
13:26 n0tjack m: say 6*^5;
13:26 camelia rakudo-moar 06fef8: OUTPUT«0..^30␤»
13:26 n0tjack huh
13:26 n0tjack m: say (|^10).append(|6*^5);
13:26 camelia rakudo-moar 06fef8: OUTPUT«Cannot call append(Slip: Int); none of these signatures match:␤    (Any:U \SELF: |values is raw)␤  in block <unit> at /tmp/8nrsYH1NUq:1␤␤»
13:27 PerlJam n0tjack: "is raw" will foil you every time :)
13:27 n0tjack m: say |(^10),(|6*^5);
13:27 camelia rakudo-moar 06fef8: OUTPUT«01234567895␤»
13:27 n0tjack PerlJam: what does "is raw" mean?
13:28 TimToady well, ranges are immutable, so you can't append to them
13:28 n0tjack ahhh
13:29 * leont isn't getting what he observes. He has a list, he shift an entry from it. the entry and the list are identical when calling .perl on them.
13:29 skids joined #perl6
13:30 TimToady m: 1,2
13:30 camelia rakudo-moar 06fef8: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤»
13:30 moritz m: my @a = [1, 2], 1, 2; my @shifted = @a.shift; say @shifted.perl: say @a.perl
13:30 camelia rakudo-moar 06fef8: OUTPUT«[1, 2]␤Cannot call perl(Array: Bool); none of these signatures match:␤    (Mu:U $: *%_)␤    (Mu:D $: *%_)␤    (List:D \SELF: *%_)␤    (Array:D \SELF: *%_)␤  in block <unit> at /tmp/2SPlt2d00g:1␤␤»
13:30 TimToady m: $_++, 3
13:30 camelia rakudo-moar 06fef8: OUTPUT«WARNINGS:␤Useless use of constant integer 3 in sink context (line 1)␤»
13:31 travis-ci joined #perl6
13:31 travis-ci Rakudo build passed. jnthn 'Make .tc actually use the nqp::tc op.
13:31 travis-ci https://travis-ci.org/raku​do/rakudo/builds/84901111 https://github.com/rakudo/rakudo/c​ompare/70a94d9d2bb3...06fef86dfe62
13:31 travis-ci left #perl6
13:31 moritz m: my @a = [1, 2], 1, 2; my @shifted = @a.shift; say @shifted.perl; say @a.perl
13:31 camelia rakudo-moar 06fef8: OUTPUT«[[1, 2],]␤[1, 2]␤»
13:32 n0tjack TimToady: since we have implicit arithmetic distribution now in range notation, was any consideration ever given to making (1,2,3) * (4,5,6) "just work"?
13:33 TimToady m: my @a = [1, 2], 1, 2; my @shifted = @a.shift.list; say @shifted.perl; say @a.perl
13:33 camelia rakudo-moar 06fef8: OUTPUT«[1, 2]␤[1, 2]␤»
13:34 * PerlJam fetches the morning caffiene
13:34 itz_stmuk actually no p6doc doc whatever is installed ..
13:34 TimToady n0tjack: don't want to re-invent APL, so we require explicit hyper, X or Z for that, so that it's clear to the reader *how* the operator is to be applied
13:35 itz_stmuk moritz: is the target directory for the p6doc pod unchanged or also intended to be "doc"?
13:35 n0tjack TimToady: that does make sense.
13:36 n0tjack of course I'm personally going to override all the arithmetic ops to distribute automatically...
13:36 ely-se joined #perl6
13:36 TimToady well, probably the PDLers will too
13:37 tokuhirom joined #perl6
13:37 TimToady all is fair if you predeclare
13:37 * n0tjack puts that on the QOTD list
13:39 TimToady but most mere mortals want their scalar ops they learnt in grade school to stay scalar
13:39 n0tjack that's the problem with grade schools these days, no linear algebra
13:45 moritz itz_stmuk: it's also meant to be "doc"
13:45 moritz dunno if we install that directory yet
13:46 itz_stmuk its not installed .. it's not clear what mechanism is supposed to copy the files in place via the panda install
13:47 itz_stmuk maybe its just a line in the META
13:48 Ven joined #perl6
13:49 n0tjack what are the orthographic rules for twigil-style variables?
13:49 n0tjack sub foo {10*$^n}; sub unifoo {10*$^⍺};
13:49 n0tjack m: sub foo {10*$^n}; sub unifoo {10*$^⍺};
13:49 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rq3WBqaUWA␤Missing required term after infix␤at /tmp/rq3WBqaUWA:1␤------> 3sub foo {10*$^n}; sub unifoo {10*$^7⏏5⍺};␤    expecting any of:␤        prefix␤        term␤»
13:50 n0tjack do they have to be ASCII?
13:50 moritz .u ⍺
13:50 yoleaux U+237A APL FUNCTIONAL SYMBOL ALPHA [So] (⍺)
13:50 moritz n0tjack: no, but they need to be identifier characters
13:50 moritz .u alpha
13:50 yoleaux U+0251 LATIN SMALL LETTER ALPHA [Ll] (ɑ)
13:50 yoleaux U+0252 LATIN SMALL LETTER TURNED ALPHA [Ll] (ɒ)
13:50 yoleaux U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS [Lu] (Ά)
13:50 n0tjack so if I use greek alpha, I'll be ok
13:50 n0tjack ?
13:51 moritz m: { $^ɑ }
13:51 camelia rakudo-moar 06fef8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/rNSAnMpFuw:1␤␤»
13:51 moritz m: { $^ɑ }(1)
13:51 camelia rakudo-moar 06fef8: ( no output )
13:51 moritz n0tjack: yes
13:51 n0tjack cool
13:51 n0tjack does that apply to subs as well?
13:52 moritz aye
13:52 n0tjack boo, sensible restrictions
13:58 thou joined #perl6
14:03 Zoffix moritz, it's EXTENDED_TESTING based on this document: https://github.com/Perl-Toolchain-Gang/toolc​hain-site/blob/master/lancaster-consensus.md (RE: <moritz> in p5, there's an environment variable that's commonly used for tests that must be able to access the Internet, no?)
14:04 Zoffix if true, the user or process running tests is willing to run optional tests that may take extra time or ***resources*** to complete.
14:05 moritz Zoffix: thanks
14:05 rurban joined #perl6
14:06 moritz commented in https://github.com/sergot/http-useragent/issues/83
14:09 khw joined #perl6
14:09 cygx_ joined #perl6
14:10 lizmat jnthn: would it be an idea to nqp:sha all the keys/values of a Set/Bag/Mix to create a .WHICH value ?
14:11 n0tjack m: .u 'quote'
14:11 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mwfg91HZGK␤Two terms in a row␤at /tmp/mwfg91HZGK:1␤------> 3.u7⏏5 'quote'␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤     …»
14:11 jnthn lizmat: Nah, there are far cheaper hashing algos
14:11 n0tjack m: .u quote
14:11 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WgrADX8rWG␤Two terms in a row␤at /tmp/WgrADX8rWG:1␤------> 3.u7⏏5 quote␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤       …»
14:11 lizmat jnthn: any available in nqp ?
14:11 jnthn lizmat: The problem is a bit deeper though
14:12 jnthn lizmat: No, but the cheap ones are just a handful of integer ops, which we can JIT plenty fast enough
14:12 jnthn lizmat: But we can't do that yet
14:12 jnthn Because ObjAt isn't just about hashing, it's about identity
14:12 lizmat ok, scratch that idea then  :-)
14:14 Ven joined #perl6
14:19 [Coke] (writing things in nqp) someone asked on SE about that, tried to steer them away from nqp.
14:19 [Coke] er, SO.
14:20 TimToady debugging nqp can be...time consuming...
14:21 lizmat yeah, been spending most of today working on Bag/Mix etc, only to have it hang in the optimizer now  :-(
14:21 arnsholt Holy crap, yeah. NQP error reporting is special =)
14:21 * [Coke] updates his answer to that question to mention the more 'internals' style nature of nqp.
14:22 crncosta joined #perl6
14:24 Ven joined #perl6
14:25 itz_stmuk moritz: https://github.com/tadzik/panda/pull/233 is one solution to the p6doc pod installation problem
14:25 tadzik I thought panda does that!
14:25 tadzik weird!
14:27 [Coke] moritz: I wasn't trying to change anything installed about perl6-doc; I was trying to clean up the -source- of the repository.
14:28 jnthn NQP error reporting would no doubt be better if somebody spent some time improving it :)
14:28 [Coke] So I don't mind if we chat about what is supposed to get installed where now, or if we break the rule in the -source- for perl6-doc and keep lib for pod-for-docs, and real-lib (or whatever) for our source code lib.
14:29 itz_stmuk I think "lib" as target is prefered to "doc" and core docs shouldn't be special cased
14:29 [Coke] jnthn: I am happy to consider anything in nqp:: from rakudo space (and therefore all of nqp) as internals. (and therefore we're able to change it to suit our needs)
14:29 [Coke] again, my change was intended to be for source, not target.
14:30 itz_stmuk ok
14:30 Aww left #perl6
14:30 itz_stmuk so how does it get to the target?
14:31 [Coke] I have no idea. I never installed there.
14:31 [Coke] I only ever used perl6-doc to build the html site.
14:31 itz_stmuk one Awful Hack might be to use sym links :)
14:31 [Coke] so, we need to keep perl6-doc source and docs separate. I'm open to discussion on the best way to make that happen.
14:31 [Coke] doesn't work on windows, nonstarter.
14:31 itz_stmuk oh yeah
14:32 [Coke] there isn't an install target in perl6-doc, so what are you doing?
14:33 lizmat m: use nqp; my $a := nqp::hash(); sub a(Mu \h) { nqp::iterator(h) }; a $a   # jnthn shouldn't this just work ?
14:33 camelia rakudo-moar 06fef8: OUTPUT«Cannot iterate object with P6opaque representation␤  in sub a at /tmp/tGUoKsvHDH:1␤  in block <unit> at /tmp/tGUoKsvHDH:1␤␤»
14:33 jnthn [Coke]: Yes, I think for the time being that's the way to go. Though in reality the nqp:: opset has undergone quite a lot less churn than Perl 6 itself :)
14:33 itz_stmuk "panda install" doesn't install the p6doc pod
14:33 jnthn lizmat: No, because NQP objects passed to parameters get hllized
14:34 jnthn lizmat: So it becomes a real perl 6 hash
14:34 lizmat *sigh*
14:34 lizmat ok
14:34 virtualsue joined #perl6
14:34 tadzik itz_stmuk: yeah, looks like it got removed over time for some reason
14:35 tadzik itz_stmuk: I can remember it being there though, I think I'll look through commit log and check if maybe someone commented on it while removing it
14:36 itz_stmuk ah the plot thickens!
14:36 [Coke] tadzik: the installed docs? Yes, I broke that. :)
14:36 skaji how about preparing Build.pm to install p6doc?
14:36 tadzik [Coke]: oh, why? :)
14:36 [Coke] because I had no idea that anyone was doing that.
14:37 tadzik fair enough :)
14:37 [Coke] I was trying to fix the perl6-doc -source-
14:37 tadzik itz_stmuk: so now p6doc expects that?
14:37 [Coke] we were treating docs and internal modules as the same thing. I split them out.
14:38 itz_stmuk tadzik: the suggested panda change is one way of fixing p6doc pod install
14:38 tadzik ah
14:38 [Coke] there should be a perl6/doc ticket to track this issue.
14:38 tadzik well, if't is specificaly for p6doc then I'd rather have it have its Build.pm
14:38 itz_stmuk well it also seemed wrong that p6doc doc should be a special case
14:38 tadzik once panda gets it then we need to consider speccing it too
14:39 tadzik the idea was that modules would have docs embedded in code
14:39 [Coke] itz_stmuk: perl6-doc is a special case, though.
14:39 tadzik mostly
14:40 FROGGS Zoffix: I'm just installing your (P5) JavaScript::Minifier for $work :o)
14:40 itz_stmuk [Coke]: what's your suggested solution for pod installation?
14:40 FROGGS Zoffix++ # thank you
14:41 Ven joined #perl6
14:41 [Coke] itz_stmuk: "make the install work like it did before"
14:41 Zoffix FROGGS, I'm just a maintainer and I wouldn't use it, because there's a bug :) There's JavaScript::Minifier::XS that should work (though it does have XS)
14:41 [Coke] but that doesn't mean "revert the repository to the way it was before"
14:42 FROGGS Zoffix: what kind of bug?
14:42 Zoffix FROGGS, https://github.com/zoffixznet​/JavaScript-Minifier/issues/2
14:42 [Coke] if we can make a build.pm target for installation (because we're really installing docs, not our own code), then that's great. then the source follows the conventions (our own code goes in lib for building and running things), and we keep the installed version happy.
14:42 tokuhirom joined #perl6
14:42 Erendis42 left #perl6
14:43 Zoffix FROGGS, and the original author is adamant that buggy behaviour should be left there because they rely on it (???)... so even if I had the technical ability to fix it, it'd likely be politically unfeasible to fix it :)
14:43 FROGGS O.o
14:43 Zoffix My whole takeover of that module was very strained. As the author forgot they gave comaint to someone else and were then shocked I received comaint from that other person.
14:44 itz_stmuk ok so a Build.pm in p6doc which copies "doc" to "lib" (as before)
14:44 FROGGS heh
14:45 * [Coke] opens https://github.com/perl6/doc/issues/157
14:46 [Coke] itz_stmuk: but also probably doesn't install lib.
14:46 [Coke] (our source copy)
14:46 [Coke] because I don't think we need to install any of the helper classes we use to build the html site, e.g.
14:46 ely-se joined #perl6
14:47 FROGGS Zoffix: ewww, it does not even minify... before the js code is 55687 chars, and afterwards 55679
14:47 Zoffix lol
14:48 [Coke] btw, I wonder if our html profile will get any kind of speedup by using smaller names for things in the json data structure.
14:48 [Coke] that's got to add up at the sizes we're dealing with.
14:48 Zoffix FROGGS, this one should be OK: https://metacpan.org/pod/JavaScript::Minifier::XS
14:49 FROGGS Zoffix: thanks
14:49 Zoffix I use a module built on top of it and so far don't see issues.
14:49 Zoffix However, I think I was able to get a bit more minification using an online tool than using this module.
14:50 itz_stmuk [Coke]: or just use a file compression module in the web server
14:50 muraiki joined #perl6
14:51 Zoffix We already do: "Content-Encoding: gzip". At least on the docs page
14:53 [Coke] itz_stmuk: there is no web server.
14:53 [Coke] I mean when running perl6 --profile
14:53 Zoffix ah
14:55 Ven joined #perl6
14:56 chenryn_ joined #perl6
14:57 Ven joined #perl6
14:58 ely-se joined #perl6
15:04 pierrot joined #perl6
15:07 KCL_ joined #perl6
15:08 n0tjack joined #perl6
15:18 Ven joined #perl6
15:24 n0tjack it's 2015 and I still have to edit my homepage's HTML by hand and FTP it up.
15:25 n0tjack that feels about as natural as dialing an actual number on an actual deskphone
15:25 * pink_mist did that just 3 minutes ago
15:25 xfix joined #perl6
15:25 arnsholt A proper phone will generally have better sound than a mobile, mind
15:26 pink_mist it's a cordless deskphone though, fwiw
15:26 n0tjack I have a normal deskphone with a cordless headset, but the actual dialing now feels so archaic to me
15:26 n0tjack and there's no backspace key
15:26 Zoffix n0tjack, you don't *have* to, it's just the best way :)
15:26 Zoffix ...to get what you want
15:27 n0tjack Zoffix: Well, technically, my webhost *does* allow me to edit HTML files through a web interface -- by dumping the files into a giant textarea and saying "have fun!"
15:28 Zoffix I meant we have tools that autogenerate markup, but you lose some of the precision. The entire http://demo.xtatik.org/ is powered just by a few lines of code, for example :)
15:30 RabidGravy but, but FTP!
15:30 n0tjack that's a pretty nice framework
15:30 n0tjack Every year I tell myself I'll put some CMS in
15:30 n0tjack but then every year I tell myself I'll move to a better apt, too :)
15:31 Zoffix :P
15:34 awwaiid How unhappy does it make #perl6 if I never do "use v6;" ?
15:34 n0tjack awwaiid: I imagine that would make perl5 unhappy
15:34 PerlJam awwaiid: I never do that either.
15:34 n0tjack but I think we're past the days when perl6 was considered a continuation / replacement for v5
15:35 awwaiid well my files are like .pm6 so I think perl5 won't mind
15:35 moritz awwaiid: well, it doesn't make me unhappy, unless I want to read your code and it's wrongly syntax highlighted, or unless I run your code with p5 and get a crappy error message
15:35 n0tjack I don't think it's likely "perl" will ever be aliased to "perl6"
15:35 edehont joined #perl6
15:35 PerlJam n0tjack: "Ever" is a long time.  It could still happen eventually
15:36 edehont joined #perl6
15:36 n0tjack PerlJam: Sure, but I think there's been a philosophical shift over the last few years which has removed, or at least diminished, the motivation for doing that.
15:36 PerlJam aye
15:37 awwaiid alright
15:37 awwaiid well I can always put it in there later if I find a reason. thanks!
15:38 * n0tjack hides the fact that he literally typed "perl blah.p6" the other day and was baffled for like 2 minutes at the error message
15:39 lichtkind joined #perl6
15:40 awwaiid heh
15:40 jkva joined #perl6
15:42 n0tjack how does the regex list-delimiting syntax % work in (a) a rule (i.e. with sigspace) and (b) where I want the delimiter to be whitespace?
15:43 n0tjack in other words, if I want to create a grammar whose TOP is /[stuff ]+/, should I use a rule?
15:45 RabidGravy I tend to "use v6" for the reasons that moritz stated and also I personally don't like calling things '.p[lm]6' so it gives me a chance to recognize the perl 6 files
15:45 Ven joined #perl6
15:46 pmurias joined #perl6
15:47 synbot6 joined #perl6
15:48 PerlJam n0tjack: sigspace handling is described at S05:1146
15:48 synbot6 Link: http://design.perl6.org/S05.html#line_1146
15:48 Ven joined #perl6
16:00 * awwaiid keeps looking for a modula2 vs modula3 head-to-head comparison to analogize perl5 vs perl6
16:03 user3 joined #perl6
16:10 andreoss joined #perl6
16:11 awwaiid Can someone help me with simple module usage? https://gist.github.com/aw​waiid/bc3e4f8d9352e35bb531 -- I was basing it off of some 2009 advent entry
16:12 n0tjack PerlJam: gracias
16:14 moritz awwaiid: "our sub hello"
16:14 awwaiid iiinteresting
16:15 PerlJam awwaiid: subs are lexical in P6
16:15 moritz awwaiid: or "sub hello() is export { ... }" and then use the unqualified name
16:15 awwaiid yeah, I specifically want the qualified name in this case
16:15 awwaiid also the docs say that is export is supposed to work for modules not packages, but I think it works for packages
16:16 awwaiid (also)
16:16 awwaiid thanks moritz, that worked
16:23 ofzyh joined #perl6
16:24 virtualsue joined #perl6
16:25 ^elyse^ joined #perl6
16:26 rurban joined #perl6
16:28 woodruffw joined #perl6
16:30 RabidGravy awwaiid, afaik it works in package, module and class as they all create a "package" that can be exported from :)
16:33 FROGGS joined #perl6
16:34 hohoho joined #perl6
16:34 dalek doc: c90c919 | (Steve Mynott)++ | Build.pm:
16:34 dalek doc: Fix the p6doc command line tool by installing pod in the usual place. This
16:34 dalek doc: was broken by the 'lib' to 'doc' rename.
16:34 dalek doc: review: https://github.com/perl6/doc/commit/c90c919bcd
16:38 Kogurr joined #perl6
16:39 [Coke] steve++
16:39 [Coke] can probably close out #157 with that.
16:39 RabidGravy itz_stmuk++ # Weeeeeeeeeeeeeeeeee
16:40 dalek doc: 30ef615 | (Steve Mynott)++ | Build.pm:
16:40 dalek doc: oops
16:40 dalek doc: review: https://github.com/perl6/doc/commit/30ef615004
16:40 vendethiel joined #perl6
16:41 Larry joined #perl6
16:41 Larry Hello
16:41 Guest77081 Any body here?
16:42 RabidGravy nope
16:43 n0tjack I'm not here.
16:43 dalek doc: 1361821 | (Zoffix Znet)++ | html/js/main.js:
16:43 dalek doc: Autofocus on search on page start (Closes #156)
16:43 dalek doc: review: https://github.com/perl6/doc/commit/13618212c5
16:43 Guest77081 I'm here to say that Perl is ugly.
16:44 n0tjack I'm in the abstract space of arguing with p6 about the correctness of a grammar.
16:44 Ven n0tjack: have you tried the debugger? :P
16:44 n0tjack it's like having a debate with a misshapen shadow on Plato's wall
16:44 Ven Guest77081: noted, thanks!
16:44 ZoffixW joined #perl6
16:44 ZoffixW Guest72901, so?
16:44 n0tjack Ven: Nope. I haven't used a proper debugger in a long, long time. My debugger is `say`.
16:44 Ven ZoffixW: wrong tab :)
16:45 Guest77081 I repeat, I'm here to say that Perl is ugly.
16:45 Ven Guest77081: we noted it the first time, thank you!
16:45 ZoffixW Too many guests :)
16:45 Ven Yay, that's a working piece of Perl 6 code \o/.
16:45 Guest77081 ??
16:46 jnthn n0tjack: Grammar::Tracer is like something that writes a lot of say statements for you :)
16:46 lizmat .oO( ugliness is in the eye of the beholder )
16:46 n0tjack oooh
16:46 n0tjack you're my best bud
16:46 jnthn (Just traces all the grammar rules you enter/exit, in a tree)
16:46 Ven Guest77081: what's wrong? You want a taste of Perl 6 as well? :-)
16:47 ZoffixW m: sub prefix:<¯\_(ツ)_/¯>($msg) { say $msg }; ¯\_(ツ)_/¯ “Perl is ugly? Who cares :D”
16:47 camelia rakudo-moar 06fef8: OUTPUT«Perl is ugly? Who cares :D␤»
16:47 Guest77081 Because of excessive used of symbol/punctuation make your Perl code ugly. That's why its ugly.
16:47 ZoffixW Guest77081, yes, but it also makes the code very concise and expressive.
16:48 Ven Guest77081: Well, to each their own :). It's fine if you don't like it
16:48 lizmat .oO( I guess you have to get used to it )
16:48 ZoffixW Guest77081, so instead of typing preg_mach_return_array_or_whatever() you type ~~//
16:48 eliasr joined #perl6
16:48 Guest77081 This should fix in Perl 6, Larry promised to fix that but he added more symbols in Perl 6 that make more worst, I think.
16:49 [Coke] Guest77081: you're a little late to the party. You're welcome to use perl 6 as a base and add your own custom built slang on top of it, though.
16:49 ZoffixW Guest77081, you should try Python. It's essentially executable pseudo code.
16:49 [Coke] anyway, have a good day. I hope you find a language you like!
16:49 ZoffixW Yeah :)
16:49 ZoffixW \o/
16:50 Guest77081 What Python? Its snake?
16:50 flussence (unless you want to deal with strings, which have about a billion different quoting/formatting constructs in python 3.5)
16:50 [Coke] Guest77081: https://www.python.org/
16:50 RabidGravy :-O
16:50 tadzik snaaake! Snaaaaaaaaakeee!
16:51 Guest77081 Stop trolling around :D
16:51 pink_mist what's wrong with punctuation? almost every single language I know uses period, command, and semicolon almost exactly like perl6 does
16:51 flussence and T_PAAMAYIM_NEKUDOTAYIM!
16:51 pink_mist s/command/comma/
16:51 Guest77081 Visual basic don't use semicolon
16:52 pink_mist VB is not a shining example of excellence
16:52 * [Coke] imagines someone giving a perl 6 talk somewhere right now, and mentioning how nice the channel is, and someone in the presentation logging in as a Guest77081 to test it out.
16:52 ZoffixW lol :D Possibly :)
16:53 RabidGravy there are 9 different genera of pythonidae
16:53 n0tjack jnthn: dude this is exactly what I'm looking for. And I love that just had to "use Grammar::Tracer" and that's it.
16:54 jnthn :)
16:54 jnthn Hope it helps you hunt the problem
16:54 n0tjack well, it's telling me I got the match i was expecting
16:55 n0tjack my problem is I'm not seeing that in the .perl of the Match object
16:55 n0tjack so I'm doing something silly
16:55 Guest77081 o_0
16:55 flussence [Coke]: about the profiler output size, I noticed a while back the json is about 50-60% repeated string keys which are always in the same order, save for 2 optional nested structures in each object. They could probably all be arrays.
16:56 flussence unfortunately fixing that involves changing moarvm code, which is too scary for me
16:56 n0tjack Guest77081: (If (you (prefer (simplicity (to (expressiveness (you (can (always (use (Lisp)))))))))
16:56 jnthn flussence: Actually the serialization to JSON is done in NQP code...or at least, it was when I implemented the thing :)
16:56 [Coke] jnthn: you have any objection to flussence's suggestion there of converting from a hash to an array for some of the profiler data/
16:57 Guest77081 Lisp is too old for that.
16:57 flussence the serialization is, but it just iterates over a hash that comes from mvm-land
16:57 n0tjack too old for what?
16:57 [Coke] right, the DS in moarvm doesn't have to be updated, it's the rendered JSON that matters.
16:57 [Coke] flussence: right, we can keep a hash in mvm.
16:57 n0tjack you want a "new" Lisp, check out Clojure
16:57 n0tjack or use the Lisp that's been implemented in p6 ;)
16:58 jnthn [Coke]: Not really, though I've a hunch that the performance of the profiler UI is more related to what we do with the JSON rather than the JSON itself
16:58 [Coke] n0tjack: I think you're missing some closing )s there. :P
16:58 flussence .oO( using Angular doesn't help :)
16:58 Ven Guest77081: clochure is great
16:58 n0tjack [Coke]: irssi's autocomplete leaves a lot to be desired
16:59 ^elyse^ Ven: lol Clochure
16:59 jnthn flussence: Well, it helped me write the UI so I had it in time for my presentation. :P But yeah. :)
17:00 ZoffixW left #perl6
17:00 RabidGravy I'm not sure there's a lot of call for bracket matching in IRC clients
17:00 Guest77081 Goodbye Perl 6. Maybe I use Clojure. :)
17:00 pink_mist enjoy
17:00 RabidGravy byeee have fun
17:01 RabidGravy you just don't get the quality of troll these days
17:01 pink_mist n0tjack: my irssi completes [Coke]'s nick just fine without needing to start it with [ fwiw
17:01 jnthn #perl6++
17:02 n0tjack pink_mist: if I type C<tab>, I get camelia first, then have to cycle through a bunch to get to [Coke]
17:02 firstdayonthejob joined #perl6
17:02 pink_mist n0tjack: well alright I guess that's annoying =)
17:03 [Coke] yah, sorry, someone had already grabbed Coke by the time I hit freenode. :)
17:05 larion joined #perl6
17:08 n0tjack well, I'm supposed to be notjack but I either I registered that nick and lost the pw, or in my long absence from IRC, someone grabbed it.
17:08 zacts joined #perl6
17:12 n0tjack Just a sanity check: I want "regex TOP { <number>* %% \s+ }
17:12 n0tjack " to mean "a string consisting of any number of numbers (which I define later) separated by whitespace"
17:12 n0tjack am I off-base/
17:13 RabidGravy seems alright to me
17:13 RabidGravy but my brain doesn't do regex
17:14 n0tjack I'm comfortable with regex, even the new p6 kind; I'm less familiar with the objects and structures around it, like Match objects and ASTs etc
17:15 n0tjack Grammar::Tracer is telling me I have the matches I expect, but the Match object doesn't contain any tokens or pieces
17:15 jnthn n0tjack: Does it not point out any match failures at any point?
17:15 n0tjack no, it ends with MATCH
17:15 n0tjack and the Match is truthy
17:16 n0tjack but I'm not sure I'm being clear to p6 that I want it to give me the tokens it found.
17:16 jnthn Is it truthy without the tracer?
17:16 n0tjack let me check
17:16 patrickz joined #perl6
17:17 n0tjack yes
17:20 thou joined #perl6
17:20 Ch0c0late joined #perl6
17:22 n0tjack nm, it was me being dumb (twist ending, I know)
17:23 ZoffixW joined #perl6
17:23 ZoffixW I'm having trouble finding where sub MAIN is documented. Any hints?
17:24 moritz ZoffixW: probably in the design docs and various blog posts only :/
17:24 ZoffixW Ah :(
17:24 raiph joined #perl6
17:24 kmel joined #perl6
17:25 ZoffixW This is good enough for me: https://perl6advent.wordpress.com/2010/12/02/day-2​-interacting-with-the-command-line-with-main-subs/
17:25 lizmat http://rakudo.org/2015/10/11/announce-win​dows-msi-installers-for-release-2015-09/   # FROGGS++
17:26 ZoffixW What's JIT?
17:26 timotimo just-in-time compiler
17:26 lizmat S99:JIT
17:26 synbot6 Link: http://design.perl6.org/S99.html#JIT
17:26 ZoffixW Thanks.
17:27 n0tjack ZoffixW: I'll warn you that my limited experience with sub MAIN tells me it's difficult to use it for MDM while at the same time having any kind of shared code between the multis
17:27 n0tjack which isn't a problem if you don't mind a little repetition between the multis
17:27 timotimo what is MDM?
17:28 jkva joined #perl6
17:28 n0tjack sorry, MMD
17:28 n0tjack multi method dispatch
17:28 timotimo ah
17:29 Peter_R joined #perl6
17:29 n0tjack I do think that will end up hampering the utility of multi sub MAIN
17:30 timotimo i don't really understand what you mean there :(
17:32 n0tjack timotimo: multi sub MAIN(Int $i) {$result = $i + 17;}; multi sub MAIN(Str $s){$result = $s ~ " cheeses";}; # if i want to .say the result of any invocation of main, how do I do that, without expliciting repeating that .say in each of the implementations?
17:32 timotimo you could put that into MAIN's proto
17:33 n0tjack timotimo: Yeah, but if you have MAINs which call other MAINs (i.e. you have a main MAIN), then you get repeated .says
17:33 timotimo ah, good point
17:33 n0tjack it will be very common to have one multi MAIN call another
17:33 timotimo i agree
17:33 timotimo you can have a lexical outside the MAIN and with an END phaser output its value
17:33 timotimo and update that from the MAIN subs
17:34 n0tjack timotimo: I was wondering if I could use a phase
17:34 n0tjack r
17:34 n0tjack can you show me a short example?
17:34 lizmat m: LEAVE say "goodbye"
17:34 camelia rakudo-moar 06fef8: OUTPUT«goodbye␤»
17:35 timotimo m: my $result; sub MAIN() { say "whoa, dude"; $result = 10; }; END say $result
17:35 camelia rakudo-moar 06fef8: OUTPUT«whoa, dude␤(Any)␤»
17:35 timotimo oh?
17:35 timotimo that's ... weird
17:35 lizmat timotimo: where did MAIN get called ?
17:35 lichtkind can anybody tell me please what he feels is special about the perl 6 lang design process compared to whatever he likes it compare to
17:35 timotimo lichtkind: automatically
17:35 timotimo er
17:35 timotimo lizmat: automatically
17:35 lichtkind i mean i know some stuff but i like to have your opinions for an article
17:36 n0tjack well, the nice thing about the p6 design process specifically is it resulted in p6...
17:36 n0tjack haven't seen any other design processes do that
17:36 lichtkind haha
17:36 huf :DDDDDDD
17:36 lichtkind timotimo: i dont quite understand
17:36 timotimo i accidentally tab-completed your name
17:37 timotimo i hit "li" and then tab
17:37 timotimo turns out you said something JUST the moment before that :)
17:37 lizmat m: my $a; $a = 42; END say $a   # timotimo  golfed
17:37 camelia rakudo-moar 06fef8: OUTPUT«(Any)␤»
17:38 timotimo :(
17:38 timotimo nobody has tests for this, eh?
17:38 ZoffixW m: my $a; $a = 42; END { say $a }   # timotimo  golfed
17:38 camelia rakudo-moar 06fef8: OUTPUT«42␤»
17:38 lizmat I seem to recall there's a ticket for this
17:38 timotimo ah, OK
17:38 n0tjack S99: LEAVE
17:41 lizmat dinner&
17:43 lichtkind good nom
17:43 lichtkind timotimo but you can answer it anyway if you like
17:43 timotimo i don't know, dood
17:46 ZoffixW .oO( it'll take me forever to get used to panda—unlike cpanm—requires explicit 'install' )
17:47 masak m: my $a = 42; END say $a
17:47 camelia rakudo-moar 06fef8: OUTPUT«(Any)␤»
17:47 masak probably a case of binding to the wrong pad.
17:47 masak m: constant $a = 42; END say $a
17:47 camelia rakudo-moar 06fef8: OUTPUT«42␤»
17:47 masak m: my $a; BEGIN { $a = 42 }; END say $a
17:47 camelia rakudo-moar 06fef8: OUTPUT«42␤»
17:47 masak yep.
17:47 masak m: my $a; BEGIN $a = 42; END say $a
17:47 camelia rakudo-moar 06fef8: OUTPUT«42␤»
17:48 masak clearly the 'orst' END binds to the static lexpad.
17:48 * masak .oO( END, u are the orst )
17:48 Kogurr joined #perl6
17:49 ZoffixW Hm. What's going on: panda install Pastebin::Gist: Project Pastebin::Gist not found in the ecosystem
17:49 ZoffixW Ah, I need panda update
17:50 kmel joined #perl6
17:53 mayuresh joined #perl6
17:53 mayuresh hello all ... :)
17:53 ZoffixW \o
17:53 mayuresh been away for a while due to health conditions.
17:53 kmel hello
17:54 gfldex m: say "ohai kmel!";
17:54 camelia rakudo-moar 06fef8: OUTPUT«ohai kmel!␤»
17:54 kmel :)
17:54 mayuresh if mr. wall is around, would like to convey that "i am still interested in working on that p6 execution environment" i had mentioned before.
17:55 mayuresh just got physically damaged badly, and hence couldn't do much for the past 7~8 months.
17:55 ZoffixW 0.o
17:57 kmel I am new to perl6 (and programming in general). Had a couple of programming courses (C and Java) back in college.
17:57 mayuresh cool, then you aren't new to programming in general! :)
17:57 mayuresh kmel, welcome to p6 land. :)
17:58 kmel thank you mayuresh
17:58 mayuresh kmel, what do you wish to do with perl6?
17:59 kmel it's even the first time I use an irc client
17:59 mayuresh :D
17:59 ZoffixW :D
17:59 ZoffixW Congrats!
17:59 kmel thanks
17:59 mayuresh yeah, the first time, 'irc' does get overwhelming. :)
17:59 ZoffixW -NickServ- Information on Zoffix (account Zoffix): Registered : Jul 31 02:56:07 2006 (9y 10w 5d ago)
17:59 ZoffixW :)
18:00 kmel Lol Grandpa ZoffixW
18:00 mayuresh :)
18:01 kmel how do you reply to someone?
18:01 ZoffixW You mean private message?
18:01 kmel when mayuresh replied to me, the messages were green
18:01 ZoffixW Ah, just type their nick. Or type part of it and hit TAB
18:01 Kogurr kmel: just put their name somewhere in the message
18:02 kmel like that Kogurr ?
18:02 Kogurr yes :D
18:02 kmel aha Great :)
18:02 rindolf joined #perl6
18:02 mayuresh kmel, which 'irc' client are you using?
18:02 llfourn joined #perl6
18:02 ZoffixW HexChat
18:02 kmel HexChat
18:03 kmel it comes installed linux mint
18:03 mayuresh oh, okay.
18:03 mayuresh kmel, once you get used to 'irc' via hexchat, try "ircii".
18:03 mayuresh it's a lot lighter and hence responsive.
18:03 n0tjack mayuresh: most commands in IRC are introduced by prefixing a "/" to the line you're trying
18:04 n0tjack if you want to send a user a private message, for example, you'd say /msg username message goes here
18:04 masak ooh, so it does
18:04 kmel will try it mayuresh
18:05 timotimo i'm not sure how it is with hexchat, but with "/query nickname", you'll usually get an extra tab open for a private conversation
18:05 mayuresh n0tjack, i think it was kmel you wanted to write to. :)
18:05 timotimo not every irc client opens up such a tab when you /msg
18:05 grondilu what do they do then?
18:05 n0tjack mayuresh: it was indeed ;)
18:05 kmel I was reading http://tablets.perl6.org/ta​blet-3-variables.html#array
18:05 timotimo hm. actually, i think i am wrong about that part
18:06 kmel and i am confused about the flat function
18:06 vendethiel joined #perl6
18:06 mayuresh i am looking for a name for my pet project; a perl6 execution environment, and am quite at a loss of ideas.
18:06 kmel say ((1, 2), (3)).elems; #2
18:07 mayuresh have been contemplating "titli" which is butterfly in an indian language
18:07 kmel say ((1, 2), (3)).flat.elems; #3
18:09 ZoffixW kmel, the first has two elements: (1, 2) and (3); .flat flattens that to (1, 2, 3), which is three elements
18:09 kmel my @array2 = [1..6],[7..15];
18:09 kmel say @array2;
18:09 kmel my @array3 =  @array2.flat;
18:09 kmel say @array3
18:10 n0tjack kmel: try prefixing those statements with m:
18:10 kmel both return [[1 2 3 4 5 6] [7 8 9 10 11 12 13 14 15]]
18:10 n0tjack m: say ((1,2,3),(4,5)).flat;
18:10 camelia rakudo-moar 06fef8: OUTPUT«(1 2 3 4 5)␤»
18:10 timotimo something about the [] brackets vs the () parenthesis
18:11 thou joined #perl6
18:11 kmel i thought that @array3 should return [1..15]
18:11 FROGGS moritz++ # :D-mail
18:11 kmel any ideas what i did miss?
18:12 FROGGS m: my @array2 = [1..6],[7..15]; my @array3 = |@array2; say @array3
18:12 camelia rakudo-moar 06fef8: OUTPUT«[[1 2 3 4 5 6] [7 8 9 10 11 12 13 14 15]]␤»
18:12 kmel m:my @array2 = [1..6],[7..15];
18:12 kmel say @array2;
18:12 kmel my @array3 =  @array2.flat;
18:12 kmel say @array3
18:12 FROGGS no newlines in here please
18:12 kmel oh. sorry fro
18:12 kmel Sorry FROGGS
18:13 FROGGS :o)
18:13 awwaiid m: sub local-eval($cmd) { EVAL $cmd, context => CALLER:: } ; sub dostuff { my $x = "fish"; local-eval q[$x = 2]; say $x } ; dostuff
18:13 camelia rakudo-moar 06fef8: OUTPUT«2␤»
18:14 mayuresh kmel, you can type the names in all small, no worries, we'll understand.
18:14 mayuresh :)
18:14 awwaiid m: sub local-eval($cmd) { EVAL $cmd, context => CALLER:: } ; sub dostuff { my $x = "fish"; local-eval q[my $x = 2]; say $x } ; dostuff
18:14 camelia rakudo-moar 06fef8: OUTPUT«fish␤»
18:14 FROGGS m: my @array2 = [1..6],[7..15]; my @array3 = @array2».Slip.flat; say @array3 # that works but is there an easier way?
18:14 camelia rakudo-moar 06fef8: OUTPUT«[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]␤»
18:14 awwaiid Can I make EVAL with a context declare new my vars?
18:14 FROGGS awwaiid: no
18:15 FROGGS awwaiid: variable declaration (and lookup) is compile time, EVAL is runtime
18:15 awwaiid interesting. I'm trying to build a REPL type thingie that can be used like ruby binding.pry, and it would be kinda handy to somehow have that
18:16 FROGGS awwaiid: our REPL is a thing that EVALs every line
18:16 awwaiid but maybe it makes no sense
18:16 * awwaiid goes to look at the existing REPL
18:16 FROGGS so the second EVAL has the first EVALs context
18:16 FROGGS and then you can probably see variables declared in the first EVAL in the second
18:17 psch afaiu, our REPL effectively opens a new lexical scope for every statement though
18:17 gfldex m: my $a = [1..3],[4..6]; dd $a; # oi!
18:17 camelia rakudo-moar 06fef8: OUTPUT«Array $a = $[1, 2, 3]␤»
18:17 psch although people smarter than me said we need to do it like that due to... something? :)
18:17 FROGGS gfldex: yes, you dropped the [4..6] onto the floor
18:17 [Coke] catching up. does "execution environment" mean something in particular?
18:18 gfldex FROGGS: a warning that i might hurt my feet would be nice. Is that LTA?
18:18 FROGGS psch: isnt EVAL a new lexical scope?
18:18 FROGGS gfldex: I guess so...
18:19 FROGGS star-m: my $a = 1, 2
18:19 camelia star-m 2015.09: ( no output )
18:19 psch FROGGS: huh, i guess so, yeah
18:19 psch right, so there's no concern there
18:19 FROGGS right
18:19 psch i was just thinking of the '<line 1> { <line 2> { <line 3> }}}' explanation i read somewhere...
18:19 FROGGS we probably want new scoped that you dont get redeclaration errors when re-doing stuff
18:20 psch -unbalanced_curlies
18:20 FROGGS scopes*
18:20 FROGGS :P
18:20 mayuresh Coke, did you get any of my messages?
18:20 mayuresh i missed the square brackets in your name. :(
18:20 gfldex m: my $a = [1..3],[4..6]; dd $a; my $b = 1,2;
18:20 camelia rakudo-moar 06fef8: OUTPUT«WARNINGS:␤Useless use of constant integer 2 in sink context (line 1)␤Array $a = $[1, 2, 3]␤»
18:20 kmel i see () and [] behave differently
18:21 kmel what is the rationale behind it?
18:21 gfldex kmel: they do and there may still be bugs with lists of lists
18:21 mayuresh kmel, () [] behave differently as well as look different too. ;)
18:22 mayuresh to me atleast. :)
18:22 kmel because if you do this:
18:22 kmel m:my @bracket = [1,2,3]; my @parentheses = (1,2,3); say @bracket.WHAT; say @parentheses.WHAT;
18:22 psch kmel: need the space after the colon
18:22 kmel m: my @bracket = [1,2,3]; my @parentheses = (1,2,3); say @bracket.WHAT; say @parentheses.WHAT;
18:22 camelia rakudo-moar 06fef8: OUTPUT«(Array)␤(Array)␤»
18:23 kmel thanks for the hint psch
18:23 [Coke] mayuresh: I see no sends from you, no.
18:23 timotimo assigning to an @-sigiled variable is "list assignment", so it'll put the values into the array
18:23 mayuresh [coke], the execution environment is supposed to be a combination of a compiler and vm
18:23 skids m: my @bracket := [1,2,3]; my @parentheses := (1,2,3); say @bracket.WHAT; say @parentheses.WHAT;
18:23 camelia rakudo-moar 06fef8: OUTPUT«(Array)␤(List)␤»
18:23 kmel they are both arrays
18:23 Kogurr m: my @array2 = [1..6], [7..15]; say map { join ',', $_ }, @array2;
18:23 camelia rakudo-moar 06fef8: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)␤»
18:23 [Coke] mayuresh: ok. Doesn't rakudo theoretically already have that?
18:23 psch m: (1,2,3).WHAT.say; [1,2,3].WHAT.say
18:23 camelia rakudo-moar 06fef8: OUTPUT«(List)␤(Array)␤»
18:23 mayuresh [coke] doesn't rakudo build stuff for moarvm?
18:23 psch kmel: that's because, as timotimo says, assigning into a @ makes it an array
18:24 psch because that @ already makes the corresponding variable an array
18:24 psch m: my @a; say @a.WHAT
18:24 camelia rakudo-moar 06fef8: OUTPUT«(Array)␤»
18:24 [Coke] or JVM, or (soon) node, yes.
18:24 timotimo mayuresh: that sounds very unspecific; i.e. rakudo-on-moarvm is already a compiler and a vm
18:24 [Coke] What are you proposing that's different from the current model?
18:24 mayuresh [coke] i find it mightly uncomfortable to have a language like perl be compiled and then separately executed
18:25 mayuresh i loved what the google guys have done with "dart".
18:25 [Coke] timotimo: right, that's why I'm trying to find out if there's something specific being proposed here and I just don't get the terminology (which happens to me a lot here)
18:25 psch mayuresh: so you're proposing a monolithical implementation?
18:25 mayuresh psch, yes
18:25 timotimo FWIW, you don't have to pre-compile your libraries and scripts
18:25 [Coke] oh. well, feel free to use the roast test suite to test your version, and good luck.
18:26 mayuresh coke, thanks. :)
18:26 psch yes, good luck :)
18:26 psch in case C++ would be your choice, there's a start here: https://github.com/BizarreCake/Arane
18:26 mayuresh my efforts have been delayed due to health issues, hope your luck prevents any other such stuff
18:27 kmel skids what does := do that is different than plain = ?
18:27 mayuresh psch, yeah, you had shown me bizarrecake's stuff around 7 months back. :)
18:27 [Coke] there are lots of other projects (aside from rakudo) that might have some inspiration. (pugs, niecza, perlito, yapsi...)
18:27 skids It "binds" which means it connects the variable name directly to the item with no container in between.
18:28 kmel aha thanks skids
18:28 psch mayuresh: oh, right, i think i remember
18:28 Alina-malina joined #perl6
18:28 [Coke] I am really surprised to see yapsi commits this year.
18:28 mayuresh psch, and i had told you that i am going to do the same thing in c89. :)
18:28 jkva joined #perl6
18:28 mayuresh hope i don't end up messing it up this time. ;)
18:29 psch mayuresh: that i had forgotten.  well, if it works out it's probably useful, and if not you're bound to learn lots
18:29 mayuresh psch, yes, that's the whole attitude i am carrying. :)
18:29 zakharyas joined #perl6
18:30 kmel ah ok i got it now, thanks psch
18:30 mayuresh alrighty, it's mid-night out here, gotta hit bed, day begins at 0600 tomorrow.
18:30 [Coke] ``
18:30 [Coke] er, ~~
18:30 diana_olhovik joined #perl6
18:30 mayuresh have a good time ahead people :)
18:31 kmel does list have a sigil (like @ for array?)
18:31 ZoffixW Is there a way to make a multi that checks something not related to it, like %*ENV? Basically I want one multi to run if %*ENV<FOO> is set, and run another multi if it's not set
18:32 psch m: multi f (:$ where %*ENV<LANG> eq 'POSIX') { say "posix!" }; multi f (:$ where %*ENV<LANG> eq 'C') { say "C!" }; f
18:32 camelia rakudo-moar 06fef8: OUTPUT«posix!␤»
18:33 psch anonymous named parameters \o/
18:33 psch ZoffixW: that's a bit abusive though...
18:33 ZoffixW Hm
18:33 ZoffixW Alright.
18:33 [Coke] kmel: nope. no separate top level sigil.
18:34 gfldex m: multi foo(where %*ENV<FOO>){}
18:34 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9VIOpi3j41␤Cannot do non-typename cases of type_constraint yet␤at /tmp/9VIOpi3j41:1␤------> 3multi foo(where %*ENV<FOO>7⏏5){}␤»
18:35 psch m: sub f(:$, :$) { }
18:35 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WkZDxuLHuC␤Name  used for more than one named parameter␤at /tmp/WkZDxuLHuC:1␤------> 3sub f(:$, :$)7⏏5 { }␤»
18:35 psch heh
18:36 psch m: sub f(:$, :@) { }
18:36 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tUsuNOETy6␤Name  used for more than one named parameter␤at /tmp/tUsuNOETy6:1␤------> 3sub f(:$, :@)7⏏5 { }␤»
18:37 ZoffixW What's wrong with this? I'm getting a pointy block instead of the content of the file: %paste{$_} = { content => @files[$_].IO.slurp } for @files;
18:38 kmel ok thanks everyone. I will go back to test what i just found.
18:38 psch m: my $x = do { line => $_ } for lines(); say $x
18:38 camelia rakudo-moar 06fef8: OUTPUT«line => Atá beo go buan gan bhuairt gan ghruaim fá ghleanntáin ghlas’ Ghaoth Dobhair. ␤»
18:38 psch ZoffixW: you have to do the block to not assign it
18:38 psch (or invoke it, i suppose...)
18:38 kmel see you later
18:38 psch bye kmel
18:39 gfldex ZoffixW: you basicly did: (%paste{$_} = { content => @files[$_].IO.slurp }) for @files;
18:39 ZoffixW gfldex, that was my intent
18:39 ZoffixW I want the filename to be the key and the value to be a hashref with key `content` assigned the contents of the file
18:39 ZoffixW psch, that gave me more weird errors "Cannot convert string to number: base-10 number must begin with valid digits or" :S
18:40 gfldex so you assinged a block to %paste as often as @files.elems;
18:40 psch ZoffixW: that's probably because @files containts non-digit-only filename
18:40 psch +s
18:40 ZoffixW Programming is hard >_<
18:40 psch @files[$_] for @files # is somewhat anti-patternish, in my eyes
18:40 mscha joined #perl6
18:41 mscha p6: my Int $i = 42; say $i; $i /= 2; say $i;
18:41 camelia rakudo-moar 06fef8: OUTPUT«42␤Type check failed in assignment to $i; expected Int but got Rat␤  in block <unit> at /tmp/tmpfile:1␤␤»
18:41 gfldex ZoffixW: in my %foo all keys are of type Str
18:41 psch p6: my Int $i = 42; say $i; $i div= 2; say $i;
18:41 camelia rakudo-moar 06fef8: OUTPUT«42␤21␤»
18:42 mscha Ah.  Makes sense.
18:42 dalek doc: 2eba769 | (Steve Mynott)++ | Build.pm:
18:42 dalek doc: shoichikaji++ show copied files
18:42 dalek doc: review: https://github.com/perl6/doc/commit/2eba7694d9
18:43 mr_ron left #perl6
18:43 mr_ron joined #perl6
18:44 jdv79 ZoffixW: how did you get that info from nickserv?
18:44 ZoffixW /nickserv info Zoffix
18:45 ZoffixW Why does it need a digit-only filename? <psch> ZoffixW: that's probably because @files containts non-digit-only filename
18:45 jdv79 oh. i thought i tried that.  i got you beat by a bit.  2004-01-30.
18:45 ZoffixW Man. Perl 6 magic is waning on me.
18:45 moritz \o
18:45 moritz https://thescienceweb.wordpress.com/2015/10/12/​perl-6-just-perl-5-with-use-strict-turned-on-2/
18:45 ZoffixW o/
18:45 domidumont joined #perl6
18:46 ZoffixW Heh. That article is obviously satire :)
18:46 pink_mist moritz: 0_o is that meant to be a parody post or something? 0_o
18:46 pink_mist .. right
18:47 psch ZoffixW: you're using the name of the file as key for @lines
18:47 moritz it made me chuckle
18:47 psch hence my "anti-patternish" comment :)
18:47 ZoffixW psch, oh. Thanks. Now I got it! :)
18:47 Jaglor joined #perl6
18:47 pyrimidine moritz: I do like "Dodgy Perl 5 scripts were behind the financial crisis of 2008, the collapse of Enron and the assassination of Archduke Franz Ferdinand."
18:48 ZoffixW Yey. It works now. I think.
18:49 ZoffixW I'm still not clear on how to create multi-level hashes. Using this right now, %paste{$_} = ( content => $_.IO.slurp ) for @files;, but say %paste.perl produces a mess and I can't figure out if it got it right or not :)
18:49 n0tjack what is %paste.keys()?
18:50 n0tjack and, taking one of those keys, the literal value, what is %keys<literal-value-of-key>?
18:50 telex joined #perl6
18:50 moritz ZoffixW: %paste{$_}<content> = slurp($_) for @files
18:51 ZoffixW n0tjack, seems like it did The Right Thing™
18:51 ZoffixW moritz, thanks. That's much better
18:53 gfldex m: my %h; %h{'multi';'level'} = 1; dd %h; # ZoffixW
18:53 camelia rakudo-moar 06fef8: OUTPUT«Hash %h = {:multi(${:level(1)})}␤»
18:53 ZoffixW Thankls
18:54 jdv79 so now WWI, and by extenstion WWII, is partly Perl's fault?  insanity.
18:54 n0tjack jdv79: in case it wasn't clear, that article was satire
18:54 n0tjack as any article which claims it's possible to get Perl developers to act like normal human beings must be.
18:57 jdv79 unless Larry was alive in 1914, and we can computing, its pretty crystal:)
18:58 n0tjack The Larry has always existed; he just didn't choose to Reveal Himself for a while.
18:58 jdv79 what do these mythical "Perl developers" behave like then?
18:59 n0tjack paronomasiacs
19:02 n0tjack wow, grammars are cool
19:02 n0tjack I don't know anything about real lexers or parsers, but this is easy
19:05 jdv79 its also slow:(
19:06 n0tjack yeah, but right now speed isn't a big concern for me. I write programs for myself, not others. The bigger deal for me is the current inconveninent state of the documentation.
19:07 psch documentation is hard, let's go programming
19:08 * TimToady & the Mrs sitting at PIT
19:10 muraiki TimToady: go check out the dinosaur
19:11 muraiki I think there's a fairly large dinosaur of some sort on display there
19:11 TimToady we saw it on the way in
19:11 muraiki yay
19:11 muraiki I forgot where itw as
19:11 TimToady looked like a T Rex or so
19:11 muraiki I had to bail yesterday at lunch, came down with a cold :( but PPW was fun; my first perl conference
19:12 FROGGS my son thinks this thing is called Dinosaurus Rex
19:12 muraiki hahaha
19:12 dalek ecosystem: bf408f4 | (Zoffix Znet)++ | META.list:
19:12 dalek ecosystem: Add App::Nopaste to eco
19:12 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/bf408f4d76
19:13 dalek perl6-most-wanted: 419726a | (Zoffix Znet)++ | most-wanted/modules.md:
19:13 dalek perl6-most-wanted: Remove App::Nopaste from the list as it already exists
19:13 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/419726a54d
19:13 psch FROGGS: did you have another look at the jvm SC thingy?
19:13 * FROGGS feels dirty after dealing with mod_perl
19:13 FROGGS psch: I looked at it... but I dunno what to do about it
19:15 psch ah, yes, that's where i am at as well
19:15 jdv79 mod_perl is fun
19:15 Hor|zon_ joined #perl6
19:15 rindolf joined #perl6
19:15 psch thing is, i'm unsure if the SC confusion could be behind other bugs or if we can just let 52e409ec stay
19:16 Upasaka joined #perl6
19:21 FROGGS if I had to bet I'd say it is the former
19:25 * lizmat starts working on P6W
19:28 Hor|zon joined #perl6
19:29 psch FROGGS: https://gist.github.com/pe​schwa/e9c27c61e1a840f251c2 is a bit interesting - it throws twice..?
19:29 psch (that's nqp HEAD + revert 52e409ec and rakudo HEAD)
19:29 FROGGS does it fail to construct the exception?
19:30 jkva joined #perl6
19:30 psch i'd assume so
19:30 psch the lowest line in the backtrace is the try block in print_exception
19:32 psch &sink is a mystery to me though
19:39 FROGGS doesnt sink just make the exception fatal?
19:39 FROGGS beause nothing handled it?
19:41 psch well, i'm just saying i don't the nqp::handle call... :)
19:42 lichtkind FROGGS ?
19:42 FROGGS lichtkind: ?
19:43 psch +get
19:43 lichtkind FROGGS what would you say is unique about p6 design process
19:43 vendethiel joined #perl6
19:43 [Coke] lichtkind: you're asking us to compare p6 against the design process for other languages that we haven't necessarily been involved in?
19:44 lichtkind no its was rather ment as addition case you have knowledge of other processes
19:45 psch FROGGS: on the plus, the inner exception is about Attribute as well
19:45 psch so it seems to be specific to Attribute
19:46 FROGGS lichtkind: well, I imagine that not all software projects allow a huge number of ppl to be involved in the design at all
19:46 FROGGS lichtkind: but as [Coke] said, I have almost no experience, except what happens in #perl6
19:47 lichtkind yes i hoped timotimo had some py xp
19:47 tokuhirom joined #perl6
19:48 cygx m: my @a = <a b c>; (any(@a) ~~ /\s/).say
19:48 camelia rakudo-moar 06fef8: OUTPUT«「any(Failure.new(exception => X::OutOfRange.new(what => "Start argument to substr", got => "8", range => "0..1", comment => "use *8 if you want to index relative to the end"), backtrace => Backtrace.new), Failure.new(exception => X::OutOfRange.new(what =…»
19:48 FROGGS psch: maybe this causes trouble on jvm? gen/jvm/CORE.setting:3913:BEGIN Attribute.^compose;
19:48 cygx ^ what's up with that?
19:48 FROGGS psch: looks like Attribute in special in that regard
19:49 cygx or do junctions only work at the right-hand side of ~~ ?
19:49 colomon joined #perl6
19:50 psch FROGGS: i'll try killing that line... :)
19:50 FROGGS me too
19:51 psch m: (1|2) ~~ { $_.say }
19:51 camelia rakudo-moar 06fef8: OUTPUT«any(1, 2)␤»
19:51 psch m: (1|2) ~~ m/./
19:51 camelia rakudo-moar 06fef8: ( no output )
19:51 psch m: (1|2) ~~ /./
19:51 camelia rakudo-moar 06fef8: ( no output )
19:51 psch m: (1|2) ~~ /\s/
19:51 camelia rakudo-moar 06fef8: ( no output )
19:51 FROGGS m: say (1|2) ~~ /./
19:51 camelia rakudo-moar 06fef8: OUTPUT«「any("1", "2")」␤»
19:51 psch m: any(<a b>) ~~ /\s/
19:51 camelia rakudo-moar 06fef8: ( no output )
19:51 psch m: (any(<a b>) ~~ /\s/).say
19:51 camelia rakudo-moar 06fef8: OUTPUT«「any(Failure.new(exception => X::OutOfRange.new(what => "Start argument to substr", got => "8", range => "0..1", comment => "use *8 if you want to index relative to the end"), backtrace => Backtrace.new), Failure.new(exception => X::OutOfRange.new(what =…»
19:51 FROGGS the output of my line is weird as well
19:52 psch m: ((1|2) ~~ /./).say
19:52 camelia rakudo-moar 06fef8: OUTPUT«「any("1", "2")」␤»
19:52 FROGGS and this is also funny: "use *8 if you want to index relative to the end"
19:52 psch well that one looks fine...
19:52 FROGGS a junction inside of a match?
19:52 psch oh
19:52 psch right
19:52 psch fine-ish :)
19:52 FROGGS *g*
19:52 psch m: say Junction.^can('ACCEPTS')
19:52 camelia rakudo-moar 06fef8: OUTPUT«(ACCEPTS ACCEPTS)␤»
19:53 psch m: say Junction.^can('ACCEPTS')>>.signature
19:53 camelia rakudo-moar 06fef8: OUTPUT«((Mu $: | is raw) (Mu $: | is raw))␤»
19:53 psch uhh
19:53 psch why does it have two identical signature candidates
19:54 FROGGS it has these three:
19:54 FROGGS multi method ACCEPTS(Junction:U: Mu:D \topic) {
19:54 FROGGS multi method ACCEPTS(Junction:U: Any \topic) {
19:54 FROGGS multi method ACCEPTS(Junction:D: Mu \topic) {
19:54 psch oh, Signature.perl is just kinda bad
19:54 psch or, well, insufficient maybe
19:55 * TimToady heading for the gate &
19:55 lizmat safe travels!
19:56 jnthn TimToady: Good flight!
19:57 psch FROGGS: NativeCall.pm builds fine, from the looks of it
19:57 FROGGS psch: aye
19:57 FROGGS I'm shocked
19:57 psch i'm mostly confused... :)
19:57 FROGGS it compiled and installed just fine...
19:57 * psch is running make test
19:57 Ven joined #perl6
19:58 FROGGS jnthn: why is that there? https://github.com/rakudo/rakudo/blob/no​m/src/core/Any-iterable-methods.pm#L1147
19:58 * FROGGS does a git blame
19:58 psch could it be the compose call BEGIN runs before the class is actually finished...?
19:58 psch as in, completely declared
19:58 FROGGS I dunno
19:59 FROGGS possible
19:59 psch m: BEGIN say 1; BEGIN say 2;
19:59 camelia rakudo-moar 06fef8: OUTPUT«1␤2␤»
19:59 psch oh, perl5 had this "BEGINs run in reverse" didn't it
19:59 FROGGS O.o
19:59 jnthn I...don't think so!
19:59 jnthn BEGIN runs ASAParsed
20:00 psch eh, i'm misremembering something
20:00 jnthn FROGGS: Bootstrapping reasons, I imagine :)
20:00 FROGGS jnthn: you added that: https://github.com/rakudo/rakudo/commit/a6d90ea3
20:00 psch aah
20:00 psch END it was
20:00 FROGGS jnthn: but you upsot jvm
20:00 psch ...in perl5
20:01 FROGGS I'm going to spectest moar
20:01 psch make test looks good, except for interop (which is known) and t/04-nativecall/16-rt125408.t
20:01 jnthn There's a comment at the top of the added file that explains
20:01 FROGGS aha!
20:02 jnthn :)
20:02 FROGGS so jvm does not like that Attribute get recomposed
20:02 jnthn Hmm...odd
20:02 FROGGS that totally fits what we observe
20:02 psch and it reacts by falling back to the Attribute in BOOTSTRAP
20:02 jnthn Removing that will probably break (some-attribute).map(...)
20:03 psch as in, the Attribute from the BOOTSTRAP.nqp SC
20:03 jnthn Maybe a missing SC write barrier somewhere?
20:03 jnthn psch: It should be the same Attribute type object all the way through, but a new version of the meta-object and STable...
20:04 psch jnthn: that kinda fits with my hacky patch - ignoring the SC when comparing classHandles unbroke the build
20:05 psch it's unclear to me though whether that could have consequences later on, not to pay attention to the SC
20:05 hohoho joined #perl6
20:05 awesomess3 joined #perl6
20:05 psch (which is to say, naively i'd say "it obviously will", but only because "checking for the SC" is a stronger qualifier...)
20:05 jnthn Yeah...oddness
20:06 * jnthn needs to go rest
20:06 FROGGS gnight :o)
20:06 jnthn Slept terribly last night, which is why I've been relatively useless today :/
20:06 jnthn 'night, #perl6
20:06 FROGGS Mondays...
20:08 FROGGS m: Attribute.^compose # can we do that here too?
20:08 camelia rakudo-moar 06fef8: ( no output )
20:08 jdv79 http://images.huffingtonpost.com/2015-0​8-25-1440538534-7002988-uhohsounds.jpg
20:08 jdv79 "
20:08 jdv79 oops
20:08 FROGGS :D
20:13 n0tjack this is my first attempt at a real-life grammar:  https://gist.github.com/ano​nymous/ee46fc609a75b8054ec0  . Is that reasonable/idiomatic p6?
20:13 n0tjack (it's the beginning of my project to implement J in p6)
20:14 sufrostico joined #perl6
20:14 n0tjack also, if I want to write an "interpreter" for these numbers, am I going to have to give names to all the currently-anonymous chunks?
20:15 FROGGS doesnt look like a missing write barrier
20:15 Ven joined #perl6
20:17 FROGGS n0tjack: you dont have to name all things, you only need to name the things you need to work with... so if you just need the entire match of a token than you dont need to name anything
20:18 FROGGS and yes, looks quite perlish so far
20:19 brrt joined #perl6
20:19 n0tjack well, those little delimiters are like operators in a tiny language
20:19 n0tjack so I need the names of the operators, and all of their operands
20:20 n0tjack for example, consider "j" an operator: 123j456 in this language is 123+456i in perl
20:20 n0tjack in order to calculate that result, I need to know the operator is 'j' and the operands are '123' and '456' respectively
20:20 psch n0tjack: something i learned when writing my (small and limited) ASM grammar is: write tests first
20:21 FROGGS n0tjack: yes, then you should capture these
20:21 psch n0tjack: also, most of your tokens look like they might want to be grouped under a proto
20:21 n0tjack psch: I'm writing the tests now, before I go further. Can you elaborate on the proto comment?
20:22 n0tjack FROGGS: Thanks, I was hoping not to have to clutter up the pattern, but I need the tokens, so I guess I'll go ahead.
20:22 psch n0tjack: actually, that was probably bad advice.  i oversaw that the lhs and rhs for the operators are actually different...
20:23 n0tjack psch: there is an overal pattern between the rules: <sub-type> ('op' <sub-type>)?
20:23 n0tjack problem is some of those rules have hair on them
20:23 psch n0tjack: right, that pattern seems like it would make sense to have them under a proto
20:24 n0tjack psch: Can you point me at some tutorial-level material on protos?
20:26 psch m: grammar G { token TOP { <thingy> }; proto token thingy {*}; token thingy:sym<o> { \d+ o \d+ }; token thingy:sym<f> { \d+ f \d+ } }; say G.parse("123o123"); say G.parse("123f123") # this is all i'm refering to
20:26 camelia rakudo-moar 06fef8: OUTPUT«「123o123」␤ thingy => 「123o123」␤「123f123」␤ thingy => 「123f123」␤»
20:26 psch actually
20:26 FROGGS .tell jnthn There is no spectest fallout whatsoever when removing "BEGIN Attribute.^compose;"
20:26 yoleaux FROGGS: I'll pass your message to jnthn.
20:26 psch m: grammar G { token TOP { <thingy> }; proto token thingy {*}; token thingy:sym<o> { \d+ o \d+ }; token thingy:sym<f> { \d+ <sym> \d+ } }; say G.parse("123o123"); say G.parse("123f123") # this is all i'm refering to
20:26 camelia rakudo-moar 06fef8: OUTPUT«「123o123」␤ thingy => 「123o123」␤「123f123」␤ thingy => 「123f123」␤  sym => 「f」␤»
20:27 psch ^that probably works even better
20:27 psch n0tjack: i don't know of any tutorial - i picked this pattern up from Perl6/Grammar.nqp :)
20:27 n0tjack haha
20:27 psch eh, neglected to replace the literal o with <sym> as well
20:27 n0tjack oh nice man
20:27 n0tjack that's cool
20:28 FROGGS yes, like MMD but for grammars
20:28 n0tjack is there a way to pass \d as a parameter too?
20:28 FROGGS hmmm
20:29 FROGGS I'm not sure
20:29 psch well, the colonpair is literal
20:29 n0tjack I want to say proto(<subtype>,<operator>)
20:29 psch but i suspect my recent patch for foofix could help there
20:29 n0tjack and have it put out <subtype> (<operator> <subtype>)?
20:29 [Sno] joined #perl6
20:30 psch oh
20:30 psch except that's exactly one case i took as example for "forbidden"...
20:30 FROGGS hehe
20:30 psch m: grammar G { my &num = rx/\d/; token TOP { <thingy> }; token thingy:sym(&num) { <sym> } }; say G.parse("5")
20:30 camelia rakudo-moar 06fef8: OUTPUT«Method 'thingy' not found for invocant of class 'G'␤  in regex TOP at /tmp/n2NVIiXz6u:1␤  in block <unit> at /tmp/n2NVIiXz6u:1␤␤»
20:30 psch m: grammar G { my &num = rx/\d/; token TOP { <thingy> }; proto token thingy {*}; token thingy:sym(&num) { <sym> } }; say G.parse("5")
20:30 camelia rakudo-moar 06fef8: OUTPUT«(Any)␤»
20:30 psch yeah, doesn't
20:31 psch i don't know if that'd be too magic, anyway
20:31 FROGGS m: my &num = rx/\d/; grammar G { token TOP { <thingy> }; proto token thingy {*}; token thingy:sym(&num) { <sym> } }; say G.parse("5")
20:31 camelia rakudo-moar 06fef8: OUTPUT«(Any)␤»
20:32 FROGGS I think I do the jnthn now...
20:32 FROGGS gnight &
20:32 jkva joined #perl6
20:32 RabidGravy toodlepip
20:33 n0tjack night al
20:33 n0tjack *all
20:33 psch g'night FROGGS, n0tjack
20:33 edehont joined #perl6
20:35 Ven joined #perl6
20:47 tom_ joined #perl6
20:53 awwaiid well... long ways to go, but my little repl is already useful -- https://github.com/awwaiid/p6-lrep . I'm going to adopt things I've learned from Pry, nREPL, and other debugger-repls.
20:54 awwaiid guess I should figure out that panda thing
20:58 awwaiid (https://github.com/awwaiid/p6-lrep/tree/v0.1 actually. I'm already tearing it apart moar)
21:00 rurban joined #perl6
21:03 lizmat https://p6weekly.wordpress.com​/2015/10/12/2015-42-unveiling/   # and yet another Perl 6 Weekly hits the Net !
21:04 s34n joined #perl6
21:08 lex_ joined #perl6
21:10 ugexe the url for jdvs second blog post is broke
21:10 psch awwaiid: that looks neat
21:10 psch lizmat++ # p6weekly
21:11 psch m: say "ßar".tc
21:11 camelia rakudo-moar 06fef8: OUTPUT«Ssar␤»
21:11 psch that *is* neat too
21:12 awwaiid er... how do I get this into panda? It says "Ping someone on IRC"
21:12 lizmat ugexe: weird, not sure how that happened
21:12 TEttinger joined #perl6
21:12 psch lizmat: wondering if infix:[] form needs a mention
21:12 psch lizmat: especially coupled with circumfix:<<$constant>>
21:13 psch (not *only* because i like reading my nick on p6weekly... :) )
21:13 lizmat if you can explain that to me in 3 lines, I'll add it  :-)
21:14 psch "Categorical sub declarations have been improved. Delimiting with [] is now supported, and delimiting with <<>> properly interpolated contained constants."
21:14 psch s/interpolated/interpolates/
21:14 psch oh
21:14 lizmat example please ?
21:14 psch that's not quite right, actually :/
21:15 n0tjack joined #perl6
21:15 psch m: sub infix:['xxx'] { say "lewd" }; 2 xxx 5
21:15 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yAcfFcMgmt␤Calling infix:<xxx>(Int, Int) will never work with declared signature ()␤at /tmp/yAcfFcMgmt:1␤------> 3sub infix:['xxx'] { say "lewd" }; 2 7⏏5xxx 5␤»
21:15 psch m: sub infix:['xxx']($, $) { say "lewd" }; 2 xxx 5
21:15 camelia rakudo-moar 06fef8: OUTPUT«lewd␤»
21:15 n0tjack is there a module or builtin that lets me easily visualize the parse tree resulting from a Match?
21:15 AlexDaniel joined #perl6
21:15 psch m: constant $x = "µ, @"; sub circumfix:<<$x>> { say $^a }; µ 1, 2, 3 @
21:15 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GIufbqp1o_␤Two terms in a row␤at /tmp/GIufbqp1o_:1␤------> 3 circumfix:<<$x>> { say $^a }; µ 1, 2, 37⏏5 @␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤       …»
21:15 psch why is *that* broken again
21:15 psch oh
21:15 psch m: constant $x = "µ @"; sub circumfix:<<$x>> { say $^a }; µ 1, 2, 3 @
21:15 camelia rakudo-moar 06fef8: OUTPUT«(1 2 3)␤»
21:15 lizmat n0tjack: doesn't Grammar::Tracer have something like that ?
21:16 n0tjack lizmat: it does, but it's too verbose
21:16 psch "Categorical sub declarations have been improved. Delimiting with [] is now supported, and delimiting with <<>> properly interpolated contained *sigiled* constants." # updated explanation
21:16 n0tjack I'm looking for something like an ASCII tree of all the named captures
21:17 psch i don't think we have that yet
21:17 lizmat psch: maybe it is not completely ready for primetime yet ?
21:17 psch Data::Dumper does a bit more than our &dd does, including newlines-and-indentation
21:17 psch lizmat: it is, i just messed up declaration
21:18 psch m: sub circumfix:<<µ, @>> { say $^a }; µ 1, 2, 3 @ # also doesn't work
21:18 camelia rakudo-moar 06fef8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V2lsSNztnT␤Two terms in a row␤at /tmp/V2lsSNztnT:1␤------> 3ircumfix:<<µ, @>> { say $^a }; µ 1, 2, 37⏏5 @ # also doesn't work␤    expecting any of:␤        infix␤        infix stopper␤    …»
21:18 psch lizmat: the constant is inserted literally, so it cant have a comma
21:18 psch - except if the comma is supposed to be part of the op
21:18 n0tjack hmm, what would be a quick way to recurse a match object and print out all its non-empty .hashes (recursively)?
21:19 psch lizmat: it's fine though, you don't *need* to add it.  i just want to feel useful... :)
21:19 lizmat psch: added to Other Notable Additions (those are without name, though  :-)
21:22 colomon joined #perl6
21:24 n0tjack huh, ok I know what i'm gonna write tonight :)
21:24 [Coke] m: my @a=1..10; say @[*.log]
21:24 camelia rakudo-moar 06fef8: OUTPUT«[WhateverCode.new]␤»
21:25 psch lizmat: i think there's a angle bracket hiccup in the post
21:25 lizmat ah, where?
21:25 psch lizmat: "delimiting with <> properly interpolates "
21:25 psch that needs to be <<>> or the unicode variant
21:26 [Coke] m: my @a=1..10; say @a[*.log]
21:26 camelia rakudo-moar 06fef8: OUTPUT«3␤»
21:26 lizmat psch: fixed (I think)
21:31 erdic joined #perl6
21:31 dalek rakudo/nom: fa024fe | lizmat++ | tools/build/gen-cat.nqp:
21:31 dalek rakudo/nom: Change module header to Perl 5 compliant line/file
21:31 dalek rakudo/nom:
21:31 dalek rakudo/nom: Perl 5 has a way of setting the current __FILE__ and __LINE__.
21:31 dalek rakudo/nom: This change mimics that behaviour so that we maybe can have correct
21:31 dalek rakudo/nom: file and line number from stacktraces coming from the setting.
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fa024fe123
21:32 cognominal joined #perl6
21:32 lizmat Now we only need someone to see lines starting with #line \d \S+ and set $?FILE and $?LINE accordingly  :-)
21:34 woolfy joined #perl6
21:34 woolfy left #perl6
21:35 psch lizmat++ : yeah, looks good
21:44 RabidGravy lizmat, I was wondering about that the other day strangely
21:45 lizmat my last commit, you mean ?
21:45 RabidGravy yaw
21:45 RabidGravy but I can't remember what I wanted it for :-\
21:47 lizmat well, TimToady (as many others) want it so that stack traces from core settings point to the right file / line, instead of to gen/moar/m-CORE...
21:48 dnmfarrell joined #perl6
21:49 tokuhirom joined #perl6
21:49 dnmfarrell hey what's the syntax for declaring a class attribute "is rw" AND giving it a default value? I could add a default to the new() signature, but was wondering if there was another way
21:50 RabidGravy m: class F { has $.gg is rw = 42; }; say F.new.gg
21:50 camelia rakudo-moar 06fef8: OUTPUT«42␤»
21:50 dnmfarrell whaaaat
21:50 hohoho joined #perl6
21:51 dnmfarrell haha RabidGravy thanks! I thought I tried that ... my mistake
21:52 lizmat gnight, #perl6!
21:52 RabidGravy nighty nighty
21:54 lea joined #perl6
21:55 grondilu dnmfarrell: though by "class attributes" you may have mean a "our" attribute
21:55 grondilu m: class F { our $.gg is rw = 3; }; say F.new.gg;
21:55 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gGtWFo1z48␤Can't use unknown trait 'is rw' in a variable declaration.␤at /tmp/gGtWFo1z48:1␤------> 3class F { our $.gg is rw7⏏5 = 3; }; say F.new.gg;␤    expecting any of:␤        TypeObject␤ …»
21:55 grondilu ouch
21:55 grondilu I thought that would work
21:56 grondilu according to S12 it should
21:57 grondilu (section called "Class Attributes")
21:57 grondilu m: class F { my $.gg is rw = 3; }; say F.new.gg;
21:57 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Efs4ZqZAg1␤Can't use unknown trait 'is rw' in a variable declaration.␤at /tmp/Efs4ZqZAg1:1␤------> 3class F { my $.gg is rw7⏏5 = 3; }; say F.new.gg;␤    expecting any of:␤        TypeObject␤  …»
21:59 grondilu m: class F { our $.gg = 3; }; say F.new.gg;
21:59 camelia rakudo-moar fa024f: OUTPUT«3␤»
21:59 grondilu rakudobug?
22:02 Kogurr joined #perl6
22:04 llfourn joined #perl6
22:05 SmokeMachine_ joined #perl6
22:08 dalek problem_solver_tutorial: 031f52f | (Herbert Breunung)++ | / (2 files):
22:08 dalek problem_solver_tutorial: starting paragraph 5
22:08 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_​solver_tutorial/commit/031f52fad1
22:09 hohoho joined #perl6
22:15 opal joined #perl6
22:17 eliasr joined #perl6
22:18 opal left #perl6
22:18 RabidGravy grondilu, no it's just necessary for an our variable
22:19 RabidGravy m: class F { our $.gg  = 3; }; my $f = F.new; say $f.gg; $f.gg = 42; say $f.gg
22:19 camelia rakudo-moar fa024f: OUTPUT«3␤42␤»
22:19 RabidGravy just not necessary rather
22:19 grondilu ok
22:19 grondilu the error message could just say that, though.
22:22 RabidGravy but then would have to define the  "multi sub trait_mod:<is> (Variable $v, :$rw) { die "is rw is useless on a variable" }" ;-)
22:27 TEttinger joined #perl6
22:30 s34n rakudo 2015.09 is the lastest perl 6?
22:31 hohoho good *
22:31 hohoho I guess IO::Path's cache is too strong.
22:31 grondilu s34n: yes
22:32 grondilu $ perl6 --version
22:32 grondilu This is perl6 version 2015.09-352-g03f84ee built on MoarVM version 2015.09-74-gedc44b5
22:32 hohoho -e caches a result forever.  `method e() { $!e //= FILETEST-E($.abspath)`
22:32 jojotus joined #perl6
22:33 s34n Still aiming for a Christmas (2015) release
22:33 jercos cacheing file test results at all sounds like race condition bait, no?
22:33 hohoho https://gist.github.com/tok​uhirom/3083ec8e94e293bc5a3e
22:33 hohoho it makes this test failing
22:33 s34n What's the latest performance data on perl 6?
22:34 kfo joined #perl6
22:35 kid51 joined #perl6
22:37 grondilu not sure who's keeping track of performance benchmarks.  And everybody's asleep right now apparently.
22:37 grondilu Perlformance is still not quite the absolute priority now I think.
22:37 grondilu though there are improvements every day.
22:46 skids joined #perl6
22:47 RabidGravy hohoho, I've been bitten by this before
22:48 hohoho RabidGravy: hm. but the issue still around there :P
22:50 kipd joined #perl6
22:51 ugexe recache it ~$_.IO.e
22:52 ugexe or $_.Str.IO.e
22:52 ugexe just create a new IO from a string of the path somehow
22:53 RabidGravy yeah I think that's what I ended up doing, can't even remember what code it is in
22:55 hohoho This behavior confuses the user.
22:55 hohoho i recommend to disable the cache
23:01 masak 'night, #perl6
23:09 psch RabidGravy: ooc, does perl6 seems audio live-coding suitable to you?
23:09 psch (ISTR that you linked me an article or two...)
23:10 olinkl joined #perl6
23:11 timotimo ohai
23:11 RabidGravy psch, I've been toying with the idea of doing some experiments
23:12 timotimo s34n: the great list refactor has given us a big improvement in memory usage as a baseline and cpu usage has gone down quite noticably in many cases where we've been able to build specialized iterators and such for things
23:12 timotimo s34n: i haven't uploaded a full benchmark result in a while, though, because our for-loop-to-while-loop optimization has temporarily fizzled from the GLR
23:12 timotimo and so performance has a weird dent in that regard
23:13 RabidGravy I'm quite sure it could be made to all the things necessary, whether it can do them fast enough is to be seen
23:14 psch right, "fast enough" is what i'm expecting to be a major hangup, currently at least
23:14 RabidGravy the streamin and encoding stuff I've played with is fasr enough
23:15 RabidGravy but additional dsp may not be quite so much
23:15 psch although the PortAudio bindings i tried might've also struggled with pre-GLR and not-good-enough natives...
23:15 psch add to that the fact that using jackd either segfaulted or dumped...
23:15 RabidGravy yeah, I keepmeaning to get back to that
23:16 psch afair FROGGS at least thought about a potential cause for the segfault/dumping...
23:16 psch no idea if anything came of that, and i'm not one to push people to solve my problems... :)
23:16 psch FROGGS suggested trying libsdl audio, but afaik that's not really a low-latency solution, although i might be wrong
23:17 kid51_ joined #perl6
23:17 psch there's not really much in the way of implementations to build upon from what i see
23:17 RabidGravy it probably has something to do with the jackd threads needing to share a buffer
23:17 psch yeah, it was something about freeing memory or somesuch...
23:18 psch i tend to gloss over those C-y parts :P
23:18 RabidGravy I ought hit up the jack boys about this
23:19 timotimo psch: i've recently made nativecall a tiny bit more efficient, but there's still quite a bit of overhead looming there
23:19 timotimo especially as it doesn't get spesh'd :(
23:19 timotimo were you able to get a good(ish) --profile out of your portaudio stuff?
23:20 psch timotimo: no, i didn't profile at all, unfortunately
23:20 psch although i might be able to give that a try tomorrow
23:20 sufrostico joined #perl6
23:21 psch RabidGravy: i don't know how much they'd appreciate being asked to introduce a copy or somesuch into their API
23:21 timotimo there's potentially something to be seen there
23:21 timotimo but i fear it'll just be "yep. it's slow" :P
23:21 psch RabidGravy: but i suppose asking for advice is always a good idea :)
23:21 timotimo or "yep, that's a whole lot of allocation"
23:21 psch m: say 1/48000
23:21 camelia rakudo-moar fa024f: OUTPUT«0.000021␤»
23:21 psch ^^^ that's the time per frame :)
23:22 timotimo the time you have to build one frame?
23:22 psch timotimo: yeah.  one frame has only a lookup though
23:22 timotimo i hope you don't have to twiddle every frame individually
23:22 psch timotimo: the array is precomputed in my (*very* basic) case
23:22 timotimo lizmat++ # weekly blogpost
23:22 psch timotimo: but that's the time for the lookup and nativecall invocation
23:22 RabidGravy psch, they're all quite cool - I've got patches in Ardour and stuff ;-)
23:24 psch timotimo: basically, https://github.com/peschwa/Audio-​PortAudio/blob/master/test.pl#L67 <- this loop has .000021 seconds for each iteration
23:24 psch timotimo: i'm pretty sure that's in "no way" territory currently, but i'm not the optimization expect ;)
23:24 psch s/expect/expert/
23:24 RabidGravy there's also a library somewhere that turns a jack interface into a regular blocking one for you
23:24 psch RabidGravy: neat.  i'm just trying to slowly bring the two things i've really enjoyed for a long time together :)
23:25 psch RabidGravy: music's been mostly a "prosumer" thing up until around the time i started the PortAudio bindings
23:26 psch which is to mean "producing with other peoples software (or only hardware)"...
23:27 psch ...not quite the colloquial meaning of "prosumer"
23:28 RabidGravy I just use hardware for the most part to actually make the noise, but Ardour to record and mix :)
23:30 |Tux| joined #perl6
23:32 pink_mist referring to your efforts in music as noise? wow, low self-esteem or are you into some kind of https://en.wikipedia.org/wiki/Noisecore ? :P
23:33 RabidGravy I have always called it "noise with beats in" :)
23:33 RabidGravy decide for yourself https://soundcloud.com/rabidgravy
23:33 atweiden joined #perl6
23:34 geekosaur c'mon feel the noise
23:35 * psch usually makes breaks with boring melodies layered over them
23:35 pink_mist heh, I wouldn't call it noise, but it's quite hard to put a name to :P
23:37 psch i don't have anythign readily online though, i deleted my soundcloud recently in a fit of "it's all meh anyway", and all that's left is on my phone which is out of battery at the moment... :P
23:38 RabidGravy psch, timotimo as to the dealing with lots of native array data - I've found that as long as I keep it for the most part in the native domain (i.e. don't copy the native frame data to Perl arrays,) it's fast enough tp read a 44.1K WAV, encode it as 320kbps MP3 and stream it to icecast
23:38 psch anyway, i've been wondering if a REPL is a good base to work with
23:38 psch s/with/from/
23:38 psch 'cause all the other projects seem to work from buffers
23:39 psch but they *also* don't use a language quite as expressive
23:39 RabidGravy yaxu's Tidal is a sort of REPL but it's Haskell
23:40 psch RabidGravy: the Udy - Ryu remix is pretty good
23:40 psch i'm not a great fan of four-to-the-floor, but the rest works well enough for me
23:43 psch is there a screencast or something around for tidal?
23:43 psch i don't see anything that looks like "this is how it works" on the website
23:44 RabidGravy http://yaxu.org/demonstrating-tidal/
23:44 psch ah, i didn't look well enough... :)
23:44 RabidGravy anyway I'm going to crash before I turn into a pumpkin
23:44 RabidGravy have fun
23:45 leont joined #perl6
23:50 tokuhirom joined #perl6

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

Perl 6 | Reference Documentation | Rakudo