pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
diakopter Limbic_Region: did you read my backscroll about templated/parametrized patterns? 00:00
Limbic_Region no - I wasn't paying attention to the channel really
but I can
diakopter it's easier on the web irclog....
my name's in green or something
Limbic_Region well, regarding the Earley algorithm - Luke Palmer had created something in like 3 days but never finished it - while not crap, completely unusuable 00:01
I hear that something else was recently uploaded that is complete and useful
diakopter oh?
whereat
Limbic_Region Parse::Marpa
diakopter Limbic_Region: from irclog.perlgeek.de/perl6/2008-06-21#i_358566 on... 00:02
lambdabot Title: IRC log for #perl6, 2008-06-21
00:04 smokemachine joined
Limbic_Region well, when you get it all figured out and have something for general use - let me know. I am always looking for new parsing tools that don't require me to learn and implement them myself 00:05
diakopter Limbic_Region: it looks like it's still for context-free languages described by context-free grammars... STD.pm is throughly contextual
Limbic_Region diakopter - of course, only perl can parse perl :-) 00:07
diakopter actually
now that I think about it
the Perl6in5 grammar engine (in yap6) can theoretically use Turing-complete grammars. 00:08
of course I haven't tried anything close to that
but based on my understanding of those structures...
I think it can.
Limbic_Region so assuming you are able to get your parsing down, what are you planning on using for the runtime of yap6 ? 00:09
diakopter wait, I misstated that... grammars that produce languages whose parsers are required to be Turing machines
Limbic_Region: I dunno. depends on how the "fate"/"compilation unit"/"re-grammar" problem gets solved.. I can't see that far ahead 00:10
as in 00:11
handling markers like :: and :::, or grammar Mods {}, or eval ""
or any of the SPECIAL blocks
all of which require an immediate evaluation/interpretation up to that point in the parse
Limbic_Region as in BEGIN INIT CHECK etc?
diakopter yeah 00:12
Limbic_Region who thought dynamic languages were a good idea anyway :P
00:12 deq` joined
diakopter who thought dynamic languages with lex-time adaptable grammars were a good idea... 00:12
truly, real problems ensue when you put closures into your grammar Mods {} 00:13
Limbic_Region I meant to ask Larry at YAPC about a comment he made concerning LTM and backtracking
say you get the longest token and then decide it isn't and you backtrack - and there is a conflict - there are two possible tokens - he said the one defined first wins 00:14
IIRC anyway
just trying to understand how "first" is determined
diakopter yeah, that's what the spec says
which atom was declared first 00:15
came first above it in the "use module" tree
Limbic_Region let me put it another way - is there any way for the author to NOT get the expected behavior because "first" could be subjective 00:17
it will never be subjective to perl - I get that
but there are also very few hard rules either - so not everything needs to be in 1 place
diakopter oh; well you could always introspect the resulting match object to debug
Limbic_Region suspects he won't be screwing with the perl 6 grammar any time soon so it doesn't really matter much 00:19
diakopter the docs for Parse::Marpa are huge
if you ask me, this Earley algorithm is an optimizable version of top-down/recursive-descent... 00:20
TimToady "first" means the one defined in the earlier alternative at the topmost alternation that contains both alternatives 00:21
Limbic_Region diakopter - I think Parse::Marpa is doing more than just earley - read the reviews
diakopter TimToady: ahhh
TimToady there's more
for protos
diakopter but wait!
00:21 cjfields left
TimToady in a syntactic category you can add things on the fly by derivation 00:22
mixin, etc.
00:22 polettix joined
TimToady for those, the mangled names actually contain a globally incrementing counter 00:22
Limbic_Region diakopter - but yeah, still meant for context free grammars
TimToady if you look down in lex/Perl/* you'll see those numbers as part of the mangled names 00:23
presuming you've run STD5 to generate lex/...
so those names can be sorted when generating the fake alternation implied by, say <prefix>
and since alternatives are visited in order anyway when generating either static or dynamic, it degrades to the same order 00:24
(I think)
the one thing I don't guarantee right now is that TRE finds the first one if several longest ones are tied. haven't tested to see whether it's picking up the first one or the last one, or whether it's even determinable that way 00:27
(I suspect it probably picks the last one, given how tagged REs tend to work) 00:28
if it does pick the last one, I should reverse the list before feeding it to TRE
00:31 simcop2387 left, simcop2387 joined 00:34 cjfields joined
diakopter TimToady: any thoughts on the parametrized/templated patterns I mentioned above (lots of backscroll) 00:35
Limbic_Region: do you mind taking a look at something? 00:38
Limbic_Region diakopter - I don't mind at all 00:39
diakopter Limbic_Region: www.perlcabal.org/svn/pugs/view/mis...TD_hand.pm 00:40
well actually www.perlcabal.org/svn/pugs/blame/mi...TD_hand.pm so you can see the line numbers 00:41
line 60 is an example of a non-parametric pattern 00:42
lines 48 and 52 are parametric patterns 00:43
'-', '.', '+' represent optional/disallowed/mandatory whitespace, respectively
line 48 is not only parametric, it's recursive ($_[0] is always a direct reference to the actual parser object produced by the rule it's in) 00:45
00:45 cjfields left
speckbot r14555 | larry++ | clarifications requested by cognominal++ 00:45
Limbic_Region diakopter - ok, is something supposed to be jumping out at me? 00:46
diakopter well I'm curious if you have any syntax or addl feature suggestions
or critiques
since you've used yapp and prd
or any other ideas about the possible applications of these "higher-order" patterns 00:47
Limbic_Region diakopter - I do. Probably tomorrow I could give you some feedback. 00:48
I have to admit, the feedback will be mostly blind (I doubt I will have time to digest STD_hand.pm by then)
diakopter also, if you want to see a really hairy construction, see line 28 here: www.perlcabal.org/svn/pugs/blame/mi...Grammar.pm that's the rule sub 00:49
Limbic_Region but I do have things that I would like to see made easy (or possible) that I don't like WRT to the parsers I have used previously
but you know the person I would really talk to - ikegami on PerlMonks
guy really knows his stuff 00:50
TimToady diakopter: it seems fairly opaque unless one commits to learning the notation
diakopter well I'm primarily trying to optimize for dynamic grammar/language features so that Perl 6 regexes/rules/tokens can be translated to this syntax... 00:51
TimToady: yeah :/ overloading Perl operators doesn't get one very far :)
TimToady btw you should add-svn-props on your text files
diakopter oh; I'm ignorant of add-svn-props.... I'll search the irclogs for it 00:52
TimToady: but really, that whole notation is Perl 5.... 00:53
there's only a tiny bit of source filtering for the rule rulename preamble
TimToady script in utils
diakopter but yeah, the whitespace operators need work
also, '^' is Perl 6's || 00:54
TimToady: but what I really wanted you to comment on was the notion of having templated/parametric rules 00:55
I mean, if they exist in Perl 6 I don't know about them.
TimToady I'm already doing generics with roles 00:56
but just to mix in parametric methods
diakopter generics with roles?
TimToady that's what roles are for 00:57
diakopter I don't see how those apply here
TimToady see for example role startstop[$start,$stop] {
in STD.pm
but I'm not trying to use them as monads 00:58
(yet) :) 00:59
diakopter oh hey, that's what caused me to think of them, for getting balanced things
monads... is that a curse word?
Limbic_Region perl 6 is pure - pure mud :-) 01:00
TimToady depends on what you think of Haskell :)
diakopter well, if they're monads, then I really don't understand others' explanations of monads 01:01
TimToady those aren't monads
but if you're defining the rule/token difference as something that changes how adjacent tokens relate to each other, then you're getting closer to monadicity 01:02
diakopter oh 01:03
monadism? monadicism? monadness? monadity?
TimToady but just redefining <ws> is not really monadic 01:04
diakopter monadandry
I've read through the Parsec docs, and it can do everything in Parsec's built-ins 01:07
does PGE understand list and chain associativity? 01:13
TimToady clueじゃない。 01:17
diakopter TimToady: shouldn't chained operators also have left/right-orientation? as in, =/~~ have right and the rest presumably left? 01:18
oh; = is left; duh
but don't certain chained ones go in certain directions
infix, I mean
audreyt lambdabot: @tell masak "cabal install Pugs" should now work. 01:22
lambdabot Consider it noted.
diakopter audreyt: trying it now 01:23
audreyt lambdabot: @tell masak "cabal update" before installing, btw. 01:24
lambdabot Consider it noted.
diakopter hackage package list isn't compressed? 01:25
audreyt it is
which is why you'd need zlib
diakopter oh
here comes MetaObject
audreyt it's just stored on disk uncompressed
diakopter and pugs-DrIFT
and HsParrot 01:26
regex-base.. regex-pcre-builtin.. 01:27
ooo Pugs-6.2.13.1 01:28
failure 01:29
audreyt not really surprised :)
(built here, though.)
failed how? ghc-6.8.3?
pasteling "diakopter" at 209.9.237.164 pasted "Pugs 6.2.13.1" (34 lines, 2.4K) at sial.org/pbot/31383
audreyt my bad. 01:30
speckbot r14556 | larry++ | clarifications requested by pmichaud++
audreyt cabal update ; cabal install stringtable-atom 01:31
diakopter audreyt: fyi this is a fresh ghc 6.8.3 with only the prereqs you mentioned to masak 01:32
audreyt hm. 01:33
diakopter well now, this is weird 01:34
pasteling "diakopter" at 209.9.237.164 pasted "Pugs 6.2.13.1 #2" (58 lines, 3.2K) at sial.org/pbot/31384
diakopter oh 01:36
^H^H
audreyt fixed. "cabal update; cabal install Pugs".
01:37 yahooooo left 01:38 yahooooo joined
diakopter starts at realizing he saw MetaObject go by 01:38
Pugs has got to be the biggest distro on hackage... except maybe the opengl stuff..? 01:39
34 of 85 01:41
meppl good night 01:47
01:47 meppl left
diakopter erm 01:48
I think it got stuck on step 34; infinite loop or something; could barely ssh in again... 01:49
audreyt it's just slow. 01:50
(that step is Pugs.AST.Internals.)
diakopter tries again, this time in screen
audreyt bbl :) & 01:51
TimToady waves
audreyt *wave*
TimToady diakopter: how much memory do you have?
diakopter hrm
1GB total 01:52
TimToady compiling pugs has historically taken at least 1.5G
diakopter oh
well, we'll really push the disk, then. ;)
5 threads using 600MB virtual 01:54
01:54 Chillance joined
diakopter oh; it got to step 78 01:54
(on pins and needles) linking 01:56
TimToady: do you have a tennis table nearby? 01:58
TimToady alas, no
no good place to put one, until we redo the back yard 01:59
(still typing blind here...)
diakopter 800MB virtual; 400MB swap 02:00
TimToady something seems to be eating your cput^Hu :)
diakopter well, we can see our msgs on the irclog
TimToady I'm pres^Htty sure I didn't type that tu... 02:01
diakopter Load average: 2.13 19.45 18.74
5 min ago
TimToady does seem to be improving slightly
diakopter Load average: 41.31 31.14 23.26 02:02
TimToady probably was getting ssh confused by the delays too
diakopter 725MB swap
TimToady anyway, not typing blind now 02:03
diakopter done
TimToady if this works I'm gonna have to figure out how to get ghc on suse...
diakopter /\____/ Version: 6.2.13.1 02:04
and the prelude loaded
TimToady which svn rev?
diakopter it's entirely in hackage.. audreyt's local svk branch 02:05
took a while to download
audreyt (there is no svn rev for releases, historically, but I branched from r20921, which is effectively HEAD.)
diakopter TimToady: it's at /home/mwilson/.cabal/bin if you want to try it... I don't know why it installed there 02:06
TimToady well, I should probably really be swatting STD bugs...
02:06 simcop2387 left
TimToady or any of several other things, but this is encouraging 02:07
02:07 simcop2387 joined
diakopter audreyt: my .cabal/config has prefix: /home/mwilson/local but it installed to .cabal/bin ... any tips? 02:08
audreyt diakopter: no tips; it's broken --prefix support
sounds familiar, really
diakopter in cabal-install or Setup.*hs or what 02:09
audreyt in cabal-install I believe
diakopter hrm; maybe I should've put the path in quotes like the other paths in that file 02:10
audreyt I should probably try to get re::engine::TRE to stop segfaulting
no, I think it's a genuine bug
diakopter audreyt: I tried for many hours to get re::engine::TRE to install on leopard and strawberry, alternately
02:10 simcop2387 left
diakopter apparently it works only on linux 02:11
audreyt leopard here. doesn't seem to like it
'k.
02:11 simcop2387 joined
diakopter I did get it to make some further progress on strawberry by tweaking the Makefile.PL in tre/ 02:11
audreyt I'll just switch to a linux box then :) bbl 02:12
diakopter I posted the details somewhere on win32.perl.org
dare I run a smoke 02:13
TimToady unfortunately TRE isn't terribly well supported. as it is, had to work around null-match coredump bugs by adding .? to every pattern 02:16
pugs_svnbot r20935 | bacek++ | [spec] Fix typo in test
TimToady at some point someone will want to write something a parallel matcher specifically for Perl 6, I suspect 02:17
fortunately, adding .? to every pattern doesn't change which token matched longestly
(except at $, where it doesn't matter) 02:18
02:18 yahooooo2 joined, yahooooo left
diakopter TimToady: I was reading the parsec source today... if someone could integrate the use of some frp package that can spawn interdependent threads... 02:18
TimToady fantasy role-playing?
diakopter :) that's what I was doing, pretending to read the source; exactly 02:19
TimToady that's the only FRP I know...
diakopter functional reactive progr
luqui had a blog post mentioning it recently 02:21
luqui.org/blog/archives/2008/06/08/...wo-senses/
lambdabot Title: Education (two senses) @ The dreams that stuff is made of
TimToady if luqui understands something it oftenrole startstop[$start,$stop] { means that I am not smart enough to. :) 02:26
if luqui understands something it often means that I am not smart enough to. :) 02:27
(sorry, was trying to click open the link and pasted)
diakopter I can sound out the words in my head... does that count as understanding? 02:28
I guess you could view an input stream as a stream of events 02:29
02:31 bacek joined
bacek perl6: say sprintf("%p", 1234) 02:31
p6eval kp6 r20935: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤
..pugs: OUTPUT[*** sprintf does not yet implement %p␤ at Prelude.pm line 728, column 17-67␤]
..rakudo r28620: OUTPUT[Could not find non-existent sub sprintf␤current instr.: '_block11' pc 35 (EVAL_13:19)␤
..elf r20935: OUTPUT[81558a4␤]
Auzon TimToady: @(1,2) and (@ 1,2) should work the same, correct?
02:31 Alias_ joined
TimToady the latter needs no parens 02:32
@ 1,2 is okay
considered a listop
diakopter I don't suppose that interpolates 02:33
TimToady which, interestingly, probably means that @; ought to parse like say; :)
no
Alias_ waves from Philly
TimToady none of the interpolations allow whitespace outside of internal structures
diakopter ok; thanks; makes sense 02:34
TimToady waves vaguely eastward
Auzon I'm just trying to figure out if I should test both variants of sigil outside and sigil inside (and the named variants of both too)
02:34 redicaps left
TimToady there's no inside/outside here, @(1,2) is a function call, and @ 1,2, is a listop with no relationship to parens 02:35
(syntactically)
Auzon And list(1,2) versus list 1,2 is the same idea? 02:36
TimToady yes, that's the basic relationship of functions vs listops
Auzon OK, thanks
TimToady which also extends to if($x) vs if $x except that the latter ends up statement control rather than listop 02:37
but you'll notice statement controls also require whitespace before their args
Auzon is going to have to break the habit of writing if(foo)...
TimToady well, you want to write if foo anyway
the parens are mostly unnecessary 02:38
Auzon Fair enough. I find myself trying to leave the parens out sometimes when I convert from postfix conditions to the traditional conditional style
TimToady it's really funny how people kept wanting us to drop the {...} around the apodosis when the right thing to do turned out to be dropping the (...) around the protasis
that's another reason 02:39
Auzon Indeed. That just shows that it is the right thing :) 02:40
02:40 quietdev joined 02:41 quietdev left
diakopter TimToady: if { $bare_block_protasis }{ $does_apodosis } ? 02:43
or is the block viewed in argument context 02:44
TimToady that would all be the protasis 02:46
the block starting the apodosis requires whitespace before
or it is a postfix .{}
diakopter pugs: if { say 4 } { say 3 }
p6eval OUTPUT[*** ␤ Unexpected "{"␤ expecting "=" or conditional expression␤ at /tmp/htsvMRzko2 line 1, column 4␤]
diakopter oh
TimToady that should say 3 02:47
since { say 4 } is a valid term
and a Code object should be true
diakopter tries on new pugs ;)
TimToady not likely to be different 02:48
unfortunately Parsec gets a bee in its bonnet about whitespace sometimes
diakopter wow. slow...
probably just my machine
pugs: if ({ say 4 }.()) { say 3 } 02:49
p6eval OUTPUT[4␤3␤]
diakopter time echo 'if { say 4 } { say 3 }'|pugs gives real 0m7.056s 02:50
02:52 mjk joined
TimToady pugs: if ({ say 4}) { say 3 } 02:52
p6eval OUTPUT[3␤]
TimToady though arguably the statement-inside-() should run that as a bare block 02:53
diakopter that was my question, whether it should be viewed in semilist context 02:54
TimToady not for if {...} {...} 02:55
that's just an EXPR after if
Auzon rakudo: "foo" ~~ /oo/; $/.perl.say
p6eval rakudo r28620 OUTPUT[{}␤]
Auzon rakudo: $/.perl.say
p6eval rakudo r28620 OUTPUT[Null PMC access in find_method()␤current instr.: '_block11' pc 28 (EVAL_10:16)␤
Auzon rakudo: "foo" ~~ /oo/; (@($/)).perl.say 02:56
p6eval rakudo r28620 OUTPUT[[]␤]
02:56 cjfields joined
cjfields pugs: say " <>&".trans( ([' ', '<', '>', '&' ] => ['&nbsp;', '&lt;', '&gt;', '&amp;' ])); 02:57
p6eval OUTPUT[&nbsp;&lt;&gt;&amp;␤]
Auzon That looked like some dark magic until I realized it was just transliteration. 02:58
02:58 Tene left
TimToady transliteration *is* dark magic :) 02:58
though not particularly deep 02:59
cjfields pugs: "&nbsp;&lt;&gt;&amp;".trans( (['&nbsp;', '&lt;', '&gt;', '&amp;' ] => [' ', '<', '>', '&' ]))
p6eval RESULT["\&nbsp;\&lt;\&gt;\&amp;"]
cjfields Doesn't work the other way around
TimToady though arguably it could 03:00
Auzon pugs: '&nbsp;&lt;&gt;&amp;'.trans( (['&nbsp;', '&lt;', '&gt;', '&amp;' ] => [' ', '<', '>', '&' ]))
p6eval RESULT["\&nbsp;\&lt;\&gt;\&amp;"]
Auzon hm. odd
cjfields I'm implementing trans() in Rakudo
TimToady it's basically the LTM problem
cjfields and am working out that last bit 03:01
feather.perl6.nl/syn/S05.html#Transliteration
lambdabot Title: S05
Auzon I thought it was having issues with interpolating, which is why I changed double quoted strings to single quoted
but it didn't have parens, so it wasn't
cjfields States: "The array version can map one-or-more characters to one-or-more characters:" 03:02
diakopter TimToady: oh. rule() is a Y combinator. there I go, rederiving..
TimToady okay, already specced that way, good
shouldn't interpolate &foo without a () on the end 03:03
Auzon Yeah, I forgot that until I tried
cjfields LTM? 03:04
TimToady yeek, just sneezed Blair's MegaDeath up my nose...
longest token matcher
cjfields Ah
03:04 elmex_ joined
TimToady and we already have LTM built into STD5 03:05
soon into the other parsers as well
cjfields I was getting everything but that by google
diakopter we meaning people on linux :{
cjfields feels sorry for diakopter
diakopter :) thanks 03:06
I mean, I could use this vps and all, but... I don't know.
cjfields I know pmichaud is working on that issue for Parrot (at least it's on the TODO)
diakopter he said late July I think
cjfields yes, but .HLL mapping and a few other things crept in 03:07
so I don't know how that affects his timeline
TimToady I'm not sure if pmichaud realizes that he's probably signing up to write a backtracking DFA engine :) 03:08
since TRE is problematic as a long-term solution
Auzon Heh. fudge++ counts better than I do
TimToady bows
diakopter TimToady: I thought DFA didn't need to backtrack 03:10
cjfields Well, I have *most* of trans() working; I could wait until LTM is worked out for PGE
TimToady it doesn't, but the LTM needs to
you can always fake the backtrack like I do currently 03:11
the crucial thing to get from the DFA is which token matched
diakopter TimToady: what's a good simple test case of LTM
TimToady it's not good enough to say "one of the alternatives matched but I don't know which one"
so egrep's algorithm is not suitable 03:12
LTM isn't simple, so how can there be a simple test case?
in other words, I don't really grok what you're asking... 03:13
diakopter a reductionistic grammar and an example production that would fail on a parser that didn't LTM, but would succeed on a parser that did
pugs_svnbot r20936 | bacek++ | [spec] Comment out 'force_todo'. Now it ready to include in rakudo's spectest 03:17
diakopter or even an example from STD.pm 03:19
pasteling "TimToady" at 71.139.37.118 pasted "test case for LTM" (6 lines, 194B) at sial.org/pbot/31389
03:20 elmex left
TimToady this test case disqualifies anything that interprets | as serial alternatives, and requires the "foodie" longest token to be falsifiable before hitting :: 03:20
03:20 elmex_ is now known as elmex
TimToady and requires it to back off to the next longest possibility 03:20
03:25 deq` left
TimToady more sophisticated tests would be necessary to tell whether ties were resolved correctly 03:25
Auzon I think fudge is getting confused with this file but I'm not sure how 03:26
TimToady it's actually pretty easy to confuse fudge, since it's just assuming certain conventions 03:27
Auzon ah... I commented out the line below a fudge comment line, which caused the file to be truncated shortly 03:28
TimToady on the other hand, using a real Perl 6 parser on it would have its own set of problems :)
Auzon Nah, it was just me not thinking things through
diakopter TimToady: I'm pretty dense today; I can't understand what :: {*} does; help? 03:29
cjfields S05? 03:30
diakopter cjfields: right, I've read it
I'm pretty dense
diakopter stares at perlcabal.org/syn/S05.html#line_1872 03:32
lambdabot Title: S05
Auzon rakudo: (%(1,2,3,4)).perl.say 03:33
p6eval rakudo r28626 OUTPUT[{"1" => 2, "3" => 4}␤]
Auzon rakudo: (%('a', 1, 'b', 2)).perl.say
p6eval rakudo r28626 OUTPUT[{"a" => 1, "b" => 2}␤]
Auzon rakudo: ((%('a', 1, 'b', 2)) == {a => 1, b => 2}).perl.say 03:34
p6eval rakudo r28626 OUTPUT[get_number() not implemented in class 'Closure'␤current instr.: 'infix:==' pc 8725 (src/gen_builtins.pir:5691)␤
Auzon rakudo: ((%('a', 1, 'b', 2)) == (a => 1, b => 2)).perl.say
p6eval rakudo r28626 OUTPUT[Bool::True␤]
TimToady it's just representing the rest of the rule that's after the longest token
fact is, {*} already implies ::
diakopter ok. that's what was confusing me. 03:35
03:35 polettix left
diakopter so foo should succeed on input 'foodies'? or fail? 03:36
TimToady it should match food
diakopter as a success; got it
Auzon rakudo: (hash 'a', 1, 'b', 2).perl.say 03:37
p6eval rakudo r28626 OUTPUT[{"a" => 1, "b" => 2}␤]
Auzon rakudo: %( 'a', 1, 'b', 2).perl.say
p6eval rakudo r28626 OUTPUT[{"a" => 1, "b" => 2}␤]
03:42 pbuetow_ joined
pmichaud TimToady: (backtracking DFA) -- yes, I realize it, which is why I've been postponing it to try to get other basics in place (so that others can continue hacking while I sequester myself to do the ltm :-) 03:45
Auzon rakudo: say (hash 'a', 1, 'b', 2) == {a => 1, b => 2}
p6eval rakudo r28626 OUTPUT[get_number() not implemented in class 'Closure'␤current instr.: 'infix:==' pc 8725 (src/gen_builtins.pir:5691)␤
Auzon rakudo: say (hash 'a', 1, 'b', 2) == ('a' => 1, 'b' => 2)
p6eval rakudo r28626 OUTPUT[1␤]
pmichaud rakudo doesn't understand { ... } as a hash composer yet.
Auzon Odd, considering it outputs them :P
pmichaud it probably will by tomorrow, though :-)
emitting Perl 6 is far easier than parsing it :-P 03:46
Auzon Emitting content is usually easier than parsing it. 03:47
03:48 alanhaggai joined
pmichaud <item> is a listop, yay! 03:50
er, "item" is a listop, yay!
Auzon Did you just change that?
03:51 pbuetow left
pugs_svnbot r20937 | bacek++ | [spec] Fudge 4 tests for rakudo: Junction stringification is not implemented yet 03:51
pmichaud 01:28 <speckbot> r14556 | larry++ | clarifications requested by pmichaud++
perlbot What kind of idiot karmas himself? Your kind of idiot!
diakopter hee
pmichaud r14556 answers the questions I posted to p6l (TimToady++)
Auzon Ah. I thought you added something else. 03:52
rakudo: say hash('a', 1) eq ('a' => 1) 03:53
p6eval rakudo r28626 OUTPUT[0␤]
Auzon rakudo: say hash('a', 1) == ('a' => 1)
p6eval rakudo r28626 OUTPUT[get_number() not implemented in class 'Perl6Pair'␤current instr.: 'infix:==' pc 8725 (src/gen_builtins.pir:5691)␤
diakopter I thought "except" was a bad word in Snn
cjfields 'night all!
03:53 cjfields left
Auzon rakudo: say hash('a', 1) == ('a' => 1,) 03:54
p6eval rakudo r28626 OUTPUT[1␤]
Auzon um
That's wrong.
(I hope)
rakudo: say hash('a', 1) eq ('a' => 1,)
p6eval rakudo r28626 OUTPUT[0␤]
pmichaud rakudo: say +hash('a', 1);
p6eval rakudo r28626 OUTPUT[1␤]
pmichaud rakudo: say +('a' => 1,);
p6eval rakudo r28626 OUTPUT[1␤]
pmichaud looks to me like they're (numerically) equal. :-) 03:55
Auzon How should I compare them to see if their contents are the same?
pmichaud well, they won't really be the same, since one is a Hash and the other is a List containing a Pair 03:56
Auzon I guess I could assign the second to a hash variable and compare them... 03:57
pmichaud say hash('a', 1).perl;
rakudo: say hash('a', 1).perl;
p6eval rakudo r28626 OUTPUT[{"a" => 1}␤]
Auzon rakudo: my %hash = ('a' => 1); say hash('a', 1) eq %hash;
p6eval rakudo r28626 OUTPUT[1␤]
pmichaud rakudo: say ('a'=>1,).perl;
p6eval rakudo r28626 OUTPUT[[("a" => 1)]␤]
pmichaud what if %hash has more than one entry? 03:58
Auzon It works in my test (confirmed that it breaks when expected too) 04:00
pmichaud yes, but does the spec guarantee an ordering of hash when stringified?
Auzon I'm not using .perl
pasteling "diakopter" at 209.9.237.164 pasted "foodies on yap6" (35 lines, 1.6K) at sial.org/pbot/31390
Auzon I'm assigning the pair to a hash variable, then comparing that
pmichaud yes, but does the spec guarantee an ordering of hash when stringified?
Auzon Oh. I'm not sure, and I can't find it with ack 04:01
diakopter TimToady: ^ that's TRACE=2 04:02
TRACE=7 gives 336 lines 04:03
Auzon pmichaud: S09#Autosorted_hashes implies that they are not sorted
pmichaud Auzon: that's what I suspected.
Auzon: so using C<eq> isn't reliable if the hashes have more than one entry.
TimToady on the other hand, eqv should canonicalize
pmichaud ah, yes, C<eqv>.
Auzon So I should use eqv for all kinds of deep comparisons, correct? 04:04
04:05 Chillance left
TimToady in theory 04:05
pasteling "diakopter" at 209.9.237.164 pasted "foodies on yap6 TRACE=7" (336 lines, 131K) at sial.org/pbot/31391 04:06
Auzon Well, midway through next week I'll make sure that eqv works correctly ;)
diakopter TimToady: see www.perlcabal.org/svn/pugs/revision/?rev=20938 if you're interested 04:09
lambdabot Title: revision: /pugs (Rev: 20938, via SVN::Web)
pugs_svnbot r20938 | diakopter++ | [yap6] fixed thru ({*}) and nthru (binary form of ({*})
r20938 | diakopter++ | added the test grammar ltm.pm to demo foodies/ltm
diakopter considers making p6eval: yap6: accept a grammar parameter 04:11
pugs_svnbot r20939 | Auzon++ | [gsoc_spectest] many, many context listops/function tests added. fudged to pass in rakudo. pmichaud++ provided tons of help. (added 33 tests) 04:15
Auzon pmichaud (or anyone else that is working on Rakudo): you can add t/spec/S03-operators/context.t to the list of tests that Rakudo passes 04:16
pmichaud Auzon++
pmichaud gives it a try. 04:17
Auzon Adding eqv would allow several of the fudged tests to pass
bacek pmichaud, There is more tests can be added after apply patches from #56208, #56214 and #56216 :) 04:18
pmichaud rakudo failed tests 32-33
04:19 alester joined
Auzon Erm, that's a bug 04:20
There _are_ no tests 32 and 33
pugs_svnbot r20940 | diakopter++ | [yap6] tentative grammar parameter to evalbot's yap6:
pmichaud line 3 says "plan 33;" :-)
Auzon yep... fixing
pmichaud also, rakudo now has item()
Auzon Let me try that, then
diakopter evalbot control restart 04:21
04:21 p6eval left, p6eval joined
pugs_svnbot r20941 | diakopter++ | [yap6] har; forgot I renamed sbin to bin 04:23
pmichaud also, fwiw, it's okay to use { 'a'=>1, 'b'=>3 } instead of my %hash = ( 'a'=>1, 'b'=>3 );
Auzon Is it?
diakopter evalbot control restart
04:23 p6eval left, p6eval joined
pmichaud rakudo won't pass it, but that's rakudo's problem, not the test suite's. :-) 04:23
Auzon Ah, ok 04:24
and there's another bug that you found :P
pmichaud (it's okay to leave it as my %hash, too, but in general I think the test suite should test the typical usage and not necessarily what rakudo or any other implementation currently allows.)
04:24 xinming_ joined
Auzon Is {a => 1} coming soon? 04:24
pmichaud 03:43 <pmichaud> rakudo doesn't understand { ... } as a hash composer yet. 04:25
03:43 <pmichaud> it probably will by tomorrow, though :-)
:-)
Auzon ok
I'll just switch and fudge now
We're fudged on eqv for those tests anyway
pmichaud although it may be late tomorrow, given how ugly the current C<$_> handling is in rakudo.
(this is what happens when incorrect code makes it into the system -- it tends to spread. :-( ) 04:26
Auzon Indeed. 04:27
04:34 deq` joined
pugs_svnbot r20942 | diakopter++ | [yap6] fixed split('|||',) weirdness 04:35
diakopter evalbot control restart 04:36
04:36 p6eval left, p6eval joined 04:37 p6eval left, p6eval joined, p6eval left, p6eval joined
Auzon Um... 04:37
I'll stop this now.
diakopter yap6: ltm|||foodies 04:38
p6eval yap6 r20942 OUTPUT[parsed: [["food","ies"],[]]␤stats: {memomisses => 18}]
diakopter Auzon: why
I was waiting for it to update
Auzon Oh, I thought it was in an endless loop of crashing right after connecting
diakopter evalbot control version
p6eval This is evalbot revision 20942
04:39 xinming left
diakopter TimToady: did you see foodies on yap6? 04:39
yap6: ltm|||foodie 04:40
p6eval yap6 r20942 OUTPUT[parsed: [["foodie",""],[]]␤stats: {memomisses => 15}]
diakopter yap6: ltm|||food 04:41
p6eval yap6 r20942 OUTPUT[parsed: [["food",""],[]]␤stats: {memomisses => 13}]
diakopter yap6: ltm|||foo
p6eval yap6 r20942 OUTPUT[parsed: [["foo",""],[]]␤stats: {memomisses => 13}]
diakopter yap6: ltm|||fo
p6eval yap6 r20942 OUTPUT[parsed: [["fo",""],[]]␤stats: {memomisses => 13}]
diakopter yap6: ltm|||f
p6eval yap6 r20942 OUTPUT[syntax error at line 1 col 1 near "f"␤Expected: "foo".␤[[],[]]]
Auzon elf: 13 + 12 + 1 + 6 04:42
p6eval RESULT[32␤]
diakopter well now; those others should've slurped the rest of the input. 04:43
diakopter hits forehead. too sleepy.
Auzon I'm having a weird off-by-one error in the test counts :-/
diakopter pmichaud: ltm is working
04:46 simcop2387 left
pugs_svnbot r20943 | diakopter++ | [yap6] adding nonltm POC grammar of first() 04:46
04:46 simcop2387 joined 04:50 drbean_ left
pmichaud diakopter: congrats :-) 04:50
04:50 jhorwitz left
pmichaud does it follow into subrules, also? 04:50
04:51 simcop2387 left
diakopter pmichaud: yep; every single production is tested... :/ 04:52
the hit length is measured in one place - one() 04:53
which takes an option that causes it to short-circuit, but the default is to return the first match that is the longest
rakudo_svn r28627 | pmichaud++ | [rakudo]:
r28627 | pmichaud++ | * Add a version of 'sprintf' (RT#56208, bacek++)
r28627 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek at bacek.com>
r28627 | pmichaud++ | * Modifications to use export instead of duplicating sub
diakopter pmichaud: and, since every alternation is done through one(), and hit lengths are cumulated when returning from subrules, the longest will always be selected 04:55
04:56 Limbic_Region left
pugs_svnbot r20944 | pmichaud++ | S29-str/sprintf.t: Enable sprintf tests for rakudo (bacek++) 05:01
diakopter pmichaud: by induction. 05:02
or something.
audreyt++ # getting Pugs installable on ghc 6.8 05:03
Auzon: what's your 1off 05:06
spinclad yap6: ltm|||foodi 05:07
p6eval yap6 r20944 OUTPUT[parsed: [["food","i"],[]]␤stats: {memomisses => 14}]
Auzon diakopter: I have 32 test cases. Rakudo only runs 31.
diakopter my first guess is a parsing issue 05:08
counting 2 as 1
you're sure it doesn't run the last one?
Auzon I guess I need to find which one it's missing then
problem is that so many are fudged and skipped with the same message
pmichaud I think it may be that you have nested skips 05:09
Auzon The generated file looks sane though
diakopter couch& 05:10
05:10 Psyche^ joined 05:12 Patterner left, Psyche^ is now known as Patterner
pmichaud I only count 31 test cases. 05:12
(recounting.)
Auzon the svn version has one commented out accidentally
the end of the first bracket
pmichaud so, uncomment that one?
Auzon I did 05:13
It's choking on that one, though
aha. missing semicolon on the previous test
05:16 simcop2387 joined
Auzon ok pmichaud, see if this looks better 05:17
pugs_svnbot r20945 | Auzon++ | [gsoc_spectest] fixed context.t to have the proper number of tests (now 32 tests instead of previous commit which accidentally had 33). It now should pass in Rakudo.
r20945 | Auzon++ | Added some TASKS for S03. I'll get to them in a few days once I get started on S03.
pmichaud Auzon++ 05:20
that adds 17 more passing tests to rakudo.
Auzon Great!
05:20 alester left
pmichaud comes in after 00:00 localtime, though, so it won't get counted until 06-23 :-) 05:21
(I'm in the middle of counting passing tests for 06-22 00:00)
still, we should have a bunch more passing tests by tomorrow.
esp if I get the { ... } hash composer implemented.
Auzon Yep. Some of the non-passing ones shouldn't be too hard either (eqv and {} for hashes would get 4 or so. zip would add another 3 I think) 05:22
pmichaud (which isn't hard, but I want to get $_ handling fixed first.)
Auzon eqv, cmp, and leg are on my list for the later part of next week. 05:23
pmichaud cools. 05:25
we already have 'leg' implemented in rakudo
still need to look carefully at 'cmp' and 'eqv' :-)
Auzon cmp and leg are the operators I'm wanting to test, especially their actual return values (Order::Increase and the like) 05:27
I'm also looking at the cmp and eqv methods that allow objects to specify how they want to be sorted
rakudo: my @a = 1 .. 10; say @a [5];
p6eval rakudo r28628 OUTPUT[Statement not terminated properly at line 1, near "[5];"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
rakudo_svn r28629 | pmichaud++ | [rakudo]:
r28629 | pmichaud++ | * Update docs/spectest-progress.csv for 2008-06-22
r28629 | pmichaud++ | * 66 test files, 843 passing tests
r28630 | pmichaud++ | [rakudo]: 05:28
r28630 | pmichaud++ | * Add S03-operators/context.t to spectest_regression.data (Auzon++)
Auzon (that's another thing for me to test (the failure above). It's supposed to die.)
pmichaud well, I was going to work on $_ tonight but I'm too tired to reliably do it now. I'll take a nap and try it in the morning. 05:29
Auzon Is there a goal to get 1000 tests by a certain time?
pmichaud not a formal one, no. 05:30
Auzon OK. Have a nice nap.
spinclad by thanksgiving
pmichaud I just want to see the number increasing. :-)
Auzon Increasing is good :)
pmichaud oh, I think we should make 1000 within the next couple of weeks.
Auzon I hope so.
I know how to fudge now :)
pmichaud the 843 passing tests doesn't count the 17 we just added, so we're already at 860
spinclad oh, wait... thinks thanksgiving is 10000 05:31
pmichaud and there are a bunch of tests just waiting for me to get 'pi' to work as a 0-ary term.
spinclad (should be doable, just catch up with pugs) 05:32
:)
Auzon I wouldn't be surprised to find that $_ and {} hashes open up a lot.
pmichaud well, $_ mostly works, except where it doesn't. :-) 05:33
Auzon I suppose. I just have a feeling that it's going to start snowballing sometime due to 'that last thing' 05:34
pmichaud wouldn't surprise me if it did. :-)
anyway, time for nap. bbl. 05:37
Auzon see you.
05:43 Eevee left, Eevee joined, deq`_ joined 05:45 deq` left 05:52 gbacon left 06:43 Alias__ joined, Alias_ left 06:57 agentzh left, agentzh joined 07:37 araujo left
bacek pugs: my $f; say try{$f=42}; 07:40
p6eval OUTPUT[42␤]
07:41 Jedai joined 08:05 alanhaggai left 08:21 deq`_ left 08:30 alanhaggai joined 08:48 kanru left 08:56 iblechbot joined 08:58 hanekomu joined 09:25 masak joined
masak what's the biggest reason to make @() mean @($/) ? 10:00
lambdabot masak: You have 2 new messages. '/msg lambdabot @messages' to read them.
masak apart from saving two characters, I mean
10:01 mncharity joined
mncharity scrottie: please let me know if you have any questions. 10:06
10:07 barney joined
mncharity my one-liner on "how to help p6" might be: () support TimToady's work on STD (we need a parser). not clear to me how. it seemed elf was helping, but I'm unclear on the current vision. () support parrot/rakudo (we need an implementation). as competitor, customer, or developer. it's not 10:08
10:11 polettix joined
mncharity necessary to buy into the vm or culture. just need to get it to be capable of running things like pugs's ext/, then then to running larger apps like a p6 compiler (which pugs can't). () look for non-implementation opportunities to support language design (by serving as forcing factor or foil). smop for oo. perhaps the writing of a formal language spec (but unclear if this is socially viable). 10:11
() if you have or can find a large block of developer resources, a p6-written-in-p6 project could be kicked off. this has seemed the best chance to get back to a pugs-like 50+ active developers project state. but requires someone, or perhaps a small team, to sink their life into it. and no one has volunteered yet. 10:14
10:14 iblechbot left
mncharity ok, that was more than a one liner. and incomplete (eg, no mention of CPAN or p5 core). and sparse on details. but... the full version is _big_. 10:15
masak @tell audreyt Pugs snuck down without a hitch. thank you! (you should email perl6-compiler about this, in the recent thread that talked about Pugs being broken. but you know that)
lambdabot Consider it noted.
mncharity masak: if pugs build is now working, could you update the README? 10:16
masak mncharity: certainly. 10:17
masak gets right to it
mncharity and if it's no longer relevant, gc past efforts like pugs-ghc681.diff ?
masak oki
mncharity (the file pugs-ghc681.diff)
thanks! :)
mncharity thinks "pugs working!?! - warm fuzzies" 10:18
10:20 pkrumins joined, pkrumins left
mncharity diakopter: re "elf [...] I just can't read the code for the life of me", very good to know. Most excellent (ie, existent;) feedback. Any part or thing in particular? 10:21
re complete, as in language coverage, elf is currently *far* less complete than rakudo. elf optimized for something else - being able to write a large application (specifically, a p6 compiler). On that axis, kp6 was too limited and slow, rakudo is still largely untried, pugs could run ext/ but repeatedly proved unable to support larger applications, and elf... well, it manages to compile itself at least. 10:27
elf taking on pugs t/ and evalbot, could be seen as distracting mission creep. but... it seemed one potential way to attract developers. 10:28
10:31 Jedai left 10:33 a-jing joined, a-jing left
mncharity rakudo: temp($a)=3; 10:34
p6eval rakudo r28633 OUTPUT[Scope not found for PAST::Var '$a'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
10:36 iblechbot joined
mncharity scrottie: one exploratory task might be to check how far elf is from running on rakudo. 10:37
10:39 drbean joined
mncharity search.cpan.org/~jkegl/Parse-Marpa-...e/Marpa.pm #mentioned yesterday 10:41
lambdabot Title: Parse::Marpa - Earley's algorithm with LR(0) precomputation - search.cpan.org, tinyurl.com/5q5z7f
pugs_svnbot r20946 | masak++ | * removed pugs-ghc681.diff 10:46
r20946 | masak++ | * added instructions to INSTALL for building Pugs via Cabal
mncharity search.cpan.org/~jkegl/Parse-Marpa-0.211_009/ #more recent developer release. cpanratings.perl.org/dist/Parse-Marpa # mentioned review
lambdabot Title: Jeffrey Kegler / Parse-Marpa-0.211_009 - search.cpan.org
masak idion for shuffling a list is .pick(*), right? 10:48
pugs: <1 2 3 4>.pick(*) 10:49
p6eval RESULT[("3", "4", "1", "2")]
masak pugs: ('Jack", 'Queen', 'Ace' X 'Hearts', 'Clubs').pick(*)
p6eval OUTPUT[*** ␤ Unexpected "Queen"␤ expecting term postfix, operator or ")"␤ at /tmp/dzOjEVM4PP line 1, column 11␤]
masak pugs: ('Jack', 'Queen', 'Ace' X 'Hearts', 'Clubs').pick(*) 10:50
p6eval RESULT[(("Jack", "Clubs"), ("Ace", "Hearts"), ("Queen", "Hearts"), ("Ace", "Clubs"), ("Jack", "Hearts"), ("Queen", "Clubs"))]
masak pugs: (<Jack Queen Ace> X <Hearts Clubs>).pick(*)
p6eval RESULT[(("Queen", "Hearts"), ("Jack", "Hearts"), ("Ace", "Clubs"), ("Jack", "Clubs"), ("Queen", "Clubs"), ("Ace", "Hearts"))]
masak pugs: (2 .. 10, <Jack Queen Ace> X <Hearts Clubs>).pick(*) 10:51
p6eval RESULT[((5, "Hearts"), ("Ace", "Hearts"), (3, "Hearts"), (10, "Clubs"), (3, "Clubs"), (8, "Clubs"), ("Jack", "Hearts"), (7, "Hearts"), (7, "Clubs"), (4, "Clubs"), (4, "Hearts"), (10, "Hearts"), ("Queen", "Clubs"), ("Jack", "Clubs"), (2, "Clubs"), (6, "Hearts"), ("Ace", "Clubs"), (9, "Cl...
masak pugs: sub g($v) { say $v; return $v-2; } g($_) or last for 1..5; 10:54
p6eval OUTPUT[1␤2␤]
masak hm, is statement-modifying `for` outside the scope of the precedence table? 10:57
anyway, neat trick
11:05 alanhaggai_ joined
pugs_svnbot r20947 | masak++ | [card_war_game.pl] improved various things, both in English and in Perl 6 11:10
masak the above file also contains mentions of the types 'ArrayRef' and 'HashRef' in method signatures. I'm not sure they exist in Perl 6, but I'm also unsure how to rewrite them 11:12
11:19 kanru joined 11:20 alanhaggai left 11:24 Jedai joined 11:49 mjk left
diakopter mncharity: well, the fact that I have trouble reading elf reflects only on my lack of Perl skills... 11:53
mncharity: namely, Perl 6 11:55
scrottie: you might be interested to know that elf uses autobox::Core 11:57
ish
mncharity: are you around 11:58
mncharity: well, and Perl 5 12:00
to breakfast/wifi spot& 12:02
masak: in the README, I think pugs-compat is a prereq of Pugs, so it's installed/updated automatically... not sure though. 12:04
afk
pmichaud (p6 written in p6) I sometimes wonder why rakudo doesn't count as a p6-written-in-p6 project. :-| 12:12
12:21 jan__ left 12:26 alanhaggai joined, alanhaggai_ left
diakopter pmichaud: it does to me :P maybe you should rename nqp to nqp6 12:27
or
np6 for nearly perl 6
heredoc is a kind of new grammar rule 12:29
pmichaud well, since STD.pm identifies the grammar as being for "Perl" (as opposed to "Perl6"), I figured NQP should be "Not Quite Perl" instead of "Not Quite Perl 6" :-) 12:32
although "np6" would indead be a good name. 12:33
diakopter plus it sounds close to "in p6"
pmichaud *indeed
yup.
diakopter or you could rotate nqp and call it dbu 12:34
pmichaud sounds like a new DBI-like interface.
diakopter or dallas baptist.. 12:35
pmichaud heh
diakopter gdu rotated np6, except not in this font 12:36
pmichaud so far I like np6 best.
there's some history built up with nqp, though, so I'll have to think a bit farther before switching.
diakopter rips rules wholesale from STD.pm 12:37
masak diakopter: I just copied down the instructions I got from audreyt 12:38
if you get a subset of the instructions to work, feel free to improve on the README 12:39
afk # canoeing
diakopter renames rule() to pattern() since it's not really a Perl 6 rule, but can be used to construct rules.
pmichaud audreyt++ masak++
rakudo_svn r28634 | pmichaud++ | [rakudo]: 12:41
r28634 | pmichaud++ | * Refactor $_ handling slightly in given/when .
diakopter masak: see sial.org/pbot/31384 where installing Pugs processed the pugs-compat dependency. 12:42
lambdabot Title: Paste #31384 from "diakopter" at 209.9.237.164
diakopter masak: my guess is audreyt said to install that first just to point out that if pugs-compat installed, then Pugs probably would as well. 12:43
actually that's more than a guess; a near certainty. anyway, back to mangling STD
12:43 smokemachine left 12:44 barney left
pugs_svnbot r20948 | audreyt++ | * pugs-compat need not be separately installed; add upgrade 12:47
r20948 | audreyt++ | instructions (which coincidenally is the same as installation.)
12:52 sri_work_ left, mncharity left 12:53 mncharity joined
rakudo_svn r28635 | pmichaud++ | [rakudo]: 12:54
r28635 | pmichaud++ | * STD.pm tracking: refactor <subcall> into <term>
r28636 | pmichaud++ | [rakudo]: 13:36
r28636 | pmichaud++ | * Remove some inlined PIR.
pugs_svnbot r20949 | diakopter++ | [yap6] updated STATUS,KUDOS,TODO,INSTALL,README 13:41
13:44 jfredett joined
pugs_svnbot r20950 | diakopter++ | [yap6] 13:54
r20950 | diakopter++ | * updated syntax error message to more closely match rakudo's
r20950 | diakopter++ | * renamed rule() pattern-parser combinator-constructor to pattern() since
r20950 | diakopter++ | it's not really a Perl 6 "rule" constructor; it can (eventually)
r20950 | diakopter++ | generate rules, regexes, tokens, roles, operators, etc.
r20951 | diakopter++ | [yap6] finish rule->pattern renaming
13:55 FurnaceBoy joined
diakopter to home& 13:58
14:03 Jedai left 14:05 smokemachine joined 14:41 Limbic_Region joined 14:48 Alias__ left 14:55 jan__ joined 15:38 pbuetow_ is now known as pbuetow 15:43 axarob joined 15:46 deq` joined 15:54 FurnaceBoy left 16:01 FurnaceBoy joined
moritz_ re 16:12
16:13 qu1j0t3 joined 16:21 qu1j0t3 is now known as FurnaceBoy_ 16:23 FurnaceBoy left, vixey joined
diakopter I just realized... 16:30
(while mowing the lawn actually)
that STD_hand doesn't need a concept of "fate" 16:31
16:31 r0bby left, ajson joined
pugs_svnbot r20952 | moritz++ | [spec] 16:31
r20952 | moritz++ | * unfudged quite some passing tests
r20952 | moritz++ | * fixed tests in root.t
r20952 | moritz++ | * fuzzed with fudging in assign.t
16:35 Agu10 joined
Agu10 buubot 16:35
buubot Agu10: is the module loaded? ' die "perlbot\n" ', die "perlbot\n"
Agu10 jseval: while(1){print("si\n");}
diakopter b/c each node in the parser/production tree can build its *prospective* ast on the way down by providing its "slots" for the resulting sub-matches to fill, and each sub-matcher can know which slot it will fill... so that when a stopper such as a BEGIN or an import or an eval is reached, every completed sub-ast (if there are any) can be evaluated/interpreted right then and there (at the end of each parser), and then it can pick up directly where it ... 16:37
... left off, no continuation needed.
that would also elegantly solve the notion of contexts 16:38
16:38 Agu10 left
diakopter waits for constructive/destructive criticism 16:40
pugs_svnbot r20953 | moritz++ | [spec] fixed roots.t which I broken in previous commit
moritz_ is too occupied, sorry (by writing a mail about his cool new tool to p6c) 16:41
pmichaud I'm busy trying to fix term parsing in rakudo. :-) 16:42
diakopter moritz_: how about a prefudge script - that fills in 'TODO' on all the tests for a given implemenation... :P
moritz_ diakopter: quite a nice addition
pmichaud: should I wait with more commits to the test suite until you're done? 16:43
diakopter moritz_: or even just all the unmarked tests for that implementation
moritz_: or even just the ones that fail :)
pmichaud moritz_: no need to wait with commits
I'm making very small incremental changes, and would prefer to know about problems as they occur.
moritz_ diakopter: identifying failed tests is hard if you have parse failures
diakopter moritz_: true 16:44
moritz_ diakopter: but it should be possible to write a script that does the right thing in about 60% of all times, and does no harm in the other cases
pmichaud also, not every failure is a "parse" failure. Sometimes they're just exceptions because the desired function doesn't exist.
moritz_ pmichaud: we should remove S29-num/roots.t and S29-str/sprintf from spectest_regression.data - they are fully skipped 16:46
pmichaud sprintf is no longer fully skipped, as of last night.
in fact, only one test is skipped.
moritz_ ok 16:47
then I'm no longer up-to-date ;)
pmichaud "'svn up' early and often!" :-)
moritz_ I was offline over the weekend :( 16:48
pugs_svnbot r20954 | moritz++ | [spec] more unfudged tests, autounfudge++
pmichaud ahhhh. :-)
moritz_ I'll backlog, but for the moment I was too occupied by pushing my own changes
16:50 funktio joined
pmichaud eek 16:51
moritz_: you unfudged the unicode tests.
those don't pass on systems w/o icu. 16:52
moritz_ pmichaud: oh, that's bad
pmichaud: I'll revert the changes
pmichaud thanks.
S29-num/roots.t is missing a close brace. 16:53
(in "if approx...")
moritz_ aye 16:54
pmichaud I'll remove it from spectest_regression for now, though.
16:55 cmarcelo joined 16:56 kanru left
pugs_svnbot r20955 | moritz++ | [spec] fixed roots.t, pmichaud++ 16:56
r20955 | moritz++ | also re-fudged unicode tests which fail on systems without ICU
moritz_ pmichaud: strictly speaken it's a bad idea to use fudge for system-dependant failures
pmichaud agreed -- I don't have a good answer to that one though.
other than to wait until Parrot requires ICU everywhere or works around it.
moritz_ pmichaud: it would be much nicer if we had a '$?HAS_UNICODE' variable for now for which we could check
pmichaud technically, Perl 6 _always_ HAS_UNICODE :-) 16:57
moritz_ yes
16:57 Jedai joined
pmichaud I'll probably prod folks at the next #parrotsketch to see if we can get an ETA on string handling improvements. 16:58
moritz_ but rakudo isn't full p6 yet :(
16:58 pmurias joined
pmichaud true, but I think the test suite shouldn't test for things that aren't Perl 6 16:58
16:59 hanekomu_ joined
moritz_ presumably, yes 16:59
pmichaud so, if rakudo isn't full p6, then those tests should be fudged. :-)
moritz_ for now I'll just skip unicode related fudge directives
16:59 pbuetow left, pbuetow joined
pmichaud at the moment the only unicode things that need fudging are those involving case conversion. I think most everything else I have workarounds in place for. 16:59
17:00 edpratomo joined
moritz_ ok 17:00
17:00 cmarcelo left 17:07 cmarcelo joined
pugs_svnbot r20956 | pmurias++ | [STD] fixed EXPR: "=>" parsers correctly, list operators generate correct match objects 17:07
Auzon moritz_: What's this autounfudge script?
pmichaud Auzon: also, I had a comment on unfudging tests -- if unfudging a block of tests or just a single test, there's no need to put the number 17:08
s/unfudging/fudging/
i.e., #?rakudo skip "reason" instead of #?rakudo 6 skip "?reason"
moritz_ Auzon: see my last mail to p6c
Auzon so it assumes either 1 or the upcoming block?
pmichaud yes.
that way we don't have to count them.
Auzon alright
pmichaud (or worry about a test being added or removed.) 17:09
moritz_ Auzon: something I hacked up during the weekend when being offline :)
Auzon Cool. :)
rakudo_svn r28649 | pmichaud++ | [rakudo]: 17:10
r28649 | pmichaud++ | * Remove roots.t from spectest_regression, since we
r28649 | pmichaud++ | don't implement 'roots' yet. (RT#56226)
pugs_svnbot r20957 | pmichaud++ | S29-num/roots.t: attach RT ticket number to skipped tests 17:13
17:13 explorer left 17:15 hanekomu left
pmurias @tell mncharity the => handling in STD turned out to be a bug, fixed it (in STD) 17:23
lambdabot Consider it noted.
pmurias wanders when the battery in his laptop will run out ;)
diakopter pmurias: hi 17:24
pmurias diakopter: hi
Auzon pmurias: sooner than you want it to
diakopter tries to think of a case in Perl 6 where, when expecting a block, there would be a ';' before the first '{' 17:25
pmichaud pmurias: could you explain r20956? 17:26
pmurias is uncomfortably crouched having connected having connected his laptop to a very short cable
Auzon diakopter: something like this perhaps? sub (Int $a; Int $b) {}
diakopter Auzon: oh; I forgot about those semilists. oh wel.
well, and also not inside balanced parens... 17:27
pmurias pmichaud: STD used to parse a=>1,b=>2 as a=>(1,b=>2)
because EXPR ignored the starting precedence 17:28
diakopter goes looking at Regexp::Common
pmichaud ...but EXPR takes a hash as an argument...? 17:29
pmurias pmichaud: it used to
Auzon can a pointy block contain a semilist?
pmichaud method EXPR ($preclim = $LOOSEST) 17:30
$LOOSEST is a hash
pmurias no
it's a string
now
pmichaud oh, I see.
pmurias it was %preclin
17:30 masak left
pmurias but gimme5 passed hashes as my %preclim = shift() which obviously dosn't work 17:31
pmichaud: the other fix was a bug with listops 17:32
pmichaud okay. I'll let you and TimToady work it out then. :-)
you mean in infix:sym<=> ? 17:33
pmurias pmichaud: not ,
s/not/no
the list of arguments was scalarified to it's length 17:34
pmichaud oh, you mean $op<list> = [@list]
pmurias pugs: my @foo = 1,2,3;say [@foo];
p6eval OUTPUT[1 2 3␤]
pmurias pmichaud: yes
pmichaud pugs: my @foo = 1,2,3; say @foo;
p6eval OUTPUT[123␤]
Auzon diakopter: I can't think of any other cases where a semicolon happens before the opening brace of a block.
pmurias pugs: my @foo = 1,2,3;$foo = @_;say $foo,[@foo]; 17:35
p6eval OUTPUT[*** ␤ Unexpected " ="␤ expecting "::"␤ Variable "$foo" requires predeclaration or explicit package name␤ at /tmp/tNbsWmIJ26 line 1, column 21␤]
diakopter Auzon: ok; thanks :) I'm adding a negatory shortcircuit at the beginning of the most costly parsers
pmichaud but $op<list> = @list; shouldn't scalarify @list to its length
pmurias pugs: my @foo = 1,2,3;my $foo = @foo;say $foo,[@foo];
p6eval OUTPUT[1 2 31 2 3␤]
diakopter Auzon: and block is pretty darn costly, b/c the preamble can vary so widely
pmurias pmichaud: it shouldn't, but it does
pmichaud in what runtime? 17:36
pmurias perl5 with source filtering
pmichaud ah. so it's a perl5-specific problem then.
okay.
pmurias gimme5 doesn't compile the perl6 code to perl5, it just applies some regexes 17:37
pmichaud right. perhaps that line should be marked with a "XXX" so that we know why the brackets are there.
pmurias pmichaud: not sure 17:39
pmichaud thanks for the explanations. (I don't necessarily agree with them, but I'll leave that for you and TimToady to resolve. :-)
17:40 Chillance joined
pmurias pmichaud: those thing used to be broken 17:41
rakudo_svn r28651 | pmichaud++ | [rakudo]: 17:42
r28651 | pmichaud++ | * STD.pm tracking: move typename parsing into <term>
pmichaud was it STD.pm that was broken, or gimme5?
pmurias the fixes might be slighlty objectable but not using a proper compiler forces you to code strangle
pmichaud: both 17:43
gimme5 is still broken
pmichaud anyway, as I said, I'll let you and TimToady work it out. :-)
pmurias pmichaud: althought not fully featured is a better way
pmichaud fwiw, Rakudo currently uses the same approach that you have now in STD.pm. I'm assuming that TimToady rejected that for some specific reason.
pmurias as it's not intended to be correct
fwiw = ? 17:44
pmichaud "for whatever it's worth"
pmurias thanks
pmichaud I think you should be able to get infix:<=> to work again if you use %item_assignment<prec> and %list_assignment<prec> as the arguments to EXPR 17:46
oh, never mind, it calls 'make' directly.
pmurias pmichaud: it's commented out as it was broken 17:47
pmichaud: i'll look at infix:<=> when i get my laptop in a more comfortable position 17:48
17:48 polettix left
pmichaud no biggie -- just was curious about it. 17:48
moritz_ pmurias: shouldn't you be sailing? ;-)
pmurias diakopter: surfing
pmichaud time for lunch here
pmurias diakopter: the wind isn't strong enough today 17:49
i need at lest force 4 winds to surf 17:50
s/surf/windsurf 17:51
diakopter that's sailing, of a sort
speaking of, these aeronautical engineers were telling me the other day that the Bernoulli (sp?) principle is merely a 'virtual' force/effect. 17:52
and that there's lots of controversy about how it really works.. 17:53
sorry [OT]
moritz_ physics is never a bad off-topic topic ;)
pmurias i should go to my room to do some coding 17:54
diakopter: if you have any elf question you can @tell me
diakopter ok 17:55
pmurias or just tell me while i'm still here
diakopter maybe it was some generated code that I was having trouble reading
pmurias don't read the generated code unless you're desperate
diakopter oh ok; :D that was probably my problem 17:56
pmurias or are debugging the code generated
* generator
the code generation needs to be minimalised at some point with reflection 17:57
diakopter pmurias: I refactored rule() and merged lrule into it and renamed it to pattern() - now it's pretty slick.
it can act as a Y combinator, or just a closure-closure generator
17:57 r0bby joined
pmurias diakopter: i'll look at it 17:58
17:58 pmurias left 18:03 Tene joined
pugs_svnbot r20958 | moritz++ | [spec] unfudged roots.t 18:07
18:12 simcop2387 left
pugs_svnbot r20959 | moritz++ | [spec] unfudge S29-str/comb.t (not implemented yet) 18:12
18:13 simcop2387 joined 18:14 smokemachine left 18:15 simcop2387 left 18:18 simcop2387 joined 18:22 Coleoid joined
Coleoid Hi--I'm trying to get parrot built on my win32 box, to build rakudo, 18:44
and I could use pointers to answers--or pointers to better places to ask. :D
pmichaud Coleoid: excellent!
Coleoid: have you looked at README.win32 in the parrot repo?
Coleoid Yeah, it's breaking during Configure.pl 18:45
On the 'Determining C compiler line'.
I think I've sporked GCC somehow.
I hunted for #parrot, didn't find it, so bounced here. Does this issue sound familiar? 18:46
moritz_ Coleoid: #parrot is on irc.perl.org
Coleoid Ah! Thanks, redirecting... :D 18:48
moritz_ 301 goto irc.perl.org instead ;) 18:49
Coleoid :) 18:50
moritz_ is there a good reason why token noun isn't prototype based in STD.pm? 18:54
mncharity diakopter: re "trouble reading elf reflects only on my lack of Perl skills", ah... well, if anything else comes to mind, feedback would be most welcome. 19:03
lambdabot mncharity: You have 1 new message. '/msg lambdabot @messages' to read it.
diakopter mncharity: pmurias and I decided that I was trying to read some generated code :D 19:04
Auzon elf: say 11 + 2 + 9 + 10 + 32 19:08
p6eval OUTPUT[64␤]
moritz_ (perl 6 as a calculator)++
mncharity pmichaud: re "(p6 written in p6) I sometimes wonder why rakudo doesn't count as a p6-written-in-p6 project. :-|", we had this conversation, didn't we? ;) if you take away the parts not written in p6, what's left? for rakudo, a grammar with actions. for pugs, a prelude. for kp6, everything(?) is still left but runtime and a utility file. for elf, a compiler. 19:09
Auzon It's the closest one I have, moritz_ :)
mncharity when the answer is "everything is left, but some optional backend specific optimizations", we'll have a p6 written in p6.
moritz_ Auzon: I wrote Math::Expression::Evaluator for a calculator in perl that doesn't use eval() 19:10
Auzon: of course that's been done before many times, but I still couldn't resist
it was a nice exercise in recdesc parsing
mncharity any alternate test would be "when you can build a non-kludged metacircular p6 interpreter stack", you've a p6 written in p6. 19:13
pmichaud I guess it depends on what one means by 'runtime'.
moritz_ now define "kludged" ;)
pmichaud If PCT were written in p6, would we then claim that rakudo is self-hosting?
moritz_ probably not, because PIR != P6 19:14
pmichaud I don't quite understand that.
diakopter Auzon: by prefacing pattern 'block' with the lookahead qr/^([^;]+(?:\(.*\))?\s+{)/smo , I cut the rule applications by 30% for an input string with a block, and by 40% for a long input string without a block 19:15
pmichaud anyway, I'll drop it for now.
I'm wondering how kp6 would run without a p5, though.
"drop everything that isn't p6"
diakopter pmichaud: but /usr/bin/perl will need p5 :p 19:16
moritz_ pmichaud: I think it's not only technical stuff. It's just that @people take a look at rakudo's source code, and see a lot of builtins in PIR, that could actually be written in Perl 6. Then @people say "it's not self-hosting"
pmichaud moritz_: I'm still eager to see builtins written in Perl 6
if someone wants to write a lazy list implementation in P6, I'll move a lot of hurdles to make it happen. 19:17
moritz_ pmichaud: me too. Lot's of stuff I'd like to implement, but don't atm because i'm too bad at PIR coding
pmichaud same thing for string ops.
diakopter: "/usr/bin/perl will need p5" -- so, we allow "p5" in our p6-on-p6 implementation, but nothing else? 19:18
I suppose there's a reasonable argument to make for that.
diakopter unless you want to reimplement p5 perfectly... ;) 19:19
pmichaud well, we will probably link p5 when it's needed.
diakopter right; exactly
pmichaud but using p5 to build a p6 compiler still feels a bit like cheating. :-)
(as far as "self-hosting" is concerned.)
moritz_ rakudo: say List ~~ Array
p6eval rakudo r28651 OUTPUT[0␤] 19:20
diakopter cheating in slow motion
moritz_ rakudo: say Array ~~ List
p6eval rakudo r28651 OUTPUT[1␤]
mncharity "physics is never a bad off-topic topic" ++ :) 19:23
pmurias: "the code generation needs to be minimalised at some point with reflection", probably mostly macros. 19:25
diakopter: re "read some generated code", :=) lol 19:26
moritz_: re 'now define "kludged"', no tunnels down the 19:27
stack. 19:28
pmichaud: re "I guess it depends on what one means by 'runtime'.", my fuzzy recollection is kp6 has a set of base prelude classes written in p5. I could be wrong. 19:29
pmichaud rakudo has a set of base classes written in pir. 19:30
mncharity v6/v6-KindaPerl6/src/KindaPerl6/Runtime/Perl5 Though the existence of v6/v6-KindaPerl6/src/KindaPerl6/Runtime/Perl6 suggests "take away that not written in p6" and you still have those. 19:31
moritz_ I think a different approach could be to ask "how much pain is it to implement a different backend?" 19:32
pmichaud mncharity: so, I could find substr() in .../Runtime/Perl6 ?
mncharity re "rakudo has a set of base classes written in pir.", yes, so "take away that not written in p6"... and the rakudo base classes are taken away. as not written in p6.
re "so, I could find substr() in .../Runtime/Perl6 ?", no, my fuzzy recollection is that's in the aforementioned kp6 utility file. 19:33
pmichaud how about Int? 19:34
is Int written in p6? 19:35
how about infix:<+> ? 19:36
mncharity moritz_: re 'a different approach could be to ask "how much pain is it to implement a different backend?"', indeed. and that's a principle practical concequence. the "take away that portion of the implementation not written in p6, and how much remains determines the degree to which the implementation is written in p6" test was engineered to be simpler and more direct. and avoid "but... why would anyone *want* a different b
moritz_ ...ackend 19:37
mncharity backend?" issues.
pmichaud It's one thing to say that KP6 is "written in p6", but I think that if we actually compare the parts of rakudo that aren't in p6 and the parts of kp6 that aren't in p6 there's a pretty close match. 19:38
mncharity lightning is taking out local poles, so I may vanish unexpectedly... 19:39
pmichaud no problem, I have to go as well -- wife needs me for a bit
bbl
19:40 kanru joined 19:42 hanekomu_ left
mncharity re int, picture an implementation tower, impl(2) on impl(1) on impl(0) stack. impl(0) will need a primitive int. Int need not be primitive, ie, could be written on int, but for this note, don't care. The key is, p6(1) must have both a p6 Int and p6 int (written using p6(0) Int, not p6(0) int (ie, no tunnels)). 19:45
impl(1) would be a p6 written in p6.
impl(0) would not entirely be. less so if Int was not p6. and by the portion of Int methods which were not. 19:46
as you've said yourself, rakudo is not currently, and currently cannot, have parts of the prelude written in p6. 19:48
pmichaud "currently cannot" is a bit strong. "does not" is more accurate. 19:49
still, that will change within the next two weeks.
mncharity ah, ok. shiny.
even more shiny.
pmichaud (It would've changed during the hackathon but I ran into a small glitch.)
19:50 Alias__ joined
mncharity do you have a feel for what the policy might be? ie, a pugs like "move everything possible into the p6 prelude" seems unlikely...? 19:51
pmichaud policy will be "move everything reasonable into the p6 prelude"
where "reasonable" == "because a PIR implementation won't be significantly faster"
i.e., if I can write a 7-line pir primitive that does the same as a 20+ p6 version of the same primitive (and does so much faster), we'll likely go with the PIR version. 19:52
*20+ line
diakopter tries to imagine any golfed p6 primitive longer than 5 lines 19:53
pmichaud well, if we want to aim for p6 golf in the prelude -- I think we're going in the wrong direction. :-)
diakopter all the builtins in 5KB... 19:54
mncharity it might be nice if the p6 version gets written too... it could serve as a reference, the parrot compiler or jit might improve, ... (any other reasons?)
pmichaud oh sure, I'd like to see p6 versions of everything be written 19:55
but I don't think we should require compilers to use those if there are optimizations available
pugs_svnbot r20960 | diakopter++ | [yap6]
r20960 | diakopter++ | * added repeat/while shapes to STD_hand
pmichaud just as long as they're semantically equivalent.
I certainly don't plan to write all of the builtins in PIR
mncharity re "but I don't think we should require compilers to use those if there are optimizations available", oh, goodness gracious not.
pmichaud just the "primitive" or "frequently used" ones.
mncharity re "oh sure, I'd like to see p6 versions of everything be written", awesome. I'm sorry I didn't realize that. Any thoughts on logistics? 19:57
a prelude/ directory somewhere?
pmichaud that would be excellent, yes.
we'll undoubtedly be using one in Rakudo
eventually I expect that many of the *.pir files will become *.pm files
that's always been my plan -- but we have to get sufficient object/method support in place first to be able to do that. 19:58
I'm still looking at ways to be able to embed PIR within p6 (but that requires heredoc-ish support, which isn't trivial.)
then nearly all of rakudo's builtins would be "p6" -- just some would have some embedded PIR for optimization purposes. 19:59
mncharity *happy nod*
pmichaud but it's hard to do things like "class Int is Any is Parrot::Integer { ... }" before we're even able to do things like "class" and "is" :-) 20:00
pugs_svnbot r20961 | diakopter++ | [yap6]
r20961 | diakopter++ | * added conditional result binding to repeat
diakopter TimToady: as with for @x -> $a, $b, can the repeat/while binding go to multiple result vars? 20:01
(spec doesn't say, but I assume so) 20:02
mncharity example? 20:03
diakopter I guess I was imagining a condition that returned two items... or can that not happen anymore
or can a full-blown capture go there...
mncharity ? 20:04
diakopter never mind
mncharity pmichaud: I wonder if "write a p6 prelude in p6... even if it can't be run anywhere yet" project might attract developer effort? 20:06
pmichaud mncharity: that hasn't been my experience. People aren't usually interested in writing code for code's sake before it can actually be run. 20:07
but I'd be very happy to see one started.
and in a couple of weeks rakudo may even be a good platform for testing/building such.
mncharity might contribute to spec shakedown in a similar way to what implementations provide. re 'before can be run', yeah. :/
pmichaud moritz_: you removed the fudge markers from S29-num/roots.t ? 20:13
mncharity attempting to write p6 prelude for pugs tended to bogged down in pugsbugs, mostly oo I fuzzily recall. there seems little interest in writing elf prelude, perhaps because of the limited working vocabulary and implementation gaps. so... rakudo may indeed avoid past causes of people not being interested in writing prelude. 20:14
pmichaud in rakudo's case I think we're focusing on getting the oo mostly correct before we try to p6-ify things. 20:16
moritz_ pmichaud: yes. They are useless for an all-fudged file
pmichaud moritz_: well, except that they told me *why* the tests wouldn't run.
moritz_ pmichaud: they just make it harder to detect when the tests are passing for real
mncharity is there any reason one couldn't create a MorePrelude.pm now, and run rakudo against t/ with a magically inserted "use MorePrelude;" at top? 20:17
moritz_ pmichaud: that's what you've got an RT for :)
pmichaud i.e., if I had S29-num/roots.t in a localtest.data file, then the skip messages would tell me why they were being skipped. Same for 'make spectest'.
20:18 ajson left
pmichaud mncharity: no reason that couldn't happen now, no, other than 'use MorePrelude;' is currently a bit slow. 20:18
What I was working on last weekend was precompiling preludes.
mncharity yay
pmichaud moritz_: also, perhaps we should be doing #?rakudo try "..." instead of #?rakudo skip "..." ? That would tell us when things start to succeed, I think. 20:19
(or could be made to tell us when things start to succeed.)
mncharity any idea roughly how much of t/ currently parses?
moritz_ pmichaud: in principle, yes. But IMHO it's just silly to fudge a test file for a builtin that isn't implemented yet
pmichaud moritz_: fair enough -- I'm not going to argue strongly for it. :-) 20:20
I don't have any idea, no. Perhaps we should have a test that can run rakudo with -c
(I don't have any idea how much of t/ parses.)
20:21 bacek left
mncharity tnx. a test could be neat. 20:21
hmm... but t/ isn' 20:22
t strictly necessary to achieve 'it can actually be run'... hmm... 20:23
20:31 Gothmog_ left, Gothmog_ joined
pmichaud moritz_/Auzon: in S29-num/rand.t, should we remove the for 1..10 loop that makes the invalid calls to rand(10) ? 20:32
(rand is listed as a named 0-ary in S29 and in STD.pm)
20:32 buubot left 20:33 buubot joined
mncharity rakudo: subset KeyExtractor of Code where { .sig === :(Any --> Any) }; 20:33
moritz_ pmichaud: looking
p6eval rakudo r28651 OUTPUT[No result object␤current instr.: 'parrot;Perl6;Grammar;Actions;expect_term' pc 116958 (src/gen_actions.pir:9358)␤
pmichaud I don't think rakudo does sigs yet. 20:34
but jonathan++ will probably have it working soon. :-)
mncharity ok, thanks. lol :)
pmichaud for sigs we may be waiting on getting mmd fixed in parrot.
moritz_ mncharity: produce some output in your test - now it tries to print ($your_type).perl
20:35 JoshuaTree joined
mncharity rakudo: subset KeyExtractor of Code where { .sig === :(Any --> Any) }; say 3; 20:35
p6eval rakudo r28651 OUTPUT[No result object␤current instr.: 'parrot;Perl6;Grammar;Actions;expect_term' pc 116958 (src/gen_actions.pir:9358)␤
pmichaud "No result object" indicates a compile failure here.
moritz_ oh, I didn't know that
pmichaud it doesn't recognize something as a term. Actually, rakudo doesn't handle ".sig" yet.
moritz_ mncharity: re rand(10), yes remove them
pmichaud because that's waiting on the $_ fixes, which I'm working on right this moment. :-)
s/mncharity/pmichaud/ # thanks. 20:36
moritz_ uhm, yes ;)
mncharity :)
20:36 bacek joined
moritz_ pmichaud: maybe we should add some very basic tests for non-zero entropy, for example that the returned value isn't always the same 20:36
int rand { return 4; /* determined by fair dice roll */ } 20:37
Tene xkcd++
moritz_ indeed
mncharity rakudo: our Int multi method pushx ( @array: *@values ) is export {}; say 3; 20:40
p6eval rakudo r28651 OUTPUT[Statement not terminated properly at line 1, near "multi meth"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
mncharity rakudo: multi method pushx ( @array: *@values ) is export {}; say 3; 20:41
rakudo: multi method pushx ( @array: *@values ) is export {}; say 3;
p6eval rakudo r28651 OUTPUT[3␤]
mncharity rakudo: multi method pushx ( @array: *@values --> Int) is export {}; say 3; 20:42
p6eval rakudo r28651 OUTPUT[no ICU lib loaded␤current instr.: 'parrot;PGE::Match;ident' pc 2145 (compilers/pge/PGE/Regex.pir:49)␤
pmichaud ...no ICU? wonder where that came from!
mncharity rakudo: multi method pushx ( @array: *@values ) returns Int is export {}; say 3;
p6eval rakudo r28651 OUTPUT[no ICU lib loaded␤current instr.: 'parrot;PGE::Match;ident' pc 2145 (compilers/pge/PGE/Regex.pir:49)␤
pmichaud thats.... weird.
mncharity :)
pmichaud is there a unicode char in there I'm not seeing?
moritz_ pmichaud: probably a BOM in mncharity's paste
mncharity oh, sigh.
gaim-- 20:43
pmichaud I suspect I could get rakudo to ignore BOMs
moritz_ and I'll install icu on the server
... just in case ;)
pmichaud icu on server would be very good.
mncharity rakudo: multi method pushx ( @array: *@values --> Int) is export {}; say 3;
p6eval rakudo r28651 OUTPUT[Statement not terminated properly at line 1, near ": *@values"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
pmichaud that way we can test unicode stuff through p6eval, even if we can't do them in spectests yet.
I'm not sure we parse --> yet, either. 20:44
mncharity rakudo: multi method pushx ( @array: *@values ) returns Int is export {}; say 3;
p6eval rakudo r28651 OUTPUT[3␤]
pmichaud anything dealing with objects, methods, and signatures I'm leaving to jonathan++ for now :-)
moritz_ pmichaud: is it considered safe (ie not introducing any bugs) to use ccache for compiling parrot?
pmichaud (well, I do a lot of the object stuff, but roles are definitely his :-)
moritz_: I use ccache
I've only had one very odd problem occur (which nobody has been able to reproduce) 20:45
moritz_ ok, rebuilding parrot on p6eval's server 20:47
20:47 Alias_ joined
pugs_svnbot r20962 | diakopter++ | [yap6] 20:47
r20962 | diakopter++ | * added loop/for (incl optional for bindings)
r20962 | diakopter++ | * demonstrated the use of combinators with optional parameters
20:47 Alias__ left
rakudo_svn r28652 | pmichaud++ | [rakudo]: 20:47
r28652 | pmichaud++ | * STD.pm tracking -- bring us back into better alignment with STD.pm
r28652 | pmichaud++ | * can now parse named 0-ary ops
r28652 | pmichaud++ | * pi() works
r28652 | pmichaud++ | * eliminated outdated <listop> rule and action
moritz_ pmichaud: are you removing the bogus rand tests, or should I? 20:48
pmichaud I'll do it here in a bit -- wanted to get my other big changes committed first.
Or you can -- up to you. 20:49
diakopter yap6 does roughly 1200 rule applications/second, fyi
and it's taking about 100 rule applications per character :)
moritz_ that's quite much 20:50
diakopter sloooow (until we can add lots more regex qualifiers)
moritz_ (the rules per char value at least)
diakopter no sorry; 50 per char 20:51
pugs_svnbot r20963 | pmichaud++ | S29-num/rand.t: Remove out-of-spec calls to rand(10). 20:53
diakopter so, about 1/90 the speed of STD5 20:55
Auzon What's the replacement of rand($number) in Perl 6 then? Or are we just supposed to do rand() * $number? 20:57
pmichaud $number.rand() works
as does 1..6.pick() 20:58
or even (^6).pick
21:02 araujo joined
mncharity if Num is a role (S29), does that mean num is the only way to get a non-Int non-Complex Num? (aka a NV?) 21:04
21:04 araujo left, araujo joined
mncharity (hmm, though nothing (S29/S02) seems to actually say Complex does Num ) 21:05
diakopter help someone... perlcabal.org/syn/S04.html#line_990 21:06
lambdabot Title: S04
pmichaud (Num as role) I think that may have changed recently
diakopter ^ I have no idea what those are supposed to mean/do. 21:07
21:09 _Chillance_ joined
diakopter does it push the closure onto the specified phase's queue, while also declaring the variable and also sending the variable into that closure as the topic? 21:09
mncharity I read it as my $r will start { .set_random_seed() }; ==> my $r; START { $r.set_random_seed() }; 21:11
diakopter alright; that's what I thought.
pmichaud (Num as role) -- might be affected by the bottom of groups.google.com/group/perl.perl6....bb16b998cf 21:12
lambdabot Title: fallback semantics of list methods - perl.perl6.compiler | Google Groups, tinyurl.com/6992hy
mncharity looking...
pmichaud starting with "But what Patrick and I decided..." 21:13
(although Larry actually decided, I just said "Great!" :-)
mncharity :) 21:17
21:17 FurnaceBoy_ left
mncharity that reminds me of the other obstacle(s) encountered writing p6 preludes... things un-or-nonobviously spec'ed, and spec drift. so writing prelude too much resembles a detective story, and unless the work is getting significant use, there's a feeling of "why not simply wait, and thus skip over some spec changes". though... 21:21
my impression is that mostly applies to signatures, not bodies. so perhaps infrastructure could be set up to allow the latter to be written, even while the former is still in flux.
21:22 axarob left 21:26 Chillance left
mncharity so the potential task would not be "grovel by hand over S29, extracting signatures (and code)", but rather "create a tool which extracts signatures (and code) from S29". and then perhaps "given an extraction and a set of method definitions, merge in the current signatures". 21:26
the later would also provide a place to apply "tweak for rakudo" modifications. 21:27
21:29 bacek left
diakopter 'will $phase' is an operator of sorts 21:31
right assoc, chaining 21:33
mncharity pmichaud: re "might be affected by the bottom of", I'm afraid I'm not seeing it. but no biggie. it's just a question I seem to hit every time over they years that I'm again here at "assess writing a p6 prelude". was just wondering if there was now a story.
diakopter: re will, STD.pm considers it trait_auxiliary:will , a trait, with <trait>* appearing more or less where anything is defined (pkg, type, var, param, routine,...) 21:36
diakopter note to self: b/c every parser knows its own name as well as the names of its components, a tree of those names can be constructed/versioned so that names of parse-time and eval-time handlers can be auto-found (instead of being recorded twice). 21:37
mncharity: ok 21:38
p.s. every parser also knows its coderef's memaddress 21:40
mncharity though it's an interesting question to what degree STD might be eventually refactored... especially if restrictions are relaxed, eg, permitting more lookaround.
but... post-Xmas. 21:41
diakopter it can look ahead and behind... but can it look *out* ? ;)
mncharity self-modifying adaptive DWIThinkYouWant grammars? eep. 21:42
21:44 explorer joined
mncharity re out, hmm... though... if you have strings with history, the history would be another dimension, and it might actually be interesting to say "the text for which a previous version matched <foo>". eg, with macros. "that which was a for() before it was massaged into a while()". not clear how to deal with text becoming fragmented ans spread, but perhaps Match text ranges could be sets... 21:47
21:50 edpratomo left
pugs_svnbot r20964 | diakopter++ | [yap6] 21:50
r20964 | diakopter++ | * added 'will $phase' auxiliary traits
diakopter mncharity: you mean like introspecting compiler optimizations
... doesn't constant_fold ... 21:51
21:54 jjore left, pbuetow left
mncharity well, for macros, or just in general, it can be nice with "ab"~"cd" ~~ s/bc/e/ yielding "aed", for that "aed" to remember "my a came from the first char of "ab", my "e" from the subst...". for p6 string macros, permits better error messages. for any kind of template/generative text creation, permits easy navigation back from results to sources. 21:54
diakopter interesting 21:55
moritz_ mncharity: that's why perl 6 makes it so easy to implement your own string type that can be overloaded like that
diakopter "is versioned"
mncharity p5 too. but a bit slow.
moritz_ mncharity: in the general case the overhead might be too large to make it a default feature 21:56
mncharity of Str?, certainly.
21:56 bacek joined
bacek perl6: sqrt(1i) 21:57
p6eval kp6 r20964: OUTPUT[syntax error at position 4, line 1 column 4:␤sqrt(1i␤ ^ HERE␤]
..pugs: RESULT[0.7071067811865476 + 0.7071067811865475i]
..rakudo r28652: RESULT[1]
..elf r20964: OUTPUT[Undefined subroutine &GLOBAL::sqrt called at (eval 117) line 3.␤ at ./elf_f line 3854␤]
mncharity briefly pictures compile-time partial evaluation games... but they tend not to get very far.
anyway, just musing that "look *out*" might perhaps actually have interesting meanings... 21:59
bacek perl6: exp(1i)
p6eval kp6 r20964: OUTPUT[syntax error at position 3, line 1 column 3:␤exp(1i␤ ^ HERE␤]
..pugs: RESULT[0.5403023058681398 + 0.8414709848078965i]
..rakudo r28652: RESULT[2.71828]
..elf r20964: OUTPUT[Undefined subroutine &GLOBAL::exp called at (eval 117) line 3.␤ at ./elf_f line 3854␤]
moritz_ rakudo: say exp(0+1i) 22:01
p6eval rakudo r28652 OUTPUT[2.71828␤]
mncharity pugs: say 1i.real 22:02
p6eval OUTPUT[0 + 1i␤*** No such method in class Bool: "&real"␤ at /tmp/t7laa4zSmO line 1, column 1 - line 2, column 1␤]
mncharity pugs: say 1i.real
p6eval OUTPUT[0 + 1i␤*** No such method in class Bool: "&real"␤ at /tmp/Q5adEHhg6q line 1, column 1 - line 2, column 1␤]
mncharity rakudo: 1i.real
p6eval rakudo r28652 OUTPUT[Statement not terminated properly at line 1, near ".real"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
mncharity rakudo: say 1i.real
p6eval rakudo r28652 OUTPUT[Statement not terminated properly at line 1, near ".real"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
mncharity pugs: say 1i.imag; 22:03
p6eval OUTPUT[0 + 1i␤*** No such method in class Bool: "&imag"␤ at /tmp/3nnFa700TG line 1, column 1-12␤]
mncharity re prelude, eg, no real or imaginary accessors seem to be defined.
makes writing a Complex class... speculative. 22:04
rakudo_svn r28653 | pmichaud++ | [rakudo]: 22:05
r28653 | pmichaud++ | * "rand" is really term:rand, not prefix:rand .
r28653 | pmichaud++ | * Move rand() methods to Any.
r28653 | pmichaud++ | * Add srand().
moritz_ mncharity: in principle you *can* work with .abs and .polar
mncharity: but it would be really nice to have .real and .imag or something anyway 22:06
mncharity which is one role an attempt a formal language spec could take. one with colorized text. so a complete Complex api gets written... and its just all colored "pink" or whatever, to flag all the parts which a re not spec. thus making those "gaps" clear.
22:07 iblechbot left
bacek perl6: say abs(1i) 22:07
p6eval kp6 r20964: OUTPUT[syntax error at position 7, line 1 column 7:␤say abs(1i␤ ^ HERE␤]
..pugs: OUTPUT[1 + 0i␤]
..rakudo r28652: OUTPUT[1␤]
..elf r20964: OUTPUT[Undefined subroutine &GLOBAL::abs called at (eval 119) line 3.␤ at ./elf_f line 3854␤]
diakopter if '.' is overloaded, does .= magically just work? 22:08
Auzon if the new version 'is deep' and I understand correctly, yes
moritz_ diakopter: in p5 or in p6? 22:09
diakopter oh sorry, I meant Perl 5 :d
bacek perl6: say exp(1i) ~ ' ' exp(-1i) ~ ' ' ~ exp(1i) * exp(-1i)
p6eval kp6 r20964: OUTPUT[syntax error at position 7, line 1 column 7:␤say exp(1i) ~ ' ' exp(-1i) ~ ' ' ~ exp(1i) * exp(-1i␤ ^ HERE␤]
..pugs: OUTPUT[*** ␤ Unexpected "exp"␤ expecting operator, ":" or ","␤ at /tmp/2H7whRVDrT line 1, column 19␤]
..rakudo r28653: OUTPUT[Statement not terminated properly at line 1, near "exp(-1i) ~"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20964: OUTPUT[Parse error in: /tmp/HPAnTV1BBp␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say exp(1i) ~ ' ' exp(-1i) ~ '␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:98:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_r...
moritz_ diakopter: there's the "fallback" thing described in 'perldoc overload'
bacek perl6: say exp(1i) ~ ' ' ~ exp(-1i) ~ ' ' ~ exp(1i) * exp(-1i)
p6eval kp6 r20964: OUTPUT[syntax error at position 7, line 1 column 7:␤say exp(1i) ~ ' ' ~ exp(-1i) ~ ' ' ~ exp(1i) * exp(-1i␤ ^ HERE␤] 22:10
..pugs: OUTPUT[0.5403023058681398 + 0.8414709848078965i 0.5403023058681398 + -0.8414709848078965i 1 + 0i␤]
..rakudo r28653: OUTPUT[2.71828 0.367879 1␤]
..elf r20964: OUTPUT[Undefined subroutine &GLOBAL::exp called at (eval 131) line 3.␤ at ./elf_f line 3854␤]
diakopter decreases the font size and enlarges the window
mncharity convince PerlNet's wikimedia to turn on templates, define a few, eg {spec S29#lineNNN}...{end} {speculative}...{end} (or something terser)... {Idunno}...{end} and start writing the section fully defining Complex, and rather than stopping when gaps are hit, or investing lots in researching uncertainties, just pour in tagged "best minimal-effort guess", and let the colors guide further refinement.
at least then there would be a default definition of Complex people could use, even if it then changed. rather than everyone doing their own cannon analysis. or, for most "random people interested in p6", simply punting. 22:12
22:12 BinGOs left
moritz_ sounds roughly like a task for me 22:14
22:14 meppl joined
moritz_ I'm not sure if I'll grok the wikimedia stuff, but writing a Complex API + prototype class for Prelude ... that could work 22:14
22:15 jjore joined, jjore is now known as zz_jjore, zz_jjore is now known as jjore
mncharity wikimedia just provides a setting where: code could be colored, discussion could be associated, and anyone could easily add questions, comments, etc. 22:16
pugs_svnbot r20965 | moritz++ | [spec] 22:17
r20965 | moritz++ | * moved simple tests from assign.t to assign-is-not-binding.t
r20965 | moritz++ | * added test for assignment regression reported by Frederik Schwarzer
mncharity colored because in a Complex class def, some parts will be Snn spec, some "implied by p6l, but non-spec", some speculative, and perhaps even some "explicitly non-spec but exist for some reason".
22:17 BinGOs_ joined
pugs_svnbot r20966 | moritz++ | [spec] fixed svn props for assign-is-not-binding.t 22:17
mncharity in just a raw .pm file, it's hard to differentiate those,without a lot of comment clutter.
diakopter you know what 22:19
moritz_ mncharity: I understand the reasons, I just don't know if I'll be able to convince wikimedia to do that for me ;)
mncharity oooo, ah. 22:20
*ooooh
it's an amazing disaster of a language. but as long as you don't try to have any software abstraction, very kiss, no functions calling other functions, it's... usable. 22:21
22:23 Alias_ left
mncharity I'd be quite happy to create templates. 22:23
I just didn't want to ask PerlNet to turn on templating, in the absence of anyone else caring about the exercise. 22:24
22:25 aindilis joined
moritz_ is certainly interested. Just don't know if a wiki is so good for sharing code 22:25
and tearing code and specs apart seems foolish for that sort of stuff
mncharity re good for sharing code, isn't. but my impression is, for writing a prelude, the current challenge is more "write code as spec" then write code. which implies discussion, alternate versions, etc. so more needs analysis, design and documentation, then just programming. 22:27
re "tearing code and specs apart seems foolish for that sort of stuff", I don't understand? 22:28
moritz_ I meant if I'd put the code in an svn repo and the specs in a wiki
but you're right, it's the interface that matters 22:29
anyway, self.sleep(8*3600) ;-)
mncharity good night :)
moritz_ if you have more good ideas, I'll backlog
thanks
mncharity I guess my motivation is past attempts at writing prelude quickly hit "it's unclear what this should be", "I can think of several ways to do this, with no good way to choose between them". so a setting is needed where one can note the uncertainty but proceed, and show one or more ways and discuss the choice. something like "rationale" annotated language specs. so you can do lots of work, without leaving 22:32
a trail of "I've committed to X, for lots of X, which I'm sure are going to turn out to be the wrong thing... so I seem to merely be accumulating a pile of brokenness, one rigid point in a design space which it's completely clear we will need to jiggle and wander around in before xmas occurs". 22:34
which is what seems to happen when one goes straight to .pm code. 22:35
22:35 wknight8111 joined 22:40 apeiron left
mncharity the/an alternative is just to add t/ tests, and tag them as speculative. :) 22:41
diakopter likes that idea
mncharity can add mutually incompatible set's of tests... 22:44
with discussion as comments...
and tell people to read the .t files as documentation... 22:45
... eep.
It would be nice if p6 ended up with more a formal language manual than p5 has. A wiki could be a place to start that. 22:46
diakopter mncharity: you've seen Dlugosz' manual? 22:49
mncharity rakudo: multi infix:<tt>(Int $a, Str $b){4}; say 3;
p6eval rakudo r28653 OUTPUT[Statement not terminated properly at line 1, near ":<tt>(Int "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
22:50 polettix joined
mncharity re Dlugosz, no, looking... 22:50
diakopter !!
*lots* of words. I read all of it a few weeks ago.
where 'read' means 'skimmed' 22:51
mncharity still searching... link?
diakopter www.dlugosz.com/Perl6/ 22:53
lambdabot Title: Perl 6
diakopter re: techspec title page, "A Comedy of Errors" - I can't tell if he means the language or the document :) 22:54
text in red is verbatim Snn 22:55
22:56 meppel-san joined
diakopter btw, there's a good deal of speculation/supposition going on in there, where he asserts certain things over/above the spec 22:58
mncharity diakopter: very very interesting, my thanks for the pointer. 22:59
yes, that's basically what I had in mind, modulo community wiki vs private doc. and the wiki-ish ability to partition "what should we say about X?" discussion from "said about X". 23:00
diakopter he says it's in .odt so as to enable line-based versioning/diffing
I think 23:01
I am kindof curious if anyone else on p6l has read it...
apparently he wrote some official spec(s) for some ratification of C++ (and others?) 23:02
mncharity re versioning/diffing... yeah, but... that's very different than a wiki social model. dropping the .odt in the pugs repo would be closer, but still very not. 23:03
diakopter yeah
23:04 Eevee left
diakopter I learned/thought a lot about what a type-checker would have to do from reading the polym doc... that's not to say I've thought about it anywhere close to 1% of the necessary total.... 23:04
23:05 Jedai left
diakopter refers to www.dcs.shef.ac.uk/~ajhs/classify/index.html 23:06
lambdabot Title: The Theory of Classification
mncharity perhaps the difference boils down to "document as focus" with process external, versus "process is focus" and document is external. but if we were at the point of being able to write a full doc... the Snn would be a lot bigger :) 23:07
s/document is external/document is external
erg, s/document is external/document is emergent/
23:08 Jamtech joined
mncharity there's an idea, that things like type analysis could start being shaken out on the wiki? then again, not great for code. and once we have a more working p6 impl, running code would probably be the best way to describe such. so perhaps not. 23:09
diakopter :)
so, if you want to read all 20 parts of The Theory of Classification... from that url above.... ;) 23:10
23:12 meppl left 23:16 meppel-san left
mncharity not sure what to make of ToC. from their (the couple I looked at) citation lists... not clear others do either. but curious 23:20
pugs_svnbot r20967 | diakopter++ | [yap6]
23:20 Jamtech left
mncharity *cited by's 23:20
23:24 apeiron joined
mncharity maybe once rakudo can do significant bits of prelude in p6, and STD is parsing most of t/, and perhaps oo is slightly less fuzzy (eg, arguments about what .WHAT is are done), we can tempt people to a "new" combined mostly-writing-in-p6 project. 23:30
the language is so big, having low order 100 people active again would be nice. 23:31
g'night all & 23:32
23:32 mncharity left 23:48 alester joined 23:59 bacek_ joined