Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-05

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:01 d4l3k_ joined #perl6
00:01 ilbelkyr_ joined #perl6
00:01 pmurias joined #perl6
00:02 chee joined #perl6
00:10 idiosyncrat joined #perl6
00:11 alpha joined #perl6
00:14 TEttinger joined #perl6
00:31 samcv joined #perl6
00:32 lookatme joined #perl6
00:32 lookatme morning .o/
00:55 sammers morning
01:01 samcv joined #perl6
01:08 alpha__ joined #perl6
01:09 astj joined #perl6
01:11 idiosyncrat left #perl6
01:20 lookatme When I declared an attribute like `$.a is rw`. How I can check value pass by user ?
01:26 MasterDuke joined #perl6
01:26 aborazmeh joined #perl6
01:26 aborazmeh joined #perl6
01:28 MasterDuke AlexDaniel: yeah, that was fixed in NQP yesterday, but there hasn't been a version bump for Rakudo yet
01:29 AlexDaniel lookatme: like, do you want your own setter?
01:31 lookatme AlexDaniel, I know we can check it by using Proxy, but I wonder is there more convenient way
01:32 TimToady joined #perl6
01:49 lookatme m: class A { has $.a = 10; method a is rw { my \r := $!a; return Proxy.new(FETCH => method () { $!a; }, STORE => method ($new) { if ($new > 20) { fail "TOO LARGE!!"; }; r = $new; }); }; }; my $a = A.new; $a.a = 30; say $a;
01:49 camelia rakudo-moar 36bc41: OUTPUT: «A.new(a => 10)␤»
01:51 lookatme m: class A { has $.a = 10; method a is rw { my \r := $!a; return Proxy.new(FETCH => method () { $!a; }, STORE => method ($new) { if ($new > 20) { die "TOO LARGE!!"; }; r = $new; }); }; }; my $a = A.new; $a.a = 30; say $a;
01:51 camelia rakudo-moar 36bc41: OUTPUT: «TOO LARGE!!␤  in method <anon> at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:52 lookatme m: class A { has $.a is rw = 10; method a is rw { my \r := $!a; return Proxy.new(FETCH => method () { $!a; }, STORE => method ($new) { if ($new > 20) { die "TOO LARGE!!"; }; r = $new; }); }; }; my $a = A.new; $a.a = 30; say $a;
01:52 camelia rakudo-moar 36bc41: OUTPUT: «TOO LARGE!!␤  in method <anon> at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:57 lookatme m: class A { has $.a is rw where { die "TOO LARGE" if $_ > 20; True; } = 10; }; my $a = A.new; $a.a = 30; say $a;
01:57 camelia rakudo-moar 36bc41: OUTPUT: «TOO LARGE␤  in block <unit> at <tmp> line 1␤␤»
01:57 lookatme m: class A { has $.a is rw where { die "TOO LARGE" if $_ > 20; True; } = 10; }; my $a = A.new; $a.a = 20; say $a;
01:57 camelia rakudo-moar 36bc41: OUTPUT: «A.new(a => 20)␤»
02:11 cdg joined #perl6
02:39 raiph joined #perl6
02:45 xinming joined #perl6
02:46 noganex_ joined #perl6
02:59 aindilis` joined #perl6
03:00 raiph I'd appreciate feedback on my SO static vs dynamic type checking "answer" at https://stackoverflow.com/a/44360950/1077672 Is it somewhat helpful, or all kinds of wrong, or over the top, or what?
03:10 lookatme m: subset DInt of Int where $_ >= 0 && $_ <= 32000; subset OInt of Int where $_ >= -32000 &&  $_ <= 32000; my DInt $d = 12;my OInt $o = -1; say $d + $o; sub myprint(Int $i) { say $i; }; myprint $d; myprint $d;
03:10 camelia rakudo-moar 36bc41: OUTPUT: «11␤12␤12␤»
03:10 lookatme m: subset DInt of Int where $_ >= 0 && $_ <= 32000; subset OInt of Int where $_ >= -32000 &&  $_ <= 32000; my DInt $d = 12;my OInt $o = -1; say $d + $o; sub myprint(Int $i) { say $i; }; myprint $d; myprint Int($d);
03:10 camelia rakudo-moar 36bc41: OUTPUT: «11␤12␤12␤»
03:15 skids joined #perl6
03:50 wamba joined #perl6
03:58 kyan joined #perl6
03:58 Cabanoss- joined #perl6
04:26 Geth ¦ doc: 105e50acb2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
04:26 Geth ¦ doc: Fix build failure
04:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/105e50acb2
04:58 samcv Unicode Grant Status Update 1 is up https://cry.nu/perl6/grant-status-update-1/
05:12 travis-ci joined #perl6
05:12 travis-ci Doc build passed. Zoffix Znet 'Fix build failure'
05:12 travis-ci https://travis-ci.org/perl6/doc/builds/239464827 https://github.com/perl6/doc/compare/27a9d5b99972...105e50acb2b3
05:12 travis-ci left #perl6
05:48 bioexpress joined #perl6
05:49 bioexpress use NCurses; my $win = initscr() or die "Failed to initialize ncurses\n";
05:49 bioexpress Hello! Does adding "or die ... " to "initscr" overwrite a possible original errormessage from "initscr"?
05:52 xtreak joined #perl6
05:57 parv joined #perl6
06:00 mrons joined #perl6
06:01 astj joined #perl6
06:02 astj joined #perl6
06:03 Cabanossi joined #perl6
06:08 Zoffix joined #perl6
06:08 Zoffix m: class Foo { has Int:D $!x = 1; method foo is rw { Proxy.new: :FETCH{ $!x<> }, :STORE(-> $, $!x { $!x<> }) } }; my $f = Foo.new; dd <a b c>.map: { $f.foo++; (1, $f.foo) }
06:08 camelia rakudo-moar 36bc41: OUTPUT: «((1, 4), (1, 4), (1, 4)).Seq␤»
06:08 Zoffix How come deconting don't work here?
06:09 Zoffix Or to nip the xy problem:
06:09 Zoffix m: class Foo { has Int:D $.foo is rw  = 1 }; my $f = Foo.new; dd <a b c>.map: { $f.foo++; (1, $f.foo<>) }
06:09 camelia rakudo-moar 36bc41: OUTPUT: «((1, 2), (1, 3), (1, 4)).Seq␤»
06:09 Zoffix How can I move that decont to my class instead of forcing user to do it?
06:10 Zoffix (I see now why first one don't work)
06:11 Zoffix bioexpress: only if initscr() returns a Failure, then yes, it won't explode
06:15 Zoffix m: class Foo { has Int:D $!x  = 1; multi method foo { $!x<> }; multi method foo is rw is default { $!x } }; my $f = Foo.new; dd <a b c>.map: { $f.foo++; (1, $f.foo) }
06:15 camelia rakudo-moar 36bc41: OUTPUT: «((1, 4), (1, 4), (1, 4)).Seq␤»
06:16 Zoffix If only this somehow worked without `is default`, then it'd work... I guess I'll give up
06:23 bioexpress zoffix: thanks!
06:49 Circlepuller joined #perl6
06:50 perigrin_ joined #perl6
06:50 lookatme joined #perl6
06:50 isacloud_ joined #perl6
06:50 parv joined #perl6
06:50 khisanth_ joined #perl6
06:50 chee joined #perl6
06:50 mrsolo joined #perl6
06:50 dalek joined #perl6
06:51 SmokeMachine joined #perl6
06:53 Cabanossi joined #perl6
06:54 domidumont joined #perl6
06:55 M-Illandan joined #perl6
06:56 ilmari[m] joined #perl6
06:59 domidumont joined #perl6
07:04 darutoko joined #perl6
07:14 Zoffix left #perl6
07:14 rindolf joined #perl6
07:17 vetmaster joined #perl6
07:18 vetmaster how to get count of substrings matched by a grammar token?
07:19 notostraca joined #perl6
07:21 AndroUser joined #perl6
07:24 darutoko- joined #perl6
07:41 zengargoyle_ m: "foo" ~~ /(.)+/; say $/.[0].elems; say $/.[0];
07:41 camelia rakudo-moar 36bc41: OUTPUT: «3␤[「f」 「o」 「o」]␤»
07:41 zengargoyle_ sorta like that i think.
07:44 xtreak joined #perl6
07:53 domidumont joined #perl6
08:02 jonas2 joined #perl6
08:03 nadim joined #perl6
08:03 Cabanossi joined #perl6
08:06 lookatme joined #perl6
08:07 dakkar joined #perl6
08:11 jonas2 joined #perl6
08:12 pminten joined #perl6
08:13 AndroUser zengargoyle_: thnx
08:17 zakharyas joined #perl6
08:38 bbkr joined #perl6
08:43 bbkr Hi. I have some mysterious zef issue. It installs GeoIP::City (https://github.com/bbkr/GeoIPerl6), tests are passing. But after trying to use it later from perl6 I get: "Could not find GeoIP:ver<1.0.0>:auth<github:bbkr> at line 1"
08:44 LeCamarade joined #perl6
08:45 bbkr META looks fine to me (should ver and auth be specified in "provides"?), module works fine after manual git clone. zef install somehow breaks it.
08:45 vetmasters joined #perl6
08:46 vetmasters left #perl6
08:46 vetmaster_ joined #perl6
08:51 lookatme Don't add :ver and :auth
08:51 lookatme bbkr,
08:52 bbkr are they gone/deprecated from spec or just NYI in zef?
08:55 lasse joined #perl6
08:55 lookatme I don't know, they would be available if you declare your class like `class GeoIP:ver<1.0.0>:auth<github:bbkr> { }`
08:55 bbkr it is declared this way
08:55 bbkr https://github.com/bbkr/GeoIPerl6/blob/master/lib/GeoIP.pm#L5
08:56 lookatme bbkr, refer this: https://docs.perl6.org/language/modules#is_export and https://docs.perl6.org/language/typesystem#index-entry-%3Aver%3C%3E_%28class%29-%3Aver%3C%3E
08:57 vetmaster_ what is the good way to generate a string of n symbols
08:57 vetmaster_ i. e. 5 "a" symbols -> aaaaa
08:57 vetmaster_ ?
08:57 lookatme m: "a" x 5
08:57 camelia rakudo-moar 36bc41: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "x" in expression "\"a\" x 5" in sink context (line 1)␤»
08:57 lookatme m: say "a" x 5
08:57 camelia rakudo-moar 36bc41: OUTPUT: «aaaaa␤»
08:58 vetmaster_ wow! :o
08:58 vetmaster_ thanks
08:58 lookatme m: say "a" x 5
08:58 camelia rakudo-moar 36bc41: OUTPUT: «aaaaa␤»
08:58 parv m: say 'x' x5
08:58 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say 'x'7⏏5 x5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤     …»
08:59 vetmaster_ m: say 0 x 5
08:59 camelia rakudo-moar 36bc41: OUTPUT: «00000␤»
08:59 lookatme bbkr, How about `GeoIP:ver<1.0.0>` or `GeoIP:auth...` ?
08:59 vetmaster_ m: say 0 x 5
08:59 camelia rakudo-moar 36bc41: OUTPUT: «00000␤»
08:59 vetmaster_ m: say 3 ~ 0 x 5;
08:59 camelia rakudo-moar 36bc41: OUTPUT: «300000␤»
08:59 parv hunh. needs a space.
09:00 lookatme vetmaster_, $c x n, repeat $c n times
09:00 lookatme And if you want a list use xx
09:00 lookatme m: say "x" xx 5
09:00 camelia rakudo-moar 36bc41: OUTPUT: «(x x x x x)␤»
09:00 parv m: say 'x' xx5
09:00 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say 'x'7⏏5 xx5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤    …»
09:01 parv ok then
09:02 parv m: 3+5
09:02 camelia rakudo-moar 36bc41: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "+" in expression "3+5" in sink context (line 1)␤»
09:02 lizmat joined #perl6
09:02 parv m: say 3+5
09:02 camelia rakudo-moar 36bc41: OUTPUT: «8␤»
09:03 xtreak joined #perl6
09:05 pminten if I have a bunch of classes (Entry, Answer, Grammar) all in logical namespace Quiz (e.g. Quiz::Entry) is there a way to say in such files to avoid typing Quiz::this, Quiz::that all the time?
09:05 xtreak joined #perl6
09:10 lookatme pminten, No, I think
09:10 zengargoyle_ parv: i've come the the conclusion that you usually need a space when it's like '<term> <op> <term>'
09:11 zengargoyle_ but there are some prefix/postfix/circumfix things where you don't. :)
09:11 lookatme m: module F { class A { }; class B { }; }; say F::.keys
09:11 camelia rakudo-moar 36bc41: OUTPUT: «(B A)␤»
09:11 lookatme m: module F { class A { }; class B { }; }; say F::A.new;
09:11 camelia rakudo-moar 36bc41: OUTPUT: «F::A.new␤»
09:11 vetmaster joined #perl6
09:11 parv zengargoyle_, it's not consistent. see (3+5); i don't see where is ambiguity in 'x' x<n>
09:11 lookatme m: module F { class A { }; class B { }; }; say F::A.new; import F; say A.new;
09:12 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    A used at line 1␤␤»
09:12 pminten lookatme: ok, thanks, I found :: prefix (as opposed to Quiz::) seems to work so I guess I'll use that
09:12 lookatme m: module F { class A { }; class B { }; }; say F::A.new; import F; say ::A.new;
09:12 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤No such symbol 'A'␤at <tmp>:1␤------> 3 { }; }; say F::A.new; import F; say ::A7⏏5.new;␤»
09:12 lookatme m: module F { class A is export { }; class B { }; }; say F::A.new; import F; say A.new;
09:12 camelia rakudo-moar 36bc41: OUTPUT: «F::A.new␤F::A.new␤»
09:12 zengargoyle_ x is a word character that could be a name, + is not a word character and has to be an op
09:13 lookatme pminten, There you go. Declare a module like above, and class declare with `is export`
09:13 zengargoyle_ m: my \x5 = 1; say x5; say 'a' x5;
09:13 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my \x5 = 1; say x5; say 'a'7⏏5 x5;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        state…»
09:15 pminten lookatme: unfortunately that only works on a single file, if I do 'module F { ... }' in multiple files it complains about redeclaration of module F
09:15 zengargoyle_ and there's a bit of p6 only does one pass through the code.  so things have to be one-pass decideable and it matches individual tokens often on just unicode properties so ... some things need that space around them to make it work.
09:17 lookatme pminten, Em
09:18 zengargoyle_ it sorta bugs me coming from a p5 background of squishing everything togeter in one line. :)  but not as much as:
09:18 zengargoyle_ m: say ²²;
09:18 camelia rakudo-moar 36bc41: OUTPUT: «4␤»
09:20 parv zengargoyle_, what did you write there (i see "2 2" as superscript)?
09:20 zengargoyle_ m: say 'a'x 5
09:20 camelia rakudo-moar 36bc41: OUTPUT: «aaaaa␤»
09:20 zengargoyle_ hehe
09:20 zengargoyle_ parv: it is a superscript 22 :)
09:21 parv um ... how does that make 4?
09:21 zengargoyle_ but the first superscript two is a unicode number so it's value is just 2 and the second is an op that is **2.
09:21 rightfold parv: two to the power of two
09:22 rightfold m: say 2²²;
09:22 camelia rakudo-moar 36bc41: OUTPUT: «4194304␤»
09:22 zengargoyle_ because it is looking for a term and a number is a term, but two numbers aren't a term (mulitiple digits are a term) and after a term it looks for an op.
09:23 zengargoyle_ m: say ½ + ½;
09:23 camelia rakudo-moar 36bc41: OUTPUT: «1␤»
09:23 zengargoyle_ it's the same thing that makes that work.  in unicode, the ½ has a numeric value of 0.5.
09:23 pmurias joined #perl6
09:24 vetmaster_ are there any multiline quotes
09:24 vetmaster_ like ''' in pyhton
09:24 vetmaster_ * python
09:24 vetmaster_ ?
09:24 zengargoyle_ https://docs.perl6.org/syntax/heredocs%20:to
09:25 parv zengargoyle_, hope we won't be working together; certainly not while debugging. ;-J
09:25 zengargoyle_ vetmaster_: multiline stuff is knows as 'heredoc' and there are a variety of methods.
09:26 vetmaster_ now I see, it's similar to p5
09:26 pminten vetmaster_: in general regarding quoting the overview docs are at https://docs.perl6.org/language/quoting
09:27 zengargoyle_ parv: it bugs me, but i see the logic in just having things work by looking at unicode tables.  it gives us so much more usefull things in return that a little bit of suffering for the weird things it implies is worth it.
09:28 * parv wonders if all electronic music (currently listening to parov stelar) eventually degenrates^Wconverges to electronica house dance music ...
09:29 rightfold How does dynamic scoping work with asynchronity?
09:31 jnthn rightfold: A start { ... } will capture the dynamic scope of the place the `start` happens, and make it so lookups inside of the `start` block look at the dynamic scope of the place it was started from.
09:31 jnthn Promise.start(...) will do the same
09:31 rightfold jnthn: thanks
09:32 rightfold Makes sense
09:32 jnthn $*SCHEDULER.cue will not do any such magic
09:32 rightfold m: say(new Rat)
09:32 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax␤at <tmp>:1␤------> 3say(new Rat7⏏5)␤»
09:32 wamba joined #perl6
09:35 zengargoyle_ m: say new: Rat
09:35 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    new used at line 1 (in Perl 6 please use method call syntax instead)␤␤»
09:35 zengargoyle_ m: say new Rat
09:35 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax␤at <tmp>:1␤------> 3say new Rat7⏏5<EOL>␤»
09:35 zengargoyle_ heh
09:35 pminten is there a way to inspect the current cursor during grammar parsing?
09:36 pminten I'd like to figure out where the regex engine is working on to understand why a rule fails
09:36 parv zengargoyle_, i get 1/2 (in unicode) be 0.5; or 2² is calculated as 4. i expect superscipt not "raised" to a number to be fatal error.
09:36 pminten Grammar::Tracer/Debugger tell me which rule fails but not at what point in the input
09:36 zengargoyle_ well i think number or digits+
09:37 zengargoyle_ well i think number or digits+digits.
09:39 zengargoyle_ eek.  that's the unicode distinction between 'number' and 'digit'  some things like ½ have a 'number' and some like '0' are 'number' and 'digit'.  you can't have a string of numbers turn into an actual number like a string of digits can.
09:40 rindolf joined #perl6
09:40 zengargoyle_ so i think p6 when looking for a term can either find one 'number' or a string  lf 'digit'.
09:43 zengargoyle_ i do sorta wish it looked for 'number and not superscript' instead so it would throw an error because ²² == 4 is whack.
09:43 pminten nvm, found that a custom method in the grammar can access self.pos/target/orig, it's a bit clunky but it gets the job done
09:44 zengargoyle_ but i was told to take it up with the unicode consortium last time i complained. :P
09:45 parv zengargoyle_, ah. you are alright then. <3
09:47 lookatme m: grammar { TOP { <ddd> }; rule ddd { 'ddd' <?{ say $/.perl; }> }; }.parse("ddd")
09:47 camelia rakudo-moar 36bc41: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    TOP used at line 1␤␤»
09:48 lookatme m: grammar { rule TOP { <ddd> }; rule ddd { 'ddd' <?{ say $/.perl; }> }; }.parse("ddd")
09:48 camelia rakudo-moar 36bc41: OUTPUT: «Match.new(list => (), made => Any, pos => 3, hash => Map.new(()), orig => "ddd", from => 0)␤»
09:48 zengargoyle_ it may just be that the unicode tables don't have the properties that would be needed to check against.
09:48 zengargoyle_ and no need/desire to start trying to do special cases on a one-off basis.
09:49 * zengargoyle_ the needs of the many outweigh the need of the few.
09:50 xtreak joined #perl6
09:50 vetmaster joined #perl6
09:51 parv perl6 is full of operators/punctuations. some effort could have gone toward to reject nonsensical syntax.
09:52 parv zengargoyle_, thanks for your time. it's time for me to go ..
09:53 zengargoyle_ and thank you too. :)
09:54 masak "some effort could have gone towards reject nonsensical syntax" :P
09:55 masak one person's efficient use of syntax is another person's nonsensical syntax, no?
10:09 Geth ¦ doc: 3499fd9ff7 | (Zoffix Znet)++ | 4 files
10:09 Geth ¦ doc: Document allmorphic smartmatching
10:09 Geth ¦ doc:
10:09 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/8a0b7460e5
10:09 Geth ¦ doc: Spec:        https://github.com/perl6/roast/commit/4f48067cc5
10:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3499fd9ff7
10:09 xtreak joined #perl6
10:13 xtreak joined #perl6
10:15 Zoffix joined #perl6
10:20 Zoffix Since it's once more a season to complain about the awesomeness of how ²² is evaluated, I invite everyone interested to comment on https://rt.perl.org/Ticket/Display.html?id=126732
10:21 Zoffix m: say −1² # Discuss????? ???? ????
10:21 camelia rakudo-moar 8a0b74: OUTPUT: «-1␤»
10:23 wamba joined #perl6
10:23 Cabanossi joined #perl6
10:25 astj joined #perl6
10:25 Zoffix left #perl6
10:28 lizmat m: say -1**2   # finishes any discussion for me  :-)
10:28 camelia rakudo-moar 8a0b74: OUTPUT: «Resource temporarily unavailable»
10:28 lizmat wow
10:28 lizmat wow
10:28 lizmat m: say -1**2   # finishes any discussion for me  :-)
10:28 camelia rakudo-moar 8a0b74: OUTPUT: «-1␤»
10:28 lizmat ah, better
10:36 domidumont joined #perl6
10:41 * zengargoyle_ WTF?
10:57 zengargoyle_ meh, in 22²² the 22 and the ²² are both really a series of digits.  it is 22^22 (or 22**22) and scanning a text where the 22 was magically erased shouldn't through  broken magic split that ²² into 2² and give you 4 instead of going WTF?
10:58 zengargoyle_ you're already breaking things in a way by making ²² which is a series of numbers into a digits and an actual Number.
10:59 zengargoyle_ but that's OK, but not noticing that that first ² of ²² is a superscript is somehow perfectly fine.
11:00 Zoffix joined #perl6
11:01 * zengargoyle_ really doesn't want to see the Javascript or Perl 5 or whatever WTF presentation a few years down the road.
11:02 Zoffix zengargoyle_: but that's not what happens. ² has Unicode property No, which means it's valid to use it as a numeric literal in Perl 6. You can also follow a term with ² to indicate you want to raise to a power.
11:02 Zoffix IMO people who complain about to ²² are too hung up on looks and so have to use phrases like "magically erased" to justify their disdain
11:02 masak zengargoyle_: there are surprising aspects of having `-x**y` mean `-(x**y)`, and there are surprising aspects of having it mean `(-x)**y`
11:03 zengargoyle_ why can the ²² be a number 22 and not only the No ² plus a second No ²
11:03 Zoffix As for −1² being −1... that's just rules of basic mathematics. The power has tighter precedence than negation
11:03 Zoffix zengargoyle_: that's a very good question! You're not allowed to chain two No characters, because, well, they're No, not Nd chars.
11:03 zengargoyle_ ah, conceed the -1 thing. :)
11:04 Zoffix As for "WAT" and "WTF" JavaScript presentations... they're just entertainment for the ignorant.
11:04 zengargoyle_ but you do chain them in the exponent part or it would be ((22)**2)**2)
11:04 aborazmeh joined #perl6
11:04 aborazmeh joined #perl6
11:04 zengargoyle_ because those superscript things aren't digits.
11:05 Zoffix zengargoyle_: sure. Because in that context it's a superscript operator, not a numeric literal
11:05 Zoffix s/superscript //;
11:05 Zoffix ²² is a numeric literal followed by an operator
11:06 zengargoyle_ right, why would when parsing you prefer that it's a number vs not rejecting it because it's a superscript?
11:07 zengargoyle_ you can have your circled 5 is a number because it's not a superscript.
11:07 zengargoyle_ you can have your digitizing superscripts as power ops because they are op.
11:07 zengargoyle_ why would you accept a superscript as a regular number?
11:08 Zoffix zengargoyle_: because of context. It's a term -> op -> term -> op chain in Perl 6 and in that context it expects a term, and it gets one (the No numeric literal), next it expects an op, and it gets one (the ² power operator)
11:08 Zoffix zengargoyle_: because it's a No character. And we accept all No characters.
11:08 zengargoyle_ i get the parsing argument.  just don't agree. :)
11:08 Zoffix Why?
11:09 zengargoyle_ because superscript trumps No
11:09 masak in Python 3, `-3 ** 2` gives -9. in JavaScript/ES7, it gives 9.
11:09 Zoffix More precicely: why change rule "can use any No" to "can use any No, unless it's a superscript which is also followed by another superscript" ?
11:09 masak I consider it a tradeoff with no clear best alternative.
11:10 zengargoyle_ i would never look at a math paper and see a tiny ²² floating about and think that it could possibly be 2² == 4
11:10 Zoffix And maintain that exception in: code, docs, tests, and any mention of the feature
11:11 Cabanossi joined #perl6
11:11 zengargoyle_ and the argument for unicode is usually along the line of "you can do it how you would expect to see it" for the most part.
11:12 zengargoyle_ maybe ₂ isn't a No?
11:12 Zoffix zengargoyle_: you're equally unlikely to see ௲² and think it could possibly be 1000² = 1000000
11:12 masak most things in the intersection between Perl 6 and Unicode in the past few years have made me think of the Jeff Goldblum quote from Jurassic Park
11:12 zengargoyle_ nah, i'm fine with weird glyphs... :)
11:12 Zoffix zengargoyle_: the "I'd feel weird if I saw it in a math paper" is too subjective and vague to clearly codify as a set of rules the language works in.
11:13 Zoffix masak: what's the quote?
11:13 zengargoyle_ i was wondering if a slang could turn japanese No characters into actual Numeric digit like things.
11:14 Zoffix m: say ⅟²
11:14 camelia rakudo-moar 8a0b74: OUTPUT: «1␤»
11:14 Zoffix And if you're blacklisting ²², what about ⅟²? It looks even weirder!
11:15 zengargoyle_ really, i thought it was that unicode didn't provide a property that was suitable to make the distinction.
11:15 xtreak joined #perl6
11:15 masak Zoffix: "[they] were so preoccupied with whether or not they could they didn't stop to think if they should"
11:15 Zoffix Or ????² which looks like -2 or ????² which looks like an equals sign
11:16 Zoffix Yeah, the ²² ticket is a clear rejection to me.
11:16 masak I've been buying into the Unicode offerings in Perl 6 *really* slowly. I do like Unicode operators, both custom and the built-in ones.
11:17 zengargoyle_ i love the plethora of quote marks.
11:17 Zoffix left #perl6
11:17 pmurias masak: Perl 6 hand over the "if they should" part to the user, it seems a corporate coding standard would trim down the language a lot
11:17 yoleaux 4 Jun 2017 20:38Z <ggoebel> pmurias: saw the recent commits regarding building js backend... what is the full set of steps now to build it from a fresh git clone https://github.com/rakudo/rakudo.git?
11:18 masak pmurias: aye; and that is fair enough
11:19 masak pmurias: in a way, that's always been Perl's way -- fiercely defend the programmer's freedom to choose
11:19 zengargoyle_ yeah, i'm not really mad or anything, just a lot of "ewwww".
11:19 masak I'd say for me the whole ²² argument above simply means that Unicode superscripts are not (and should not be) part of Perl 6's "good parts"
11:20 * zengargoyle_ and it's an easy source of mockery because it's cray-cray. :P
11:20 masak like, if TheDamian wrote a "Perl 6 Best Practices", it'd say "avoid Unicode superscripts"
11:20 xtreak joined #perl6
11:24 zengargoyle_ i thought is was a side-effect of bits of parsing being driven by unicode consortium tables.  and it was ill advised to try and work around any flaws ATM>
11:25 masak as far as I know, it was quite deliberate. superscript parsing has to be handled separately, after all.
11:25 zengargoyle_ and maybe unicode 10 will provide the means to make it sane.
11:26 zengargoyle_ yeah, the whole number vs digit mangling seems a bit haphazard.
11:26 grumble joined #perl6
11:27 zengargoyle_ when i *got* the difference between number and digit it just made things worse that it's OK to mangle on one side of things but not on the other side of thing.
11:31 * zengargoyle_ it's just an agument i've probably lost. :P
11:38 xtreak_ joined #perl6
11:38 masak I'm sorry -- I don't have a stake in this argument because I don't use Unicode superscripts
11:38 masak they're just not attractive or relevant to me
11:40 zengargoyle_ before bedtime, my other gripe(s) were that POD is in a compunit and you have a hard time 'perl*doc'-ing it if there's an error.
11:40 zengargoyle_ the code fails to compile, sorry ... no doc for you.
11:41 xtreak joined #perl6
11:41 masak I can see how that'd be frustrating, yes
11:42 zengargoyle_ but i like the #| and other cool things so....
11:42 masak yes, there's probably a fairly strong dependency on the (correctly parsing) code, too
11:44 zengargoyle_ and just the lack of really easy installed module introspection tools ATM.  i love being able to `perldoc <TAB><TAB>` and browse things.
11:44 zengargoyle_ but that's probably just a lack of TUIT's
11:47 ctilmes joined #perl6
11:48 zengargoyle_ and that POD6 doesn't quite live up to the synopsis yet, probably a low priority to implement all of the really cool stuff that was fleshed out way back when.
11:50 * zengargoyle_ not sure if ShimmerFairy is still around or did some POD tweaking since last i looked.
11:54 wamba joined #perl6
11:58 masak neither, as far as I know
11:58 zengargoyle_ :( on both parts.
12:02 Geth ¦ ecosystem: 503ad8a82f | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
12:02 Geth ¦ ecosystem: Add IO::CatHandle::AutoLines to the ecosystem
12:02 Geth ¦ ecosystem:
12:02 Geth ¦ ecosystem: "Get IO::CatHandle's current handle's line number":
12:02 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-IO-CatHandle-AutoLines
12:02 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/503ad8a82f
12:03 zengargoyle_ .u ????
12:03 yoleaux U+11053 BRAHMI NUMBER TWO [No] (????)
12:03 zengargoyle_ heh. well played. :)
12:04 grondilu joined #perl6
12:06 mr-foobar joined #perl6
12:12 zengargoyle_ m: say 2**????????
12:12 camelia rakudo-moar 6c6bf3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say 2**????7⏏5????␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤     …»
12:12 zengargoyle_ oh, superscript is *SPECIAL*
12:13 zengargoyle_ ;)
12:14 moritz \o
12:15 xtreak_ joined #perl6
12:15 mr-foobar joined #perl6
12:16 zengargoyle_ yeah, 5 am, probably time for bed.
12:16 moritz m: 3.30
12:16 camelia rakudo-moar 6c6bf3: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant value 3.30 in sink context (line 1)␤»
12:16 moritz m: asy 3.30
12:16 camelia rakudo-moar 6c6bf3: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    asy used at line 1. Did you mean 'say', 'any'?␤␤»
12:17 moritz m: say 3.30
12:17 camelia rakudo-moar 6c6bf3: OUTPUT: «3.3␤»
12:17 moritz m: say <3.30>
12:17 camelia rakudo-moar 6c6bf3: OUTPUT: «3.30␤»
12:17 moritz m: say <3.30> ~~ Rat
12:17 camelia rakudo-moar 6c6bf3: OUTPUT: «True␤»
12:21 AlexDaniel joined #perl6
12:32 wamba joined #perl6
12:33 [Coke] http://news.perlfoundation.org/2017/06/perl-6-travel-grant-proposal.html
12:34 [Coke] This travel grant falls outside the grants committee process and is being handled directly by the board.
12:39 fatguy joined #perl6
12:40 fatguy how to do multiline comments ?
12:41 AlexDaniel m: say #`{ hello! } 42
12:41 camelia rakudo-moar 6c6bf3: OUTPUT: «42␤»
12:41 yoleaux 09:18Z <Zoffix> AlexDaniel: Present:  dd <00>   vs.   dd <00.0+0i>   vs.   dd <00+0i>
12:41 AlexDaniel oh not again…
12:48 mcmillhj joined #perl6
12:49 perlpilot joined #perl6
12:50 AlexDaniel fatguy: https://docs.perl6.org/language/syntax#Multi-line_/_embedded_comments
12:51 mcmillhj joined #perl6
12:51 Geth ¦ ecosystem: 7572dad302 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
12:51 Geth ¦ ecosystem: Add LN to ecosystem
12:51 Geth ¦ ecosystem:
12:51 Geth ¦ ecosystem: "Get $*ARGFILES with line numbers via $*LN":
12:51 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-LN
12:51 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/7572dad302
12:54 fatguy AlexDaniel: is there any caveat if i use pod comments? it look more useful since i can label it
12:55 AlexDaniel I have never used pod comments… can anybody answer that? :)
12:55 Cabanossi joined #perl6
13:05 lucasb joined #perl6
13:06 Geth ¦ doc: 9673377498 | (Zoffix Znet)++ | doc/Language/5to6-perlvar.pod6
13:06 Geth ¦ doc: Fix docs for $. replacements
13:06 Geth ¦ doc:
13:06 Geth ¦ doc: Fixes #401
13:06 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9673377498
13:08 Geth ¦ doc: c035e0f9ee | (Zoffix Znet)++ | doc/Language/variables.pod6
13:08 Geth ¦ doc: Fix $*ARGFILES description
13:08 Geth ¦ doc:
13:08 Geth ¦ doc: It's no longer magical but just an IO::CatHandle
13:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c035e0f9ee
13:09 zakharyas joined #perl6
13:21 raschipi joined #perl6
13:25 M-Illandan left #perl6
13:26 skids joined #perl6
13:28 NeuralAnomaly joined #perl6
13:52 raschipi AlexDaniel: You're supposed to always use POD comments.
13:53 raschipi A Perl file without POD isn't complete.
13:54 raschipi .tell fatguy You're supposed to always use POD comments, there's caveat.
13:54 yoleaux raschipi: I'll pass your message to fatguy.
13:54 AlexDaniel well, then all my programs are incomplete :)
13:54 raschipi Go fix them.
13:54 raschipi .tell fatguy No Caveat, I mean.
13:54 yoleaux raschipi: I'll pass your message to fatguy.
13:56 raschipi AlexDaniel: Especially if you plan on distributing them, the POD in the program becomes the CPAN front page for the module.
14:04 ugexe you can have a separate .pod file
14:06 pmurias_ joined #perl6
14:10 Cabanossi joined #perl6
14:18 wamba joined #perl6
14:22 itaipu joined #perl6
14:26 gregf_ joined #perl6
14:27 petercommand joined #perl6
14:27 khw joined #perl6
14:30 pmurias ggoebel: had to fix some bitrot caused by recent IO changes in nqp to make rakudo.js work again, now trying out if a fresh checkout of rakudo.js works and will post a blog post if it works
14:37 fatguy joined #perl6
14:38 raschipi hey fatguy
14:39 fatguy raschipi: yes ?
14:39 yoleaux 13:54Z <raschipi> fatguy: You're supposed to always use POD comments, there's caveat.
14:39 yoleaux 13:54Z <raschipi> fatguy: No Caveat, I mean.
14:39 fatguy Thanks !
14:43 [Coke] (cpan front page) I doubt that works yet with Perl 6 cpan modules.
14:48 raschipi Hum, how am I supposed to find those modules, then?
14:52 [Coke] for now: http://modules.perl6.org/
14:52 [Coke] a lot of work has been done to make perl6 modules just work on CPAN, but it is not yet (as far as I know) the standard.
15:01 raschipi The new zef version is pulling from CPAN as the first option, as I understand.
15:03 rightfold m: class C { method defined() { False } }; sub f(C:D $x) { }; f(C.new)
15:03 camelia rakudo-moar ac8b47: ( no output )
15:03 rightfold Ok, so definedness is separate from .defined
15:04 kaare_ joined #perl6
15:04 timotimo there's also .DEFINITE
15:04 Geth ¦ doc: ad2ccd54e2 | (Zoffix Znet)++ (committed using GitHub Web editor) | xt/code.pws
15:04 Geth ¦ doc: Add type to code spell
15:04 Geth ¦ doc:
15:04 Geth ¦ doc: Probably fixes #1360
15:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ad2ccd54e2
15:05 timotimo which is, as the uppercaseness signifies, special. in this case it's very low-level
15:05 kurahaupo joined #perl6
15:07 rightfold Ok
15:07 rightfold Thanks
15:18 raschipi moritz: You should ask google to scan your perl6 book site again, there's stale data showing in my searches.
15:18 Actualeyes joined #perl6
15:20 mspo joined #perl6
15:20 mspo should I add Racket to influenced perl6?
15:20 mspo on wikipedia
15:27 rightfold m: say :().ACCEPTS(:())
15:27 camelia rakudo-moar ac8b47: OUTPUT: «True␤»
15:28 rightfold m: sub f() {}; f(|:())
15:28 camelia rakudo-moar ac8b47: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:33 pmurias ttp://blogs.perl.org/users/pawel_murias/2017/06/rakudojs-update---builds-sanely-and-passes-some-spec-tests.html
15:34 pmurias http://blogs.perl.org/users/pawel_murias/2017/06/rakudojs-update---build-sanely-and-passes-some-spec-tests.html # Rakudo.js update
15:36 raschipi pmurias: That was way faster than I previously thought as even possible!
15:39 pmurias raschipi: ?
15:40 raschipi Writing the JS backend, it was very fast.
15:40 pmurias the JS backend is not finished yet :(
15:40 araujo joined #perl6
15:41 araujo joined #perl6
15:42 raschipi Wel, it's getting there fast.
15:43 travis-ci joined #perl6
15:43 travis-ci Doc build passed. Zoffix Znet 'Add type to code spell
15:43 travis-ci https://travis-ci.org/perl6/doc/builds/239613849 https://github.com/perl6/doc/compare/c035e0f9eed9...ad2ccd54e213
15:43 travis-ci left #perl6
15:46 perlpilot pmurias: I'd add the explicit "git checkout js" command to that post.  And, you have "Configure" and it should be "Configure.pl" (unless adding Configure was one of your changes  :-)
15:47 perlpilot pmurias++ btw  (can't do that enough actually.)
15:48 pmurias perlpilot: thanks, fixed the instruction
15:48 pmurias * instructions
15:50 perlpilot pmurias: Does anything in there require node 7.10.0 or is that just the one you happened to use?
15:55 Cabanossi joined #perl6
15:56 pmurias perlpilot: that's what I use
15:56 pmurias perlpilot: I haven't really tested it with older ones
16:02 xinming joined #perl6
16:03 pmurias perlpilot: any nodes I should particulary test it in?
16:04 raschipi Debian Jessie has 0.10.29
16:04 raschipi Stretch will be released with 4.8.2
16:10 cioran89 joined #perl6
16:11 kurahaupo joined #perl6
16:13 cdg joined #perl6
16:15 perlpilot pmurias: I dunno.  We've had a few instances at $work where someone has used a feature that wasn't available in the version of node installed on our production boxes.  That's why I even asked.
16:15 itaipu joined #perl6
16:17 raschipi pmurias: They have a lts schedule here: https://github.com/nodejs/LTS]
16:18 perlpilot the nodejs people have a different idea of LTS that most others I've run across  :)
16:18 perlpilot *than
16:19 wamba joined #perl6
16:20 raschipi What's the matter with their LTS?
16:20 raschipi I don't deal with any of that... Can't be worse than ruby...
16:21 perlpilot nothing ... I'm probably just feeling curmudgeonly today.   18 months doesn't really seem "long term" though
16:23 raschipi Well, It's certainly short, but much better than nothing. Besides, they do make it possible to backport a maintained version to older distros at least...
16:25 Cabanossi joined #perl6
16:26 setty1_ joined #perl6
16:30 pmurias perlpilot: node.js is exposing the V8 embedding API to extensions (which tends to have incompatible changes) which could be a part of why they aren't supporting old versions for longer
16:32 pmurias perlpilot: I can support older versions if people that need neem I just hesitate to spend time on supporting things that will be gone by the time rakudo.js is production ready if nobody needs them currently ;)
16:34 raschipi waiting for someone to ask is completely fine, of course
16:47 mspo do you need node or just v8?
16:55 eliasr joined #perl6
16:57 pilne joined #perl6
16:58 pmurias mspo: the code that rakudo.js emits will be usable in the browser (that's broken at the moment but worked in that past for nqp.js)
16:59 pmurias mspo: I'm using node.js for stuff such as loading up the source file and spawning a copy of rakudo.js
17:00 pmurias afk&
17:02 mullagainn joined #perl6
17:04 mullagainn does p6 support epoll or kqueue?
17:05 cdg joined #perl6
17:07 timotimo p6 has built-in async I/O based on what libuv gives us (so that'd probably be epoll on linux and kqueue on bsd?)
17:07 mcmillhj joined #perl6
17:07 timotimo but you can also NativeCall into these C functions to use them directly
17:07 timotimo mullagainn: does that help?
17:07 mullagainn yep, that helps
17:08 mspo yes libev tends to use epoll and kqueue
17:08 rightfold m: for ["A", "B", "C"] -> $x { fail $x }
17:08 camelia rakudo-moar ac8b47: OUTPUT: «A␤  in block <unit> at <tmp> line 1␤␤»
17:08 mullagainn I have been waiting for someone to port a SNMP module.. I may just have to do it myself.
17:08 rightfold m: for ["A", "B", "C"] -> $x { for ["D", "E"] { fail $x } }
17:08 camelia rakudo-moar ac8b47: OUTPUT: «A␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:08 rightfold m: for ["A", "B", "C"] -> $x { for ["D", "E"] { default { fail $x } } }
17:08 camelia rakudo-moar ac8b47: OUTPUT: «A␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:11 raschipi mullagainn: Why not use the Perl5 modules?
17:18 mcmillhj joined #perl6
17:27 mcmillhj joined #perl6
17:28 domidumont joined #perl6
17:28 itaipu joined #perl6
17:28 mcmillhj joined #perl6
17:38 zapwai joined #perl6
17:48 itaipu joined #perl6
18:11 Cabanossi joined #perl6
18:12 TEttinger joined #perl6
18:26 mscha joined #perl6
18:28 mscha m: say 5 ... 0; say 5 ...^ 0; # Why does this work, but ...
18:28 camelia rakudo-moar ac8b47: OUTPUT: «(5 4 3 2 1 0)␤(5 4 3 2 1)␤»
18:28 mscha m: say 5 ^... 0; # ... this doesn't, and ...
18:28 camelia rakudo-moar ac8b47: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at <tmp>:1␤------> 3say 5 ^...7⏏5 0; # ... this doesn't, and ...␤»
18:28 mscha m: ay 5 ^...^ 0; # ... neither does this?
18:28 camelia rakudo-moar ac8b47: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3ay 5 ^...^7⏏5 0; # ... neither does this?␤»
18:29 mscha m: say 5 ^...^ 0; # ... neither does this?
18:29 camelia rakudo-moar ac8b47: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3say 5 ^...^7⏏5 0; # ... neither does this?␤»
18:33 st_elmo joined #perl6
18:33 raschipi mscha: You should try using the .. (range) operator.
18:35 raschipi No, sorry. Doesn't work.
18:40 captain-adequate joined #perl6
18:44 ilmari joined #perl6
18:45 SCHAPiE joined #perl6
18:45 itaipu joined #perl6
18:48 TimToady what would 1, 2, 4 ^... 8 mean?
18:49 TimToady it's easy to exclude the endpoint because there's only one of it :)
18:49 zakharyas joined #perl6
18:50 moritz I'd read it to "exclud everything left of the ^", but it seems very weird to cut out exactly the examples you provided yourself :-)
18:51 TimToady m: say ^5 .reverse
18:51 camelia rakudo-moar ac8b47: OUTPUT: «(4 3 2 1 0)␤»
18:52 rightfold Interesting, Z is the same as X if the LHS is infinite
18:55 mscha Ah, OK, multiple start points, now I get it.
18:57 AlexDaniel rightfold: not at all?
18:57 AlexDaniel rightfold: what are you talking about exactly?
18:57 itaipu joined #perl6
18:57 AlexDaniel mscha: but you can use ranges instead and then you can exclude whatever you want :)
18:57 rightfold actually both must be infinite
18:58 espadrine_ joined #perl6
18:58 rightfold m: say (1 .. * Z 100 .. *)[^10] == (1 .. * X 100 .. *)[^10]
18:58 camelia rakudo-moar ac8b47: OUTPUT: «True␤»
18:59 TimToady m: say (1 .. * Z 100 .. *)[^10] eqv (1 .. * X 100 .. *)[^10]
18:59 camelia rakudo-moar ac8b47: OUTPUT: «False␤»
18:59 rightfold m: say (1 .. * Z 5 .. *)[^10] == (1 .. * X 5 .. *)[^10]
18:59 camelia rakudo-moar ac8b47: OUTPUT: «True␤»
18:59 rightfold oh
18:59 TimToady all you're testing is that both sides have 10 elements
18:59 rightfold I am idiot
19:00 TimToady it's an easy mistake
19:00 rightfold m: say (1 .. * Z 5 .. *)[^10] ~ (1 .. * X 5 .. *)[^10]
19:00 camelia rakudo-moar ac8b47: OUTPUT: «1 5 2 6 3 7 4 8 5 9 6 10 7 11 8 12 9 13 10 141 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14␤»
19:01 TimToady m: say (1 .. * Z 100 .. *)[^10] ~~ (1 .. * X 100 .. *)[^10]
19:01 camelia rakudo-moar ac8b47: OUTPUT: «False␤»
19:01 rightfold m: say (1 .. * Z=> 5 .. *)[^10] eqv (1 .. * RXR=> 5 .. *)[^10]
19:01 camelia rakudo-moar ac8b47: OUTPUT: «False␤»
19:02 TimToady Z is always going to iterate both lists, while X will never get to the second element of the second list
19:04 TimToady er, of the first list, I mean
19:05 TimToady since the right one varies faster
19:06 kyan joined #perl6
19:06 rightfold m: say 1, 2, 3 X& 4, 5, 6
19:06 camelia rakudo-moar ac8b47: OUTPUT: «(all(1, 4) all(1, 5) all(1, 6) all(2, 4) all(2, 5) all(2, 6) all(3, 4) all(3, 5) all(3, 6))␤»
19:06 rightfold how much backtracking is there in the grammar?
19:06 TimToady very little
19:07 TimToady only two places that I know of
19:07 TimToady m: say [1]
19:07 camelia rakudo-moar ac8b47: OUTPUT: «[1]␤»
19:07 rightfold For example in "say 1, 2, 3 X& 4, 5, 6" you don't know it's not an argument list until you see X
19:07 TimToady m: say [+]
19:07 camelia rakudo-moar ac8b47: OUTPUT: «0␤»
19:07 TimToady there's one of them
19:09 TimToady that's more like delayed interpretation of the comma, I think
19:09 TimToady so more of a semantic distinction
19:10 TimToady the other place that officially backtracks is variable interpolation with trailing subscripts
19:11 TimToady "$foo.bar.baz()" vs "$foo.bar.baz" for instance
19:11 TimToady m: my $foo = "FOO'; say "$foo.bar.baz"
19:11 camelia rakudo-moar ac8b47: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my $foo = "FOO'; say "7⏏5$foo.bar.baz"␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        s…»
19:12 TimToady m: my $foo = 'FOO'; say "$foo.bar.baz"
19:12 camelia rakudo-moar ac8b47: OUTPUT: «FOO.bar.baz␤»
19:12 TimToady m: my $foo = 'FOO'; say "$foo.bar.baz()"
19:12 camelia rakudo-moar ac8b47: OUTPUT: «No such method 'bar' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
19:12 rightfold :{
19:14 moritz FYI, github has a "Major service outage"
19:15 nadim works for me in Spain
19:16 moritz I just had a 404 for one of my own repos, and a 500 for Config::INI by tadzik++
19:16 wamba joined #perl6
19:16 rightfold nadim: repos don't work
19:16 tadzik :o
19:17 rightfold some do
19:17 rightfold *
19:17 tadzik I should put more of my stuff on CPAN
19:17 tadzik it has mirrors and all :)
19:18 lizmat ++tadzik
19:18 moritz .oO( tadzik broke github! )
19:18 tadzik ...but I'm sitting here writing Python material *grumble*
19:18 rightfold do we have 6PAN yet?
19:18 rightfold is ecosystem still on GH?
19:19 moritz rightfold: it is
19:19 rightfold ok
19:19 rightfold I should publish a library
19:21 st_elmo joined #perl6
19:21 ugexe we can use cpan
19:24 raschipi c6an
19:24 raschipi With the p upside-down
19:24 rightfold peterpan
19:25 st_elmo joined #perl6
19:25 raschipi cpan is missing pages for Perl6 modules and also a good search engine.
19:26 TEttinger NAP6
19:27 TEttinger everybody likes naps
19:27 TEttinger when it goes down for maintenance, you could have a logo of camellia getting some beauty rest
19:28 raschipi I suggested yondercpan to be P6's metacpan the other day
19:28 TEttinger cpot and cpan
19:28 nowan joined #perl6
19:28 TEttinger cpot is not perhaps the best name, or perhaps the best name
19:29 raschipi The symbol could be Camelia with a pan over her head.
19:29 TEttinger trye
19:29 TEttinger true
19:29 TEttinger putting the C in CPAN
19:30 TEttinger ah right, camelia is one l, camellia is either the flower, the electronica musician, or mayeb both?
19:30 kyan joined #perl6
19:30 rightfold I made a documentation site generator for Perl 6 once
19:31 rightfold Like two years ago
19:31 TEttinger nice
19:31 lizmat CameliaPAN ?
19:32 raschipi It's a traditional symbol for playful children in Brazil: https://i.ytimg.com/vi/dn576g_05NU/hqdefault.jpg
19:32 rightfold That's a pastafarian
19:34 TEttinger I mean, a butterfly's head is not going to hold a pot or pan well
19:34 TEttinger you could have camelia perch on a pan handle (to distinguish from being cooked)
19:34 TEttinger or be holding a tiny pan
19:35 TEttinger which is especially cute
19:35 TEttinger alternately, 6 pans, in 6 legs, for perl 6
19:36 rightfold I could reboot the documentation site project
19:37 moritz rightfold: what do you mean by reboot?
19:37 rightfold Make it work with the latest version of Rakudo and develop it further
19:38 rightfold > Last updated 2016-02-07
19:38 rightfold lol it was written in PHP
19:38 moritz which site are yyou talking about?
19:39 rightfold Yeah this has to be completely rewritten lol
19:39 moritz s/yy//
19:39 rightfold https://bitbucket.org/rightfold/sixdoc/src/cbc386316e10abbdac2553e23ad2449b7023c287?at=master
19:39 moritz ah
19:42 rightfold I much like the https://docs.perl6.org/ format
19:47 dogbert17 joined #perl6
19:53 dwarring joined #perl6
19:55 moritz github is back, fwiw
19:55 Cabanossi joined #perl6
20:01 itaipu joined #perl6
20:08 raschipi joined #perl6
20:10 vetmaster joined #perl6
20:12 raschipi We need the gan, github archive network.
20:15 tadzik Github Guaranteed Unaccessibility Defense, or GIT GUD for short
20:20 vetmaster what is the best way to set simple strings (not regex) in grammar tokens?
20:22 moritz vetmaster: do you want to assign to a variable? or do you want to match a string literally?
20:22 Xliff vetmaster: Use quoted text for that
20:23 vetmaster to match a string literally
20:23 moritz $string ~~ /'weird shit here!?§$'/
20:23 Xliff Grammar A { rule TOP { "abcd" } }; say A.parse('abcd')
20:23 Xliff m: Grammar A { rule TOP { "abcd" } }; say A.parse('abcd')
20:23 camelia rakudo-moar 8efffb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Grammar7⏏5 A { rule TOP { "abcd" } }; say A.parse(␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        stateme…»
20:23 Xliff m: Grammar A { rule TOP { "abcd"; }; }; say A.parse('abcd');
20:23 camelia rakudo-moar 8efffb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3Grammar7⏏5 A { rule TOP { "abcd"; }; }; say A.pars␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        stateme…»
20:24 Xliff m: grammar A { rule TOP { "abcd"; }; }; say A.parse('abcd');
20:24 camelia rakudo-moar 8efffb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex metacharacter ; (must be quoted to match literally)␤at <tmp>:1␤------> 3grammar A { rule TOP { "abcd"7⏏5; }; }; say A.parse('abcd');␤    expecting any of:␤        double qu…»
20:24 Xliff m: grammar A { rule TOP { "abcd" }; }; say A.parse('abcd');
20:24 camelia rakudo-moar 8efffb: OUTPUT: «「abcd」␤»
20:25 Xliff vetmaster: So you can use that text in any rule or token.
20:25 Cabanossi joined #perl6
20:25 Xliff And you can also use metacharacters outside the quoted text.
20:26 Xliff m: grammar A { rule TOP { "abcd" ..? }; }; say A.parse('abcdef');
20:26 camelia rakudo-moar 8efffb: OUTPUT: «Nil␤»
20:26 AlexDaniel well yeah, "", '', ‘’, “”, 「」… anything should work
20:27 Xliff m: grammar A { rule TOP { "abcd" (<..>) ? }; }; say A.parse('abcdef');
20:27 camelia rakudo-moar 8efffb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3grammar A { rule TOP { "abcd" (<..7⏏5>) ? }; }; say A.parse('abcdef');␤Unrecognized regex metacharacter . (must be quoted to match…»
20:27 Cabanossi joined #perl6
20:28 Xliff m: grammar A { rule TOP { "abcd" <(..)> ? }; }; say A.parse('abcdef');
20:28 camelia rakudo-moar 8efffb: OUTPUT: «Nil␤»
20:28 Xliff m: grammar A { rule TOP { "abcd" <(..)> ? }; }; say A.parse('abcde');
20:28 camelia rakudo-moar 8efffb: OUTPUT: «Resource temporarily unavailable»
20:28 Xliff Ouch. Didn't like that.
20:29 raschipi Camelia is tired, give her a rest.
20:29 raschipi m: grammar A { rule TOP { "abcd" <(..)> ? }; }; say A.parse('abcde');
20:29 camelia rakudo-moar 8efffb: OUTPUT: «Nil␤»
20:31 TimToady m: grammar A { token TOP { "abcd" ..? }; }; say A.parse('abcdef');
20:31 camelia rakudo-moar 8efffb: OUTPUT: «「abcdef」␤»
20:32 TimToady note the whitespace is signficiant in 'rule'
20:36 kyan joined #perl6
20:48 khw joined #perl6
20:56 ceevusee joined #perl6
21:02 vetmaster m: say 'string\n';
21:02 camelia rakudo-moar 8efffb: OUTPUT: «string\n␤»
21:03 vetmaster m: say "string\n"
21:03 camelia rakudo-moar 8efffb: OUTPUT: «string␤␤»
21:04 raschipi m: say "string␤"
21:04 camelia rakudo-moar 8efffb: OUTPUT: «string␤␤»
21:04 raschipi m: say 'string␤'
21:04 camelia rakudo-moar 8efffb: OUTPUT: «string␤␤»
21:05 vetmaster could you please suggest a solution like [^abcd] in PCRE
21:05 vetmaster ?
21:05 vetmaster <-[abcd]> ?
21:05 jnthn Yes, that
21:07 vetmaster why it does not work?
21:07 vetmaster http://ideone.com/fDQ7iW
21:08 vetmaster maybe there is a mistake on the line 12
21:08 vetmaster but I'm not sure
21:08 ceevusee joined #perl6
21:09 jnthn What if 11 is token, not rule?
21:10 vetmaster is now 'token', but says Nil anyway
21:12 jnthn Oh...I think it's 'cus the leading whitespace before the first element isn't matched anywhere
21:12 jnthn Yah, that's it
21:13 jnthn If TOP is <[\n\t]>* <element>+ it works
21:13 jnthn Or <?> <element>+ to let sigspace to it
21:14 ceevusee joined #perl6
21:18 TimToady ^ <element>+ is shorter :)
21:18 cdg joined #perl6
21:22 ceevusee joined #perl6
21:25 Cabanossi joined #perl6
21:35 geekosaur .u –
21:35 yoleaux U+2013 EN DASH [Pd] (–)
21:37 lucasb m: role {} but role {}
21:37 camelia rakudo-moar 8efffb: OUTPUT: «No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleHOW'. Did you mean 'min'?␤  in block <unit> at <tmp> line 1␤␤»
21:38 lucasb ^^ idk if that makes any sense at all; was just testing
21:38 lucasb RT #131492
21:38 lucasb hmm, no link bot
21:38 jnthn No, it makes no sense at all
21:39 lucasb hehe, thanks :)
21:40 jnthn A "Cannot mix in to a blah" message could be an improvement.
21:40 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/06/05/2017-23-fulfilled-tap/
21:41 mr-foobar joined #perl6
21:43 lichtkind joined #perl6
21:46 Skarsnik joined #perl6
21:50 cyphase joined #perl6
21:52 rindolf hi all
21:52 rindolf sup?
21:54 lichtkind hai
21:55 rindolf lichtkind: meow
21:58 pilne ridolf!
21:58 pilne how are you my ##programming friend? (:
22:01 rindolf pilne: I'm fine - having too many parameters in the equation of benchmarking freecell solver
22:01 * rindolf blames it on the compiler
22:01 rindolf ;-)
22:02 pilne lol, are you rewriting it in perl6?
22:02 rindolf pilne: no
22:04 rindolf pilne: i played with https://github.com/dropbox/lepton earlier - it was kinda slow and the space saving was not dramatic
22:06 pilne the claimed 22% is a bit optimistic you'd say?
22:07 rindolf pilne: no, it was roughly that
22:07 ceevusee joined #perl6
22:07 bbkr_ joined #perl6
22:12 mr-foobar joined #perl6
22:23 pilne not terrible considering jpgs are already pretty compressed
22:40 Cabanossi joined #perl6
22:47 mr-foobar joined #perl6
22:58 BenGoldberg joined #perl6
23:05 tinita we have a problem with running prove and using PERL6LIB
23:05 tinita is PERL6LIB supposed to work like in p5?
23:09 geekosaur sort of? I think it has to use comprepo ids though, not paths
23:11 notbenh_ joined #perl6
23:12 mr-foobar joined #perl6
23:15 tinita hm. we're using prove --exec='perl6 -I...' now as a workaround
23:15 tinita geekosaur: what's a comprepo?
23:16 raschipi joined #perl6
23:17 timotimo comprepo embodies the fact that stuff in perl6 doesn't have to come from files on disk
23:17 timotimo i used to have a gist open that let you use modules directly off of github via http requests
23:18 timotimo like, you'd just use blah:from<github:username/repo> or something like that
23:18 timotimo https://gist.github.com/ugexe/23026e421b6b3a9c697b - what do you know, there it is!
23:18 timotimo actually, that might not be it
23:19 geekosaur sorry, was trying to find docs for it and it sent me to S11 which says nothing about how you specify them in include paths :/
23:20 skids joined #perl6
23:21 timotimo actually the docs say you just put a list of paths into PERL6LIB
23:22 mcmillhj joined #perl6
23:22 geekosaur interesting, I thought it had to be something like inst:/path, inst:., ...
23:22 timotimo https://docs.perl6.org/language/modules#compunit_use - this could well be out of date; the "the future of the ecosystem" part just got made semi-outdated recently
23:23 geekosaur or rather, inst for something in a CUR and various other types for raw paths etc.
23:23 pilne how much will i hate myself if i try to get moarvm running on windows8 and  window10? as well as os-x?
23:23 DesertJellyfish joined #perl6
23:23 pilne without being able to touch said boxes, with only instructions given to someone who is relatively computer savvy.
23:25 raschipi depends on how much booze you have
23:26 pilne said computer savvy person does work at a local microbrewery
23:26 raschipi and if you are a sucker for punishment
23:26 pilne no, i'm far more of a sadist than a masochist
23:26 pilne k, that guts that idea
23:26 timotimo well, you can actually install rakudo star from a .msi
23:27 raschipi why do they need it for?
23:27 pilne i'm still not convinced of the answer i got in programming that c++ would be my best option to make a basic inventory solution that runs on those....
23:27 raschipi Yeah, I was just kidding, there's an easy-to-use installer
23:27 pilne i.... volunteerd to make an inventory system for my girlfriend's employer.
23:27 timotimo don't forget you won't be done after you're done "building" it ;)
23:28 pilne oh, i know, but if it helps her bring less work back home... i'm kinda ok with it.
23:29 raschipi Are you sure doing from scratch is a good isea?
23:29 pilne it's not going to be real-time, it will be running at two locations, and they only need to be "sync'd" once a day.
23:29 pilne no, but it seems to be the only option i could think of off the top of my head that wouldn't involve any initial cost for them
23:30 pilne other than a case of beer
23:30 timotimo if syncing is just a one-way copy, that's fine
23:30 timotimo if you need to take into account changes from two sources .. have fun :)
23:30 raschipi There are open-source options available, get something you just need to customize for their needs.
23:30 pilne i figured i'd have a master copy of the inventory, that both locations would update to at closing time, and in the morning, each would get a fresh copy.
23:31 pilne rasch: ty, i'll google harder (:
23:31 timotimo oh, if each location just changes "its own" data, and there's like an aggregate over both locations, that'll be doable
23:32 raschipi Of course every ERP solution needs a bit of business logic programming, but no need to do it from sscratch
23:32 pilne yeah, there might be a 3rd location in the next year, but that's still only about a 10% chance at this time.
23:33 pilne for someone not on the books, i know a lot about the books, granted, she knows a lot about the morning shift at UPS too for never having been on payroll lol.
23:33 sftp joined #perl6
23:40 Cabanossi joined #perl6
23:41 khw joined #perl6
23:44 idiosyncrat joined #perl6
23:45 raschipi Zoffix: chdir doesn't recognize '-', do you think it should?
23:50 timotimo huh, where do you land when you chdir -?
23:50 idiosyncrat left #perl6
23:50 Skarsnik - is valid file name
23:51 timotimo yeah
23:51 timotimo why would chdir "recognize" -?
23:51 Skarsnik and hello ^^
23:51 timotimo yo snik
23:51 timotimo how have you been?
23:52 Skarsnik fine, doing other stuff, like freaking snes romhacking related stuff :(
23:52 raschipi Try to do it in the shell, the chdir program goes back to the last directory.
23:52 raschipi Not a program, the shell itself does that.
23:52 timotimo why would you frown at snes romhacking?
23:53 timotimo ah. yeah, it's quite unlikely that we'd support that
23:53 Skarsnik well lot of low level and weird stuff
23:54 Skarsnik It's just it can be very time consuming when you are trying to figure the code of some games
23:54 timotimo ah
23:54 timotimo wanna share anything? :)
23:55 Skarsnik and even with most of the dissambly, thing can still be very confusing. Like how Zelda 3 store map data
23:55 timotimo yeah, i can't imagine it'd be easy all the time :)
23:56 Actualeyes joined #perl6
23:56 mcmillhj joined #perl6
23:57 Skarsnik One of the worse thing is the mentality of lot/most romhacker. They hide their work because "People will steal my work"
23:58 Skarsnik But anyway, it's kinda late. time to sleep x)
23:58 timotimo have a good one!
23:58 pilne i read something somewhere a long while ago about hacking ff7's rom... they did some wacky ass shit
23:59 Skarsnik well at least the playstation does not have a CPU with only one accumulator

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

Perl 6 | Reference Documentation | Rakudo