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