Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-03-28

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:03 Chillance left #perl6
00:03 plobsing left #perl6
00:17 sorear good * #perl6
00:31 jasonmay good * cruel world!
00:31 benabik good * perl world?
00:38 silent_h_ left #perl6
00:41 plobsing joined #perl6
00:47 Trashlord left #perl6
01:09 ymasory joined #perl6
01:10 ymasory left #perl6
01:10 ymasory joined #perl6
01:11 ymasory left #perl6
01:11 ymasory joined #perl6
01:11 ymasory left #perl6
01:40 sftp left #perl6
01:59 whiteknight left #perl6
02:03 alester joined #perl6
02:31 benabik left #perl6
02:39 nymacro joined #perl6
02:40 colomon "@x is copy" isn't lazy, is it?
02:50 colomon rakudo: sub a(&b, $c) { &b{$c); }; say a(* + 1, 10);
02:50 p6eval rakudo 792e86: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22␤»
02:50 colomon rakudo: sub a(&b, $c) { &b($c); }; say a(* + 1, 10);
02:50 p6eval rakudo 792e86: OUTPUT«11␤»
02:53 colomon .... in Rakudo, seems like "@x is copy" is only lazy if it knows @x is infinite.  ie if you pass 1..* it works, but if you pass 1...* it loops forever.
02:55 TimToady we probably need an array copy primitive that copies the reified parts and then dups the .plan
02:58 ymasory joined #perl6
03:04 sorear it can't just dup the .plan; it has to lazily copy it
03:05 sorear consider: sub foo(*@x is copy) { @x[10] = 5 }; my @y = 1..100; foo(gather { take-rw $_ for @y }); say @y[10]
03:18 el_lobo--d-_-b joined #perl6
03:18 el_lobo--d-_-b http://imm.io/4Cnn
03:18 el_lobo--d-_-b left #perl6
03:18 himito joined #perl6
03:19 clkao jnthn: ping
03:19 clkao ingy: ping
03:22 jferrero left #perl6
03:29 domidumont1 joined #perl6
03:32 domidumont left #perl6
04:00 chin_up joined #perl6
04:04 donri left #perl6
04:05 sorear clkao: hi
04:15 benabik joined #perl6
04:38 jaldhar left #perl6
04:39 jaldhar joined #perl6
04:41 cosimo left #perl6
04:48 lue left #perl6
04:52 ymasory left #perl6
04:57 chin_up left #perl6
05:05 kaare_ joined #perl6
05:13 himito left #perl6
05:29 ashleydev left #perl6
05:32 mberends left #perl6
05:36 ashleydev joined #perl6
05:39 cosimo joined #perl6
05:46 birdwindupbird joined #perl6
05:49 wtw joined #perl6
05:54 mberends joined #perl6
06:09 donri joined #perl6
06:31 mberends left #perl6
06:33 * sorear out
06:45 woosley joined #perl6
06:51 birdwindupbird left #perl6
06:51 birdwindupbird joined #perl6
06:59 shi joined #perl6
07:08 Lorn left #perl6
07:13 Lorn joined #perl6
07:28 noganex left #perl6
07:29 pochi joined #perl6
07:31 noganex joined #perl6
07:34 Mowah joined #perl6
07:52 sjn joined #perl6
07:57 chin_up joined #perl6
08:01 moritz_ rakudo: say min(3, 6)
08:01 p6eval rakudo 792e86: OUTPUT«Unable to handle non-closure Ordering yet␤  in 'Any::min' at line 1563:CORE.setting␤  in 'min' at line 1873:CORE.setting␤  in main program body at line 22:/tmp/Vgy_9kA7_Q␤»
08:04 moritz_ rakudo: proto sub f(*@val, :$by) { say @val.perl }; f(1, 2)
08:05 p6eval rakudo 792e86: OUTPUT«[1, 2]␤»
08:05 moritz_ rakudo: proto sub f(*@val, :$by) { say @val.WHAT.perl }; f(1, 2)
08:05 p6eval rakudo 792e86: OUTPUT«Array␤»
08:05 moritz_ OH
08:05 moritz_ rakudo: proto sub f(*@val, :$by) { say @val.min }; f(1, 2)
08:05 p6eval rakudo 792e86: OUTPUT«1␤»
08:05 moritz_ rakudo: proto sub f(*@val, :$by) { say @val.min(Any) }; f(1, 2)
08:05 p6eval rakudo 792e86: OUTPUT«Unable to handle non-closure Ordering yet␤  in 'Any::min' at line 1563:CORE.setting␤  in 'f' at line 22:/tmp/bcDAzoFsuR␤  in main program body at line 22:/tmp/bcDAzoFsuR␤»
08:14 moritz_ it turns out that there's still a   dies_ok { min(@array) }, 'needs a comparison function'; test in roast
08:14 moritz_ I'll fix it up
08:16 sjn moritz_++ # attention to details
08:17 moritz_ masak++ found that it was still b0rked
08:19 dalek roast: 5c48821 | moritz++ | S32-list/minmax.t:
08:19 dalek roast: min(), max and minmax do take a list without an explicit comparison function
08:19 dalek roast: review: https://github.com/perl6/roast/commit/5c48821d1a
08:20 dalek rakudo: c8745bc | moritz++ | src/core/Any-list.pm:
08:20 dalek rakudo: fix RT #85674 for real, masak++
08:20 dalek rakudo:
08:20 dalek rakudo: This feels like there should be a better fix for it, but I cannot seem to
08:20 dalek rakudo: find it
08:20 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/c8745bce2d
08:34 cosimo left #perl6
08:44 chin_up left #perl6
08:50 moritz_ TiMBuS: fwiw the new IO::Socket::INET doesn't seem to work with IPv6 :(
08:51 TiMBuS aw
08:51 TiMBuS any reason why?
08:52 moritz_ TiMBuS: https://gist.github.com/890168 is my test
08:53 TiMBuS ah
08:54 TiMBuS you didnt pass 'family'
08:54 moritz_ should I?
08:55 TiMBuS yes, it needs to know it is ipv6
08:55 moritz_ I mean ::1 is pretty obvious v6, no?
08:55 dakkar joined #perl6
08:56 TiMBuS well i guess i could add that
08:57 bbkr_ joined #perl6
08:57 moritz_ ok, added :family
08:57 moritz_ now I get
08:57 moritz_ $ ./perl6 server.pl
08:57 moritz_ getaddrinfo failed: ::1: Success in 'IO::Socket::INET::BUILD' at line 5980:CORE.setting
08:57 moritz_ in 'IO::Socket::INET::new' at line 5966:CORE.setting
08:57 moritz_ in main program body at line 1:server.pl
08:57 TiMBuS haha what
08:59 TiMBuS i assume you added :family(PIO::PF_INET6)
08:59 moritz_ yes, I did
08:59 TiMBuS but yeah thats a parrot error
09:00 moritz_ when I use :localhost('localhost') I don't get any errors, but no socket opened either :(
09:01 TiMBuS i noticed that too
09:01 TiMBuS so i changed the default to '0.0.0.0'
09:02 TiMBuS i should probably go work on Socket.pmc =/
09:05 * moritz_ doesn't really understands that business with the different resolvers
09:05 moritz_ $ host localhost
09:05 moritz_ Host localhost not found: 3(NXDOMAIN)
09:05 moritz_ $ ping localhost
09:05 moritz_ PING localhost (127.0.0.1) 56(84) bytes of data.
09:05 moritz_ so 'host' doesn't look into /etc/hosts ?
09:05 xinming joined #perl6
09:05 TiMBuS lol. networking. the closest thing we have to actual magic
09:08 moritz_ so what tool would I use to do the same DNS lookup as ping?
09:08 noganex left #perl6
09:08 flussence /etc/hosts magic is usually a function of glibc + /etc/nsswitch.conf
09:10 st-5426 left #perl6
09:11 flussence (and a bunch of libnss_* files in /lib)
09:11 noganex joined #perl6
09:15 Tene moritz_: getent hosts localhost
09:16 Tene moritz_: more-generally, getent is used to read from any database described in /etc/nsswitch.conf
09:34 Trashlord joined #perl6
09:37 bacek joined #perl6
09:55 woosley left #perl6
10:18 Mowah left #perl6
10:19 awoodland left #perl6
10:21 Mowah joined #perl6
10:43 fhelmberger left #perl6
10:55 bacek left #perl6
11:00 st-9828 joined #perl6
11:01 st-9828 left #perl6
11:04 birdwindupbird left #perl6
11:11 st-10005 joined #perl6
11:12 bacek joined #perl6
11:13 st-10005 left #perl6
11:23 st-10104 joined #perl6
11:27 Axius joined #perl6
11:36 st-10104 left #perl6
11:38 Axius left #perl6
11:45 Tedd1 left #perl6
11:46 birdwindupbird joined #perl6
11:47 leprevost joined #perl6
11:53 Patterner left #perl6
11:54 Psyche^ joined #perl6
11:54 Psyche^ is now known as Patterner
11:55 moritz_ hugme: add functions in mojolicious::lite, i have some code that check a language parameter and sets it for the templates, i need that for all the
11:55 moritz_ sorry, mispaste :-)
11:59 flussence std: __LINE__ # just wondering if it can tell me what I should use for this...
11:59 p6eval std 4608239: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤    '__LINE__' used at line 1␤Check failed␤FAILED 00:01 117m␤»
11:59 flussence aww
12:00 moritz_ $?LINE
12:00 moritz_ NYI in rakudo, of course
12:00 moritz_ rakudo: say callframe(0).line
12:00 p6eval rakudo c8745b: OUTPUT«22␤»
12:00 flussence hm, that'll do for now :)
12:00 moritz_ (p6eval inserts some boilerplate code first, for security reasons; which is why it doesn't report it as 1)
12:12 mtk joined #perl6
12:13 mtk left #perl6
12:29 takadonet morning all
12:30 moritz_ \o
12:30 Mowah left #perl6
12:32 [Coke] ~~
12:33 bluescreen10 joined #perl6
12:33 sftp joined #perl6
12:36 benabik left #perl6
12:36 leprevost left #perl6
12:40 chin_up joined #perl6
12:41 plobsing left #perl6
12:58 Mowah joined #perl6
12:59 mtk joined #perl6
12:59 mtk left #perl6
13:00 mtk joined #perl6
13:03 kaare_ left #perl6
13:07 plobsing joined #perl6
13:15 kronik_aussie is now known as aesop
13:19 domidumont1 left #perl6
13:28 sftp left #perl6
13:29 hanekomu joined #perl6
13:30 bluescreen10 left #perl6
13:32 sftp joined #perl6
13:33 kaare_ joined #perl6
13:34 plobsing left #perl6
13:40 bluescreen10 joined #perl6
13:41 jimmy1980 joined #perl6
13:46 moritz_ rakudo: my %h = a => 1; say %h.pairs[0].key.PARROT
13:46 p6eval rakudo c8745b: OUTPUT«String␤»
13:46 moritz_ rakudo: say "foo".PARROT
13:47 p6eval rakudo c8745b: OUTPUT«Str␤»
13:48 [Coke] rakudo: my %h = a => 1; say %h.pairs[0].key.WHAT
13:48 p6eval rakudo c8745b: OUTPUT«Str()␤»
13:50 moritz_ if it reports String, .trans (and other methods from the parrot String PMC) leak through :(
13:50 moritz_ rakudo: say 'a'.trans(['a'] => ['b']
13:50 p6eval rakudo c8745b: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
13:50 moritz_ rakudo: say 'a'.trans(['a'] => ['b'])
13:50 p6eval rakudo c8745b: OUTPUT«b␤»
13:51 moritz_ rakudo: my %h = a => 1; say %h.pairs[0].key.trans(['a'] => ['b'])
13:51 p6eval rakudo c8745b: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤  in main program body at line 22:/tmp/Z2IIOZ8OYU␤»
13:52 Hackbinary left #perl6
13:53 domidumont joined #perl6
13:53 moritz_ rakudo: say Hash ~~ EnumMap
13:53 p6eval rakudo c8745b: OUTPUT«Bool::False␤»
13:53 moritz_ rakudo: say ~Hash.^parents
13:53 p6eval rakudo c8745b: OUTPUT«1␤»
13:53 moritz_ rakudo: say ~Hash.^parents>>.perl
13:53 p6eval rakudo c8745b: OUTPUT«Method 'flat' not found for invocant of class 'ResizablePMCArray'␤  in main program body at line 22:/tmp/rMtVF3oHml␤»
13:54 moritz_ rakudo: say ~Hash.^parents[0]
13:54 p6eval rakudo c8745b: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
13:54 moritz_ rakudo: my @a = Hash.^parents; say @a.perl
13:54 p6eval rakudo c8745b: OUTPUT«[EnumMap]␤»
13:54 icwiener joined #perl6
13:55 moritz_ then why is Hash ~~ EnumMap false?
13:55 moritz_ rakudo: say Hash.does(EnumMap)
13:55 p6eval rakudo c8745b: OUTPUT«0␤»
13:55 moritz_ rakudo: say Hash.isa(EnumMap)
13:55 p6eval rakudo c8745b: OUTPUT«Method 'isa' not found for invocant of class 'RoleHOW'␤  in main program body at line 22:/tmp/mmxQsyFV5g␤»
13:55 moritz_ rakudo: say Hash.^isa(EnumMap)
13:55 p6eval rakudo c8745b: OUTPUT«Method 'isa' not found for invocant of class 'RoleHOW'␤  in main program body at line 22:/tmp/ImMtYV4DgV␤»
13:55 moritz_ urks
13:56 Holy_Cow joined #perl6
13:56 colomon loliblogged: http://justrakudoit.wordpress.com/2011/03/28/pieces-of-pi/
13:59 moritz_ colomon: how about writing  for (0..*) { ... } instead of the loop, and using @x[$_] instead of that shifting construct?
13:59 colomon because you don't shift every time through the loop
13:59 moritz_ oh right
14:00 moritz_ then
14:00 moritz_ my $idx = 0
14:00 moritz_ @x[$idx++]
14:00 colomon I mean, you could rewrite it that way somehow, but it would be ugly.
14:00 moritz_ it's cleaner to expose your state in a variable than to hide it behind an implicit iteratore, IMHO
14:00 ruoso joined #perl6
14:01 colomon that approach would force you to keep the entire list in memory, though.
14:01 colomon at least in theory, the way it's done now allows used elements to go away if no one else is using them.
14:02 moritz_ you still have a reference to @x anyway
14:05 moritz_ btw you can get rid of those ugly sigils
14:06 moritz_ &-sigils, that is
14:06 tadzik hello zebras
14:07 moritz_ rakudo: sub f(&g) { g(3) }; f -> $x { say $x }
14:07 p6eval rakudo c8745b: OUTPUT«3␤»
14:07 moritz_ no & required to call g
14:08 PacoLinux joined #perl6
14:09 tzhs joined #perl6
14:12 sftp_ joined #perl6
14:13 wtw left #perl6
14:13 sftp left #perl6
14:13 xinming_ joined #perl6
14:13 stepnem joined #perl6
14:16 xinming left #perl6
14:25 dalek rakudo: 405afa9 | moritz++ | src/core/EnumMap.pm:
14:25 dalek rakudo: [EnumMap] return Perl 6 strings as keys
14:25 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/405afa9818
14:25 colomon moritz_++
14:26 moritz_ (that's the fix for https://github.com/perl6/book/issues/49 )
14:39 itz joined #perl6
14:39 itz is there anyway of getting "use v5" working in rakudo?
14:40 M_o_C joined #perl6
14:40 moritz_ yes: 1) implement it 2) use it
14:40 moritz_ maybe 1.5) submit patch :-)
14:41 itz ok no worries I thought 1) was going to be the answer
14:57 benabik joined #perl6
14:59 clkao seen jnthn
14:59 aloha jnthn was last seen in #perl6 1 days 8 hours ago saying "mberends: Yes, though only briefly.".
15:00 moritz_ clkao: travel makes jnthn's available here a bit sparse
15:01 stkowski joined #perl6
15:09 Rotwang joined #perl6
15:12 chin_up_ joined #perl6
15:15 chin_up left #perl6
15:17 hercynium joined #perl6
15:20 tzhs left #perl6
15:25 bacek left #perl6
15:28 ashleydev left #perl6
15:28 ashleydev joined #perl6
15:30 ashleydev left #perl6
15:30 ashleydev joined #perl6
15:32 SriniK joined #perl6
15:34 SriniK left #perl6
15:34 pmurias joined #perl6
15:43 SriniK_ joined #perl6
15:44 chin_up joined #perl6
15:47 chin_up_ left #perl6
15:49 chin_up left #perl6
15:51 chin_up joined #perl6
15:52 SriniK_ left #perl6
15:55 dalek book: d347870 | moritz++ | TODO:
15:55 dalek book: add a TODO file. Because we have much to do :-)
15:55 dalek book: review: https://github.com/perl6/book/commit/d347870de7
15:57 Axius joined #perl6
15:58 risou joined #perl6
15:58 dalek book: 1ad574f | duff++ | src/classes-and-objects.pod:
15:58 dalek book: [classes] rewording
15:58 dalek book: review: https://github.com/perl6/book/commit/1ad574f2d0
15:58 dalek book: edeee38 | (Patrick Donelan)++ | src/roles.pod:
15:58 dalek book: s/does affect/does not affect/
15:58 dalek book: review: https://github.com/perl6/book/commit/edeee38386
15:58 dalek book: d347870 | moritz++ | TODO:
15:58 dalek book: add a TODO file. Because we have much to do :-)
15:58 dalek book: review: https://github.com/perl6/book/commit/d347870de7
15:58 domidumont left #perl6
15:58 moritz_ sorry, that was testing the deploy hook
16:01 shortcircuit moritz_: All good karma. :)
16:02 moritz_ stolen karma is bad karma
16:02 shortcircuit I can even it out a bit with --, if you like. :)
16:03 shortcircuit moritz_++ wanted to sacrifice accidentally-stolen carma, so here: moritz--, moritz--.
16:03 moritz_ thanks you
16:03 * moritz_ bows
16:04 nymacro left #perl6
16:05 shi left #perl6
16:08 hanekomu left #perl6
16:11 tadzik applications start today, yep?
16:12 benabik tadzik: yep
16:12 tadzik I'd apply for the POD task
16:12 tadzik moritz_: is it written down somewhere?
16:13 moritz_ tadzik: I think I've added it to the tasks wiki
16:14 moritz_ http://epo.means.no/gsoc2011/ideas "Pod parser for Rakudo"
16:15 moritz_ not really many details - you can let your imagination run free
16:16 * tadzik looks for a proposal template
16:17 tadzik is there some blessed one?
16:19 moritz_ I'd go with https://www.socialtext.net/perl5/gsoc_2010_proposal_template from last year
16:19 moritz_ and ask rafl on irc.perl.org if it's the right one
16:22 tadzik FYI: it is
16:23 ruoso left #perl6
16:23 ruoso joined #perl6
16:26 risou_ joined #perl6
16:27 risou left #perl6
16:31 chin_up left #perl6
16:32 tadzik moritz_: who accepts the students' applications?
16:32 pmurias all are accepted
16:32 phenny pmurias: 27 Mar 01:35Z <sorear> tell pmurias STD_P5 frontend.
16:33 pmurias tadzik: some just don't get choosen ;)
16:33 birdwindupbird left #perl6
16:37 tadzik pmurias: oic :)
16:37 sorear (hi)
16:37 _dev0_ left #perl6
16:38 pmurias sorear: hi
16:38 pmurias re phenny message, you plan to implement 'use v5' using STD_P5 to create a p5 frontend?
16:39 sorear yes
16:40 pmurias will you do that as a GSoC project?
16:41 pmurias it certainly seems big enough
16:41 sorear was that a request?
16:42 benabik left #perl6
16:42 pmurias a question
16:43 sorear then I don't know.
16:44 pmurias the problematic part with that is that a lot of perl code relies upon XS modules
16:44 cdarroch joined #perl6
16:45 cdarroch left #perl6
16:45 cdarroch joined #perl6
16:59 dakkar left #perl6
17:05 masak joined #perl6
17:05 masak oh hai zebras!
17:05 colomon \o
17:06 moritz_ o/
17:06 masak always nice to see you folks :)
17:06 moritz_ tadzik: all TPF mentors vote on the applications
17:08 risou_ left #perl6
17:08 ruoso_ joined #perl6
17:09 ruoso left #perl6
17:10 sorear pmurias: all XS modules will necessarily need rewriting
17:11 sorear pmurias: it's "common wisdom" in #toolchain circles that 95% of economically important Perl 5 code is in-house pure-Perl scripts not on CPAN; the fact that there's so much XS on CPAN is selection bias
17:12 sorear someone like jjore or Alias_ could probably give a better analysis
17:17 masak I'm not too surprised that lots of corporations using Perl have economically important Perl 5 code that they choose not to upload to CPAN.
17:18 masak I'm not sure how sure one can ever be about the 95% figure, though...
17:18 sorear well I'm deferring to jjore et al - if they contradict me, I'm wrong
17:19 diakopter because there are hundreds of thousands if not millions of corporations, and almost none of them upload code, let alone write code in uploadable/module/distribution format
17:19 masak nod
17:19 masak I'm writing such code at $dayjob
17:19 masak it's economically important, and it's not on CPAN.
17:19 diakopter economically important has to have a context, and it's subjective
17:20 diakopter I mean, I repeat myself
17:20 masak well, it drives software that makes money ;)
17:28 M_o_C left #perl6
17:33 jaldhar left #perl6
17:33 jaldhar joined #perl6
17:33 masak moritz_++ # fixing #85674... again ;)
17:33 DarthGandalf left #perl6
17:34 pmurias sorear: but it's possible to call C code from .net?
17:34 moritz_ s/again/for real/
17:35 M_o_C joined #perl6
17:36 Axius left #perl6
17:38 masak moritz_: I share the unease you express in the commit comment.
17:38 masak moritz_: maybe the fix would entail making $by a named arg even in the methods?
17:40 ruoso_ left #perl6
17:41 moritz_ masak: that's not a fix for the larger problem, just avoiding it
17:41 moritz_ masak: the fix is really to have the proto redispatch to two multis, and have separate bodies for these multies
17:42 ruoso joined #perl6
17:43 risou joined #perl6
17:45 starcoder2 left #perl6
17:47 masak hm.
17:48 starcoder2 joined #perl6
17:50 colomon that doesn't seem right to me, but maybe I'm missing something here?
17:51 colomon unless you mean one of the multis explicitly takes a named parameter :$by which is not defined?
17:52 colomon :$by:U  ?
17:56 masak does "not defined" mean "not passed"?
17:56 masak I think not.
17:57 colomon Maybe you'd better explain what you are thinking, because that seems like a complete non-sequitur to me.
17:58 PerlJam When would you want to differentiate between a parameter that was not passed and one  that was passed but was undefined?
18:00 * moritz_ has no idea what an undefined Ordering could look like
18:01 [hercynium] joined #perl6
18:01 [hercynium] left #perl6
18:01 [hercynium] joined #perl6
18:02 PerlJam moritz_: that's what you get when you use StupidSort the first few times.
18:03 nymacro joined #perl6
18:03 hercynium left #perl6
18:03 [hercynium] is now known as hercynium
18:03 colomon Or let me put it like this:
18:03 colomon proto sub min(*@values, :$by) { $by.defined ?? @values.min($by) !! @values.min } seems like a perfectly reasonable solution to me.
18:04 moritz_ PerlJam: that would be s/undefined/random/
18:04 MayDaniel joined #perl6
18:04 PerlJam moritz_: what's the difference?  :)
18:05 Tene I feel vaguely uncomfortable with the proliferation of pairs of subs and methods with the same name, where the sub just redispatches to the method.
18:06 PerlJam Tene: it's just to keep things DRY
18:06 moritz_ Tene: welcome to Perl 6
18:06 PerlJam Tene: how would you do it?
18:06 moritz_ PerlJam: what's the difference between a brick and 5? :-)
18:06 Tene PerlJam: what's DRY about "min @foo" vs "@foo.min"?
18:06 masak PerlJam: how is keeping a method form and a sub form of something DRY? :)
18:07 PerlJam Tene: I didn't say  the interface was DRY
18:07 MayDaniel left #perl6
18:07 * moritz_ thinks it should be s/DRY/DWIM/
18:08 Tene PerlJam: I'd prefer that we either didn't do it at all, or that we had some further integration between sub and method invocation in the dispatcher.  This weird halfway place where we just happen to have subs and methods with the same name has always felt awkward to me.
18:10 zby_home joined #perl6
18:12 rgrau joined #perl6
18:13 sorear pmurias: yes, the CLR can bind to C fairly well
18:14 colomon Tene: I believe a lot of it is supposed to happen automagically by putting "is export" on the method.  but that's NYI
18:15 Tene colomon: Ah.
18:15 colomon though there are a few cases where the signatures are different enough that won't work.
18:16 Tene yeah... I'm not happy about the signature variations.
18:21 colomon TimToady: ping
18:21 Chillance joined #perl6
18:22 colomon rakudo: my $a' = 10; say $a'
18:22 p6eval rakudo 405afa: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a' = 1"␤»
18:24 risou left #perl6
18:26 tyatpi_ joined #perl6
18:35 hercynium left #perl6
18:35 tadzik aloha
18:35 hercynium joined #perl6
18:35 hercynium left #perl6
18:35 hercynium joined #perl6
18:36 hercynium left #perl6
18:48 colomon hmm... what's the signature-y way to capture both bits of a Pair?
18:49 cogno joined #perl6
18:54 masak rakudo: (sub (Pair $p { :$key, :$value }) { say $key; say $value })("OH" => "HAI")
18:54 p6eval rakudo 405afa: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
18:57 Vlavv_ left #perl6
18:57 mj41 joined #perl6
18:58 Vlavv_ joined #perl6
18:59 masak rakudo: (sub (Pair $p ( :$key, :$value )) { say $key; say $value })("OH" => "HAI")
18:59 p6eval rakudo 405afa: OUTPUT«Any()␤Any()␤»
18:59 masak that's the way to do it, AFAIK.
18:59 masak but the Pair implementation is in PIR, so it doesn't work.
19:00 flussence i can haz indent? https://github.com/flussence/p6-misc/blob/master/Str-indent.pm
19:00 masak \o/
19:00 tadzik oh nice
19:01 masak flussence++
19:01 tadzik flussence++ indeed
19:01 masak hm, sometimes I think .lines should have a Bool :with-newlines (or something) parameter
19:02 flussence :whole ?
19:03 tadzik :nom
19:03 masak flussence: accidentally? :P
19:05 flussence hm, now I wonder if I can combine the loops in the outdent code somehow...
19:10 rgrau left #perl6
19:13 ruoso left #perl6
19:18 cogno left #perl6
19:27 robinsmidsrod left #perl6
19:28 mberends joined #perl6
19:28 robinsmidsrod joined #perl6
19:35 ymasory joined #perl6
19:39 tadzik moritz_: got a while?
19:39 tadzik or you masak :)
19:40 moritz_ tadzik: yes
19:41 tadzik moritz_: I'd like to discuss the Pod Parser task with you, I'm putting my proposal together
19:41 moritz_ thought so :-)
19:42 tadzik as I can see, what is expected in the task seems to be just the Pod Parser and tools, not integrating that into Rakudo or anything, no .WHY. Is that desired, desired as an optional goal, or rather to be kept aside of the task?
19:42 tadzik I'm having so many ideas I don't think I'd implement them all even starting now:)
19:42 moritz_ desired as optional
19:42 tadzik so „If I finish earlier”?
19:43 moritz_ "if you can get it into your proposal in a sensible manner"
19:43 tadzik how does a sensible manner look in a proposal?
19:44 moritz_ good question :-)
19:44 tadzik I saw that one coming ;)
19:44 moritz_ what I thought is this:
19:44 moritz_ you need a timeline
19:44 tadzik any last year proposals which included optional goals?
19:44 moritz_ with weekly granularity
19:44 tadzik oh, a timeline is my next question for you, I have no idea how to write this
19:45 moritz_ you're supposed to allocate 20..25 hours per week
19:45 moritz_ so, how much can you get done in that time span?
19:45 masak I think having .WHY as a goal is important for the longevity of a Perl 6 Pod parser.
19:45 masak even if you don't get to it in the scope of the project.
19:45 flussence (answering my own last line: Yes!)
19:46 moritz_ for example you could allocate the first week for parsing inline markup like C<...> and according tests
19:46 tadzik masak: well, my general thought is that "If this doesn't fit in the proposal, I'll do it anyway (for this is just too awesome)"
19:46 moritz_ and the second for block parsing plus tests
19:46 moritz_ then one for .WHY attachements
19:47 moritz_ then think of other features you want to do
19:47 moritz_ table parsing
19:47 tadzik .WHY is the most exciting thing for me, thought that might be a bit tricky. If I understand this correctly, a Comment must know in which Class::Method it's in, and have access to the code
19:47 masak tadzik: have you seen my draft? might contain ideas for you to steal^Wborrow
19:47 tadzik masak: nope, would love to
19:48 tadzik or not (.WHY). It'll be just an another property of a method/class/sub
19:48 tadzik I'd like to have .WHY and friends as nice (if not nicer) as Python has its """
19:49 tadzik and then a Zebradoc, generating a nice docs like Javadoc, then FatZebra, which will do the same but including the code itself making a nice Code Review tool. Or something like this
19:50 masak tadzik: https://gist.github.com/500732
19:50 moritz_ tadzik: solid parsing + tests for it + WHY are much more important than fancy user level docs
19:50 moritz_ s/docs/apps/
19:51 tadzik moritz_: yeah, that are just my personal project ideas
19:51 tadzik masak: thanks, will look into it
19:52 tadzik masak: hmm, so that's your task? I'm confused
19:54 tadzik oh, even the STD doesn't do much Pod atm
19:54 rdesfo joined #perl6
19:56 woldrich left #perl6
19:56 masak tadzik: no, it's just a draft for something I meant to do at some point. I don't mind if someone GSoCs it.
19:57 moritz_ the original idea was to apply for a Hague grant, no?
19:58 masak yes.
20:03 moritz_ quick question regarding English: does "next Friday" always mean the soonest day that is a Friday, or sometimes also the Friday of the following week?
20:03 moritz_ (I suspect the former, but I want to be sure9
20:03 moritz_ s/9/)/
20:03 allbery_b usuakly the former, but sometimes the latter (especially if said on Thursday)
20:04 moritz_ said on a Monday
20:05 allbery_b unfortunately it's somewhat indeterminate as to whether it is distinct from a bare "Friday" or not
20:06 allbery_b some peope use it when they mean "this Friday", some don't.  English is too multivalued...
20:06 * moritz_ waits until Friday before asking TPF about grant status :-)
20:07 M_o_C left #perl6
20:07 allbery_b whereas "a week from Friday" should be reliably interpreted
20:07 saaki left #perl6
20:08 moritz_ as should be ISO 8601 dates :-)
20:12 saaki joined #perl6
20:12 woldrich joined #perl6
20:12 tadzik moritz_: Would you expect the Pod Parses to be tightly in-Rakudo thing, so tools using the parser will just import the Perl6::Grammar or something like this?
20:13 woldrich is now known as Guest91589
20:14 tyatpi_ left #perl6
20:15 moritz_ tadzik: yes
20:16 moritz_ afk
20:17 masak right. that's my understanding as well.
20:18 * mberends feels the bloat detector hairs rise on the back of his neck
20:19 mberends please make Pod6 parsing a module somehow
20:19 tadzik so the Core Module?
20:20 masak mberends: guess you'll just have to convince us that it's a better idea *not* to have it integrated...
20:20 tadzik Which Perl6::Grammar uses?
20:20 tadzik I can agree that loading a whole Perl6 parser to parse the pod may seem a little heavyish
20:21 tadzik and it may cause some people to write their own Parsers for they need it light. Moreover, it'll be more able to be used in a number of implementations
20:22 tadzik Also, modularity > monolith, if I got the CS homework correct
20:22 mberends what worries me is carrying this baggage in the perl6 executable even when the P6 program you are running contains no Pod6 at all.
20:22 mberends tadzik: +1
20:22 TimToady .oO(demand paging is your friend)
20:23 * masak doesn't know which side he's on
20:25 * moritz_ wonders who much trouble in-parser module loading will be
20:25 mberends does Rakudo or Parrot currently use demand paging?
20:25 TimToady was originally planned to, but I don't think it does currently
20:25 tadzik I see this as an encapsulated module for parsing Pod into some Pod::Blah data structures. Then Rakudo can just use that, and in case of things like `#= .WHY-stuff` it delegates parsing .WHY-stuff to the module
20:26 TimToady was hoped to mmap the bytecode into readonly memory
20:26 tadzik moritz_: parser is Nqp, not Perl 6 per se, right?
20:26 TimToady in any case, there are other ways to be lazy
20:26 TimToady for anything that is notionally there in the core, you really only need to know the names and the deps
20:28 tadzik OTOH, plenty of the "which method is that comment about" logic belongs to the Perl 6 parser rather than a documentation tool. But as mberends says, finding those pieces in the Perl 6 code will surely bring some overhead for the parser
20:28 tadzik correct me if I'm speaking bollocks
20:28 TimToady it's something to weigh, fershure
20:31 Holy_Cow left #perl6
20:31 mberends tadzik: zero-overhead is impossible, but parser hooks to empty actions that are overrideable by a module might be a fairly lean implementation.
20:35 zby_home left #perl6
20:35 zby_home joined #perl6
20:37 TimToady rakudo: my $aʹ = 10; say $aʹ
20:37 p6eval rakudo 405afa: OUTPUT«10␤»
20:37 TimToady colomon: ^^
20:38 TimToady .u ʹ
20:38 phenny U+02B9 MODIFIER LETTER PRIME (ʹ)
20:38 masak .u optimus prime
20:38 phenny masak: Sorry, no results for 'optimus prime'.
20:39 sjohnson heh
20:39 sjohnson .u trollface
20:39 phenny sjohnson: Sorry, no results for 'trollface'.
20:39 sjohnson ... maybe someday soon masak :)
20:40 mberends phenny should have said "no results yet for...".  Unicode will eventually encode every human thought.
20:43 masak .u every human thought
20:43 phenny masak: Sorry, no results for 'every human thought'.
20:43 mberends "yet"
20:43 * masak can almost hear the '...yet'
20:44 mberends .u coffee
20:44 phenny mberends: Sorry, no results for 'coffee'.
20:44 tadzik .u tea
20:44 phenny U+273B TEARDROP-SPOKED ASTERISK (✻)
20:44 mberends .u beverage
20:44 phenny U+2615 HOT BEVERAGE (☕)
20:44 masak :P
20:45 masak .u you
20:45 phenny U+4DC3 HEXAGRAM FOR YOUTHFUL FOLLY (䷃)
20:45 masak heh :)
20:45 * masak got Yi Jing'd
20:45 mberends .u human
20:45 phenny mberends: Sorry, no results for 'human'.
20:45 masak .u kill all humans
20:45 phenny masak: Sorry, no results for 'kill all humans'.
20:45 sjohnson youthful fully!
20:48 masak sjohnson: that's us! :)
20:48 sjohnson .u triangle
20:48 phenny U+29CC S IN TRIANGLE (⧌)
20:48 sjohnson most of the chars don't show up for me
20:48 sjohnson (´ー` )
20:48 TimToady that last one is the first one that didn't for me
20:49 masak same here.
20:49 masak .u well
20:49 phenny U+4DEF HEXAGRAM FOR THE WELL (䷯)
20:49 sjohnson .u fatface
20:49 phenny sjohnson: Sorry, no results for 'fatface'.
20:49 sjohnson ... one day
20:49 masak I wonder how many hexagrams I can guess from memory...
20:49 masak .u wanderer
20:49 phenny U+4DF7 HEXAGRAM FOR THE WANDERER (䷷)
20:49 TimToady funny that it picked that one for 'triangle'
20:49 masak .u heaven
20:49 phenny U+2630 TRIGRAM FOR HEAVEN (☰)
20:50 TimToady .u LEFT TRIANGLE
20:50 phenny U+25F8 UPPER LEFT TRIANGLE (◸)
20:50 masak Yi Jing was one of the two things that got me interested in Chinese.
20:50 TimToady that's befor it
20:50 TimToady .u RIGHT TRIANGLE ABOVE LEFT TRIANGLE
20:50 phenny U+29CE RIGHT TRIANGLE ABOVE LEFT TRIANGLE (⧎)
20:50 TimToady and that's after it
20:51 * TimToady wonders if it's grepping the keys of a hash...
20:51 sjohnson .u perl
20:51 phenny sjohnson: Sorry, no results for 'perl'.
20:51 sjohnson .u python
20:51 phenny sjohnson: Sorry, no results for 'python'.
20:51 mberends .u pearl
20:51 phenny mberends: Sorry, no results for 'pearl'.
20:52 masak aww, I just got bitten by === not autothreading over junctions. :(
20:52 masak and I *checked* that before writing that piece of code! still I fell for it.
20:52 mj41 left #perl6
20:52 sftp_ left #perl6
20:53 TimToady it's supposed to
20:53 masak oh good.
20:53 TimToady the junction logic is not supposed to be using the user's === to compare identities
20:54 TimToady not without making sure that it's not comparing junctions first, anyway...
20:54 masak all my tests pass now! \o/
20:56 Mowah left #perl6
20:57 masak 'night, #perl6
20:58 masak .u possessing
20:58 phenny masak: Sorry, no results for 'possessing'.
20:58 masak .u possession
20:58 phenny U+4DCD HEXAGRAM FOR GREAT POSSESSION (䷍)
20:58 masak \o/
20:58 masak left #perl6
20:59 kaare_ left #perl6
21:06 sorear those .u games would work better if phenny supported Unihan stuff
21:07 sorear good * #perl6
21:07 mberends good * sorear
21:07 pmurias sorear: hi
21:08 sftp joined #perl6
21:08 sorear hello pmurias
21:17 icwiener left #perl6
21:25 bluescreen10 left #perl6
21:27 zby_home left #perl6
21:34 plobsing joined #perl6
21:39 moritz_ phenny: tell masak you might be interested in http://books.slashdot.org/story/11/03/28/1344224/Book-Review-Test-Driven-JavaScript-Development?from=rss&amp;utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+Slashdot%2Fslashdot+%28Slashdot%29
21:39 phenny moritz_: I'll pass that on when masak is around.
21:39 colomon TimToady++
21:39 moritz_ urks, I didn't know the URL was so long
21:42 sorear colomon:
21:42 sorear perl6: sub foo(*@x) { say @x.shift }; my @kay = 5,4,3,2; say @kay.perl; foo(@kay); say @kay.perl;
21:43 p6eval rakudo 405afa, niecza v3-82-g1dc43eb: OUTPUT«[5, 4, 3, 2]␤5␤[5, 4, 3, 2]␤»
21:43 p6eval ..pugs: OUTPUT«[5, 4, 3, 2]␤*** Can't modify constant item: VUndef␤    at /tmp/_KZJGU3bIR line 1, column 20-29␤»
21:43 sorear that's how "ro-iterator" is spelled currently
21:43 sorear limitation: cannot be used more than once per arglist
21:43 sorear perl6: sub foo(*@x) { say @x.shift }; foo(1..*);
21:44 p6eval pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
21:44 p6eval ..rakudo 405afa, niecza v3-82-g1dc43eb: OUTPUT«1␤»
21:45 dalek niecza: 8caf924 | sorear++ | FETCH_URL:
21:45 dalek niecza: Update bootstrap for v4
21:45 dalek niecza: review: https://github.com/sorear/niecza/commit/8caf924abf
21:46 colomon sorear: nice!
21:46 takadonet left #perl6
21:46 colomon perl6: sub foo(*@x) { say @x.shift }; my @kay := 1... *; say @kay[^4; foo(@kay); say @kay.perl;
21:46 p6eval rakudo 405afa: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 22␤»
21:46 p6eval ..pugs: OUTPUT«*** ␤    Unexpected " say"␤    at /tmp/eL29BqAoxN line 1, column 50␤»
21:46 p6eval ..niecza v3-82-g1dc43eb: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Any()Unable to parse subscript at /tmp/Q4Rj56v_jm line 1:␤------> [32m@x.shift }; my @kay := 1... *; say @kay[[33m⏏[31m^4; foo(@kay); say @kay.perl;[0m␤Couldn't find final ']'; gave up at /tmp/Q4Rj56v_jm line 1 (EOF):␤------>
21:46 p6eval ..[32m; say @kay[^4; …
21:46 colomon perl6: sub foo(*@x) { say @x.shift }; my @kay := 1... *; say ~@kay[^4]; foo(@kay); say ~@kay[^4];
21:46 p6eval pugs: OUTPUT«*** ␤    Unexpected " say"␤    at /tmp/3YAWrdWU3a line 1, column 50␤»
21:46 p6eval ..niecza v3-82-g1dc43eb: OUTPUT«Unhandled exception: Series op NYI␤  at /home/p6eval/niecza/lib/CORE.setting line 387 (CORE die @ 2)␤  at /home/p6eval/niecza/lib/CORE.setting line 1171 (CORE infix:<...> @ 2)␤  at /tmp/OiNM8kbkEw line 1 (MAIN mainline @ 3)␤  at /home/p6eval/niecza/lib/CORE.setting
21:46 p6eval ..line 1264 (CORE …
21:46 p6eval ..rakudo 405afa: OUTPUT«1 2 3 4␤1␤1 2 3 4␤»
21:47 colomon rakudo++ !
21:54 * allbery_b wonders why pugs is in there still, as bitrotted as it is
22:06 whiteknight joined #perl6
22:06 sorear because it's still better than rakudo at some things
22:07 sorear and it's not really bitrotted, it just hasn't kept up with the fancy additions to the spec
22:11 colomon sorear++, btw :)
22:14 f00li5h left #perl6
22:17 araujo left #perl6
22:22 f00li5h joined #perl6
22:26 awoodland joined #perl6
22:34 araujo joined #perl6
22:38 cosimo joined #perl6
22:40 Guest91589 is now known as woldrich
22:40 woldrich left #perl6
22:40 woldrich joined #perl6
22:40 whiteknight left #perl6
22:41 awoodland left #perl6
22:42 felher joined #perl6
22:44 orafu left #perl6
22:46 whiteknight joined #perl6
22:49 felher Hey folks. I noticed that there is no <>-Operator in perl6 (Or am i just wrong? :) )? Is there still a way to do the neat ' my @array = <>; ' or does one have to something like: if there are command-line-arguments, open them, ...?
22:49 flussence rakudo: my @array = get; say :@array.perl;
22:49 p6eval rakudo 405afa: OUTPUT«"array" => ["Land der Berge, Land am Strome,"]␤»
22:50 flussence someone else will probably know how command line params work...
22:52 flussence oh
22:53 flussence you want lines() instead of <>
22:53 kst is now known as __k_s_t__
22:53 orafu joined #perl6
22:54 stkowski left #perl6
22:54 felher flussence: Ah, works like a charm. Thanks!
22:57 __k_s_t__ is now known as kst
23:11 Eevee left #perl6
23:12 * sjn wonders what happened to rakudo.de
23:18 pmurias left #perl6
23:23 icwiener joined #perl6
23:24 cdarroch left #perl6
23:32 rdesfo left #perl6
23:43 Chillance left #perl6
23:46 donri left #perl6
23:49 sjn rakudo: (1..6).roll(10).sort()
23:49 p6eval rakudo 405afa:  ( no output )
23:49 sjn rakudo: (1..6).roll(10).sort().say
23:49 p6eval rakudo 405afa: OUTPUT«1122233445␤»
23:49 sjn rakudo: (1..6).roll(10).sort().perl
23:50 p6eval rakudo 405afa:  ( no output )
23:50 sjn rakudo: (1..6).roll(10).sort().perl.say
23:50 p6eval rakudo 405afa: OUTPUT«(1, 1, 1, 2, 2, 3, 4, 5, 5, 5)␤»
23:50 sjn rakudo: (1..6).roll(10).sort(*).perl.say
23:50 p6eval rakudo 405afa: OUTPUT«No applicable candidates found to dispatch to for 'sort'. Available candidates are:␤:(Mu : &by = { ... };; *%_)␤␤  in main program body at line 22:/tmp/jHQHOzVOY2␤»
23:50 sjn rakudo: (1..6).roll(10).sort(-*).perl.say
23:50 p6eval rakudo 405afa: OUTPUT«(6, 6, 6, 6, 5, 5, 5, 4, 2, 1)␤»
23:50 sjn should sort(*) work, since sort(-*) works?
23:52 sorear no
23:52 TimToady no, * is Whatever, but -* is a closure
23:52 sjn uhm. ok?
23:53 TimToady we could specifically teach sort to take * to mean "natural sort" or some such, of course
23:53 TimToady but that would be a special case
23:53 sjn that tingles my POLA thingy
23:53 allbery_b this is confusion.  there was a WhateverCode for a while to try to disambiguate but that caused more problems than it fixed
23:53 allbery_b ^confusion^confusing
23:54 TimToady rakudo: say (-*).WHAT
23:54 p6eval rakudo 405afa: OUTPUT«WhateverCode()␤»
23:54 TimToady that hasn't changed
23:54 allbery_b ah, I thought that got despecced
23:54 sjn rakudo: (*).WHAT
23:54 p6eval rakudo 405afa:  ( no output )
23:54 sjn rakudo: say (*).WHAT
23:54 p6eval rakudo 405afa: OUTPUT«Whatever()␤»
23:55 TimToady Whatever means "dwim me", and most operators dwim into a closure
23:55 sjn well, when it comes to sorting, if sort(-*) is the canonical "sort reverse", then I find it sane if sort(*) does exactly the reverse (and vice versa :)
23:56 TimToady sort +* does the opposite :)
23:56 sftp left #perl6
23:56 TimToady * is not intrinsically numeric
23:57 awwaiid left #perl6
23:57 kfo_ joined #perl6
23:57 allbery_b it does make sense to me that "sort whatever" invoke a default sort
23:58 sjn rakudo: say <a b f d c>.sort(-*)
23:58 p6eval rakudo 405afa: OUTPUT«abfdc␤»
23:58 mikehh joined #perl6
23:58 sjn rakudo: say <a b f d c>.sort
23:58 p6eval rakudo 405afa: OUTPUT«abcdf␤»

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

Perl 6 | Reference Documentation | Rakudo