Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-06-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

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

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

Perl 6 | Reference Documentation | Rakudo