Camelia, the Perl 6 bug

IRC log for #perl6, 2008-03-08

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:06 ludan joined #perl6
00:24 ikeda joined #perl6
00:32 alester_ joined #perl6
00:40 jeffreykegler joined #perl6
00:47 Limbic_Region joined #perl6
00:48 literal joined #perl6
01:05 ikeda joined #perl6
01:11 Alias_ joined #perl6
01:27 justatheory joined #perl6
01:32 mncharity joined #perl6
01:35 BinGOs joined #perl6
01:42 BinGOs joined #perl6
01:58 BinGOs joined #perl6
02:05 BinGOs joined #perl6
02:10 mncharity @tell ruoso My suggestion is to modify the say .frame to a new say .debug, strip the "$frame = q:sm0p {...}" input into something smaller (like no <nodes>), get it working, and then incrementally expand the input and debug rule until it's real and working.  But perhaps
02:10 lambdabot Consider it noted.
02:12 mncharity kp6 has a trace tool?  I thought I saw something go by in a blog once?  If so, you could try that.  Otherwise, it's the usual, make it simple, make it work, and then ramp up the complexity, keeping it working.  Debugging backwards from failure, without tools, can be hard.
02:14 mncharity putting a Data::Dumper at the end of KP6sm0p.pl, instead of the say, gives you a tree... but it's quite large, and I'm unclear on how to interpret it (or whether that would reveal anything useful).
02:16 mncharity If it remains a problem, let me know, and I can take another pass at it.  But my approach would likely be as above.
02:16 mncharity Hmm, though the other thing todo is to take the input, and mentally run it against the grammar, looking for typos or mistakes in the grammar.
02:17 pasteling "mncharity" at 76.24.29.201 pasted "The failing input" (5 lines, 102B) at http://sial.org/pbot/30469
02:17 mncharity The grammar: http://dev.pugscode.org/browser/v​6/smop/sm0p/KP6sm0p.p6?rev=20083   frame is invoked by main at bottom.
02:18 lambdabot Title: /v6/smop/sm0p/KP6sm0p.p6 - Pugs - Trac
02:18 mncharity The resulting p5: http://dev.pugscode.org/brow​ser/v6/smop/sm0p/KP6sm0p.pl
02:18 lambdabot Title: /v6/smop/sm0p/KP6sm0p.pl - Pugs - Trac
02:21 mncharity The Makefile http://dev.pugscode.org/browser/v​6/smop/src/Makefile.am?rev=20083 drives http://dev.pugscode.org/brows​er/v6/smop/sm0p.pl?rev=20087 against http://dev.pugscode.org/browser/v6/smop​/test/11_lowlevel_scalar.sm0p?rev=20083 .
02:22 lambdabot Title: /v6/smop/src/Makefile.am - Pugs - Trac
02:22 mncharity You can test by  cat the_input | perl -I ./../v6-KindaPerl6/compiled/perl5-kp6-mp6/lib ./sm0p/KP6sm0p.pl while in v6/smop/ .
02:31 ikeda joined #perl6
02:36 mncharity Looking more at t/spec/, it seems it's really not design to be used for interpreter implementation.  Well, at least based on a tiny number of samples.  The rest of t/ may be better for that.  Eg, t/spec/S29-array/splice.t requires 'array interpolation into strings' to be working.  Which is fine for a Perl 6 spec.  But not so great for implementation.
02:36 mncharity pugs t/ tried to avoid, at least sometimes, having tests break because something unrelated wasn't working.
02:37 mncharity so pugs t/ might be better than t/spec for running against rakudo et al.
02:42 eternaleye_ joined #perl6
02:52 wknight-away joined #perl6
03:03 TimToady mncharity: there is no canonical order of implementation.  t/spec is ordered by synopsis, which will tend to reduce forward refs
03:03 TimToady however S29 is a bad example of that...
03:03 TimToady it would be almost the last thing tested
03:03 TimToady and array interpolation should probably be in about S02
03:05 TimToady and t/spec is still rudimentary because we've only just begun moving tests from random t directories into t/spec, and fudgifying as we go, which does much more to reduce implementation dependencies than trying to guess who does what yet...
03:08 TimToady and putting on my language designer hat, I have little motive for making it easy for people to implement half the spec.  :)
03:09 TimToady I can see the argument for the other side, but I don't think it warrants a lot of extra mechanism just to get all the green bars before all the red bars
03:45 mncharity TimToady: oh, no, I don't disagree with t/spec being all-out p6.  I just realized, trying to run redsix against it, that my running rakudo against it yesterday and finding lots of failures, should not have been at all surprising.
03:46 mncharity Arguably t/spec is better off with the property of everything needs to be working just right before you see tests pass. :)  I was always surprised how much of the pugs t/ suite would pass, even on a runtime which you knew had very little implemented.
03:50 mncharity My comment was intended more as, "apropos rakudo failing tests, and people perhaps spending time examining and changing that, the t/spec test failures may not have been as interesting as I assumed when I reported them.  the kp6 and 't/ other than t/spec/' might, perhaps (I've little more then annecdotal data), be more helpful".
03:50 mncharity or some such
03:51 mncharity :)
04:13 cmarcelo joined #perl6
04:15 ikeda joined #perl6
04:18 ikeda joined #perl6
04:20 RayMagini joined #perl6
04:28 Alias_ joined #perl6
04:32 pugs_svnbot r20088 | putter++ | [redsix] Add ast dumping in various formats.
04:32 pugs_svnbot diff: http://dev.pugscode.org/changeset/20088
04:32 lambdabot Title: Changeset 20088 - Pugs - Trac
04:33 mncharity And what some of them suggest about the quality of the redsix parse trees... doesn't give me warm fuzzies. :/
04:36 ikeda joined #perl6
04:37 mncharity () evaluate quality of redsix parses; () help TT make progress on STD; () me push STD?; () combine STD_red with redsix's OPP; () look to rakudo ast dumps; ()...?
04:39 mncharity s/quality/quality and usability/;  part of the problem is misparses, and part being currently too tied to the implementation.
04:40 mncharity TimToady: re STD.pm, I've been unclear on STD.pm project status for a couple of days.  If there is anything I can do to help, make the work more interesting, whatever, please do let me know.
04:41 ikeda joined #perl6
04:46 mncharity The rakudo ast is rather more correct for my few oo decl spot checks.
04:47 mncharity + () write a scraper for the --target-parse dump format.
04:53 FurnaceBoy joined #perl6
04:54 mncharity get a feel for why rakudo is parse failing on kp6; check --target=parse against other random p6 which resembles intended use (simple oo).  if/when ok,  (--target=parse -> scraper | --target=parse-yaml) -> write ast_rakudo support -> emit bare p5 -> demo project.
04:57 mncharity if there is a body of p6 somewhere which rakudo parses, it might be easier to derive the schema from it's combined parse trees, rather than pulling it from a grammar?
04:57 mncharity end of day.  good night all &
05:31 meppl good night
06:04 kst` joined #perl6
06:16 Alias_ joined #perl6
06:17 ikeda joined #perl6
06:25 bockmabe joined #perl6
06:27 wknight-away joined #perl6
06:28 devogon joined #perl6
06:31 dmq joined #perl6
07:38 Aankhen`` joined #perl6
07:39 BinGOs joined #perl6
07:58 meppl joined #perl6
07:59 kanru joined #perl6
08:39 meppl joined #perl6
08:48 pmurias joined #perl6
08:49 pmurias @tell mncharity there was a tracer for PCR: http://pugs.blogs.com/pugs/2​007/10/a-graphical-tra.html
08:49 lambdabot Consider it noted.
08:55 blindfish joined #perl6
09:06 devogon joined #perl6
09:12 xinming joined #perl6
09:12 iblechbot joined #perl6
09:15 barney joined #perl6
09:24 meppl joined #perl6
09:57 marmic joined #perl6
10:57 chris2 joined #perl6
11:23 jferrero joined #perl6
11:49 simcop2387 joined #perl6
12:26 pmurias joined #perl6
13:44 rindolf joined #perl6
14:05 rhr joined #perl6
14:09 silug_ joined #perl6
14:09 wknight-away joined #perl6
14:37 alester_ joined #perl6
15:56 Aankhen`` joined #perl6
16:08 apple-gunkies joined #perl6
16:17 mncharity joined #perl6
16:21 mncharity Does perl5 have a literary programing tool, which permits () code to be written out of order, and then reshuffled; () direct execution anyway; () code to also appear in the doc; ?   'code to be written out of order' is a 'must have', the others not.
16:21 lambdabot mncharity: You have 1 new message. '/msg lambdabot @messages' to read it.
16:23 mncharity pmurias: Thanks!  Preetttyyyy.  http://agentzh.org/misc/tracer/digits/index.html
16:23 lambdabot Title: Test
16:23 mncharity Me thinks that deserves its own directory and to become a tool.
16:25 mncharity re literary programing, oh, and () permits generative programming of code.  'must have'.  :(  I guess that means roll something new.(?)  But I'd still be interested in any pointers with the other requirements.
16:26 mncharity The mentioned  http://search.cpan.org/~adamk/PPI-Tester-0.06/ looks interesting too.
16:26 lambdabot Title: Adam Kennedy / PPI-Tester-0.06 - search.cpan.org
16:27 mncharity Oh, the root of the tracer discussion was http://pugs.blogs.com/pugs/2​007/10/a-graphical-tra.html .
16:27 lambdabot Title: Pugs: A graphical tracer for Perl 6 regexes based on PCR
16:27 mncharity sigh, and "Me thinks that deserves its own directory and to become a tool." referred to a the tracer, not the literary programming.
16:28 mncharity two confusingly interleaved threads
16:34 mncharity http://www.perlfoundation.org/perl5​/index.cgi?pod#alternatives_to_pod
16:34 lambdabot Title: POD / Perl 5 Wiki, http://tinyurl.com/2kfbng
16:35 sordith_ joined #perl6
16:36 mncharity http://search.cpan.org/dist/Per​l6-Perldoc/lib/Perl6/Perldoc.pm
16:36 lambdabot Title: Perl6::Perldoc - Use Perl 6 documentation in a Perl 5 program - search.cpan.org
16:36 mncharity but "This module does not make every Pod block available to the surrounding program, only the =DATA blocks. This is to avoid the unacceptably slow compilation speed that would result from attempting to fully parse the entire embedded Pod markup and then construct an internal representation of it."
16:37 mncharity hmm, one could do a derivative with the opposite tradeoff...
16:44 mncharity and looks like you could do a mutant pod parser in general.  use Pod::Mutant; =begin code ... =end code ...
16:54 lichtkind joined #perl6
17:00 lichtkind does anybody know if the std-6.0.0.pm in pug s rep has there some function?
17:06 TimToady it got renamed to STD.pm quite some time ago, so that's probably an old copy, or a derivative
17:06 TimToady what does svn status say?
17:08 TimToady biab &
17:24 TimToady joined #perl6
17:34 TimToady mncharity: if someone else wants to work on a literary dialect of p6, that's fine, but I tend to be more interested in mobile documentation than in mobile code.  And it's certainly not on the critical path...
17:50 lichtkind TimToady: wb, allright that std.pm but i wanted know if that file is just stored there or has actual purpose
17:50 Corion joined #perl6
17:50 Corion left #perl6
17:51 TimToady are you asking if the standard Perl 6 grammar has a purpose? :)
17:51 iblechbot joined #perl6
17:51 lichtkind haha
17:52 lichtkind TimToady: i asked if pugs uses the std.pm for any compilation purpose
17:52 TimToady no
17:52 TimToady pugs development quit before std development started
17:52 lichtkind thats i wanted know and what i supposed that std is just doc in pugs svn
17:53 TimToady I think you are confusing pugs the repository with pugs the program
17:54 lichtkind i currently write also update article some kind of current state of the perl 6 project so expect more weird questions
17:54 TimToady there are many things in pugs repo that are neither doc nor used by pugs the program
17:54 lichtkind i know that inside pugs svn live lot things more
17:54 cognominal_ svn repos are petri dishes
17:54 TimToady STD.pm is intended to be executable code, not just doc...
17:55 lichtkind but yesterday i saw a version o std in parrot svn so i wondered which role it playes here
17:55 TimToady no clue what it would be in parrot repo, or if it's even related
17:55 TimToady what is its path?
17:57 TimToady I don't see any such file in parrot repo
17:59 lichtkind_ joined #perl6
18:00 lichtkind_ did i missed something?
18:01 mncharity re petri dishes, :)
18:02 TimToady lichtkind: probably, what did you last see?
18:03 TimToady (you can always check the irc logs to find out if you missed something.)
18:03 lichtkind_ that i said to you thats clear
18:03 lichtkind_ where are the logs?
18:03 TimToady http://irclog.perlgeek.de/perl6/today
18:03 lambdabot Title: IRC log for #perl6, 2008-03-08
18:03 TimToady it's even close to you :)
18:05 lichtkind_ TimToady: thanks i missed your comment about parrot, in parrot svn in the rakudo dir is patricks version of std.pm and rakudo aktually uses it to parse perl
18:05 lichtkind_ but it has differences so PGE can handle it
18:07 TimToady you must be looking at a file that is generated at run time
18:07 TimToady what does svn status say about that file?
18:08 TimToady and there is no rakudo dir...it's name is still perl6...  # confused...
18:08 TimToady *its
18:09 cognominal_ I don't see any such file, the rakdudo grammar is languagues/perl6/src/parsser/​{grammar.pg,grammar.oper.pg}  and no std.pm is ever generated.
18:10 mncharity re critical path, yeah, lost focus.  confused even.  some metaprogrammed p6 code, say prelude or p6rx_on_p5re, might be useful to help motivate work on the rakudo-ast->emit_bare_p5.  but there is no need for literate programming's code fragmentation there.
18:10 mncharity hmm, no need for it even in STD_deconstruct, if it was approached very slightly differently.
18:11 lichtkind_ TimToady:  yeah im talking about http://svn.perl.org/viewvc/parrot/tr​unk/languages/perl6/src/parser/gramm​ar.pg?revision=26130&amp;view=markup
18:11 lambdabot Title: 1 [ 6 parrot 1 ] 1 34 View of /trunk/languages/perl6/src/parser/grammar.pg 30, http://tinyurl.com/2spl56
18:11 lichtkind_ its hand written not parser generated
18:11 lichtkind_ but yes its under languages/per6
18:11 Psyche^ joined #perl6
18:13 cognominal_ lichtkind, you can see the various phase of postprocessing using  --target=parse   or past, or post, or pir.
18:14 TimToady well, that's only about 137 revisions out of date...
18:15 TimToady (to be fair, parrot revisions, not grammar.pg revisions)
18:16 TimToady that is the more recent version of the file, so that's okay
18:17 TimToady it's kinda misleading that the url points to an older version of parrot
18:18 TimToady sorry for the thinking the sky was falling...
18:21 pugs_svnbot r20089 | putter++ | misc/winter_jig/STD/STD_deconstructed.pl: simplified by removing a literary programming hack.  A cute hack, but not needed here if the data is wrapped procedurally.
18:21 pugs_svnbot diff: http://dev.pugscode.org/changeset/20089
18:21 lambdabot Title: Changeset 20089 - Pugs - Trac
18:23 TimToady mncharity: btw, speaking of STD_deconstructed, those categories that are rules rather than tokens are making me rethink how automatic whitespace should be handled in rules
18:23 mncharity :)
18:23 TimToady because the autolexer doesn't like leading ws
18:24 TimToady which is why STD.pm currently has unspaces on those rules
18:24 TimToady but I'm thinking a general policy would be better than having to backwhack those whitespaces
18:24 mncharity err, no :) because you are rethinking it, but :) because I hoped the different perspective provided by deconstructed might prove useful.
18:24 wtgee joined #perl6
18:25 TimToady well, just the fact that you classified them that way reminded me that there was something bogus about using rules under LTM
18:25 mncharity right
18:25 TimToady I don't know whether the right thing to say is
18:25 TimToady that rules in general should ignore their first ws
18:26 mncharity hmm... there's an idea....
18:26 TimToady or that a protorule should automatically slurp <.ws> on behalf of its subrules
18:26 TimToady well, we actually went back and forth about leading whitespace in ancient design meetings
18:26 mncharity what's the state of trailing ws?
18:27 araujo joined #perl6
18:27 TimToady though the case in point at the time was rule {:foo bar}
18:27 TimToady and whether the whitespace after :foo was significant
18:27 mncharity is there any promise to leave trailing ws alone?
18:27 TimToady at the moment all whitespace is significant, including trailing
18:28 TimToady (except whitespace between an atom and its quantifier)
18:28 TimToady (well, and whitespace within other constructs like char classes...)
18:29 mncharity sigh.  irc client eats another /.../  regex.
18:29 TimToady in terms of LTM policy, the canonical thing is that all alternatives (including categoried alternatives) should have the ws eaten before they get there
18:29 mncharity /<a_rule>$/ ~~ "a " ?
18:30 TimToady er, that looks backwards
18:30 TimToady but $ is not going to work there
18:31 TimToady unless <a_rule> matches the ws
18:31 mncharity ok
18:33 mncharity one nice thing about 'rule doesn't imply leading whitespace is eaten', is in the "try lots of matchers against current string pos", all rul (regex/token/rule) would then behave the same.
18:34 TimToady hmm
18:34 mncharity hmm.  though it does make it different from the lexer/parser behavior.
18:34 mncharity where the lexer is happy to discard all ws
18:34 TimToady implying that you could match postfixes and infixes in the same alternation. hmm...
18:35 TimToady except we don't want to mix those anyway for recursive descent reasons
18:35 TimToady since the postfix wants to attach to the term, and the infix doesn't
18:35 TimToady question is there a use case otherwise...
18:36 rindolf joined #perl6
18:37 TimToady maybe the proto rule is the right place to make that choice, if the default isn't right...
18:37 TimToady since a proto rule implies alternation
18:37 TimToady whereas a standalone rule doesn't
18:37 TimToady on the other hand, lots of standalone rules will have alt at their top level anyway
18:38 TimToady and as you say, the standard lexer eats ws eagerly anyway
18:38 TimToady so that should almost certainly be default behavior
18:39 TimToady however
18:39 TimToady we have to be careful
18:39 justatheory joined #perl6
18:39 TimToady not to write any rules under <post>
18:40 TimToady if the top alternation autoslurped the ws
18:40 TimToady so it still has to be attached to "ruleness" rather than LTMness
18:41 zamolxes joined #perl6
18:42 mncharity if rule() is intended as a simple collection of regexp() modifiers, intended to match some user expectation or use case, then...
18:42 mncharity well, user expectation, if based on lex/yacc, would be both leading and trailing ws go away.
18:43 TimToady so it still comes down to the question of how a rule's skipping of leading ws can feed into LTM usefully
18:43 TimToady I think the LTM has to know itself whether it should call <.ws> before feeding the new pos into DFA engine
18:44 TimToady and that info is propagated up from any rules that may be transitively the head of the match
18:45 TimToady it's not simply passing \s* out as the head of the ltm regex
18:45 mncharity ok, but one can also consider it from another direction: "which will result in fewer person-years spent explaining it, and fewer person-years spent debugging due to misunderstanding it".  I've no idea at present.
18:45 TimToady since <.ws> does line transition stuff
18:45 mncharity complementary perspectives, perhaps
18:46 TimToady I think if we factor <.ws> out to LTM for correctness, nobody will notice :)
18:46 TimToady so it won't have to be explained. :)
18:46 mncharity oh, I'm thinking S05-ish, "what is a rule()".
18:46 mncharity perhaps I misunderstood the question? :)
18:47 TimToady the problem is this
18:47 TimToady as it currently stands, (or stood, before I installed backslashes in STD)
18:48 TimToady statement_control:if would implicitly have a sigspace call to <ws> before the <sym>
18:48 TimToady and the LTM factoring engine would see that and stop cold
18:48 TimToady so there would be no token "if" in the LTM match
18:48 TimToady and basically LTM would be useless on any call to <statement_control>
18:49 TimToady which is madness
18:49 TimToady so I install unpspace backslashes right after the opening curlies of those rules
18:49 buchetc joined #perl6
18:49 TimToady assuming that whatever calls <statement_control> will eat the whitespace
18:50 TimToady which it probably will anyway
18:50 TimToady but unspace feels hacky there
18:50 TimToady rules should just behave right by default
18:51 TimToady and I think if I factor out leading sigspace to the LTM
18:51 TimToady it's just work as expected
18:51 TimToady since LTM is, in some sense, just supposed to be an invisible optimization
18:52 TimToady (except for the explicit non-orderedness of | alternatives vs ||)
18:52 aindilis joined #perl6
18:52 eternaleye_ joined #perl6
18:53 TimToady so basically LTM has to know if any of its alternatives would call .ws and call it before the dfa engine
18:53 mncharity ah, ok
18:53 TimToady so that the dfa engine can usefully match /^if
18:53 TimToady because dfa engine doesn't know how to call .ws correctly
18:54 TimToady and can't, because .ws is officially a side-effectual subrule
18:55 TimToady if there is a mix of tokens and rules in the alternatives, I don't think it hurts to call .ws before the tokens
18:55 TimToady as long as the grammar handles whitespace dependencies with pure token alternatives
18:55 TimToady (as STD does)
18:55 mncharity and if not?
18:55 TimToady the grammar breaks miserably  :)
18:55 mncharity lol
18:56 TimToady perhaps it will help if you can't mix rules underneath a proto token
18:56 mncharity the STD grammar, or LTM grammars in general?
18:56 mncharity (re breaks)
18:57 TimToady it would be easy to break a derivative of STD
18:57 TimToady token term:sym<myterm> { <naughty_rule> } would do it
18:57 TimToady well, term wouldn't care
18:57 mncharity :/
18:58 TimToady it's postfixes that care
18:58 TimToady but same idea
18:58 TimToady on the other hand, they'd notice *very* quickly if they broke all postfixes :)
18:59 TimToady perhaps there should be a token annotation that can be placed on <post> that it disallows subrules with leading .ws
18:59 TimToady and that would catch it earlier
18:59 mncharity pondering 'just work as expected'... so /^<start_rule>$/ will in general not work, yes?  it usually has to be /^<start_rule><ws>$/ ?
19:00 TimToady depends on how start_rule is written
19:00 mncharity /^<Foo.start_rule><Foo.ws>$/
19:00 mncharity re how, how so?
19:00 TimToady if it's written rule start_rule { <stuff> } then it will eat ws both fore and aft
19:00 mncharity ahh, ok
19:01 TimToady the assumption is that anything written at the rule level can safely ignore all whitespace distinctions
19:01 mncharity vs {<stuff>} vs {<stuff> } vs { <stuff>}
19:01 TimToady which is what bugs me about having to put \ in there
19:02 TimToady which is isomorphic to {\ <stuff>\ } vs {\ <stuff> } vs { <stuff> }
19:02 TimToady in any case, almost all rules will be written with leading ws
19:03 TimToady (mostly unthinkingly, because of the basic assumption above)
19:03 * mncharity squints, decides he doesn't know what " " means.
19:03 TimToady so I think factoring .ws out to LTM is the right thing
19:03 TimToady it's just an unspace, as defined in S02:217
19:04 mncharity sounds plausible #re right thing
19:04 TimToady it's not a literal space match, as it would be in old regex
19:04 TimToady which is, by the way, a trap for the unwary
19:04 mncharity (got http://irclog.perlgeek.de/perl6/today, go to bottom, look for "S02:217" link, click...)
19:04 lambdabot Title: IRC log for #perl6, 2008-03-08
19:05 TimToady so I imagine "\ " in a non-rule should always warn
19:05 mncharity ah, ok
19:05 TimToady and direct user to write \x20 or some such
19:05 TimToady or <sp> if we still have that  :)
19:06 TimToady except very often when people write a literal space match they should at least have written \s+ instead
19:06 TimToady or \h+
19:07 TimToady so maybe <sp> is too conducive to bad programming
19:07 TimToady and \x20 is appropriately ugly
19:08 mncharity oh, oops. I saw <sp> and thought "ah, \s+".
19:08 TimToady the other problem with it, yes
19:08 TimToady in which case you should be calling <ws> likely
19:08 TimToady or just using sigspace
19:08 mncharity <' '>
19:09 TimToady yes, more readable (but longer)
19:09 TimToady well, actually, simply ' '
19:09 TimToady these days
19:09 TimToady even ' '+
19:10 TimToady or " " if you like the heavier quotes
19:10 mncharity so the only advantage of  <sp> over ' ' is you don't have to squint at it, wondering *which* invisible character is in there.
19:10 rindolf joined #perl6
19:11 mncharity and whether those two ' are next to each other or not.
19:11 TimToady hence, no pressing need for <sp> really
19:11 TimToady and if you don't want to squint, \x20
19:11 TimToady particularly if the rest of the expr is full of \xab already
19:12 TimToady which most of the regex I see these days are
19:12 TimToady since they're scaning for viruses and such  :)
19:12 TimToady (at $dayjob)
19:12 mncharity sigh :)
19:13 TimToady so <sp> dies, or remains unded, or something
19:13 mncharity unicode... it's not just a format, it's a vector...
19:13 TimToady token sp { ' ' }  # not an arduous workaround
19:14 TimToady I think I'm kinda liking this language  :)
19:14 mncharity it's been interesting to watch ruby do unicode.  apparently unicode isn't quite adequate for Japanese, so ruby makes a point of supporting other systems.
19:14 mncharity :)
19:15 TimToady unicode is perfectly adequate these days with plane 0/1 chars, but by now it's a political fight more than a technological :)
19:15 mncharity whereas every other language I've noticed takes the "just do unicode" approach.
19:16 TimToady well, there are still languages with horrific rendering problems
19:16 mncharity well, aside from languages (eg, prolog), which take the "we're too clueless to do anything" approach.
19:16 TimToady but those language users tend to blame themselves rather than unicode :)
19:16 TimToady I mean human languages, not computer
19:17 mncharity re political, ah, ok.  that's good.
19:17 SamB is there an official mapping between shift JIS and Unicode?
19:18 TimToady I'm sure the Unicode consortium would say "yes"
19:18 TimToady and I'm just as sure there are other people who would say "no" :)
19:19 SamB I didn't ask if it was adequate
19:19 TimToady well, the definition of "official" (and "adequate") depends on which official you ask
19:20 mncharity groan
19:20 SamB or do you mean some people would interpret that as meaning an official publication of the Unicode consortium, and others as meaning a JIS?
19:21 TimToady All character defining bodies did not automatically become subserviant to the Unicode consortium just because the Unicode folks might like to think so. :)
19:21 SamB hmm. MS seems to say "no"
19:21 SamB http://support.microsoft.com/kb/170559
19:21 TimToady yet another "standards" body...
19:21 TimToady *subservient
19:22 SamB or at least to indicate that it isn't an adequate mapping...
19:22 TimToady MS has also preferred to stay "on top of things"
19:22 TimToady or maybe just "on top"
19:22 SamB were additional characters added to unicode since this?
19:25 mncharity (re "on top of things", in an "if we undermine the city, and no one else can build, our building will be tallest" competitive disregard for public good sense)
19:25 TimToady it would appear to me that they are ignoring all the plane 1 compatibility characters
19:26 TimToady it would also appear to me that this is a case of more-than-one industrial variant of Shift-JIS, since they refer to NEC specifically
19:27 TimToady NEC having the same relationship to legacy character sets that MS does.  :)
19:27 mncharity I'm sort of wondering how long it will take for the "Web 2.0" community to realize, M$ is back, it destroyed "Web 2.0" the first time, and it's not clear its interest, character, or strength vs community are much different this time.
19:28 mncharity ah, well, anyway...
19:28 TimToady in what sense did it destroy Web 2.0 the first time?
19:28 mncharity any other STD questions/issues?
19:28 mncharity oh, re in what sense did it destroy Web 2.0 the first time?,
19:28 TimToady seems to me that Web 2.0 is already in the process of destroying itself :)
19:29 TimToady re STD, well, just contiguous time and energy to work on it
19:29 TimToady $dayjob and health have both been interfering
19:29 SamB when did plane 1 come out?
19:29 SamB the KB article refers to something from 2000...
19:29 jferrero joined #perl6
19:29 TimToady and these days I prioritize both of those rather highly
19:30 TimToady I thought it was dated 2004 or 5
19:30 TimToady for plane 1, before 2005 for sure
19:30 SamB APPLIES TO
19:30 SamB •Microsoft Platform Software Development Kit-January 2000 Edition
19:30 TimToady maybe not before that, I don't remember
19:31 TimToady mostly the plane1 chars were added for names
19:31 mncharity it was very much not in MS interest for thin clients and a JS-based web to become an alternative to buying MS and MS apps.  and by taking their usual (and explicit) approach of "our behavior with respect to the existence of, and conformance to, public standards, is strictly a question of what is in our competative interest", managed to
19:32 TimToady but to the first approx, Web 2.0 doesn't need MS's blessing to survive at all
19:33 mncharity sandbag the first push towards web-based apps by dominating the market, dissipating it by incompatibility, and then locking in the state by freezing their own development.
19:33 TimToady except insofar as various companies prohibit use of, say, firefox
19:33 TimToady which I doubt many companies do
19:34 TimToady in fact, the very incompatibilities you mention are part of what pushes people to firefox/opera/etc
19:34 TimToady so the MS tail can't really wag that dog
19:35 TimToady BTW, I'm not opposed to MS making a decent living--I have at least two relatives who work for them :)
19:36 TimToady and I think another company is taking over the mantle of Little Brother
19:36 TimToady whether they think they're doing Evil or not...
19:37 mncharity re blessing, firefox, I disagree.  That was the argument the last time too.  One can only have an ecology of web apps if one can actually, and easily, write code for one's target audience.  If that target audience is so incompatibly fractured that you can't, well, you can't.  Only thing different this time seems the possibility of a "rich uncle", eg Google, in whose interest it is
19:38 mncharity for the capability to exist, funding all the "compatibility libraries" cruft which last time never quite became usable enough to let people cope with incompatibilility.
19:39 mncharity But it's not clear how viable a "compatibility library" approach is in the face of potential active MS opposition.  Might be, but I'm not sure.
19:39 TimToady cross-platform JS is mostly a solved problem these days, according to the folks I talked to yesterday
19:40 TimToady and these were people who should know...
19:40 mncharity Right, because, to a first approximation, MS has "been away".  Now their becoming active in the area again.
19:41 mncharity *they're
19:42 SamB TimToady: it looks like the CJK assignments are in planes 0 and 2 so far...
19:42 mncharity And their interest in cross-platform JS, and SVG, and video, and 3D, and everything else the web is growing towards, *not* being an open standard, has not clearly changed.
19:42 TimToady well, I'm not to worried.  Web 2.0 interprets MS as damage and routes around it.  :)
19:42 TimToady *too
19:43 mncharity That's what was said last time too. :/
19:43 mncharity It's taken half a human generation to dig out from that.
19:44 TimToady fine, but every half generation or so a *different* Great Satan arises.  I don't think MS will be the next one any more than IBM is the current one.
19:45 TimToady you have to be forward looking :)
19:45 ilogger2_ joined #perl6
19:46 pmurias joined #perl6
19:47 TimToady speaking of forward looking, I should finish enjoying my morning coffee if I want to get dressed before noon
19:47 TimToady biab &
19:47 SamB hmm, maybe the japanese just don't like the forms that the unicode consortium used?
19:49 mncharity could be.  just saying "hey, I could do js and ajax in the mid 90's too.  did.  then MS started focusing on the area.  made it infeasible.  then they ceased to focus on it.  eventually, after years when by, became feasible again.  lots of folks who weren't there the first time celebrate, and think it's a sea change.  then MS starts focusing on the area again...".
19:49 literal joined #perl6
19:58 mncharity not "Great Satan".  just a company with a particular culture.  one which values 'competative advantage' vs 'public good' higher than some, lower than others.  which has been willing to leverage its wealth and os monopoly to preserve and extend that advantage.  an advantage which has, at least in the past, been rooted in 'web 2.0' *not* existing.  perhaps that interest will shift, but it's not clear.
20:00 smtms joined #perl6
20:00 mncharity Keeping Google Office working will never be a focus of IE development. ;)
20:01 TimToady or vice versa...
20:02 spinclad re ws, simplistic superficial comment: this working hard to keep from tripping over implicit ws gets me thinking of making explicit ws cheap:  C<< < > >>; and part of me goes B<< eww! >> and part of me says I<< why not? >>.  too much magic line-noise maybe.  (more)
20:02 spinclad and not enough magic: it doesn't address problems of placing ws at boundaries of embedded rules... which may be the greater problem, until resolved
20:03 spinclad (and i see you've touched on this while i was backlogging and composing this)
20:04 mncharity but if Google Office is standards compliant, then IE not supporting it takes the flavor of not supporting standards (or to quote Gates, "well, it depends what you mean by standards").  which hits the entire ecosystem.
20:05 TimToady to be quite fair, I pay much less attention to standards than MS does. :)
20:05 TimToady spinclad: and < > is already take for < a b c >
20:05 mncharity :) and on that note, back to work
20:05 spinclad drat
20:06 mncharity which currently looks like trying to make exist a  rakudo-parser -> ast -> simple transliterated p5 backend .
20:09 spinclad 'Hi! I'm back in 2001 with another incompatible RFC!'
20:10 TimToady most of 'em keep resurfacing from time to time  :)
20:10 mncharity bbiab
20:11 TimToady well, maybe not most, but some...
20:19 mncharity Beyond parser ast's, we could really use an implementation neutral language ast.  redsix has one, rakudo --target=past has another, pugs -Cyaml a third.  and it's not clear any can be used by an implementation not tightly tied to that which generates them.  their more compiler IR's than an abstract ASG.
20:19 mncharity *they're # again
20:21 mncharity well, they *are* compiler IR's. :)  it would just be nice to have an interchange format.
20:21 TimToady I've never really seen a good definition of what exactly Abstract Syntax is...
20:21 TimToady speaking as a linguist...
20:22 TimToady if it merely means, "having forgotten details that you might regret not knowing later"
20:22 TimToady then I don't think it's all that interesting...
20:22 mncharity bunch of nodes, a doc, a schema. :)
20:23 TimToady and in particular, I have an anti-interest in having to invent something like P5 madprops to get back to the original language for P6...
20:23 mncharity --target=past has a "<symtable> => Hash { "$!" => Hash { "scope" => "lexical" },"$/" => Hash { "scope" => "lexical" },"$_" => Hash { "scope" => "lexical" } }" header, pugs a pugsian 'same idea but different'.  redsix yet another.
20:24 mncharity n implementations with n Var (or Variable) nodes, with n variations on what information is captured there, and what it is called.
20:26 eternaleye joined #perl6
20:26 mncharity if macros are to work on anything beyond the code string or Match parse tree level, or for any kind of cross-implementation compiler work, there will need to be a standard.
20:26 mncharity standard(s) :)
20:27 TimToady I'm trying to devine what about the Match tree makes some subset of it unsuitable to be viewed as an AST...
20:28 TimToady *divine
20:28 TimToady but maybe de-vine too
20:29 TimToady and whether that just means our definition of Match trees is insufficinet
20:29 TimToady *cient
20:29 mncharity ah, but at some point you want to start asking questions of it like  what-are-your-free-variables?
20:29 TimToady fine, but now you're talking semantics, not syntax...
20:30 mncharity ASG, abstract semantic graph. ;)
20:32 TimToady I do realize that there was a school of linguistics that overanalyzed semantics as if it were syntax, and that the leader of that school also had considerable influence on comp sci, but I was never that kind of linguist. :)
20:35 mncharity Match tree -> Match tree you wished you had -> methods for talking about the Match tree in the vocabulary you would like -> and about neighboring nodes -> and about not-so-neighboring nodes but which bear on what you would like to talk to the node about -> ...
20:35 mncharity slippery slope
20:37 TimToady certainly, linguistics if full of 'em
20:37 TimToady don't get me started on morphophonemics...
20:37 TimToady *is
20:38 mncharity if Match trees were magically blessed based on the rule which created them, so there wasn't an artificial border, then the transition would be from asking about its match hash captures, to asking about derived properties.
20:40 TimToady well, that's essentially what all the --> coercions are in there for
20:40 mncharity nah, that doesn't work.  some captures are sufficiently close to what you want that they could keep being used forever.  eg, the <statements> of a statementlist.
20:40 TimToady the "Match tree" is already abstract syntax
20:41 mncharity (nah was re my "f Match trees were magically blessed..."0
20:42 mncharity at a minimum, the Match tree has artifacts of the parse which you probably don't care about once the parse has been accomplished.
20:42 TimToady if you look into the coerce functions implied by -->, you'll see (commented out for now) a mixin, which is a kind of blessing
20:42 mncharity in STD.pm?  looking....
20:42 TimToady ah, but now you're back to defining it merely as a forgetting
20:42 TimToady look for but=
20:43 TimToady and I am allergic to forgetting things after my MAD aversion therabpy
20:44 TimToady *therapy, though I like the alternate spelling too...
20:44 mncharity re -->, it's not clear Autoincrement is the kind of node type one wants to have when writing a compiler.
20:44 mncharity Methodcall is more like it
20:44 TimToady now you're just arguing granularity of types
20:45 mncharity I'm suggesting that the needs and focus and tradeoffs of writing a parser are sufficiently distinct than those for writing later parts of the pipeline, that it's not clear they should be coupled.
20:45 TimToady but yes, the granularity desired by the OPP is not necessarily the same as that desired by an emitter
20:46 mncharity Eg, if you have a bunch of "these fields and methods are used at parse but not compile time, and these others visa versa.  and similarly for methods.  and the node types are massaged in between."  then it's not clear what you've bought.  except complexity.
20:47 TimToady I'm mostly just kicking up a fuss about the term Abstract Syntax
20:47 mncharity lol
20:47 TimToady I'm not against tree transformations...
20:47 mncharity ah, linguists. ;)
20:48 mncharity yeah, "AST" gets abused, for want of a good rich vocabulary for the area.
20:49 TimToady on the other hand, I don't see offhand why a macro would prefer to deal with some intermediate semantic representation much deeper than Match tree
20:49 IllvilJa joined #perl6
20:50 cmarcelo joined #perl6
20:50 mncharity as a macro, I would very much like to ask about "are you a free variable?", without having to do the lisp usual "never mind, I understand the entire language so I can grovel over the tree and figure it out for myself".
20:50 TimToady quasi-quoting will already handle nearly all the needs for binding, so there's not much need to introspect the tree for variables
20:51 TimToady and in any case you probably want them in prebound state anyway so you can decide
20:52 TimToady in any case, the parser has to decide the binding right then and there anyway
20:52 TimToady so that level of semantics has to be interwoven already with syntax analysis
20:52 mncharity "were you variable $x declared 'tastes like peppermint'? in which case i'll..."
20:53 TimToady the parser must realize "my $x = $x" is recursive
20:53 TimToady we mandate $x gets poked into the symbol table when the parser position is after "my $x"
20:54 TimToady that kind of decision cannot be deferred
20:54 mncharity re woven, so what your saying is p6 never has an AST, just a parser-IR? :)
20:55 TimToady any Perl parser has to be ready to know the complete meaning of any previous bit of code at any point, up to and including running it
20:55 TimToady (BEGIN and friends)
20:55 TimToady but also constant folding
20:55 TimToady merely keeping track of the symbol table on the fly is just a small part of it
20:56 TimToady the fundamental nature of Perl is that it not only be able to compile code at run time but also run code at compile time
20:57 TimToady (hopefully with better control than Perl 5 exercised)
20:58 TimToady basically, the parser must know (or have ready access to) exactly what language we have at the moment
20:58 TimToady and every declaration changes the language subtly.
20:59 mncharity right, sorry, tongue-in-cheek question.
21:05 mncharity sigh.  /me starts writing a rakudo --target=parse scraper... :/
21:08 mncharity sigh.  and the rakudo ast nodes aren't tagged with the rules which originated them.
21:11 mncharity having to reconstruct implicit node typing... shudder.  hmm, since nothing exists to parse the --target=parser output format, it follows that nothing depends on it.  I wonder if the Match nodes contain the information, and it's simply not being exposed?
21:12 mncharity (folks who know parrot are most welcome to jump in any time.  else it looks like I'm just thinking aloud;)
21:13 cognominal_ I am still in learning mode of the compiltion chain...
21:13 mncharity np :)
21:14 mncharity hmm.  mission creep.  ok, a scraper with node type inference.
21:15 TimToady there, you've already run into a problem of forgetting something by getting too abstract too quick... :)
21:15 TimToady well, you weren't the one doing it, which is small comfort... :)
21:23 FurnaceBoy joined #perl6
21:23 cognominal_ mncharity, this is a Data Dumper so everything of the parrf tree is exposed.
21:24 cognominal_ s/parrf/parse/
21:33 mncharity re abstract, oy :)
21:34 mncharity re 'everything of the parrf tree is exposed', ah well.  thanks.  no I don't have to feel guilty digging into parrot looking for a simple fix. :)
21:34 mncharity *now
21:35 mncharity sigh, 'now I don't have to feel guilty about not digging into parrot looking for a simple fix'
21:51 kst joined #perl6
21:57 spx2 joined #perl6
22:06 mncharity so far so good.  ended up starting it in ruby - just didn't want to deal with p5.  so should have scraping tomorrow.  then can work on deriving an ast from it.  happiness.
22:11 pugs_svnbot r20090 | putter++ | misc/winter_jig/ast_rakudo/scrape: start of a scraper for rakudo --target=parse output.
22:11 pugs_svnbot diff: http://dev.pugscode.org/changeset/20090
22:11 lambdabot Title: Changeset 20090 - Pugs - Trac
22:11 mncharity good night &
22:21 spx2 hows perl 6 doing ?
22:21 spx2 I would like to donate 100$ through paypal because I believe in you
22:22 spx2 how do I do that ?
22:23 ikeda joined #perl6
22:24 cognominal_ spx2 : https://donate.perlfoundation.org/​index.pl?node=Contribution%20Info
22:24 lambdabot Title: Contribution Info, http://tinyurl.com/yb6pjq
22:26 cognominal_ spx2: earmark your donation to perl 6
22:26 spx2 cognominal_: earmark ?
22:27 cognominal_ erb [ trans. ]
22:27 cognominal_ 1 (usu. be earmarked) designate (something, typically funds or resources) for a particular purpose : the new money will be earmarked for cancer research.
22:28 cognominal_ say in your comments you would prefer this money used for perl 6
22:30 FurnaceBoy heh paypal should support "money folders" like email
22:30 FurnaceBoy sub-accounts
22:41 spx2 I am decided to make this donation
22:41 spx2 It's too long I have been waiting for Perl6
22:41 spx2 s/decided/determined/
22:44 ikeda_ joined #perl6
22:48 spx2 ok just finished making it
22:49 spx2 cognominal_: any other things I should know of ?
22:56 cognominal_ be patient, perl 6 is a long term undertaking.
23:02 [particle] spx2++
23:03 FurnaceBoy spx2: V1.0 should be ready in the morning
23:03 spx2 FurnaceBoy: :)
23:04 Daveman joined #perl6
23:04 spx2 Daveman: dude wtf ?
23:11 Daveman Yes?
23:14 Talaman72 joined #perl6
23:32 Talaman72 eval $hits = <count>; hits++; <count> = $hits;
23:32 PerlJam Talaman72: it doesn't work in perl 6 either
23:34 Talaman72 so my question would be, how would i get the $hits to overwrite the contents of the file
23:35 PerlJam Talaman72: in perl 5 or perl 6?
23:36 PerlJam Talaman72: in either the technique is the same: open the file for both read and write, lock it, read the value, increment, rewind to the beginning of the file, write the value, close the file.
23:36 PerlJam Talaman72: there are many variations on that theme too
23:37 Talaman72 well i have the opening part down, the incrementing part, but the writing part seems to be a bit off
23:37 PerlJam Talaman72: you're missing a few steps from what I said.
23:38 PerlJam Talaman72: and again, do you want to do this in perl 5 or perl 6?
23:39 Talaman72 either way
23:39 Talaman72 just want it to work

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs