pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
pugs_svn r22573 | lwall++ | [viv] can now reproduce t/01-sanity/01-tap.t 00:47
r22573 | lwall++ | [STD] remember list separators
mncharity searches for a description of the vision for viv and VAST... unsuccessfully. :/ 01:30
Didn't find any comments at all actually. Maybe once the Design Minutes catch up? They seem to have about a month latency. 01:32
mncharity yay, '2 < 3' parses in viv now. 01:36
mncharity @tell pmurias Could you add a README to misc/elfish/AST/ ? Thanks. Not quite clear what it is. 01:43
lambdabot Consider it noted.
mncharity @tell pmurias What is the status of misc/elfish/elf_f_work/ ? Could you update README? Thanks. Dusting a bit... 01:51
lambdabot Consider it noted.
pugs_svn r22574 | putter++ | [elfish/rx_on_re] Update to elf_h. Dust README. Delete obsolete EmitRegexYare.pm. Fixed a bogus classname. 02:53
rakudo_svn r31875 | tene++ | [rakudo]: Fix Str.trans. cjfields++ 03:36
ihrd hi, we have vladivostok.pm meeting right now, and topic perl6 and November wiki. And we catch this: 04:45
rakudo:my $foo = { $^z.say; $^a.say }; $foo("HAI", "HER");
ihrd rakudo: my $foo = { $^a.say; $^z.say }; $foo("HAI", "HER"); 04:46
p6eval rakudo 31875: OUTPUT[HAI␤HER␤]
ihrd rakudo: my $foo = { $^a.say; $^z.say }; $foo("HAI", "HER");
p6eval rakudo 31875: OUTPUT[HAI␤HER␤]
ihrd akudo: my $foo = { $^z.say; $^a.say }; $foo("HAI", "HER"); 04:47
sorry
rakudo: my $foo = { $^z.say; $^a.say }; $foo("HAI", "HER");
p6eval rakudo 31875: OUTPUT[HER␤HAI␤]
ihrd rakudo sort $^vars be name 04:48
and assign to $^a first args, and to $^z second 04:49
Tene lolcode: VISIBLE "OH HAI GUYZ"
Ack, mischen. 04:50
chan.
ihrd dose it`s right behaviour? 04:53
pugs_svn r22575 | lwall++ | [viv] straighten out chain operators 05:19
rakudo_svn r31876 | pmichaud++ | [rakudo] spectest-progress.csv update: 203 files, 4366 passing 07:15
pugs_svn r22576 | lwall++ | [viv] now outputs p6 variables, declarations 07:27
r22576 | lwall++ | [STD] more random hackage for viv and :exists
r22576 | lwall++ | [STD] now parses declaration initializers as normal assignops
pmurias_ @tell mncharity everything in elf_f_work seems to be obsolete 09:24
lambdabot Consider it noted.
pmurias @tell misc/elfish/AST is supposed to contain the description of the IRx1 in Perl 6 as opposed to a strange "DSL" 09:26
lambdabot Consider it noted.
moritz_ pmurias: EWRONGNICK 09:27
pmurias @tell mncharity misc/elfish/AST is supposed to contain the description of the IRx1 in Perl 6 as opposed to a strange "DSL"
lambdabot Consider it noted.
bacek pugs: my @a = (1); @a[0] := @a; @a.perl 10:04
p6eval pugs: RESULT["\\((1,),)"]
rakudo_svn r31877 | masak++ | [rakudo] prefix/postfix ++ and -- now delegate to succ and pred, respectively 10:13
r31877 | masak++ | patch courtesy of Vasily Chekalkin (bacek++)
r31877 | masak++ | this patch fixes bug #59596
pugs_svn r22577 | masak++ | [t/spec/S03-operators/autoincrement.t] added tests for overriding succ and pred 10:41
masak moritz_: what's running pugs_svn? 10:49
moritz_ masak: a mix of Bot::BasicBot and SVN::Log 10:50
masak is there source somewhere?
pasteling "moritz_" at 89.13.235.160 pasted "svnbot source for masak" (77 lines, 1.8K) at sial.org/pbot/32576 10:52
masak dz :)
I'm mainly looking for inspiration right now.
moritz_ I've been planning for ages to make it configurable and put it somewhere 10:53
masak moritz_: what's calling &tick ? 10:54
ah, found it 10:55
Bot::BasicBot
of course
that's what I need! 10:56
masak membles enthusiastically
literal what kind of inspiration? for writing an IRC bot? 11:01
masak literal: aye. using POE. 11:02
literal have you read the POE::Component::IRC documentation?
masak literal: partly.
will read it again. :)
literal bug me if you find anything wrong with it :P 11:03
masak literal: hokay.
& lunch
literal also, here's something, search.cpan.org/dist/IRC-Bot/ 11:03
lambdabot Title: Benjamin W. Smith / IRC-Bot - search.cpan.org
masak perl6: say map {; $_ => "foo" }, (1, 2, 3, 4) 13:13
p6eval pugs: OUTPUT[1 foo2 foo3 foo4 foo␤]
..elf 22577: OUTPUT[Use of uninitialized value in join or string at ./elf_f line 169.␤Undefined subroutine &GLOBAL::map called at (eval 119) line 3.␤ at ./elf_f line 3861␤]
..rakudo 31880: OUTPUT[Null PMC access in get_string()␤current instr.: 'parrot;P6metaclass;add_parent' pc 95 (runtime/parrot/library/P6object.pir:126)␤]
masak hm, my local rakudo doesn't die on that. 13:14
moritz_ say (map {; $_ => "foo" }, (1, 2, 3, 4)).WHAT
rakudo: say (map {; $_ => "foo" }, (1, 2, 3, 4)).WHAT
p6eval rakudo 31880: OUTPUT[Null PMC access in get_string()␤current instr.: 'parrot;P6metaclass;add_parent' pc 95 (runtime/parrot/library/P6object.pir:126)␤]
masak anyway, I was going to say that it's a bit unfortunate that the tabs make the wrong things group together
I don't know if that counts as a design flaw, it's just unfortunate 13:15
moritz_ unfortunate design flaw? ;-) 13:16
masak oh, oh, I've found out now why the S29 link under "caller" is broken 13:18
it's line 35 of Pod::Simple::HTML
it says to always strap on the prefix 'search.cpan.org/perldoc?' to a link 13:19
apparently it's overridable
(Sean M. Burke)++
as I see it, I want to set $Perldoc_URL_Prefix = 'perlcabal.org/syn/'; $Perldoc_URL_Postfix = '.html'; in util/smartlinks.pl 13:21
moritz_ that would make S\d**2 links work 13:22
masak ...which is what I'm after
moritz_ great
masak it bugs me that they're broken
hm, those variables are imported using a 'use vars' declaration 13:23
moritz_ s/imported/declared/
masak ok.
moritz_ that's rougly the same as our
masak does that mean I don't have to use our in util/smartlinks.pl? 13:24
moritz_ you can access them via $Full::Package::Name::Perldoc_URL_Postfix or somethiing
(I hope)
masak ah.
good.
before or after the eval { require Pod::Simple::HTML }; ? 13:25
moritz_ after
masak will that work? won't line 35 in Pod::Simple::HTML have executed by then? 13:26
ah, but that doesn't matter, does it? :)
moritz_ is it in a sub?
masak no
moritz_ uhm 13:27
masak it's out in the open
moritz_ just try it. Since it's only a default it should be possible to override afterwards 13:28
masak I think so too.
that variable is used in the constructor, so as long as I set it before I create a new object, it should be ok 13:29
pugs_svn r22578 | masak++ | [util/smartlinks.pl] unbroke cross-reference links between synopses 13:31
masak "step 2: wait." 13:33
moritz_ why wait?
you can generate the HTML on your machine
it's one of the countless options in smartlinks.pl
masak ooh 13:36
masak generates 13:37
it worked! :D 13:42
pugs_svn r22579 | moritz++ | [t/spec] some smartlinks for rx.t. Many more needed. 13:46
pugs_svn r22580 | moritz++ | [t/spec] more smartlinks for rx.t, removed a few vim modelines 13:50
moritz_ masak++ # it works, and is now online 14:04
masak excellent.
dominiko Ri, faccio un sonellino adesso (k) 14:29
mncharity sigh. change in plans. back later. current plan is to viv-ify STD_blue, with eye towards doing () tools, () STD_blue elf bootstrap, () STD_blue elf does STD.pm -> IR, () flesh out rx IR with rx_on_re in some form, () bootstrap, () profit. 14:59
lambdabot mncharity: You have 2 new messages. '/msg lambdabot @messages' to read them.
mncharity @tell pmurias re elf_f_work, ok, sounds rm-able. re misc/elfish/AST, create README please (if havent'a already) ? though it looked like it was simply cat IRx1_Nodes.pm |perl -ne 'print if /^\s*(class|has)/;' or something vaguely like that. 15:04
lambdabot Consider it noted.
moritz_ std: proto [foo] (*@args) { 1; } 15:10
p6eval std 22580: OUTPUT[parse failure␤]
moritz_ @tell TimToady STD.pm can't parse proto [foo] as illustrated in S03/Reduction operators/ 15:11
lambdabot Consider it noted.
TimToady whee 15:21
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
moritz_ are you serious about that syntax? 15:22
oh, and I think rafl++ pointed out that array and hash unpacking in signatures wasn't parsed either 15:23
but I haven't verified myself
TimToady dunno 15:24
not sure why it's a proto either
moritz_ std: sub quicksort ([$pivot, *@data], $reverse?, $inplace?) {1; }
p6eval std 22580: OUTPUT[parse failure␤]
moritz_ (never trust p6eval's std output though, it's a bit unstable) 15:25
TimToady well, I don't even trust STD's output yet :)
half of the fixes to viv involve fixing STD too 15:26
moritz_ it can parse more Perl 6 than I can ;)
TimToady well, there's that....
I'm trying to think of a way to simplify all the sigil hoisting that is more like attribute grammars than procedures 15:27
pugs_svn r22581 | moritz++ | [t/TASKS] two more tasks 15:28
r22582 | moritz++ | [t/TASKS] **? is tested in rx.t and repeat.t 15:30
moritz_ currently [\$op] is only tested with left-assoc $op 15:34
would @@ [\**] 2, 3, 4 return [4], [3**4], [2**3**4]? 15:35
erm, just 4, 3**4, 2**3**4 15:36
TimToady yes 15:37
moritz_ pugs: 2**3**4 15:39
p6eval pugs: RESULT[2417851639229258349412352/1]
TimToady here's an interesting ambiguity: -> $x { #<I am a hash unpacker> }
moritz_ ouch
masak :/
TimToady and you can't change it to -> $x{...} because that's a shaped array declaration 15:40
s/array/hash/
well, %x{...} would be, anyway 15:41
not sure there are shaped scalars :)
pugs_svn r22583 | moritz++ | [t/spec] tests for [\$op] with right assoc $op
TimToady actually, it's not clear why we shouldn't just unpack arrays and hashes with sub-signatures, which parse already 15:49
sub quicksort ([$pivot, *@data], $reverse?, $inplace?) 15:50
could just as easily be:
sub quicksort (($pivot, *@data), $reverse?, $inplace?)
moritz_ and [...] suggest a reference to an array anyway 15:51
TimToady other than the doc value
but sigs can unpack mixed positional named
the bad ambiguity goes away if we change 15:52
sub register ({:$name, :$addr, *%guest_data}, $room_num)
to
sub register ((:$name, :$addr, *%guest_data), $room_num)
pmichaud in irclog.perlgeek.de/perl6/2008-10-07#i_609762 I asked the question:
lambdabot Title: IRC log for #perl6, 2008-10-07
pmichaud class Foo { ... }; say Foo.WHAT; # "Foo\n" 15:53
module Bar { ... }; say Bar.WHAT; # ???
ruoso answered: 'cannot find class Bar in the current scope'
...is that correct?
because S11 has Foo::Bar.EXPORTALL, which seems to be a method call on the Foo::Bar module 15:54
masak seems there has to be _some_ way to refer to a module 15:54
TimToady modules and packages are objects too :)
pmichaud so .WHAT would work, then? 15:55
TimToady but the distinction seems to be rather like the @x.method vs $x.method distinction
on the other hand WHAT is really a macro
not sure I've had enough caffiene to puzzle it out yet 15:56
pmichaud yes, I know it's a macro, but if Foo::Bar is an object, it seems like we should be able to do .WHAT on it.
TimToady I think Foo::Bar is first of all a package name
which can in some cases be used as a class 15:57
pmichaud well, protoobject.
TimToady it's first of all a package name that can also be used as a protoobject :)
I guess the question is where there are ambiguities in "how is it being used?" and what we need to do to clear those ambiguities 15:58
or however you say that in English
pmichaud at the moment I'm just curious what .EXPORTALL is being called on :-)
if the answer is that it's called on a Package, that's fine with me. :-) 15:59
TimToady one could consider all packages to be protoobjects
it's just that
pmichaud that's the way I was headed first, until I asked the .WHAT question above (and got ruoso's answer) 16:00
TimToady no methods are automatically constructed unless it's a class
pmichaud I'm wondering if Foo::Bar is just an instance of a package.
TimToady well, ruoso thinks sideways from the rest of us, which has both advantages and disadvantages :)
was wondering that earlier, but it makes a discontinuity of sorts 16:01
pmichaud agreed.
TimToady it may be that Foo:Bar.randommethod should fail just to keep all package names looking like undefs 16:02
TimToady except for methods that are defined on undefs, of course :) 16:03
but WHAT is exempt as a macro
so I think WHAT on a package name/protoobject should return the packagename/protoobject probably 16:04
it's just you can't do much more with it than you could before :)
anyway, WHAT is fundamentally not an ordinary method 16:07
pmichaud sure, I get that
TimToady I think that's where the discontinuity should be
not between packages and classes 16:08
pmichaud my question was more along the lines of "for Foo::Bar.EXPORTALL", what is the class of the thing receiving ".EXPORTALL"?
TimToady I think, probably, fundamentally packages and modules are also classes; they just guarantee certain extra apparatus when you use a particular keyword 16:10
so maybe it's fine to put a method in a package and call it, but you get no automatic EXPORTALL method, for instance
(unless we want to support @ISA somehow in that case for old time's sake...:) 16:11
so you could import methods from a module into a class maybe too, albeit without the protection of roles 16:12
and by default they'd be imported as "my methods"
which seems like it might be useful for importing infrastructure
since roles are mostly for composing api
certainly STD doesn't care where you define a method 16:13
certainly ruby gets along by making everything a class really, but we can be clearer about intent 16:14
if we want to talk about a package as a container, maybe it's VAR(package) 16:16
so Foo::Bar.method is more like $x.method than like @x.method, which is what I was trying to get at earlier
or Foo::Bar:: is also perhaps the container 16:17
which is why Foo::Bar::{'$foo'} works
yow, does that mean would do away with VAR and just use $foo:: to mean the container of $foo? 16:18
pmichaud or perhaps ::$foo ? O
TimToady s/would/we could/
doesn't backport to ::Foo::Bar
with the current meaning of that
which is, I know this is a valid package name, don't check it 16:19
pmichaud ah, okay.
TimToady package/type/protoobject...
pmichaud lunchtime here -- bbiaw 16:21
TimToady yeah, I need to go break my house 16:22
pugs_svn r22584 | masak++ | [t/TASKS] fixed a few typos 16:39
rjbs So, I see ./languages/json, but is there a way to use that or something else to turn JSON into Perl6 data? 17:44
rakudo_svn r31886 | pmichaud++ | [rakudo]: Some updates to progress-graph.pl. 18:04
rjbs wonders if he can get a json answer in the hackathon room. :) 18:09
pmichaud at present we don't have a way of doing language interop in rakudo. 18:16
rjbs Is there a way to find if someone has written a library to do X apart from Google? 18:18
Maybe I can just write some rules.
rakudo_svn r31887 | pmichaud++ | [rakudo]: STD.pm alignment -- add <args>, split out <morename> in <name> 18:26
speckbot r14593 | larry++ | clarify use of [...] and {...} in a signature 18:39
rakudo_svn r31888 | pmichaud++ | [rakudo]: STD.pm alignment -- convert <identifier> in term:name to <name> 18:50
literal pugs: [*] 2, 3, 3.14 18:53
p6eval pugs: RESULT[471/25]
literal O_o
TimToady pugs are fond of rats 18:54
pugs_svn r22585 | lwall++ | [STD] implement [...] and {...} subsigs, rafl++ and moritz++ 18:55
r22585 | lwall++ | [viv] warning suppression
TimToady now that I've broken the house, it's time to go on the roof 18:56
moritz_ TimToady: in that spec commit you used the same example twice, which seems a bit non-sensical to me
copy & paste gone wrong? 18:57
TimToady example is right, but comment is wrong 18:58
fixing
speckbot r14594 | larry++ | copy/paste error, moritz++
TimToady afk & # roof 19:00
[particle] jump! 19:04
pmichaud std: /join #ppw 19:10
oops!
p6eval std 22585: OUTPUT[parse failure␤]
[particle] wait, perl 6 doesn't understand irc syntax!?!?
ISAGN. 19:11
pmichaud std: ::Apache::foo 3, 4
p6eval std 22585: OUTPUT[parse failure␤]
pmichaud std: ::Apache::foo(3, 4)
p6eval std 22585: OUTPUT[parsed␤]
rakudo_svn r31889 | pmichaud++ | [rakudo]: Eliminate bogus duplicate <name> rule. 19:43
rjbs is looking for documentation on how to force an indirect subrule into a named capture. 19:45
Perhaps that is irrelevant... 19:46
my $members = /x/; my $object = /'{' <$members> '}'/;
rakudo barfs, Statement not terminated properly at line 72, near "$members> "
pmichaud rjbs: the syntax is my $object = / <$members> /; 19:49
but that will use the value of $members at the time the regex is invoked, as opposed to when the regex is defined (I think)
there's not really an "interpolation" mechanism like in p5
rjbs That's what I expect.
pmichaud (and rakudo doesn't currently support the <$foo> syntax, sadly.)
rjbs OH! 19:50
Well, that's a bit of a blocker.
pmichaud that will come with the next iteration of PGE
rjbs Thanks
Can I define named subrules inside a single rule? (Like I can in Perl 5 v10)
rjbs Well, whatever, no worries. Thanks very much! 19:51
moritz_ $stuff=(capture)
rakudo: "abc" =~ m/$x:=(.)/; say $<x>; 19:52
p6eval rakudo 31889: OUTPUT[Method 'lvalue' not found for invocant of class 'PAST;Val'␤current instr.: 'parrot;PAST;Compiler;as_post' pc 2887 (src/PAST/Compiler.pir:736)␤]
moritz_ rakudo: "abc" =~ m/$x=(.)/; say $<x>;
p6eval rakudo 31889: OUTPUT[Method 'lvalue' not found for invocant of class 'PAST;Val'␤current instr.: 'parrot;PAST;Compiler;as_post' pc 2887 (src/PAST/Compiler.pir:736)␤]
moritz_ uhm :(
[particle] ahem
~~ not =~
pmichaud rakudo: "abc" ~~ /$x=(.)/; say $<x>
moritz_ ouch
p6eval rakudo 31889: OUTPUT[Use of uninitialized value␤␤]
rjbs yeah, what I want to do is reuse the (.) though 19:53
pmichaud rakudo: "abc" ~~ /$<x>=(.)/; say $/<x>
p6eval rakudo 31889: OUTPUT[a␤]
rjbs by name rather than by cut and paste
but knowing $<x>=(.) is definitely useful too
moritz_ then use 'rule x { ... }'
pmichaud rakudo: regex x { . }; "abc" ~~ / <x> <x> <x> /; say $<x>[1]; 19:54
p6eval rakudo 31889: OUTPUT[b␤]
rjbs woah. rakudo just went nuts
rule members = { 'x' }; my $object = / '{' <members> '}' /; 19:55
perl6(7644) malloc: *** error for object 0x2a934a0: double free
*** set a breakpoint in malloc_error_break to debug
pmichaud wow, that's odd.
rjbs same for s/rule/regex
pmichaud no = in 'rule' statement 19:56
rjbs ha, duh
pmichaud I'm not sure why that's not a syntax error, though.
rjbs perfect
thanks much
gotta get ready to give my talk, back to this later
rule{ } is even better than <$rule anyway, for me
rakudo_svn r31891 | cotto++ | [codingstd] trailing space fix 22:18