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