Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-11-18

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 * moritz_ really likes the way #perl6 works - somebody (here: frettled) writes something interesting, somebody else (here: me) incorporates that into something more visible but is a bad designer; a third person fixes up the desing (here: Wolfman2000), people bikeshed a bit, and ater a while it's much better than before, and better than any single contribution
00:03 Wolfman2000 moritz_++: What's funny about that is that I'm more a web developer than a designer.
00:03 moritz_ bed time for too...
00:03 moritz_ :-)
00:07 ihrd left #perl6
00:17 Limbic_Region joined #perl6
00:17 Limbic_Region any Win32 developers ping
00:18 Limbic_Region anyone on windows with VS.net, the free SDK or would be willing to send me just mc.exe, rc.exe and link.exe ping
00:22 nihiliad joined #perl6
00:27 colomon Oh geez.  Just looking for LHF for ng, and checked out pi.t
00:28 colomon It's got 6 tests, every one of which is skipped by rakudo -- and it still doesn't work in ng!!!!
00:28 jnthn Ouch!
00:29 colomon my $PI = 3.14159265358979323846264338​327950288419716939937510e0;
00:29 colomon "float division by zero"
00:29 jnthn ng: my $PI = 3.14159265358979323846264338​327950288419716939937510e0;
00:29 p6eval ng a9320d: Multiple Dispatch: No suitable candidate found for 'multiply_float', with signature 'PNP->P'␤current instr.: 'perl6;Perl6;Actions;_block3863' pc 133100 (src/gen/perl6-actions.pir:0)␤
00:29 jnthn meh
00:30 colomon what kills me is all the checks are calls to is_approx, which has what, six digits of accuracy?
00:30 colomon s/checks/tests/
00:30 jnthn lol!
00:30 jnthn I suspect that $PI may be a tad overspecified for the tests. ;-)
00:31 colomon rakudo: say pi.Rat(1e-7)
00:31 p6eval rakudo 7347ec: 3.1415926530119␤
00:31 colomon rakudo: say pi.Rat(1e-7).perl
00:31 p6eval rakudo 7347ec: 103993/33102␤
00:32 colomon ng: my ($a, $b) = (2, 1);
00:32 p6eval ng a9320d: Cannot assign to readonly value␤current instr.: '&infix:<=>' pc 7438 (src/builtins/assign.pir:12)␤
00:32 pmichaud ng doesn't have list assignment yet
00:33 colomon pmichaud: just checking to make sure I hadn't missed it being added back in.
00:34 colomon :)
00:34 ihrd1 joined #perl6
00:35 colomon pmichaud: how hard would it be to get NaN and Inf in ng?
00:35 * wolverian reads mst's rant about perl6
00:35 pmichaud colomon: easier than it was to do in master :-)
00:36 colomon A lot of numerical tests would come back (I think) if those worked.
00:37 jnthn colomon: We already parse them, I think, the actions just don't know what to do yet.
00:37 jnthn ng: Inf
00:37 pmichaud they just need to do lookups.
00:37 p6eval ng a9320d: Number parsing not fully implemented yet at line 1, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 448 (src/stage0/HLL-s0.pir:300)␤
00:37 colomon ng: say NaN
00:37 p6eval ng a9320d: Number parsing not fully implemented yet at line 1, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 448 (src/stage0/HLL-s0.pir:300)␤
00:37 pmichaud I'd treat Inf and NaN as constant symbols in the global namespace
00:37 jnthn pmichaud: Nod. That only shifts the problem to needing to install those. ;-)
00:37 jnthn But yes, it should be easy.
00:37 pmichaud very easy.
00:38 colomon how hard are constants to do now?  It would be nice to get pi, e, and i back as well.  (And if someone can show me how to get started....)
00:39 pmichaud it's pretty easy overall.
00:40 jnthn A first cut is probably just binding the thingy into the current package, no?
00:40 tylerni8 joined #perl6
00:40 jnthn And maybe a wrapper to hide any rw-ness.
00:41 pmichaud just don't put the rw flag on it, and it's safe.
00:41 jnthn Well, maybe... :_)
00:41 tylerni7 left #perl6
00:41 tylerni7 joined #perl6
00:41 wolverian masak++ mst++ # make me want to get back into the fray
00:41 jnthn my $x; BEGIN { $x = 42 }
00:42 jnthn constant $y = $x; # need to be careful here I guess.
00:42 pmichaud the "=" used in a constant declaration will likely want to ignore rw-ness
00:42 colomon ng: constant y = 20; say y;
00:42 p6eval ng a9320d: Could not find non-existent sub &y␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
00:44 jnthn pmichaud: oh, yeah.
00:44 jnthn pmichaud: How are we going to sanely handle the various specialness of "="?
00:45 jnthn pmichaud: e.g. that in has $.x = 42; it also means something a bit interesting also.
00:45 pmichaud I thought we were going to do the has $.x = 42; using the signature binder somehow :)
00:45 jnthn Taht's not the problem.
00:46 jnthn The problem is that sometimes, somedeclarator $x = ... does not mean "compile to an assignment right here"
00:46 pmichaud right
00:46 pmichaud but somedeclarator can detect that and fix it
00:46 jnthn But it can't! :-)
00:46 ihrd1 left #perl6
00:46 jnthn Because the parse tree is
00:47 pmichaud oh, sorry
00:47 jnthn infix:<=> node with one child being the declarator, and the other being the RHS.
00:47 pmichaud infix:sym<=>  can detect it.
00:47 jnthn Yeah...it does that in master too. It's just kinda messy how we do it.
00:47 pmichaud well, it's messier if you don't use contextuals
00:47 pmichaud in our case we have  $*SCOPE == 'has'
00:48 jnthn Yeah but we don't. :-(
00:48 jnthn That's set in scope_declarator
00:48 pmichaud okay, I'll figure it out.
00:48 jnthn Which we've been into and left by the time we hit the infix:<=>
00:48 pmichaud (now isn't the right time.)
00:48 jnthn Sure.
00:48 jnthn I'm just flagging it up as an "interesting problem".
00:53 pugs_svn r29121 | lwall++ | [S02,S09] more tweakage of rat semantics
00:53 pugs_svn r29121 | Rat types are instantiations of a Rational role as suggested by moritz_++
00:55 TimToady it's just another thing that should be checked up on by a reducecheck, I think
00:57 TimToady using a contextual for = semantics is possible, but difficult, due to scoping issue
00:57 sjohnson sorry to ask here, but im trying to avoid a flame war in other channels:  how does one incorporate the perl6 type given/whenin p5 5.10.0
00:57 TimToady (admittedly the parse of list vs item = has to do just that, since it has to be known before reduce time)
00:58 TimToady you mean, like 'use 5.10;' ?
00:58 sjohnson i think i am "do in it wrong" in that case, as i managed to guess my way into use 5.10;
00:58 sjohnson thanks TimToady
00:59 sjohnson different errors are coming up now :)
00:59 TimToady there's also a way with 'use feature...'
00:59 TimToady but I prefer 'use 5.10'
00:59 sjohnson i tried use feature 'given';
00:59 sjohnson Feature "given" is not supported by Perl 5.10.0 at goose.pl line 3
01:00 chromatic use feature 'switch';
01:00 sjohnson chromatic++
01:00 TimToady which is why I prefer 'use 5.10.0;'
01:00 sjohnson TimToady++
01:00 chromatic which is why I prefer 'use Modern::Perl;'
01:00 TimToady which is why I prefer 'use v6;'  :P
01:01 chromatic You can't have everything in a language.  Where would you put it?
01:02 sjohnson heh i told ppl that i thought use v6; would do it, and opened up a can of worms
01:02 sjohnson heated discussion involving perl6 being a different language
01:03 pmichaud TimToady: I agree, reducecheck might be a better place.
01:03 pmichaud But I also agree we're going to have to do special things with parsing '=' anyway, so perhaps it naturally fits there.
01:05 jnthn Well, we managed it in master, so it's possible somehow. I just hope we can find a cleaner way when we get to that. :-)
01:06 TimToady rakudo: 42 + state $x = 0
01:06 p6eval rakudo 7347ec: Unable to set lvalue on PAST::Val node␤in Main (file <unknown>, line <unknown>)␤
01:06 gfx joined #perl6
01:07 TimToady not clear whether that should dwim
01:07 diakopter if not what you mean, then who? :)
01:07 pmichaud yes, but master also never handled the item versus list assignment issue, either :)
01:07 TimToady depends on how mean I am
01:07 jnthn pmichaud: Well, there is that. :-)
01:07 pmichaud I suspect they end up going together somehow.
01:08 jnthn Aye. It's the same bit of tree we need to shovel information around.
01:08 jnthn TimToady: Does that parse as 42 + (state $x = 0) ?
01:09 TimToady that would be one possible interpretation
01:09 jnthn That way should fall out relatively naturally doing something sane, I guess.
01:10 diakopter rakudo: say state $x += state $x = 6
01:10 p6eval rakudo 7347ec: Null PMC access in isa()␤in Main (file <unknown>, line <unknown>)␤
01:11 TimToady but std currently parses it as (42 + state $x) = 0 too
01:11 pmichaud anyway, the parse for infix:sym<=>  can set a contextual that indicates its lhs to the action method, I suspect.
01:12 TimToady my guess is that we should leave the leftward precedence of = alone, regardless of what we do to its right precedence
01:12 jnthn TimToady: That's probably an "assignment to non-rw thingy" error.
01:13 TimToady tweaking the following precedence for listops is crazy enough
01:13 beggars joined #perl6
01:13 pmichaud agreed.
01:13 pmichaud let's not change the lhs precedence.  too much like a wormhole :)
01:13 pmichaud it's nicer when assignment acts like a listop :)
01:14 TimToady well, except it never does leftward
01:14 TimToady oh, you mean the termness, nevermind
01:15 TimToady but it's not really that either, unless you count everything tighter than item assignment on the left as the term
01:15 TimToady which I suppose it kind of is, once it's reduced...
01:16 TimToady anyway, I'm fine with the above failing as an invalid LHS
01:18 TimToady dinner &
01:23 sjohnson rakudo: $_ = 'moose';  when /moose/ { print "donkey" }
01:23 p6eval rakudo 7347ec: donkey
01:23 sjohnson rakudo: $_ = 'moose'; if "moose" { print "donkey" }
01:23 p6eval rakudo 7347ec: donkey
01:23 sjohnson rakudo: $_ = 'moose'; if "moose2" { print "donkey" }
01:24 p6eval rakudo 7347ec: donkey
01:24 sjohnson rakudo: $_ = 'moose';  when /moose2/ { print "donkey" }
01:24 p6eval rakudo 7347ec:  ( no output )
01:24 sjohnson interesting
01:24 agentzh joined #perl6
01:25 arnsholt sjohnson: How so_
01:25 arnsholt s/_/?/
01:26 sjohnson when (in my drunken hypothesis) is simply an alias for if ($_ ~~ $whenarg)
01:27 arnsholt I think that's more or less true
01:28 colomon sjohnson: except that when when triggers, at the end of the block you there is an implicit "next".
01:28 colomon s/you//
01:28 sjohnson yeah
01:28 sjohnson i just realized that when i got my coffee
01:28 sjohnson from (i believe it was even with you) our given tests
01:28 sjohnson from a few months back
01:29 sjohnson where is the if ($_ ~~ 'goose') stuff in our given { } statements kept going thru the next lines in the given block
01:29 TimToady an implicit "break", actually; next is only for loops
01:29 sjohnson next == easier to type than continue
01:30 sjohnson :)
01:30 sjohnson i suppose in colomon's "loop" context, the closest thing would be last;  ;)
01:30 colomon TimToady: it's jump to the end of the enclosing block, right, so in a loop it's next not last.
01:31 TimToady sure, but I didn't see loops in the recent context
01:32 sjohnson i think it's gtfo in lolcode
01:34 sjohnson maybe p6 will be the first serious language to borrow something from lolcode someday :)
01:35 TimToady oy 'v me doots
01:35 sjohnson ( `ー´)
01:37 sjohnson this given/when thing is a big deal
01:37 sjohnson especially since you can use the $0 and $1 thingies from the when case
01:38 sjohnson though, if you wanted to differentiate between eq and ==, can it be done in the when case?
01:38 sjohnson or must you do when ($_ == 1)  / when ($_ eq '1.0')
01:39 * jnthn needs sleep
01:39 jnthn o/
01:39 TimToady night!
01:40 TimToady when 1 and when '1.0' are fine
01:40 sjohnson brackets not needed as well i reckon
01:40 sjohnson unlike p5
01:40 TimToady nod
01:44 nihiliad joined #perl6
01:46 sjohnson nice.com
01:46 * sjohnson dances
01:49 * colomon plays the tune
01:51 agentzh joined #perl6
01:54 payload joined #perl6
02:02 colomon Hmmm.  So you'd hack in NaN and Inf in method numish (Actions.pm).  But what would they do?
02:16 * colomon bravely inserts       elsif 'NaN' { make PAST::Val.new( :value(0) );}   in Actions.pm and recompiles.
02:16 colomon damn.  That worked!
02:16 colomon (if by work, you mean NaN now == 0)
02:17 colomon but at least it will parse them now without blowing up.
02:22 pnate joined #perl6
02:23 TimToady if 'foo' is always true
02:40 colomon oh dear.
02:40 colomon ng: say sqrt(2)
02:40 p6eval ng a9320d: 0␤
02:41 colomon So the first five square root tests fail, but the NaN/Inf ones work great even with NaN/Inf hacked to 0.
02:41 colomon So, implement basic sqrt, that's something I can do before going to bed, I think.
02:45 envi^office joined #perl6
02:46 frew_ joined #perl6
02:51 ng_feed rakudo-ng: colomon++
02:51 ng_feed rakudo-ng: Add Num.sqrt.
02:52 sjohnson how's it going colomon ?
02:52 colomon tired, slow, overwhelmed by bugs at $work.
02:53 jyf1987 joined #perl6
02:53 colomon finding nice little rakudo changes that can be easily made feels like the only progress I am making anywhere at the moment.
02:53 Exodist joined #perl6
02:53 jyf1987 left #perl6
02:54 * sjohnson pat pats colomon
02:54 sjohnson today was a great day at work, as we upgraded ubuntu ~~ new perl 5.10.0
02:55 lisppaste3 colomon pasted "cheap attempt to get NaN/Inf to not crash" at http://paste.lisp.org/display/90629
02:55 sjohnson this given/when statement is a breath of fresh air, as with say()
02:55 colomon phenny: tell pmichaud http://paste.lisp.org/display/90629
02:55 phenny colomon: I'll pass that on when pmichaud is around.
02:55 colomon phenny: tell jnthn http://paste.lisp.org/display/90629
02:55 phenny colomon: I'll pass that on when jnthn is around.
02:55 colomon given/when rocks.
02:56 colomon and yeah, I mocked "say" when I first learned about it, but it is sooooo nice.
02:56 colomon saving four or more keystrokes with most common print-type statements is a big win.
02:57 sjohnson totally
02:57 sjohnson especially when you are printing $vars, and you have to hit the . key and add  "\n";
02:57 sjohnson after it
02:57 sjohnson that gets old fast :)
02:57 sjohnson print $var."
02:57 sjohnson \n";
02:57 sjohnson is tedious type, for the exact reason above!  accidently hit enter
03:06 nihiliad joined #perl6
03:13 jaldhar joined #perl6
03:33 envi^home joined #perl6
03:43 kthakore joined #perl6
03:43 kthakore um hi
03:43 kthakore is there a C (lex/yacc) implmentation of rakudo somewhere?
03:43 kthakore oosp
03:43 kthakore um perl6
03:46 kthakore >>
03:48 kthakore guess it was a stupid question
03:49 Wolfman2000 kthakore: very few stupid questions here
03:49 kthakore Wolfman2000: so ?? A C imple of Perl 6 somewhere ? or even just a toy one?
03:50 Wolfman2000 I'm not aware of all of the different implementations.
03:50 astrojp joined #perl6
03:51 kthakore Wolfman2000: who would know?
03:51 Wolfman2000 Google?
03:51 kthakore Wolfman2000: is Perl6 even possible to make in Lex/Yacc?
03:51 Wolfman2000 I'm not the best one to ask of these questions.
03:52 Wolfman2000 Try speaking to those with the op power
03:52 kthakore Wolfman2000: no didn't see it ...
03:52 sjohnson kthakore: smop
03:52 kthakore still googling
03:52 kthakore sjohnson: yeah but .. where is the page for it
03:52 kthakore in wikipedia it looks empty ...
03:52 sjohnson kthakore: http://www.perlfoundation.org/perl6/index.cgi?smop
03:53 kthakore sjohnson: see thats the problem
03:53 kthakore sjohnson: it points to the pugs repo
03:53 kthakore sjohnson: but I don't see it in there
03:54 kthakore sjohnson: nvm see it now ...
03:54 kthakore sjohnson: thanks
03:59 sjohnson (´ー` )
04:02 diakopter kthakore: raw C? no..
04:03 diakopter built on tools (built on tools (built on tools ...)) built in C... yes
04:03 kthakore diakopter: aww ...
04:03 kthakore diakopter: is there a reason for that?
04:03 xomas_ joined #perl6
04:04 diakopter probably many who chose all the toolsets had their own reasons, yeah
04:05 kthakore h ok
04:05 diakopter specifically, none of them compile Perl 6 logic to machine code, that I know of.  They're all running in some sort of interpreter/loop/VM
04:10 diakopter actually, I take that back... http://perlcabal.org/~fglock/perlito.html  (Perlito, fglock's implementation(s), compiles to JS logic, which (when in Google's V8) is compiled to machine code logic.
04:10 diakopter )
04:11 diakopter but nearly every impl is (I think unavoidably) going to have several (or many) function calls in the host language for every Perl 6 op
04:12 diakopter (until they get good optimizing compilers)
04:12 diakopter (which may or not be possible/feasible)
04:12 mtve joined #perl6
04:12 astrojp left #perl6
04:12 astrojp joined #perl6
04:13 diakopter kthakore: but no, a lex/yacc impl isn't possible at all
04:13 kthakore diakopter: aww may I ask why? I just was wondering
04:14 diakopter sure
04:14 diakopter the grammar is both context-sensitive and content-sensitive
04:14 diakopter the content can mutate the grammar
04:15 kthakore diakopter: an example is?
04:16 TimToady rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 10!
04:16 p6eval rakudo 7347ec: 3628800␤
04:16 diakopter http://perlgeek.de/blog-en/perl-​5-to-6/20-a-grammar-for-xml.html (and the other articles in that category on moritz_'s site) might be helpful
04:19 diakopter I haven't heard of a preclusion of eval('mutate current grammar code') occurring during BEGIN, so the parser must know about eval(), in a sense...
04:20 diakopter though now that I think about it, I'm not sure that's feasible
04:21 TimToady it's not practical to have an indeterminate language in effect
04:21 TimToady but disallowing that also disallows useful stuff
04:22 * diakopter foresees a speculatification clarification in the near future
04:22 kthakore TimToady: diakopter is this partly why performance takes a hit? Because even the core needs to be high level?
04:22 TimToady we can't really think about optmization much till it's bootstrapped
04:22 TimToady but there's a lot of design for potential optimizability in there
04:23 diakopter I can see tainted grammars being created, but not mutating the current parse...
04:25 TimToady it certainly can't be done without collusion by something calling a declaration that does it
04:25 TimToady if you think about it, though, generic programming is a way of declaring limited indeterminacy
04:27 diakopter yeah, it's just that that kind of eval() would trigger quite a large recompile if a lot of optimization phases have occurred
04:27 diakopter I think.
04:28 diakopter I mean, the various BEGIN compilation units would be compiled already... .... /me trails off into nothingness
04:29 sjohnson rakudo:  say 10!;
04:30 p6eval rakudo 7347ec: Confused at line 2, near "!;"␤in Main (file <unknown>, line <unknown>)␤
04:30 sjohnson rakudo:  say(10!)
04:30 p6eval rakudo 7347ec: say requires an argument at line 2, near "(10!)"␤in Main (file src/gen_setting.pm, line 2593)␤
04:31 diakopter rakudo: say 10!R()
04:31 p6eval rakudo 7347ec: Method '!R' not found for invocant of class 'Int'␤in Main (file src/gen_setting.pm, line 324)␤
04:32 diakopter rakudo: say 10!_
04:32 p6eval rakudo 7347ec: Method '!_' not found for invocant of class 'Int'␤in Main (file src/gen_setting.pm, line 324)␤
04:32 diakopter heh
04:32 diakopter std: say 10!_
04:32 p6eval std 29121: ok 00:01 99m␤
04:34 diakopter std: sub postfix:<!> ($n) { [*] 1..$n }; say 10!; say ! !10! !>10!;
04:34 p6eval std 29121: ok 00:02 116m␤
04:34 Wolfman2000 does everyone like using the factorial?
04:35 TimToady so they can show of the reduce metaoperator :)
04:35 TimToady *off
04:36 diakopter rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 0!>0; # wrong?
04:36 p6eval rakudo 7347ec: 1␤
04:36 Wolfman2000 diakopter: technically not wrong
04:36 Wolfman2000 0! = 1
04:36 Wolfman2000 pain to try to understand, I know
04:36 gfx joined #perl6
04:36 diakopter yeah, but is it parsing it as !> or 0 !> 0
04:36 * Wolfman2000 complained about that in one of his college classes before
04:37 diakopter I mean, or 0! > 0
04:37 Wolfman2000 looks like it's parsing as... 0! > 0
04:37 Wolfman2000 the latter
04:37 Wolfman2000 Granted, I don't recall what !> does
04:38 diakopter rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 0!>1;
04:38 p6eval rakudo 7347ec: 0␤
04:38 diakopter rakudo: sub postfix:<!> ($n) { [*] 1..$n }; say 0!>=0;
04:38 p6eval rakudo 7347ec: 1␤
04:39 TimToady we thought about mixing infixes and postfixes into the same LTM, but decided it makes more sense to give postfixes priority
04:39 diakopter shouldn't ltm make that 0
04:39 diakopter oh
04:40 TimToady we want to encourage people to put whitespace around most infixes anyway
04:41 Wolfman2000 that reminds me...there was something I wanted to try to make.
04:44 Wolfman2000 ...and I failed.
04:44 Wolfman2000 rakudo: multi sub infix:<±>(Num $x, Num $y) { return $x + $y, $x - $y; }; say 5 ± 3;
04:44 p6eval rakudo 7347ec: too many positional arguments: 2 passed, 2 expected␤in Main (file <unknown>, line <unknown>)␤
04:44 kthakore TimToady: Wolfman2000 diakopter sorry ... I found a bug in hacking SDL::Perl so went away for a while
04:45 * Wolfman2000 wonders why this error exists...
04:46 TimToady rakudo doesn't do multiple arg returns yet
04:46 Wolfman2000 TimToady: does that include being unable to return a list/hash?
04:46 Wolfman2000 std: multi sub infix:<±>(Num $x, Num $y) { return $x + $y, $x - $y; }; say 5 ± 3;
04:46 p6eval std 29121: ok 00:02 111m␤
04:47 Wolfman2000 ...looks like pugs likes it
04:47 TimToady std isn't pugs
04:47 kthakore kk I got lost now so I am going to sleep
04:47 TimToady pugs: multi sub infix:<±>(Num $x, Num $y) { return $x + $y, $x - $y; }; say 5 ± 3;
04:47 kthakore TimToady: diakopter: Wolfman2000: good night
04:47 p6eval pugs: 82␤
04:47 kthakore thanks for the help
04:47 TimToady but yes, pugs likes it
04:47 Wolfman2000 ...right answers, bad spacing
04:47 TimToady night
04:48 Wolfman2000 pugs: multi sub infix:<±>(Num $x, Num $y) { return $x + $y, $x - $y; }; say (5 ± 3).join(",");
04:48 p6eval pugs: 8,2␤
05:02 diakopter rakudo: multi sub infix:<±>(Num $x, Num $y) { return ($x + $y | $x - $y); }; say 5 ± 3;
05:02 p6eval rakudo 7347ec: any(8, 2)␤
05:03 Wolfman2000 ...can't return lists, but can return junctions
05:03 Wolfman2000 If nothing else, I'm giving you guys more material
05:03 diakopter ± lends itself to a junction, imno (in my naive opinion)
05:04 Wolfman2000 Then...let me ask this. Is it possible to do extra math with junctions?
05:04 Wolfman2000 rakudo: multi sub infix:<±>(Num $x, Num $y) { return ($x + $y | $x - $y); }; say 5 ± 3 + 10;
05:04 p6eval rakudo 7347ec: any(18, 12)␤
05:05 diakopter O_O
05:05 Wolfman2000 rakudo: multi sub infix:<±>(Num $x, Num $y) { return ($x + $y | $x - $y); }; my $vals = 5 ± 3; say $vals * 2;
05:05 p6eval rakudo 7347ec: any(16, 4)␤
05:05 Wolfman2000 rakudo: multi sub infix:<±>(Num $x, Num $y) { return ($x + $y | $x - $y); }; say 5 ± 0;
05:06 p6eval rakudo 7347ec: any(5)␤
05:06 Wolfman2000 This brings up a new point...how do we extract only single values from an any?
05:16 PerlJam Wolfman2000: you mean collapse the junction and only pick one of the possibilities?
05:17 Wolfman2000 PerlJam: ...yeah
05:18 meppl joined #perl6
05:22 PerlJam Wolfman2000: you probably have to pull out all of the possibilities into a list and then select one.
05:22 Wolfman2000 PerlJam: Then I'll have to look up how to put the results of an any junction into a list.
05:38 am0c joined #perl6
05:45 Wolfman2000 rakudo: say any(1, 4, 5).join(",");
05:45 p6eval rakudo 7347ec: any("1", "4", "5")␤
05:45 Wolfman2000 rakudo: say join("," $x for any(1, 4, 5) -> $x);
05:45 p6eval rakudo 7347ec: Confused at line 2, near "(\",\" $x fo"␤in Main (file <unknown>, line <unknown>)␤
05:45 Wolfman2000 rakudo: say join(",", $x for any(1, 4, 5) -> $x);
05:45 p6eval rakudo 7347ec: Confused at line 2, near "(\",\", $x f"␤in Main (file <unknown>, line <unknown>)␤
05:45 Wolfman2000 bah
05:47 Woodi joined #perl6
05:49 Wolfman2000 perhaps an answer will show up once I wake up.
05:49 Wolfman2000 g'night
06:27 * diakopter looks around
06:56 szabgab joined #perl6
06:58 pnate2 joined #perl6
06:59 kaare joined #perl6
07:09 justatheory joined #perl6
07:20 chromatic joined #perl6
07:34 Su-Shee joined #perl6
07:34 Su-Shee good morning
07:34 moritz_ hi
07:35 Su-Shee moin mr mor(itz)ning-shift ;)
07:36 moritz_ :-)
07:39 moritz_ http://www.shadowcat.co.uk/bl​og/matt-s-trout/f_ck-perl-6/ and http://use.perl.org/~masak/journal/39912 if anybody missed it :-)
07:42 dalek nqp-rx: da7048b | dukeleto++ | CREDITS:
07:42 dalek nqp-rx: Add myself to CREDITS
07:42 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d​a7048be43342f068aa4d3c8336ea1667a46c3dd
07:44 moritz_ rakudo: say (357/12540).perl
07:44 p6eval rakudo 7347ec: 119/4180␤
07:46 moritz_ rakudo: say 357/12540
07:46 p6eval rakudo 7347ec: 0.0284688995215311␤
07:46 mathw morning
07:54 kst` joined #perl6
07:54 ihrd joined #perl6
07:55 xenoterracide_ joined #perl6
07:56 beggars joined #perl6
07:56 r0bby joined #perl6
07:56 moritz_ joined #perl6
07:56 Su-Shee joined #perl6
07:57 drbean joined #perl6
07:57 pmichaud joined #perl6
08:00 ng_feed rakudo-ng: pmichaud++
08:00 ng_feed rakudo-ng: Add simple version of import for core classes.
08:02 chromatic joined #perl6
08:02 barney joined #perl6
08:04 ssm joined #perl6
08:04 szabgab joined #perl6
08:04 pointme joined #perl6
08:04 Tene joined #perl6
08:04 mubot joined #perl6
08:05 hsb joined #perl6
08:09 justatheory joined #perl6
08:18 iblechbot joined #perl6
08:20 rjh joined #perl6
08:22 rfordinal joined #perl6
08:23 dalek nqp-rx: 2bd89cd | dukeleto++ | examples/ (3 files):
08:23 dalek nqp-rx: Add some basic NQP examples
08:23 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/2​bd89cde579c9e539ade9044462aa031ddc2b7a5
08:26 ejs joined #perl6
08:34 moritz_ std: while(1) { 2 }
08:34 p6eval std 29121: [31m===[0mSORRY![31m===[0m␤while() interpreted as postdeclared function call at line 1; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/BKpUTN2koo line 1:␤------> [32mwhile(1) [33m⏏[31m{ 2 }[0m␤    expecting any of:␤
08:34 p6eval ..brackete…
08:36 diakopter joined #perl6
08:36 diakopter I must've been netsplit
08:40 dalek nqp-rx: 8aa6c0f | pmichaud++ |  (2 files):
08:40 dalek nqp-rx: [nqp]:  Allow comments after statement-terminating close brace (TT #1307).
08:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/8​aa6c0ffa5c6583de896cb27834e4ffeedb3432e
08:40 dalek nqp-rx: 52b8c42 | moritz++ | examples/loops.nqp:
08:40 dalek nqp-rx: [examples] remove parenthesis from while-loop
08:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5​2b8c42b968dc3127184d5c4304a73a424811510
08:40 JimmyZ__ joined #perl6
08:40 dalek nqp-rx: c719911 | pmichaud++ | :
08:40 dalek nqp-rx: Merge branch 'master' of git@github.com:perl6/nqp-rx
08:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c​7199116fbd18e46927b0a9c1f64872295470f09
08:40 ejs1 joined #perl6
08:44 rfordinal left #perl6
08:52 beggars_ joined #perl6
08:52 dalek nqp-rx: ef88e99 | pmichaud++ | src/NQP/Grammar.pm:
08:52 dalek nqp-rx: At least generate *some* sort of error for things like while(1) and if(2).
08:52 dalek nqp-rx: We'll improve the error messages in a later commit.
08:52 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e​f88e9922fd8197cadbb0a963ef96045c65e7e6d
08:52 dalek nqp-rx: b8722f3 | pmichaud++ | t/nqp/05-comments.t:
08:52 dalek nqp-rx: Update plan.
08:52 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/b​8722f3af05109cd5dc5db89dd183ee2b65e1564
08:52 dalek nqp-rx: ecce4ce | pmichaud++ | src/stage0/ (3 files):
08:52 dalek nqp-rx: Bootstrap update with latest fixes.
08:52 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e​cce4ce0bdd3ce87761ba188228d2881d6ca92d2
09:11 xenoterracide joined #perl6
09:26 sri_ joined #perl6
09:26 xenoterracide joined #perl6
09:29 mariuz joined #perl6
09:37 jferrero joined #perl6
09:39 dakkar joined #perl6
09:39 xenoterracide joined #perl6
09:42 xenoterracide joined #perl6
09:48 xenoterracide joined #perl6
09:51 ihrd left #perl6
09:55 kst` joined #perl6
09:55 flip512 joined #perl6
09:56 flip512 Is someone working on user-defined indizes in array?
09:56 flip512 rakudo: enum A «A B C»; our @set{ A };
09:56 p6eval rakudo 7347ec: Confused at line 2, near "{ A };"␤in Main (file <unknown>, line <unknown>)␤
09:58 moritz_ flip512: nope
09:58 moritz_ there's some spec for that in S09
09:59 moritz_ but afaict nobody's working on it for the moment
10:05 flip512 moritz: yes, s09 is where I got that from
10:05 flip512 thanks
10:06 flip512 And I'm getting a strange error: "Unable to set lvalue on PAST::Val node
10:06 flip512 Seems that should be fixed, according to https://trac.parrot.org/parrot/ticket/810
10:07 moritz_ flip512: you can still get that when you try to assign to a non-lvalue
10:07 moritz_ rakudo: 4 = 5;
10:07 p6eval rakudo 7347ec: Unable to set lvalue on PAST::Val node␤in Main (file <unknown>, line <unknown>)␤
10:08 flip512 Ah, found that .... was an :name=4 instead of :name(4) in a new() call
10:08 flip512 Strange error messages everywhere ...
10:08 moritz_ aye :(
10:09 flip512 and using .attr(4) instead of :attr(4) gives other nice results ...
10:09 moritz_ well, that calls a method on $_
10:10 moritz_ whatever that might be in your context
10:10 flip512 yes ... I know
10:10 flip512 just mixing the various syntaxes
10:10 flip512 for me it was undef
10:10 moritz_ and since that's perfectly valid code, there's no way it could reasonably warn :(
10:10 flip512 so method X couldn't be found for class 'Failure'
10:10 flip512 yes ... maybe P6 is *too* flexible for such simple minds like mine ;-)
10:11 flip512 Perhaps I should go back to gwbasic or something like that
10:11 moritz_ :-)
10:11 moritz_ ON ERROR RESUME NEXT
10:11 moritz_ oh wait, taht was qbasic
10:15 flip512 well, maybe that was a bad example
10:15 flip512 I remember typing a lot of
10:15 flip512 5315 DATA 123,234,1,2,3,4,111,233,22,134,121,32
10:15 flip512 and comparing a checksum after each line
10:16 flip512 Now I get "No result object
10:16 flip512 in Main (file <unknown>, line <unknown>)
10:16 flip512 how very helpful
10:17 moritz_ rakudo: make 1
10:17 p6eval rakudo 7347ec: make() cannot set result of non-Match object in $/␤in Main (file <unknown>, line <unknown>)␤
10:17 moritz_ rakudo: sub a() { make 1 }; a()
10:17 p6eval rakudo 7347ec: make() cannot set result of non-Match object in $/␤in sub
10:17 moritz_ flip512: you should submit bug reports for less-than-awesome error messages
10:18 flip512 I don't have that much time ;-/
10:19 flip512 And I'd have to find a small example that gives the bad message
10:19 flip512 since that seems to be related to wrong declarations somewhere else it's not that easy to isolate
10:19 flip512 And mostly it's my fault anyway
10:23 flip512 but that's an interesting one
10:24 flip512 If only the file and line number were told ...
10:34 payload joined #perl6
10:37 kthakore left #perl6
10:45 zamolxes joined #perl6
10:58 justatheory joined #perl6
11:05 bloonix joined #perl6
11:09 jnthn morning
11:09 phenny jnthn: 02:55Z <colomon> tell jnthn http://paste.lisp.org/display/90629
11:16 colomon sorry to nag about that  :)
11:19 moritz_ oh hai
11:21 colomon \o
11:24 frettled Good $timeofday!
11:24 moritz_ rakudo: say time()
11:24 p6eval rakudo 7347ec: 1258542916.30302␤
11:26 moritz_ rakudo: say time()
11:26 p6eval rakudo 7347ec: 1258543037.24337␤
11:26 moritz_ rakudo: say time() - time() + time() - time()
11:26 p6eval rakudo 7347ec: -0.0633919239044189␤
11:26 moritz_ rakudo: say -time() + time()
11:26 p6eval rakudo 7347ec: 0.00581502914428711␤
11:35 envi^home joined #perl6
11:41 envi_home2 joined #perl6
11:43 IllvilJa joined #perl6
11:44 jnthn colomon: Nagging sometimes works. :-)
11:45 colomon :)
11:47 ng_feed rakudo-ng: jnthn++
11:47 ng_feed rakudo-ng: Add NaN/Inf/+Inf/-Inf.
11:47 colomon \o/
11:50 colomon wow.  that's a nice simple patch.
11:52 sjohnson hi
11:52 sri__ joined #perl6
11:53 colomon sqrt.t now passes
11:55 colomon ah, in a slightly hacked version  :)
11:55 perlygatekeeper joined #perl6
11:56 colomon jnthn++
11:57 kst` joined #perl6
12:00 colomon I will give sqrt.t a polish when I'm no longer cradling a sleeping toddler.
12:03 * jnthn attempts to build a Parrot with ICU
12:03 jferrero joined #perl6
12:09 zloyrusskiy joined #perl6
12:09 jnthn Aww. uc.t fails weirdly.
12:10 jnthn Method 'substr' not found for invocant of class 'Integer'
12:12 jnthn ng: say substr('embark', 2, 3)
12:12 p6eval ng 09beb6: Confused at line 1, near "say substr"␤current instr.: 'perl6;HLL;Grammar;panic' pc 448 (src/stage0/HLL-s0.pir:300)␤
12:12 jnthn ...confused?!
12:13 jnthn rakudo: say substr('embark', 2, 3)
12:13 p6eval rakudo 7347ec: bar␤
12:13 ng_feed rakudo-ng: moritz++
12:13 ng_feed rakudo-ng: we pass numeric-context.t, jnthn++, colomon++
12:13 * jnthn was expecting "missing substr" or so!
12:13 * moritz_ too
12:13 moritz_ Can't find non-existing sub substr :-)
12:14 moritz_ a LTA but informative error message
12:15 moritz_ hugme: twitter rakudoperl rakudo-ng now passes 233 spectests (22 files)
12:15 moritz_ hugme: twit rakudoperl rakudo-ng now passes 233 spectests (22 files)
12:15 moritz_ hugme: help
12:15 hugme moritz_: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
12:16 moritz_ hugme: tweet rakudoperl rakudo-ng now passes 233 spectests (22 files)
12:16 * hugme hugs moritz_; tweet delivered
12:22 colomon moritz_: there's also 700+ tests passing in rat.t now, but still about 4 it cannot handle in ng.
12:29 payload joined #perl6
12:45 SmokeMachine joined #perl6
12:52 jnthn slovak class! \o/ back later
13:10 stepnem joined #perl6
13:11 takadonet morning all
13:18 arnsholt hugme: list projects
13:18 hugme arnsholt: I know about book, hugme, json, november, nqp-rx, perl6-examples, proto, svg-matchdumper, svg-plot, temporal-flux-perl6syn, tufte, web
13:32 payload joined #perl6
13:35 riffraff joined #perl6
13:48 payload1 joined #perl6
13:53 PerlJam joined #perl6
13:53 PerlJam greetings #perl6lings
13:54 moritz_ oh hai
13:55 takadonet hey PerlJam
14:02 allbery_b joined #perl6
14:08 pugs_svn r29122 | colomon++ | [t/spec] Quick overhaul to test method forms of sqrt, as well as more carefully distinguishing between Rats and Nums and not using unnecessary precision in numeric constants.
14:16 cognominal__ I am not too sure to understand the relationship between nqp-rx and rakudo-ng. Is this related to the fact that rakudo-ng very often pulls a recent parrot from svn?
14:17 Wolfman2000 *yawn* morning
14:17 Wolfman2000 PerlJam: If it matters, I was unable to find the right way to turn an any() junction into a list.
14:18 PerlJam cognominal__: rakudo-ng uses nqp-rx.  nqp-rx is included in newer parrots.
14:18 moritz_ cognominal__: the 'ng' branch rebuilds rakudo based on the protoregexes that nqp-rx provides
14:19 cognominal__ ok. thx.
14:19 PerlJam cognominal__: before we had PGE for parsing and NQP for actions,   nqp-rx combines both into one.
14:20 cognominal__ I am reading Grammar.pg, this protoregex suff is indeed very nice.
14:24 cognominal__ I like very much FatRats too. Wee need FlatFleas too and Perl6 will spread like bubonic plague :)
14:25 fridim_ joined #perl6
14:28 * jnthn back
14:32 colomon cognominal__: I saw a reference to FatRat in an e-mail, but don't understand where it is coming from?  Isn't Ratio supposed to be the BigInt/BigInt super-Rat?
14:34 cognominal__ I suppose that FatRat is the new name of Ratio, or maybe it is the opposite. But somehow I find FatRat more fun and mnemonic
14:35 ng_feed rakudo-ng: colomon++
14:35 ng_feed rakudo-ng: Turn sqrt.t back on.
14:35 cognominal__ I like    FatRat.new($nu,$de)     $nude is a good way to remember what is the numerator and denominator
14:35 colomon cognominal__: you know Rat.nude is already a method, right?  :)
14:36 colomon cognominal__: I see, right, Ratio is being redubbed FatRat.  Lovely!
14:37 cognominal__ I like to see how the -Ofun blends well with the -Ouseful and -Omnemonic
14:37 cognominal__ I did not know but that makes sense
14:40 am0c joined #perl6
14:50 john joined #perl6
14:51 Guest23784 Is it planned for Perl 5 to be among the hosted Parrot languages? I don't see it listed on the Parrot languages page.
14:51 Guest23784 I see Punie there.
14:52 [particle] reimplementing perl 5 on parrot is a *hard* task.  years ago, there was an effort called 'ponie'.  it's dead.  now, we're looking at integrating perl 5 with parrot, in a project called 'blizkost' (if i've spelled that correctly)
14:52 PerlJam Guest23784:  you want to ask that on #parrot, but if the perl 5 devs want to target parrot, they are free :)
14:53 cognominal__ Guest23784,  there is a project called blizkost for the embedding of perl5 interpreter in rakudo
14:53 moritz_ not only rakudo
14:53 pmichaud good morning, #perl6
14:53 phenny pmichaud: 02:55Z <colomon> tell pmichaud http://paste.lisp.org/display/90629
14:53 moritz_ any PCT-based language
14:53 [particle] http://github.com/jnthn/blizkost
14:53 Guest23784 Ah, so, Parrot may simply call out to the locally installed Perl 5.
14:53 colomon pmichaud: luckily, jnthn++ already did that I was asking for in that paste.  :)
14:53 [particle] correct
14:53 moritz_ pmichaud: jnthn already applied a fixed version of that patch
14:53 cognominal__ this project is in  a very early stage
14:54 moritz_ heh :-)
14:54 Guest23784 Thank you. Will look into blizkost.
14:55 PerlJam Guest23784: http://github.com/jnthn/blizkost
14:55 Guest23784 @cognominal: understood
14:55 lambdabot Unknown command, try @list
14:56 Guest23784 (sorry, don't know how to direct a reply to a particular user on irc)
14:56 moritz_ Guest23784: just type his name (without leading @)
14:57 Guest23784 moritz thanks
14:57 Guest23784 Hm
14:57 Guest23784 moritz_ thanks
14:57 Guest23784 <moritz_> thanks
14:57 PerlJam what does lambdabot do besides erroneously carp at people that happen to mention @stuff  ?
14:57 Guest23784 &amp;moritz_ thanks. :)
14:58 moritz_ PerlJam: tracks karma, delivers messages, annoys people
14:58 moritz_ Guest23784: my IRC client hilighted me in all these cases :-)
14:58 Guest23784 Ah. Thanks. I'm using the webchat in my browser.
14:58 PerlJam phenny delivers messages too (without annoyance)
14:59 cognominal__ Perljam,  lambdabot is a very powerful haskell bot with many plugins, it was popular with people doing pugs
14:59 moritz_ I know
14:59 moritz_ > 2 + 4
14:59 lambdabot 6
14:59 cognominal__ http://www.haskell.org/haskellwiki/Lambdabot
14:59 moritz_ > map inc 1 2 3
14:59 lambdabot Not in scope: `inc'
14:59 Guest23784 left #perl6
15:00 moritz_ > map (+ 1) 1 2 3
15:00 lambdabot Couldn't match expected type `t1 -> t2 -> t'
15:00 lambdabot against inferred type ...
15:00 PerlJam cognominal__: who maintains it?  I wouldn't even be having this conversation if it wasn't annoying.  If someone could fix the annoying carping, that would be awesome.
15:00 moritz_ oh yes, it complaiins about type mismatches too
15:01 kst` joined #perl6
15:02 cognominal__ PerlJam, we share it with the haskell community
15:03 cognominal__ I mean this bot instance
15:04 pmichaud anyone have a burning perl6 priority for me this morning?
15:04 PerlJam pmichaud: make more stuff work?  :)
15:05 colomon list assignment?  ;)
15:05 moritz_ pmichaud: eval
15:05 colomon eval!
15:05 PerlJam pmichaud: I was going to see about implementing gather/take for moving over more of the old setting, but it might be that I don't know how hard it would be.
15:05 moritz_ not burning, just wanting
15:05 colomon pi
15:08 colomon would Ranges be something a mortal could implement in ng?
15:09 [particle] i *think* a mortal implemented it last time... ;)
15:09 masak joined #perl6
15:09 PerlJam colomon: I usually take the (perhaps irrational) view that I can implement anything and then go from there.
15:09 jnthn lolitsmasak!
15:09 pmichaud colomon: I'd like to see ranges implement in p6
15:09 masak good some-time-later-in-the-day, #perl6.
15:10 pmichaud *implemeted
15:10 PerlJam colomon: I don't mind being wrong as I learn something either way
15:10 colomon pmichaud: that sounds like something for mortals, then.
15:10 * jnthn hands masak an alarm clock for tomorrow
15:10 moritz_ lol
15:10 nihiliad joined #perl6
15:10 masak jnthn: I'll get up tomorrow, I'm not worried about that.
15:11 jnthn masak: Good. I don't want to be at the airport looking for somebody who didn't get up in time for their flight. :-)
15:11 masak I don't want to be that person.
15:11 jnthn :-)
15:12 Psyche^ joined #perl6
15:12 jnthn pmichaud: List assignment, gather/take and eval would all be excellent.
15:12 moritz_ airport? I thought masak was doing the release tomorrow...
15:12 jnthn pmichaud: gather/take mostly because it unblocks a bunch of other things.
15:12 jnthn moritz_: Airports have wifi... ;-)
15:13 moritz_ jnthn: not in .de :(
15:13 jnthn moritz_: orly?
15:13 jnthn moritz_: Both my localish airports have free wifi.
15:13 jnthn I must live in a small pocket of awesomeness in the world of airport wifi.
15:13 moritz_ jnthn: the ones in bavaria don't
15:13 masak moritz_: I'll try to do the release tomorrow morning. otherwise, I'll do it at the Hotel in Riga.
15:14 jnthn Oh yes, we have free wifi for all(3,4) nights. :)
15:14 masak \o/
15:14 pmichaud a lot is blocking on gather/take?  really?
15:14 pmichaud that's.... odd
15:14 PerlJam cool.  sounds like the release will be done when I wake up tomorrow
15:14 masak yes.
15:14 masak if _I_ wake up tomorrow. :)
15:15 [particle] write an alarm clock in perl 6. if it doesn't work, you shouldn't release anyway.
15:15 colomon my fantasies of awe-inspiring lazy code are blocking on gather/take, but I don't know about spectests...
15:15 pmichaud note that map in ng is already lazy
15:16 colomon (Though actually, shouldn't Range be using gather / take internally?)
15:16 pmichaud no
15:16 moritz_ colomon: nope
15:16 jnthn pmichaud: Well, a lot of the list primitives are built in gather/take, no?
15:16 moritz_ colomon: read the specs about Range and RangeIterator
15:16 pmichaud jnthn: no.
15:16 pmichaud a lot of the list primitives are built in map :-)
15:16 jnthn pmichaud: I was rather expecting map should be written in terms of it for example.
15:17 pmichaud jnthn: I thought about doing map that way, then decided that's really inefficient for map
15:17 jnthn pmichaud: ah, ok
15:17 pmichaud especially since that's not needed :)
15:17 jnthn pmichaud: If you aren't expect that we'll continue to have a bunch of the list bits (e.g. grep) built on it, then it's likely less urgent.
15:18 jnthn pmichaud: Oh, placeholders would bring back a bunch of tests too, I expect.
15:18 colomon moritz_: I'd ask where, but you'd just tell me to use ack...
15:18 jnthn A lot of the tests in S06-signature for example probably could start to pass then, or easily be made to.
15:19 jnthn pmichaud: I don't mind doing those, but I won't have time today and possibly not tomorrow either.
15:19 pmichaud is grep just something like...
15:20 pmichaud method grep(Matcher $x) { self.map( { $_ if $_ ~~ x } ) }
15:20 jnthn pmichaud: You could write it that way too, yeah.
15:20 jnthn pmichaud: tmtowtdi :-)
15:20 pmichaud seems a lot more efficient that way :-)
15:21 jnthn pmichaud: Well, it does take the pressure of making gather/take be super efficient.
15:21 jnthn :-)
15:21 jnthn *off
15:23 * PerlJam ponders implementing Str.split() using map instead of gather
15:23 Woody2143 joined #perl6
15:23 pmichaud that one might want gather/take, yes.
15:24 moritz_ Str.split($regex) would greatly benefit from the :pos() modifier
15:25 moritz_ or :continue
15:25 pmichaud how would that look?
15:26 moritz_ in ideal Perl 6 ~~ m:pos($pos)/$regex/
15:26 pmichaud okay, so we also need lexical regex vars in regexes, then.
15:26 moritz_ but it would be enough to have any way to tell the regex engine not to start at pos(0), but at pos($something)
15:27 moritz_ that could also be as $regex.parse($string, :pos($something)) or so
15:27 moritz_ I really don't care how the interface looks for now
15:27 pmichaud might need to do    Grammar.parse($_, :rule($regex), :continue($something))
15:28 PerlJam pmichaud: so, if you're still asking, my vote goes for anything that lets us implement more Str methods
15:28 pmichaud PerlJam: okay.  So, I'm guessing regexes and gather/take, then?
15:29 PerlJam aye
15:29 pmichaud for the time being we can bring over the eager gather/take from master, I suspect.  That'd be fine as a first cut.
15:29 jnthn btw, substr may be easy-ish to put back in and would unblock some string tests.
15:30 pmichaud yes, substr should be easyish
15:30 jnthn e.g. uc.t is blocked on that, iirc
15:30 jnthn or at least, it passes all the way down until the point that it needs substr.
15:33 pmichaud unless others wish me to do otherwise, I think I'll leave the lhf for others to pick up :-)
15:34 jnthn Yes, I was more throwing it out to the crowd rather than for you specifically. :-)
15:41 colomon Why cannot a Range be *..* ?  Is -Inf .. Inf allowed?
15:45 [particle] it's hard to iterate
15:46 colomon [particle]: so is -Inf .. 0 (ie * .. 0), yet that is allowed.
15:46 huf but... but... koalas are cute.
15:47 masak hm, I can't run Unicode spectests because I don't have ICU.
15:47 [particle] i think * is too undefined without context
15:47 [particle] is * .. * 0 .. 0?
15:47 masak does anyone here run ICU on Mac OS X?
15:47 KyleHa joined #perl6
15:47 * [particle] needs to wake up a bit
15:47 Wolfman2000 masak: I have Mac OS X, but I think I corrupted my Perl 5 installs
15:48 masak Wolfman2000: this is for Rakudo.
15:48 Wolfman2000 So even if I have ICU, I probably can't run it
15:48 * Wolfman2000 hasn't tried installing Perl 6 on Mac OS X yet
15:48 colomon [particle]: no, * is -Inf at the beginning of a range and +Inf at the end.
15:48 jnthn masak: I managed to make ICU work on Win32 this morning...
15:48 masak I barely know what ICU is.
15:48 jnthn It does unicode stuff.
15:48 KyleHa Intensive Care Unit?
15:49 jnthn masak: ICU haven't researched it much yet.
15:49 jnthn masak: But basically, it's a set of data files and stuff
15:49 [particle] api
15:49 jnthn masak: And some glue...
15:50 jnthn masak: Anyway, Parrot uses it to support a lot of bits of unicode.
15:50 colomon jnthn: arrrrgh!
15:50 jnthn colomon: Yes? :-)
15:50 * jnthn gets back to printing out his reservations
15:50 colomon jnthn: protesting your little joke back there.  :)
15:51 KyleHa I see ng now passes all the tests in numeric-context, which master can't do.  Impressive!
15:51 jnthn masak: See if you have icu-config program handy, or if you can install it...it'll just give Parrot's Configure.pl the info that it needs.
15:51 jnthn masak: And you won't have to mess around setting flags.
15:51 jnthn (Like I did on Windows this morning.)
15:55 masak http://aarone.org/2006/12/​10/libicucore-on-mac-os-x/
16:00 jnthn Riga has trams! \o/
16:01 masak oh, that's nice.
16:02 alester joined #perl6
16:05 masak I get a Null PMC access running t/spec/S12-attributes/instance.rakudo
16:05 masak can anyone confirm that?
16:05 masak it happens after test 129.
16:06 synth joined #perl6
16:06 KyleHa That looks familiar.
16:07 colomon masak: yes, moritz and I were trying to figure out that one last week.
16:07 colomon (unsuccessfully, obviously.)
16:07 masak rakudo: class A { has $.x; method foo { $!x := 42 } }; A.new.foo
16:07 masak there it is.
16:07 p6eval rakudo 7347ec:  ( no output )
16:07 masak p6eval--
16:08 * colomon is awed at [~]
16:09 * masak marks the failing test as skip
16:09 KyleHa I think a regression like that is supposed to have an RT ticket to go with it if the test gets fudged.
16:10 masak KyleHa: go right ahead.
16:10 * colomon just figured out that's just concatenation and not stringification.
16:11 masak colomon: well, it's both, if the arguments aren't strings :)
16:11 colomon orly?
16:11 jnthn masak: I've worked out where to get off the bus and how to get from there to the hotel. :-)
16:11 jnthn masak: It's only a couple of blocks, so I'm afraid we're going to have to try really hard to get lost.
16:11 masak jnthn: do you know what counts as bus tickets?
16:12 jnthn masak: Print off the voucher you shoulda been emailed.
16:12 masak ah. good.
16:12 jnthn There's two pages, one for to the city, one back from it.
16:12 jnthn masak: Note that it's not the invoice...which was also attached to the my email.
16:13 jnthn masak: It's the one that's like, "Please note that you must print out this voucher and present it to the Airport Express"
16:13 masak oki.
16:13 jnthn driver in order to check its validity
16:13 masak ah.
16:13 jnthn masak: Also, they seem keen on me checking in online...apart from online check-in as "technical problems" atm.
16:13 jnthn masak: Maybe not from your airport though.
16:13 masak jnthn: nod, same here.
16:14 jnthn Ah, OK.
16:14 masak it's airport, independent, I think.
16:14 masak s/, /-/
16:14 jnthn I need to leave for pm group in 5-10 mins (I think I'm speaking first tonight), so I'll do it when I'm back from pm meeting and pivo.
16:15 masak I'll be here later in the evening as well.
16:16 jnthn Cool.
16:17 jnthn Anyway, I think asides from getting checked in and printing that off, and stuffing a few more clothes into my bag, I'm all set. :-)
16:17 jnthn I didn't write my lolsql lightning talk yet...but can do that while I'm there. It's only 5 mins of loling.
16:18 pugs_svn r29123 | masak++ | [t/spec/S12-attributes/instance.t] fudged failing test
16:21 masak jnthn: :)
16:21 masak jnthn: I'm maybe halfway done writing my talk.
16:21 masak the general structure is in place now. need to make loads of slides.
16:21 masak and fix the PDF generation.
16:22 jnthn :-)
16:22 jnthn masak: I did have the advantage of having given this talk before :-)
16:23 masak yeah.
16:24 masak hm, apparently you can combine PDF pages with Automator...
16:26 * jnthn -> electricka -> pm group -> pub
16:27 colomon ng: say Bool::False
16:27 p6eval ng 478e3a: 0␤
16:28 colomon rakudo: say 1..5
16:28 p6eval rakudo 7347ec: 12345␤
16:29 colomon rakudo: my $a = 1..5; say $a.perl; say $a
16:29 p6eval rakudo 7347ec: 1..5␤12345␤
16:30 kst` joined #perl6
16:38 kst` joined #perl6
16:39 cdarroch joined #perl6
16:39 ng_feed rakudo-ng: colomon++
16:39 ng_feed rakudo-ng: Add Range.pm from master, with obsolete and non-compiling stuff ripped out.
16:40 KyleHa Why are arbitrary precision Rats "Fat" but AP Ints are "Big"?
16:41 facsimile joined #perl6
16:42 colomon I believe because FatRat sounds funny.   :)
16:42 arnsholt KyleHa: Because it's puntastic? =)
16:44 kaare_ joined #perl6
16:45 KyleHa I kinda figured that was it.
16:46 pmichaud when do we get the FatCats?  We might attract more Wall-St. investment with those
16:46 arnsholt True
16:47 arnsholt But I think Fleas are more important, as someone pointed out
16:47 arnsholt After all, if Perl 6 spreads like the plague, it'll be unstoppable! =D
16:49 KyleHa Is there an easy way I can get perl Configure.pl --gen-parrot to parallel build Parrot?
16:49 moritz_ KyleHa: nope
16:49 moritz_ KyleHa: unless you patch build/gen_parrot.pl
16:50 pugs_svn r29124 | lwall++ | [pm.txt] answer Ml-1 re stringification of type objects
16:50 moritz_ (which I did for nqp-rx, you could steal that)
16:51 colomon OffTopic: How do you get the current directory in perl 5?
16:51 PerlJam colomon: use Cwd;
16:51 arnsholt colomon: There's a module for it. Cwdd IIRC
16:51 [particle] use Cwd;
16:51 colomon danke!
16:51 * PerlJam wins!
16:52 masak .oO( maybe time to rename misc/pm.txt... )
16:52 arnsholt Indeed you do. I always use too many words =)
16:52 [particle] hugme: hug PerlJam
16:52 * hugme hugs PerlJam
16:52 colomon ironically, already used by this module of mine... I hate trying to debug 8 year old code.
16:53 [particle] rewrite it in perl 6!
16:53 lmc joined #perl6
16:53 [particle] then ask how to get the current directory :)
16:54 colomon pretty sure the quantity of work this script does would bring Rakudo to its knees.
16:54 jaffa8 joined #perl6
16:55 arnsholt colomon: Which is precisely why you should do it =)
16:55 jaffa8 perl6 : print "Iam who I am";
16:56 jaffa8 perl6: print "Iam who I am";
16:56 p6eval elf 29124, pugs, rakudo 7347ec: Iam who I am
16:56 colomon arnsholt: yes, that might be useful for Rakudo, but it would be seriously detrimental to my fixing this bug in the next five minutes so I can get on with real $work.
16:58 arnsholt Awww. You're too practical ;)
17:01 colomon arnsholt: yet impractical enough to be hacking on ng's Range.pm while I wait for my code to compile.
17:01 arnsholt Good, good =)
17:02 arnsholt I'm just teasing, anyways =)
17:02 KyleHa http://xkcd.com/303/
17:03 colomon rakudo: say "hello " ~ ("troubled" if 0) ~ " world
17:03 p6eval rakudo 7347ec: Confused at line 2, near "~ \" world"␤in Main (file <unknown>, line <unknown>)␤
17:04 colomon KyleHa: I have the t-shirt.  :)
17:04 colomon rakudo: say "hello " ~ ("troubled" if 0) ~ " world";
17:04 p6eval rakudo 7347ec: hello  world␤
17:04 KyleHa rakudo: say "hello " ~ { "troubled" if 0 } ~ " world";
17:04 p6eval rakudo 7347ec: hello _block56 world␤
17:04 KyleHa Heh.
17:05 TimToady KyleHa: note that Ints are already "Big" in P6, so we never have to use the term BigInt.  We could in fact, say that Ints are always "Fat".
17:06 KyleHa I wish I knew whether I knew that before or not.
17:06 jaffa8 rajudo:say 2**32;
17:06 jaffa8 rakudo:say 2**32;
17:06 TimToady rakudo: say 2**32
17:06 p6eval rakudo 7347ec: 4294967296␤
17:06 TimToady it like me better
17:07 TimToady *likes
17:07 colomon jnthn, pmichaud: Any idea why overloading infix:<..> compiles but does not parse?
17:07 jaffa8 rakudo:  say 2**64;
17:07 p6eval rakudo 7347ec: 1.84467440737096e+19␤
17:07 jaffa8 rakudo:  say 2**164;
17:07 p6eval rakudo 7347ec: 2.33840261972944e+49␤
17:07 jaffa8 rakudo:  say 2**464;
17:07 p6eval rakudo 7347ec: 4.76341026354369e+139␤
17:07 jaffa8 rakudo:  say 2**964;
17:07 colomon jaffa8: Ints are not yet BigInts in Rakudo.
17:07 p6eval rakudo 7347ec: 1.559250241824e+290␤
17:08 TimToady rakudo: say 18446744073709551616
17:08 p6eval rakudo 7347ec: 1.84467440737096e+19␤
17:08 KyleHa Something about calling the Rats "Fat" bothers me a little.  They could just as well be called "Bloated".
17:08 jaffa8 what is a bigint, 8 bytes?
17:08 TimToady arbitrary precision
17:08 jaffa8 Or overweight.
17:08 moritz_ aribrary size
17:08 TimToady oh native? there isn't one
17:09 TimToady moritz_: did you see the pm.txt answer above?
17:09 jaffa8 ok
17:09 [particle] ROAS - Rats of arbitrary size
17:09 moritz_ TimToady: yes
17:10 moritz_ TimToady: still thinking about it in the background
17:10 moritz_ TimToady: I wonder how it mixes with .encode and Bufs
17:10 colomon [particle]: ROUS - Rats of unlimited size
17:11 TimToady FatRat sounds happier
17:11 [particle] "i don't think they exist."
17:11 PerlJam someone needs a nudge in the direction of Princess Bride
17:11 colomon :)
17:11 TimToady that was native fatints :P
17:12 [particle] anybody want a peanut?
17:13 KyleHa masak: I finally got that ticket open we talked about:  http://rt.perl.org/rt3/Tic​ket/Display.html?id=64850
17:13 colomon_ joined #perl6
17:14 colomon TimToady: am I correct in believing that in 'a' ..^ 'c' there cannot be whitespace between the .. and the ^?
17:15 Juerd ..^ is the operator
17:15 colomon TimToady: and as long as I'm asking Range questions, why not * .. * as a valid Range?
17:17 arnsholt colomon: It makes sense to me. After all, what's the correct starting point for such a sequence?
17:17 colomon arnsholt: * .. 10 is a legal Range.
17:17 colomon Ranges only have a "starting point" if they are turned into iterators.
17:18 arnsholt Oh, right. So * .. * would basically "anything"?
17:18 arnsholt In that case I think it would be better to just spell it *
17:18 colomon That's my way of thinking.  -Inf .. Inf
17:18 TimToady spec'ed as anything Orderable
17:19 colomon Oh, is that it?  You don't get any type info if you have * .. *?
17:19 TimToady colomon: and yes, as Juerd implied, you may not put a space in ..^
17:19 colomon I've been thinking it as numbers, but * .. 'a' is legal too, isn't it?
17:21 TimToady you know, there's a whole section on this at S03:3056
17:21 TimToady which will probably answer your next 4 questions too :)
17:22 colomon TimToady: Been staring at that section for the last hour.
17:23 TimToady oh, I see we made *..* illegal
17:23 TimToady forgot that
17:23 colomon And I was asking why.
17:23 TimToady since you can always smartmatch against Orderable if that's what you mean
17:24 colomon TimToady: I'm thinking of a sub that takes a Range as a method -- it might make sense to sometimes have the Range be "everything".
17:24 TimToady or Numeric, or whatever you really mean
17:24 TimToady why would something take a Range as a method when it could take a smartmatch
17:24 arnsholt Hmmm. Something makes http://perlcabal.org/syn/S03.html render weirdly in Opera on OS X
17:25 TimToady s/method/argument/
17:25 colomon TimToady: err... not having a freaking clue how to handle a smartmatch?
17:25 colomon specifically wants to have max and min values (even if they might be Inf)?
17:26 TimToady I suspect in that case it's probably more readable to write -Inf..Inf in any case
17:26 TimToady the notational convenience of *..* is not worth the headscratching
17:27 colomon sure.
17:27 TimToady and since the type is not well characterized, $range.min wouldn't know what to return anyway
17:29 quietfanatic joined #perl6
17:30 * colomon is starting to think it would have been faster to implement basic series operator for his immediate purpose...
17:33 iblechbot joined #perl6
17:37 nwc10 joined #perl6
17:37 nwc10 what's "ng" in the context of p6eval?
17:38 KyleHa It's the 'ng' (new grammar) branch of Rakudo.
17:38 nwc10 ah right. thanks
17:38 KyleHa My pleasure.
17:38 nwc10 left #perl6
17:43 stephenlb joined #perl6
17:47 kidd joined #perl6
17:53 ng_feed rakudo-ng: colomon++
17:53 ng_feed rakudo-ng: Change terminology to match S03.  Get cheating version of Range.perl working.
17:54 pmurias joined #perl6
17:56 * colomon finally got the ridiculous bug in his $work build tools sorted, so now he can get down to the real compile errors.
18:01 pugs_svn r29125 | kyle++ | [t/spec] Test for RT 70596: parsing of abs(1).WHAT
18:01 pugs_svn r29126 | kyle++ | [t/spec] Test for RT 70606: null pattern after alternation
18:02 rlarson87 joined #perl6
18:04 [1]jaffa8 joined #perl6
18:05 pugs_svn r29127 | lwall++ | [S02] correction from ron.koerner++ on s/multiple/power/
18:05 pugs_svn r29127 | adopt 2's and 5's factoring as normative for both .Str and .perl of Rats
18:06 quietfanatic I have a worry about current design.
18:07 quietfanatic To overload smart match
18:07 quietfanatic you're supposed to overload the .ACCEPTS method instead of infix:<~~>, right?
18:07 quietfanatic What if I want MyType ~~ 42 to do something special?
18:08 quietfanatic I'd have to augment Int {...}
18:08 quietfanatic and Num and Rat if I want anything Numeric.
18:09 moritz_ quietfanatic: you can also overload the numification of MyType
18:09 quietfanatic But then I've overloaded the numification too.
18:09 moritz_ right
18:09 moritz_ you can't have everything :-)
18:10 quietfanatic Well I want everything :)
18:10 moritz_ the problem with overloading infix:<~~> directly is that it's partially syntactic
18:10 quietfanatic I understand that...
18:10 TimToady that's what MONKEY_TYPING is for, having everything
18:11 quietfanatic If I recall, there used to be a way to declare subs that looked like methods from outside a class...
18:11 quietfanatic a long time ago
18:12 quietfanatic is that now impossible too?
18:12 SmokeMachine joined #perl6
18:12 PerlJam quietfanatic: This is Perl!  Nothing is impossible!
18:12 TimToady all you have to do is poke the sub into the appropriate metaclass method list
18:13 quietfanatic Let me guess: it requires use MONKEY_TYPING to do it to builtins.
18:14 TimToady the metaclass might require it in its caller's scope
18:14 TimToady since it would be difficult to catch syntactically, unlike 'augment'
18:15 TimToady so it would be a run-time failure, if so, not compile-time like with 'augment'
18:15 quietfanatic I see
18:15 quietfanatic How about this:
18:15 quietfanatic I declare a subset of some user-defined types...
18:15 quietfanatic can I declare a method that works on that subset?
18:16 quietfanatic (i.e. on all those types)
18:16 quietfanatic without using a Role?
18:16 TimToady no, subsets aren't object types, just constraints
18:16 TimToady a role would be more appropriate
18:16 quietfanatic so I have to use a role
18:16 TimToady and to do it at runtime you could do a mixin
18:16 quietfanatic ENOTENOUGHWAYSTODOIT
18:17 TimToady we're trying not to drive the CIO and his minions nuts
18:18 TimToady it's really easy to make you program non-scalable with monkey typing
18:18 TimToady *your
18:18 TimToady and companies have to worry about that occasionally
18:18 PerlJam (see ruby  ;)
18:18 quietfanatic I know about that...
18:19 quietfanatic I'm illustrating that I feel more confined than I want to be :)
18:20 moritz_ quietfanatic: does that make you quantized? :-)
18:20 TimToady yes, well, our brains fell out in that direction for Perl 5, with the result that Perl 5 is running into grown limits
18:20 TimToady *growth
18:20 TimToady just a smidge more discipline gets a lot of results in terms of scalability
18:21 quietfanatic makes sense
18:21 TimToady and this still being Perl, we provide a way to turn off the discipline, of course
18:22 chromatic joined #perl6
18:22 TimToady we just try to make it a little harder to do that by default
18:22 quietfanatic If it's like not using strict, everyone will yell at me for it :|
18:23 Juerd use anarchy;
18:23 TimToady abuse archy;
18:24 kst` joined #perl6
18:34 pmichaud 17:07 <colomon> jnthn, pmichaud: Any idea why overloading infix:<..> compiles but does not parse?
18:34 pmichaud at the moment you have to add the operator to the grammar
18:34 pmichaud (like the other operators)
18:34 pmichaud it doesn't happen automatically
18:36 colomon pmichaud: ah.
18:40 moritz_ oh wow, the mail to p6l which I've written 10 hours ago has now arrived at p6l, after TimToady++ already fixed it
18:42 rfordinal joined #perl6
18:44 dukeleto moritz_: it is a sign
18:44 PerlJam ... that someone held the email in moderation until it was fixed   ;)
18:45 moritz_ it was one of the Larry Walls that receives TimToady's emails :-)
18:51 arnsholt OT: Is using the C preprocessor to give me "header" files in a language that doesn't have them considered evil or just a kludge? =)
18:51 pugs_svn r29128 | lwall++ | [S02] more Rat-to-Str fine-tuning wrt negative denominators
18:52 TimToady pmichaud: what's your opinion of the latest pm.txt notions re Str vs Stringy on undefs?
18:53 PerlJam arnsholt: you mean like perl does with the -P option?
18:53 moritz_ arnsholt: depends on the language, I'd say
18:53 PerlJam arnsholt: but see  the note about -P in perlrun
18:53 moritz_ maybe it's just and evil kludge? :-)
18:55 TimToady in Perl 6 such evil kludges will more likely be done with text macros
18:56 arnsholt moritz_: Well, it's the Xerox finite state tools, if you're familiar with those
18:56 TimToady in fact; macro include ($filename) { slurp $filename.eval } is pretty close
18:56 moritz_ arnsholt: not at all
18:57 arnsholt It's a toolkit for doing finite state morphology
18:57 arnsholt (and FSAs/FSTs in general)
18:57 PerlJam arnsholt: does Xerox have enough evil that a little extra won't be noticed?
18:57 arnsholt Well, the syntax -is- a bit weird
18:58 arnsholt Line comments begin with a !, and the escape character is %
19:00 lisppaste3 colomon pasted "Not-quite-working grammer hack" at http://paste.lisp.org/display/90683
19:00 PerlJam for some reason I think of postscript when I see ! and % together.
19:01 colomon pmichaud: any notion what I'm doing wrong there?  (I copied shamelessly from STD.pm.)
19:02 masak joined #perl6
19:02 masak will there be a #p6b meeting today?
19:03 PerlJam colomon: ng uses <O('%structural')>  rather than <O(|%structural);
19:04 KyleHa I've been thinking about highlighting the recent masak++ and mst++ posts at perlmonks.org.
19:04 masak feel free.
19:05 masak the perl monks usually generate interesting discussion.
19:05 moritz_ KyleHa: please do
19:05 masak moritz_: will there be a #p6b meeting today?
19:05 moritz_ masak: no idea
19:05 colomon PerlJam++  # compiles now!
19:05 moritz_ we need a releas manager for Friday
19:06 moritz_ PerlJam: you don't happen to be available, do you?
19:06 PerlJam I might
19:06 PerlJam Is the release guide up-to-date?
19:06 colomon \o/
19:07 moritz_ PerlJam: uhm, there's not much of a release guide :-)
19:07 moritz_ PerlJam: but I can bring it up-to-date
19:07 PerlJam I didn't think there was, but you never know  :)
19:08 PerlJam So ... where's the blog post from the first release?
19:08 moritz_ it's on rakudo.org, and on my blog
19:08 * PerlJam wanders over to #p6b
19:11 masak Some might have seen it already: sjn++ does an interview and lauds Perl 5 and Perl 6 admirably. http://www.youtube.com/watch?v=3u-yqjXLDqg
19:17 dalek book: 5643d72 | moritz++ | docs/release-guide.pod:
19:17 dalek book: [docs/release-guide.pod] document release procedure
19:17 dalek book: review: http://github.com/perl6/book/commit/56​43d721ce5e281338b925138c73d798b0106826
19:18 pmichaud colomon: the operator precedence parser doesn't understand :assoc<non> yet.
19:18 pmichaud use :assoc<left> for now.
19:19 pmichaud also
19:19 pmichaud +token infix:sym<^..>  { <sym> <O(|%structural)> }
19:19 pmichaud should be
19:19 pmichaud +token infix:sym<^..>  { <sym> <O('%structural')> }
19:19 pmichaud (Rakudo and STD.pm still use different syntax there)
19:20 colomon pmichaud: it did compile with :assoc<non> once PerlJam explained the second thing.
19:20 colomon seems to work, even.
19:21 colomon but I'll change it to left for the moment.  :)
19:22 colomon pmichaud: Do you have advice for handling infix:<..> itself?  STD.pm seems to have special rules there, so I skipped it for a first try and just did the other three.
19:25 dalek rakudo: c00de9d | tene++ | perl6.pir:
19:25 dalek rakudo: Look up %INC in the right namespace when loading libraries for foreign languages
19:25 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​00de9dd064b620c858c2de3c962629e702ade66
19:25 TimToady all it's doing is catching when people say (0..) to mean 0..*
19:25 colomon oh, cool.
19:26 TimToady well, and being careful to still allow [..] as an operator name
19:27 colomon TimToady: too late now, I've forged ahead and tried it...  :)
19:28 moritz_ std: say (0..)
19:28 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Please use ..* for indefinite range at /tmp/XcUDMHnkmQ line 1:␤------> [32msay (0..[33m⏏[31m)[0m␤FAILED 00:01 102m␤
19:29 colomon \o/
19:29 dalek book: df049fe | masak++ | docs/release-guide.pod:
19:29 dalek book: [docs/release-guide.pod] assigned PerlJam as Nov release manager
19:29 dalek book: review: http://github.com/perl6/book/commit/df​049fee440581855ce93ce98c0b6a1129d434ef
19:29 dalek book: a58faac | masak++ | docs/release-guide.pod:
19:29 dalek book: [docs/release-guide.pod] minor punctuation fix
19:29 dalek book: review: http://github.com/perl6/book/commit/a5​8faac631a8e3dc8ce8e99fcdab180c8c855d0e
19:30 TimToady std: say 1 [..] 10
19:30 p6eval std 29128: ok 00:01 100m␤
19:31 masak std: 1 [..] 10, 11
19:31 p6eval std 29128: ok 00:01 102m␤
19:31 spinclad std: say [..] 0 .. 10
19:31 colomon rakudo: say 1 [..] 10
19:31 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Can't reduce .. because structural infix operators are diffy and not chaining at /tmp/nqBnbi2ppZ line 1:␤------> [32msay [..][33m⏏[31m 0 .. 10[0m␤    expecting prefix_circumfix_meta_operator__S_257reduce␤FAILED 00:01 104m␤
19:31 p6eval rakudo 7347ec: Confused at line 2, near "[..] 10"␤in Main (file <unknown>, line <unknown>)␤
19:32 TimToady std is almost...chatty...
19:32 spinclad .oO{ so what does 1 [..] 10 even mean? .. }
19:32 TimToady same as 1 .. 10
19:32 TimToady and same as 1 [[[..]]] 10
19:33 spinclad std: say [..] 1, 10
19:33 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Can't reduce .. because structural infix operators are diffy and not chaining at /tmp/EI90PvQM3R line 1:␤------> [32msay [..][33m⏏[31m 1, 10[0m␤    expecting prefix_circumfix_meta_operator__S_257reduce␤FAILED 00:01 103m␤
19:33 TimToady you can always put [] around any infix to mean the same thing
19:33 TimToady so you can use it to disambiguate
19:33 ng_feed rakudo-ng: colomon++
19:33 ng_feed rakudo-ng: Add infix:<..>, infix:<^..>, etc to the grammar and provide a first simple implementation.
19:34 spinclad so not a reduction, unlike prefix-circumfix-infix
19:34 moritz_ right
19:34 TimToady std: my @a; my @b; @a [X]= @b; @a X[=] @b
19:34 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/fcSVNEMhPS line 1:␤------> [32mmy @a; my @b; @a [X]=[33m⏏[31m @b; @a X[=] @b[0m␤FAILED 00:01 105m␤
19:35 TimToady hmm
19:35 spinclad std: my @a, @b; @a X= @b;
19:35 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Can't cross = because list assignment operators are too fiddly at /tmp/kyMwfH8mPu line 1:␤------> [32mmy @a, @b; @a X=[33m⏏[31m @b;[0m␤Other potential difficulties:␤  Variable @b is not predeclared at /tmp/kyMwfH8mPu line 1:␤------> [32mmy @a,
19:35 p6eval ..@b[33m⏏…
19:35 TimToady hmm, so wrong error, basically
19:35 TimToady probably got caught in a try block
19:36 TimToady still, you can always use brackets to make your meta-intent clearer
19:36 spinclad std: my @a, @b; @a X[=] @b;
19:36 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Can't cross = because list assignment operators are too fiddly at /tmp/QTXM4zj8nL line 1:␤------> [32mmy @a, @b; @a X[=][33m⏏[31m @b;[0m␤Other potential difficulties:␤  Variable @b is not predeclared at /tmp/QTXM4zj8nL line 1:␤------> [32mmy @a,
19:36 p6eval ..@b[33m…
19:37 TimToady hmm, or maybe not
19:38 TimToady I wonder why it doesn't like [X]=
19:38 spinclad std: my $a, @b; @a = [~] $a, @b; $a [~]= @b
19:38 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/07Q8dJhw4P line 1:␤------> [32mmy $a, @b; @a = [~] $a, @b; $a [~]=[33m⏏[31m @b[0m␤Other potential difficulties:␤  Variable @b is not predeclared at /tmp/07Q8dJhw4P line 1:␤------>
19:38 p6eval ..[32mm…
19:39 TimToady std: my @a; my @b; @a [[X]=] @b;
19:39 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Unable to parse bracketed infix; couldn't find final ']' at /tmp/x7IEvoA8db line 1:␤------> [32mmy @a; my @b; @a [[X][33m⏏[31m=] @b;[0m␤FAILED 00:01 101m␤
19:39 spinclad std: my $a, @b; $a = [~] $a, @b; $a [~]= @b
19:39 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/GOvhBLexZz line 1:␤------> [32mmy $a, @b; $a = [~] $a, @b; $a [~]=[33m⏏[31m @b[0m␤Other potential difficulties:␤  Variable @b is not predeclared at /tmp/GOvhBLexZz line 1:␤------>
19:39 p6eval ..[32mm…
19:39 TimToady it looks like it's just not looking for = after a []
19:41 spinclad (of course [~] there isn't infix, so it doesn't fit the pattern of op= )
19:41 TimToady yeah, it's just not looking for it
19:46 masak if every block has its own $/, how come closures in regexes find the right $0 etc?
19:47 TimToady because the closure's $/ is initially bound to the current match's $/
19:47 masak by what kind of exception to the rule?
19:47 TimToady if you do another regex within that closure, you'll break the outer binding
19:47 spinclad i find at present that prefix and infix [op] bothers me in the 'similar things look similar, different things look different' department.  is there an obstacle to infix (op) instead of [op]?
19:48 masak TimToady: what's the mechanism that makes the ordinary closure inside a regex bind to a different $/ ?
19:48 TimToady no exception, all of $_, $!, and $/ start out bound to the outer one, in the absence of explicit declaration to the contrary
19:48 masak ah, ok.
19:48 masak that answes my question. thanks.
19:49 spinclad std: my $a, $b; $a = $a ~ $b; $a = $a (~) $b; $a (~)= $b
19:49 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Confused at /tmp/DYo87pnWL3 line 1:␤------> [32mmy $a, $b; $a = $a ~ $b; $a = $a [33m⏏[31m(~) $b; $a (~)= $b[0m␤    expecting any of:␤    bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤Other potential
19:49 p6eval ..difficulties:␤  V…
19:49 spinclad (no good at present of course)
19:49 TimToady we're reserving (op) for Texas setops, I think
19:49 RonOreck joined #perl6
19:51 TimToady using (+) and (*) for union and intersection, for instance
19:51 spinclad like (+), (-).. yeah, there is that.  also tensor product: (x)
19:51 TimToady presumably (-) is set difference
19:51 masak I'd prefer (|) for union and (&) for intersection.
19:51 masak but (+) can be a synonym for (|).
19:52 masak and (-) can be a synonym for (^).
19:52 masak oh, wait.
19:52 masak the latter should be symmetric difference.
19:53 dalek book: 24771ab | duff++ | Makefile:
19:53 dalek book: [makefile] Added release target
19:53 dalek book: review: http://github.com/perl6/book/commit/24​771ab1f3cea90e1a13dae12a09e163b69a83f4
19:53 dalek book: 07d73cb | duff++ | docs/release-guide.pod:
19:53 dalek book: [docs/release-guide] updated release instructions
19:53 spinclad ETOOMANYWANTS
19:53 dalek book: review: http://github.com/perl6/book/commit/07​d73cbf4c246f425527836db5c0b3f8d2be4e85
19:53 dalek book: 1af4482 | duff++ | :
19:53 TimToady I expect the set theorists to be one of the first groups to go hogwild with Unicode though...
19:53 dalek book: fix merge conflict
19:54 dalek book: review: http://github.com/perl6/book/commit/1a​f44822619e173c94f6a0aa1607e4acd270dcb8
19:56 meppl joined #perl6
19:56 spinclad it just would have some symmetry to have (op) mean the same as op, but wrapped, as (expr) means the same as expr
19:57 colomon I had assumed the texas ops for sets would be written out union, intersect, etc.  ie  $a union $b
19:57 TimToady well, that would also work
19:59 TimToady the fact that () are so ubiquitous in normal expressions is a good reason to avoid them in operators, to my mind
19:59 TimToady 'druther have something that looks different
20:00 TimToady phone
20:00 masak I find alphabetic operators to be a little surprising.
20:01 masak I even have that reaction with min, max and minmax.
20:01 moritz_ masak: what about 'and' and 'or'?
20:01 masak I guess I've gotten used to those.
20:01 masak also 'eg' and family.
20:01 masak er, 'eq'.
20:01 rgrau joined #perl6
20:01 spinclad yeah, it takes away a clue of what's operator and what's item
20:02 sjohnson is there a symbol equivalent for XOR technology?
20:02 masak nevermind, I'm just biased, it seems. :)
20:02 PerlJam Yeah, I always get the ie and eg operators confused myself ;)
20:02 masak sjohnson: ^
20:02 masak sjohnson: or +^ or ?^
20:02 KyleHa If y'all are interested in reading and influencing the contents of my article before I post it, you may find it here:  http://perlmonks.org/?view​mode=public;node_id=593815
20:03 spinclad and, though, i'm here arguing for (op), i find it takes away the same clue for me, so i find it confusing to parse
20:03 PerlJam KyleHa: the last sentence of the first paragraph seems like a non sequitur
20:04 KyleHa Thanks PerlJam++, I'll try to fix that.
20:04 sjohnson thanks
20:05 moritz_ KyleHa++
20:05 PerlJam KyleHa: other than that, looks great.
20:05 PerlJam KyleHa++
20:06 dalek book: 43869dd | duff++ | docs/release-guide.pod:
20:06 dalek book: [release-guide] move tagging down a step
20:06 dalek book: review: http://github.com/perl6/book/commit/43​869dd2ed34dace51138ab624bc93a080b8e687
20:06 arnsholt Since I've been thinking a bit about sets lately: What on earth are Texas set operations?
20:08 spinclad (+) for circle-plus, etc
20:08 masak arnsholt: the 'Texas' term means, I believe, ASCII.
20:08 masak arnsholt: i.e. it's a projection of some Unicode operator.
20:09 arnsholt Ah, like << and >> for the guillemets?
20:09 masak yes.
20:09 spinclad (like texas quotes are bigger)
20:09 arnsholt So it's a Perl 6 term, not a math term. No wonder I didn't get it then
20:09 masak :)
20:09 arnsholt spinclad: Hee hee. Nice mnemonic =)
20:10 masak arnsholt: I'm not sure it's just a mnemonic :)
20:10 arnsholt Point, point ^^
20:10 spinclad well, i think it's the originally intended mnemonic
20:12 spinclad *s/ly intended// or such
20:13 ng_feed rakudo-ng: (Stephen Weeks)++
20:13 ng_feed rakudo-ng: Look up %INC in the right namespace when loading libraries for foreign languages
20:14 spinclad KyleHa++
20:14 colomon Does anyone have an example of how to write an iterator in ng?
20:14 KyleHa I thinking I'll title it "Perl 6 threat revealed" in keeping with the other articles on the topic.
20:14 masak Tene++
20:14 spinclad go for it
20:14 spinclad ^KyleHa
20:14 moritz_ colomon: I suspect you can look at the map implementation
20:16 KyleHa Many thanks for your timely comments and gentle encouragement.
20:17 KyleHa Final post is here:  http://perlmonks.org/?node_id=808015
20:18 colomon moritz_: hmm... map doesn't really help.  It's all PIR...
20:19 colomon I've got S07, but I'm not 100% sure what to do with it.
20:20 moritz_ neither am I
20:21 colomon Well, I'll put some debugging in the Range.iterator function and see if it gets called.
20:22 colomon Huh.  It doesn't, but if I do 1..6.map({.say}) I get   "get_iter() not implement in class Integer".
20:23 moritz_ class Integer, heh?
20:23 colomon that's what it says.  does that ring any bells for you?
20:23 moritz_ ng: say (1..6).WHAT
20:23 p6eval ng 5c775d: Range()␤
20:23 moritz_ ng: say (\(1..6)).WHAT
20:23 p6eval ng 5c775d: Confused at line 1, near "say (\\(1.."␤current instr.: 'perl6;HLL;Grammar;panic' pc 448 (src/stage0/HLL-s0.pir:300)␤
20:24 spinclad ng: (1..6).map: *.say
20:24 p6eval ng 5c775d: Method 'Iterator' not found for invocant of class 'Range'␤current instr.: 'perl6;Perl6Object;' pc -1 ((unknown file):-1)␤
20:24 spinclad ng: 1..6.map: *.say
20:24 p6eval ng 5c775d: get_iter() not implemented in class 'Integer'␤current instr.: 'perl6;Any;map' pc 177198 (src/gen/core.pir:0)␤
20:24 moritz_ ng: say (*.say).WHAT
20:24 p6eval ng 5c775d: Block()␤
20:25 spinclad .map is tighter than ..
20:25 phenny spinclad: the .map command has been removed; ask sbp for details
20:25 rlarson86 joined #perl6
20:25 rfordinal joined #perl6
20:25 spinclad oh, phenny, i wasn't talking to you
20:25 moritz_ phenny: *please* don't start to get annoying
20:25 masak phenny: you scared me for a while there; thought you meant Perl 6.
20:26 PacoLinux joined #perl6
20:26 colomon oh, sweet!  If I do (1..6).map, I get   "Method 'Iterator' not found..."
20:26 colomon That's a good start.
20:26 spinclad (should i phear doing evil things inside phenny when all i said was '.inside ...' ?)
20:26 masak rakudo: (1..6).map
20:26 p6eval rakudo 7347ec: No candidates found to invoke␤in Main (file <unknown>, line <unknown>)␤
20:26 moritz_ .inside foo
20:27 spinclad /phenny introspects
20:27 sbp .map test
20:28 sbp there, fixed. sorry for noise
20:28 moritz_ sbp++ # quick fixes
20:28 spinclad sbp: are there other .commands we should beware?
20:28 sbp the only other "removed" warning message comes from .web
20:29 perigrin phenny is an incredibly well behaved bot
20:29 sbp there are a few aliases. for example:
20:29 spinclad sbp++
20:29 sbp .cp example
20:29 phenny sbp: .cp has been replaced by .u
20:29 sbp they're just for people who keep to old habits... :-)
20:29 sbp you know, I removed .cp a year ago and people *still* use it!
20:29 spinclad .help
20:29 sbp 'phenny: help?'
20:29 * perigrin tends to use .g phenny
20:29 perigrin :)
20:29 perigrin she knows her own way home.
20:30 moritz_ .g phenny
20:30 phenny moritz_: http://inamidst.com/phenny/
20:30 sbp hehe
20:33 justatheory joined #perl6
20:33 spinclad well, in theory, yes
20:33 spinclad (scnr)
20:34 arnsholt Traslations of Sappho
20:34 * arnsholt is impressed
20:34 sbp not my translations though, I just steal them
20:35 colomon And if I define Range.Iterator, it does get called.
20:36 moritz_ woot!
20:36 arnsholt sbp: No matter. Still very cool
20:37 sbp :-)
20:37 arnsholt Even gives me a chance to read a version of the poem that inspired one of my favourite Catullus poems
20:37 arnsholt Which is extra nifty
20:38 sbp arnsholt: something very little remarked upon: we only know about that Catullus poem being inspired by Sappho because we have the original by Sappho, I believe. but we have so few of Sappho's originals, so isn't it likely that other Catullus poems were inspired by her which we don't know about?
20:38 sbp </OT>
20:39 arnsholt sbp: I was just reading the Wikipedia article on Catullus, and it agrees
20:40 sbp oh, it even cites 61 and 62 as examples. interesting, thanks!
20:40 arnsholt And given that he was a fan of her, it does make sense. Also, given that the literary movement he was part of was big on intertextuality, there are probably oodles of references to Sappho that we miss
20:40 sbp yeah
20:40 arnsholt Just because we have so little idea of what she's written
20:40 sbp I want to figure out more of the relationship between her and Alcæus, on that note
20:42 arnsholt You and every other philologist in the world I think =)
20:42 sbp aye...
20:42 jaffa8 funny you are talking about poems, here?
20:43 arnsholt It's these kinds of questions and problems that make philology so interesting. And people outside the field don't seem to realize how funky the transmission of these texts is
20:43 sbp we always do. is perl6 not a poem? :-)
20:43 arnsholt jaffa8: Perl has a tradition for poetry, no? =)
20:43 jaffa8 I do not know much about it
20:43 hercynium joined #perl6
20:43 jaffa8 I concentrated on the language,
20:44 spinclad jaffa8: look up 'perl haiku'
20:44 spinclad and 'perl poetry' in the camel
20:45 jaffa8 you think I disagree
20:45 jaffa8 I do not.
20:45 jaffa8 talk about what you want, this channel is not my property.
20:46 jaffa8 Who is Alc....?
20:47 sbp I remember I learned perl6 initially back when I was researching conlanging too, and the juxtaposition of natural language and programming language idioms being stocked up next to one another was really exciting
20:47 sbp he was a poet in teh 6th century BC
20:47 sbp on the isle of Lesbos
20:48 arnsholt One of the really famous Greek poets
20:50 colomon joined #perl6
20:52 * jnthn is back from pm group and piva.
20:55 colomon jnthn: Attempting to random walk my way to working RangeIterator...
20:56 jnthn colomon++ # cool! :-)
20:56 colomon errr... can we do roles in ng yet?
20:56 colomon class RangeIterator does Iterator
20:56 colomon Could not find non-existent sub &trait_mod:<does>
20:56 colomon Or can I skip that and just implement RangeIterator.get?
20:56 moritz_ I guess that's a "no"
20:56 masak jnthn: welcome back. how does 'pivo' relate to 'piva'?
20:57 moritz_ colomon: that would be my first shot
20:57 moritz_ wait, is Range a role or a class?
20:57 arnsholt masak: Etymology would be my guess =p
20:57 masak arnsholt: :P
20:57 colomon Range is a class.
20:57 colomon At least, that's how I've done it so far...
20:57 payload joined #perl6
20:57 moritz_ colomon: then you should inherit from it, not 'do' it
20:58 colomon moritz_: Iterator should be a role, that's what I'm doing.
20:58 colomon "do"ing.
20:58 colomon does-ing?
20:58 moritz_ :-)
20:58 colomon also, what do I do to get a rw attribute in ng?
20:59 spinclad dozing
20:59 TimToady note that Range objects are immutable, and RangeIterators are mutable
20:59 moritz_ colomon: uhm, what do you need that for?
20:59 TimToady so inheritance is probably not what you want there
20:59 rfordinal left #perl6
21:00 moritz_ TimToady: Arrays also inherits from List, notionally
21:00 colomon moritz_: so that RangeIterator can be mutable.
21:00 spinclad 15:56:20 < colomon> class RangeIterator does Iterator
21:00 moritz_ colomon: attributes are mutable anyway
21:00 moritz_ colomon: it's just the accessor that needs the 'is rw' if want to modify it from the outside
21:00 TimToady which Range shouldn't allow
21:01 jnthn masak: piva is plural
21:01 masak jnthn: oh!
21:01 lisppaste3 colomon pasted "what RangeIterator is so far" at http://paste.lisp.org/display/90693
21:02 jnthn masak: Yeah, shocking that I drank more than one. ;-)
21:02 masak jnthn: no, not at all. :)
21:02 jnthn :-)
21:03 moritz_ colomon: you don't need a custom constructor for what you have so far
21:05 [1]jaffa8 joined #perl6
21:09 lisppaste3 colomon annotated #90693 "untitled" at http://paste.lisp.org/display/90693#1
21:09 colomon Whoops, that's the latest iteration of RangeIterator.
21:10 colomon RangeIterator new is called when I do (1..6).map, but get is not called, and I get the classic "Could not find non-existent sub &fail" error
21:10 moritz_ colomon: push it to a branch so it's easier to colaborate
21:10 moritz_ ng-range or so
21:11 justatheory_ joined #perl6
21:11 colomon any reason I shouldn't just push it to ng?  it didn't work before, and it does compile, so it won't break anything.
21:11 moritz_ good point
21:11 moritz_ push it straight to ng
21:13 colomon just pull --rebase 'd, now testing...
21:14 ng_feed rakudo-ng: colomon++
21:14 ng_feed rakudo-ng: First (non-functional) stab at RangeIterator.
21:14 krakan joined #perl6
21:14 colomon afk, going to let my little boy skype with his grandma.
21:15 moritz_ rakudo: say (1..4)
21:15 p6eval rakudo 7347ec: 1234␤
21:15 moritz_ ng: say 1..4
21:15 p6eval ng 5c775d: sh: ./perl6: No such file or directory␤
21:15 diakopter I didn't do it
21:16 moritz_ it's just rebuild time
21:18 kst` joined #perl6
21:21 colomon joined #perl6
21:23 [1]jaffa8 joined #perl6
21:24 moritz_ ng: say 1..4
21:24 p6eval ng 5c775d: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 202831 (src/gen/core.pir:20412)␤
21:25 masak man, I love that error.
21:25 masak makes me look forward to when ng lands. :)
21:25 colomon moritz_: that won't call Range.Iterator at all, it's calling Range.Str which is just broken, as far as I know.
21:27 * Tene resists hacking on ng.
21:27 moritz_ Tene: why? :-)
21:27 Su-Shee left #perl6
21:28 diakopter ng: our sub fail($a) { say($a) }; say 1..4;
21:28 p6eval ng 5c775d: Method 'list' not found for invocant of class 'Range'␤
21:28 moritz_ ng: say (1..4).map({ say $_ })[0]
21:28 p6eval ng 5c775d: Method 'Iterator' not found for invocant of class 'Range'␤current instr.: 'perl6;Perl6Object;' pc -1 ((unknown file):-1)␤
21:29 moritz_ locally that gives me
21:29 moritz_ making1..4
21:29 moritz_ Method 'arity' not found for invocant of class 'Block'
21:29 jnthn Oh
21:29 colomon o so  map bug?
21:29 jnthn That's probably legit, in that maybe .arity has not been put back yet.
21:29 jnthn give me 10 mins, and I'll have a moment to look at that.
21:31 colomon ng: (1..4).map( -> $x { $x.say } )
21:31 p6eval ng 5c775d: Method 'Iterator' not found for invocant of class 'Range'␤current instr.: 'perl6;Perl6Object;' pc -1 ((unknown file):-1)␤
21:31 moritz_ rakudo: say { say "foo" }.signature.arity
21:31 p6eval rakudo 7347ec: Method 'arity' not found for invocant of class 'Signature'␤in Main (file src/gen_setting.pm, line 324)␤
21:33 IllvilJa joined #perl6
21:33 colomon If I do   (1..4).map( -> $x { $x.say } )
21:33 colomon locally, I get making1..4 and no error message.
21:33 moritz_ that's because map is lazy
21:33 sjohnson @karma
21:33 lambdabot You have a karma of 3
21:33 moritz_ colomon: so nothing happens unless something consumes the result list
21:34 hercynium joined #perl6
21:40 colomon joined #perl6
21:41 moritz_ ng: sub f($x) { }; say &f.arity
21:41 p6eval ng 5c775d: Method 'arity' not found for invocant of class 'Perl6Sub'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
21:42 moritz_ pmichaud: how did you test map? I can't get it working in any way I try
21:42 moritz_ ng: (1, 2, 3).map(-> $x { $x }).[0]
21:42 p6eval ng 5c775d: Method 'arity' not found for invocant of class 'Block'␤current instr.: 'perl6;!Mapper;!generate' pc 206365 (src/gen/core.pir:21539)␤
21:43 colomon Just occurred to me to try calling Iterator and RangeIterator.get directly, and I get: "Cannot assign to readonly value".
21:44 * moritz_ sees why
21:45 moritz_ colomon: $.current is not writable, but $!current is
21:45 moritz_ colomon: you're about #234 to make that error :-/
21:46 moritz_ >./perl6 -e 'say (1..5).Iterator.get'
21:46 moritz_ making1..5
21:46 moritz_ in get
21:46 moritz_ 1
21:47 * moritz_ will push in a minute
21:49 colomon I've got verification here the iterator actually remembers its position, as well.
21:49 ng_feed rakudo-ng: moritz++
21:49 ng_feed rakudo-ng: [RangeIterator] fix writing to attributes and an off-by-one error
21:50 colomon Oh, yeah, I didn't even try to get the actual iteration range correct yet.  :)
21:50 lisppaste3 moritz_ pasted "Iterator works, kinda" at http://paste.lisp.org/display/90696
21:52 moritz_ ng: say 'a' cmp 'b'
21:52 p6eval ng 039b25: Confused at line 1, near "say 'a' cm"␤current instr.: 'perl6;HLL;Grammar;panic' pc 448 (src/stage0/HLL-s0.pir:300)␤
21:54 pmichaud you probably already know this, but
21:54 pmichaud $!current <= $!range.max ?? $!current++ !! Nil;
21:54 pmichaud only works for numeric ranges.
21:54 moritz_ yes
21:54 moritz_ that's why I tried cmp right nwo
21:55 pmichaud moritz_: I tested map just normally
21:55 moritz_ "just normally"?
21:55 moritz_ example?
21:55 colomon pmichaud: it also doesn't handle the begin/end conditions properly.  Initial goal was to get a working Iterator type, not a correct RangeIterator.
21:56 moritz_ ng: class A { }; for A.new { say "f" }
21:56 p6eval ng 039b25: f␤
21:56 moritz_ ng: class A { method list { say 'arg' } }; for A.new { say "f" }
21:56 p6eval ng 039b25: f␤
21:57 pmichaud ng:  say <1 2 3>.map({ .perl });
21:57 p6eval ng 039b25: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 203897 (src/gen/core.pir:20664)␤
21:57 pmichaud hmmm
21:57 pmichaud maybe something else started interfering with it
21:57 pmichaud ng:  say <1 2 3>.map({ $_.perl });
21:57 p6eval ng 039b25: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 203897 (src/gen/core.pir:20664)␤
21:57 pmichaud ng:  say (1,2,3).map({ $_ + 3 })
21:57 p6eval ng 039b25: Could not find non-existent sub &fail␤current instr.: 'perl6;IO;print' pc 203897 (src/gen/core.pir:20664)␤
21:57 jan___ joined #perl6
21:57 pmichaud I'm guessing something else is in the way
21:58 pmichaud the above worked for me when I implemented map.
21:58 pmichaud ng:  say (1,2,3).map({ $_ + 3 }).perl
21:58 p6eval ng 039b25: Method 'arity' not found for invocant of class 'Block'␤current instr.: 'perl6;!Mapper;!generate' pc 207737 (src/gen/core.pir:22155)␤
22:02 jnthn pmichaud: { $_ + 3 } was probably just a Parrot sub back then.
22:02 colomon joined #perl6
22:02 diakopter just add   our sub fail($a) { say($a) };  before what you're trying if you want to see the error msg
22:02 jnthn pmichaud: Not a Perl 6 Block.
22:02 pmichaud perhaps so
22:02 pmichaud that wasn't that long ago :)
22:03 pmichaud anyway, we need .arity and .count on our blocks :)
22:03 diakopter ng:  our sub fail($a) { say($a) };  say (1,2,3).map({ $_ + 3 })
22:03 p6eval ng 039b25: Method 'arity' not found for invocant of class 'Block'␤
22:03 jnthn pmichaud: Yeah, I know. I just need to bring that code over into new Rakudo. :-)
22:03 pmichaud ng:   say (1,2,3).perl
22:03 p6eval ng 039b25: Method 'arity' not found for invocant of class 'Block'␤current instr.: 'perl6;!Mapper;!generate' pc 207737 (src/gen/core.pir:22155)␤
22:03 pmichaud I *know* that was working before.
22:04 jnthn pmichaud: Yeah. This is what happens when we can't run tests.
22:04 jnthn pmichaud: Will but back arity and count in a mo.
22:04 pmichaud no rush from me :)
22:05 pmichaud I'll have to go help with kid homework in a bit
22:05 * moritz_ refrained from say that earlier :-)
22:05 colomon should we add cheat test files for things like this?
22:05 pmichaud we'll get our tests back soon, I'm sure
22:06 pmichaud if you want to add a 02-extra set of tests, though, that's fine with me
22:07 kidd joined #perl6
22:10 colomon pmichaud: I'll keep that in mind.
22:11 colomon In the meantime, is Range.Iterator and RangeIterator.get the right way to handle Iterators in ng right now?  Are we on the right track and just blocked by map?
22:11 pmichaud I'm not sure about RangeIterator.get
22:11 pmichaud currently the lazy list implementation wants a .generate method
22:11 pmichaud on the theory that sometimes it's more efficient to generate $n elements at once rather than just one at a time
22:13 jnthn pmichaud: Doesn't .get (or something else) take an optional param?
22:13 colomon both should probably be there in the long run, yes?
22:13 jnthn pmichaud: I mean, for IO it's .lines ?
22:13 pmichaud jnthn: if it does take an optional param, we could use that, yes.
22:13 jnthn pmichaud: Which doesn't fit other iterators so well as a name, granted...
22:14 colomon Is S07 just out of date, then?
22:14 pmichaud but I didn't see anything obvious (didn't check, either -- just went from memory)
22:14 jnthn pmichaud: I kinda feel we should have some interface that says how you ask for $n items, or "however many are easy to give now" items.
22:14 pmichaud S07 has never been blessed
22:14 pmichaud well, it's been blessed only partially.
22:14 pmichaud it's not been informed by a "real implementation" yet
22:14 pmichaud jnthn: I don't disagree.  We could add that to get, I suppose.
22:14 jnthn I guess we're informants. :-)
22:15 pmichaud this is one of the reasons I was holding off on Range.Iterator -- I needed to consider the whole lazy semantics issue a bit more.
22:15 jnthn pmichaud: Maybe. I don't know if .get is the interface to add it to, but it's a nice name.
22:15 jnthn Short, descriptive, etc.
22:16 jnthn So perhaps.
22:16 pmichaud it would change up my lazy map and list implementation a bit, but we could do that
22:16 pmichaud I'll try that a bit later, I guess.
22:22 masak there have already been some comments on mst's post and mine. the only one I disagree with almost completely so far is this one: http://www.dagolden.com/inde​x.php/554/perl-6-is-perl-5/
22:22 masak I don't see why "Perl 5++" would be any more fitting than "Perl 5 Prime" or "Perl 5 Reloaded".
22:23 moritz_ there's no "C Prime" or "C Reloaded" :-)
22:23 sjohnson i feel like i'm going to scream if i read another mst perl 5 - perl 6 debate
22:23 masak no, there's Haskell Prime and Matrix Reloaded.
22:23 sjohnson o/ masak
22:24 masak sjohnson: then don't read it. we don't want you to feel bad.
22:24 perigrin and Optimus Prime
22:24 masak sjohnson: hi there! :)
22:25 sjohnson masak: i really mean just reading mst's analogies
22:25 sjohnson i made the mistake of asking for help with the given when in p5.10.0 and used the word "backported feature"
22:26 masak hahaha.
22:26 masak he's a bit touchy about that right now, I think.
22:26 sjohnson i guess you can imagine how well that went
22:26 masak it's all part of the reframing process. :)
22:26 perigrin it has been building for a very long time
22:27 masak sjohnson: a tip about mst: he barks a lot, but he's actually a pretty nice guy.
22:27 sjohnson thanks for the tip
22:28 sjohnson ( `ー´)
22:28 arnsholt masak: That's the impression I get. Lots of four letter words, but his ideas are quite interesting
22:28 masak nod.
22:28 masak also, he's aware of this role of his.
22:28 arnsholt And he's passionate, from what I saw of him at NPW. Very passionate
22:28 jnthn I can cope just fine with mst. He's loud, I don't agree with all of his opinions, but his heart's in the right place for sure.
22:28 masak exactly.
22:29 jnthn And he's a great guy to go drink more than a few beers with. :-)
22:29 masak I can imagine. :)
22:29 sjohnson i wouldn't mind having some perl beer chats with someone
22:30 * perigrin pimps Perl Oasis
22:30 ShaneC joined #perl6
22:30 sjohnson no one i know irl likes perl enough to actually like discussing it
22:30 masak sjohnson: get other friends! :P
22:30 perigrin sjohnson: hence why you should come to Orlando in January ... we'll have mst *and* beer.
22:30 sjohnson ahh, a bit of a drive
22:30 sjohnson i live in western canada
22:31 perigrin bah ... Marty Pauley is coming
22:31 perigrin he lives west of you :)
22:31 sjohnson do you guys live close to there?
22:31 jnthn pmichaud: hmm.
22:31 sjohnson or do you just fly down
22:31 jnthn pmichaud: You may want .count rather than .arity?
22:31 jnthn > say { $_ + 3 }.arity
22:31 jnthn 0
22:31 jnthn > say { $_ + 3 }.count
22:31 jnthn 1
22:32 lambdabot <no location info>: parse error on input `$'
22:32 lambdabot <no location info>: parse error on input `$'
22:32 jnthn lambdabot: STFU
22:32 jnthn pmichaud: .map seems to be...a tad infinite...
22:32 perigrin sjohnson: actually konobi was trying to organize a Vancouver Perl Workshop too
22:32 perigrin which is probably closer for you :)
22:32 dalek november: 8075afb | masak++ | lib/November.pm:
22:32 dalek november: [November] added (back?) view history
22:32 dalek november: review: http://github.com/viklund/november/commit​/8075afb2390f598a3f8e3ff20c476677766665f0
22:32 jnthn Canada eh.
22:32 sjohnson perigrin: i'd be up for that
22:33 * jnthn would like to go to Canada some day
22:33 sjohnson 5 hour drive to Vancouver from where i live
22:33 jnthn I've been quietly waiting for a YAPC::NA to happen there. ;-)
22:33 jnthn OK, spectesting and then we get .arity and .count back. :-)
22:33 perigrin sjohnson: kamloops / salmon arm? or the other direction?
22:34 perigrin jnthn: there have been two YAPC::NAs in Toronto
22:34 colomon_ joined #perl6
22:34 sjohnson perigrin: okanagan area
22:35 jnthn perigrin: Yeah, I know, but they were before I was really travelling (or in a position to afford to travel) for Perl events.
22:35 perigrin sjohnson: and thus you have totally exceeded my knowledge of western canadian geography :)
22:36 sjohnson well, living here helps :)
22:36 perigrin jnthn: yeah same here ... I got sneaky and started organizing the one in Orlando so that people would come to *me*
22:36 perigrin This year we have people from Japan, and the UK coming so it seems to be working
22:41 jnthn perigrin: Nice. :-)
22:41 sjohnson jnthn: i was reading your website.  do you still use cygwin regularily?
22:42 jnthn sjohnson: Not really. Do I say I do somewhere? :-)
22:43 sjohnson maybe i read the wrong website
22:43 jnthn oh no, I see where I say it...
22:43 jnthn But no, I'm not a heavy cygwin user really
22:43 jnthn Kinda got fed up of it.
22:43 sjohnson me too
22:44 sjohnson or desktop use i use windows but i use the sourceforge unxtools.zip thing to get it closer to a unix like environment... cygwin feels clunky to me and a pain in the ass to use with regards to permissions
22:44 sjohnson ^or/for
22:44 jnthn I do similar.
22:45 sjohnson jnthn: off-topic question if i may... have you figured out a way to get a better cmd prompt than the windows one?
22:45 sjohnson or is there no real solution other than xterm /rxvt in cygwin
22:45 jnthn sjohnson: Not yet...I keep ponwdering whether Powershell is worth a try though.
22:45 jnthn I don't know how much it gets in the way.
22:46 jnthn I suspect probably it doesn't act enough like a normal shell to be usable like that.
22:46 sjohnson ill try it
22:46 sjohnson anything must be better than the stock cmd.exe shell
22:46 moritz_ what I read about powershell was pretty cool
22:47 jnthn Well, this might be "better" in a "not even remotely compatible" sense. Powershell does have some excellent ideas though.
22:48 jnthn The whole "we pipe objects rather than chunks of text around" thing struck me as a nice idea that would probably not win over the *nix hardcore, but an interesting evolution.
22:48 sjohnson it says you can run this thing if you have win7 out of the box
22:48 sjohnson if only i could figure out what it's executation cmd is
22:49 sjohnson ie.. how to run this darn thing
22:50 sjohnson seems just "powershell" runs it fine
22:51 sjohnson doesn't support terminal-type resizing.  fail stamp for me
22:51 sjohnson ie, just dragging it bigger
22:51 jnthn aww :-|
22:52 arnsholt Yeah, there are several things that are bad about powershell
22:53 arnsholt There are some cool ideas, like the object-passing jnthn mentioned, that are quite cool too though
22:53 sjohnson windows needs to get that risizing thing handled post-haste
22:53 * sjohnson shakes his fist violently
22:53 arnsholt Indeed
22:54 arnsholt But powershell is a hell of a lot better than cmd
22:54 arnsholt I used it a fair bit when I interned at Fast (which I suppose I should call Microsoft these days)
22:56 * jnthn starts to stub in placeholder params
22:57 ng_feed rakudo-ng: jnthn++
22:57 ng_feed rakudo-ng: Add back .arity and .count.
22:58 Whiteknight joined #perl6
22:58 zaslon lolmasakhazblogged! masak++ 'November 18 2009 -- the history mystery': http://use.perl.org/~masak/journal/39915?from=rss
22:58 diakopter jnthn: Powershell actually has *many* features of Perl (and Perl 6, for that matter)
22:58 * masak goes to bed early tonight
22:58 masak observe how I increase my chances to make the flight tomorrow!
22:59 jnthn masak: oh one thing...
22:59 masak :)
23:00 diakopter jnthn: it uses words tho instead of syntax, mostly
23:01 jnthn diakopter: Words are syntax. :-P
23:02 arnsholt Syntax is the order you put the words in. Words are morphology =p
23:02 arnsholt </nitpick>
23:03 Tene 'night masak
23:03 masak Tene: night!
23:04 dalek book: af0075b | chromatic++ | src/ (2 files):
23:04 dalek book: Turned notetip tags into sidebars, which Pod::PseudoPod::LaTeX *does* know how
23:04 dalek book: to handle.
23:04 dalek book: review: http://github.com/perl6/book/commit/af​0075b5f1a92b12ca8dfc242fd2af155b2ea6e9
23:04 jnthn arnsholt: Nitpicker! :-P
23:05 jnthn (but you're right :-))
23:07 rfordinal joined #perl6
23:08 kidd joined #perl6
23:10 zaslon lolmoritzhazblogged! moritz++ 'Immutable Sigils and Context': http://perlgeek.de/blog-en/perl-6/​immutable-sigils-and-context.html
23:11 * moritz_ has another idea for a blog post
23:11 moritz_ "writing it in C (or compiling to C) is not the answer"
23:12 jnthn +1
23:15 colomon_ joined #perl6
23:16 jnthn std: sub foo { $^x }
23:16 p6eval std 29128: ok 00:01 102m␤
23:16 jnthn std: sub foo($x) { $^x }
23:16 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Placeholder variable $^x cannot override existing signature ($x) at /tmp/oBvB0ILDNz line 1:␤------> [32msub foo($x) { $^x[33m⏏[31m }[0m␤    expecting any of:␤    POST␤   postfix␤  postfix_prefix_meta_operator␤       standard stopper␤ terminator␤FAILED
23:16 p6eval ..00:01 104m␤
23:16 jnthn std: sub foo() { $^x }
23:16 p6eval std 29128: [31m===[0mSORRY![31m===[0m␤Placeholder variable $^x cannot override existing signature () at /tmp/iN7BOXhBDQ line 1:␤------> [32msub foo() { $^x[33m⏏[31m }[0m␤    expecting any of:␤        POST␤   postfix␤  postfix_prefix_meta_operator␤       standard stopper␤ terminator␤FAILED
23:16 p6eval ..00:01 103m␤
23:18 chromatic I think I wrote that post a while back, moritz_.
23:22 colomon sjohnson, jnthn: I use TCC LE for my shell on Windows.  Very nice, if not quite bash.
23:26 quietfanatic joined #perl6
23:30 diakopter joined #perl6
23:36 mtve joined #perl6
23:38 sjohnson colomon: will try it thanks
23:38 sjohnson colomon: this site looks semi-commercial.. can you get the goods legally for free?
23:44 sjohnson colomon: was hoping it allowed you to do quick vertical _and_ horiz resizing.. :(
23:45 sjohnson all these shells seem to still rely on microsoft's bugger windowing interface
23:47 beggars joined #perl6
23:49 ihrd joined #perl6
23:50 gfx joined #perl6
23:52 kst joined #perl6
23:53 moritz_ chromatic: got a link for me?
23:54 chromatic moritz_, http://use.perl.org/~chromatic/journal/38751
23:58 moritz_ chromatic: thanks. Not quite on the level I wanted to write :-)
23:59 chromatic I wrote another one later that quoted the Spidermonkey developers saying "The more of the language we write in JS itself, the faster it runs." but I haven't found that yet.

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

Perl 6 | Reference Documentation | Rakudo