Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-11-19

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:02 redicaps left #perl6
00:03 risou left #perl6
00:10 XaRDaX left #perl6
00:11 c1sung joined #perl6
00:18 M_o_C joined #perl6
00:22 masak 'night, #perl6
00:22 masak left #perl6
00:34 M_o_C left #perl6
00:36 M_o_C joined #perl6
00:37 M_o_C left #perl6
00:45 rgrau_ joined #perl6
00:46 envi left #perl6
00:47 lichtkind joined #perl6
00:47 sorear it's doing something broken with say(1), warning about "bare say"
00:47 lichtkind rakudo: my @a = 1..9; elems @a
00:47 p6eval rakudo :  ( no output )
00:48 lichtkind rakudo: my @a = 1..9; say elems @a
00:48 p6eval rakudo : OUTPUT«9␤»
00:48 lichtkind rakudo: my @a = 1..9; say  @a
00:48 p6eval rakudo : OUTPUT«123456789␤»
00:48 lichtkind rakudo: my @a = 1..9; say +  @a
00:48 p6eval rakudo : OUTPUT«9␤»
00:48 sftp left #perl6
00:51 envi joined #perl6
00:51 lichtkind is there still minmax function?
00:52 lichtkind rakudo: my @a = 1..9; say  @a.min
00:52 p6eval rakudo : OUTPUT«1␤»
00:52 lichtkind rakudo: my @a = 1..9; say  @a.ax
00:52 p6eval rakudo : OUTPUT«Method 'ax' not found for invocant of class 'Array'␤  in main program body at line 22:/tmp/7hdqgDCn3d␤»
00:52 lichtkind rakudo: my @a = 1..9; say  @a.max
00:52 p6eval rakudo : OUTPUT«9␤»
00:53 lichtkind rakudo: my @a = 1..9; say  @a.minmax
00:53 p6eval rakudo : OUTPUT«123456789␤»
00:53 lichtkind rakudo: my @a = 1..9; my ($a,$b) =  @a.minmax; say $a
00:53 p6eval rakudo : OUTPUT«1␤»
00:57 lichtkind rakudo: my @a = 1..9; say scalar  @a
00:57 p6eval rakudo : OUTPUT«Could not find sub &scalar␤  in main program body at line 22:/tmp/duOAQFBAjL␤»
00:58 lichtkind rakudo: my @a = 1..9; say $  @a
00:58 p6eval rakudo : OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$  @a"␤»
00:58 lichtkind rakudo: my @a = 1..9; say $@a
00:58 p6eval rakudo : OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$@a"␤»
00:58 _twitch joined #perl6
01:00 QinGW joined #perl6
01:02 tylercurtis joined #perl6
01:02 icwiener_ joined #perl6
01:03 icwiener left #perl6
01:06 Chillance left #perl6
01:08 lichtkind rakudo: my @a = [2..4],1..9;my @b = @a[0];@b[1]=9; say @a[0;1];
01:08 p6eval rakudo : OUTPUT«1␤»
01:08 lichtkind rakudo: my @a = [2..4],1..9;say @a[0;1];
01:08 p6eval rakudo : OUTPUT«1␤»
01:09 lichtkind rakudo: my @a = [0..4],1..9;say @a[0;1];
01:09 p6eval rakudo : OUTPUT«1␤»
01:09 lichtkind rakudo: my @a = [0..4];say @a[0;1];
01:09 p6eval rakudo : OUTPUT«Any()␤»
01:09 tylercurtis left #perl6
01:09 lichtkind rakudo: my @a = [0..4],2;say @a[0;1];
01:09 p6eval rakudo : OUTPUT«2␤»
01:09 jrockway left #perl6
01:10 lichtkind rakudo: my @a = [0..4],[5..9];say @a[0;1];
01:10 p6eval rakudo : OUTPUT«5 6 7 8 9␤»
01:10 lichtkind rakudo: my @a = [0..4],[5..9];say @a[1];
01:10 p6eval rakudo : OUTPUT«5 6 7 8 9␤»
01:10 lichtkind rakudo: my @a = [0..4],[5..9];say @a[0][1];
01:10 p6eval rakudo : OUTPUT«1␤»
01:11 jrockway joined #perl6
01:11 lichtkind rakudo: my @a = [0..4],[5..9];my @b = @a[0];@b[1] = 11; say @a[0][1];
01:11 p6eval rakudo : OUTPUT«1␤»
01:12 lichtkind rakudo: my @a = [0..4],[5..9];my @b = @a;@b[1] = 11; say @a[1];
01:12 p6eval rakudo : OUTPUT«5 6 7 8 9␤»
01:24 dalek 6model: b930a23 | diakopter++ | / (2 files):
01:24 dalek 6model: [dotnet] port the first 200 lines of Cursor.pir to P6Objects.pm (Regex::Cursor in nqp)
01:24 dalek 6model: add a few supporting operations: string index & split & is_cclass
01:24 dalek 6model: review: https://github.com/jnthn/6model/commit/b​930a23ecb3df4ff5e8bf1e1694ddf705545b6e2
01:24 diakopter a decent-sized commit
01:26 rgrau_ left #perl6
01:46 _twitch left #perl6
01:50 tylercurtis joined #perl6
02:00 impious left #perl6
02:06 whiteknight left #perl6
02:13 tylercurtis left #perl6
02:15 tylercurtis joined #perl6
02:23 masonkramer just learned how MAIN() turns its signature into a command line interface.  That's just great
02:27 tylercurtis left #perl6
02:30 molaf_ joined #perl6
02:31 molaf left #perl6
02:31 tylercurtis joined #perl6
02:34 ch3ck3r joined #perl6
02:38 ch3ck left #perl6
02:50 masonkramer is it possible to alias a role's method to a different symbol?
02:51 masonkramer in the case of a conflicting role
02:53 masonkramer nevermind, I guess declaring in-class and disambiguating that way allows you to compose the two conflicting roles, and after that it's easy to alias
03:00 satyavvd joined #perl6
03:05 ggoebel left #perl6
03:14 lichtkind rakudo: my @a = 1..9; say ~ @a
03:14 p6eval rakudo : OUTPUT«1 2 3 4 5 6 7 8 9␤»
03:14 colomon rosettacode translation of p5 mandelbrot script: https://gist.github.com/706079
03:14 colomon I don't know how to post to rosettacode....
03:16 lichtkind rakudo: my @a = 1..9; say ? @a
03:16 p6eval rakudo : OUTPUT«Bool::True␤»
03:16 lichtkind rakudo: my @a = 0; say ? @a
03:16 p6eval rakudo : OUTPUT«Bool::True␤»
03:16 colomon rakudo: my @a; say ?@a
03:16 p6eval rakudo : OUTPUT«Bool::False␤»
03:18 tylercurtis left #perl6
03:20 tylercurtis joined #perl6
03:20 tylercurtis left #perl6
03:21 lue lichtkind: how's about this motto, based on what you said a while ago:  "Perl 6: the only wall is Larry."
03:22 lichtkind lue: :)
03:22 lichtkind lue: the only wall is larry himself :)
03:23 lichtkind lue: but you motto is far more positive
03:25 lichtkind lue: want to have a look at http://www.perlfoundation.org/perl​6/index.cgi?perl_6_variable_tablet ?
03:28 lichtkind the wiki has to be replaces the syntax is very whacke in some ways
03:34 lue The wiki software is weird to work with, you mean?
03:35 PZt left #perl6
03:40 lichtkind yes i actually replace certain underscores (made by the autoformater before)to spaces to get certain text italic like already marked
03:40 lichtkind thats absurd
03:40 redicaps joined #perl6
03:57 masonkramer rakudo: rule bugfinder { \w+ :: \w+ };
03:57 p6eval rakudo : OUTPUT«===SORRY!===␤:: not yet implemented at line 22, near " \\w+ };"␤»
03:59 masonkramer rakudo: rule { :: }
03:59 lue your bugfinder worked, masonkramer.
03:59 p6eval rakudo : OUTPUT«===SORRY!===␤:: not yet implemented at line 22, near " }"␤»
04:00 masonkramer I love it when things work
04:00 masonkramer std: rule { :: }
04:00 p6eval std a194beb: OUTPUT«ok 00:01 119m␤»
04:00 masonkramer niecza: rule { :: }
04:01 p6eval niecza fe78c53:  ( no output )
04:01 masonkramer niecza: (my rule a { :: }).WHAT
04:01 p6eval niecza fe78c53:  ( no output )
04:02 cdarroch left #perl6
04:07 lue rakudo: say log(3); say 3.log;
04:07 p6eval rakudo : OUTPUT«1.09861228866811␤1.09861228866811␤»
04:07 lue rakudo: say 3.ln; say ln(3);
04:07 p6eval rakudo : OUTPUT«1.09861228866811␤Could not find sub &ln␤  in main program body at line 22:/tmp/Gpuv7MYL_U␤»
04:10 Limbic_Region left #perl6
04:18 masonkramer std: rule colons { :: };
04:18 p6eval std a194beb: OUTPUT«ok 00:01 119m␤»
04:23 masonkramer is there a licensing issue which prevents the book from being shipped as a pdf
04:25 TheHarlot right... and going to go through the various S\d+ now.
04:26 Bzek joined #perl6
04:26 Bzek_ left #perl6
04:31 PerlJam masonkramer: what book?  "Using Perl 6"?
04:38 meppel joined #perl6
04:39 meppl left #perl6
04:41 TheHarlot oh right... I think we are at nearly a level that Howtos can start appearing on Perl 6
04:44 meppel left #perl6
04:45 awwaiid left #perl6
05:09 lue Is there a way to round to a certain number of decimal places in Perl 6? (i.e. round 3.523498934 to 3.5235)
05:11 cookys joined #perl6
05:17 PerlJam lue: $number.fmt('%.4f')
05:18 lue .oO(who doesn't love printf?)
05:18 * lue doesn't.
05:20 lue rakudo: say 3.592.fmt('%.1f')
05:20 p6eval rakudo : OUTPUT«3.6␤»
05:20 lue rakudo: say (3.592, 2.332).fmt('%.1f')
05:20 p6eval rakudo : OUTPUT«3.6 2.3␤»
05:21 lue rakudo: say ( [+] (((2.ln**$_)/($_!)) for 0..$_) for 0..2).join("\n").fmt('%.6f')
05:21 p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
05:22 lue Hm. I'll have to round manually I guess.
05:23 PerlJam rakudo: 3.141592653589.round.say
05:23 p6eval rakudo : OUTPUT«3␤»
05:25 PerlJam rakudo: 3.141592653589.round(0.0001).say
05:25 p6eval rakudo : OUTPUT«3.1416␤»
05:25 _kaare joined #perl6
05:32 lue rakudo: say ( [+] (((2.ln**$_)/($_!)) for 0..$_) for 0..2).round(0.000001).join("\n")
05:32 p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
05:49 sftp joined #perl6
05:52 starcoder left #perl6
05:56 starcoder joined #perl6
06:01 sorear good * #perl6
06:02 Patterner left #perl6
06:04 sorear Why does Perl 6 have so many numeric types?
06:06 * sorear plans to only have Num until someone comes up with a very good reason for complicating it
06:06 sftp_ joined #perl6
06:06 broquaint left #perl6
06:06 sftp left #perl6
06:06 broquaint joined #perl6
06:07 sorear masonkramer: you need a 'say' in p6eval commands
06:07 sorear niecza: say (rule { :: }).WHAT
06:07 p6eval niecza fe78c53: OUTPUT«␤»
06:08 sorear that is odd. :/
06:09 sorear niecza: say ?("ax" ~~ / [ a y | a x ] /)
06:09 p6eval niecza fe78c53: OUTPUT«Bool::True␤»
06:09 sorear niecza: say ?("ax" ~~ / [ a :: y | a :: x ] /)
06:09 p6eval niecza fe78c53: OUTPUT«Bool::False␤»
06:09 sorear :: is working, even if I can't get regexes to print
06:12 sftp_ left #perl6
06:14 sorear Scary error messages: "Useless redeclaration of variable $Any()"
06:15 Psyche^ joined #perl6
06:15 Psyche^ is now known as Patterner
06:16 starcoder left #perl6
06:16 starcoder joined #perl6
06:27 diakopter sorear: heh
06:29 diakopter sorear: loading the setting twice?
06:29 sorear diakopter: $Any(), not Any
06:30 kjeldahl joined #perl6
06:30 sorear that's '$' ~ the stringifcation of an undefined value
06:57 kjeldahl left #perl6
07:05 dalek niecza: 76aaa2c | sorear++ | v6/ (2 files):
07:05 dalek niecza: [v6] fix $x += 1
07:05 dalek niecza: review: https://github.com/sorear/niecza/commit/​76aaa2c50fb00a71d34cf1c3408d208e90656405
07:05 dalek niecza: 9e9fcd1 | sorear++ | v6/tryfile:
07:05 dalek niecza: [v6] fix $foo.=method
07:05 dalek niecza: review: https://github.com/sorear/niecza/commit/​9e9fcd1fce3b5faabe11491c4d08274023297c1d
07:05 dalek niecza: c0d8a49 | sorear++ | v6/tryfile:
07:05 dalek niecza: [v6] fix listops and indirect object syntax
07:05 dalek niecza: review: https://github.com/sorear/niecza/commit/​c0d8a494165986ae78d71d97b6088d85d68ddc15
07:07 plobsing left #perl6
07:09 PZt joined #perl6
07:11 araujo left #perl6
07:31 lichtkind left #perl6
07:42 xinming left #perl6
07:43 xinming joined #perl6
07:51 satyavvd left #perl6
07:51 _kaare left #perl6
07:58 colomon left #perl6
07:59 colomon joined #perl6
08:00 wtw joined #perl6
08:14 baest left #perl6
08:14 baest joined #perl6
08:14 justatheory left #perl6
08:15 antani joined #perl6
08:16 antani left #perl6
08:21 diakopter moritz_: 'morn
08:22 moritz_ oh hai diakopter
08:24 moritz_ what's up?
08:29 diakopter nohmuchk
08:29 diakopter porting pmichaud's .pir to nqp
08:29 diakopter Cursor.pir
08:29 diakopter into P6Objects.pm in 6model
08:30 moritz_ sounds like useful work, but maybe not so much fun
08:30 diakopter actually I'm enjoying it quite nicely
08:31 moritz_ 'o/
08:31 tadzik o/
08:32 diakopter oo I think I just got indirect method invocation working
08:33 * moritz_ wonders if $obj.:=method makes sense... probably not very much
08:33 sorear $obj.:=method, how would that parse?
08:33 sorear hello diakopter, moritz_
08:34 moritz_ sorear: just like $obj.=method, but with binding instead of assignment
08:35 nine left #perl6
08:35 sorear that doesn't parse, currently.  I'
08:35 nine joined #perl6
08:35 sorear m not sure it should - metamacros are a slippery slope
08:36 dalek niecza: 429442c | sorear++ | v6/tryfile:
08:36 dalek niecza: [v6] fix "$foo.method"
08:36 dalek niecza: review: https://github.com/sorear/niecza/commit/​429442ce8757a56c57605e800b9894bc96eafdfb
08:40 _kaare joined #perl6
08:43 moritz_ "Clarification:  I didn't mean to imply that a Rat would be sufficient
08:43 moritz_ for Duration, but rather that it would probably suffice for
08:43 moritz_ dimensioned values to have a RatBag of units, each with a RatBag of
08:43 moritz_ dimensions, rather than NumBags.  SBags might be too restrictive.
08:43 moritz_ "
08:43 * moritz_ regrets having brought the issue to p6l in the first place
08:46 sorear moritz_: I'd like to kill Duration and Instant
08:46 zby_home joined #perl6
08:46 sorear I'd also like to kill Complex, and Int, and Rat, and FatRat doubly so, and all of this "dimensional analysis" and "numeric ladder" nonsense
08:47 sorear Num is the one true CORE:: numeric type
08:47 * moritz_ thinks that Rat is *very* useful
08:47 sorear if somebody wants a Rat, fine, we have excellent overloading support
08:48 moritz_ it lets people write things like  loop (my $x = 0; $x <= 10; $x += 0.1) { ... } without being surprised by FP accuracy limitations
08:48 moritz_ that avoids a lot of FAQs, which is a good thing IMHO.
08:49 kjeldahl joined #perl6
08:50 sorear my intuition is that suppressing the obvious FAQ makes the problem surface later in more confusing contexts
08:50 sorear waterbed theory
08:51 sorear I seem to remember there being some early (for me, so Mar-ish) FP acccuracy discussion here, and I tried to make a trivial demonstration
08:51 sorear and failed, because of Rat
08:51 sorear that's the only time Rat has ever made a success/failure difference in my Perl6ing
08:51 sorear maybe I'm just bitter
08:52 moritz_ sorear: it made a very real difference in one of my applications
08:52 moritz_ sorear: I was creating axis labels in SVG::Plot
08:53 moritz_ and with nums I'd get floating point inaccuracies, and had a label like 1.02E-16 instead of 0
08:53 moritz_ and then Rakudo switcht to Rat literals by default, and my problem went away
08:53 moritz_ I was very glad
08:53 moritz_ I think that'll happen to more people than just me
08:55 sorear ok.
08:55 f00li5h left #perl6
09:01 * sorear wants to fight spec bloat; only features that are actually useful should go in!
09:01 moritz_ +1
09:03 sorear How much would it hurt if out-parameters had to be annotated at call-sites?  e.g. $obj.method(out $foo)
09:03 sorear s/out/rw/
09:04 dalek niecza: 571d549 | sorear++ | v6/tryfile:
09:04 dalek niecza: [v6] fix #OK processing
09:04 dalek niecza: review: https://github.com/sorear/niecza/commit/​571d549d24dd016ab026d2e9c3d01f609e8c490c
09:10 xinming_ joined #perl6
09:13 xinming left #perl6
09:18 f00li5h joined #perl6
09:20 dakkar joined #perl6
09:23 _kaare left #perl6
09:26 daxim joined #perl6
09:29 araujo joined #perl6
09:29 araujo left #perl6
09:29 araujo joined #perl6
09:36 sorear aaaa say(1) is heisenbugging on me
09:37 pnu left #perl6
09:40 _kaare joined #perl6
09:41 pnu joined #perl6
09:45 zby_home left #perl6
09:47 moritz_ sorear: fwiw http://perlgeek.de/images/blog/labels-combined.png left: with rats right: with Num
09:49 sorear thanks
09:49 * moritz_ should blog more often with images generated by p6 :-)
09:56 tadzik hello again
09:56 tadzik moritz_: humans like images :)
09:56 agentzh joined #perl6
10:07 QinGW left #perl6
10:10 am0c^ joined #perl6
10:11 tzhs joined #perl6
10:11 am0c joined #perl6
10:16 nothingmuch joined #perl6
10:21 sorear 71m 30s 76.36%
10:24 tadzik1 joined #perl6
10:25 tadzik1 is there a possibility I've been banned on feather?
10:25 tadzik1 I typo'ed my password thrice, and now I can't connect
10:25 daxim gannonbanned!
10:25 sorear Symptoms?
10:25 sorear a
10:25 tadzik1 just before I decided to copy my ssh key
10:26 moritz_ tadzik: I can log in just fine
10:26 sorear yep, you're banned
10:26 sorear DROP       all  --  samorzad.nat.student.pw.edu.pl  anywhere
10:26 tadzik1 can you fix me?
10:26 sorear sudo iptables -L output
10:26 sorear looks like just fail2ban
10:26 tadzik1 seems so
10:27 tadzik1 or I need to prove I'm the real tadzik? :)
10:28 sorear I'm reading documentation now
10:29 sorear it looks like people are only banned for 10 minutes
10:29 sorear so try again now
10:30 sorear wait, no
10:32 moritz_ a German howto says I should run  iptables -D fail2ban-ssh -s $IP -j DROP
10:32 sorear iptables howto? or fail2ban?
10:32 sorear if the latter, do it
10:33 moritz_ fail2ban
10:33 moritz_ iptables: Bad rule (does a matching rule exist in that chain?).
10:33 sorear I know how to manually administer iptables but I have no clue if I'd break fail2ban by doing so
10:33 moritz_ but the rule is gone
10:33 sorear moritz_: 10 minute timeout
10:33 moritz_ sorear: probably :-)
10:33 moritz_ tadzik: please try again :-)
10:33 sorear from 'sudo fail2ban-client get ssh bantime' --> 600
10:33 tadzik1 yay works
10:33 tadzik1 thank you folks
10:34 sorear and set an authorized_keys
10:34 tadzik1 doing so now
10:34 tadzik1 left #perl6
10:34 tadzik back here :)
10:48 daxim left #perl6
10:52 ggoebel joined #perl6
10:55 redicaps left #perl6
11:00 _xiaomo_ joined #perl6
11:06 nothingmuch left #perl6
11:32 tadzik can one build the new Rakudo with --gen-parrot w/o an internet connection? It always runs git fetch, even if you have a good revision alredy there, doesn't it?
11:33 meppl joined #perl6
11:33 sorear I suspect not
11:33 sorear but --gen-parrot doesn't do much
11:33 sorear just install Parrot manually, it's a totally standard configure-make-make install process
11:34 tadzik yeah, but it tries to download it every time it seems
11:34 moritz_ tadzik: if you have built the parrot of a good revision, it shouldn't try to download
11:34 tadzik Maybe I'd look into it when I get home
11:35 moritz_ whoa
11:35 moritz_ RELEASE_2_10_0-388-gf0aa28e
11:35 moritz_ nearly 400 commits since the release on Tuesday?
11:36 moritz_ hm, maybe the branch merges counted all the commits in the branches too
11:38 sorear bah.
11:38 sorear found the root of the say(1) bug
11:38 sorear niecza: say ("(a)" ~~ / '(' ~ ')' <alpha> /).dump
11:38 p6eval niecza 571d549: OUTPUT«#<match from(0) to(3) text((a)) pos([]) named({})>␤»
11:38 sorear the <alpha> named capture is being lost
11:39 sorear and I suddenly remember I never had a good design for captures in ~ in the first place :/
11:39 * sorear -> sleep on it
11:50 bbkr left #perl6
11:51 masonkramer left #perl6
11:51 masonkramer joined #perl6
12:05 icwiener_ left #perl6
12:19 kanishka joined #perl6
12:20 hax left #perl6
12:23 _xiaomo_ left #perl6
12:23 agentzh left #perl6
12:26 amkrankruleuen joined #perl6
12:29 orafu left #perl6
12:29 orafu joined #perl6
12:30 agentzh joined #perl6
12:33 bluescreen joined #perl6
12:34 bluescreen is now known as Guest52024
12:36 timbunce joined #perl6
12:59 tzhs left #perl6
13:02 Alias_ joined #perl6
13:02 tzhs joined #perl6
13:05 Alias__ left #perl6
13:05 masonkramer left #perl6
13:07 gavv\w left #perl6
13:10 colomon rakudo: say (1...*-1).WHAT
13:10 p6eval rakudo : OUTPUT«List()␤»
13:10 colomon thank the maker
13:11 moritz_ colomon: I think you made it yourself :-)
13:11 colomon we broke the spec, but Rakudo still works, luckily
13:12 colomon currying must be broken for list ops, or something
13:12 moritz_ rakudo: say 1 ... *-1
13:12 p6eval rakudo : OUTPUT«12␤»
13:12 moritz_ that's funny
13:12 moritz_ but it's correct
13:13 moritz_ rakudo: say (1 ... *)[^10]
13:13 p6eval rakudo : OUTPUT«12345678910␤»
13:14 colomon moritz_: when TimToady changed the spec to make 1..*-1 explicitly return a WhateverCode, he didn't carve out an exception for 1...*-1
13:14 moritz_ uhm. The series op never curried.
13:14 colomon but 1...*-1 has to work differently, else 1...*>10 won't work
13:15 colomon the Range op never curried, either
13:15 moritz_ so, what's the problem? that the spec doesn't say that ... doesn't curry?
13:15 colomon moritz_: the spec classes ... with .. in terms of currying
13:16 colomon but ... cannot curry at all.
13:16 moritz_ then the spec is wrong
13:16 moritz_ agreed.
13:17 colomon this probably represent the real reason .. shouldn't be allowed to curry WhateverCode arguments -- we will get FAQs for the rest of eternity why @a[1..*-1] works, but @a[1...*-1] doesn't.
13:18 colomon though I guess @a[1...*] was already problematic
13:18 moritz_ well, one way or another we'll get FAQs
13:19 moritz_ there's no way a sequence can curry within a subscript, but not otherwise, without going completely bananas
13:19 Patterner left #perl6
13:20 moritz_ why isn't section on currying in S03? it's operators that are curried, after all
13:21 colomon I dunno.
13:21 MayDaniel joined #perl6
13:21 Alias_ left #perl6
13:23 _kaare left #perl6
13:23 colomon anyway, I'm changing the autocurrying code to explicitly except ... and ...^, even though it doesn't seem to be called in those cases.
13:24 takadonet morning all
13:24 colomon o/
13:25 colomon and I guess I'll patch the spec, too, though I'm sure TimToady++ can do it better.
13:26 * moritz_ already works on a spec patch
13:26 colomon \o/
13:26 colomon then I won't work on a spec patch
13:26 colomon just code.
13:26 moritz_ what's ... called now? sequence?
13:27 colomon yes
13:27 gavv\w joined #perl6
13:27 colomon rakudo: say 1..*>10
13:27 p6eval rakudo : OUTPUT«Bool::False␤»
13:27 colomon :\
13:28 colomon rakudo: say 1..(*>10)
13:28 p6eval rakudo : OUTPUT«_block124␤»
13:28 colomon I fear we have unleashed chaos...
13:28 moritz_ do we have a ticket for the first case?
13:29 dalek specs: dd9966d | moritz++ | S02-bits.pod:
13:29 dalek specs: [S02] do not autocurry sequence operators at all
13:29 dalek specs: review: https://github.com/perl6/specs/commit/d​d9966d1193b10e8f3bc9f31754dc87517b7fc8f
13:30 colomon moritz_: I don't know.  Is it wrong?
13:30 colomon rakudo: say +(1..*)
13:30 p6eval rakudo : OUTPUT«-9223372036854775808␤»
13:30 colomon ah, so effectively we have a ticket, I think.
13:31 moritz_ I don't see why (1..*)>10 shouldn't autocurry over the whole expression
13:31 MayDaniel left #perl6
13:31 takadonet Since Text-Tabs-Wrap is mostly complete , just need some exporting finished and about 3 tests left to pass, What module she I work on next?  Any suggestions?
13:32 sftp joined #perl6
13:33 lidden joined #perl6
13:35 Psyche^ joined #perl6
13:35 Psyche^ is now known as Patterner
13:35 colomon moritz_: because 1..* doesn't autocurry
13:35 moritz_ oh
13:35 * moritz_ forgot
13:36 moritz_ maybe the numeric value of a code object should really fail()
13:36 colomon I dunno, but it's not relevant here, is it?
13:37 colomon (1..*)>10 should return True
13:37 vxz joined #perl6
13:37 moritz_ right
13:37 * moritz_ hates the parrot vtables
13:38 plainhao joined #perl6
13:45 dual left #perl6
13:47 redicaps joined #perl6
13:51 ggoebel left #perl6
13:59 plainhao left #perl6
14:00 plainhao joined #perl6
14:02 ggoebel joined #perl6
14:05 ggoebel left #perl6
14:05 rokoteko which synopsis was considering fail, Failure objects and $! ?
14:06 moritz_ S04 probably
14:06 masak joined #perl6
14:06 masak oh hai, #perl6!
14:06 Yorick_ joined #perl6
14:06 rokoteko great found it thank, moritz_ !
14:07 moritz_ oh hai masak
14:07 moritz_ masak++ # November release
14:07 * flussence facepalms at my own stupid p5 code
14:08 lichtkind joined #perl6
14:08 flussence I just made one script run in 1 second instead of 20... by passing a single array by reference instead of normally.
14:08 nine left #perl6
14:09 flussence and given that it needs to be run once each for about 10000 DB rows...
14:09 * flussence blames PHP
14:09 shortcircuit colomon: Rosetta Code is much like any other mediawiki (including Wikipedia itself). Step 1) Create an account. Step 2, Find an Edit link where you want to make a change.
14:11 Yorick_ left #perl6
14:15 ggoebel joined #perl6
14:17 ggoebel left #perl6
14:22 wamba joined #perl6
14:22 wamba left #perl6
14:23 wamba joined #perl6
14:23 wamba left #perl6
14:23 wamba joined #perl6
14:24 masak sorear: I'd be very interested in trying out an implementation where only Num remained standing among the numeric types, as you propose.
14:24 masak maybe I'll patch Rakudo locally to get a feel for it. :)
14:26 fhelmberger joined #perl6
14:29 dalek rakudo: 731a832 | colomon++ | src/Perl6/Actions.pm:
14:29 dalek rakudo: Explicitly mark the sequence operators as fully not curried, even though in practice their precedence seems to block currying at the moment anyway.
14:29 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/​731a8323092de13eac7a22ba51c1894f63a8ffa0
14:29 * jnthn wonders when we'll start seeing releases of Masak Perl 6
14:29 jnthn ;)
14:30 masak whatever it'll be like, it'll have no Duration type.
14:30 masak and Darren Duncan will probably hate it. provided he knows about its existence.
14:30 jnthn Heh. :)
14:30 jnthn We might steal that patch for Rakudo... ;)
14:31 jnthn My impression is that Duration so far seems to have caused many headaches, but not solved a huge deal.
14:32 moritz_ currently Duration doesn't have any methods or operations on its own
14:32 moritz_ the current spec implies that we could make it a subtype of Rat
14:33 jnthn Note that subtypes aren't nominal
14:33 jnthn So with no extra constraints, a Rat would happily serve as a Duration and it'd really just be a label.
14:33 moritz_ s/subtype/subclass/
14:33 jnthn Unless there was a where clause enforcing some more.
14:33 jnthn Oh.
14:33 jnthn I thought you meant subset
14:33 fhelmberger left #perl6
14:33 moritz_ basically the specs says that it must ~~ Real
14:33 jnthn Which I guess would be...well...useless. :)
14:34 lichtkind is it true that p6 has no builtins?
14:34 moritz_ lichtkind: no
14:34 lichtkind but i thought its all objects
14:34 jnthn It's all lambdas too :)
14:34 jnthn ;)
14:35 moritz_ it's just that built-in subs aren't special in any way
14:35 moritz_ so you can lexically override them, or add multis, or do whatever you can do with user defined subs too
14:35 flussence I think Duration/Instant should just be dropped, and let units of measurement be something for someone else to implement.
14:35 lichtkind they dont have own namespace
14:35 lichtkind thats what i meant
14:36 lichtkind THANK YOU both
14:36 wtw left #perl6
14:36 moritz_ flussence: +1
14:36 moritz_ lichtkind: note that in Perl 6, nearly all subroutines don't live in namespaces, but in lexical scopes
14:36 jnthn flussence: +1
14:37 moritz_ lichtkind: and built-in subs notionally live in an outer scope of the user program
14:37 anned joined #perl6
14:39 lichtkind yes i mean own names space in the sense that $Package::a is not the same as Package::a()
14:39 * flussence considers implementing the metric system in p6
14:39 lichtkind i try to phrase it more precise
14:40 Axius joined #perl6
14:40 mkramer1 Don't drop Durations because obnoxious posters on p6l have obnoxious bikeshedding ideas
14:40 moritz_ mkramer1: that's not the real reason
14:41 moritz_ mkramer1: the reason is that during the non-bikesheddy parts of the discussion we discovered that Duration doesn't have any behaviour that Rat doesn't have
14:41 anned left #perl6
14:42 anned joined #perl6
14:42 colomon except for being a distinct type
14:42 mkramer1 rakudo: say (now - now).WHAT;  say (1-1).WHAT;
14:43 p6eval rakudo : OUTPUT«Duration()␤Int()␤»
14:43 mkramer1 different behavior
14:43 mkramer1 that is useful
14:43 lichtkind left #perl6
14:43 colomon but I have to say, while walking this morning, I came to the conclusion that it's probably not worth the hassle to have in the spec at this point.
14:43 mkramer1 There is no way to get that behavior if it's not specced
14:43 colomon (Duration, that is.)
14:43 redicaps left #perl6
14:43 mkramer1 you can't "write a module" to replace the behavior defined on a built-in type (Instant)
14:44 moritz_ mkramer1: just like there's no way to distinguish 0 meters and 0 kg
14:44 moritz_ if you just store a number
14:44 mkramer1 time is special
14:44 moritz_ is it? how so?
14:44 mkramer1 It comes up in all computing
14:44 mkramer1 kg and meters do not
14:44 agentzh left #perl6
14:45 moritz_ depends what you compute
14:45 moritz_ most of my scripts don't deal with times at all
14:45 colomon mkramer1: I beg to differ.  Certainly my work has meters, never ever duration.
14:45 colomon $work, I mean.
14:45 colomon time, yes, but never duration
14:45 mkramer1 Do you time your scripts? benchmark them? log timestamps?
14:45 moritz_ mkramer1: if I do, I usually do it with the 'time' built-in
14:45 moritz_ shell built-in, that is
14:46 moritz_ but often my scripts just convert text files
14:46 lichtkind joined #perl6
14:46 takadonet is it me or rakudo takes a lot longer to compile?
14:46 kjeldahl left #perl6
14:46 mkramer1 anyway, I don't like the premise of your argument
14:46 colomon certainly do not need a Duration type to deal with benchmarks
14:46 mkramer1 "It's not useful to me, therefore let's cut it"
14:46 moritz_ mkramer1: that's not at all what I said
14:46 mkramer1 "Darren Duncan is annoying, let's cut it"
14:46 flussence if it's worth doing, it's worth doing properly.
14:47 moritz_ I said it offers only very little value over using a number directly
14:47 mkramer1 you're probably right
14:47 lichtkind left #perl6
14:48 colomon to be precise, the major purpose of Duration, as defined, is to keep you from doing things with it that you could do with a "real" number.
14:49 moritz_ colomon: actually that part is now gone from the spec
14:49 moritz_ TimToady++ for it
14:50 colomon what exactly does the spec say now?
14:50 moritz_ In numeric context a C<Duration> happily returns a C<Rat> or C<FatRat>
14:50 moritz_ representing the number of seconds.
14:51 moritz_ Numeric operations on durations return C<Duration> where that makes
14:51 moritz_ sense (addition, subtraction, modulus).  The type returned for other
14:51 moritz_ numeric operations is unspecified;
14:51 moritz_ they may return normal numeric
14:51 moritz_ types or they may return other dimensional types that attempt to
14:51 moritz_ assist in dimensional analysis.
14:51 flussence .oO( Measurement.new(files => "100K", seconds => $t2 - $t1).rate.say )
14:51 colomon then I stand by my statement.
14:52 anned left #perl6
14:53 colomon yes, you can say Duration * Duration now, and what it does is return a non-Duration numeric type, right?
14:53 moritz_ currently it dies
14:53 moritz_ but Duration ** Real returns a non-Duration number
14:54 colomon there you go.  that's a real meaning to the Duration type.
14:54 moritz_ rakudo: say (1/2).Capture
14:54 mkramer1 his point, and I agree, is that you should be able to Duration * Duration
14:54 p6eval rakudo : OUTPUT«Capture()<0xb5651a0>␤»
14:54 moritz_ rakudo: say (1/2).Capture.perl
14:54 p6eval rakudo : OUTPUT«\("numerator" => 1, "denominator" => 2)␤»
14:55 mkramer1 the spec now allows that
14:55 mkramer1 so it's fine
14:55 mkramer1 the spec isn't getting in the way and you get extra behavior at no cost
14:55 colomon my point being that you do gain the information that the resulting number in these operations is not a Duration.
14:55 moritz_ sub f(*%x) { say %x.perl }; f(|(1/2).Capture)
14:55 moritz_ rakudo: sub f(*%x) { say %x.perl }; f(|(1/2).Capture)
14:55 p6eval rakudo : OUTPUT«{"numerator" => 1, "denominator" => 2}␤»
14:56 colomon that's a reason for Duration.  but I'm inclined to think it's not a good enough reason for Duration.
14:57 mkramer1 When so many people that I respect share an opinion, I'm tempted to take that opinion
14:58 Guest52024 left #perl6
14:59 Guest52024 joined #perl6
15:00 moritz_ ugh. Subtyping a numeric type sucks.
15:00 moritz_ s/Subtyping/Inheriting from/
15:00 colomon moritz_: are you trying that somewhere?  what are the issues?
15:01 tzhs left #perl6
15:01 moritz_ colomon: I tried it locally
15:01 moritz_ class Duration is Rat { # a few constructors here }
15:01 jnthn rakudo: class Foo is Num { }; say Foo
15:01 p6eval rakudo : OUTPUT«Foo()␤»
15:01 moritz_ how do I implement prefix:<->(Duration $x) ?
15:01 jnthn rakudo: class Foo is Num { }; say Foo.new
15:01 p6eval rakudo : OUTPUT«0␤»
15:02 moritz_ jnthn: first problem: how do I build a Foo with value 3.0e0 ?
15:02 jnthn rakudo: class Foo is Num { }; say Foo.new(3.0e0); # curious
15:02 p6eval rakudo : OUTPUT«flattened parameters must be a hash or array␤  in main program body at line 22:/tmp/AClSQyBc55␤»
15:02 jnthn meh
15:02 moritz_ second problem: how do I dispatch Foo + Foo to Num + Num?
15:03 moritz_ do I have to create two Nums, add them, and create a new Foo?
15:03 moritz_ even those Foo is Num?
15:03 moritz_ that seems So Wrong
15:04 jnthn moritz_: The answer is that you want to box a native num into a Foo
15:04 colomon mkramer1: perhaps the biggest thing weighing against Duration as a type in my head is that it's really only a fraction of the correct solution.  If you're really serious about that sort of thing, you're going to want to have (say) meters per second, seconds squared, etc. too.  And having just a Duration class doesn't get you any closer to that.
15:04 jnthn moritz_: 6model has a box primitive that's just for that
15:04 jnthn (Falls quite neatly out of repr poly)
15:04 jnthn moritz_: But it's a nuisance-ish at the moment
15:04 moritz_ jnthn: hm.
15:04 colomon moritz_: right, I forgot about that.  Yes, it's a nightmare.
15:05 moritz_ jnthn: but if Num can already do the boxing/unboxing for me, why do I ahve to redo it in the subclass?
15:05 jnthn That's not what I said.
15:05 moritz_ oh
15:06 jnthn When you write 3.0e0 the compiler is generating code to box that into a Num object
15:06 dual joined #perl6
15:06 jnthn It's not that you need to do antyhing *in* the subclass
15:06 jnthn You need to get a native value boxed to the subclass
15:15 masak std: class Foo { our Int method foo() {} }
15:15 p6eval std a194beb: OUTPUT«ok 00:01 120m␤»
15:15 masak rakudo: class Foo { our Int method foo() {} }
15:15 p6eval rakudo :  ( no output )
15:15 jnthn rakudo: class Foo { our Int method foo() {} }; say "lived"
15:15 p6eval rakudo : OUTPUT«lived␤»
15:15 ggoebel joined #perl6
15:15 jnthn phew
15:15 jnthn :)
15:16 masak jnthn: what happens if there's a return type both after 'our' and after '-->' in the siggie?
15:16 jnthn masak: Suspect a compile time error.
15:16 jnthn masak: We don't really do return type checks yet though
15:16 jnthn masak: So I suspect the compiler mostly just drops 'em.
15:18 masak nod.
15:19 masak that's the feeling I get when using them :)
15:19 masak trying to compensate with tests and rigour.
15:21 jnthn rakudo: sub foo returns Int { }; say &foo.returns
15:21 p6eval rakudo : OUTPUT«Int()␤»
15:21 jnthn ah, ok
15:21 jnthn It gets as far as stashing 'em away.
15:23 flussence Is there any way to figure out type constraints from a class's ^attributes?
15:23 jnthn .type on the meta-attr
15:24 moritz_ rakudo: class A { has Int $!x; }; say ~ A.^attributes(:local)[0].^methods(:local)
15:24 p6eval rakudo : OUTPUT«Method 'methods' not found for invocant of class ''␤  in main program body at line 22:/tmp/Fjd_G7JGdJ␤»
15:24 flussence yeah, I tried ^methods before... :(
15:24 moritz_ rakudo: class A { has Int $!x; }; say ~ A.^attributes(:local)[0].type
15:24 flussence .type is what I wanted though :)
15:24 p6eval rakudo : OUTPUT«Int()␤»
15:25 * masak looks forward to the day when it's possible to tread bravely on the turtles, all the way down
15:29 florz left #perl6
15:29 florz joined #perl6
15:33 Axius_ joined #perl6
15:35 Axius left #perl6
15:53 Axius_ left #perl6
16:00 jfried left #perl6
16:00 Axius joined #perl6
16:00 jnthn masak: Wish I had an nqpnet evalbot in here to show you. :P
16:01 masak jnthn: me too. let's make one.
16:01 jnthn +1
16:01 jnthn But now it's time for me to decommute :) \o/
16:01 masak :)
16:07 tylerni7 left #perl6
16:08 Axius left #perl6
16:08 tylerni7 joined #perl6
16:10 alester left #perl6
16:11 MayDaniel joined #perl6
16:11 Trashlord joined #perl6
16:11 Axius joined #perl6
16:15 ggoebel left #perl6
16:16 ggoebel joined #perl6
16:17 alester joined #perl6
16:19 Axius left #perl6
16:23 risou joined #perl6
16:23 kanishka left #perl6
16:25 kjeldahl joined #perl6
16:26 am0c left #perl6
16:29 spq1 joined #perl6
16:29 dconway joined #perl6
16:30 dconway left #perl6
16:33 * PerlJam does a double-take
16:33 PerlJam That couldn't have been The Damian.  He doesn't IRC for sanity's sake.
16:33 masak perhaps we'll never know.
16:34 lowrr joined #perl6
16:34 lowrr left #perl6
16:34 masak maybe it's a QM thing. he can chat for sufficiently small periods, on the order of fractions of a minute. :P
16:34 PZt left #perl6
16:47 colomon dconway's info claims he's damian conway...
16:48 TiMBuS left #perl6
16:49 takadonet well he was here for only 8 sec...
16:49 colomon and wait, was that his sanity or ours?  ;)
16:49 PerlJam perhaps a little of both
16:50 masak or... for the sanity of the fabric of reality...?
16:50 Trashlord hey guys
16:51 masak Trashlord! \o/
16:51 Trashlord :)
16:51 mila__ joined #perl6
16:54 justatheory joined #perl6
16:55 mila_ left #perl6
16:55 Trashlord mila is a beautiful name
16:56 Trashlord it means "dear" in russian
16:56 PerlJam what does jovovich mean then?  :)
16:56 PerlJam or cunis?
16:57 * PerlJam quickly exhausts his known milas
16:57 Trashlord it's kunis
16:57 Trashlord and I don't know about those
16:58 Trashlord I just saw a list of names on wikipedia
16:58 Trashlord "mil" means dear
16:58 masak I'm more used to the masculine "mily". my grandma used to say that a lot when we were talking in Russian.
16:58 Trashlord so, for girls, it's mila
16:59 wamba left #perl6
16:59 masak "милы", I guess. always feels wrong to transcribe Slavic.
17:02 masak argh! now it happened again! I wish I understood why git does this.
17:03 masak I did "git status". it didn't say my branch was ahead of origin/master.
17:03 masak then I pulled -- git pull origin master -- and it seems to have sucked in 1 commit.
17:03 masak next time I did 'dit status', it said "Your branch is ahead of 'origin/master' by 1 commit."
17:04 masak how can it suddenly be ahead of origin/master if all I did was update *to* origin/master?
17:06 hercynium joined #perl6
17:06 PZt joined #perl6
17:13 sorear good * #perl6
17:14 sorear masak: the git pull did a merge, and the "1 commit" is the merge
17:14 moritz_ masak: "your branch is ahead" means you have a local commit. When you pull, zou still have a local comit
17:14 sorear masak: git log master...origin/master to see the 1 commit
17:15 masak sorear: I see no merge in the git log. it sais "Fast-forward".
17:15 masak sorear: when I do that, it comes out empty.
17:15 masak moritz_: I have no local commit.
17:15 sorear masak: did you use all three dots?
17:15 masak oops, no.
17:16 masak now colomon's commit falls out.
17:16 masak the one that arrived with the 'git pull origin master'.
17:25 colomon wait, what?
17:26 colomon (just saw my name)
17:30 masak colomon: just having trouble understanding git, is all.
17:31 masak I remember running into this issue before, and not getting any insight then either.
17:31 masak anyone here speak Japanese? is this gentletwitterer asking about a HTML parser for Perl 6? http://twitter.com/VienosNo​tes/status/5672328935510016
17:32 TimToady "I wonder if there's a Perl 6 HTML parser"
17:36 mssm joined #perl6
17:38 masak there are plenty of half-baked Perl 6 XML parsers out there.
17:38 masak maybe blizkost is the best shot for parsing HTML in Perl 6 today.
17:39 sorear masak: listening to moritz++ talking from real world experience, it's pretty clear niecza needs at least Num + Rat
17:40 sorear and once I've committed to more than one type of CORE:: numeric thing, supporting Int doesn't seem like a stretch
17:41 masak nod.
17:41 masak I must confess to never having had a pressing need for Complex.
17:41 masak perhaps it sits just at the edge of the set of useful core numeric types.
17:42 masak I definitely wouldn't want Quaternion, for example.
17:42 colomon I think the thing about Complex is you probably don't need it, but if you do, it's nice to have it in the core.
17:42 sorear the current typology of numbers is wrong, though, I think
17:42 sorear it feels horribly inconsistant
17:43 sorear we have Int, Num, and Rat
17:43 sorear but Int isn't int; it's int | bigint
17:43 sorear it would be better if we consistanly discriminated (Fix, Int, Num, Rat)
17:44 sorear or consistantly didn't (Num, and maybe have some low-level .nrepr method)
17:46 sorear vargaz++ mono++ I file a bug that mono --aot Program.exe doesn't actually do anything, and less than 24 hours later it gets closed with a commit
17:46 sorear now installing the latest mono 2.9 - this should shave nearly a second off tryfile.exe load time
17:46 TimToady native types are not derived types; they're subset types
17:46 solarion joined #perl6
17:46 sorear I did not mean to suggest that they were.
17:47 TimToady you used the word "isn't"  :)
17:47 Trashlord yes you did
17:48 sorear I imagine class Int { has int $!value }
17:48 TimToady though now that I look at it, you could not have been implying inheritance anyway...
17:48 sorear except, no, it's has int | bigint $!value
17:48 sorear I don't think we have a good word for boxes-a
17:48 TimToady you're wearing the wrong hat
17:48 TimToady Int is an abstraction from the user's viewpoint
17:48 * sorear takes it off and looks at it blankly
17:49 TimToady Int is any integer they care to name
17:49 TimToady whereas int32 is a convenient interface to that portion of the world that only knows how to store 32 bits
17:50 TimToady it's also likely to be faster than Int in some cases, unless boxing overhead gets too high
17:52 TimToady it's much like the grapheme abstraction; we're trying to let the user not think about implementation most of the time
17:52 TimToady but give the user the chance to do lower-level things in hot code
17:53 TimToady boxing/unboxing is the spot where we have to bridge between how the user wants to think and how the CPU wants to think
17:56 dakkar left #perl6
17:56 sorear *lightbulb* subset Int of Num where { * % 1 == 0 }
17:56 sorear this solves the my Int $foo = 5.0 problem
17:56 TimToady this disconnect is much smaller for Num vs num, I'll grant you, since most people are trained to have a category "floating point" in their head
17:56 diakopter TimToady: but.. what if it's *all* "hot code"? :P
17:56 TimToady diakopter: oh, you mean like in an interpreter?  :)
17:57 diakopter rightyo
17:57 TimToady where the user can put anything into their hot loop
17:57 * sorear now thinks of all numeric types as being subsets of Num(eric)
17:57 TimToady yes, well, that will certainly cause you to go insane in a P5ish sense :)
17:58 sorear the worst is when I run a profiler and no sub is using more than 2% of the time so I have to improve everything
17:59 Trashlord left #perl6
17:59 TimToady I would like to believe that such a result merely means the profiler doesn't know how to slice the problem space right to show you what to improve
18:00 TimToady but that's only partially true
18:03 mssm left #perl6
18:06 TimToady instead of thinking of Int as int | bigint, I would prefer to think of Int as a bigint that can come very close to the performance of int for "typical" integers that would normally fit into a single native integer representation of some size or other
18:07 TimToady if that turns into a union internally, that's an implementation detail
18:09 lichtkind joined #perl6
18:09 TimToady different computer languages have different ways of forcing programmers to think like machines; in Perl 6 we're trying to get away with letting the user not think like a machine by default, but with performance escapes
18:10 cdarroch joined #perl6
18:10 cdarroch left #perl6
18:10 cdarroch joined #perl6
18:11 icwiener joined #perl6
18:12 mavrc joined #perl6
18:12 TimToady that approach will, of necessity, stress our optimization skills
18:13 masak and our implementors.
18:13 slavik1 TimToady: I can think in Perl :P
18:13 masak but yes, that's the path that Perl has set down on.
18:13 TimToady also, we have not yet explored the space of pragmatic sublanguages that assume things standard Perl doesn't
18:14 slavik1 and with grammars and junctions, I am starting to think in Perl6
18:14 slavik1 and am upset that there is no complete Perl6 implementation
18:14 TimToady as are we all :)
18:15 slavik1 I especially miss the zip operator ...
18:15 TimToady eh?  we have that
18:15 slavik1 not in Perl5
18:15 TimToady ah, you didn't say that part
18:15 moritz_ List::MoreUtils has a zip function iirc
18:16 slavik1 TimToady: not part of standard Perl5 :P
18:16 slavik1 TimToady: I will invent a time machine, and go back to before 5.8 was released and kick you for not inventing the zip operator :P
18:17 hercynium slavik1: perhaps it could be done with Devel::Declare :)
18:18 PerlJam slavik1: CPAN is part of "standard Perl 5" as far as I'm concerned.
18:21 TimToady when you said "no complete Perl6 implementation" I assumed you were talking about incomplete implementations, not Perl 5
18:25 lichtkind rakudo: my %dev = a => 1, b => 2; my @a = %b; say + @a;
18:25 p6eval rakudo : OUTPUT«===SORRY!===␤Symbol '%b' not predeclared in <anonymous> (/tmp/0SAyVltEWF:22)␤»
18:25 lichtkind rakudo: my %dev = a => 1, b => 2; my @a = %dev; say + @a;
18:25 p6eval rakudo : OUTPUT«2␤»
18:25 lichtkind rakudo: my %dev = a p5=> 1, b p5=> 2; my @a = %dev; say + @a;
18:25 p6eval rakudo : OUTPUT«Could not find sub &b␤  in main program body at line 22:/tmp/71iYL0z8sl␤»
18:26 lichtkind i think the right answer is 4
18:26 lichtkind rakudo: my %dev = (a p5=> 1, b p5=> 2); my @a = %dev; say + @a;
18:26 p6eval rakudo : OUTPUT«Could not find sub &b␤  in main program body at line 22:/tmp/uJOLwebgZo␤»
18:27 lichtkind jnthn: does rakudo know of p5=> ?
18:28 sorear p5=> doesn't exist
18:29 lichtkind sorear: anymore?
18:29 sorear lichtkind: see specs commit 5ace2bd3
18:33 sorear I am thinking of
18:34 sorear class NumBase { has polynum $!value }; subset Int of NumBase where ...; subset Num of NumBase where ...; subset Rat of NumBase where ...
18:34 sorear thoughts?
18:34 sorear (polynum may or may not have distinct values for #e1 and #i1
18:34 sorear )
18:37 jnthn (pragmatic sublangauges taht assume things...) NQP is just that. :)
18:38 lichtkind sorear: you know hwy there were removed?
18:38 sorear Parse error
18:39 molaf_ left #perl6
18:39 lichtkind oh shit
18:39 TimToady lichtkind: since p5=> was only for the use of a p5-to-p6 translator, such a translator can always add a definition if it wants to
18:39 lichtkind sorear: you know why there were removed?
18:40 masak lichtkind: what TimToady said.
18:40 lichtkind TimToady: thanks im actually glad it was removed it was one of the more quirky things ive seen
18:40 sorear s/there were/that was/ ?
18:41 lichtkind sorear: these type of kommas, I came from outside some min ago my brain still is thawing
18:42 lichtkind and bad news is i will stay here for longer now :)
18:42 lichtkind just pulled the specs git
18:42 lichtkind still bit new to this but willing to learn
18:43 imax_ joined #perl6
18:46 timbunce left #perl6
18:48 ggoebel left #perl6
18:52 lidden left #perl6
18:53 timbunce joined #perl6
18:53 ulla joined #perl6
18:55 ggoebel joined #perl6
18:55 sorear What's the Perl 6 equivalent of "${var}_append"?
18:55 PerlJam sorear: "{$var}_append"
18:56 moritz_ $var ~ "_append"
18:57 tadzik good evening
18:57 masak "$var[0]_append" :)
18:57 newbie joined #perl6
18:58 PerlJam ($var,"_append").join
18:59 masak [~] $var, "_append"
18:59 sorear WOAH
18:59 diakopter ?
18:59 sorear time mono tryfile.exe -e '2 + 2' --> 0.680 s
18:59 sorear from 2.2s
18:59 diakopter how?
18:59 sorear vargaz++'s bugfix
19:00 TimToady \o/
19:00 sorear I was expecting about a half second improvement
19:00 colomon nice
19:00 diakopter sorear: how big are the .so
19:01 diakopter collectively
19:01 diakopter I think one option is to statically link them, even
19:01 lichtkind excuse me but who is in charge of the chatbots hereß
19:01 sorear 9.59 MB
19:01 diakopter I don't know who's in control of the 'lichtkind' bot ;)
19:02 moritz_ lichtkind: which bot?
19:03 masak sorear: nice!
19:03 masak nom &
19:03 masak left #perl6
19:05 lichtkind moritz_: i just want a new bot function
19:07 lichtkind moritz_: just put a msg here if the wiki changes
19:07 diakopter ah
19:10 newbie left #perl6
19:10 imax_ left #perl6
19:13 lichtkind since the wiki has an rss feed it should be simple lie adding one url to watch
19:13 lichtkind thatswhy i ask who is in charge of these bots
19:15 sorear lichtkind: every bot has a different admin
19:15 sorear pick a bot and I'll tell you who runs it
19:16 lichtkind i just need the functionality, so maybe best a present admin
19:16 sorear If you don't want to pick an existing bot, you'll need to start a new one
19:17 flussence say I was crazy and wanted to make "'15m/s'.SI" DWIM ...how could I define that .SI method for strings?
19:17 lichtkind i just meant i take one bot of which the admin is currently present
19:18 sorear flussence: augment class Str { method SI() { ... } }
19:18 sorear lichtkind: what do you mean by "the wiki"
19:18 lichtkind http://www.perlfoundation.org/perl6
19:23 lichtkind sorear: you are an admin?
19:23 sorear I am an admin of many things
19:24 sorear But not the TPF wiki
19:24 envi left #perl6
19:25 lichtkind sorear: yes i would know that, i mean admin of a chatbot
19:26 diakopter sorear: lichtkind is wanting http://www.perlfoundation.org/feed/wor​kspace/perl6?category=Recent%20Changes monitored by dalek
19:26 lichtkind yes
19:26 diakopter rss2
19:26 diakopter I wrote a botnix plugin for it at one time
19:26 diakopter it got disabled/deleted somewhere along the way
19:28 sorear lichtkind: what part of "there is more than one chatbot here" don't you get
19:28 sorear diakopter: thanks
19:32 lichtkind diakopter: how much effort it would  be to add this to dalek?
19:32 diakopter not much effort from me :) I think sorear enjoys that kind of pain, so he's volunteering to do it
19:35 lichtkind it would be a great help, especially i now write a lot in the wiki
19:36 diakopter yep; iirc you're the reason I wrote it before
19:41 dalek dalek-poller: ad9fd17 | sorear++ | common.pm:
19:41 dalek dalek-poller: Make timeouts overridable per plugin
19:41 dalek dalek-poller: review: https://github.com/sorear/dalek-poller/comm​it/ad9fd17a98bdae23536c5f3b04634495a7b55708
19:41 dalek dalek-poller: 450c516 | sorear++ | modules/local/tpfwikilog.pm:
19:41 dalek dalek-poller: Change tpfwikilog to perl6 / #perl6 and use new API
19:41 dalek dalek-poller: review: https://github.com/sorear/dalek-poller/comm​it/450c516a18f8061c812f49ca75bda6c1bf5b9e0c
19:42 lichtkind sorear: that was all?
19:42 sorear yes
19:43 sorear and I've restarted the running instance of dallek-poler
19:43 sorear tpf perl6 wiki updates should be reported here now
19:43 sorear want to test?
19:43 lichtkind yes thank you very much
19:47 dalek tpfwiki: Herbert Breunung | Perl 6 Index Tablet
19:47 dalek tpfwiki: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_index_tablet
19:49 lichtkind it work \o/
19:50 lichtkind dalek doesnt know my real name but i dont need so much ++
19:53 dalek tpfwiki: Herbert Breunung | Perl 6 Index Tablet
19:53 dalek tpfwiki: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_index_tablet
19:56 plobsing joined #perl6
19:56 lichtkind sorear++
19:58 dalek tpfwiki: Herbert Breunung | Perl 6 Delta Tablet
19:58 dalek tpfwiki: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_delta_tablet
20:00 TimToady without a subject line, that's kinda noisy
20:00 diakopter true. I wanted to reduce the poll interval and do de-duping at one point
20:02 lichtkind TimToady: yes but there are no subjects in socialtext
20:03 lichtkind id wish there were some like mediawiki
20:03 TimToady with other dalek messages, one can figure out whether one is interested without clicking on every entry
20:03 sorear I can hook it up to the karma converter at some point
20:04 lichtkind maybe extract a diff from the wiki to display a line of conent?
20:04 diakopter since the feed is actually so verbose, with some WWW::Mechanize or even less magic lwp, one can grab the number of changed lines or something.
20:04 TimToady a diff line would be better than nothing
20:04 diakopter or yeah, some magic text summary
20:04 lichtkind and maybe even make 1 line out of that 2 now
20:05 TimToady the name of the enclosing section might also be helpful
20:05 lichtkind just the first but linked like the second
20:05 lichtkind sections are lines starting with ^
20:07 TimToady just trying to keep the signal/noise ration high here...
20:07 TimToady with only the info above, most people will not click the link
20:08 TimToady which makes it noise for them
20:08 lichtkind yes
20:08 flussence while on that subject, the git commit messages could probably fit into two lines too...
20:09 flussence I'm pretty sure github will accept the abbreviated commit ID as well as the full sha1
20:14 TimToady I don't mind multiple lines if they're informative
20:15 muixirt joined #perl6
20:15 TimToady and they're easy for me to skip as a chunk since I hilight dalek messages in blue
20:16 TimToady and I usually write the git checkin message knowing it'll show up here
20:16 TimToady s/checkin/commit/
20:17 PerlJam one of these days I'll need to write a script for irssi that redirect bot messages to another window.
20:17 muixirt erm, 'perl6 -v' segfaults
20:18 PerlJam muixirt: not for me.
20:18 TimToady what version of perl6 are you running...oh wait...
20:18 muixirt HEAD (just pulled)
20:20 muixirt the good news is: it's a little bit faster
20:20 PerlJam segfaults are always fast
20:20 muixirt PerlJam: lol
20:20 TimToady not if caused by unchecked malloc :)
20:20 wamba joined #perl6
20:22 muixirt PerlJam: I meant Rakudo Perl 6 is slightly faster
20:24 tadzik http://gil.di.uminho.pt/use​rs/smash/rakudo-bench.html sometimes
20:24 tadzik I was excited by the gc_ms2_faster_list merge in Parrot, but sadly I don't see any speedup (using time)
20:25 tadzik ...wait, my `which parrot` says /usr/bin/parrot
20:25 PerlJam tadzik: I didn't do any rigid timings, but it seems subjectively faster to me and that's all that matters :)
20:25 tadzik PerlJam: looks like I messed my installation up while installing Parrot not from --gen-parrot
20:26 muixirt tadzik: is that link supposed to work?
20:26 tadzik . o O ( --gen-parrot-exciting -- pulls the lastest Parrot available, not the one in PARROT_REVISION )
20:26 tadzik muixirt: worksforme
20:27 muixirt reload worked
20:28 * tadzik feels like implementing --gen-parrot-exciting
20:28 Chillance joined #perl6
20:32 dju left #perl6
20:42 wamba left #perl6
20:44 * takadonet waits on tadzik results....
20:44 plainhao left #perl6
20:45 wamba joined #perl6
20:47 masak joined #perl6
20:47 masak ahoy! \o/
20:48 takadonet masak: yo
20:48 jnthn o/ masak
20:49 tadzik hi masak
20:49 masak auto-fed, happy that it's weekend, 800% slower Justin Bieber in headphones. time to start hacking :)
20:50 jnthn auto-fed?
20:50 colomon 800% slower Justin Bieber?!
20:50 masak :)
20:50 masak jnthn: I ate food that I had cooked myself.
20:50 masak colomon: http://soundcloud.com/shamant​is/j-biebz-u-smile-800-slower
20:51 colomon but... why?
20:51 masak I didn't know who Justin Bieber was before that. frankly after finding out, I'm not too impressed. but this slowed-down song... wow!
20:51 masak it's like angel song.
20:51 colomon I hear.
20:52 tadzik I wonder if I should listen to the original
20:52 jnthn NO NO NO NO NO
20:52 masak once can't hurt. it's quite different.
20:53 masak even knowing that they're the same song at different speeds, it's hard to tell. :)
20:54 tadzik takadonet: wanna help?
20:55 takadonet tadzik: about to leave work :(
20:55 tadzik ah, alright
20:56 tadzik so, anyone willing to help with implementing --gen-parrot-exciting? :)
20:56 lichtkind sorear: did you change anything on the bots or can I help?
20:57 tadzik http://wklej.org/id/422227/ is what I mangled so far, for some reason #42 is checking out Rakudo's master rather than Parrot's master
21:00 masak hah! the annoying "Your branch is ahead of 'origin/master' by 1 commit." went away after I did 'git fetch origin master' and 'git push origin master' (either of which did nothing). I can't tall which one it was that helped, but I'll know next time ;)
21:01 masak tadzik: git looks upwards until it finds a .git/ directory.
21:01 masak tadzik: if it checks out Rakudo, it must mean you're in the Rakudo repo, but not in the Parrot repo.
21:01 TheHarlot oh... dear... sweet... merciless... Eris.
21:01 masak TheHarlot: Justin Beebz? :_
21:01 TheHarlot Justin Bieber... I will kill...
21:02 masak :)
21:02 tadzik masak: but it usually works just fine, when it checks out $req
21:02 tadzik ($rev?)
21:02 jnthn TheHarlot: Remember to kill 800% slower. ;)
21:03 TheHarlot masak, Justin has a similar role in my mind as Nickelback and Avril Latrine. Crappy music, that now that the states have picked it up, will dominate 1/3 of the Canadian air waves, thanks to CRTC' retardation.
21:03 Guest52024 left #perl6
21:09 timbunce left #perl6
21:09 timbunce_ joined #perl6
21:09 colomon You could do what I do, and just grab select shows from CBC Radio 2 St. John's.
21:09 masak TheHarlot: I don't often have occasion to be distressed at that kind of music, because I don't willingly enter contexts where that kind of radio station is on.
21:11 masak rakudo: '[36][38][43]'.trans(/\[(\d+)\]/ => {chr($0)})
21:11 Jake_ joined #perl6
21:11 p6eval rakudo :  ( no output )
21:11 masak rakudo: say '[36][38][43]'.trans(/\[(\d+)\]/ => {chr($0)})
21:11 p6eval rakudo : OUTPUT«[38][38][43]␤»
21:12 masak there's a skipped test that expects '$&+' here.
21:12 masak did we even figure out a way to make closures get the right $/ in this situation?
21:12 TheHarlot masak, colomon: yeah, I do not go out and look for those bad stations. However it does bring up painful childhood memories... oh... dear sweet merciless Eris... my mind is jumping back to Trooper and Celion Dion.
21:12 masak I know the question arose for .subst, but it's the same problem with .trans, it seems.
21:12 Jake_ left #perl6
21:13 TheHarlot masak, was that the main issue with what I was trying to do the other day?
21:13 masak TheHarlot: url?
21:14 TheHarlot oh... it was something I was asking in the channel. It brought up the note about having run() be called with multiple arguments.
21:15 masak I vaguely remember without the assistance of the IRC logs :)
21:15 masak might have been the same issue, yes.
21:15 risou left #perl6
21:16 cosimo good $evening, perl6!
21:16 masak cosimo! \o/
21:16 cosimo i have a nice question for you
21:16 masak rakudo: $_ = '$123'; tr/$123/X\x20\o40\t/; .say
21:16 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "tr/$123/X\\"␤»
21:17 masak cosimo: oh?
21:17 jnthn It's amazing how coming back to a bug a week later that you spent half an hour on without results gets it solved in 5 minutes...
21:17 tadzik oh hi cosimo
21:17 cosimo what's the equivalent perl6 of this ruby snippet http://pastebin.com/xLTeXFzT ?
21:17 masak jnthn: you should have solved it a week later from the beginning! :P
21:18 jnthn ...in other news, it's a bad idea to try and put something in a package...if it's the thing that defines packages. :P
21:18 cosimo tadzik: hallo
21:18 masak cosimo: .^add_method, looks like.
21:18 cosimo masak: mmh
21:18 masak jnthn: oh ouch :)
21:19 masak cosimo: I'm sure there's working code somewhere to look at for that.
21:19 cosimo masak: what about the .send()
21:19 jnthn masak: Yeah. knowhow NQPStash and my knowhow NQPStash are kinda a big difference. :)
21:19 masak cosimo: you can get at specific methods with .^can and then just call them normally.
21:20 masak cosimo: where 'normally' means 'as subs' :)
21:20 jnthn s/methods/dispatchers/ ;)
21:20 masak oh right.
21:20 masak one day I'll learn :)
21:20 jnthn (with .^can)
21:24 cosimo I found a few examples, but all of them use $obj.^add_method
21:24 cosimo is it possible to ClassName.^add_method ?
21:25 muixirt left #perl6
21:25 cosimo something like: 'ClassName.meta.add_method(xxx, sub { somecode });'
21:25 jnthn cosimo: They mean the same thing.
21:25 jnthn But yes, you can ClassName.^add_method too
21:26 jnthn cosimo: Note that $obj.^add_method is adding not just to the object, but to the class.
21:26 cosimo jnthn: ok, so ClassName.^add_method is valid
21:26 jnthn Yup
21:26 cosimo but ClassName.meta.^add_method doesn't exist. right?
21:26 wooden joined #perl6
21:26 wooden left #perl6
21:26 wooden joined #perl6
21:27 cosimo sorry, that should have been ClassName.meta.add_method, without ^
21:27 jnthn ClassName.^add_method('foo', method () { ... })
21:27 jnthn is the same as
21:27 jnthn ClassName.HOW.add_method(ClassName, 'foo', method () { ... })
21:28 cosimo aha
21:28 jnthn So .HOW is I guess sorta the equivalent to .meta
21:28 cosimo so "HOW" == "meta"
21:28 jnthn Note .HOW is a macro, not a method
21:28 masak someone explain to me how come https://github.com/perl6/roast/blob/ma​ster/S05-transliteration/trans.t#L230 can be unskipped. o.O
21:28 jnthn It gets the meta-object
21:28 jnthn So I guess so :)
21:28 masak I ran that code above and it doesn't even parse in Rakudo.
21:29 jnthn std: tr/$123/X\x20\o40\t/;
21:29 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
21:29 jnthn Ain't $123 $/[123] ?
21:29 masak don't think so.
21:29 jnthn Oh no
21:29 jnthn You're in a derived langauge inside tr///
21:29 masak right.
21:30 jnthn (one that I guess gives $ another meaning)
21:30 masak it's just literal strings in there.
21:30 masak on the left side, at least.
21:30 icwiener left #perl6
21:30 jnthn aha
21:30 masak but... how can this run?
21:31 jnthn std: tr/$123/X\x20\o40\t/;
21:31 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
21:31 jnthn gah
21:31 jnthn rakudo: tr/$123/X\x20\o40\t/;
21:31 p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "tr/$123/X\\"␤»
21:31 jnthn I...really have no idea. :)
21:31 masak oh!
21:31 masak it's a block.
21:31 jnthn It *is* skipped. :)
21:31 masak and there's a #?rakudo skip on the whole block.
21:31 jnthn The block is skipped.
21:31 jnthn :P
21:31 masak phew.
21:31 jnthn ;)
21:31 masak sanity restored.
21:31 * masak indents the contents of that block
21:32 masak people: always brush your teeth. always indent.
21:33 jnthn ...indentures?
21:33 * masak slaps jnthn with a pun stick
21:33 masak but yeah. maybe that's how my brain works. scary. :)
21:35 diakopter oh good jnthn still awake
21:37 masak jnthn: before diakopter snatches you, do you have any insightful opinion on $/ in closures to .subst and .trans?
21:37 jnthn masak: I'm sure I've watched multiple conversations on that which ended without a solid conclusion...
21:38 masak yeah. same here.
21:38 jnthn masak: Generally, pmichaud_ made any points I had, but probably better than I coulda put them...
21:38 masak :)
21:39 amkrankruleuen left #perl6
21:39 masak jnthn: do you think things as spec'd today are inconsistent and unimplementable, or is the reason $/ doesn't work in such closures purely a temporary Rakudo limitation?
21:40 jnthn masak: My recollection has been that's it has been more of an issue of "what to implement" than having blockers on implementing it.
21:40 masak well, the desired behavior seems clear to me.
21:41 masak it's the implementation of that behavior that I'm curious about.
21:41 jnthn masak: IIRC it comes down to
21:41 jnthn 'bddr'.subst(/d/, { $/.Str.succ })
21:41 jnthn How do we get the $/ set right in that block?
21:42 jnthn Considering that at compile time we've no idea that block will end up used by .subst
21:42 takadonet left #perl6
21:42 jnthn (e.g. we may pass a block to something that then uses it in .subst, or we may pass a sub ref to subst, or something)
21:42 jnthn So we can't just say "it has a parameter $/"
21:42 tadzik masak: are you into this Ambient music?
21:43 masak tadzik: not besides Justin Beebz 800% :P
21:43 tadzik :>
21:43 masak jnthn: right.
21:43 tadzik seemed quite ear-pleasant, if done right
21:44 cosimo please help... why 'method printthem (@args) {say @args}' complains about type check failed?
21:44 masak jnthn: and we don't want to start special-casing the arguments of .subst and .trans, because that's agains Perl 6 philosophy.
21:44 cosimo i tried various combinations, Array of Any, Array of Int, etc... but none worked
21:44 tadzik cosimo: and what are you passing?
21:44 masak cosimo: because you didn't pass in an array? :)
21:45 jnthn cosimo: How are you calling it?
21:45 jnthn Did you want *@args ?
21:45 jnthn masak: (special-casing) right, exactly
21:45 cosimo printthem(1,2,3,4)
21:45 tadzik that's 4 arguments
21:45 tadzik (parameters)
21:45 masak arguments.
21:45 cosimo yes, but I want (anything really here)
21:45 tadzik you want *@args probably, a slurpy params
21:45 jnthn rakudo: say 1 ~~ Positional
21:45 p6eval rakudo : OUTPUT«0␤»
21:46 jnthn cosimo: @ sigil means "one argument that does the Positional role"
21:46 cosimo "*@args" ?
21:46 jnthn cosimo: You want *@args which is for variadic args.
21:46 cosimo jnthn: so it works with printthem(@my_args)
21:46 jnthn @args means it expects aisngle array-ish thing
21:46 mavrc left #perl6
21:46 jnthn cosimo: Right
21:47 jnthn cosimo: For your usage you want method printthem(*@args) { ... }
21:47 masak jnthn: I vaguely recall something about $/ being bound to $OUTER::/ by default. but I guess that doesn't solve anything, because it's $CALLER::/ we'd need in this case.
21:47 jnthn masak: er
21:47 jnthn Maybe
21:47 cosimo makes sense. sorry, i know it's stupid questions, but I've been away for a bit too much :)
21:47 jnthn oh, yeah
21:47 jnthn :)
21:47 masak or something.
21:47 sorear I currently implement $/ as a contextual
21:47 jnthn Right, 'cus it's called by .subst
21:47 masak right.
21:48 sorear so, $/ means $CALLER::/, $CALLER::CALLER::/, ... until it finds one
21:48 masak sorear: seems to me that road is treacherous in general, but right in these two cases.
21:48 masak IIUC, Perl 6 wanted to move away from $/ and similar vars being global.
21:49 sorear I agree it's pretty suboptimal
21:49 sorear but it's the best idea I've had so far
21:52 masak at least you have a solution.
21:53 sorear the problem with $/-as-contextual is that it prevents the compiler from optimizing if ($foo ~~ /foo/) into if ($foo.index('foo')) {
21:53 oha joined #perl6
21:54 masak I don't know whether I should modify those tests to have an explicit -> $/ signature, as I've seen some people do with .subst -- thus admitting defeat to our inability to think up an all-the-way design that makes this work without the explicit signature.
21:54 masak or whether I should leave the tests as they are and just not implement that part -- thus admitting defeat to our inability to implement things as they are spec'd now.
21:54 sorear the regression tests need to test the stuff apps use
21:55 sorear otherwise they're useless
21:55 masak well, since this ain't implemented, no application currently uses it.
21:55 saaki left #perl6
21:55 masak I can implement .trans closures that don't make use of $/
21:55 masak there's one or two tests for that.
22:13 saaki joined #perl6
22:16 spq1 left #perl6
22:20 hercynium left #perl6
22:22 dalek 6model: 2e58221 | jonathan++ | dotnet/runtime/Runtime/Ops/ (2 files):
22:22 dalek 6model: [odd] Line-endings oddness.
22:22 dalek 6model: review: https://github.com/jnthn/6model/commit/2​e58221e10a56a363a7884f9f8fba5dba56b0124
22:22 dalek 6model: fc4d3ce | jonathan++ | dotnet/runtime/Metamodel/ (2 files):
22:22 dalek 6model: [dotnet] Be a little bit more late-bound in a couple of places to break some circularities. Thankfully, not anywhere in hot paths.
22:22 dalek 6model: review: https://github.com/jnthn/6model/commit/f​c4d3cef4687d0522351f52c5cc98ecfb998062e
22:22 dalek 6model: 5d5adc8 | jonathan++ | / (2 files):
22:22 dalek 6model: [dotnet] [common] Add an NQPStash type which is a smarter than just a hash. Use it for implementing packages instead. Hopefully, this will make various broken things Just Work.
22:22 dalek 6model: review: https://github.com/jnthn/6model/commit/5​d5adc8d94ce669e9ae0ba91031d0f7af6a78380
22:25 lichtkind moritz_: could it be that github repo of the book is broken?
22:32 masak lichtkind: works over here: https://github.com/perl6/book
22:32 sorear Where should I get feedback on my subset Int idea?
22:32 lichtkind masak: i pulled it 3 times and got everytim a dump
22:32 masak sorear: p6l?
22:32 * masak hides
22:32 masak lichtkind: a dump?
22:33 masak as in, Data::Dumper?
22:33 MayDaniel left #perl6
22:33 lichtkind masak: sh.exe.stackdump
22:34 sorear masak: I forgot to specify useful feedback.
22:34 masak sorear: oh! tricky.
22:34 jnthn rakudo: Foo::bar(); module Foo { our sub bar() { say "ok" } }
22:34 p6eval rakudo : OUTPUT«Could not find sub &say␤  in 'Foo::bar' at line 22:/tmp/gPIXjGQR_n␤  in main program body at line 22:/tmp/gPIXjGQR_n␤»
22:35 jnthn rakudo: Foo::bar(); module Foo { our sub bar() { "ok".say } }
22:35 p6eval rakudo : OUTPUT«ok␤»
22:35 jnthn rakudo: Foo::bar(); module Foo { our $x = 42; our sub bar() { $x.say } }
22:35 p6eval rakudo : OUTPUT«Null PMC access in find_method('say')␤  in 'Foo::bar' at line 22:/tmp/27KYPHDIJs␤  in main program body at line 22:/tmp/27KYPHDIJs␤»
22:35 jnthn While NPMCA is of course Rakudo bug, I assume the answer is not 42 because we don't set $x until the module block runs?
22:36 jnthn nqp: Foo::bar(); module Foo { our $x := 42; our sub bar() { say($x) } }
22:36 p6eval nqp: OUTPUT«Null PMC access in get_string()␤current instr.: 'print' pc 92616 (gen/nqp-grammar.pir:5883)␤»
22:36 jnthn heh.
22:36 jnthn Oh, grr. I mis-read the test I was looking at...
22:37 masak ISTR that bug is in RT somewhere.
22:37 * masak looks
22:40 masak hm. seems not.
22:40 * masak submits rakudobug
22:41 ulla left #perl6
22:42 masak rakudo: Foo::bar()
22:42 p6eval rakudo : OUTPUT«Can not find sub Foo::bar␤  in main program body at line 1␤»
22:42 masak rakudo: Foo::bar(); module Foo {}
22:42 p6eval rakudo : OUTPUT«Can not find sub Foo::bar␤  in main program body at line 1␤»
22:42 masak rakudo: Foo::bar(); module Foo { our sub bar {} }
22:42 p6eval rakudo :  ( no output )
22:42 molaf joined #perl6
22:42 masak rakudo: Foo::bar(); module Foo { my $x; our sub bar {} }
22:42 p6eval rakudo :  ( no output )
22:42 masak rakudo: Foo::bar(); module Foo { my $x; our sub bar { $x.say } }
22:42 p6eval rakudo : OUTPUT«Null PMC access in find_method('say')␤  in 'Foo::bar' at line 22:/tmp/VdqTXnSwXR␤  in main program body at line 22:/tmp/VdqTXnSwXR␤»
22:43 masak rakudo: module Foo { my $x; sub bar { $x.say }; bar }
22:43 p6eval rakudo : OUTPUT«Any()␤»
22:43 masak rakudo: module Foo { my $x; our sub bar { $x.say }; bar }
22:43 p6eval rakudo : OUTPUT«Any()␤»
22:43 masak rakudo: module Foo { our $x; our sub bar { $x.say }; bar }
22:43 p6eval rakudo : OUTPUT«Any()␤»
22:43 masak huh.
22:45 masak jnthn: why does that even run? how do we get away with using the Foo:: namespace before declaring the module?
22:45 masak std: Foo::bar(); module Foo {}
22:45 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤    'Foo::bar' used at line 1␤Check failed␤FAILED 00:01 118m␤»
22:45 masak that's a separate bug, methinks.
22:45 am0c joined #perl6
22:46 jnthn masak: Good question...
22:46 jnthn masak: I know the answer for NQP. For Rakudo...oddness.
22:46 masak rakudo: Foo::bar(); module Foo { sub bar { say "OH LOL" } }; say "alive"
22:46 p6eval rakudo : OUTPUT«Can not find sub Foo::bar␤  in main program body at line 1␤»
22:46 masak rakudo: Foo::bar(); module Foo { our sub bar { say "OH LOL" } }; say "alive"
22:46 p6eval rakudo : OUTPUT«Could not find sub &say␤  in 'Foo::bar' at line 22:/tmp/CbD1qOdpQf␤  in main program body at line 22:/tmp/CbD1qOdpQf␤»
22:47 kjeldahl left #perl6
22:47 masak rakudo: Foo::bar(); module Foo { our sub bar { "OH LOL".say } }; say "alive"
22:47 p6eval rakudo : OUTPUT«OH LOL␤alive␤»
22:47 * masak submits rakudobug
22:48 molaf left #perl6
22:51 perlygatekeeper left #perl6
22:54 tadzik oh, Perl Dancers have their Advent Calendar too. Speaking of which, any volunteers for the next articles?
22:55 tadzik the first one gets One Free Karma and a banana!
22:55 timbunce_ left #perl6
22:55 wamba left #perl6
22:59 tadzik (they're fleeing!)
22:59 Limbic_Region joined #perl6
23:00 masak tadzik: if it's not already clear, I'm volunteering for this year's Advent Calendar.
23:01 oha time ago i used .invert on an Enum, but now it seems not working anymore. is there another way?
23:01 tadzik ++masak
23:01 masak :)
23:01 masak oha: could you be more specific?
23:02 oha masak, hi. Enum Foo ( A => 1 ); %oof = Foo.invert;
23:03 masak that's Foo.enums.invert nowadays.
23:03 masak see S12 for the whole scoop.
23:03 oha ty masak
23:03 masak np oha
23:05 lichtkind i got Could not load oplib `perl6_ops'-- any idea?
23:06 masak lichtkind: wrong installed Parrot version?
23:06 lichtkind 2.10 and also this rakudo was for 2.10
23:07 lichtkind i actually trief both rakudo
23:07 lichtkind star and the 35
23:12 masak then I have no idea; sorry.
23:12 alester left #perl6
23:12 masak all I can say is that it works here.
23:13 dalek 6model: 8c3ca76 | jonathan++ | common/NQP/NQPSetting.pm:
23:13 dalek 6model: [common] Need to have a .defined method if we're gonna call one.
23:13 dalek 6model: review: https://github.com/jnthn/6model/commit/8​c3ca767b4f4e3a48b8e115410a8ed0cd8e3d377
23:13 dalek 6model: 51fb629 | jonathan++ | dotnet/compiler/ (2 files):
23:13 dalek 6model: [dotnet] First cut at getting our subs working. A few fixes in code-gen and PAST::Block.namespace handling along the way. Also our subs still need to be fully qualified with a namespace for now (since foo() is still assuming lexical always).
23:13 dalek 6model: review: https://github.com/jnthn/6model/commit/5​1fb629b0cf9ca8ebb439eb2ea5e29ff98201a7f
23:14 lichtkind masak: i installed now the laze apchakge for R* works now
23:15 jnthn (laze apchakge)++
23:15 masak I don't know what "laze apchakge" means, but sounds like good news.
23:19 justatheory left #perl6
23:20 jnthn std: { our sub six ( ) { say "ok 6" } }; six()
23:20 p6eval std a194beb: OUTPUT«Potential difficulties:␤  &six is declared but not used at /tmp/f45rjCWfA3 line 1:␤------> [32m{ our sub six[33m⏏[31m ( ) { say "ok 6" } }; six()[0m␤ok 00:01 122m␤»
23:20 jnthn rakudo: { our sub six ( ) { say "ok 6" } }; six()
23:20 p6eval rakudo : OUTPUT«ok 6␤»
23:20 jnthn niecza: { our sub six ( ) { say "ok 6" } }; six()
23:20 p6eval niecza 571d549: OUTPUT«[31m===[0mSORRY![31m===[0m␤Package subs NYI at /tmp/9BTYOe1_KO line 1:␤------> [32m{ our sub six ( ) { say "ok 6" } [33m⏏[31m}; six()[0m␤Potential difficulties:␤  &six is declared but not used at /tmp/9BTYOe1_KO line 1:␤------> [32m{ our sub six[33m⏏[31m ( ) { say
23:20 p6eval .."ok 6"…
23:21 * jnthn wonders if that six() call should work...
23:21 TimToady shouldn't
23:21 jnthn nqp: { our sub six ( ) { say "ok 6" } }; six()
23:21 p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 2358 (src/Regex/Cursor.pir:232)␤»
23:21 jnthn nqp: { our sub six ( ) { say("ok 6") } }; six()
23:21 p6eval nqp: OUTPUT«ok 6␤»
23:21 jnthn Naughty, naughty Parrot nqp.
23:21 jnthn :)
23:22 jnthn TimToady: This means I...don't have a test to fix. \o/
23:22 diakopter yay
23:22 jnthn nqp: { our sub six ( ) { say("ok 6") } }; GLOBAL::six()
23:22 p6eval nqp: OUTPUT«ok 6␤»
23:22 jnthn TimToady: ^^ is that OK?
23:23 TimToady see S06:455
23:23 TimToady yes, that should work
23:23 jnthn Thanks
23:23 TimToady so should OUR::six()
23:23 * jnthn wonders if that's the bit he read recetly...
23:24 TimToady and &*six() should work in this case, since it's in GLOBAL
23:25 dalek tpfwiki: Herbert Breunung | Perl 6 Variable Tablet
23:25 dalek tpfwiki: http://www.perlfoundation.org/perl​6/index.cgi?perl_6_variable_tablet
23:25 TimToady and &* looks there at the end
23:25 jnthn TimToady: *nod*
23:25 jnthn TimToady: I don't have that "look in global" failover working just yet.
23:25 TimToady and eventually we can declare a CANDO failover as well
23:26 jnthn TimToady: OOC, $*foo := 42; # does this install a $foo in global?
23:26 dalek 6model: d6ea428 | diakopter++ | / (5 files):
23:26 dalek 6model: [odd] apparently I'm still git-clueless
23:26 dalek 6model: review: https://github.com/jnthn/6model/commit/d​6ea428e0c0774390976648cce27aa5abdd1688c
23:26 dalek 6model: 58a09a6 | diakopter++ | / (3 files):
23:26 dalek 6model: Merge branch 'master' of github.com:jnthn/6model
23:26 dalek 6model: review: https://github.com/jnthn/6model/commit/5​8a09a61ae8ac827e5493e3a05d23f1b831a1f8d
23:26 lichtkind i lost my head , what is the word for to put into another contex?
23:26 lichtkind context
23:26 TimToady jnthn: no, it merely rebinds whatever $*foo is existing
23:26 jnthn TimToady: Sorry, I was unclear. I mean if no $*foo is found in the dynamic scope.
23:26 jnthn TimToady: And we failover to looking in GLOBAL
23:27 TimToady no, I think we should require GLOBAL:: for that
23:27 jnthn TimToady: Me too. :)
23:29 masak today, I've tried to patch .trans for handling regexes. giving up for the day -- it was more complicated than I imagined it would.
23:29 masak time to blog about the unexpected overwhelm fail. :)
23:30 oha left #perl6
23:33 lichtkind is @@() gone too?
23:34 masak think so.
23:34 jnthn lol
23:34 masak it's now **@
23:35 lichtkind no you kidding
23:35 masak lichtkind: that's what I got from greeping 'git log' for specs.
23:36 lichtkind i searched some syn and didnt found @@
23:37 lichtkind masak thank you
23:38 TimToady masak: that will be very difficult unless you know how to hook into the LTM implied by .trans
23:38 masak TimToady: yeah.
23:38 TimToady espcially since rakudo doesn't really do LTM yet
23:38 masak TimToady: the current .trans impl does it right for constant strings.
23:39 jnthn The current Rakudo does LTM right in some cases for constant strings. :)
23:39 masak TimToady: but... I found I had to special-case regexes, and then there were a lot of "interesting" corner cases across the boundary.
23:39 jnthn (e.g. in the context of proto regexes)
23:39 masak I think I'd be better off attacking the problem after hiding some of that complexity first.
23:40 masak essentially runtime-polymorphing on constant strings and regexes.
23:40 dalek 6model: 0210b86 | jonathan++ | t/nqp/11-subs.t:
23:40 dalek 6model: [t] Correct and uncomment a test.
23:40 dalek 6model: review: https://github.com/jnthn/6model/commit/0​210b8670c294f7851308c6428cff616b3a92630
23:40 dalek 6model: 38cad29 | jonathan++ | t/nqp/24-module.t:
23:40 dalek 6model: [t] We now pass 24-module.t.
23:40 dalek 6model: review: https://github.com/jnthn/6model/commit/3​8cad2926bcc42688acc09b4ff5ca2432756f3cf
23:40 dalek specs: f648072 | TimToady++ | S02-bits.pod:
23:40 dalek specs: it's illegal to assign/bind a non-existing dynvar
23:40 dalek specs:
23:40 dalek specs: You must use the GLOBAL:: package explicitly in this case.
23:40 dalek specs: review: https://github.com/perl6/specs/commit/f​648072e0447cffa95bd320583a1f527bebe3577
23:41 dalek tpfwiki: Herbert Breunung | Perl 6 Lookup Tablet
23:41 dalek tpfwiki: http://www.perlfoundation.org/per​l6/index.cgi?perl_6_lookup_tablet
23:42 jnthn Up to 39 nqp-rx test files passing :)
23:42 lichtkind TimToady: may i know why you changed @@ ?
23:42 TimToady it was ugly, and we didn't really need it
23:42 frettled ETOOMANYKANELBULLAR
23:43 jnthn You can have too many?
23:43 frettled I can only shove one into my mouth at a time.
23:43 jnthn Mouths are too small...
23:43 diakopter any git knowbodies around?
23:44 TimToady here are two of them stacked --> @
23:44 frettled Okay, I admit that that is the problem.
23:44 frettled diakopter: what does your body need to know?
23:44 diakopter frettled: so I've got these commits..
23:44 diakopter that I can see in gitk
23:45 diakopter (and their changes (almost entirely additions) are still reflected locally in their files)
23:45 frettled Oh, dear, a TCL/TK GUI.
23:45 diakopter disregard that line
23:45 diakopter :)
23:46 jnthn TimToady: Thanks for spec clarification :)
23:46 diakopter how would I push just these 4 commits
23:47 diakopter even though TortoiseGit thinks they're already pushed
23:47 TimToady did you look at the tortoise underneath?
23:47 diakopter yeah, but he referred me further down like you did
23:47 frettled what about the elephants above?
23:48 envi joined #perl6
23:48 diakopter they were too flat to distinguish
23:48 frettled diakopter: on a serious note: I'd wimp out and git clone a new local repository, copy the four changed files into that one, git commit -a and git push.
23:49 frettled it's probably the quickest and easiest way
23:49 frettled and with little mess
23:49 diakopter I've done that a couple of times already
23:49 diakopter and I already have plenty of other local changes that I ignore with every commit
23:49 frettled I don't believe git is meant to solve that particular problem for you, unless you create and manage your own branches.
23:50 diakopter yes. something I haven't yet learned [how] to do.
23:50 frettled diakopter: http://book.git-scm.com/3_bas​ic_branching_and_merging.html
23:51 diakopter thanks
23:51 frettled Mind you, I'm most certainly not an expert, so my advice may be slightly suboptimal.
23:51 bluescreen joined #perl6
23:51 flussence git branch -m <current branch> <some new name>; git checkout -t origin/<current branch>; git merge <new branch name>; should clear things up.
23:52 bluescreen is now known as Guest2242
23:53 frettled flussence: but is there an easy way to say that just a few select files are part of that particular branch?
23:53 * frettled hasn't found a way of doing that yet.

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

Perl 6 | Reference Documentation | Rakudo