Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-10-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 weinig is now known as weinig|bbl
00:06 clkao audreyt: in case we don't splury multidim is all we need, maybe i shouldn't have refactored data::bind to be so generic using a signature collection
00:08 kastol joined perl6
00:14 Qiang_ joined perl6
00:19 avarab joined perl6
00:27 nekokak joined perl6
00:43 SCalimlim joined perl6
00:43 svnbot6 r13896 | audreyt++ | * Add --make to build_pugs.pl for 6.6-head, and correct a typo
01:04 hikozaemon joined perl6
01:08 mauke joined perl6
01:12 [1]kastol joined perl6
01:17 [1]kastol is now known as kastol
01:37 audreyt clkao: yeah, I think it's not really warranted
01:39 clkao oh well
01:43 audreyt I had a very vivid dream last night about nethack.org releasing nethack 3.5 with native support for UTF8-based line drawing characters...
01:44 audreyt I just now realized that it's just a dream :/
01:47 clkao i think it's impossible to port nethack to perl6
01:50 audreyt need a c2p6 translator
01:50 audreyt based on CINT or Ch
01:50 audreyt and rewrite the interpreter backend to perl6
01:50 audreyt surely it's possible
01:50 audreyt just not by hand :)
01:51 MacVince joined perl6
02:02 MacVince ?eval ?(1 == one(1,2,3,4))
02:02 evalbot_r13894 is now known as evalbot_r13896
02:02 evalbot_r13896 Bool::True
02:02 MacVince ?eval ?(1 == one(1,2,3,1))
02:02 evalbot_r13896 Bool::False
02:17 mako132_ joined perl6
02:20 audreyt TimToady: are we keeping y/// ?
02:20 audreyt presuming yes as the spec doesn't say otherwise
02:20 kanru joined perl6
02:23 markstos joined perl6
02:24 weinig|bbl is now known as weinig
02:24 pasteling "markstos" at 12.176.101.89 pasted "Passing \$str to Perl 5 looks inconsistent" (18 lines, 644B) at http://sial.org/pbot/20175
02:25 audreyt markstos: it's clearly a bug. write test under t/perl5/ :)
02:25 audreyt also you can say
02:25 markstos audreyt: Ok, will do.
02:25 lambdabot markstos: You have 4 new messages. '/msg lambdabot @messages' to read them.
02:25 audreyt $p5_dumper()
02:25 audreyt anywhere postcircumfix .() works, () works
02:25 audreyt @messages
02:25 lambdabot You don't have any new messages.
02:25 markstos Oh. I wonder where I got the idea to add the "." probably from a test I saw somewhere.
02:25 audreyt oh, it's not addressed to me :)
02:27 markstos audreyt: I'm going to write up some of these p5 passing details on the wiki soon.
02:27 markstos So I'll ask:
02:27 markstos is there a preference of  \$var versus VAR $var ? both seem to work (except for this bug I found).
02:28 audreyt VAR $var is canonical
02:28 markstos I like "\" because it looks like p5 references, although I don't really get why it works like this instead of doing something Capture-y.
02:28 audreyt \$var is should to be supported specifically as a perl5 interop on the perl5 interop layer
02:28 audreyt i.e. I'll later hardcode the perl5 interop such that a Capture-y
02:28 audreyt \($var:)
02:28 audreyt will also work as a perl5 "reference"
02:28 markstos Good. I like that design.
02:28 audreyt thanks :)
02:28 markstos It's good for the transition, I think.
02:29 markstos I'll use \$, \% and \@ in the docs, then.
02:29 * markstos goes to write that test
02:29 clkao audreyt: whats your current release and post-release plan again? you hven't been blogging ;)
02:30 audreyt aiming for end of test triage this week
02:31 audreyt enlisting changelogging and more smoke testing on weekend
02:31 audreyt definitely release before the end of next week
02:31 audreyt that's 14th
02:32 audreyt after that, integrate MO/Moose metamodel in
02:32 audreyt and swap out OldParam into newland Signature and Capture
02:32 audreyt and drop GHC 6.4 compatibility after that
02:32 audreyt so we can use GHC's OO notation
02:35 clkao uhm. integrate MO/Moose as in using the p5 bring in hscore?
02:35 audreyt no, as in porting http://nothingmuch.woobling.org/MO to haskell
02:35 lambdabot Title: Index of /MO
02:35 audreyt it is conceivable to use p5 bridge and run entirely in p5 space
02:36 clkao y, i thought so
02:36 audreyt but I'd like to explore the possibility of a Hs port
02:36 clkao *nod*
02:36 audreyt as that has a record of turning up subtle design flaws in the p5 counterpart...
02:36 lanny joined perl6
02:36 clkao ehehe
02:36 clkao *sigh*
02:36 clkao is it christmas yet
02:37 lanny It's christmas somewhere.  No, wait... that's happy hour.
02:37 lanny it's happy hour somewhere if that helps.
02:39 clkao audreyt: what happened to the shared common ast ?
02:39 lanny joined perl6
02:39 audreyt clkao: it lives in src/Pugs/Exp but as it's not swapped in, we aren't sure that it works well
02:40 audreyt once it's swapped in and it works well, then compiling it via Moose into v6/ land will make sense
02:40 clkao *nod*
02:40 audreyt the p5/pcr bridge thing is a massive sidetrack
02:40 audreyt but it proved to have many good properties
02:40 audreyt so it was worth sidetracking :)
02:41 clkao yum. sidedish
02:42 audreyt oh, and when we drop 6.4 compatibility for GHC, I'd like to drop 5.6 compatibility for perl as well
02:42 audreyt tired of #ifdef SvUTF8 and friends
02:42 clkao yay
02:42 audreyt YAML::Syck went to grreat length to run on Perl 5.004
02:42 kanru joined perl6
02:42 clkao can we drop 5.8 ? tired or not using // and //= ;)
02:42 pasteling "markstos" at 12.176.101.89 pasted "bug: P5 returns hash key/values out of order" (15 lines, 356B) at http://sial.org/pbot/20176
02:42 audreyt not going to worry about that for pugs I guess
02:42 clkao (not really)
02:43 audreyt clkao: tell that to rgs :)
02:43 clkao anymoos
02:43 clkao i wonder what's the story with fglock's brnching and if it's safe to commit into pc-p6
02:44 mauke_ joined perl6
02:44 audreyt markstos: oops! fixing
02:45 audreyt            out[i+1] = newSVsv(POPs);
02:45 audreyt heh
02:45 audreyt I wonder whose code that is
02:46 clkao must not be mine!
02:46 audreyt it's mine then
02:47 clkao is there a zip() written already?
02:47 audreyt clearly newSVsv(ST(1)) will d
02:47 audreyt do
02:47 audreyt ST(i) even
02:47 audreyt ?eval zip(1,2,3;4,5,6)
02:47 evalbot_r13896 ((1, 2, 3, 4, 5, 6),)
02:47 audreyt ?eval item zip(1,2,3;4,5,6)
02:47 evalbot_r13896 ((1, 2, 3, 4, 5, 6),)
02:47 audreyt that looks wrong.
02:47 clkao ya. and also i mean in perl6
02:47 audreyt not afaics
02:47 weinig is now known as weinig|sleep
02:47 audreyt ?eval each(1,2,3;5,6,7)
02:47 evalbot_r13896 (1, 2, 3, 5, 6, 7)
02:48 audreyt aha
02:48 audreyt ?eval zip((1,2,3);(4,5,6)
02:48 audreyt ?eval zip((1,2,3);(4,5,6))
02:48 evalbot_r13896 Error:  Unexpected end of input expecting comment, operator, ":" or ")"
02:48 evalbot_r13896 ((1, 4), (2, 5), (3, 6))
02:49 audreyt that's more like it.
02:49 audreyt (the previous failures was due the the way we fake semicolon regcognition while the AST not really supporting them)
02:49 lisppaste3 joined perl6
02:49 markstos_ joined perl6
02:50 avarab is sub sprintf a candidate for Prelude.pm in Pure Perl? The current one uses Pugs::Internal::
02:50 avarab is now known as avar
02:52 audreyt avar: sure, feel free to rid it of that dep
02:53 clkao sub zip(*@@a) { map { my $which = $_; (map { @a[$_][$which] } @a.length)     } 1..max(map { @a[$_].length } ) }
02:53 clkao something like that?
02:54 mauke_ is now known as mauke
02:55 lanny If you are doing the perl6 version do you want to throw in :shortest and :finite?  Well not :finite since no lazy lists yet.
02:57 markstos_ I thought this would work to return a hashref from Perl5:
02:57 markstos_ my %o = $p5_dumper.(\%h);
02:57 markstos_ But instead I get an error:
02:57 markstos_ Odd number of elements found where hash expected: PerlSV 0x08de6b68
03:00 [particle] perhaps .(%h) instead? (maybe it thinks .(\%h) is a one element list
03:01 markstos_ particle: I don't think it's the passing-it-in, I think it's the getting-it-back-out that's causing the problem.
03:01 markstos_ Trying variations seems to confirm that's the issue.
03:01 [particle] oh
03:02 [particle] how about putting .kv at the end?
03:02 markstos_ which end? :)
03:02 [particle] my %o = $p5_dumper.(\%h).kv;
03:03 audreyt you need :=
03:03 fglock joined perl6
03:03 audreyt %o := $p5_dumper(\%h)
03:03 markstos_ Interesting idea particle, but I get: No compatible subroutine found: "&kv"
03:03 audreyt or
03:03 audreyt %o = $p5_dumper(\%h)
03:03 audreyt er
03:03 audreyt $o = $p5_dumper(\%h)
03:03 audreyt it's the same reason why
03:03 audreyt my %hash = \%foo;
03:03 audreyt doesn't work in perl5
03:04 [particle] audreyt: is there a way to use .kv?
03:04 [particle] perhaps parens around the $p5... call?
03:04 markstos_ Audrey I confirmed that := works.
03:04 audreyt [particle]: not until we get Moose::Autobox by default on p5 land
03:04 audreyt which maybe we shall
03:05 [particle] ah, okay
03:05 audreyt thing is that a perl5's idea of CV is really not the pugs idea of Code
03:05 audreyt ditto HV and Hash
03:05 audreyt so a perl5 "sub" doesn't respond to .signature
03:05 audreyt nor does a perl5 "hash" respond to .kv
03:05 audreyt Moose::Autobox is the layer to fix this I think
03:05 [particle] okay, impedence mismatch.
03:06 markstos_ And if I do $o = ... , then I can do $o<a> ?
03:06 audreyt markstos_: sure
03:06 audreyt % and @ in perl6 are more context hinters than anything
03:06 audreyt and you can use $ all the way to resemble a language without autoflattening
03:06 markstos_ That seems to get me: Odd number of elements found where hash expected: VInt 1
03:07 audreyt oh? hmm
03:07 markstos_ I'll nopaste.
03:07 audreyt ?eval eval('use CGI', :lang<perl5>)
03:07 evalbot_r13896 Error: Unsafe function 'Pugs::Internals::eval_perl5' called under safe mode
03:07 audreyt k
03:09 fglock audreyt: I'm changing PCR calling convention to accept string-refs - such that I can reuse Perl5 pos($str) - but I'll keep it backwards compatible for a while
03:09 markstos_ I tried to make symlike to my file, but I get a 403. http://feather.perl6.nl/~markstos/basic.t
03:09 markstos_ I'll try a copy instead of a symlink.
03:09 lanny audreyt: I've read the docs I can find in the codebase for pugs.  If i want to up my understanding should I try and grok the Parser next or the Monads?
03:11 audreyt lanny: Parser is literred with comments so it's a good place to start
03:11 lanny Thank'ee.  :)
03:11 audreyt fglock: that's fine, please update HsBridge if possible
03:11 audreyt fglock: I think it's just one or two calls there
03:12 audreyt Pugs::Runtime::Match::HsBridge that is
03:12 fglock ok
03:12 pasteling "markstos" at 12.176.101.89 pasted "p5 embedding tests" (59 lines, 1.2K) at http://sial.org/pbot/20177
03:13 fglock accepting string-refs also makes it work with boxed strings (which are blessed string refs)
03:13 audreyt markstos_: looks good, please commit
03:13 markstos_ Ok. I'll finish the commented out tests at the bottom first. Should be fast.
03:22 diotalevi joined perl6
03:22 svnbot6 r13897 | markstos++ | Several new basic tests for Perl5 Embedding, some failing.
03:23 svnbot6 r13897 | markstos++ | One dies in the middle of the script right now.
03:23 svnbot6 r13896 | audreyt++ | * Add --make to build_pugs.pl for 6.6-head, and correct a typo
03:26 svnbot6 r13898 | fglock++ | Pugs-Compiler-Rule - implemented :continue in :Perl5, using native pos()
03:27 markstos_ That's about all the energy I have tonight. See you later!
03:27 markstos_ left perl6
03:28 audreyt @tell marstos good nite and thanks :) and I've fixed the reverse-list-return bug
03:28 lambdabot Consider it noted.
03:28 audreyt @tell markstos good nite and thanks :) and I've fixed the reverse-list-return bug
03:28 lambdabot Consider it noted.
03:30 avar man, auto-apt rocks
03:31 ofer0 joined perl6
03:32 markstos_ joined perl6
03:33 svnbot6 r13899 | audreyt++ | * Adjust t/perl5/basic.t a bit.
03:33 markstos_ audreyt: I just saw your message about fixing a lot of the functionality for the  multi method tests I wrote. Thanks a lot!
03:34 fglock &
03:34 svnbot6 r13900 | audreyt++ | * Oops: Lists returned from Perl 5 subroutines were collected
03:34 svnbot6 r13900 | audreyt++ |   in the reverse order.  Thanks to markstos++ for noticing.
03:34 fglock left perl6
03:35 audreyt markstos_: no prob :)
03:37 svnbot6 r13901 | audreyt++ | * trans.t: Add y/// tests. (tr/// and y/// should all pass now.)
03:37 svnbot6 r13902 | audreyt++ | * Pugs.AST.Internals: ::Hash.{1} in rvalute context
03:37 svnbot6 r13902 | audreyt++ |   should be undef, not an error.  I think.
03:40 svnbot6 r13903 | audreyt++ | * Add support for transliteration:
03:40 svnbot6 r13903 | audreyt++ |     tr///
03:40 svnbot6 r13903 | audreyt++ |     y///
03:40 svnbot6 r13903 | audreyt++ |     $x ~~ tr///
03:40 svnbot6 r13903 | audreyt++ |     $x ~~ y///
03:40 svnbot6 r13904 | audreyt++ | * trans.t: more cleanup.
03:44 nperez joined perl6
04:08 TimToady audreyt: ping
04:08 TimToady y/// is supposed to go away.
04:09 TimToady also thinking about defaulting zip etc. to shortest and mark end of extensible list with *.
04:10 clkao TimToady: is there a zip implemention written in perl6?
04:11 nperez joined perl6
04:11 TimToady ?eval zip(1,2,3;4,5,6)
04:11 evalbot_r13896 is now known as evalbot_r13904
04:11 evalbot_r13904 ((1, 2, 3, 4, 5, 6),)
04:11 TimToady hmm, thought audreyt fixed that...
04:12 TimToady yes, there is, it's just b0rken, I guess.
04:13 lanny Not broken.  Needs:
04:13 lanny ?eval zip((1,2,3);(4,5,6))
04:13 evalbot_r13904 ((1, 4), (2, 5), (3, 6))
04:13 lanny Otherwise it's a list op with 3;4 as a term(?)
04:14 TimToady that's b0rken
04:14 clkao TimToady: no, i mean a zip written in pure perl6, not in pugs.
04:14 TimToady I haven't heard of one.
04:16 lanny My bad.  ';' is parsing as ','.  ;(
04:16 TimToady the whole point of using semicolon is to allow slices as terms without extra bracketing
04:16 audreyt yes, it's broken
04:17 MacVince TimToady: so what should zip(1,2,3;4,5,6); return?
04:17 audreyt TimToady: S12 r12675 is my 0th whack at making the foo(@x) / @x.foo symmetry go away... sanity check appreciated
04:17 audreyt MacVince: same as zip((1,2,3);(4,5,6))
04:17 MacVince ok
04:17 MacVince ?eval zip((1,2,3),(4,5,6))
04:17 evalbot_r13904 ((1, 4), (2, 5), (3, 6))
04:17 audreyt TimToady: also, should the "has $groomer" and "has $tail" in S12 be c hanged to
04:17 audreyt "has $.groomer" and "has "$.tail" respectively?
04:18 TimToady depends on whether you want them to be public accessors.
04:18 audreyt Note that this puts the three methods into the class as well as
04:18 audreyt C<$groomer>.  In contrast, "C<has $!groomer>" would only put the
04:18 audreyt three methods.
04:18 audreyt that seems wrong then, as $groomer there is same as $!groomer
04:19 audreyt but the text makes it loo like it's talking about $.groomer
04:19 TimToady I'll have to look at it.
04:19 audreyt k thx :)
04:19 TimToady anyway, intent was to kill y/// and have only tr///
04:20 audreyt oh. ok, add a short passage to S05 then?
04:20 audreyt I'll nuke y///
04:22 svnbot6 r13905 | audreyt++ | 06:19 < TimToady> anyway, intent was to kill y/// and have only tr///
04:25 svnbot6 r13906 | audreyt++ | * splice.t: TODO two fails due to the unary-sub-fallback-to-meathod
04:25 svnbot6 r13906 | audreyt++ |   kluge mandated by earlier (as in, early than today) specs.
04:25 svnbot6 r13906 | audreyt++ |   Not going to tackle "method is export" before release...
04:26 putter joined perl6
04:27 svnbot6 r13907 | putter++ | t/xx-uncategorized/an_oddity.t - created.  just an fyi for audreyt. ;)
04:28 audreyt putter: I'm not at all sure that space-separated adbverbs work in listop
04:29 audreyt TimToady: is that supposed to be legal?
04:29 audreyt some_listop 1, 2, 3 :adv1 :adv2 :adv3
04:29 TimToady seems like it could
04:29 audreyt hmm
04:29 putter originally had comma seps - boom then too...
04:29 TimToady er, but that doesn't work there as args to the listop
04:30 TimToady those are modifiers on the last comma
04:30 audreyt oy
04:30 audreyt that's very subtle
04:30 TimToady some_listop 1, 2, 3, :adv1 :adv2 :adv3
04:30 putter oh, happened again with
04:30 TimToady you only get term adverbs where a term is expected.
04:30 pasteling "putter" at 66.30.119.55 pasted "second instance of oddity" (15 lines, 263B) at http://sial.org/pbot/20178
04:31 putter sorry i didn't take the time to boil it down. :/
04:33 audreyt putter: the second instance worksforme
04:35 TimToady on the $groomer thing, it's trying to use the distinction between $groomer and $!groomer to say whether the attribute is private to the class or private to the role.  It's probably a bad thing, but I'm not sure how better to indicate the difference between those.
04:35 putter reminds me - re zones...   I could imagine wanting to group adverbs and args based on "topic", ie, eat(500 grams, :chewing<slowly>, $10, :pay_with<cash>)
04:35 clkao /home/clkao/work/pugs/src/Pugs/Embed/Perl5.hs:                [ "-Iperl5/Pugs-Compiler-Rule/lib"
04:35 audreyt putter: also how is this supposed to work?
04:36 audreyt        my @pairs = (100 => 'lovely');
04:36 audreyt        @pairs.fmt("%d ==> %s", "\n")
04:36 audreyt it's like saying
04:36 putter audreyt: without the is() parens?
04:36 audreyt my @pairs = ([100, 'lovely'])
04:36 TimToady putter: at some point you just slurp everything in as a list and parse it yourself.
04:36 audreyt @pairs.fmt("%d ==> %s", "\n")
04:36 lambdabot Unknown command, try @list
04:36 audreyt and expect that to work
04:36 clkao audreyt: shouldn't this be blib6
04:36 audreyt clkao: no, as PCR is not put into lib6
04:37 TimToady @pairs>>.fmt(...)
04:37 lambdabot Unknown command, try @list
04:37 clkao blib6/pugs/perl5/lib ?
04:38 clkao see util/prove6
04:39 audreyt ah! you are indeed correct
04:39 audreyt a sec
04:40 audreyt putter: the oddity is simply that
04:40 svnbot6 r13908 | putter++ | t/xx-uncategorized/an_oddity2.t - created.  a temporary file for audreyt.
04:40 audreyt statement-level is without parens
04:40 audreyt is parsed as statement_control:<is> macro
04:40 audreyt which sets up inheritance
04:41 putter ah.  ok.  great :)
04:41 audreyt I think that's correct, but maybe TimToady can offer alternate ways to avoid this ambiguity
04:42 audreyt module Main; is eval('foo'), 'bar';
04:42 audreyt is the problem case
04:42 putter re test contents... "contents?  what contents?  i'm in packaging." ;)  haven't payed attention - not current task.  example taken from t/builtins/fmt.t
04:42 audreyt one way is to make this treatment go away when we are in a "module"
04:43 audreyt but even modules may be ascribed traits
04:43 audreyt so that's probably not good
04:43 audreyt another way is to backtrack (gasp) when it's not unary.
04:43 audreyt thatis
04:43 putter lol (gasp)
04:43 audreyt is foo; # statement level always trait
04:43 audreyt is foo, bar; # always funcall
04:44 audreyt another way is to not use "is" for Test.pm ;)
04:44 audreyt (probably not going to fly.)
04:44 audreyt but this situation is a bit like we have a Test::if() that's exported...
04:45 putter good analogy
04:45 putter Test::is renaming contest?
04:46 TimToady use Test can just import a lexical override.
04:47 audreyt that means classes that use Test cannot declare inheritance on statement level?
04:47 audreyt sounds sane (ish)
04:47 TimToady they just have to be more explicit.
04:47 audreyt since Test's consumers are most often not classes
04:47 TimToady ::?CLASS is also Foo;  perhaps
04:47 TimToady or *is(Foo)
04:47 TimToady or somethin'
04:48 audreyt statement_control:<is>(Foo)
04:48 TimToady or we differentiate is/isa
04:48 TimToady but I think that's really ugly.
04:48 audreyt agreed.
04:49 TimToady esp. isa Array
04:49 audreyt I'm happy that we nuked "a" and "an"
04:49 audreyt so definitely not going to bring back "isa" at this moment...
04:50 TimToady could install "is" declarator only in classlike blocks
04:50 TimToady prior art: hash
04:50 TimToady has
04:50 audreyt though I wonde
04:50 audreyt sub foo { is export; }
04:50 audreyt should be mde to work
04:51 audreyt (I assumed it should, but it's not really specced)
04:51 TimToady multi macros.  :)
04:52 putter ... way to handle multiple ast apis... :)
04:52 TimToady can't cross unary listop divide with that though
04:53 TimToady would have to parse is Foo; as listop and disallow is Foo is Bar there.
04:54 TimToady require is Foo; is Bar; instead
04:54 TimToady then you could do a multi macro
04:54 audreyt right, but that sounds sane
04:54 audreyt "is parsed" otoh is insane :)
04:54 TimToady course, mentioning macro in the same conversation as Test is problematic too
04:54 audreyt as evidenced by eval_ok...
04:55 audreyt putter: it now fails with a better:
04:55 audreyt T:~/work/pugs audreyt$ ./pugs -CParse -Iblib6/lib t/xx-uncategorized/an_oddity.t
04:55 audreyt pugs: *** Can't add trait to non-class package: Main at t/xx-uncategorized/an_oddity.t line 1, column 1
04:55 audreyt hope that helps
04:56 putter :)
04:56 svnbot6 r13909 | audreyt++ | * Pugs.Parser: Improve the error message for using a statement-level
04:56 svnbot6 r13909 | audreyt++ |   "is SuperClass" for something that is not a class.
04:57 TimToady *can* we do multi resolution between a listop macro and a listop sub at compile time?
04:57 TimToady (assuming both declared in advance, of course.)
04:58 audreyt reliably, only on arity
04:58 TimToady and then just sort of not bother to call it if it turns out to not be a macro.
04:58 svnbot6 r13910 | audreyt++ | * Remove putter++'s "oddity" tests now the cause is found.
04:58 svnbot6 r13911 | putter++ | [t/xx-uncategorized/an_oddity.t]
04:58 svnbot6 r13911 | putter++ | [t/xx-uncategorized/an_oddity2.t]
04:58 svnbot6 r13911 | putter++ | Deleted these temporary test files.
04:58 audreyt supposedly also with type inference/annotations
04:58 audreyt then we can do compile time prebinding
04:58 audreyt but only arity is going to be predictable
04:59 TimToady arity's enough in this particular case, I guess.
04:59 audreyt hm, how did r12910 and r13911 both commit through.
04:59 audreyt ah, the latter is noop :)
05:00 xinming audreyt: ping
05:00 audreyt pong
05:01 xinming audreyt: hmm, It seems, pugs aims to release new version, If I write test, should I put it under xx-uncategorized or the "right" place for pugs?
05:02 audreyt the "right" place always
05:03 audreyt xx-uncateg is only for people who can't figure out where to put it
05:03 audreyt or when the test is supposed to go away RSN :)
05:05 xinming Ok,thanks
05:05 audreyt np :)
05:07 putter or to lower the barrier to entry for newbies (related to "can't figure out", but different)
05:08 audreyt right.
05:10 putter ok, I've a t/ patch whcih converts all eval_is and eval_ok to is(eval and ok(eval.  test statistics show progress and no regressions.  however, while most uses were incorrect, assuming eval()-like context sharing, TreyHarris points out that some were written knowingly depending on eval_xx's actual behavior.
05:10 putter those I've not yet looked into identifying and correcting.
05:11 audreyt putter: if you see $+foo in the eval strings, it's knowingly testing that
05:12 audreyt but if there's no regressions, I'd like to see it committed now :)
05:13 putter estimate order 10 instances of such (ie, 3 < x < 32)
05:13 putter ok, going in...
05:13 audreyt putter++
05:13 audreyt can we comment out the existing eval_is and eval_ok in Test.pm then?
05:14 audreyt and maybe replace them with the macro versions
05:14 audreyt later
05:14 TimToady it'd be nice to be able to send a closure-string that carries the current lexical context with the string
05:14 BooK joined perl6
05:15 TimToady or teach eval to allow other scopes :CALLER etc.
05:15 audreyt I think you just described q:code{}
05:15 TimToady except q:code has to parse, I think...
05:15 audreyt truly
05:16 TimToady if you can put a :lang on an eval, why not a :scope?
05:16 audreyt CALLER won't do unless all the involved thiings are dec'ed is context
05:16 audreyt or is that what you want?
05:17 audreyt without the "is context" protection, eval_is() seems still better realized as a macro and not an ordinary function
05:17 TimToady could be dangerous unless the caller agrees somehow, but maybe a pragma that says it's okay to eval my strings in my lexical context.
05:17 audreyt use traits 'context';
05:18 TimToady something like that.
05:18 audreyt yeah, that can work.
05:18 TimToady but something on the eval end that bypasses the need for +
05:19 TimToady just seems like eval_ok and such are complete kludges to me.
05:21 TimToady ok(eval() was disliked because of $!, right?  but that's just CALLER::<$!> inside ok()
05:22 TimToady assumimg we don't get false positives on $!
05:23 TimToady or actually, the return of a failed eval() ought to contain the unthrown exception
05:23 TimToady so if ok sees an undef, it could just probe the value further.
05:24 TimToady without relying on out-of-band $! at all.
05:26 TimToady ?eval "1+".eval.perl
05:26 evalbot_r13904 is now known as evalbot_r13911
05:26 evalbot_r13911 "undef"
05:27 TimToady ?eval "fail 'oops'".eval.perl
05:27 evalbot_r13911 Error: oops
05:27 svnbot6 r13912 | yiyihu++ |  r14002@HomePc:  xinming | 2006-10-05 13:24:08 +0000
05:27 svnbot6 r13912 | yiyihu++ |  Add a test for contextual variable.
05:29 xinming hmm...
05:29 xinming ?eval $_ = 'heaao'; s/aa/ll/ && .say;
05:29 evalbot_r13911 OUTPUT[heaao ] Bool::True
05:30 xinming Is this a bug?
05:30 audreyt it most certainly is
05:30 TimToady looks like it.  && should be a sequence point
05:31 audreyt I should parse s/// always as "$_ ~~ s///"
05:31 audreyt and put a transformer on infix:~~ that erases the extra $_ on rhs
05:31 audreyt I think.
05:32 xinming audreyt++
05:32 xinming I'll append the small test later,  now job&
05:32 audreyt k
05:32 TimToady audreyt: we don't have "interesting values of undef" yet, right?
05:33 svnbot6 r13913 | putter++ | In t/ (mostly), converted eval_ok and eval_is to ok(eval and is(eval.
05:33 svnbot6 r13913 | putter++ | The majority were incorrectly assuming lexical and package context were shared.
05:33 svnbot6 r13913 | putter++ | Some knowingly depended on this, and will need to be changed "back" (but hopefully to either local helper code, or something with a less confusion creating name).
05:33 svnbot6 r13913 | putter++ | The quality of position information in error messages about the eval()ed string is reduced.  But without a good macro implementation available on all p6 implementations, this does not currently seem avoidable.
05:33 svnbot6 r13913 | putter++ | eval_dies_ok use was not touched, as it was being used correctly, and it would require a (very) slightly less trivial fix.
05:33 svnbot6 r13913 | putter++ | TreyHarris++ did a lot of related work.
05:33 svnbot6 r13913 | putter++ | eval_ok and eval_is are now gone from:
05:33 svnbot6 r13913 | putter++ |   t/ test files with the exception of t/02-test-pm/1-basic.t
05:33 svnbot6 r13913 | putter++ |   t/REAMDE
05:33 svnbot6 r13913 | putter++ |   ext/Set/t/overload.t
05:33 audreyt TimToady: right, that's in newVal but not in oldVal
05:33 audreyt TimToady: I, too, pine for the day after release when I can swap newVal in :0
05:33 audreyt er, :)
05:34 audreyt newval has:
05:34 audreyt data ValUndef = UUndef                        -- ^ "my $x" | UWhatever                     -- ^ "my $x = *" | UFailure  { f_err  :: !WHICH } -- ^ "my $x = fail 'oops'" | UProto    { p_meta :: !WHICH } -- ^ "my $x = Dog" deriving (Show, Eq, Ord, Data, Typeable)
05:34 audreyt er
05:34 audreyt data ValUndef = UUndef                        -- ^ "my $x" | UWhatever                     -- ^ "my $x = *" | UFailure  { f_err  :: !WHICH } -- ^ "my $x = fail 'oops'" | UProto    { p_meta :: !WHICH } -- ^ "my $x = Dog" deriving (Show, Eq, Ord, Data, Typeable)
05:34 audreyt sigh
05:34 audreyt Terminal.app--
05:35 audreyt Undef/Whatever/Failure/Proto
05:35 audreyt we don't yet have a Failure in oldVal
05:35 dmsantam joined perl6
05:35 xinming putter: ping
05:35 TimToady well, it should certainly help to make failed evals more directly informative.
05:35 audreyt indeed.
05:36 putter xinming: :)
05:36 TimToady and I don't think out-of-band $! is entirely sane.
05:37 putter audreyt: re commenting out eval_ok/is in Test.pm, I took a lower impact approach in leaving alone Test.pm and the .t files which directly tested it.
05:37 audreyt putter: ok, that's fine
05:37 audreyt resmoking to gauge impact
05:37 audreyt bbiab
05:37 putter but in the time it took to commit, new eval_ok tests got added (xinming++ :).  so perhaps commenting out is a better idea...
05:38 xinming putter: yes, That's what I just wish to ask... :-P
05:38 audreyt putter: either a "die" with instruction
05:39 audreyt or removing is better thn leaving along
05:39 audreyt hm, http://www.google.com/codesearch looks useful
05:39 lambdabot Title: Google Code Search
05:39 putter or renaming  eval_elsewhere_ok...? :)
05:40 putter like http://www.koders.com/
05:40 lambdabot Title: Koders - Source Code Search Engine
05:40 audreyt L'evaluation est ailleurs...
05:41 audreyt well, google codesearch found pugs, koders not :)
05:41 putter lol
05:41 Yappo joined perl6
05:42 putter xinming: change eval_is/ok to is/ok(eval?
05:43 TimToady have to parenthesize the eval() or use "foo".eval or the eval will eat the rest of the args.
05:44 putter xinming: I can quickly do it.  lots of practice. :)
05:48 audreyt indeed no regression and only progression
05:48 audreyt putter++
05:48 svnbot6 r13914 | putter++ | [t/var/contextual.t]
05:48 svnbot6 r13914 | putter++ | Covert two eval_ok's which were added while r13913 was being committed.
05:49 audreyt TimToady: btw, is this form still valid?
05:49 audreyt delete $foo{1+1}
05:49 nox_ghost joined perl6
05:50 * putter thinks precompiled Test.pm pessimises speed on 6.4.1 64bit old linux.
05:51 audreyt it is possible
05:51 audreyt TimToady: or should it be strictly $foo.delete(1+1) now?
05:51 putter s/thinks/suspects without measurement (aka foolishly)/
05:51 audreyt (this is unique to delete, as otherwise it'd need to be a macro)
05:51 audreyt and a rather complex one at that
05:53 iblechbot joined perl6
05:54 audreyt xinming: uhm, you expect $+FOO to be undef
05:54 audreyt instead of a failure
05:54 audreyt but quotes the spec:
05:54 audreyt a scalar, it then looks in C<%*ENV> for the identifier of the variable,
05:54 audreyt that is, in the environment variables passed to program.  If the
05:54 audreyt value is not found there, it returns failure.  Note that C<$+_> is
05:54 audreyt so can you revise the test to test for failures instead?
05:54 audreyt (also use %*ENV.delete() not delete %*ENV<>)
05:56 TimToady I don't see how delete %hash{1+1} could avoid being a macro or a special.  Another option is %hash{1+1}:delete which would just be a modifier on the subscripting.
05:56 TimToady though it rather obscures the intent, unless the intent is to delete 'en passant'
05:57 TimToady it would work nicely with slices though.
05:57 bsb joined perl6
05:57 TimToady I think there has to be some kind of subscripting form of delete.  args to a .delete method aren't going to have the same kind of dimensionality.
05:58 TimToady @row42 = %hash{'42';*}:delete
05:58 lambdabot Unknown command, try @list
05:59 putter folks ok with  eval_elsewhere_ok ?
05:59 TimToady eval_just_dont_use_this_ok?  :)
05:59 putter easier to rename than to deal with dependency graphs...
06:00 putter ah, so force people to use local helper subs when they need elsewhere-ness.  sure.
06:00 audreyt rofl, TimToady++
06:00 audreyt +(Perl 6 does not support the C<y///> form, which was only in C<sed> because
06:00 audreyt +they were running out of single letters.)
06:00 putter then I'll comment out and rename/disable test files.
06:01 audreyt wow, emergency call to $job.
06:01 audreyt bbiab...
06:01 audreyt (more likely, bbl...)
06:01 TimToady have the appropriate amount of fun...
06:03 xinming putter: thanks for the update. :-)
06:04 xinming audreyt: yes, contextual should stop the problem IMO. :-)
06:05 audreyt stop the problem?
06:05 xinming audreyt: BTW, about delete %*ENV, It's because I didn't read about synopsis about 2 months. :-P
06:05 xinming oops...
06:05 xinming >_<
06:05 xinming stop the program...
06:05 xinming shouldn't stop the program....
06:05 xinming My hands are losing control...  *_*
06:05 audreyt ?eval $+XIHASH
06:05 evalbot_r13911 is now known as evalbot_r13914
06:05 evalbot_r13914 Error: Can't modify constant item: VUndef
06:06 audreyt xinming: you mean $+XOHASD should not fail?
06:06 audreyt that needs a patch to the spec :)
06:06 audreyt (currently it's specced to fail)
06:07 xinming hmm, What does TimToady think of this? :-)
06:07 TimToady ?eval $+NONESUCH // "hi"
06:07 evalbot_r13914 Error: Can't modify constant item: VUndef
06:07 audreyt TimToady: %*ENV is bound to null on safemode
06:07 audreyt so evalbot not helpful
06:07 audreyt you think it should be a fail"", right?
06:08 audreyt (fail > simply-undef imho, to catch typos)
06:08 putter 2am.  not the time to start a new non-trivial edit.  I'll remove eval_is/ok from Test.pm, and the related tests, and perhaps for eval_dies_ok too (some real use wouldl have to be changed).  tomorrow... unless someone beats me to it (volunteers encouraged:).
06:08 audreyt putter++
06:08 TimToady it should be easy to test %*ENV for things that might not be there.
06:08 * audreyt taxies away
06:08 xinming pugs -e '$+ABCDEFG; "hahahahahah".say;'
06:09 putter &
06:09 xinming At least, I think That would stop the program.
06:09 xinming I don't think that should stop the program...
06:10 kastol joined perl6
06:11 Aankhen`` joined perl6
06:16 penk joined perl6
06:20 xinming hmm, For this regex, What text should I use in test?   $_ = 'heaao'; s/aa/ll/ && .say;
06:27 TimToady well, it's failing because of the &&, so maybe "&& forces sequence of implicit use of $_" or some such
06:27 TimToady except as audreyt says, it's probably a parsing/semantic error.
06:28 TimToady I note that $_ ='heaao'; s/aa/ll/ && .say; .say also doesn't work.
06:28 buetow joined perl6
06:29 TimToady so it's not just that the .say happens too early.
06:29 TimToady the s/// isn't changing $_ at all.
06:33 TimToady so maybe "s/// in boolean context properly defaults to $_"
06:33 gaal Good moose.
06:33 lambdabot gaal: You have 1 new message. '/msg lambdabot @messages' to read it.
06:34 gaal lambdabot: @messages
06:34 lambdabot audreyt said 6h 23m 17s ago: no, any version of YAML::Syck will do for smoke
06:35 masak there seems to be much better support for SomeClass.new(...) than for new SomeClass(...) right now
06:36 masak but they oughta work the same, right?
06:36 TimToady new SomeClass(...) is WRONG
06:36 gaal new SomeClass: ... I think
06:36 xinming ?eval $_ ='heaao'; s/aa/ll/; .say;
06:36 masak TimToady: oh. that explains why it doesn't work...
06:36 evalbot_r13914 OUTPUT[hello ] Bool::True
06:36 xinming this works,
06:37 TimToady if you backlog a few hours I talk about this.
06:37 masak TimToady: oki
06:37 TimToady should have your name on it.
06:37 masak yes.
06:38 TimToady obviously it's going to be a common failure mode, so we'll have to do something about it.
06:38 masak yes.
06:38 masak TimToady: while I have you on the line -- do you have any opinion about audrey's "Motivation for /<alpha>+/ set Array not Match?"
06:38 * masak backlogs
06:39 TimToady I think it's something I'll have to thrash out with TheDamian.
06:41 masak TimToady: gotcha. I just don't want to let it fall by the road. it seems a sane proposal
06:42 xinming TimToady: If there is a method in a class, Then, we invoke the method from the obejct, Since attribute and method are all virtual in perl 6, Would it call method every time even if we want an attribute?
06:42 xinming hmm, eg.
06:42 TimToady $!attr is not virtual
06:43 TimToady when you say "has $.attr" you also get a $!attr that you can refer to if you want to devirtualize
06:44 xinming class A { has $.a; method a { $.a += 1 }}; my $obj = A.new; $obj.a;  will it call method always?
06:44 svnbot6 r13915 | yiyihu++ |  r14008@HomePc:  xinming | 2006-10-05 14:38:55 +0000
06:44 svnbot6 r13915 | yiyihu++ |  Append a test for 'temp $_ = "heaao"; s/aa/ll/ && .say';
06:44 xinming if we want the value from a, we should add a line more in method which is like.  $.a // return $.a; or $!a // return $!a; ??
06:47 dmsantam left perl6
06:47 TimToady yes $.a always calls the virtual method, so you've got an infinite loop there (except it would fail since the method isn't rw).
06:47 TimToady just say $!a += 1 instead.
06:49 TimToady In general, if you have an explicit method a, you probably can just declare "has $!a".
06:50 TimToady (in which case it doesn't have to be 'a'...)
06:50 * xinming wonders, if so, $.a might become useless.
06:51 xinming But I need more thinking on this.
06:51 TimToady no, you use $.a when you want the object's abstract value 'a'
06:51 TimToady and you don't care which class supplies it.
06:51 kane-xs joined perl6
06:51 masak i think "new A(...)" should be disallowed, with an explanatory syntax error
06:52 masak can I write a test to that end?
06:52 TimToady sure.
06:53 * masak does that
06:53 TimToady the interesting question is, of coures, how it should be disallowed...
06:53 masak of course
06:54 TimToady that too.
06:54 masak Is "With a nice error message" a reply to that question?
06:57 masak ?eval class A {} my $o = new A; # so this should be disallowed, then? I'm using it as a minimal test case right now
06:57 evalbot_r13914 is now known as evalbot_r13915
06:57 evalbot_r13915 \A.new()
06:58 TimToady no, that's fine.
06:58 TimToady the problem is that the syntax A(...) is legal as a coercion to A.
06:58 masak ah
06:58 TimToady and then new takes that A object and throws away its value.
06:59 masak ?eval class A { has $.b } my $o = new A( :b("hello) ); # this, then?
06:59 evalbot_r13915 Error:  Unexpected ":" expecting "::"
06:59 TimToady so it's probably just a syntactic lookahead on new to catch that particular P5/C++ism.
07:00 TimToady ?eval class A { has $.b };my $o = new A( :b("hello") );
07:00 evalbot_r13915 \A.new(("b" => undef),)
07:01 masak oh, is a ; required after class declarations?
07:01 TimToady if the } isn't the last thing on the line
07:01 masak ah. makes sense.
07:02 TimToady if you're gonna have a lot of semi-builtins with blocks we can't leave people guessing all the time which ones imply ; and which ones don't.
07:02 TimToady so the rules don't depend on the keyword.
07:02 TimToady even C has this problem...
07:03 masak TimToady: I seem to remember that Pascal had the problem to a much larger extent... because of the way it defined statements or something
07:04 masak what's the opposite of &Test::fails_ok?
07:05 TimToady presumably something that succeeds isn't going to throw an exception, so it'd just be ok()
07:05 masak ok :)
07:05 TimToady (I'm just guessing, mind you.)
07:06 masak (turns out I was acutally looking for the pair &eval_ok/&eval_dies_ok)
07:06 TimToady we're just in the process of killing off eval_ok
07:07 masak oh
07:07 TimToady so just use ok(eval()... instead
07:07 masak 'aight
07:07 TimToady ok will eventually be smart enough to figure out $!
07:07 masak oh, cool
07:08 masak so eval_dies_ok should be not_ok(eval()... ?
07:08 TimToady speaking of dies_ok, my eyes are going crossed.
07:09 TimToady so I'd better turn in for the night.
07:09 masak good night, TimToady
07:09 TimToady zzz &
07:13 xinming good night.
07:18 zakharyas joined perl6
07:20 svnbot6 r13916 | masak++ | [t/syntax/parsing/non-dotted-new-disallowed.t]
07:20 svnbot6 r13916 | masak++ | * added test that wants 'new A( :b => "stuff" )' to be syntactically incorrect
07:20 svnbot6 r13916 | masak++ | * I used &eval_dies_ok for this even though it's on its way out.
07:20 svnbot6 r13916 | masak++ |   Please refactor as you see fit. lt.t also contains eval_dies_ok calls
07:53 kane-xs joined perl6
08:19 mdiep_ joined perl6
08:49 iblechbot joined perl6
09:17 marmic joined perl6
10:01 jferrero joined perl6
10:08 Odin-LAP joined perl6
10:18 ofer0 joined perl6
10:29 b00t joined perl6
10:36 bsb left perl6
10:39 svnbot6 r13917 | audreyt++ | * Pugs.AST: Int(x=>1), Int(4) etc are all disallowed
10:39 svnbot6 r13917 | audreyt++ |   for now (explicit coercion comes later).  This makes
10:39 svnbot6 r13917 | audreyt++ |   non-dotted-new-disallowed.t pass.
10:49 spoop joined perl6
10:51 svnbot6 r13918 | andara++ | [t/syntax/parsing/lt.t] fixed smart link
11:08 chris2 joined perl6
11:13 xinming_ joined perl6
11:18 iblechbot_ joined perl6
11:24 scsibug_ joined perl6
11:27 svnbot6 r13919 | audreyt++ | * Pugs.Prim: Add a op2MaybeListop abstraction to handle functions
11:27 svnbot6 r13919 | audreyt++ |   like "chomp" and "reverse" that can behave both as unary and
11:27 svnbot6 r13919 | audreyt++ |   listop, depending on the number of their actual parameters.
11:29 chris2_ joined perl6
11:29 svnbot6 r13920 | audreyt++ | * Prelude.pm: Add $pair.fmt().
11:31 chris2_ is now known as chris2
11:33 svnbot6 r13921 | audreyt++ | * Pugs.AST: Accept Int(x=>1) but not Int(1,2,3), so that
11:33 svnbot6 r13921 | audreyt++ |   Int can still parse as a nullary (term-level) macro.
11:33 svnbot6 r13922 | audreyt++ | * Pugs.Parser.Operator: Admit named-only functions with signature
11:33 svnbot6 r13922 | audreyt++ |   (*%x) to effectively parse as terms.
11:39 svnbot6 r13923 | audreyt++ | * Pugs.AST: Give the builting type-macro a magickal (*%?)
11:39 svnbot6 r13923 | audreyt++ |   signature to distinguish it from user-defined ones.
11:43 ofer1 joined perl6
11:55 ruoso joined perl6
12:03 Limbic_Region joined perl6
12:20 lumi Oh, hey, true :)
12:20 lumi Wo
12:20 lumi ww
12:20 audreyt (actually, going to not do that now)
12:21 audreyt instead I've correctly implemented &term:<Foo>
12:21 audreyt and use that for the type literals seems to be better
12:21 audreyt &term:<int> and &int can then be two things
12:21 audreyt one for ::int, and one for the unary coercer
12:21 audreyt (which agrees with my intuition)
12:22 wolverian google code search is nice for searching pugs code :)
12:23 Limbic_Region audreyt - what's the magic number now?
12:24 audreyt Limbic_Region: sadly still at 36
12:24 audreyt there's some new tests, you see :)
12:26 Limbic_Region yes, btw - I am getting a build fail this morning
12:26 Limbic_Region I had one too that was resolved with a realclean
12:26 svnbot6 r13924 | audreyt++ | * Pugs.AST.Internals: Minor warning avoidance.
12:26 svnbot6 r13925 | audreyt++ | * Pugs.Prim.Keyed: Instead of allowing
12:26 svnbot6 r13925 | audreyt++ |     1.delete();
12:26 svnbot6 r13925 | audreyt++ |   to return undef, we now simply fail.
12:26 Limbic_Region do you want to see it before I take that step?
12:27 pasteling "Limbic_Region" at 129.33.119.12 pasted "Build failure on Win32 - r13923" (14 lines, 1K) at http://sial.org/pbot/20181
12:28 audreyt I'm still in a series of commits :)
12:28 Limbic_Region ok - will be patient then
12:28 svnbot6 r13926 | audreyt++ | * Pugs.Parser: Rename parseNoParenParamList and friends into
12:29 svnbot6 r13926 | audreyt++ |   parseNoParenArgList as they are actually argument list parsers.
12:29 svnbot6 r13926 | audreyt++ | * Also, disallow block literals in listops in conditional expressions:
12:29 svnbot6 r13926 | audreyt++ |     for say { ... }
12:29 svnbot6 r13926 | audreyt++ |   is now always parsed as:
12:29 svnbot6 r13926 | audreyt++ |     for say() { ... }
12:29 svnbot6 r13926 | audreyt++ |   instead of:
12:29 svnbot6 r13926 | audreyt++ |     for say({ ... })
12:32 svnbot6 r13927 | audreyt++ | * Pugs.AST, Pugs.Run: Instead of registering macros for
12:32 svnbot6 r13927 | audreyt++ |   types that expands to their protopes as eponymous functions:
12:32 svnbot6 r13927 | audreyt++ |     $x = Int;  # used to calls the &Int macro
12:32 svnbot6 r13927 | audreyt++ |   they are now instead registered under the "term:" grammatical
12:32 svnbot6 r13927 | audreyt++ |   category:
12:32 svnbot6 r13927 | audreyt++ |     $x = Int;  # now calls the &term:<Int> macro
12:32 svnbot6 r13927 | audreyt++ |   this is very good, as it allows separate slots for &term:<int>
12:32 svnbot6 r13927 | audreyt++ |   (the macro for the builtin unboxed type "int"), as well as for
12:32 svnbot6 r13927 | audreyt++ |   &int (the function for the unary caster).
12:32 jferrero joined perl6
12:35 svnbot6 r13928 | audreyt++ | * Pugs.Parser.Operator: Support for the "term:" grammatical category.
12:38 svnbot6 r13929 | audreyt++ | * Pugs.Eval: Autovivification is now constrainted by typed variables:
12:38 svnbot6 r13929 | audreyt++ |     my Hash $x;
12:38 svnbot6 r13929 | audreyt++ |     $x[0] = 1; # fails, as $x can _only_ vivify to Hash.
12:38 svnbot6 r13929 | audreyt++ | * Also relax the too-troublesome unary-to-method rule:
12:38 svnbot6 r13929 | audreyt++ |     foo($x);    # only become $x.foo if &foo is not in scope.
12:38 svnbot6 r13929 | audreyt++ |   of course, even that is wrong, but "method is export" is not
12:38 svnbot6 r13929 | audreyt++ |   handled in this release.
12:41 audreyt not done yet...
12:42 Limbic_Region heh
12:52 audreyt hm, I just realized that
12:52 audreyt &prefix:<:foo>
12:52 audreyt and
12:52 audreyt &prefix:foo
12:52 audreyt er, &prefix::foo
12:53 audreyt can't be distinguished based on the primitive parser. thinking about a way around this...
13:05 fglock joined perl6
13:05 svnbot6 r13930 | fglock++ | [PCR]
13:05 svnbot6 r13930 | fglock++ | - (previous commit) external modifiers ( i m s x ) no longer allowed in RegexPerl5
13:05 svnbot6 r13930 | fglock++ | [v6]
13:05 svnbot6 r13930 | fglock++ | - requires the Perl5 emitter which is factored into a separate distribution
13:05 svnbot6 r13930 | fglock++ | - started integration with compile-time objects
13:05 svnbot6 r13930 | fglock++ | - the ast transformations are implemented in the main emitter module
13:05 svnbot6 r13930 | fglock++ | - Makefile.PL and MANIFEST need updates
13:07 audreyt hm, I give up. I'll just make grammatical categories semi-reserved...
13:07 audreyt -- &infix::= should parse as infix:<:=>, not infix::<=>
13:07 audreyt -- &Infix::= should parse as Infix::<=>, not Infix:<:=>
13:08 clkao fglock: is current pc-p6 with new emmitter passing tests?
13:09 fglock clkao: yes - but it needs a Makefile.PL, I'm working on it
13:10 fglock is there a command that generates a MANIFEST file?
13:11 clkao make manifest
13:11 fglock thanks
13:12 svnbot6 r13931 | audreyt++ | * Pugs.Types: Improve our primitive _Var parser to disambiguate
13:12 svnbot6 r13931 | audreyt++ |   grammatical categories from package names:
13:12 svnbot6 r13931 | audreyt++ |     "&infix::=" should parse as infix:<:=>, not infix::<=>
13:12 svnbot6 r13931 | audreyt++ |     "&Infix::=" should parse as Infix::<=>, not Infix:<:=>
13:12 svnbot6 r13931 | audreyt++ |   This is so you can write
13:12 svnbot6 r13931 | audreyt++ |     my sub term:<Double::Colons> { ... }
13:12 svnbot6 r13931 | audreyt++ |   and have it parse correctly:
13:12 svnbot6 r13931 | audreyt++ |     say Double::Colons; # Not going to consult the ::Double package.
13:12 Limbic_Region audreyt - is that a fix or a workaround or what?
13:12 audreyt the example is I think canonical
13:13 [particle] that seems strange.
13:13 [particle] you can't force users to do &{Double::Colons} ?
13:13 audreyt the "should parse as" parts are not canonical; it's an internal disambiguation.
13:14 audreyt [particle]: &Double::Colons() always invoke the function in ::Double, for sure.
13:16 clkao fglock:
13:16 clkao .tc
13:16 clkao t/02-test-pm/0-compile....Global symbol "$Test" requires explicit package name at t/Test.pm line 26.
13:16 clkao syntax error at t/Test.pm line 26, near "$Test :"
13:16 fglock clkao: looking
13:16 clkao it's doing: $Test : _58_num_of_tests_run         = 0;
13:16 clkao rather than $Test::
13:18 fglock that's a PCR bug - fixing
13:19 clkao cool
13:19 svnbot6 r13932 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added MANIFEST, Makefile.PL
13:20 kolibrie fglock: I'm continuing on with examples for my slides, and ran into a <ws> problem
13:20 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: why is the <ws> necessary in this rule?" (57 lines, 1.1K) at http://sial.org/pbot/20183
13:20 svnbot6 r13933 | audreyt++ | * instantiation.t: "Bar.new" is only usable when Bar has been
13:20 svnbot6 r13933 | audreyt++ |   discovered as a class name; we reorder the test so that
13:20 svnbot6 r13933 | audreyt++ |   "class Bar" occurs before that line, but otherwise "::Bar.new"
13:20 svnbot6 r13933 | audreyt++ |   will also work.
13:22 cjeris joined perl6
13:22 svnbot6 r13934 | fglock++ | Pugs-Compiler-Rule - fixed 'lonely :' detection
13:22 fglock kolibrie: <ws> is not much tested - looking
13:24 fglock clkao: it is still buggy - one sec
13:28 drbean joined perl6
13:30 fglock clkao: it works now - v13936
13:31 svnbot6 r13935 | audreyt++ | * ref.t: Putting a class{} definition inside try{} is counterproductive...
13:31 svnbot6 r13936 | fglock++ | v6 - updated Makefile.PL
13:31 svnbot6 r13937 | audreyt++ | * inheritance.t: Declare class before mentioning it as bareword
13:31 svnbot6 r13937 | audreyt++ |   is now a critically important practice.
13:33 fglock kolibrie: there seems to be an error in the paste - would you paste it again?
13:34 kolibrie fglock: sure
13:36 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: repost of <ws> in rule" (59 lines, 1.2K) at http://sial.org/pbot/20184
13:36 svnbot6 r13938 | audreyt++ | * t/var/contextual.t: $+THIS_IS_NOT_IN_ENV should fail.
13:37 * Limbic_Region is never going to get to run a smoke if people keep comitting ;-)
13:37 svnbot6 r13939 | audreyt++ | * splice.t: now the method-fallback bug is gone, unTODO the failing
13:37 svnbot6 r13939 | audreyt++ |   defined($x<1>)-should-not-vivify-$x<1> tests.
13:37 svnbot6 r13940 | audreyt++ | * arrays_and_hashes/exists.t: Taking a reference to a nonexistent
13:37 svnbot6 r13940 | audreyt++ |   hash element should be construed as non-autovifying, as it's
13:37 svnbot6 r13940 | audreyt++ |   populated only when actually written to.
13:37 audreyt Limbic_Region: I have another 12 commits to go only
13:38 audreyt give me 2 mins
13:38 clkao fglock++
13:40 * Limbic_Region waits patiently
13:40 vel joined perl6
13:41 fglock audreyt: the new v6.pm emitter uses the new ast (the old emitter is the bridge)
13:41 svnbot6 r13941 | audreyt++ | * fmt.t: Add a (passing) test for $pair_object.fmt().
13:41 svnbot6 r13942 | audreyt++ | * undef.t: Massive unTODO now prototype objects really works.
13:44 audreyt fglock: oh! nice
13:44 svnbot6 r13943 | audreyt++ | * array_extending.t: unTODO now that defined($array[1234567])
13:44 svnbot6 r13943 | audreyt++ |   is a noop, not a vivifier.
13:44 svnbot6 r13944 | audreyt++ | * t/oo/attributes/instance.t: This is not going to work:
13:45 svnbot6 r13944 | audreyt++ |     eval 'class Foo {}';
13:45 svnbot6 r13944 | audreyt++ |     Foo.new;
13:45 svnbot6 r13944 | audreyt++ |   Because the parser havn't seen the class on the initial
13:45 svnbot6 r13944 | audreyt++ |   compilation.  Take that out of eval wins us a few unTODO.
13:45 svnbot6 r13945 | audreyt++ | * t/oo: Massive unTODO on t/oo/class/, t/oo/roles/, and t/oo/enums.t.
13:45 elmex joined perl6
13:48 fglock audreyt: it is now possible to write a new-ast-emitter module :)
13:48 svnbot6 r13946 | audreyt++ | * spaceship.t: repair a bogus test.
13:48 cognominal ?eval  ($BooK, $Maddingue) ?//? 'insane' xx * ; say $BooK
13:48 evalbot_r13915 is now known as evalbot_r13941
13:48 evalbot_r13941 Error:  Unexpected "?//?" expecting comment, operator, statement modifier, ";" or end of input
13:49 audreyt Limbic_Region: feel free to smoke now
13:49 svnbot6 r13947 | audreyt++ | * operator_overloading.t: "method prefix:<~> is export" won't
13:49 svnbot6 r13947 | audreyt++ |   control object stringification at the moment, so TODO it for now.
13:50 cognominal is this a Unicode channel?
13:50 Limbic_Region audreyt - the eval_is/todo(1) test I added for lasting outside of a codref inside of a loop - is that on the hit list for bugs getting squashed before the release?
13:51 cognominal ?eval  ($BooK, $Maddingue) ?//? 'insane' xx * ; say $BooK
13:51 evalbot_r13941 is now known as evalbot_r13946
13:51 evalbot_r13946 Error:  Unexpected "?//?" expecting comment, operator, statement modifier, ";" or end of input
13:52 cognominal joined perl6
13:53 fglock kolibrie: fixed in v13948
13:53 svnbot6 r13948 | fglock++ | Pugs-Emitter-Perl6-Perl5 - fixed 'rule'
13:54 kolibrie fglock: thank you
13:54 fglock kolibrie: it's perl5/Pugs-Emitter-Perl6-Perl5 (new module)
13:55 kolibrie fglock: I have some other questions, too, but first I am going to present my talk to my company (in five minutes)
13:56 * kolibrie hopes they will want to use perl 6 for some stuff
13:56 PerlJam kolibrie: what does your company do?
13:58 fglock I need a better editor - I lose track with so many files open
13:58 kolibrie PerlJam: we keep a database of elected officials in the US, and provide ways to contact them easily
13:59 kolibrie talk &
13:59 PerlJam kolibrie: good luck!
13:59 PerlJam (and have fun!)
14:01 kanru joined perl6
14:01 apao joined perl6
14:01 apao :)
14:18 rodi joined perl6
14:19 penk joined perl6
14:19 svnbot6 r13949 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added ChangeLog; passes it's own tests
14:31 ajs_work I keep writing "...{...}..." in Perl 5 to embed code in strings. It's getting out of hand.
14:33 fglock ajs_work: use v6-alpha? :)
14:33 ajs_work heh. That's not far off.
14:34 rodi v6-alpha++
14:36 audreyt Limbic_Region: 'fraid not, it wasn't really working before either...
14:36 svnbot6 r13950 | audreyt++ | * lt.t: TODO.
14:37 fglock can a Seq contain a Scalar?
14:39 fglock or is it coerced to Array
14:39 ajs_work fglock, as I understand it, yes. Seq is just immutable, not restricted in what kinds of contents.
14:39 ajs_work In Parrot terms, it would be a FixedArray of pmcs
14:40 ajs_work S06 just says "Completely evaluated (hence immutable) sequence" and constrains it no further.
14:40 ajs_work If you say "my Seq of int @x", then you're constrained.
14:41 fglock is this a compile-time error?  ( $a, 1 ) = ...
14:41 audreyt it is a compile-time error iff
14:41 Limbic_Region audreyt - no worries
14:41 audreyt 1 = 2
14:41 audreyt is a compile-time error.
14:42 ajs_work 1 = 2 was good enough for fortran ;)
14:42 elmex elmex++
14:42 perlbot What kind of idiot karmas himself?  Your kind of idiot!
14:42 elmex perlbot: goto END and die;
14:43 ajs_work elmex END probably isn't a valid label....
14:44 elmex ajs_work: hmm
14:44 fglock what is the compile-time Type of '( $a, 1 )' as lvalue?
14:44 svnbot6 r13951 | audreyt++ | * Pugs.Prim: Update &delete to agree with S29.
14:44 elmex perlbot: goto END; END: do { die };
14:44 Limbic_Region elmex - if you are going to try to screw with perlbot, please do so in /msg
14:44 Limbic_Region it will be just as effective
14:45 elmex oh, i'm not
14:45 Limbic_Region you can also try to get the source from Chris62vw if you are interested in what *might* work
14:45 audreyt fglock: I'll imagine it's Seq(Scalar(...), Int(...))
14:45 elmex no time :)
14:45 audreyt i.e. same asif it's rvalue
14:46 fglock audreyt: thanks
14:46 fglock lunch &
14:46 ajs_work audreyt, but it needs to carry a "but rw" or some such
14:46 * Limbic_Region wonders if one of the smoke tests is caught in an infinite loop
14:46 fglock left perl6
14:46 Limbic_Region it has been dumping #     Actual: undef for several minutes now
14:46 audreyt ajs_work: no, Seq can be assigned to
14:46 audreyt Limbic_Region: if it's in t/regex/, that's not surprising
14:47 audreyt which is why I delete them locally...
14:47 Limbic_Region can't tell where it is
14:47 audreyt ajs_work: not sure it needs to... "is rw" is just annotation for lvalueness
14:47 Limbic_Region *shrug* - no smoke this morning then - will try again in the afternoon
14:47 audreyt VAR(Seq(Scalar(...), Int(...)))
14:47 audreyt I mean
14:47 * Limbic_Region wanders off
14:48 audreyt er, I do mean VAR.
14:48 audreyt fortunately TimToady havn't changed it to WHOSE or something.
14:48 wolverian MINE
14:48 * kolibrie thinks his Practical Extraction with Perl 6 talk went over okay with the technical staff at $work
14:48 ajs_work Hrm... I'm thinking of lvalue functions that have to return an asignable thing.
14:56 Qiang_ joined perl6
14:56 audreyt but in perl, Seq and List are always assignable even though they are immutable
14:57 ajs_work Yeah, I was confusing assignability with writable references to input data ala $x.substr(0,1)="foo"
14:59 audreyt *nod*
14:59 ajs_work The latter returning, presumably some kind of closure that gets invoked to perform the modification
14:59 audreyt not the same thing :)
15:05 svnbot6 r13952 | audreyt++ | * Pugs.Prim: Cave in and implement "method is export" for primitives,
15:05 svnbot6 r13952 | audreyt++ |   otherwise "closedir $dir" can never work.  However, user-defined
15:05 svnbot6 r13952 | audreyt++ |   methods (including those in Prelude.pm) aren't exported properly yet.
15:10 hexmode joined perl6
15:21 hexmode joined perl6
15:23 TimToady joined perl6
15:32 svnbot6 r13953 | audreyt++ | * fail.t: unTODO.
15:32 svnbot6 r13954 | audreyt++ | * Implement rudimentary "fail" control via $*FAIL_SHOULD_DIE.
15:34 audreyt magic number at 33 now
15:34 svnbot6 r13955 | audreyt++ | * io/dir.t: minor tidyup now that it's all passing again.
15:34 audreyt most of them are in closure_trait
15:34 audreyt which I plan to TODO most of them anyway... :)
15:34 audreyt but, till tomorrow. *wave*
15:34 clkao audreyt: sleep well
15:36 masak audreyt: goodnight
15:37 fglock joined perl6
15:38 _mark joined perl6
15:38 _mark is now known as markstos
15:39 markstos In r13900, I thought audreyt fixed values being returned from Perl5 in reverse order. However, the related tests in t/perl5/basic.t are still failing.
15:39 lambdabot markstos: You have 1 new message. '/msg lambdabot @messages' to read it.
15:41 markstos Oh, never mind. pugs on feather seems to be behind: It reports r13895. It hasn't caught up yet, I guess.
15:41 kolibrie fglock: I reinstalled PCR, PEPP, and PCP, but when I take out the <ws> in my rule, I get no matches
15:41 kolibrie what did I do wrong?
15:42 fglock kolibrie: hmm - it worked for me - retrying
15:43 putter joined perl6
15:45 pasteling "fglock" at 200.17.89.80 pasted "rule without <ws>" (57 lines, 1.2K) at http://sial.org/pbot/20190
15:45 fglock kolibrie: it works here
15:49 fglock does 'Value' still exists? (what's the parent class for Seq)
15:51 fglock kolibrie: did you delete the old .plc file? you may be running a precompiled version
15:52 kolibrie fglock: running your version also finds no match
15:52 kolibrie so I think I need to reinstall again
15:53 kolibrie fglock: does it matter what order I install in?
15:53 fglock kolibrie: no; try just running v6's Makefile.PL (cleans the rule cache)
16:00 weinig|sleep is now known as weinig
16:02 justatheory joined perl6
16:02 kolibrie fglock: now it works.  PEPP must not have installed properly the first time
16:03 * kolibrie also notices it cannot find it's tests
16:03 fglock kolibrie: nice
16:03 fglock re tests: that should be fixed
16:04 vel joined perl6
16:04 fglock kolibrie: r13949 - svn up?
16:05 andara joined perl6
16:06 kolibrie fglock: looks like I was one revision before that
16:08 Psyche^ joined perl6
16:09 Psyche^ is now known as Patterner
16:09 fglock kolibrie: we need some kind of automatic rebuild for v6.pm
16:10 svnbot6 r13956 | fglock++ | Pugs-Emitter-Perl6-Perl5 - implemented 'Seq'
16:12 ajs_work fglock: is it intentional that the match object for '$<a> := ((.).).' doesn't stringify to the match, or is that an unfortunate side-effect of the naming?
16:13 fglock ajs_work: would you paste the test?
16:14 pasteling "ajs_work" at 63.107.91.99 pasted "Pugs::Compiler::Rule match doesn't stringify" (9 lines, 221B) at http://sial.org/pbot/20195
16:15 ajs_work Oh, I think I'm wrong. I think it's the $match->{named}{a} that isn't stringifying
16:16 ajs_work Is it supposed to?
16:17 fglock ajs_work: $match->{a} works
16:18 ajs_work Ah, I was misunderstanding the API. Thanks.
16:18 fglock {named} is internal
16:18 fglock np
16:18 kolibrie fglock: I'm having problems reading data out of my $match object the way I expect it to work
16:18 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: why is .perl (or .yaml) not seeing the ARRAY?" (46 lines, 1K) at http://sial.org/pbot/20196
16:18 kolibrie fglock: different problem from ajs_work (I think)
16:19 ajs_work $$<presenter> ?
16:20 buetow joined perl6
16:20 ajs_work Isn't that $/<presenter> or did I miss achange?
16:20 * kolibrie hopes fglock is thriving off all these questions, rather that wilting
16:20 fglock kolibrie: it's a precedence problem - try with parenthesis?
16:21 kolibrie fglock: ah, that works
16:21 svnbot6 r13957 | putter++ | Test - removed eval_ok and eval_is.
16:21 svnbot6 r13957 | putter++ | Unlike eval(), they were not sharing lexical and package context, causing confusion and bogus tests.  Macro implementation immaturity currently prevents this from being fixed.
16:21 svnbot6 r13957 | putter++ | Tests depending upon the old behavior should use local helper functions instead.  This will avoid everyone using one lexical environment in package Test.
16:21 svnbot6 r13957 | putter++ | Error report quality is reduced, but can recover when eval() starts returning "undef but informative".
16:21 svnbot6 r13957 | putter++ | TreyHarris++
16:21 fglock kolibrie: I'm not sure what's the right precedence - gotta check this later
16:22 kolibrie ajs_work: $<presenter> is full match object, $$<presenter> is partial match object
16:22 kolibrie $/<presenter> is presenter part of the match object $/
16:22 ajs_work I see, and $match outside is just the variable he's bound $/ to in the for
16:23 kolibrie yes
16:23 ajs_work I'm not yet at the point where I can read arbitrary P6 without error.
16:23 penk left perl6
16:27 wolverian http://www.stuffedanimalhouse.com/mascot2.htm uh.. moose..
16:27 lambdabot Title: Stuffed Animal House Display Department Moose Page
16:28 fglock kolibrie: $$<x> is the 'result object of the named capture'
16:30 TimToady the problem is that $ is defined to bind tighter than .<> subscripting, but it's undefined whether that applies to $$<foo> before or after desugaring to $$/<foo>
16:30 TimToady is it ($$/)<foo> or $($/<foo>)
16:31 fglock how about: $$<foo>.meth
16:31 ajs_work TimToady: I think the former always has to be true for visual reasons.
16:31 ajs_work $$/<foo> being $($/<foo>) would just confuse too many people, I would expect.
16:31 TimToady the question is whether <> in $<> is really a .<> or just a funny twigil.
16:32 TimToady certainly $$/<foo> would be ($$/)<foo>, that's not the issue
16:33 TimToady the question is whether $< -> $/< before or after the $ prefix rule applies
16:33 ajs_work Oh I see, I misunderstood your "is it ($$/)<foo> or $($/<foo>)" to be a stand-alone question
16:34 TimToady np
16:34 ajs_work I'm still on the parse sigils first, then apply magic side. So, $$ is parsed, then trailing < triggers the injection of implicit /
16:34 fglock v6.pm rule is / <'$'> <before  <'<'>  > / means $/
16:35 svnbot6 r13958 | putter++ | [t/] Corrected some obvious cases of tests made bogus by the replacement of eval_ok and eval_is by ok(eval and is(eval.
16:35 nothingmuch @seen gaal
16:35 lambdabot gaal is in #perl6 and #haskell. I last heard gaal speak 9h 58m 55s ago.
16:36 TimToady fglock: yes, that's the transformation, but it doesn't tell us when it happens with respect to $$foo<bar> turning into ($$foo)<bar>
16:37 putter fglock: are you using t/regex/ test failures or should I start force_todo()ing them...?
16:37 TimToady and whether the <xxx> counts as just a strange name at that point.
16:38 fglock putter: you can change them
16:38 TimToady where < is read as a twigil that just happens to require a balancing "untwigil" on the end.
16:38 kolibrie fglock: I'm finding a case where I seem to have to use a comma (,) instead of a big arrow (=>)
16:38 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: why can't I use '=>' in my { return } block" (47 lines, 1K) at http://sial.org/pbot/20199
16:38 putter ok.  looks like some repairs are in order too.
16:39 justatheory joined perl6
16:42 fglock kolibrie: you need to write { 'talk' => $$<presenter> ,}  - with comma
16:42 kolibrie fglock: ahh, sorry, forgot about that
16:44 rlb3 joined perl6
16:44 ajs_work fglock: is that a permanent situation, or just a temporary limitation in the parser?
16:44 fglock ajs_work: it is specced, afaik
16:46 ajs_work That seems odd.
16:46 ajs_work Looking through S09 now...
16:47 fglock TimToady: S03 says .<> is tighter than $ - v6.pm translates $$foo<bar> to ${ $foo->{qw(bar)} }
16:48 ajs_work Ah, the trailing comma is in S04 (S09 should probably have a footnote)
16:48 fglock and $$<bar> to ${ $::_V6_MATCH_->{qw(bar)} }
16:49 TimToady S03.pod:As with Perl 5, however, C<$$foo[bar]> parses as C<( $($foo) )[bar]>,
16:50 fglock right, thanks
16:53 svnbot6 r13959 | fglock++ | v6 - added $$ precedence problem to TODO
16:55 ajs_work fglock: v6 chokes on { "a" => 1 } which S04 says should be a code block
16:56 TimToady it does?
16:56 bernhard joined perl6
16:56 ajs_work # Without the trailing comma, this becomes a code block
16:57 ajs_work Oh, I'm misreading that. That's only the NESTED hash block
16:57 TimToady  $hash = { "a" => 1 };
16:57 ajs_work oh, then v6 is wrong on that, as it creates a code block out of the OUTER {...} when given the example from S04 without the comma
16:58 ajs_work I think fglock read that the way I did
16:59 Psyche^ joined perl6
17:00 ajs_work Of course, I'd be happier if the nested block defaulted to a hash and you had to disambiguate with a leading ->, but I always have a preference for disambiguation bits coming first. It's like a sickness ;)
17:00 TimToady I think the comment was aimed at the outer block.
17:00 TimToady I think the problem is that the inner block gets an assumed ; after it, which forces it to be a statement
17:01 TimToady so the outer block sees { "a" => "b"; } and decides it must not be a pair list at the top level.
17:02 ajs_work And that forces the outer block to be code... OK, either way v6 throws up its hands on { "a" => 1 }, so it's busted, but I'd still rabblerouse for a change to defaulting to hash or having a way to force hash context from the front.
17:03 Psyche^ is now known as Patterner
17:03 ajs_work fglock: I mean busted in the most deeply respectful way possible ;) v6 is a huge ball of goodness
17:06 TimToady I will think about this in the shower. &
17:06 ajs_work laters
17:08 * ajs_work wonders out loud if anything is lost if => and = always deny the possibility that their RHS is code unless it explicitly uses ->
17:08 fglock joined perl6
17:09 fglock ajs_work: add a test to t/data_types/hash.t ?
17:09 ajs_work wilco
17:17 fglock maybe t/syntax/parsing/ is the place for this test
17:17 ajs_work fglock: I think the bug was a mistake on my part. I'd used { a => 1 } ... is p6 supposed to auto-quote p5-style?
17:18 ajs_work { "a" => 1 } works
17:18 ajs_work Though { "a" => 1 } still fails if there's no assignment involved. Tricky
17:18 putter joined perl6
17:19 fglock ajs_work: yes, the pair key is autoquoted
17:24 ajs_work Running tests works better when you're in the right directory
17:28 ajs_work fglock something is borked in my v6 install such that tests aren't working at all. Can you just make sure that the test I checked in is valid?
17:29 fglock ajs_work: try reinstalling perl5/Pugs::Emitter::Perl6::Perl5  (new module added today)
17:30 svnbot6 r13960 | ajs++ | Two tests added for single element hash creation
17:30 ajs_work I did
17:30 ajs_work I have a script that re-builds and installs all of pugs/perl5. But I still get a pile of Emitter errors on make test
17:31 ajs_work Error in perl 5 emitter: Can't use string ("=") as a HASH ref while "strict refs" in use at /home/ajs/src/pugs/perl5/Pugs-Compiler-Perl6/blib/lib/Pugs/Emitter/Perl6/Perl5.pm line 1186.
17:34 fglock ajs_work: does it pass the first 10 or so tests?
17:36 fglock ajs_work: please add the tests to pugs/t/ instead - PCP6/t is just a copy
17:37 gaal @tell audreyt nothingmuch and I are going hiking this weekend, I'll only be available for releng Tue
17:37 lambdabot Consider it noted.
17:40 ajs_work fglock: t/00-grammar/01-pcr................ok ... that's the last thing that passes
17:41 fglock ajs_work: try make clean - removes old .pmc files
17:42 ajs_work Worked. I'll add a make clean to my build script
17:44 svnbot6 r13961 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added 'Range' class
17:49 ajs_work hash.t is getting a syntax error for me on line 170 that I can't explain, but beyond that seems ok
17:49 svnbot6 r13962 | ajs++ | Still gives a syntax error on line 170, but removed some errors about masked definitons
17:52 ajs_work Yeah, the syntax error seems to be my test, which is a correct failure
17:52 ajs_work Should I have that inside some kind of eval?
17:53 fglock yes, that's fine
17:57 fglock ?eval { 1=>2 }
17:58 evalbot_r13946 is now known as evalbot_r13962
17:58 evalbot_r13962 {("1" => 2),}
17:58 svnbot6 r13963 | fglock++ | Pugs-Emitter-Perl6-Perl5 - moved 'Pair' to 'Value.pm'
17:58 fglock ?eval { 1=>2 }.WHAT
17:58 evalbot_r13962 ::Hash
17:58 fglock ?eval ( 1=>2 ).WHAT
17:58 evalbot_r13962 ::Pair
17:59 fglock ?eval ( 1=>2 ).fmt
17:59 evalbot_r13962 Error: No compatible subroutine found: "&fmt"
18:00 fglock ?eval my $p = ( 1=>2 ); "$p"
18:00 evalbot_r13962 "1\t2"
18:10 MacVince joined perl6
18:10 frankg joined perl6
18:30 vel joined perl6
18:46 svnbot6 r13964 | fglock++ | v6/Pugs-Emitter-Perl6-Perl5 - ' (1..2).WHAT; (1,2).WHAT; (a=>2).WHAT '
18:46 svnbot6 r13964 | fglock++ |   # 'Range'; 'Seq'; 'Pair';
19:00 randomity joined perl6
19:01 yts joined perl6
19:16 kolibrie if I have two packaged hashes: { title => '' }, { presenter => '' }, stored in variables like $title and $presenter, how to I get { title => '', presenter => '' }?  { $title.kv, $presenter.kv }?
19:17 [particle] { %$title, %$presenter } # wild guess
19:17 pmurias joined perl6
19:17 pmurias fglock: hi
19:18 pmurias can i ask you a few questions about the new emitter?
19:20 fglock pmurias: sure
19:20 fglock pmurias: hi
19:21 pmurias all the P:E:P6:P6::Value thing represent perl6 literals at compile time ,right?
19:22 fglock pmurias: yes
19:23 fglock ?eval my $title = { t => 1 }; my $presenter = { p => 2 }; { %$title, %$presenter }
19:23 evalbot_r13962 is now known as evalbot_r13964
19:23 evalbot_r13964 {("p" => 2), ("t" => 1)}
19:23 fglock ?eval my $title = { t => 1 }; my $presenter = { p => 2 }; { $title, $presenter }
19:23 evalbot_r13964 ({("t" => 1),}, {("p" => 2),})
19:24 [particle] ?eval my $title = { t => 1 }; my $presenter = { p => 2 }; { $title.kv, $presenter.kv }
19:24 evalbot_r13964 ("t", 1, "p", 2)
19:29 araujo joined perl6
19:31 pmurias fglock: so the Great Idea is to turn the whole program into a perl6 literal wich stringies to the perl5 representation
19:31 pmurias ?
19:32 fglock not exactly a literal, but yes
19:32 pmurias does it overload ""?
19:33 fglock yes, "" emits the code
19:36 kolibrie fglock: so, .kv is the best way to go?
19:37 [particle] i believe you want pairs, kolibrie, so it's %$foo
19:37 fglock [particle]: I think so
19:38 kolibrie fglock: [particle]: okay
19:38 SubStack joined perl6
19:39 pmurias _91__93_ is a strang name for a sub
19:39 pmurias what does that do?
19:40 fglock pmurias: at compile time, 'p => 2' is represented by Pair:('p','2') , and Pair:('p','2').kv returns Seq:('p','2')
19:41 fglock pmurias: that's an unicode method, mangled to plain ASCII (that's old code, now written as ::unicode_sub 'infix:<<( )>>'
19:42 fglock or something like that
19:44 pmurias got that
19:45 pmurias is HACKING.CompileTime diffrent than an ordinary HACKING file?
19:46 fglock no - the name was given before the module was split into a separate distribution :)
19:46 jferrero joined perl6
19:46 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: %($$<title>) almost does what I want, but something is still not right" (60 lines, 1.3K) at http://sial.org/pbot/20206
19:46 fglock pmurias: feel free to update it :)
19:46 pmurias thanks
19:52 fglock kolibrie: I think it's the precedence bug again - $$<link><label> compiles wrongly to $($<link><label>)
19:53 pmurias fglock: how do you call subs defined with unicode_sub?
19:54 pmurias with the evil ascii code names?
19:56 fglock pmurias: it's not implemented yet - but look near Emitter::Perl5.pm line 730; the unicode-to-ascii conversion is done by Pugs::Runtime::Common::mangle_ident()
19:57 fglock kolibrie: I didn't grok it enough to implement :)
19:57 svnbot6 r13965 | pmurias++ | renamed HACKING.CompileTime to HACKING
19:57 svnbot6 r13965 | pmurias++ | started a misc section mentioning unicode_sub
19:57 kolibrie fglock: I don't think that is where the problem is.  I think $$<link><label> is working how I need it to
19:58 kolibrie the problem is just in the { %{$$title}, %{$$presenter} } code
19:59 kolibrie the one always gets put in the other
19:59 pmurias argh, perl6 has NaN :(
19:59 kolibrie and the outside one sticks the key and value together to make a new key
20:00 kolibrie fglock: you can switch title and programmer to see
20:02 kolibrie fglock: switching from .yaml to .perl also helps
20:05 pmurias fglock: thanks for help, and good night
20:05 rodi joined perl6
20:05 fglock pmurias: good night
20:06 fglock kolibrie: I'm doing some tests
20:06 kolibrie fglock: okay
20:09 fglock kolibrie: the compiler is confused - try ' my $a={1,2}; my $b={3,4}; { %$a, %$b }.perl.say '
20:10 fglock it's the emitter's fault - the new emitter should fix this
20:10 fglock the ast is ok
20:13 kolibrie fglock: okay
20:13 kolibrie fglock: yes, the example you provided shows the same behavior
20:15 kolibrie fglock: so, my code is correct, and some day the emitter will start emitting it correctly?
20:15 fglock I hope so :)
20:15 kolibrie fglock: okay, will move on to the next example, then
20:16 fglock the Array & Hash classes are already written - I'll try to merge them in
20:19 mdiep joined perl6
20:31 svnbot6 r13966 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added @array, %hash
20:35 SCalimlim joined perl6
20:37 gnuvince joined perl6
20:43 svnbot6 r13967 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added type 'ListExpression'
20:51 BooK_ joined perl6
21:04 fglock ?eval my @a=(3,4); +@a
21:04 evalbot_r13964 is now known as evalbot_r13967
21:04 evalbot_r13967 2
21:10 wilx` joined perl6
21:12 wilx` is now known as wilx
21:12 avarab joined perl6
21:13 fglock ?eval my @a=(3,4); $(@a)
21:13 evalbot_r13967 [3, 4]
21:14 chris2 joined perl6
21:15 svnbot6 r13968 | putter++ | [t/regex/]
21:15 svnbot6 r13968 | putter++ | Some cleanup; tests un-disabled; force_todo()s.
21:15 svnbot6 r13968 | putter++ | The only and few regex tests now commented out have flunks() attached.
21:15 svnbot6 r13968 | putter++ | All regex test files are ready for release, except for p6regex/p6regex.t which needs a force_todo list.  (As of r13882, but PCR development continues.)
21:15 svnbot6 r13968 | putter++ | [t/regex/p6regex/]
21:15 svnbot6 r13968 | putter++ | regex_tests - All "TODO" markers and disabling comments removed.
21:15 svnbot6 r13968 | putter++ | p6regex.t - Added a @force_todo array.
21:15 svnbot6 r13968 | putter++ | I got the force_todo test list wrong twice, and have left it blank.  Perhaps a bug?
21:16 kolibrie fglock: thanks for all your help today.  I'll check in again tomorrow, probably with more questions
21:16 fglock kolibrie: ok :)
21:16 ajs_work kolibrie: I may have some questions for you at some point. I want to give such a talk here at the office.
21:18 kolibrie ajs_work: sure.  My slides are under docs/talks/ and audio is at http://feather.perl6.nl/~kolibrie/extraction.mp3
21:18 lambdabot http://tinyurl.com/femjh
21:18 ajs_work Oh thanks
21:18 ajs_work Still might have questions, cause I'm slow, ya know ;)
21:18 kolibrie slides will be updated some time to match my examples from today
21:19 putter fglock: t/regex/ is now fairly clean.  enjoy.
21:19 kolibrie ajs_work: I'll be glad to help
21:19 fglock putter: I'll look - thanks
21:21 ajs_work Perl 5 getting named captures and recursive subexpressions... what is the world coming to? ;)
21:22 ajs_work Pretty soon "use v6" will just be a style stricture ;)
21:25 putter the regex tests have received a bit of "shoot the messenger" over the course of their existence, as they turned up parsefails, slow parsing, slow and mis/mal/non-feature support in engines.  A couple of PCRE hard parsefails are the remaining oddities.  Some of the files take a while to run.  If that becomes a concern, let's think of a way to deal with it cleanly. :)
21:25 MacVince joined perl6
21:25 putter s/remaining/only remaining/
21:25 MacVince ?eval ([1,2,3], [2,3,4])[*][0]
21:25 evalbot_r13967 is now known as evalbot_r13968
21:25 evalbot_r13968 \1
21:28 ajs_work fglock: did you see my suggestion on p6l for %[...], &[...] et al.? I'm curious to know what you think especially, since you have a better view of the parser than most.
21:29 fglock ajs_work: looking
21:29 putter have fun all.  dinner &
21:29 ajs_work later putter
21:29 vel joined perl6
21:32 fglock ajs_work: it works for me, but it doesn't 'looks' like perl
21:33 fglock it's a culture problem, more than parser's
21:33 ajs_work fglock: Well, it doesn't have to entirely since { { { ... } } } still does what it used to. It's just a way of using sigils to disambiguate.
21:34 ajs_work You really think it looks un-perlish?
21:37 fglock ajs_work: actually, if you s/[/(/ it might just work, since %(...) is specified
21:38 ajs_work I was thinking about that at first, but $(...) and @(...) already have meanings that don't imply composition.
21:38 ajs_work do they}
21:38 ajs_work ?
21:38 ajs_work That was why I was physched when I realized that %[...] currently had no meaning.
21:39 fglock ?eval @( 1, 2, %( 3, 4 ) )
21:39 evalbot_r13968 [1, 2, {("3" => 4),}]
21:39 ajs_work hurm... interesting.
21:40 ajs_work Ok, let me shoot back a modified form of my proposal
21:43 cjeris left perl6
21:43 Limbic_Region joined perl6
21:48 svnbot6 r13969 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added scalar versions of $array and $hash
21:50 fglock dinner &
21:55 fglock left perl6
22:00 LimbicRegion joined perl6
22:06 ajs_work @tell fglock Got stuck thinking about &(...), so see my most recent message that follows up. Would have liked it if the two could have been merged :-/
22:06 lambdabot Consider it noted.
22:09 weinig_ joined perl6
22:15 LimbicRegion is now known as Limbic_Region
22:20 weinig joined perl6
22:32 Aankhen`` joined perl6
22:35 fglock joined perl6
22:42 fglock ajs_work: actually, &(...) could be made to work - but I don't have a strong opinion on this
22:42 lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
22:49 fglock ?eval my @a; my $b=[1,2,3]; @a=$b; @a
22:49 evalbot_r13968 is now known as evalbot_r13969
22:49 evalbot_r13969 [[1, 2, 3],]
22:49 fglock ?eval my @a; my $b=[1,2,3]; @a=@$b; @a
22:49 evalbot_r13969 [1, 2, 3]
23:02 avarab is now known as avar
23:11 TreyHarris ?eval 1, 2, 3
23:11 evalbot_r13969 (1, 2, 3)
23:11 justatheory joined perl6
23:11 TreyHarris ?eval $(1, 2, 3)
23:12 evalbot_r13969 [1, 2, 3]
23:12 TreyHarris ?eval @(1, 2, 3)
23:12 evalbot_r13969 [1, 2, 3]
23:29 mauke joined perl6
23:43 fglock left perl6
23:43 SubStack joined perl6
23:45 svnbot6 r13970 | fglock++ | Pugs-Emitter-Perl6-Perl5 - added 'Scalar'
23:45 svnbot6 r13970 | fglock++ | - Note: this version does not run with v6.pm (Str object is broken)

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

Perl 6 | Reference Documentation | Rakudo