Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-09-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:00 TreyHarris though i don't think you have power "over" someone quite so literally, but i can't remember that construction in latin
00:00 TreyHarris anyway.
00:00 * TreyHarris &
00:07 Qiang joined perl6
00:07 putter joined perl6
00:07 * putter backlogs...
00:07 lambdabot putter: You have 1 new message. '/msg lambdabot @messages' to read it.
00:08 weinig joined perl6
00:09 putter re markstos  r13524 http://colabti.de/irclogger/irclogger_log/perl6?date=2006-09-21,Thu&sel=20#l40 ,  err, are those really the definitions of eval_ok and die_ok?  I wouldn't have thought so...
00:09 lambdabot Title: #perl6 2006-09-21,Thu, http://tinyurl.com/oypar
00:10 TreyHarris putter: no, but did you look at the diff?  i think the actual diff is ok
00:10 TreyHarris i had the same reaction to the log
00:11 TreyHarris though...
00:12 putter ah, no, I haven't seen the diff.  thanks :)
00:13 TreyHarris @tell markstos when you use the Test::eval_* functions, note that the string's scope is inside of the Test::eval_* you called.  I'm trying to fix that with a macro (hopefully immediately after the .13 release?).  But until then, use 'my $foo is context' and then '$+foo' in your eval string...
00:13 lambdabot Consider it noted.
00:13 putter re parsing p6 without p6,
00:14 putter I think it a qualitative question... some p6 can be parsed by emacs, now.
00:14 putter at the other end of a continuum,
00:15 TreyHarris putter: yes, but i'm really fighting emacs every day
00:15 putter there is no way editors are going to be able to deal well with string macros and dynamic parser grammar changes.
00:15 TreyHarris i still find it more useful to leave cperl-mode turned on than off, but just barely.
00:15 putter (no way without a p6 backend helper, of course)
00:15 TreyHarris putter: string macros, granted, but AST macros, even parsed ones... it can do it if it *uses* Perl to generate an AST it then uses to highlight
00:15 TreyHarris oh.  yes.
00:15 putter so the question is what style of code people will be writing.
00:16 SamB isn't that dangerous?
00:16 SamB actually all this reminds me of CL
00:17 TreyHarris oops, nevermind... you said "parsing p6 without p6" and I immediately read that as "parsing p6 outside of p6".  yes, of course... i just want to be sure that perl can be called in a non-dangerous way to parse and generate a syntax tree that an editor can use
00:17 putter I am dsl-oriented, and find perl syntax less than pleasant, so will perhaps use such (macros, parser mods) more often than some others.
00:17 putter re cperl...
00:17 SamB in CL there are three different ways you can process a file...
00:17 TreyHarris SamB: is what dangerous?
00:18 SamB TreyHarris: running macros just to highlight something in your editor
00:18 putter have you tried the other perl-mode?  I've found it nicer for p6 than cperl.
00:18 SamB at least, I think it is three ways...
00:18 SamB one is compiling
00:18 SamB one is loading
00:18 * SamB forgets the other one...
00:19 TreyHarris putter: oh... i didn't think the other perl mode knew anything about perl 6.
00:20 TreyHarris SamB: brb
00:20 putter SamB: eval
00:20 SamB I guess so
00:20 putter http://www.cs.queensu.ca/software_docs/gnudev/gcl-ansi/gcl_257.html
00:20 lambdabot Title: ANSI and GNU Common Lisp Document - eval-when, http://tinyurl.com/ghhar
00:21 TreyHarris SamB: macros should be like BEGIN blocks, as nondestructive as is possible.  people run perl -cw all the time, and actual code in BEGIN that causes problems when you do that is evil and should be stamped out.  same for code in macros
00:21 SamB it seems fairly complicated to figure out when to have your defmacros and such run
00:21 * TreyHarris will brb really now
00:21 SamB TreyHarris: I'm thinking like malicious code
00:21 TreyHarris SamB: i would assume the editor would run perl in safe mode
00:21 SamB TreyHarris: safe mode?
00:21 TreyHarris really really... i have to run, back in 10 ;-)
00:21 markstos joined perl6
00:22 putter TreyHarris: the other perl mode doesn't :)  but since it is a much more... low key, less ambitious mode, it ends up being unobtrusive.
00:22 SamB at least read macros are fairly rare in CL...
00:23 putter (something putter has always regretted :)
00:24 putter in a similar vein, and tying back to a conversation a few days ago,
00:26 putter currently there is the following, the editor edits a source file, the compiler knows line numbers and talks back to the editor (eg compile errors), the runtime knows line numbers and also talks back to the editor/ide (eg runtime errors), and the program has access to line number info.
00:27 putter The only missing part of that picture is that programs do not usually talk with editors.  Perhaps they should.  Especially if the editor can present nice alternate/suplemental views of code.
00:28 lownoma925 joined perl6
00:28 putter Oh, doc strings, especially when they can be modified at runtime, and accessed via an ide, are a similar thing.
00:28 markstos TreyHarris: Thanks for the eval/is context tip.
00:28 SamB hmm
00:29 markstos I would an example script in pugs that has as() in it, but that breaks now. Was as() renamed to something else ?
00:29 putter fmt
00:29 markstos s/would/found/
00:29 putter .as is now .fmt
00:29 stevan putter!
00:30 putter (i think, so I heard go by on the channel)
00:30 putter stevan! :)
00:30 markstos putter: I confirmed that works. Thanks.
00:30 TimToady thought I fixed all those a day or two ago.
00:30 stevan putter: I am planning on attending the Boston.pm meeting,... but not the Harvard one
00:30 SamB Boston.pm?
00:30 stevan putter: I assume I will see you there?
00:30 putter stevan:  :) :(
00:30 putter ;)
00:30 obra stevan: you're coming to town?
00:31 * SamB had no idea boston was so pathetic that you could implement it in a single module
00:31 stevan obra: yes sir
00:31 stevan obra: for the Damian talk next monday
00:31 putter stevan: most likely.  sure, if you're likely to be there.
00:31 obra stevan: maybe food or coffee or something?
00:31 stevan obra: defintely
00:31 obra cool!
00:31 frederico joined perl6
00:31 stevan :)
00:32 obra oh. I have a new toy.
00:32 obra "extract method" for perl5
00:32 svnbot6 r13549 | markstos++ | spiral_numbers.pl -> s/as(/fmt(/
00:32 putter mmm, foood
00:32 obra it writes out a method or function call, a sub wrapper and a subroutine signature
00:32 obra without PPI or B
00:32 stevan obra: yes, I saw Pier's blog post, but didnt look closely yet
00:32 obra :)
00:32 obra it's EEVIL
00:32 putter how?
00:32 stevan :)
00:33 obra hang on a sec for lighting talk url
00:33 putter ruby has evil.rb (with things like .become, and multiple inheritance).  maybe we need a Perl6::Evil:: to go with Acme?
00:34 stevan putter: Perl 6 *is* evil
00:34 stevan by its very nature
00:34 stevan thats why we all love it soo much
00:34 obra perl _5_ is evil
00:34 TimToady perl 6 is wicked cool
00:35 SamB the Evil Mangler is written in perl 5
00:35 obra TimToady: indeed it is. Perl 6 excites me a lot. And I'm more psyched than ever about it
00:35 SamB actually I was disappointed by how un-evil the Evil Mangler seems to be...
00:36 obra putter: if you have a mozilla based browser: http://fsck.com/~jesse/refactoring/extract_method/2006-eurooscon-lightining-talk/oscon-europe.2006.xul
00:36 lambdabot http://tinyurl.com/ghwca
00:36 SamB anyone looked at the evil mangler?
00:37 obra SamB: url?
00:37 * SamB calculates it
00:37 putter then again, I've never been entirely comfortable using "evil" in this context.  just because you happily tend to not need the word much in every day life doesn't mean it lacks a well defined meaning...  I wouldn't be a great fan of using genocide, rape, or ethnic cleansing as redefined words either... ah well, I'm a great fan of language evolution, so should just deal :)
00:38 SamB http://darcs.haskell.org/ghc/driver/mangler
00:38 lambdabot Title: Index of /ghc/driver/mangler
00:38 putter obra: looking...
00:38 SamB putter: nobody else wants to use those words for software either, afaik!
00:39 SamB cleansing, maybe! but not ethnic.
00:39 putter "Scares me" lol
00:39 SamB because software has no ethnicity
00:41 putter Oh, very cute. :)
00:41 lownoma925 any perl windows clients?
00:41 TreyHarris SamB: safe mode is how evalbot runs for instance.  certain operations (touching the filesystem or network, for instance) are disallowed entirely.  you'd want your editor to run perl that way, i think.  possibly with a global ignore-and-continue attached to the SafeException or whatever it's called...
00:41 obra putter: and it works :) which pleased me greatly
00:41 putter SamB:  :)
00:41 SamB TreyHarris: oh, point
00:41 putter err, the lol and cute were re obra. ;)
00:42 TreyHarris putter: I've found Object#instance_eval quite useful in ruby.  I'm still cogitating on whether we need it in Perl 6 or not
00:43 markstos obra: I read the slides, but I still didn't really "get" what the technique as good for. The example didn't grab me.
00:43 putter obra: putting on my encourage collegiality hat, was a dig at ruby really necessary?  ruby doesn't need to, because, like, it actually engineered that part nicely...
00:43 obra markstos: are you familiar with the 'extract method' refactoring pattern?
00:43 markstos No. That might be the problem...
00:44 SamB putter: your what hat?
00:44 obra putter: from talking to piers, who is lately a ruby person, apparently this is actually _hard_ in ruby
00:44 obra and it got people to giggle. even the ruby hackers.
00:44 obra it was all about getting people to giggle
00:44 obra markstos: "take some part of a method and pull it out into its own method"
00:44 markstos Got it.
00:44 obra the hard part is traditionally figuring out the method signature. "what vars does the code use?"
00:45 SamB hmm, aren't they supposed to be Peril Sensitive?
00:45 obra SamB: depends who you ask.
00:45 obra This was a "Sick Perl" talk
00:46 SamB is perl available with feelies?
00:47 putter SamB: encourage collegiality - eg, the perl and python folks would benefit from talking nicely about the common needs of their very similar languages, rather than silly sniping at each other all the time.  fortunately its gotten much better in recent years.
00:48 obra putter: think of it as good-natured ribbing.
00:48 obra they were telling me that they've been taking bets on whether p6 or ruby 2.0 comes out first
00:48 obra Their money is apparently all on Perl 6
00:49 putter obra: re hard, err, no... oh, but I have a working Ripper.  so easy in 2.0, less so in current release.  though even there... one sec
00:49 putter http://www.zenspider.com/ZSS/Products/ParseTree/
00:49 lambdabot Title: ParseTree, http://tinyurl.com/oz9nd
00:50 putter that sufficient?
00:50 TreyHarris obra: i lost the referent there.  who was "they" who were betting on Perl 6?
00:50 obra "  * Only works on methods in classes/modules, not arbitrary code.
00:50 obra putter: that implies that no, it's not
00:51 SamB obra: how will anyone get any money for winning if noone bets on Ruby 2.0
00:51 obra but. I was only talking about that one technique. as ruby has no 'strict'
00:51 putter obra: re giggles, :)
00:51 obra SamB: I don't believe anyone cares about winning money
00:51 obra TreyHarris: Ruby hackers
00:51 markstos I'm trying to install v6.pm plus dependencies into a local (non-system) directory, and I can't figure out a good/easy way to do that.
00:51 markstos The Module::Install docs seem to focus on how to build a Makefile.PL, rather than how to use one.
00:52 SamB can we still snipe at ruby people for having such goofy closures?
00:52 obra markstos: "perl Makefile.PL"
00:52 SamB or maybe at ruby anyway?
00:52 markstos obra: huh? perl Makefile.PL just starts the process of attempting to install in system-wide directories.
00:53 putter re only class/modules, though that of course is not a large restriction in ruby :).  though it does have some other unfortunate aspects - it deals with ast rather than source, which is often a very one-way lossy transformation (src->ast that is).
00:53 obra ah. sorry. it supports PREFIX like MakeMaker
00:53 putter s/it does/parsetree does/
00:53 TreyHarris markstos: perl Makefile.PL PREFIX=~/lib/perl or whatever
00:53 markstos TreyHarris: Thanks.
00:53 obra but if you're up for writing more docs, markstos, I'll happily commit them for you
00:54 putter SamB: 2.0 has a real lambda.
00:54 SamB how about perl hackers? can I snipe at perl hackers?
00:54 TreyHarris does 2.0 have a strict?  that bit me so many times....
00:54 * SamB is a python-er hacker
00:55 * SamB is a Haskellite now though
00:55 putter TreyHarris: don't know, sorry
00:56 TreyHarris ok, time to go for real this time, only an hour after i said i would.... &
00:56 putter re collegiality, besides, once Language::*::OnPerl6 starts getting populated, ruby/perl/tcl/php etc programmers will *be* p6 programmers :)
00:57 putter TreyHarris: bye
00:58 putter obra: re ruby source transformation - so the real answer is ruby 2.0 will have a working Ripper module, which will do whitespace preserving source->ast which can be losslessly unparsed back to source.
00:58 SamB putter: I notice the absense of Python on that list
00:58 putter one advantage of having a language which is "parse completely before execute"
00:59 putter python too, definitely.
00:59 obra putter: I hear 5.10 will get you roughly that too
00:59 putter actually, the second one, "perl", should have been "python", but "p" misindexed.
01:00 putter re 5.10, refactorable perl?  oh my.
01:02 putter the ability to take cpan modules whose authors were on acid, err, who have... rich creative personal styles, and boil them down to some standard perl?
01:02 obra putter: MAD_PROPS will get you a sane AST you can munge
01:02 obra lwall++ # Mad props
01:03 * putter wonders if p6 will need a "standard p6" definition, to avoid businesses... and villagers, from being scared of by peoples unicode macro parser-mod games.
01:03 putter obra: but can you get losslessly back to source?
01:04 theorbtwo putter: Yes.
01:04 obra putter: I defer to TimToady
01:04 theorbtwo I'm less then sure he's still awake.
01:06 theorbtwo Er, s/awake/with us/, since I suppose he's not in anything close to this TZ (GMT).
01:06 putter obra: re when 2.0 comes out, curious, I hadn't heard it was an issue.  ruby vcs head is fairly usable, and is draft 2.0, so I think of my self a usually using 2.0.  (forced to it by the need for real lambda)
01:07 putter TreyHarris: instance_eval++
01:08 putter re 2.0, also, until it comes out, I can retain hope that the "objects can't be nil, so you simply can't create real proxy objects" bug will be fixed.
01:12 stevan obra: extract_method++
01:12 stevan so very cool :)
01:13 obra stevan: next challenge: rename_variable
01:13 obra and rename_subroutine
01:13 obra oh god.
01:14 obra I think I know how to do a credible rename_subroutine, assuming proper test coverage.
01:14 putter lol
01:15 obra UNIVERSAL::AUTOLOAD + Carp to find calls.
01:15 putter fglock, etal: rules don't backtrack anymore?!?  or r13533 was just a quick workaround?
01:15 * stevan slowly backs away from obra
01:15 stevan although it would probably work ;)
01:15 obra stevan: I'm feeling very machiavellian about refactoring
01:15 obra The Ends Justify the Hacks
01:16 stevan The Ends Jiftify the Hacks :)
01:16 obra I think I really want B::Deparse or MADPROPS here.
01:16 theorbtwo You can do quite a bit with iterating over the opcode tree and asking via B what function is really going to be called.
01:16 theorbtwo That'll help for renaming functions, but not methods, obviously.
01:16 stevan theorbtwo: how does it handle methods though?
01:17 theorbtwo Heh.
01:17 putter "assuming proper test coverage" sounds sort of like the head of Boeing saying their lobbying wasn't problematic because of the... wisdom and judgment of our congressional representatives.  everyone was too polite to ask why an engineer was building on counterfacturals ;)
01:17 stevan obra: the only problem with UNIVERSAL::AUTOLOAD is if there is another AUTOLOAD in the class hierarchy
01:18 stevan that could get hairy
01:18 obra mm.
01:18 stevan however,.. doing a swap might work
01:18 stevan my $old = \&foo;
01:18 obra *nod* a swap does feel cleaner.
01:18 stevan *foo = sub { print 'rappin'; $old->(@_) }
01:18 stevan *bar = $old;
01:18 obra I'd been starting to go there, but I got distracted by the evil
01:18 obra nah. you don't want a pure swap
01:18 obra you want to die instead of wrap
01:19 obra and trap the errors ala this code
01:19 stevan true
01:19 * stevan smells a hackathon coming on monday night :)
01:20 obra oo.
01:20 obra ok. sleep time for me. i'm still in the uk
01:21 stevan cheerio then,.. I am off to watch a movie myself
01:21 obra enjoy
01:22 obra . o O {We might be albe to use ACK}
01:22 Aankhen`` joined perl6
01:23 theorbtwo ACK?
01:23 * putter wonders why folks are so enthused by non-backtracking.  LR(1) is so rarely what one wants.
01:24 obra ACK == petdance's too
01:24 obra tool
01:24 SamB dunno!
01:24 * SamB likes happy fairly well
01:25 rodi joined perl6
01:27 frederico joined perl6
01:41 markstos Has collapse() been renamed to something ?
01:44 kanru joined perl6
01:55 weinig is now known as weinig|exhausted
02:02 mjk joined perl6
02:09 svnbot6 r13550 | fglock++ | Pugs-Compiler-Rule - more detailed quantifier parsing;
02:09 svnbot6 r13550 | fglock++ |   added '**{range}' quantifier (needs emitter support)
02:21 kanru2 joined perl6
02:30 mako132_ joined perl6
02:33 mako132_ joined perl6
02:49 avarab joined perl6
02:58 mdiep joined perl6
03:01 avarab_ joined perl6
03:03 cognominal joined perl6
03:04 evalbot_r13548 is now known as evalbot_r13550
03:07 TreyHarris what is collapse()?
03:09 fglock joined perl6
03:11 weinig|exhausted is now known as weinig|zZz
03:16 fglock joined perl6
03:17 azr|elious joined perl6
03:20 TreyHarris joined perl6
03:28 fglock putter: re non-backtracking - plain 'regex' backtracks; 'token' and 'rule' are mostly used to write parsers, and only backtrack where they are told to
03:29 bsb joined perl6
03:29 ingy hola good folk
03:29 ingy anyone know a module that can easily trace my subroutine calls
03:30 ingy possibly with input and output values
03:30 ingy possibly indented by level
03:31 ingy I'm looking for such a module most excellent
03:34 fglock Devel::Trace almost does that - you would need to supress non-calls
03:35 Qiang_ joined perl6
03:35 audreyt Devel::SimpleTrace too
03:36 fglock 'trace subroutine' in search cpan has quite a few modules - all new to me
03:37 fglock "Debug::Trace instruments subroutines to provide tracing information upon every call and return"
03:39 fglock ingy: are you translating pyyaml to perl5?
03:41 ingy fglock: yeah
03:42 fglock I looked at the code - it is quite big - I wonder if writing a python translator reusing the v6.pm infrastructure would be too difficult
03:43 ingy fglock: I thought of that but I'm not sure it's a good way to go
03:44 ingy I've been doing all the porting by hand and while it is pretty one to one there are somethings that might be hard to detect
03:44 TreyHarris ?eval Test::is(3, 3, 'yes')
03:44 evalbot_r13550 Error: No compatible subroutine found: "&Test::is"
03:44 ingy I could be wrong
03:44 ingy Debug::Trace rquires me to name the subs I want to trace
03:44 ingy ick
03:45 ingy I want to say "trace all the subs in modules beginning 'YAML::'"
03:45 fglock it would be interesting if you could document some of these problems - I'd like to give it a try
03:46 mugwump I have most of the YAML spec as perl5 regex somewhere, been meaning to translate it to rules
03:46 mugwump doing the CFG nesting and item productions were a bit insane and didn't get finished
03:46 ingy fglock: my idea was port it first, then use that as a test result to try to translate to
03:47 TreyHarris hi, audreyt!  been busy with $job?
03:47 ingy but mostly I am trying not to get sidetracked by temptations like this
03:47 ingy :P
03:49 ingy hi mugwump
03:49 Yappo joined perl6
03:49 mugwump howsit, ingy ?
03:49 ingy I saw naked lunch last night
03:49 mugwump excellent
03:49 ingy audreyt: Devel::SimpleTrace looks not what I want
03:50 ingy WHY HASN'T THIS BEEN WRITTEN???!!!
03:50 mugwump perl -d with trace on?
03:50 ingy yeah it was a cool movie
03:51 audreyt Devel::STrace?
03:51 ingy I want a nice indented log of sub calls
03:51 fglock ingy: agreed - I was implementing eval(:lang<yaml>) today, and I was wondering about :lang<python> and such
03:51 ingy devel::strace has binary output I think
03:52 audreyt oh. indented
03:52 audreyt Devel::TraceSubs has that
03:52 audreyt Devel::TraceCalls has limiting-concern API
03:52 TreyHarris ?eval sub moose (Bool $red) { say "{$red ?? 'red' !! 'black'}" } ; moose(undef)
03:52 evalbot_r13550 OUTPUT[black ] Bool::True
03:53 TreyHarris ?eval sub moose (Bool $red) { say "{$red ?? 'red' !! 'black'}" } ; &moose.call(\(undef))
03:53 evalbot_r13550 pugs: src/Pugs/Val.hs:(97,4)-(98,39): Non-exhaustive patterns in function asBit
03:53 TreyHarris what's that last errmsg mean?
03:53 ingy Devel::TraceSubs!
03:53 ingy my faith in the community is restored
03:53 ingy I was about to have a coniption
03:53 audreyt TreyHarris: a sec
03:54 audreyt what is this coniption thing?
03:54 TreyHarris conniption, a fit of rage or hysterics
03:54 ingy fglock: http://svn.yaml.com/repo/trunk/PlYaml/lib/YAML/Scanner.pm
03:54 lambdabot http://tinyurl.com/j27gb
03:55 ingy fglock: as you can see I am porting with all the original Python inline
03:55 ingy fglock: so that is basically my porting notes
03:55 ingy I'll also make secial notes for the weird cases.
03:56 ingy for the most part Python is very translatable
03:56 ingy but again, I don't want to get into this fun experimenting until my work is done
03:56 fglock ingy: that helps a lot - thanks!
03:57 ingy fglock: I am using a special YAML::Base to ease the OO pain. (ala Spiffy but not using Spiffy)
03:57 christopher joined perl6
03:58 ingy basically just exporting 'field' everywhere and doing a %INC trick to make -base work with inline classes
03:59 justatheory joined perl6
03:59 ingy python seems to use classes and objects a lot more than a perl hacker would
03:59 ingy I assume objects are much lighter weight in Python
04:00 ingy pyyaml's only pitfall (IMHO) is the typical Python thing of importing whole big classes into other big classes
04:01 ingy so there is a Parser and a Scanner, but instead of making a Scanner object for the Parser to talk to, Parser just imports all of Scanner into it
04:02 ingy which makes it hard to figure out which parts are from where
04:02 ingy I mean the whole idea of having abstractions is to keep things separated
04:02 ingy maybe I'm just a grumpy old fart
04:05 fglock mm - maybe importing is related to making method dispatch lighter weight
04:07 ingy fglock: it does have that effect, yes...
04:07 ingy $parser->scanner->next_token
04:07 ingy becomes $parser->next_token
04:09 audreyt TreyHarris: try r13551
04:09 svnbot6 r13551 | audreyt++ | * Handle asBit for VUndef and VNative cases.
04:10 TreyHarris audreyt: thanks... do i want to know why that meant you couldn't use undef in captures?
04:10 audreyt you can
04:10 audreyt it's just the ~undef coerce wasn't written
04:10 audreyt someone as being too lazy
04:10 audreyt probably me.
04:11 TreyHarris ?eval my $capt = \(1,2,3); [,] $capt
04:11 audreyt I mean ?undef.
04:11 evalbot_r13550 (CaptSub {c_feeds = [MkFeed {f_positionals = [VPure (IFinite 1),VPure (IFinite 2),VPure (IFinite 3)], f_nameds = {}}]},)
04:11 * TreyHarris nods
04:11 TreyHarris hmmm... how do I get 1,2,3 back out of $capt?
04:12 fglock audreyt: btw, i implemented Match.yaml today
04:13 fglock audreyt: we could agree on Match internals to make translation easier
04:13 ingy fglock: what's that?
04:13 audreyt fglock: oooh nice
04:13 audreyt fglock: then I can make use of the Capture field too
04:13 audreyt $$/ that is
04:14 fglock ingy: Match == object returned by Rules
04:14 audreyt I'd be happy to use whatever you come up with but, I need to run now, already late for $job :)
04:14 audreyt bbl
04:14 fglock audreyt: ok
04:16 TreyHarris fglock: do you have any idea how i can get 1,2,3 back out of $capt?  given that | doesn't exist yet?
04:16 ingy [particle]: pin
04:16 ingy g
04:17 ingy seen [particle]
04:17 jabbot ingy: [particle] was seen 7 hours 35 minutes 48 seconds ago
04:17 fglock TreyHarris: looking
04:21 fglock ?eval my $capt = \(1,2,3);  $capt[1]
04:21 evalbot_r13550 \undef
04:22 fglock mm - it doesn't behave like Match
04:23 TreyHarris yeah... i was trying to write a test for the now-implemented .call, but i can't figure out how to actually pass the capture .call requires
04:23 audreyt it should, it just doesn't yet.
04:24 TreyHarris oh, ok.
04:24 audreyt ?eval sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\(undef))
04:24 evalbot_r13550 pugs: src/Pugs/Val.hs:(97,4)-(98,39): Non-exhaustive patterns in function asBit
04:24 audreyt ?eval sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\(1))
04:24 evalbot_r13550 OUTPUT[1 ] Bool::True
04:25 fglock ?eval my $capt = \(1,2,3);  $capt -> @a { say @a }    # bind to a signature
04:25 evalbot_r13550 Error:  Unexpected "->" expecting comment, operator, statement modifier, ";" or end of input
04:25 TreyHarris sure, but i meant as a non-literal capture
04:25 audreyt ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call($c)
04:25 evalbot_r13550 pugs: don't know how to toVV': VRef <Scalar:0xb79a9f04>
04:26 audreyt hm. that's pretty broken.
04:26 audreyt sorry, really gotta run. bbiab :)
04:27 fglock gotta sleep :)
04:27 TreyHarris fglock: sweet dreams!
04:27 TreyHarris phew, i'm just glad it's actually broken and it wasn't just me being stupid :-)
04:27 fglock &
04:27 fglock left perl6
04:34 simcop2387 joined perl6
04:35 evalbot_r13550 is now known as evalbot_r13551
04:35 putter joined perl6
04:35 putter oh, fribble.  just missed fglock. :(
04:36 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call($c)
04:36 evalbot_r13551 pugs: don't know how to toVV': VRef <Scalar:0xb7aa9f04>
04:36 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\(undef))
04:36 evalbot_r13551 OUTPUT[2 ] Bool::True
04:36 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\1)
04:36 evalbot_r13551 pugs: don't know how to toVV': VRef <Scalar::Const:0xb7b426f8>
04:36 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\(1))
04:37 evalbot_r13551 OUTPUT[1 ] Bool::True
04:37 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\$c)
04:37 evalbot_r13551 pugs: don't know how to toVV': VRef <Scalar::Const:0xb7acb498>
04:37 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call(\($c))
04:37 evalbot_r13551 pugs: don't know how to toVV': VRef <Scalar:0xb79a9a90>
04:38 putter fglock, audreyt: a while back in t/rules there was a p6 transliteration of p5's re_tests (which still exists in munged form at t/rules/perl5_\d.t).  My very fuzzy recollection is I did one, and then someone else did a better one, or cleaned it up, or some such.  It's not there now.  Any idea what happened to it?
04:38 svnbot6 r13552 | audreyt++ | * in .call, both the cv and the capt are rvalue
04:39 putter Did it get deleted in one of the "oh, we can just move all this stuff to parrot and not worry about it" things?
04:42 putter Ah well.  I'll look for it tomorrow.  I just started looking at the PCR runtime.  I wanted to do a time trial against re_tests to get a feel for its performance.
04:42 putter Perhaps it got t_disabled at some point when PGE was choking on it, and disappeared from there?
04:44 putter I'll look later.  Just thought someone might remember.  Tnx.
04:44 putter g'night &
04:46 TreyHarris ?eval 1
04:46 evalbot_r13551 is now known as evalbot_r13552
04:46 evalbot_r13552 1
04:46 TreyHarris ?eval my $c = \(1); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call($c)
04:46 evalbot_r13552 OUTPUT[1 ] Bool::True
04:46 TreyHarris ?eval my $c = \(undef); sub f (Bool $x) { say ($x ?? 1 !! 2) }; &f.call($c)
04:46 evalbot_r13552 OUTPUT[2 ] Bool::True
04:48 TreyHarris audreyt++
05:12 iblechbot joined perl6
05:12 christopher The tests for v6 Test.pm are very confusing, as documentation.
05:12 christopher For some of them, failure is the _desired effect_
05:12 christopher and this is indicated by a :todo mark.
05:14 BooK__ joined perl6
05:17 christopher something like Test::Warn is needed to check that fails happen correctly...
05:24 dj_goku_ joined perl6
05:24 BooK__ joined perl6
05:24 iblechbot joined perl6
05:24 simcop2387 joined perl6
05:24 justatheory joined perl6
05:24 christopher joined perl6
05:24 Yappo joined perl6
05:24 Qiang_ joined perl6
05:24 bsb joined perl6
05:24 TreyHarris joined perl6
05:24 azr|elious joined perl6
05:24 cognominal joined perl6
05:24 avarab_ joined perl6
05:24 mdiep joined perl6
05:24 kanru2 joined perl6
05:24 mjk joined perl6
05:24 Aankhen`` joined perl6
05:24 weinig|zZz joined perl6
05:24 awwaiid joined perl6
05:24 SubStack joined perl6
05:24 buubot joined perl6
05:24 mako132 joined perl6
05:24 araujo joined perl6
05:24 Patterner joined perl6
05:24 mauke joined perl6
05:24 crem joined perl6
05:24 zeriod joined perl6
05:24 kane-xs_ joined perl6
05:24 masak joined perl6
05:24 ayrnieu joined perl6
05:24 scw joined perl6
05:24 f0rth joined perl6
05:24 plural joined perl6
05:24 xerox joined perl6
05:24 ajs_ joined perl6
05:24 idiotmax joined perl6
05:24 ruz joined perl6
05:24 lisppaste3 joined perl6
05:24 stevan joined perl6
05:24 webmind joined perl6
05:24 gugod joined perl6
05:24 baest joined perl6
05:24 mtve joined perl6
05:24 ofer0 joined perl6
05:24 Eidolos joined perl6
05:24 nothingmuch joined perl6
05:24 wilx joined perl6
05:24 jdv79 joined perl6
05:24 theorbtwo joined perl6
05:24 glasser joined perl6
05:24 lampus joined perl6
05:24 miyagawa_ joined perl6
05:24 thepler joined perl6
05:24 lumi joined perl6
05:24 TimToady joined perl6
05:24 cookys joined perl6
05:24 szabgab joined perl6
05:24 amv joined perl6
05:24 norageek joined perl6
05:24 [particle] joined perl6
05:24 Khisanth joined perl6
05:24 c6rbon joined perl6
05:24 gaal joined perl6
05:24 revdiablo joined perl6
05:24 PerlJam joined perl6
05:24 pjcj joined perl6
05:24 xinming_ joined perl6
05:24 evalbot_r13552 joined perl6
05:24 buu joined perl6
05:24 autark joined perl6
05:24 xern joined perl6
05:24 frankg joined perl6
05:24 mollmerx joined perl6
05:24 LCamel joined perl6
05:24 dvorak joined perl6
05:24 spoop joined perl6
05:24 rafl joined perl6
05:24 Teratogen joined perl6
05:24 perlbot joined perl6
05:24 prism joined perl6
05:24 drbean joined perl6
05:24 rafl_ joined perl6
05:24 spinclad joined perl6
05:24 nine joined perl6
05:24 hcchien joined perl6
05:24 cj joined perl6
05:24 kolibrie joined perl6
05:24 orafu joined perl6
05:24 statico joined perl6
05:24 jabbot joined perl6
05:24 Southen joined perl6
05:24 meppl joined perl6
05:24 gantrixx joined perl6
05:24 kalven joined perl6
05:24 svnbot6 joined perl6
05:24 Grrrr joined perl6
05:24 ajs_home joined perl6
05:24 nnunley joined perl6
05:24 takanori_ joined perl6
05:24 nperez joined perl6
05:24 ingy joined perl6
05:24 qmole joined perl6
05:24 Maddingue joined perl6
05:24 kcwu joined perl6
05:24 pmurias joined perl6
05:24 broquaint joined perl6
05:24 clkao joined perl6
05:24 obra joined perl6
05:24 wolverian joined perl6
05:24 audreyt joined perl6
05:24 jiing joined perl6
05:24 cmarcelo joined perl6
05:24 rgs joined perl6
05:24 leo joined perl6
05:24 chip joined perl6
05:24 pmichaud joined perl6
05:24 Juerd joined perl6
05:24 Shabble joined perl6
05:24 dj_goku_ is now known as dj_goku
05:24 silug joined perl6
05:25 TreyHarris typically, the person implementing a new test will run it to be sure it fails (assuming it documents an unimplemented feature or a bug), and if it's for a feature, then :todo<feature> it.  :todo<bug> is occassionally used when a bug requires large-scale changes to fix it, but it's much less common--ordinarily actual bugs are left un-todo'd
05:26 TreyHarris a new failing test is a sign to the compiler implementers that something went wrong with their work and they need to look at the test.  so we don't do that for tests that won't work until something new is implemented.
05:26 TreyHarris does all that make sense?
05:26 christopher TreyHarris: take a look at the lives_ok and dies_ok tests
05:26 christopher in ext/Test/t/1-basic.t
05:27 christopher you can't simply put "ok ! dies_ok", because the dies_ok counts as a test too
05:27 christopher and you can't put lives_ok, to test "not dies_ok"
05:28 christopher because you want to test the dies_ok function
05:28 Yappo joined perl6
05:28 lambdabot joined perl6
05:29 TreyHarris christopher: i don't see what you're talking about.  what revision of ext/Test/t/1-basic.t are you looking at?
05:30 christopher r13552
05:30 TreyHarris how odd.  I don't see "ok ! dies_ok" anywhere in that file
05:30 christopher no, it's not there
05:30 christopher but look for example at line 23
05:31 christopher that test is intended to test that 2+2 == 5 doesn't satisfy ok, I think
05:32 christopher (! dies_ok was just a reference to what I think you were suggesting I change these too)
05:33 TreyHarris oh, i see
05:34 TreyHarris how would you check that ok does not return ok when its argument is false?
05:35 christopher In my local copy, I tried adding a "invert_tests" variable, that gets checked right before Test::Proclaim
05:35 christopher and you could set this locally in a block, if you wanted to do these kinds of tests
05:35 TreyHarris that would not be valid.  you can't change code you're testing in your unit test
05:35 TreyHarris you need to have a failing test, and be sure it fails
05:35 TreyHarris :todo does that
05:36 christopher It's $Test::invert_tests
05:36 christopher This isn't really a problem for testing any module but Test.pm itself, I think.
05:36 TreyHarris an "unexpectedly suceeding" would be something audreyt and so on would notice right away--in Test.pm, that would indicate a "failure" as well
05:37 christopher I would revise Test.pm so that "ok" and "not ok" are switched when $Test::invert_tests is set
05:37 christopher so that 1-basic.t should produce entirely OK if it entirely works
05:38 TreyHarris that is not valid.  if Test.pm fails, then we're in big trouble.  it's very important that its tests exercise every function in a way no different from how it's used.  and one of the things we must exercise it a failing test.  if you switch it so every test succeeds, then we haven't exercised that code.
05:39 christopher TreyHarris: Test.pm isn't being exercised by its unit tests _now_.
05:39 christopher After the "invert" switch, you'd at least be able to test that tests that are supposed to fail, do fail.
05:40 christopher Right now, 1-basic.t does not document when dies_ok is supposed to fail.
05:40 christopher Right now, 1-basic.t does not document when any test is supposed to fail, because such tests are marked :todo.
05:41 christopher The results of 1-basic.t have to be interpreted differently from those of any other test in the p6 system that I'm aware of.
05:41 christopher (currently, that is)
05:41 TreyHarris i'm sorry, I guess I'm just confused.  right now, ok(2+2==5) fails.  it's marked :todo so that the test *harness* accepts that failure as success.  if ok(2+2 == 5), then it would unexpectedly succeed, and the harness would warn about that.
05:42 christopher The different interpretation is right there: "it's marked :todo so that the test *harness* accepts that failure as success."
05:43 christopher Usually, ":todo" means that "passing would be correct behavior, but we haven't implemented correct behavior yet."
05:43 TreyHarris the way you're describing your invert toggle, it sounds like Test::proclaim would never receive a :cond(Bool::False).  is that correct?
05:43 christopher No, the toggle would just apply C<not> to $cond.
05:44 christopher I don't think the toggle's the right solution, really, but possibly an incremental improvement.
05:46 christopher Really, I think each of the tests in 1-basic.t should be in a block, and stderr grepped for "ok", "not ok", or any other messages of interest.
05:46 christopher Hence the Test::Warn suggestion.
05:46 TreyHarris i think the *right* solution if you're really unhappy with this overloading of :todo, and changing it to :todo<notReallyJustTesting> or putting big fat comments wouldn't make you happy either, is to create a test file not ending in .t, and then create a .t that runs the test file and scrapes its returns
05:47 christopher That would work.  I'm happy with :todo<notReallyJustTesting> too.
05:47 christopher (I think.  I'm not sure how the :todo mechanism was intended to be tested.)
05:48 TreyHarris a Test::Warn-like solution is a bit fragile in pugs... you've probably noticed how often messages change :-)
05:49 christopher Regexes would make it less fragile, but that would increase the barrier to an implementation being able to 'use Test'.
05:51 agentzh joined perl6
05:57 agentzh joined perl6
05:57 lambdabot joined perl6
05:57 Yappo joined perl6
05:57 dj_goku joined perl6
05:57 BooK__ joined perl6
05:57 iblechbot joined perl6
05:57 simcop2387 joined perl6
05:57 justatheory joined perl6
05:57 christopher joined perl6
05:57 Qiang_ joined perl6
05:57 bsb joined perl6
05:57 TreyHarris joined perl6
05:57 azr|elious joined perl6
05:57 cognominal joined perl6
05:57 avarab_ joined perl6
05:57 mdiep joined perl6
05:57 kanru2 joined perl6
05:57 mjk joined perl6
05:57 Aankhen`` joined perl6
05:57 weinig|zZz joined perl6
05:57 awwaiid joined perl6
05:57 SubStack joined perl6
05:57 buubot joined perl6
05:57 mako132 joined perl6
05:57 araujo joined perl6
05:57 Patterner joined perl6
05:57 mauke joined perl6
05:57 crem joined perl6
05:57 zeriod joined perl6
05:57 kane-xs_ joined perl6
05:57 masak joined perl6
05:57 ayrnieu joined perl6
05:57 scw joined perl6
05:57 f0rth joined perl6
05:57 plural joined perl6
05:57 xerox joined perl6
05:57 ajs_ joined perl6
05:57 idiotmax joined perl6
05:57 ruz joined perl6
05:57 lisppaste3 joined perl6
05:57 stevan joined perl6
05:57 webmind joined perl6
05:57 gugod joined perl6
05:57 baest joined perl6
05:57 mtve joined perl6
05:57 ofer0 joined perl6
05:57 Eidolos joined perl6
05:57 nothingmuch joined perl6
05:57 wilx joined perl6
05:57 jdv79 joined perl6
05:57 theorbtwo joined perl6
05:57 glasser joined perl6
05:57 lampus joined perl6
05:57 miyagawa_ joined perl6
05:57 thepler joined perl6
05:57 lumi joined perl6
05:57 TimToady joined perl6
05:57 cookys joined perl6
05:57 szabgab joined perl6
05:57 amv joined perl6
05:57 norageek joined perl6
05:57 [particle] joined perl6
05:57 Khisanth joined perl6
05:57 c6rbon joined perl6
05:57 gaal joined perl6
05:57 revdiablo joined perl6
05:57 PerlJam joined perl6
05:57 pjcj joined perl6
05:57 xinming_ joined perl6
05:57 evalbot_r13552 joined perl6
05:57 buu joined perl6
05:57 autark joined perl6
05:57 xern joined perl6
05:57 frankg joined perl6
05:57 mollmerx joined perl6
05:57 LCamel joined perl6
05:57 dvorak joined perl6
05:57 spoop joined perl6
05:57 rafl joined perl6
05:57 Teratogen joined perl6
05:57 perlbot joined perl6
05:57 prism joined perl6
05:57 drbean joined perl6
05:57 rafl_ joined perl6
05:57 spinclad joined perl6
05:57 nine joined perl6
05:57 hcchien joined perl6
05:57 cj joined perl6
05:57 kolibrie joined perl6
05:57 orafu joined perl6
05:57 statico joined perl6
05:57 jabbot joined perl6
05:57 Southen joined perl6
05:57 meppl joined perl6
05:57 gantrixx joined perl6
05:57 kalven joined perl6
05:57 svnbot6 joined perl6
05:57 Grrrr joined perl6
05:57 ajs_home joined perl6
05:57 nnunley joined perl6
05:57 takanori_ joined perl6
05:57 nperez joined perl6
05:57 ingy joined perl6
05:57 qmole joined perl6
05:57 Maddingue joined perl6
05:57 kcwu joined perl6
05:57 pmurias joined perl6
05:57 broquaint joined perl6
05:57 clkao joined perl6
05:57 obra joined perl6
05:57 wolverian joined perl6
05:57 audreyt joined perl6
05:57 jiing joined perl6
05:57 cmarcelo joined perl6
05:57 rgs joined perl6
05:57 leo joined perl6
05:57 chip joined perl6
05:57 pmichaud joined perl6
05:57 Juerd joined perl6
05:57 Shabble joined perl6
05:59 agentzh *cough*
05:59 christopher TreyHarris: Thanks for the clarification.  I'll just add a comment to 1-basic.t instead of changing anything.
06:01 TreyHarris christopher: sure, sorry to have been a bit patronizing, i didn't recognize you by nick
06:02 svnbot6 r13553 | malon++ | ext/Test/t/1-basic.t - describe the strange use of ':todo' in this file
06:02 christopher TreyHarris: np
06:09 agentzh cron on feather says: "info: 453 smartlinks found and 50 broken." :)
06:12 b00t joined perl6
06:15 TreyHarris agentzh: larry made a lot of changes in introducing |
06:16 agentzh joined perl6
06:17 agentzh TreyHarris: yes, i've seen that in my mailbox. :)
06:18 agentzh | is much more concise than the ugly [,] :)
06:23 TreyHarris yes :-)
06:24 TreyHarris hah, is jonathan lang on here?
06:27 TreyHarris i was writing more or less exactly his question about first capture being invocant or first positional
06:29 TreyHarris that's just insane-crazy.  i used the migration assistant to move my files from my old (panther OS X 10.3) iMac to my new (tiger 10.4) mac mini.  it moved my sshd settings and public/private keys!
06:29 * TreyHarris does the happy dance
06:39 TimToady t/xx-uncategorized/rule_recursive.t is looping.  stopped it after 15 minutes of CPU
06:40 Eidolos You need to give infinite loops at least an hour to finish up.
06:42 kanru2 is now known as kanru
06:45 dj_goku joined perl6
06:45 simcop2387 joined perl6
06:45 f0rth joined perl6
06:45 ajs_ joined perl6
06:45 idiotmax joined perl6
06:45 webmind joined perl6
06:45 wilx joined perl6
06:45 jdv79 joined perl6
06:45 lampus joined perl6
06:45 lumi joined perl6
06:45 TimToady joined perl6
06:45 [particle] joined perl6
06:45 evalbot_r13552 joined perl6
06:45 dvorak joined perl6
06:45 perlbot joined perl6
06:45 rafl_ joined perl6
06:45 hcchien joined perl6
06:45 cj joined perl6
06:45 kolibrie joined perl6
06:45 meppl joined perl6
06:45 gantrixx joined perl6
06:45 nperez joined perl6
07:18 marmic joined perl6
07:29 simcop2387 left perl6
07:34 zakharyas joined perl6
07:51 kane-xs joined perl6
07:52 drrho joined perl6
08:00 weinig joined perl6
08:07 Gothmog__ joined perl6
08:11 [MaKuBeX] joined perl6
08:12 [MaKuBeX] Visit http://www.omgema.lt  itÿs good . Have a nice day!
08:12 lambdabot Title: .: OMgema :.
08:12 [MaKuBeX] left perl6
08:20 gerard joined perl6
08:29 gerard hi
08:44 penk joined perl6
08:48 [mago] joined perl6
08:48 ludan joined perl6
08:48 ludan hola
09:20 gerard is now known as mezelf
09:27 chris2 joined perl6
09:30 b00t joined perl6
09:33 polettix joined perl6
09:48 GeJ joined perl6
09:50 ruoso joined perl6
09:55 sri_ joined perl6
10:09 elmex joined perl6
10:14 mdiep_ joined perl6
10:17 chris2 joined perl6
10:19 buetow joined perl6
10:23 mschmidt joined perl6
10:35 silug joined perl6
10:44 amv joined perl6
11:41 markstos joined perl6
12:10 xinming joined perl6
12:11 Limbic_Region joined perl6
12:19 Fuzie joined perl6
12:30 lanny joined perl6
12:31 lanny @seen gaal
12:31 lambdabot gaal is in #perl6 and #haskell. I don't know when gaal last spoke.
12:31 lanny @seen audreyt
12:31 lambdabot audreyt is in #perl6, #ghc and #haskell. I don't know when audreyt last spoke.
12:31 Limbic_Region lanny - you also know about the irc logs right?
12:32 lanny Read em first before  I log on.
12:32 audreyt greetings.
12:32 Limbic_Region ;-)
12:32 lanny Just skimmed em today though.  Can often catch those  two in local morning.
12:32 audreyt I'm massively enjoying http://www.perl.com/lpt/a/983 :)
12:32 lambdabot Title: Perl.com: The State of the Onion 10
12:33 lanny Hi, audreyt.  Was wondering if you can give some direction on putting things in the prelude.  My simple examples don't seem to work.
12:33 Limbic_Region audreyt - the cygwin ghc you linked for me is source only (not bin dist) - which doesn't help since I need an existing ghc to build
12:33 audreyt also, alloced $job-free time from Sunday on to Wednesday morning, to finally get releng done
12:33 Limbic_Region and as of yet, no response from cvs-ghc dev list
12:33 * Limbic_Region is going to whine a little louder today
12:34 Limbic_Region woot
12:34 Limbic_Region audreyt++
12:34 audreyt lanny: nopaste the diff?
12:34 Limbic_Region audreyt - you may be mildly interested in http://parenscript.org/
12:35 lambdabot Title: ParenScript
12:35 lanny Let  me dig it up.
12:35 audreyt Limbic_Region: yeah, but Scheme2Js is more complete
12:35 audreyt (and easier imho to work with)
12:36 lanny ## srand and rand
12:36 lanny Nope.  How does one paste into the #perl6?  cut-n-paste on this mac doesn't seem to do it
12:37 audreyt nopaste :)
12:37 TreyHarris perlbot: paste
12:37 perlbot Paste your code to http://sial.org/pbot/perl or http://erxz.com/pb and #perl will be able to view it.
12:37 lambdabot Title: sial.org Pastebot - pasteling
12:38 pasteling "lanny" at 206.109.40.208 pasted "simple prelude entries" (13 lines, 175B) at http://sial.org/pbot/19877
12:38 lanny magic.
12:38 TreyHarris bleh.  setup the new computer and was very eager to see how fast compile and smoke took... but getting "Setup: cannot satisfy dependency mtl-any" again.  i followed the instructions that worked for me the first time downloading extra-libs and using runhaskell to buld and install mtl and network...
12:39 audreyt lanny: "is builtin"
12:39 lanny aha.
12:39 audreyt otherwise they became Prelude::rand etc.
12:39 audreyt "is builtin" is shorthand of "exporting into global automagically"
12:39 lanny Ok.  I got the impression from the docs and pi() that that was for variables.
12:39 lanny Thanks!
12:40 audreyt np :)
12:40 audreyt now unfortunately I need to crash off again... been running Jifty tutorial for cow orkers two days straight now
12:40 audreyt be back in ~12 hours :)
12:41 TreyHarris Limbic_Region: you helped me with this last time, and i just copied the procedure you gave me... but it didn't work this time.  i am running a newer ghc.  any clue what might be wrong?
12:41 * TreyHarris waves goodbye to audreyt
12:41 audreyt TreyHarris: is this win32? did you get the latest bindist, or are you using the known-working 0819?
12:42 TreyHarris audreyt: os x, i'm using the binary 0915 build
12:42 TreyHarris on intel
12:42 clkao audreyt: do they grok it alright?
12:43 audreyt clkao: sure, they are quite happy and we've alllocced two more tutorial sessions
12:43 audreyt TreyHarris: oh... I don't know much about the 0915 build
12:44 TreyHarris audreyt: well, i'll just use your build if it's still sufficient for pugs
12:45 audreyt sure!
12:45 TreyHarris cheers!
12:50 Limbic_Region TreyHarris - sorry, was AFK
12:50 Limbic_Region you are using the ghc 6.6 bin build I built?
12:51 Limbic_Region I am not having any problems with it in 2 different environments
12:51 Limbic_Region what exactly is the problem?
12:51 Limbic_Region oh nevermind
12:51 Limbic_Region I see you aren't using my build - os x
12:51 Limbic_Region my guess is third-party
12:51 Limbic_Region but without a specific error - no clue
12:52 Limbic_Region ah, scroll back
12:52 audreyt @tell fglock ./pugs -e "'x' ~~ /<null>+/" loops
12:52 lambdabot Consider it noted.
12:52 Limbic_Region yes, I can help with the mtl-any issue
12:52 audreyt @tell fglock this is making rule_recursive hang -- I've disabled it for now but please fix :)
12:52 Limbic_Region audreyt - TreyHarris just needs the cabal instructions for installing a package
12:52 lambdabot Consider it noted.
12:53 Limbic_Region from extra-libs
12:53 audreyt Limbic_Region: 14:41 < TreyHarris> Limbic_Region: you helped me with this last time, and i just copied the procedure you gave me... but  it didn't work this time.  i am running a newer ghc.  any clue what might be wrong?
12:53 Limbic_Region http://paste.lisp.org/display/25124
12:54 Limbic_Region oh, if those instructions aren't working - I am clueless than
12:56 TreyHarris sorry, i was in another window
12:56 TreyHarris ye, those instructions didn't work
12:56 svnbot6 r13554 | audreyt++ | * rule_recursive.t: temporarily skip infinite looping tests
12:57 TreyHarris but i'm just building a different known-good build now
12:57 Limbic_Region TreyHarris - didn't work in that mtl was not installed
12:57 Limbic_Region or didn't work in that pugs still b1tched?
12:57 TreyHarris i see it installed.  pugs still complained
12:57 Limbic_Region (getting it done)++
12:57 TreyHarris i should sleep now though...
12:57 * TreyHarris &
12:59 Limbic_Region TTFN
13:12 svnbot6 r13555 | polettix++ | Cosmetic changes, added a note in the initial comments.
13:13 mschmidt left perl6
13:14 discordja joined perl6
13:15 discordja joined perl6
13:19 fglock joined perl6
13:20 fglock audreyt: ping
13:20 lambdabot fglock: You have 2 new messages. '/msg lambdabot @messages' to read them.
13:21 fglock audreyt: matching forever in '<null>+' is not a bug :)
13:25 cjeris joined perl6
13:26 crem_ joined perl6
13:28 dakkar joined perl6
13:29 fglock audreyt: perl5 perlre says "the following match after a zero-length match is prohibited to have a length of zero" - does this apply to p6 regex?
13:36 avarab_ is now known as avar
13:40 kolibrie fglock: good morning!
13:40 fglock kolibrie: hi!
13:40 kolibrie fglock: thanks for the yaml support
13:41 fglock kolibrie: np :)
13:41 kolibrie is there a way for me to extract just the pieces I want from the $match and put those in YAML/XML/some other format?
13:42 [particle] fglock: i think the perl5 perlre statement can safely apply to perl6regex... it'll make the implementor's job *a lot* easier :)
13:42 fglock [particle]: ok
13:43 fglock kolibrie: you can get to the return object with $$/ - $$/.yaml would give you the dump for the return object
13:45 kolibrie fglock: the dump of the whole return object.  I'd like to be able to generate a structure with just the name of the token with its captured value (not the whole object)
13:46 kolibrie but I also want something flexible enough so that I can change my mind about what I want in my structure
13:46 kolibrie so I think I want a real emitter, but am not sure the best way to go about writing one
13:47 [particle] kolibrie: like $/<token> ??
13:49 fglock kolibrie: try this:  perl -e 'use v6-alpha' - ' my $content = "xyz abc"; $content ~~ / $<name> := (<alpha>+) { return { alpha => "$<name>" } } /; say $$/.yaml '
13:51 mezelf left perl6
13:52 kolibrie fglock: yes, that's the idea
13:52 rlb3 joined perl6
13:52 audreyt fglock: you read it wrong I think
13:52 audreyt "Is prohibited" means "the match fails"
13:52 audreyt not "it loops".
13:53 audreyt i.e. perl -e '1 =~ /()+/' terminates
13:53 audreyt because on the second time it fails
13:53 audreyt and so () matched only once
13:53 fglock audreyt: yes, i got it - i'm fixing it now
13:54 audreyt cool. fwiw PGE loops here too.
13:54 jferrero joined perl6
13:55 kolibrie fglock: is the name of the token available in the match object, so I do not have to hard-code the key name?
13:55 Limbic_Region out of curiosity - what do rules do in the situation of the following p5 regex s/(\d)\s+(\d)/$1$2/g; # with a $str of '2 3 4'
13:56 audreyt ?eval $_ = '2 3 4'; s:g/(\d)\s+(\d)/$0$1/
13:56 evalbot_r13552 is now known as evalbot_r13555
13:56 evalbot_r13555 Error in rule: unknown parameter 'g' at /home/audreyt/pugs/perl5/Pugs-Compiler-Rule/lib/Pugs/Compiler/Regex.pm line 61. Error in rule: unknown parameter 'g' at /home/audreyt/pugs/perl5/Pugs-Compiler-Rule/lib/Pugs/Compiler/Regex.pm line 61. 1
13:57 fglock kolibrie: it is, but <alpha>+ creates an array called $<alpha> - you need a way to transform this array back into a string
13:57 audreyt ?eval $_ = '2 3 4'; s/(\d)\s+(\d)/$0$1/; $_
13:57 evalbot_r13555 \"23 4"
13:57 audreyt hm. fixing :g now
13:57 Limbic_Region ok - so it doesn't change behavior :-(
13:58 Limbic_Region is there some magic that tells it to become '234'
13:58 fglock audreyt: is this correct? "<alpha>+ creates an array called $<alpha>"
13:58 audreyt :overlap
13:58 audreyt fglock: correct.
13:58 [particle] there is no magic in regexes, contrary to popular belief :)
13:58 audreyt Limbic_Region: :overlap
13:58 Limbic_Region woot
13:59 fglock i find this behaviour strange - it would be better if it created a Match with positionals
13:59 vel joined perl6
13:59 kolibrie fglock: on my talk (http://feather.perl6.nl/~kolibrie/extraction.xul), slide 19 has the grammar that outputs slide 20.  I want to update the grammar so that it outputs slide 22
13:59 lambdabot http://tinyurl.com/ggcvc
13:59 audreyt fglock: I actually agree
13:59 audreyt I don't know what was TimToady et al's motivation for this
14:00 audreyt maybe it makes it easier to tell a quantified match with a nonquantified?
14:01 fglock i find it makes the result more difficult to use
14:01 audreyt and I agree.
14:01 [particle] am i wrong in thinking pge does that?
14:01 audreyt PGE does create Array according to spec.
14:02 audreyt as does PCR, but fglock is finding the spec weird
14:02 audreyt and it seems weird to me too
14:02 [particle] but you get numbered positionals for free
14:03 [particle] $/<alpha>[0]
14:03 audreyt you get that too with $<alpha> set fo Match.
14:03 audreyt the thing you don't get with Array is
14:03 audreyt $<alpha>.from
14:03 audreyt $<alpha>.to
14:03 audreyt and that troubles me a bit.
14:03 audreyt you have to say
14:03 audreyt $<alpha>[0].from
14:03 audreyt $<alpha>[-1].to
14:03 audreyt and that only works because it was <alpha>+
14:04 audreyt if it was <alpha>* it gets more hairy.
14:04 fglock kolibrie: you need to process the matches with map() or something, in order to get the data structures
14:04 audreyt so thing is, why is it an Array, not a Match with only positional parts?
14:04 iblechbot joined perl6
14:04 audreyt TimToady, pmichaud: ideas?
14:05 fglock you can't also use ~$<alpha>
14:05 audreyt which would stringify incorrectly, right.
14:06 audreyt all in all I find it weird design, but it may be I've missed something prodounf
14:06 audreyt profound, even.
14:06 audreyt fglock: perhaps p6l it?
14:06 [particle] yeah, p6l's a great idea
14:07 fglock given the language evolution, this behaviour might have been specified before they knew what match objects would look like
14:07 [particle] fglock: are you using pge's p6regex tests?
14:08 fglock [particle]: yes, but i'm implementing features in no particular order
14:08 [particle] just wondering if you were sharing the tests... since we designed them for sharability
14:09 audreyt [particle]: t/p6regex/regex_tests
14:09 fglock audreyt: re p6l - please do :)
14:09 [particle] ah, we've split that out into many files now
14:09 [particle] t/compilers/pge/p6regex/rx_*
14:09 [particle] much easier to maintain
14:10 * [particle] updates his pugs wc
14:12 audreyt fglock: hm I see the motivation.
14:12 audreyt fglock: the motivation is
14:12 audreyt /<alpha> foo <alpha>/
14:12 audreyt see, now $<alpha> cannot be a Match
14:12 audreyt as its range is not contiguous
14:13 audreyt do you agree in that case an Array is warranted?
14:13 [particle] unless it's a multi-dimensional Match (but i think that's *ugly*)
14:13 fglock I really should have been writing my thesis project, but -Ofun is below zero
14:13 audreyt how can it be multidimentional?
14:13 audreyt what does it mean in this context, that is
14:13 [particle] nth dimension is nth appearance in the match
14:14 fglock audreyt: but it still works, you still have $/<alpha>[0] and all
14:14 audreyt fglock: but what will $<alpha>.from say?
14:14 audreyt and how would it stringify?
14:15 fglock it will look wrong in this particular case, but it is still useful for everything else
14:15 audreyt er, what I means is
14:15 audreyt have /<alpha> foo <alpha>/ still set $<alpha> to Array
14:15 audreyt but have /<alpha>+/ set it to Match
14:15 audreyt the Array is warranted because naively treating it as a Match will yield surprising results
14:16 fglock how about /<alpha> <alpha>+/
14:16 audreyt in which case $<alpha> is still array
14:16 audreyt [0] is the first Match
14:16 audreyt and [1] is the Match that then has multiple positionals
14:16 audreyt makes sense?
14:17 fglock yes
14:18 fglock same with /<alpha>+ <alpha>+/
14:19 fglock hmm - how about / [ x <alpha>+ ] /  - this will not stringify correctly either
14:19 fglock i mean - how about / [ x <alpha> ]+ / - but it looks ok this way
14:20 clkao fglock: i was to ask you something the other day
14:20 clkao oh, the overlod thing is fixed. did ite hlp ?
14:20 fglock clkao: yes
14:20 fglock clkao: there is a still a problem, but I need to write a test case
14:21 clkao what about it?
14:21 clkao i am not entirely sure the readonly flag is right
14:21 fglock I'm not sure if it is Data::Bind fault
14:21 clkao the overload mechanism is totally crazy
14:21 fglock one sec
14:22 audreyt fglock: sent.
14:23 fglock clkao: t/xx-uncategorized/rule_recursive.t was ok in the first tests, and then it returned to the wrong behaviour; but I can't run it right now (fixing other things)
14:24 fglock audreyt: thanks!
14:24 audreyt np :)
14:39 fglock audreyt: <null>+ is fixed
14:39 svnbot6 r13556 | fglock++ | Pugs-Compiler-Rule - Regex runtime detects infinite loop in <null>+ and fails
14:39 audreyt fglock: eggcellent
14:40 fglock ratchet would still fail - need to implement there too
14:40 svnbot6 r13557 | audreyt++ | * HsBridge: Hide warnings for now.
14:41 audreyt fglock: try this
14:41 audreyt regex r { <null> | x <r> }; "x" ~~/<r>/
14:41 audreyt I mean
14:41 fglock audreyt: it should be documented that <null><null> fails
14:41 audreyt regex r { <null> | x <r> }; "x" ~~ /<r>$/
14:42 audreyt it still loops
14:42 fglock looking
14:42 audreyt er, null><null> should work
14:42 audreyt it's just <null>+ should match only once
14:42 audreyt and <null>* too
14:42 audreyt compare /()()/ in p5
14:44 fglock right
14:45 [particle] no quantifiers (other than ?) allowed on zero-width assertions/rules... is that the proper wording?
14:45 [particle] s/rules/matches/
14:48 ajs_ Well, I'm getting ready to be beaten with a stick, but here comes my highly speculative checkin.
14:49 svnbot6 r13558 | ajs++ | First pass at macro API document as discussed with TimToady on IRC yesterday. This verison is really just a starting point for discussion.
14:49 audreyt [particle]: no... quantifiers are fine it's just always match once
14:49 ajs_ is now known as ajs_work
14:54 fglock audreyt: re "regex r { <null> | x <r> }; "x" ~~ /<r>$/" - I get a rule engine internal error; it is passing wrong parameters somewhere
14:56 audreyt I get a loop, weird.
14:56 audreyt if you delete the skip in rule_recursive.t and run with pugs, that's what I get
14:57 svnbot6 r13559 | ajs++ | postcircumfix can take "is parsed" if quote-like operators can... of course, this brings up the question of how balanced operators affect the parsing of program text inside them, but we have said it can happen somehow... or are quote-like operators a hairy special case?
14:59 kolibrie fglock: I finally have a script that mimics my slide example, but for some reason <( )> isn't changing the output.  Which module is that in (I may have to reinstall)?
15:00 clkao fglock: rule_recurse. the 2 tests are different. if you change the 2nd test from "x" to "" it works.
15:02 fglock kolibrie: <( )> is defined in Pugs-Compiler-Rule
15:03 kolibrie fglock: ok
15:06 Limbic_Region smoke time IMO is very reasonable now even on a weak box fwiw
15:06 fglock clkao: I'll get back to debugging after lunch
15:06 Limbic_Region I am on 30 minutes on the weakest machine I smoke on
15:08 DaGo joined perl6
15:10 TimToady blah
15:10 TimToady EMUSTWAITFORCOFFEETOBREW
15:10 ajs_work heh
15:11 ajs_work SIGPAUSE
15:12 Limbic_Region . o O ( brain clicks on when coffee pot clicks off )
15:17 Limbic_Region audreyt gaal Juerd or anyone else with sudo/root on feather - can I get #ghc added to the list of allowed channels purty please
15:18 kolibrie fglock: it still seems not to work for me, though both t/04-rule.t and t/09-ratchet.t pass all tests
15:18 pasteling "kolibrie" at 66.239.158.2 pasted "fglock: script that seems to ignore <( )>" (43 lines, 932B) at http://sial.org/pbot/19883
15:23 ingy morning...
15:25 xinming joined perl6
15:25 Limbic_Region salutations
15:25 Limbic_Region xinming - do you have anything to do with the free X server for windows called xming?
15:28 mollmerx joined perl6
15:31 snowstalker joined perl6
15:32 justatheory joined perl6
15:35 lanny joined perl6
15:35 prefiks joined perl6
15:41 fglock kolibrie: you can't use <(...)> and { return ... } at the same time, because they are trying to do the same thing
15:42 fglock also, 'rule talk  { <presenter> }' doesn't care about the object returned by <presenter> - it just makes the capture and sets .from and .to
15:43 fglock lunch &
15:49 kolibrie fglock: taking out the one or the other doesn't change anything for me, it always returns the whole match
15:51 TimToady goto 5:30
15:56 xinming Limbic_Region: >_<
15:57 xinming Limbic_Region: It's just a name with name which is like mine. >_<  I did nothing on xming...  >_<
16:01 lanny Hmm.  If I create a module in ext/*, compile and see it in blib6/lib/*, write a script which use()'s it, and ./pugs -Iblib6/lib myscript; Is there something I've missed so that I don't get error 'Can't locate *'?
16:02 kolibrie fglock: I just retested all the code snippets from the channel that you've provided over the last day, and they all work.  So that is baffling to me
16:03 mauke_ joined perl6
16:03 weinig joined perl6
16:04 Psyche^ joined perl6
16:13 Psyche^ is now known as Patterner
16:18 mauke_ is now known as mauke
16:19 bernhard joined perl6
16:20 fglock joined perl6
16:24 pasteling "fglock" at 200.17.89.34 pasted ""got: beth"" (42 lines, 935B) at http://sial.org/pbot/19885
16:24 evalbot_r13555 is now known as evalbot_r13559
16:24 mozzz joined perl6
16:25 fglock kolibrie: you must propagate the return object through the match chain
16:26 prefiks left perl6
16:31 Juerd lsb end
16:31 Juerd That had to be /sb end
16:33 kolibrie fglock: so I need to add a return block to the other rule?  or what do you mean?
16:35 kolibrie fglock: oh, I just noticed your paste
16:39 fglock kolibrie: anyway, this only captures a single name
16:40 kolibrie fglock: that's why .+? is nice
16:40 kolibrie is there a variable that contains the name of the rule we are in?
16:41 kolibrie rule talk { { return $something }}; # where $something contains 'talk'
16:42 discordja joined perl6
16:42 fglock kolibrie: &?ROUTINE.name might work
16:42 kolibrie fglock: will try later - must prepare for trip now
16:43 fglock kolibrie: I think m:g// works in pugs
16:43 kolibrie fglock: will try that too
16:44 fglock &?ROUTINE.name returns '&main::__ANON__' in v6.pm
16:44 kolibrie not so useful
16:44 [particle] fglock: i don't think that's currently specced in S05, but i've been requesting it as well
16:45 kolibrie TimToady: audreyt: others: please scrutinize my slides and post comments :)
16:45 kolibrie &
16:47 TimToady slide 3 is a syntax error
16:49 TimToady s:g/5/6; needs a final /
16:49 ofer0 heya TimToady !
16:50 TimToady howdy
16:52 TimToady シャワーします。&
16:53 aufrank joined perl6
17:01 snowstalker_ joined perl6
17:06 zeriod joined perl6
17:31 pasteling "fglock" at 200.17.89.34 pasted "brian & Beth" (37 lines, 826B) at http://sial.org/pbot/19887
17:31 svnbot6 r13560 | fglock++ | v6 - m:c defaults to non-overlapping
17:31 buetow joined perl6
17:33 fglock kolibrie: this version works - http://sial.org/pbot/19887 (please update v6.pm to r13560) - it does no backtracking and it is very fast
17:33 lambdabot Title: Paste #19887 from "fglock" at 200.17.89.34
17:34 rodi joined perl6
17:34 evalbot_r13559 is now known as evalbot_r13560
17:35 fglock kolibrie: it uses lookahead instead of backtracking
17:42 fglock hmm - the algorithm in http://sial.org/pbot/19887 may actually work for implementing .*? inside Token
17:42 lambdabot Title: Paste #19887 from "fglock" at 200.17.89.34
17:44 fglock left perl6
17:52 TimToady audreyt: why does slurping a 37M file require 400M stack space?
17:52 TimToady (I have this *big* yaml file...)
17:53 obra *laugh*
17:54 PerlJam TimToady: it's okay because in the future, disk, CPU and RAM will all be cheap and abundant enough that you won't have to worry about it  :)
17:56 TimToady seems like, of all languages, Haskell oughta be able to just mmap the file in as an immutable string and run with it...
17:57 [particle] (perl5) how do i get the number of times $a=~m/a/g matches?
17:57 PerlJam [particle]: $count =()= $str =~ m/.../g;
17:57 TimToady $num = () = ...
17:58 PerlJam use the goatse operator
17:58 TimToady I wasn't gonna say it...
17:58 [particle] ah, right! thanks.
17:58 [particle] =()=
18:03 cjeris ok, if that's the goatse operator, what's the unicode spelling?
18:05 wilx lol
18:07 ruoso joined perl6
18:07 PerlJam perl5 tends to shy away from unicode operators.
18:18 Limbic_Region I tend to avoid the goatse and type that as ($count) = $str =~ m//;
18:19 PerlJam But that does the wrong thing.
18:20 PerlJam you'd have to do  @array = $str =~ m/.../g;  then $count = @array
18:21 [particle] $count = @{[ $str =~ m/.../g ]} should work too
18:22 [particle] in fact, that's probably what i really wanted, since i was trying to evaluate in an expression if $count < 2 ...
18:23 [particle] but, an extra lexical won't hurt that code
18:25 weinig is now known as weinig|bbl
18:27 pmurias_ joined perl6
18:31 Limbic_Region joined perl6
18:31 Limbic_Region PerlJam - CGI:IRC disconnected.  I realized my mistake nearly as soon as I hit return
18:32 PerlJam [particle]: I don't think perl has an optimization for the @{[...]}  version.  (i.e., it probably still copies the array and takes a reference to the copy)
18:33 [particle] pj: sure, but you can use it in an expression
18:35 foo\ joined perl6
18:35 [particle] ...without parens for disambiguation. i guess it's no difference, really just style.
18:36 PerlJam well ... perl's motto is true  ;)
18:36 [particle] print 'multi' if 1 < ($a =()= 'ababa' =~ m/b/g) # multi
18:36 [particle] print 'multi' if 1 < @{[ 'ababa' =~ m/b/g ]} # multi
18:37 glasser left perl6
18:37 discordja joined perl6
18:43 rodi ?eval grammar Foo { rule bar { baz } }; "baz" ~~ /<Foo.bar>/; # should this work?
18:43 evalbot_r13560 *** Cannot parse regex: <Foo.bar> *** Error:  Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:43 rodi ?eval grammar Foo { rule bar { baz } }; "baz" ~~ /<bar>/; # should this work?
18:43 evalbot_r13560 *** Cannot parse regex: <bar> *** Error:  Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:44 rodi Interesting.  The latter actually works on my Pugs, same rev.
18:45 rodi Err... by works, I mean it matches.
18:46 PerlJam I wouldn't have expected that one to work in any case.
18:46 beppu_ joined perl6
18:46 rodi which one?  neither?
18:46 PerlJam the latter
18:46 PerlJam How does pugs know to use Foo.bar rather than  Main.bar or Blah.bar or some other bar?
18:47 rodi I agree- I was surprised that it worked (for me on r13560) and the other did not.  That seemed backward to me.
18:47 rodi But I'm clearly doing something weird...
18:48 xdg joined perl6
18:49 weinig|bbl is now known as weinig
18:52 rodi ?eval grammar A { rule b { c } }; "c" ~~ /<b>/
18:53 evalbot_r13560 *** Cannot parse regex: <b> *** Error:  Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:53 rodi ?eval rule b { c }; "c" ~~ /<b>/
18:53 evalbot_r13560 *** Cannot parse regex: <b> *** Error:  Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:53 idiotmax joined perl6
19:02 rodi ?eval "c" ~~ /c/
19:03 evalbot_r13560 Match.new(   ok => Bool::True,    from => 0,    to => 1,    str => "c",    sub_pos => (),    sub_named => {} )
19:18 mdiep joined perl6
19:31 buetow joined perl6
19:48 fglock joined perl6
19:48 svnbot6 r13561 | lanny++ | [ext/Math-Random-Kiss]
19:48 svnbot6 r13561 | lanny++ | - simple fast PRNG (Marsaglia)
19:48 svnbot6 r13561 | lanny++ | - has a working srand() but is *slow* (in pugs) so no Prelude for it
19:48 svnbot6 r13561 | lanny++ | [t/unspecced/sort.t]
19:48 svnbot6 r13561 | lanny++ | - minor cleanup
19:58 fglock I'm installing Perl6::Rules
19:59 TimToady planning to harvest the corpse?
20:01 fglock maybe - I wonder if it could complement PCR in some way - maybe each one does 30% of the job, so there is only 40% left to do :)
20:05 fglock joined perl6
20:07 fglock joined perl6
20:08 fglock is there a report on the status/problems of Perl6::Rules ?
20:08 TimToady fglock: I think that's an excellent idea.
20:08 TimToady the manpage has caveats at the end, I believe
20:09 fglock it would probably have to be tested against many versions of perl5 to be sure which parts can be reused
20:10 TimToady if I recall, one of the reasons it was abandoned was because of just such bitrot.
20:11 TimToady but perhaps the less adventurous parts of it are stable.
20:12 TimToady certainly to the extent that we can stay in P5's regex engine and not call P5 subs, we'll be a lot faster.
20:13 TimToady on the other hand, working around re's closure bugs may entail extra calls, so it might not be a win in some cases.
20:14 TimToady another approach might be Perl6::Rules with a replacement re engine.
20:14 fglock the cpan testers report it actually not so bad - maybe we can just choose P6:Rules/PCR based on which nodes we get in the syntax tree
20:15 fglock TimToady: PCRE ?
20:15 TimToady dunno, I've never played much with pcre
20:15 TimToady having pre
20:15 TimToady :)
20:16 TimToady I think a lot of the current overhead is just handshaking between pugs and PCR though.
20:16 _bernhard joined perl6
20:16 TimToady when I run a pugs program with lots of very simple regexes, it slows way down from :P5
20:16 TimToady about 60x
20:16 TimToady let me paste the program
20:17 fglock we could compare the pugs times with v6.pm
20:18 pasteling "TimToady" at 71.139.13.50 pasted "program that slows 60x under PCR" (19 lines, 387B) at http://sial.org/pbot/19889
20:18 TimToady the one :P5 in there is because it doesn't split right on big characters.
20:18 TimToady but if I change all the other regexen to :P5 it runs about 60 times faster
20:19 TimToady this is on my radicals dictionary, which you can find a copy of at http://wall.org/~larry/krads
20:20 fglock i wonder if pugs is calling pcr's :P5 or pcre's
20:20 TimToady dunno offhand
20:25 pasteling "TimToady" at 71.139.13.50 pasted "faster version with :P5" (19 lines, 405B) at http://sial.org/pbot/19890
20:25 fglock everything in that snippet can be translated to :p5 - actually, only Regex declarations are special, because they may be backtracked into
20:25 TimToady that's what I was saying to audreyt the other day.  A lot of this stuff could be directly translated to p5
20:26 TimToady and it would obviously run a lot faster under the current setup.
20:27 fglock this is actually very easy to implement - I started with the difficult part
20:27 TimToady I suspect the bridge might actually be the slow part right now...
20:28 TimToady at least for trivial regexes
20:28 fglock but that's fixable - we can compile to :p5, and :p5 regexes are fast
20:29 fglock so trivial regexes are not a problem
20:29 baest joined perl6
20:29 TimToady well, yes, almost the entire approach of regex optimization in P5 is to avoid running the regex engine whenever possible.  :)
20:29 TimToady but it would be nice if the bridge were fast too.
20:30 TimToady on the other hand, given the whole thing is kind of a bootstrap anyway...
20:30 TimToady the translation to :p5 is probably more useful.
20:30 fglock yes - pcr compiles <'xxx'> to ' substr() eq ... ' - it can continue doing that
20:31 TimToady and will enable a lot more to get accomplished in the medium range
20:32 TimToady so I think a hybrid approach is very workable
20:34 svnbot6 r13562 | fglock++ | Pugs-Compiler-Rule - added Pugs::Emitter::Rule::Perl5::Regex
20:35 kolibrie TimToady: thank you for your eyes on that s:g/5/6/ error
20:35 kolibrie fglock: thank you for that paste
20:35 kolibrie will play with it more when I get to Pittsburgh
20:36 TimToady ?eval '唐 otori'.split(/\s+/)
20:36 evalbot_r13560 is now known as evalbot_r13561
20:36 evalbot_r13561 ("唐 o", "ori")
20:36 fglock kolibrie: I wrote a version that does yaml, but it didn't compile right under v6.pm
20:36 TimToady should have said
20:36 TimToady ("唐 o", "ori")
20:37 TimToady well, no, it should have said
20:37 TimToady ("唐", "otori")
20:37 TimToady anyway, that's why I had to keep the :P5 on the split in my program
20:38 TimToady ?eval "唐".say
20:38 evalbot_r13561 OUTPUT[唐 ] Bool::True
20:39 TimToady ?eval '唐 otori'.split(/\s+/)
20:39 evalbot_r13561 ("唐 o", "ori")
20:39 clkao ?eval "\x{2668}"
20:39 clkao blah
20:39 evalbot_r13561 "\\x2668"
20:40 TimToady yow
20:40 TimToady that really messed up my terminal for a bit
20:40 clkao you messed up mine as well
20:40 * kolibrie leaves before his terminal blows up &
20:40 TimToady ?eval ("唐", "otori").say
20:40 evalbot_r13561 OUTPUT[唐otori ] Bool::True
20:41 TimToady I wonder if evalbot is splitting the 唐 on "whitespace" somehow.
20:41 clkao i have a dejavu. did you mention this a few days ago?
20:41 TimToady doesn't happen in my own pugs.  I get the (wrong) ("唐 o", "ori")
20:42 TimToady instead.
20:42 fglock the Perl5::Regex emitter will just have silly things like ' sub dot { "." } '
20:42 TimToady yes.
20:42 TimToady fglock: assuming /s
20:46 fglock TimToady: yes, /s is added by Pugs::Compiler::RegexPerl5, which already works (it makes the p5->pcr internal bridge)
20:47 TimToady any idea where the unicode mixup is?
20:48 fglock pcr uses plain '\s' - it must be somewhere between p5 and haskell
20:49 beppu_ joined perl6
20:49 fglock ok, I've implemented some nodes - let's add some tests
20:57 ofer0 joined perl6
20:57 svnbot6 r13563 | fglock++ | Pugs-Compiler-Rule - added tests to p5-regex emitter (not ready yet)
20:57 fglock should it compile <ws> to \s+ ? probably not...
20:57 TimToady looks to me like a mixup in counting characters vs bytes
20:58 TimToady character positions should really be independent of representation
20:59 TimToady <ws> does a lot more than \s+, and can be overridden...
20:59 fglock yes, so no :p5 for it
21:00 TimToady the nice thing about this kind of optimization is that you can just give up if you're not sure.
21:05 fglock TimToady: Pugs-Compiler-Rule$ perl -Ilib t/12-plain_regex.t
21:05 fglock it works
21:05 svnbot6 r13564 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex emitter passes tests
21:06 fglock it is now possible to port things from Perl6::Rule, and see what breaks
21:13 TimToady fglock++
21:13 svnbot6 r13565 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - captures, dot
21:16 svnbot6 r13566 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - alternation
21:19 obra  [B[B     [B[BMIT should be very compat
21:19 obra [B[A  
21:19 jesse___ joined perl6
21:20 svnbot6 r13567 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - non-capturing group
21:21 obra fglock: have you considered getting PCR to emit the same AST as Perl5 MAD_PROPS?
21:22 fglock obra: sorry, I don't know it - link?
21:22 fglock but PCR is rule-specific
21:23 fglock do you mean v6.pm ?
21:23 obra I did
21:23 obra mad props is larry's "perl5 to lossless AST" enhancement. it's what sage was using to translate p5 to p6
21:25 fglock v6.pm AST is a plain match tree, very close to the actual syntax - it sure can be transformed into something more useful
21:25 svnbot6 r13568 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - \s, \S, etc
21:27 fglock TimToady: it seems to be almost useful already
21:29 evalbot_r13561 is now known as evalbot_r13567
21:32 cjeris left perl6
21:32 svnbot6 r13569 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - <before ...>, <!before ...>
21:35 svnbot6 r13570 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - <after ...>, <!after ...>
21:38 svnbot6 r13571 | markstos++ | [t/unspecced/sort.t]
21:38 svnbot6 r13571 | markstos++ |   add comment to file asking for further clarification of the file itself.
21:38 svnbot6 r13571 | markstos++ |   It includes an implementation of a spec'ed feature, yet exists in
21:38 svnbot6 r13571 | markstos++ |   the "unspecced" directory of the test suite...
21:38 fglock perl5 /$/s is perl6 /$$/ ?
21:41 Juerd Perl 5's /s doesn't change $ in any way.
21:41 Juerd Perl 5's /s only changes .
21:45 fglock Juerd: thanks
21:48 svnbot6 r13572 | fglock++ | Pugs-Compiler-Rule - Perl5::Regex - ^ $ <null>
21:48 fglock obra: is there a page about MAD_PROPS ?
21:49 Limbic_Region joined perl6
21:49 * obra looks for timtoady
21:50 * TimToady hides
21:51 TimToady I think MAD is far to P5 specific to serve for P6
21:51 TimToady *too
21:51 TimToady perl5 /^$/m is perl6 /^^$$/
21:52 obra TimToady: even for the output of the p6->p5 translator?
21:52 fglock @tell audreyt Pugs-Compiler-Rule$ perl -Ilib t/12-plain_regex.t -- compile Regex to :p5 or die; creates normal Match objects
21:52 lambdabot Consider it noted.
21:52 obra (Given that larry wrote it and I'm just pointy hair around these parts, listen to him and not to me)
21:52 fglock obra: :)
21:53 fglock TimToady: I'm considering using something like [^|<after \n>] for ^^, so I can mix ^ and ^^ in the same sentence
21:54 TimToady alternately, just throw /m in there and use \A and \z for ^ and $
21:54 TimToady I think that'd be a lot faster and simpler.
21:55 ofer0 joined perl6
21:56 fglock plain :P5 uses /s by default, right?
21:56 TimToady I wouldn't think so.
21:56 Odin-LAP joined perl6
21:57 TimToady ?eval "\n" ~~ m:P5/./
21:57 evalbot_r13567 is now known as evalbot_r13572
21:57 evalbot_r13572 Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
21:57 TimToady no, it doesn't
21:57 fglock ok
21:58 TimToady ?eval "\n" ~~ m:P5/(?s)./
21:58 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 1,    str => "\n",    sub_pos => (),    sub_named => {} )
21:58 TimToady that's how you turn /s on under :P5
22:01 fglock given that a Regex compiles ok to :p5, you can call pcre instead of pcr/pge, if pcre is faster
22:02 fglock audreyt: ^^^
22:03 TimToady or have a mode where you call all three and vote on the results.  :)
22:03 fglock yup
22:03 TimToady ?eval "a\nb" ~~ /^a$$.^^b$/
22:04 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 3,    str => "a\nb",    sub_pos => (),    sub_named => {} )
22:04 TimToady ?eval "a\nb" ~~ m:P5/(?smx) \A a $ . ^ b \z/
22:04 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 3,    str => "a\nb",    sub_pos => (),    sub_named => {} )
22:05 TimToady ?eval "a\nb" ~~ /^ a $$ . ^^ b $/
22:05 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 3,    str => "a\nb",    sub_pos => (),    sub_named => {} )
22:05 TimToady same thing.
22:05 TimToady ?eval "a\nb" ~~ m:P5/(?smx) \A a $ . ^ b \Z/
22:06 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 3,    str => "a\nb",    sub_pos => (),    sub_named => {} )
22:06 TimToady ?eval "a\nb\n" ~~ m:P5/(?smx) \A a $ . ^ b \Z/
22:06 evalbot_r13572 Match.new(   ok => Bool::True,    from => 0,    to => 3,    str => "a\nb",    sub_pos => (),    sub_named => {} )
22:06 TimToady ?eval "a\nb\n" ~~ m:P5/(?smx) \A a $ . ^ b \z/
22:06 evalbot_r13572 Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
22:06 TimToady yes, $ turns into \z rather than \Z
22:08 fglock TimToady: added to TODO - i gotta go :(
22:08 fglock thanks!
22:08 TimToady \n turns into (?:\n\r?|\r\n?) or some such
22:08 TimToady you're welcome
22:09 fglock left perl6
22:09 svnbot6 r13573 | fglock++ | Pugs-Compiler-Rule - Perl5/Regex TODO list
22:15 putter joined perl6
22:16 putter "If there's a particular problem that Perl is trying to solve, it's the basic fact that all programming languages suck."  Onion '06.  Oh yeah.
22:17 putter fglock: ping?
22:24 mako132_ joined perl6
22:29 TreyHarris markstos: re your last commit, lanny discussed this on the channel at the time... there was no obvious place to put the pure-perl sort.  putting it in prelude would be premature until it actually worked well.  it came down to creating a new place for it, or just put it into unspecced.  so that's where it went.
22:29 TreyHarris oh... wait, he's not here... that's odd, i didn't see his /part or /quit message
22:30 TreyHarris @tell markstos re your commit r13571, lanny discussed this on the channel at the time... there was no obvious place to put the pure-perl sort.  putting it in prelude would be premature until it actually worked well.  it came down to creating a new place for it, or just put it into unspecced.  so that's where it went.
22:30 lambdabot Consider it noted.
22:31 * putter notes there seems to be a lot of confusion about Test.  haven't looked at it.  perhaps needs cleanup?
22:31 TreyHarris putter: how so?
22:32 putter a number of curious misunderstandings about what the Test methods mean have been mentioned recently, by multiple people.
22:33 TreyHarris i've noticed this too, but i've taken it as misunderstandings about the subtleties of unit testing and how a test harness should work rather than a bad test api.  the docs could bear improvement though.
22:34 TreyHarris and i am planning on merging my Test::eval_* as macros change as soon as this release goes out, which will make the vagaries of the eval tests somewhat less vague...
22:34 putter right.  sorry, I was unclear.  doc perhaps needs cleanup.
22:35 putter though, on reflection, dies_ok() is perhaps an unfortunate name, as unlike the other ok's, a true return value is very much not expected.
22:37 TreyHarris oh?  i read the subs as, "is/does this <whatever>?"  so ok(): "is this ok?"  is():"is this?" eval_ok(): "does this eval ok?"  dies_ok(): "does this die ok?"
22:38 putter or 'is' compares two values, 'ok' checks for true...
22:40 TreyHarris putter: well, in that case you'd have to have the right definition in your head for dies_ok and the name doesn't really matter that much.  i don't get the mapping that results in dies_ok being reversed from everything else, though.  but i know there must be such a gestalt, since several folks have said the same...
22:44 buubot joined perl6
22:44 svnbot6 r13574 | putter++ | backtrack_api.pl - a bit of progress.  Almost ready for PCR.
22:44 putter dinner &
23:01 discordja joined perl6
23:11 ingy hola
23:11 fglock joined perl6
23:12 obra hey ingysan
23:12 beppu_ joined perl6
23:12 fglock ola
23:12 fglock putter: we are quite out of sync
23:13 mjk joined perl6
23:13 ingy obra!
23:14 ingy obra: where is cl these days?
23:14 ingy and where are you?
23:14 fglock putter: re backtrack_api.pl - it will be nice
23:14 fglock ingy: I started the python parser - but nothing worth of showing yet
23:15 ingy fglock: cool :)
23:15 obra ingy: Flat 16, #12 Leinster Terrace, London W2
23:15 ingy is that home?
23:15 obra for cl
23:15 obra for me, no. I'm visiting
23:15 ingy ok
23:16 obra where are you?
23:18 ingy oh... Seattle
23:18 bcorn joined perl6
23:19 ingy Living on capitol hill with hvc
23:19 ingy she's working at amazon
23:19 ingy we have a big old house
23:19 ingy totally awesome
23:19 obra nice
23:20 ingy I don't see her much though.
23:20 TreyHarris ingy: oh, i didn't realize you were here in seattle.  do you know if there's an active seattle.pm?  the seattleperl.org says the next meeting will be may 16th, so i'm guessing no...
23:20 ingy just in passing mostly
23:21 ingy TreyHarris: oh, yeah there's SPUG
23:21 ingy very active
23:21 ingy chromatic spoke last Tuesday
23:22 TreyHarris oh.  what's their website?  seattleperl.org says "SPUG", so i thought that was the one
23:22 ingy are you a Seattle noob or something
23:22 ingy ?
23:23 ingy yeah, that website is out of date I guess
23:23 TreyHarris ingy: 3-year newbie :-) but when i first got here the spug meetings were rarely convenient, so i only came a few times.  i was a regular at newyork.pm before
23:23 ingy get on the mailing list
23:23 ingy where do you live?
23:23 fglock left perl6
23:24 TreyHarris downtown.  spug used to meet in the u-district. since i don't drive, that meant allowing an hour to get there by bus, and the meetings were at 6:30, and the corporate culture at $job did not look kindly upon people walking out the door at 5:30 ;-)
23:25 obra oh, trey, Nathan says hi.
23:25 TreyHarris obra: nathan says hi to you!
23:25 * nothingmuch makes carpet noises
23:26 beppu_ joined perl6
23:27 TreyHarris nothingmuch: what noise does a carpet make?
23:27 nothingmuch i don't know, it's a quote
23:27 ingy what's the way to make vim open the file whose path is under your cursor????
23:28 weinig is now known as weinig|bbl
23:29 nothingmuch http://freesound.iua.upf.edu/tagsViewSingle.php?id=2434_68
23:29 lambdabot http://tinyurl.com/q3vk7
23:29 TreyHarris ingy: drag over the path, type 'vim' into a new shell, and then click the middle button? ;-)
23:29 nothingmuch i think he means inside of vim itself
23:29 nothingmuch gvim, that is
23:30 TreyHarris nothingmuch: i know, i was just being an ass ;-)
23:31 nothingmuch TreyHarris: the quote is from a sketch by some israeli band
23:31 nothingmuch http://he.wikipedia.org/wiki/סיפורי_פוגי
23:31 lambdabot http://he.wikipedia.org/wiki/סיפורי_פוגי
23:31 TreyHarris nothingmuch: ah.  l'shanah tovah, by the way
23:31 nothingmuch thank you lambdabot
23:32 nothingmuch bah
23:32 nothingmuch jewish holidays stink ;-)
23:32 TreyHarris lol
23:32 * nothingmuch prefers christmas at grandma's
23:32 TreyHarris no cholent for you?
23:32 nothingmuch i mean seriously, wtf is up with eating fish head?
23:32 nothingmuch hell no ;-
23:32 * TreyHarris giggles
23:32 nothingmuch no gefilte fish either
23:33 TreyHarris gefilte pork-chop?
23:33 Patterner *BZZT* no halal
23:33 nothingmuch i think that would still be awful
23:33 nothingmuch the gefilte part ruins everything
23:33 TreyHarris mmm.. yeah
23:33 nothingmuch european jewish cuisine has this tendancy to be able extract just the nastiness out of the ingredients ;-)
23:35 TreyHarris lol.  i'm quite fond of the occassional kreplach or brisket.  but hold the gefilte fish, or the tongue...
23:35 mako132_ joined perl6
23:37 TreyHarris ingy: thanks, i subscribed.  i'll try to make it next time.  i wonder if audrey's made contact with anybody in spug, she's swinging up here next month.  her flight doesn't arrive until thursday evening, though, so there may not be time for anything
23:39 beppu_ ingy: gf
23:39 beppu_ that's how you open a file that your cursor is over in vim.
23:41 TreyHarris beppu_: oh, i thought you were greeting ingy with the traditional salutary, "girlfriend!"
23:41 beppu_ ;)
23:46 TreyHarris would sub looks_like_number ($x) { +$x eqv $x } work as a reimplementation of looks_like_number?  or would you have to say (+$x).Whatever eqv $x.Whatever to avoid the type correspondence check?  or am i missing another wrinkle?
23:48 TreyHarris (neither work in current pugs, so i may very will be missing something)
23:52 audreyt +$x eq $x
23:52 lambdabot audreyt: You have 1 new message. '/msg lambdabot @messages' to read it.
23:52 audreyt is more like it
23:52 audreyt lambdabot: @messaes
23:52 lambdabot fglock said 2h 25s ago: Pugs-Compiler-Rule$ perl -Ilib t/12-plain_regex.t -- compile Regex to :p5 or die; creates normal Match objects
23:52 nothingmuch hiya audreyt
23:52 nothingmuch is it already saturday morning?
23:52 audreyt heya nothingmuch
23:52 ingy hi audreyt!
23:53 audreyt it is, and I have to run to $job, and once I'm back we can hack on MI a bit
23:53 nothingmuch okay
23:53 nothingmuch i need to sleep
23:53 nothingmuch so it should be in sync
23:53 audreyt I have all day tomorrow until wednesday
23:53 nothingmuch ah
23:53 TreyHarris audreyt: ah, good point, thanks
23:53 nothingmuch sunday is slightly swamped, monday might also be
23:53 audreyt have you done the polishing?
23:53 nothingmuch but after that I should have a bit of spare time
23:53 nothingmuch nope, i've been sitting and thinking of other stuff
23:53 nothingmuch but it's a 30 minute fix
23:53 nothingmuch 2-3 smallish refactorings
23:53 audreyt oh ok. then perhaps find that 30 minutes once you wake up
23:54 nothingmuch *nod*
23:54 audreyt and we'll go from there
23:54 audreyt if you're not online I'll do releng stuff
23:54 ingy beppu_: thanks!!
23:54 nothingmuch *nodnod*
23:54 nothingmuch morning is reserved for you
23:54 nothingmuch or at least MO
23:54 nothingmuch then I go hiking with Neama
23:54 beppu_ ingy:  you're welcome.
23:54 nothingmuch and in the evening I belong to Ann
23:55 nothingmuch feck!
23:55 nothingmuch drink and arse too, for good measure
23:55 * nothingmuch wants tehre to be a portable font acquisition type thingy to make Imager::Font easier to use
23:56 nothingmuch e.g. it searches in the "normal" places for each platform
23:56 nothingmuch and can also accept additional include path
23:56 nothingmuch and lets you find fonts by charecaristics and name
23:58 nothingmuch hmm
23:58 nothingmuch \http://search.cpan.org/~rpagitsch/Win32-Fonts-Info-0.01/Info.pm
23:58 nothingmuch that's a nice begining
23:58 lambdabot Title: Win32::Fonts::Info - Perl extension for get a list of installed fontfamilies on  ..., http://tinyurl.com/j5w8n
23:58 nothingmuch if i could have that (or a subset of that) on OSX and *x that'd be nice

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

Perl 6 | Reference Documentation | Rakudo