Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-08-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 TimToady say all(1,2,3)
00:02 TimToady for each(1,2,3) > any(@foo)
00:02 TimToady hmm
00:02 TimToady maybe junctions do something a little different in list context.
00:02 TimToady Damian originally had a .eigenstates method, or some such.
00:04 TimToady .values gives you the values out of an any or all, but after a comparison you just get booleans.
00:04 TimToady maybe list context can change that, or maybe each() can change it.
00:05 markstos Is this the right way to express "use base" in Perl6? class TestApp is CGI::Application;
00:05 markstos I'm having trouble seeing the methods of the parent class.
00:05 TimToady yes
00:07 markstos left perl6
00:07 markstos joined perl6
00:08 TimToady might be busted at the moment though.
00:08 markstos Thanks TimToady
00:08 markstos It seems to work for my reduced test case, but not in my Real Code.
00:08 markstos A typical debugging project. :)
00:10 TimToady most of the tests in t/oo seem to return pugs: user error (no tag found) for me
00:10 markstos TimToady: meaning: they are busted at the moment ?
00:11 TimToady on the other hand, my last smoke, they seem to have worked.
00:11 TimToady dunno what changed...
00:12 markstos I have a "pugs.bak". I'll give it a spin.
00:12 TimToady prove6 works better than './pugs -Iblib/lib'
00:12 TimToady so it wants something I'm not supplying...
00:13 TimToady doh, it wants blib6 not blib
00:13 markstos prove6 provides these kinds of things:
00:13 markstos PERL5LIB=/home/mark/src/pugs/blib6/pugs/perl5/lib:/home/mark/src/pugs/blib6/pugs/perl5/arch
00:13 markstos PERL6LIB=/home/mark/src/pugs/blib6/lib
00:14 markstos I keep those in a ".perl6" file, and source them when I need them.
00:18 miyagawa_ joined perl6
00:19 markstos What's the recommended way to declare a class version? From the Synopsis, I thought this might work:
00:19 markstos class CGI::Application { is version 6.00; };
00:19 markstos But either something is unimplemented, or more likely, my class traint syntax is wrong.
00:21 markstos I see one of my mistakes. I confused the "rest of file" syntax for 'class' with the just-this-block syntax.
00:21 TimToady class CGI::Application-6.0.0 { ... }
00:21 TimToady version is automatically part of the longname of a package or class
00:22 markstos Aha. Thanks.
00:23 markstos Now, can I do something like this, or do I need to put the whole file in a big block to declar some traits?
00:23 markstos class CGI::Application-6.0.0 has $.tmpl_path is rw;
00:23 markstos That gives me a syntax error now.
00:23 TimToady has doesn't go in the heading
00:24 TimToady class CGI::Application-6.0.0; has $.tmpl_path is rw;
00:24 TimToady would work as first thing in file
00:24 TimToady otherwise you have to put the has into {...}
00:26 markstos Thanks. That example would be hepful in S12.
00:26 TreyHarris TimToady: yes, that's exactly what I was thinking.  I tried gather { given any(@new) { when &infix:{'>'}.assuming(all(@old)) { take $_ } } }, but of course I just got back the original junction in that case.
00:27 TreyHarris then I tried to multi out infix:{'>'} for Junctions such that it returned the values, but I couldn't get that to work quite right either
00:34 mdiep_ joined perl6
00:43 Bit-Man joined perl6
00:59 TimToady TreyHarris: okay, have now specified meaning of "for any(@new) > all(@old)" to dwym.
01:00 TimToady turns out grep {...}, @x can also be spelled any(@x) ~~ {...}
01:01 markstos and I think the any() variant is a bit clearer.
01:02 TreyHarris definitely.
01:11 markstos Ok, inside of a new() constructor, after I've done $self = $class.bless.... how I can stuff things into  $self ? In Perl5 it was just $self->{__PROP} = 42;
01:12 TimToady $class.bless( PROP => 42 ) is one way, assuming it has $.PROP or $!PROP already.
01:12 zg1 left perl6
01:13 TimToady bless ends up calling all the BUILD routines with the named args you pass it, so each BUILD can pick out what it wants.
01:13 TimToady this is all described in S12, btw
01:14 markstos I've been reading that.
01:14 TimToady or you can just say $!PROP = 42 after the bless.
01:14 markstos BUILD is a new concept, too.
01:14 TimToady $.PROP if you want it virtual
01:15 markstos or $.PROP is inheritable ?
01:15 TimToady it's just the old "init" stuff that most OO languages have
01:15 markstos s/or/and/ ?
01:15 TimToady but we already used INIT
01:15 markstos I mostly just now Perl and a little JavaScript now...
01:15 markstos s/now/know/
01:15 TimToady it means self.PROP = 42
01:16 markstos Got it.
01:16 TimToady so if you're children override the .PROP, it does the right thing,
01:16 TimToady presuming that's what you want it to do.
01:16 TimToady depends on your abstraction level.
01:16 TimToady usually a constructor wants to set the storage directly with $!PROP
01:17 TimToady the ! being mnemonic for "don't do the fancy thing"
01:17 markstos I see.
01:19 TimToady decommuting &
01:24 pasteling "markstos" at 12.176.101.89 pasted "markstos learns Perl6 objects" (21 lines, 349B) at http://sial.org/pbot/19120
01:24 diakopter joined perl6
01:24 markstos Despite TimToady's help for which I'm thankful, I just still be missing something. I pasted my test case I'm playing with.
01:25 markstos I expect the child class to find $!found from the parent, but it doesn't.
01:27 markstos Ok, it seems that it doesn't work to declare $!found in new(), after the bless, I have to wait until I'm out of new(). I'm not sure that's a bug, or just something else I don't understand yet....
01:28 markstos That's the challenge of using a language-in-progress. I thankfully very very rarely ever run into a Perl5 bug.
01:28 TreyHarris it's not a bug.  $!found is going to be lexical in that case and go away at the end of the method
01:28 markstos I tried adding has $!found to the class, but it didn't make a difference.
01:29 TimToady it's a private variable, and not accessible to child classes.
01:29 TimToady you have to use $.found for that
01:29 TimToady children always use accessors
01:30 TimToady that's part of why $.found is really calling the accessor.
01:30 TimToady anyway, really &
01:30 markstos switching from $! to $. didn't help in this case
01:30 markstos but I appreciate the help!
01:30 buubot spew!
01:33 TreyHarris markstos: ohh.  the problem is that new is not getting inherited
01:33 TreyHarris add a say to new
01:33 TreyHarris it doesn't get called
01:33 TreyHarris is that a bug or not?  I haven't looked at the difference between redefining new and writing a BUILD
01:34 markstos You are right, TreyHarris. Weird.
01:34 TreyHarris somebody bring evalbot back!
01:34 markstos /invite evalbot
01:34 markstos ...with snacks ?
01:42 TreyHarris markstos: BUILD seems to be what you want, but bless() seems to be broken.  I just noticed that there are no tests in Perl 6 that I can find that even use bless.  The only .t's with bless in them are Perl 5 or v6.pm stuff that lives in the shady gray area in between.
01:43 markstos Thanks TreyHarris. I'll see about writing a test for bless.
01:43 TreyHarris oops, i spoke too soon
01:43 TreyHarris there are two, both in t/oo/constructor.t
01:44 pasteling "markstos" at 12.176.101.89 pasted "markstos : super new super ?" (18 lines, 310B) at http://sial.org/pbot/19121
01:44 TreyHarris er, construction.t
01:45 markstos Look: I got the call to new() to be triggered by changing Super.new  to Super.new('Super')
01:45 markstos .... that seems wrong. :)
01:46 markstos Most of those tests are failing as TODO right now....
01:47 TreyHarris yes
01:47 TreyHarris here, look at this...
01:47 markstos I'm surprised basic object construction doesn't work yet. bummer.
01:48 pasteling "TreyHarris" at 207.171.180.101 pasted "BUILD is interesting. Still doesn't work...." (22 lines, 376B) at http://sial.org/pbot/19122
01:48 TreyHarris markstos: it works very well, but you're not using it
01:48 TreyHarris once you use bless, you've said to Perl, "don't use standard object construction, I'm going to roll my own"
01:48 markstos Ah.
01:49 markstos I'm still thinking like a Perl5er
01:49 markstos doing what seemed like the most straightforward port to Perl6...
01:52 TreyHarris hold on, i'll paste you something else
01:52 markstos OK. holding.
01:53 markstos Your last paste did make it look like bless was bOrken, though.
01:54 pasteling "TreyHarris" at 207.171.180.101 pasted "Here's an ordinary example, which runs fine" (23 lines, 332B) at http://sial.org/pbot/19124
01:54 TreyHarris see?
01:55 TreyHarris if you just let Perl do the work, it works out
01:56 * markstos looks
01:57 markstos TreyHarris: I think I ought be able to make some version of this work for me.
01:59 pasteling "TreyHarris" at 207.171.180.101 pasted "Not sure if goBoom's working is a bug...." (30 lines, 468B) at http://sial.org/pbot/19125
02:00 TreyHarris markstos: see this paste.  This, I think, tries to demonstrate what TimToady was saying about storage not being accessible from children.  But it is.
02:02 markstos interesting.
02:02 diakopter left perl6
02:07 markstos I see that I don't have to pre-declare a trait before passing it to new(). What's the recommended way to guard against keys to new() that are typo'ed ?
02:11 TreyHarris i just realized i'm using an exceedingly ancient pugs, because my make clean I ran a couple hours ago blew away my installed pugs because of an errant symlink.  so try it and tell me if you can run that last paste
02:11 TreyHarris markstos: can you paste an example of a typo working?  i'm not sure what you're trying ot say
02:11 markstos TreyHarris: Yes, it ran fine with an up-to-the-moment pugs.
02:11 markstos sure
02:14 markstos http://sial.org/pbot/19126
02:14 markstos I'm looking for something like Params::Validate.
02:14 TreyHarris bleh.  svn help... I know I had a conflict in my last update, but I killed the window I ran the svn update in, and I can't remember which file it was.  any way to find out where the conflict was?
02:14 markstos I want to get an error back: "Unknown key: taco"
02:15 markstos TreyHarris: I'm not very good with svn, but maybe "svn status | less" ? Perhaps conflicted files have a special notation.
02:16 markstos svn help status
02:16 markstos I think that will work.
02:16 markstos svn status | grep C
02:18 TreyHarris hmm.  i think another bug.  let me look a bit
02:24 * markstos reads about the 500 mile e-mail.
02:31 TreyHarris markstos: heh.  :)  so I need to get a new pugs built.  if evalbot were here, i think i could figure it out too...  oh well
02:32 TreyHarris I need to decommute, I'll be back in in an hourish
02:32 TreyHarris &
02:32 markstos Oh, I'm on EDT, so I need to sleep & soon.
02:32 markstos You've been helpful!
02:32 markstos Thanks!
02:32 TreyHarris markstos: i'll look at it when i get back regardless and ping you next time i see you
02:34 markstos Great.
02:34 markstos I may leave my laptop idle tonight just to see what I miss. :)
02:52 kanru joined perl6
03:20 evalbot_12433 joined perl6
03:21 audreyt ?eval $?OS
03:21 evalbot_12433 \"linux"
03:32 TimToady ?eval $*OS
03:32 evalbot_12433 \undef
03:33 luqui joined perl6
03:34 TreyHarris ?eval $?PUGS_VERSION
03:34 evalbot_12433 \"Perl6 User\'s Golfing System, version 6.2.12, June 26, 2006 (r12433)"
03:37 jferrero joined perl6
03:47 SamB why do you call your closures "pointy functions"?
03:50 Bit-Man joined perl6
03:55 luqui SamB, "pointy subs" refers specifically to the notation -> $x {...}
04:01 TimToady and we recently renamed them "pointy blocks" because they have more semantic affinity to blocks than to subs.
04:01 TimToady but yes, it's a syntactic distinction primarily
04:01 TreyHarris oh, when did configure start pulling down the synopses?  that's nice, i used to do that separately.
04:03 TreyHarris oops: Overview/Data.pod:298: Unknown command paragraph "=:= tests whether the cell slots of two containers $a and $b point to the same cell."
04:04 TimToady should be C<=:=> probably
04:08 xdg joined perl6
04:08 svnbot6 r12434 | trey++ | suppressing errant pod warning
04:19 drrho joined perl6
05:00 rindolf joined perl6
05:03 agentzh joined perl6
05:04 kanru joined perl6
05:04 agentzh TreyHarris: pugs was set to update the synopses via LWP a few months ago. :)
05:05 agentzh I just made this fact more obvious yesterday. ;-)
05:06 * agentzh has just finished reading today's p6l mails and #perl6 log.
05:07 agentzh i'll hack on Test::todo and util/smart_links.pl this afternoon. yay.
05:22 agentzh hmm, the name smartlinks.pl can save more typing. underscore is harder to enter on a keyboard. :)
05:22 svnbot6 r12435 | agentz++ | - renamed util/smart_links.pl to util/smartlinks.pl
05:22 svnbot6 r12435 | agentz++ | - renamed util/t/smart_links.t to util/smartlinks.t
05:22 svnbot6 r12435 | agentz++ | - updated t/README and t/TASKS accordingly
05:26 agentzh ?eval :pugs
05:26 evalbot_12433 is now known as evalbot_12435
05:26 evalbot_12435 ("pugs" => Bool::True)
05:26 agentzh ?eval :pugs.value === True
05:26 evalbot_12435 Error:  unexpected "p" expecting "::"
05:27 agentzh ?eval (:pugs).value === True
05:27 evalbot_12435 Bool::True
05:54 agentzh oh, too bad... neither each nor zip are implementd. :/
05:55 agentzh ?eval my @a = 1..3; my @b = 4..6; for each(@a;$b) -> $x, $y { say "$x $y" }
05:55 evalbot_12435 Error: Undeclared variable: "$b"
05:55 agentzh ?eval my @a = 1..3; my @b = 4..6; for each(@a;@b) -> $x, $y { say "$x $y" }
05:55 evalbot_12435 Error: No compatible subroutine found: "&each"
05:55 agentzh ?eval my @a = 1..3; my @b = 4..6; for each(@a, @b) -> $x, $y { say "$x $y" }
05:55 evalbot_12435 Error: No compatible subroutine found: "&each"
05:56 agentzh ?eval my @a = 1..3; my @b = 4..6; for zip(@a; @b) -> [$x, $y] { say "$x $y" }
05:56 evalbot_12435 Error:  unexpected "[" expecting comment, subroutine parameters, trait or block
05:56 agentzh sigh.
05:56 audreyt mmm?
05:58 agentzh audreyt: i want to use zip or each in Test.pm.
05:58 agentzh but they don't work. :(
05:58 audreyt each() is new
05:59 agentzh audreyt: how about zip?
05:59 agentzh ?eval my @a = 1..3; my @b = 4..6; for zip(@a; @b) -> [$x, $y] { say "$x $y" }
05:59 evalbot_12435 Error:  unexpected "[" expecting comment, subroutine parameters, trait or block
05:59 audreyt it's untested, so I'm not obliged to implement it
05:59 audreyt please write a test for each() somewhere
05:59 audreyt and you'll find it magickally working
05:59 agentzh audreyt: will do!
05:59 audreyt it's the oil-for-food, er test-for-feature program :)
06:02 rindolf Hi audreyt
06:02 audreyt hi
06:02 TreyHarris lol
06:02 agentzh audreyt: btw, i'm getting this error "user error (no tag found)" from my working copy of Test.pm. want does that mean?
06:03 audreyt agentzh: rm blib6/lib/Prelude.pm.yml and make again?
06:03 agentzh audreyt: okay
06:05 agentzh audreyt: no such error now. thanks!
06:05 TreyHarris should i run clean and configure every time i update?
06:05 audreyt I se... I should've bumped yml format
06:05 audreyt TreyHarris: no... just "make" would do
06:07 TreyHarris ok.  i need to track down what's wrong anyway.  my installed pugs breaks whenever i clean, so there's clearly some sort of mixage there shouldn't be
06:07 svnbot6 r12436 | audreyt++ | * First-cut implementation of &zip and &each.
06:07 svnbot6 r12437 | agentz++ | [t/statements/for.t]
06:07 svnbot6 r12437 | agentz++ | - added a test for "for each(@a;@b)->$x,$y {...}"
06:07 audreyt "breaks"?
06:07 agentzh audreyt: not sure. :)
06:08 TreyHarris stuff in examples/ acts funny, having trouble finding random modules and things
06:08 TreyHarris for typical language testing, no huhu
06:10 svnbot6 r12438 | agentz++ | [t/statements/for.t]
06:10 svnbot6 r12438 | agentz++ | - added a test for "for zip(@a;@b) -> [$x,$y] {...}"
06:12 agentzh audreyt: with your fix in r12436, the "zip" test in t/statements/for.t is still failing. would you please have a look?
06:12 TreyHarris urgh, my elisp skills have atrophied badly in the seven or so years since i've done anything with it besides editing my emacs configs.  cperl-mode.el does not like "$.y", it thinks I'm starting a tr// and everything thereafter is a mess
06:13 audreyt agentzh: array unpacking is not yet implemented, so use each() for now
06:13 agentzh audreyt: ok
06:15 agentzh auderyt++  # each() works now
06:15 agentzh s/auderyt/audreyt/
06:19 svnbot6 r12439 | agentz++ | [t/statements/for.t]
06:19 svnbot6 r12439 | agentz++ | - put code leading to parsefail into eval q{...}.
06:19 svnbot6 r12440 | audreyt++ | * Update examples/ to use each() instead of zip()
06:20 MacVince Does perl6 still have the ternary operator or has it been changed to something else?
06:21 TreyHarris MacVince: still has it, it's ?? :: now
06:21 svnbot6 r12441 | audreyt++ | * Bump compilation unit version due to the SubAssoc change.
06:21 svnbot6 r12441 | audreyt++ | * Also gives better error message (prompting rm of blib6/lib/Prelude.pm)
06:21 svnbot6 r12441 | audreyt++ |   when compunit mismatch happens.
06:21 MacVince TreyHarris: thank you
06:21 * gaal meows
06:22 audreyt hey gaal
06:22 MacVince TreyHarris: it's giving me an error
06:22 audreyt MacVince: it's the ?? !! now
06:22 MacVince audreyt: double-bang for the else clause?
06:22 MacVince ah!
06:22 MacVince Thanks!
06:23 MacVince audreyt++
06:23 TreyHarris oh, yeah.  i keep forgetting that.
06:23 gaal the hmmm?? oh!! operator
06:23 audreyt ?eval (0|1).pick ?? 'ok 1' !! 'not ok 1'
06:23 evalbot_12435 is now known as evalbot_12438
06:23 evalbot_12438 "ok 1"
06:23 MacVince gaal: is that the scientific name?
06:24 gaal the scientifick name is "the conditional operator", ectually
06:24 gaal s/ec/ac/
06:24 MacVince Perl sometimes has funny names for operators.  My favorite is the "flip-flop" operator :)
06:24 audreyt mnemonic: "?" is shorthand for "true" and "!" is shorthand for "not"
06:24 audreyt doubling something means short-circuiting
06:24 gaal I thought it meant operating on lines </vi>
06:25 * MacVince needs to read the synopses more attentivly
06:25 gaal me looks for some coffee
06:25 gaal audreyt: what to hack on today?
06:25 audreyt my hair could use some conditioning operators...
06:26 gaal (MacVince: you may be interested to know that the flip-flop is now spelled "ff".)
06:26 audreyt gaal: I'd like to get back to MOP, but I need to finish $job's haskell hacking part first
06:26 MacVince gaal: that one I remembered.
06:26 TreyHarris pattern matching would be nice for hair.  you can't actually start styling until the products you reach for are the ones that will do the right thing.
06:27 MacVince Man, Perl 6 is so interesting.  More interesting that Python 3000, that's for sure ;-)
06:29 audreyt gaal: if you have cycles... \() and :() parsers?
06:29 audreyt since they have ano vv() counterpart
06:29 audreyt s/ano/no/
06:29 audreyt especially \(), which we can't even get it from :.signature but I'd like
06:29 audreyt especially \(), which we can't even get it from .signature
06:30 audreyt but I'd like to play with real Capt types
06:30 audreyt MacVince: glad to hear that... :)
06:32 MacVince audreyt: I must confess that I was never a fan of Perl :-$.  I learned Ruby, Python, O'Caml, Smalltalk, Common Lisp and I thought I didn't need to learn Perl 5.  However, I needed some script on a machine without Ruby or Python and Perl was the only option.  I read the Llama book and found Perl 5 to be enjoyable.  I read on Perl 6 and many features look very interesting.  The object model with traits (roles I think they are called) l
06:33 gaal audreyt: (h)ACK
06:33 audreyt MacVince: vinfoley at iquebec.com?
06:33 MacVince audreyt: that's an old address, but that was mine, yes.
06:34 audreyt what address should I use to send you a commit bit
06:34 MacVince [email@hidden.address]
06:34 audreyt so you can check into our svn repo? :)
06:34 MacVince I'll need to brush up my Haskell :)
06:34 audreyt perfect. welcome aboard and please test the commit by adding yourself to AUTHORS :)
06:34 MacVince and finally get around to learning about monads.
06:34 MacVince Speaking of those, are there any good resources online to learn them?
06:34 MacVince With haskell or another language
06:35 audreyt there's a READTHEM file in pugs tree
06:35 gaal MacVince: try out these two posts:
06:35 gaal http://community.livejournal.com/evan_tech/197471.html
06:35 gaal http://community.livejournal.com/evan_tech/198116.html
06:36 gaal if they are useful to you please add them to that file :-)
06:36 audreyt http://www.nomaware.com/monads/html/index.html is canonical
06:36 audreyt and http://www.haskell.org/haskellwiki/Hitchhikers_guide_to_Haskell is nice too
06:36 MacVince delicioused!
06:36 audreyt right, that would be a useful commit :)
06:37 gaal audreyt: what does "Not yet transcribed" mean in Parser.Operator?
06:37 MacVince As someone who doesn't know much about Haskell and Perl6 and even less about writing languages, what sort of tasks can I do to help the project?
06:38 audreyt MacVince: there's also a TASKS file :)
06:38 MacVince Great :)
06:38 audreyt easiest is to try linking the synopses into tests
06:38 audreyt and reorg the tests/examples a bit in the process
06:39 audreyt or port your favourite modules to perl6 under ext/
06:39 MacVince All right.
06:39 agentzh hehe, a lot of funny things to do...
06:39 MacVince I haven't written a lot of software, but I have this ShortURL library for Ruby (http://shorturl.rubyforge.org) that I could try and port to Perl 6.
06:40 * agentzh is making progress on Test::todo().
06:40 gaal MacVince: as you go through the p6 tests you'll no doubt find things you think need more testing, or maybe that you don't understand, leading up to discussions and possibly spec updates :-)
06:40 gaal agentzh: w00t!
06:40 audreyt would be fantastic. also a "ri" port for perl6 would be useful as well
06:40 audreyt and it could exercise our reflection API
06:40 gaal what's ri?
06:40 audreyt type "ri" and see
06:40 MacVince gaal: the Ruby documentation tool
06:40 audreyt something that perl5 very much lacks.
06:41 TreyHarris audreyt: is there enough introspection for ri to work yet?
06:41 TreyHarris or does ri just extract from docs?
06:41 gaal ah, the docs are all retrieved from reflection? cool. As They Should <tm>
06:41 TreyHarris gaal: what's the difference between introspection and reflection?
06:42 gaal anyone know whatprovides ri on debian? I don't have it
06:42 MacVince gaal: ruby1.8-ri I think
06:42 MacVince or rdoc
06:42 gaal I use them synonymously...
06:42 * MacVince has a failing memory
06:42 gaal rdoc is pulling something
06:43 gaal TreyHarris: though there may be some subtle distinction that I'm missing
06:43 gaal I think Reflection is the name of a concrete Java API for this stuff
06:43 audreyt introspection is canonical terminology
06:44 audreyt reflection is thought to also include intercession
06:44 audreyt which means changing stuff at runtime
06:44 audreyt whereas introspection is more read only
06:44 audreyt but the lines has been blurred in recent years.
06:44 audreyt because Java hijacked Reflection but doesn't provide much intercession
06:44 svnbot6 r12442 | agentz++ | [docs/Perl6/Spec/update.bat]
06:44 svnbot6 r12442 | agentz++ | - added "pause" to ease win32 users' double-click actions.
06:44 audreyt though they are fixing that too.
06:45 gaal isn't the AspectJ stuff moving into the core? I think I read that somewhere
06:45 audreyt very possibly
06:45 audreyt also the Compiler API is exposed in Java
06:45 audreyt as of Java6
06:45 gaal that's quite a higher-level API but it certainly feels like intercession
06:46 audreyt which is the same as CLR2's codegen API, roughly
06:46 gaal hmm? I thought that was already available before that
06:46 audreyt through low level hooks only, I think
06:47 audreyt JSR199 is 1.6 only
06:47 gaal somehow I get the feeling it'll end up feeling hacky to call javac from java
06:47 gaal although that's essentially what eval-"" is in Perl
06:48 audreyt In addition, the new API should provide a facility for a compiler to report dependency information among compilation units. Such information can assist an integrated development environment in reducing the scope of future recompilations.
06:48 audreyt Future versions of this API might expose more of the structure of the program, for example the declaration structure of the program (ala the javadoc API), program annotations (JSR 175) or even the code itself (ASTs: Abstract Sytntax Trees). These are not goals of the initial version of this specifications.
06:48 audreyt 2.4 Why isn't this need met by existing specifications?
06:48 audreyt There simply isn't anything like this in the platform.
06:48 audreyt :D
06:48 gaal well, they have a huge pull from the IDE writers
06:49 rindolf Hi gaal
06:49 gaal that already do this by hook or by crook
06:49 gaal hello rindolf
06:49 audreyt *cough* eclipse *cough*
06:49 rindolf gaal: how are you this lazy Saturday morning?
06:49 gaal rindolf: waking up :)
06:49 gaal BTW: C is a dynamic language. http://neugierig.org/software/c-repl/
06:49 rindolf gaal: Sagiv Barhoom (of AP5 fame) and I are going to descend upon Joomla today.
06:50 gaal what are AP5 and Joomla?
06:50 rindolf gaal: AP5 == August Penguin 5
06:50 rindolf gaal: Joomla is what used to be Mambo.
06:50 rindolf gaal: it's a PHP-based CMS.
06:50 gaal I forget, is that a dangerous snake or a dangerous dance?
06:50 rindolf I've heard a lot of good things about it.
06:50 audreyt gaal: essentially the way hs-plugin works
06:50 audreyt dlopen abuse
06:50 gaal audreyt: yes
06:51 gaal audreyt: they compile lines, basically, to sos.
06:51 rindolf gaal: today I woke up at 6 AM.
06:51 audreyt gaal: oh. you know about ./pugs -d ?
06:51 gaal !?!?!!!!!!!! (!)
06:52 gaal ./pugs -d mandel.pl is.. interesting :)
06:52 audreyt yeah :)
06:52 gaal kinda slow :)
06:53 audreyt oh. the OUTER::x hack I did in the Parser
06:53 audreyt painstackingly meeting the earlier spec of
06:53 audreyt "say $x if my $x"
06:53 gaal index I copy from old Vladivistok telephone directory
06:53 audreyt is now rendered obsolete by new spec
06:53 audreyt which mandates that such code is simply required to fail
06:53 gaal well, no:
06:54 audreyt it's in Parser.hs line 1734
06:54 gaal my $x = 42; say $x if my $x
06:54 gaal I'd expect that to pass?
06:54 audreyt sure, that's redecl
06:54 audreyt my $x = 42; { say $x if my $x }
06:54 gaal yeah
06:54 audreyt is the failure case
06:54 audreyt so instead of doing a full OUTER check
06:55 audreyt we should just have an addBlockPad workalike that registers the assumed-to-be-in-outer syms
06:55 svnbot6 r12443 | agentz++ | [util/prove6]
06:55 svnbot6 r12443 | agentz++ | added -I option, which prepends specified path to PERL6LIB.
06:55 audreyt and the next time that sym is encountered by add BlockPad in itself, die at that point
06:56 audreyt and the AST should only see Var "$x" and never Var "$OUTER::x"
06:56 audreyt unless, of course, the user says that.
06:56 audreyt i.e. the parser should not prepend OUTER:: by itself
06:56 gaal 1747
06:56 audreyt so that's another worthwhile thing to do, as it will also help full lexical hoisting
06:57 audreyt i.e. Pad hangs around the new Code structure itself instead of as a node
06:57 gaal ACK. I think I'll start with \()
06:58 audreyt sure. that's sexier by far :)
06:58 audreyt gaal++
06:58 * audreyt goes back to $job a bit... 2-d bitmap transformers in haskell is, while not exactly a joy to write, at least tolerable...
06:58 gaal audreyt: better than writing it in c++...
06:59 audreyt it's open source btw (http://svn.openfoundry.org/openafp/)
06:59 audreyt but not likely to be use to anybody but people locked-in by a certain Big Blue vendor
07:00 gaal we have HAL to thank for Pugs, indirectly
07:00 audreyt yeah :) and  I really don't know how to write unsafeInterleaveIO in c++
07:00 svnbot6 r12444 | agentz++ | [Makefile.PL]
07:00 svnbot6 r12444 | agentz++ | install_script('util/prove6')
07:02 gaal grammatically, \ is no longer a prefix op, right?
07:03 audreyt it still is
07:03 audreyt it still ahs an unaryop form
07:03 audreyt but the functionlike form \(...) is a circumfix macro I think.
07:04 gaal &prefix:<\> is very weird :)
07:04 audreyt which is term level. S03's table reflects the new reality
07:04 audreyt well, it gives you back a capture with invocant slot fitted in
07:04 gaal also is there a hyperized \? (well, why not, I guess)
07:05 audreyt there could very well be
07:05 audreyt \<< 1..10; # \1, \2, \3...
07:05 audreyt for perl5 compatibility ;)
07:06 gaal add a Capt transformer to make those rw and that'll be useful for DBI
07:06 audreyt circumfix:< :(   ) >
07:06 audreyt circumfix:< \(   ) >
07:06 audreyt are the names of the term-level literals
07:06 audreyt s/literals/macros/
07:07 gaal hmm, actually no, in the column bindings everything goes in one Capt
07:07 gaal OK
07:11 iblechbot joined perl6
07:14 rindolf gaal: you didn't blog in a long time.
07:14 rindolf "Those who can do. Those who can't, blog."
07:18 gaal rindolf: it's better to have things to write about than not to, but it's not like I keep a schedule
07:18 gaal ghci w/embparrot is broken... looking into it
07:28 mollmerx_ joined perl6
07:39 svnbot6 r12445 | agentz++ | [util/prove6]
07:39 svnbot6 r12445 | agentz++ | - suppressed debug outputs.
07:42 svnbot6 r12446 | gaal++ | * fix 'make ghci' when embedding
07:43 gaal hmm. why don't I have Pugs.Val[.Code].CaptMeth in scope in Parser? Parser imports Pugs.AST, which reexports Pugs.Val, which exports the Capt constructors...
07:49 gaal Does anyone understand when Makefile.PL updates trigger a full rebuild of third-party/ and of the main tree?
07:51 audreyt running makefile.pl always do that iirc
07:52 audreyt gaal: P.AST has
07:52 audreyt import Pugs.Val (val, PureStr, PureInt, PureNum)
07:53 audreyt the import list is constrainted and Capt is not among them
07:53 gaal grrr, how did i miss that
07:53 gaal thanks
07:54 audreyt :)
07:55 gaal audreyt: now if i make ghci, how to enter pugs?
07:55 audreyt main
07:55 gaal k
07:56 audreyt bbiab...
08:02 drbean joined perl6
08:02 Daveman joined perl6
08:03 drbean left perl6
08:04 agentzh ?eval sub foo (*%abc) { %abc } foo(:pugs<6.2.13>);
08:04 evalbot_12438 is now known as evalbot_12446
08:04 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("pugs" => "6.2.13"),}
08:04 agentzh ?eval sub foo (*%abc) { %abc } foo(:abc<6.2>);
08:05 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),}
08:05 agentzh evalbot needs fixes.
08:06 agentzh ?eval sub foo (*%abc) { %abc } foo :abc<6.2>;
08:06 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),}
08:06 agentzh ?eval sub foo (*%abc) { %abc } foo abc => 6.2;
08:06 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),}
08:07 agentzh oh, it's very strange...
08:08 gaal hrm. in the parser, I should be constructing a ValCapt. But how can I be sure to get a Val and not an Exp from the thing inside \(...)?
08:10 drbean joined perl6
08:16 nothingmuch joined perl6
08:17 agentzh ?eval my $a='pugs'; sub foo (*%args){say %args} foo($a=>3)
08:17 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) OUTPUT[ ] Bool::True
08:17 agentzh gaal: could you fix this bug for me? i need this feature in Test::todo. :)
08:18 * agentzh currently can't go any further due to this pugs bug...
08:19 gaal isn
08:19 gaal t it [,] now?
08:19 agentzh i've already been fighting with pugs for a few hours... :/
08:19 gaal ?eval my $a='pugs'; sub foo ([,]*%args){say %args} foo($a=>3)
08:19 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) Error:  unexpected "[" expecting comment, formal parameter or ")"
08:19 gaal er
08:19 gaal ?eval my $a='pugs'; sub foo ([,]%args){say %args} foo($a=>3)
08:19 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) Error:  unexpected "[" expecting comment, formal parameter or ")"
08:19 gaal guess not :)
08:19 agentzh ?eval my $a='pugs'; sub foo (*%args){say %args} foo(:a(3))
08:19 evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) OUTPUT[a3 ] Bool::True
08:19 agentzh this works
08:20 agentzh when using a variable as the key, it sucks.
08:20 gaal hm. I don't think there's a simple fix...
08:20 agentzh gaal: okay, no hurry.
08:20 audreyt you can't use variable as key to anamed param
08:21 gaal that's pretty sucky, yeah..
08:21 agentzh audreyt: it's a slurpy hash param, isn't it?
08:21 gaal brb
08:21 audreyt it is, but $a=>3 is a pair not a named param
08:21 agentzh yes, a pair is exactly what i want.
08:22 audreyt so it's passed in as positional
08:22 agentzh slurpy hash param only collects named params?
08:23 agentzh if yes, i'd say that's really a pain.
08:23 * agentzh is dumb.
08:24 audreyt uhm it's specced that way...
08:24 * agentzh goes to reread S06.
08:26 audreyt ?eval 1+1
08:26 evalbot_12446 2
08:27 agentzh audreyt: hmm, indeed you're right. it's specced that way. :(
08:28 agentzh audreyt: i think [,] is a workaround.
08:28 agentzh not sure if pugs already supports that.
08:29 agentzh ?eval my $a='pugs'; sub foo (*%args){say %args} foo([,] $a=>3)
08:29 evalbot_12446 OUTPUT[ ] Bool::True
08:29 agentzh sigh.
08:29 audreyt which test is that? :)
08:30 audreyt (we are working on the Capture-based calling convention that will support [,])
08:30 agentzh mm?
08:30 agentzh audreyt: go on with the excellent work!
08:30 agentzh i'll mark these tests as TODO then.
08:30 audreyt k cool
08:31 audreyt but the canonical syntax is currently
08:31 audreyt [,] %($a=>3)
08:31 audreyt because only the % sigil produced named arguments, according to TimToady's [,] listop refactoring
08:32 audreyt S06, line 380
08:32 lambdabot joined perl6
08:34 audreyt the [,] form is very special in that it's entirely sigil-driven and not actually runtime-value driven
08:35 audreyt another way to say this is that it's a macro that operates on the syntax nodes, not a function application.
08:35 audreyt (bbiab again)
08:45 agentzh horray!!! tests for Test::todo are all passing now!!!
08:45 agentzh toooooooooo happy!
08:46 gaal whee :)
08:46 gaal agentzh++
08:46 agentzh gaal: thanks
08:47 kanru2 joined perl6
08:47 agentzh perl 6 is really a nice language. but pugs is currently not trusty. :)
08:47 miyagawa_ audreyt: ping
08:47 gaal "working on it" :)
08:48 agentzh *nod*
08:49 lambdabot joined perl6
08:49 gaal what's allowed inside a caputure? \(rand > .5 ?? $x !! $y)
08:51 audreyt miyagawa_: pong
08:51 audreyt gaal: anything at al.
08:51 miyagawa_ audreyt: do you know what ingy's been up to these days?
08:51 audreyt no, not really
08:51 miyagawa_ k.
08:51 gaal audreyt: then I don't understand how to construct ValCapt rather than ExpCapt in parser
08:52 miyagawa_ feed this YAML http://blog.bulknews.net/tmp/ba41704178d7d53f67abe788cc9abb9b.yaml to YAML::LoadFile and perl will crash
08:52 miyagawa_ weird. (YAML::Syck is fine)
08:52 gaal interesting url
08:53 miyagawa_ gaal: it's a YAML dumped from Plagger::Feed using Data::Serializer::YAML, if you're interested :)
08:54 audreyt gaal: you don't :)
08:54 gaal audreyt: ah :)
08:54 audreyt gaal: you manufacture an ExpCapt node, or a special Syn "" encoding
08:54 audreyt either way the catual massage is done in Eval land
08:54 audreyt *actual
08:54 gaal Captural Message!
08:54 audreyt I of course prefer an ExpCapt node :)
08:55 audreyt but Syn "" embedding is trivial
08:55 gaal okies.
08:55 audreyt so maybe do that first.
08:55 audreyt up to you :)
08:55 audreyt (ExpCapt saves duplicated work)
08:58 lambdabot joined perl6
09:00 gaal currently the Exp in ExpCapt is the bogus one typed in Val.Code. To move over to oldExp, we need another boot file?
09:01 gaal and, should we perhaps do a mirror of VV, defining newExp already with just one constructor, EE for oldExp?
09:02 agentzh suppertime &
09:03 agentzh left perl6
09:03 svnbot6 r12447 | agentz++ | [ext/Test/lib/Test.pm]
09:03 svnbot6 r12447 | agentz++ | * implemented the todo function which marks the next one test as TODO according to a given deadline.
09:03 svnbot6 r12447 | agentz++ | [t/02-test-pm]
09:03 svnbot6 r12447 | agentz++ | - added 4-version_lt and 5-todo.t to test this new feature. (currently all tests pass for pugs)
09:04 gaal where will newexp eventually live? Pugs.AST?
09:04 lambdabot joined perl6
09:05 nothingmuch joined perl6
09:11 turrepurre joined perl6
09:12 penk joined perl6
09:12 gaal oh no, I forgot, instance doesn't work in hs-boot on 6.4
09:13 gaal have to define ExpCapt outside Pugs.Val.*, it seems.
09:19 xerox joined perl6
09:20 xerox G'day.
09:20 gaal hey xerox
09:21 xerox Hey gaal, how's code?
09:21 gaal 6.4's bugs re: hs-boot are bringing me down :(
09:21 xerox @arr!
09:21 lambdabot I'll keel haul ya fer that!
09:22 xerox ....what is hs-boot?
09:22 gaal I believe "keelhaul" is one word.
09:22 gaal xerox: module A where data AA = AA B.BB
09:22 gaal module B where data BB = BB | BMoose
09:23 gaal there's a way to break the circular dependecy
09:23 gaal by sorta-predeclaring stuff in one of the files
09:23 chris2 joined perl6
09:24 gaal http://haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#mutual-recursion
09:24 lambdabot Title: 4.6. Filenames and separate compilation
09:24 gaal but unfortunately in 6.4, you instance declarations can't go in the hs-boot file
09:25 xerox Oh I see... maybe if SPJ didn't spend all his time unicycling we'd get this things fixed! <giggles>
09:26 xerox <http://paolo.is-a-geek.com/mu/entry/2>
09:26 gaal he did fix it
09:26 gaal in HEAD
09:26 gaal ha, that's excellent
09:27 gaal who are the hackers supporting him?
09:27 xerox Shae shapr Erisson on the left, and Duncan dcoutts Coutts on the right.
09:27 gaal oh it says so in the entry! I went straight for the big picture :)
09:28 xerox ^__^
09:29 gaal so is there an rss feed for this?
09:29 xerox Yup.
09:29 gaal url?
09:30 xerox http://paolo.is-a-geek.com/mu/entry?type=rss
09:30 xerox Oh, you can find lots of Haskellers' feeds on http://planet.haskell.org/ too.
09:30 lambdabot Title: Planet Haskell
09:30 gaal http://syndicated.livejournal.com/xerox_rss/
09:30 lambdabot Title: xerox_rss (syndicated by LiveJournal.com)
09:30 xerox LiveJournal.com ?!
09:30 xerox Oh.
09:31 gaal I just added you there. :)
09:31 xerox Okay :)
09:32 xerox ....what is it for?
09:32 gaal uh, that's how I read rss...
09:32 gaal and others who have accounts there
09:33 xerox So it basically caches a copy of the rss?
09:33 DaGo joined perl6
09:34 gaal it syndicates content
09:34 gaal I mean, LJ is a journaling service; rss reaggregation is just one service it provides.
09:34 xerox gaal: it aggregates all the rss feed you are interested in in one page?
09:36 gaal xerox: lj exists before rss, I think.. it shows me the LJ users I "friend" on one page; now that rss exists, outside feeds can be reporesented as pseudoaccounts on lj and they show up on the friends page just as well.
09:36 xerox Okay, thanks for the explanations!
09:37 xerox So you're waiting for hs-boot to be a pseudo-friend on lj.... :)
09:37 gaal nugh, it's really vexing!
09:37 gaal because I want to write a Pugs.Exp module that mentions Pugs.Val, and have things in Pugs.Val that mention Pugs.Exp
09:38 gaal if I didn't need typeclasses it'd work
09:38 gaal but as it is everythig has to be Data Typeable etc.
09:39 xerox cpp pragmas are evil but.... ?
09:39 gaal you mean #include?
09:39 gaal I resorted to that in Pugs.Val.Code, but I'm not sure I can in this case
09:40 gaal it forces you to decide on one representative module that everyone outside the ball-o'-mud imports
09:41 gaal and it also means you can't use more than one namespace
09:41 xerox Make pugs depend on GHC 6.5 and tell everybody to upgrade!
09:41 gaal since IIRC haskell has the one-module-per-file rule
09:41 gaal xerox: oh, we'll depend on 6.6 about 1 minute after it comes out :)
09:41 gaal not that far away, allegedly
09:42 xerox =)
09:42 gaal by ICFP, audreyt tells me
09:42 xerox audrey will attend?
09:42 gaal dunno?
09:42 xerox Yarrr, I'd loved to.
09:43 gaal it's in Portland this year? where are you based?
09:43 xerox I'm in Turin, north-west Italy.
09:43 gaal Torino? I'd love to get my hands on a pack of Hausbrandt coffee!
09:44 xerox Yuck!
09:44 gaal !
09:44 gaal what do you drink then?
09:44 xerox Tea.
09:44 gaal ah :)
09:45 gaal then I think you're the only Italian I know who doens't drink espresso :)
09:45 gaal but then I don't know that many Italians!
09:45 xerox hehe
09:45 xerox Coffee isn't that good =P
09:46 gaal that's almost like saying "air isn't that good", as far as I'm concerned
09:46 xerox Geeks.
09:50 gaal ooooooff sometimes I just want to get the typechecker to shut up
09:50 xerox What is it harassing you about?
09:50 gaal still the circularity isse:
09:50 xerox @ghc
09:50 lambdabot CPR Analysis tried to take the lub of a function and a tuple
09:51 xerox Ack.
09:51 gaal I want to assure it that instances do exist for a type
09:51 gaal but I can't declare them myself, because if I do in the consuming module, I'll get duplicate instance errors later
09:53 xerox What about: #if defined(GHC < 6.5) ...instance..declaration... #else import module (...) #endif ?
09:53 xerox It duplicates the code, but if it works...
09:53 gaal hmmm
09:53 gaal I might do that
09:54 xerox (I am not sure about the #if defined GHC syntax, you'd better look it up.)
09:54 gaal yeah, we have stuff like that in somewhere
09:56 gaal chasing some other circularity first....
10:10 kanru2 is now known as kanru
10:17 gaal so, no, the cpp trick doesn't work :(
10:18 gaal because no matter what, I can't declare instances in the consuming site
10:18 gaal it'll clash with the real derived instances in the supplying module.
10:18 gaal and -fallow-overlapping-instances won't help.
10:22 elmex joined perl6
10:25 gaal bbiab&
10:26 xerox gaal: of course
10:26 xerox gaal: you have to move all the needed definitions in the module, and avoid importing it; or at least hide them.
10:28 gaal i don't understand your proposed workaround then.
10:29 xerox You copy everything you need in the module it needs it, and #ifdef it.
10:30 gaal A and B are circularly related and have derived instances. I put my stuff really in A. Now it must not be in B any more.
10:30 gaal but now module C, which used to import B, breaks.
10:30 gaal how does the ifdef help?
10:31 xerox It doesn't in general, it's just a work around that works for a single module.
10:31 xerox And it's ugly, nevermind.
10:32 gaal pity you can't derive on type aliases
10:33 gaal but there's no point to be able to do that except to workaround the hs-boot limitation, so may as well fix the hs-boot limitation
10:33 gaal oooooof
10:33 gaal ok, really later now... &
10:35 xerox Bye!
10:44 pmurias_ joined perl6
10:44 pmurias_ hi,
10:45 pmurias_ is using feather for parrot related development ok?
10:47 pmurias_ (yhc bytecode -> parrot tranlator)
10:47 xerox That sounds like a fun project!
10:48 kane-xs joined perl6
10:49 pmurias_ any help wold be gratitusly accepted ;)
10:49 xerox Have you posted to the yhc mailing list?
10:51 pmurias_ not yet... i have not really started on it untill today
10:56 masak joined perl6
10:56 svnbot6 r12448 | masak++ | * added reference to "Software Extension and Integration with Type Classes"
10:56 svnbot6 r12448 | masak++ | in the READTHEM file
10:56 masak i've a mind to trawl through the IRC logs looking for more references to add
10:56 masak would that be appreciated, or just a waste of time?
10:59 pmurias_ well, you can find things you would like yourself...
11:00 masak pmurias_: how do you mean?
11:00 prefiks joined perl6
11:00 pmurias_ what do i mean?
11:03 pmurias_ you could propably find stuff you would like to read yourself
11:03 masak yes. do you mean "well, instead of adding things to READTHEM, you could just find stuff you would like to read yourself"?
11:04 masak or "while trawling through old IRC logs, you might find stuff you would like yourself"?
11:04 masak :)
11:05 pmurias_ the latter :)
11:05 agentzh joined perl6
11:08 TimToady joined perl6
11:09 masak ok. yes, that's partly the idea. i've drifted away from #perl6 lately, and this might be a good way to familiarize myself with the latest topics
11:09 masak while collecting (hopefully) useful information
11:10 pmurias_ what should i use for parsing binary data in perl5
11:10 pmurias_ or haskell
11:10 pmurias_ i vagly remember audrey mentioned something
11:11 masak Parse::Binary?
11:11 masak http://search.cpan.org/~smueller/Parse-Binary-0.10/lib/Parse/Binary.pm
11:11 lambdabot Title: Parse::Binary - Unpack binary data structures into object hierarchies - search.c ...
11:11 masak perhaps
11:14 svnbot6 r12449 | agentz++ | [t/02-test-pm/5-todo.t]
11:14 svnbot6 r12449 | agentz++ | switched to the canonical syntax "[,] %($a=>$b)" according to audreyt++
11:17 * agentzh wonders what to do next.
11:17 pmurias_ masak: i'll try Convert::Binary::C first
11:17 masak pmurias_: sounds good
11:19 masak adding stuff now to READTHEM and READTOO...
11:19 masak there's a fine line between those two
11:20 masak I already confused them in my commit log message :/
11:22 ludan joined perl6
11:25 gaal audreyt: ping
11:30 gaal audreyt: since we aren't planning a release before ghc 6.6, I want to drop support for 6.4
11:31 gaal a bit drastic, but the hs-boot problem makes it impossible to refer to oldExp from newVal land
11:35 pmurias_ i would like to have scons on feather, could somebody install it please, or should i install in my homedir?
11:36 masak &
11:36 svnbot6 r12450 | masak++ | a couple more additions to READTHEM and READTOO
11:37 gaal pmurias_: installing
11:40 lisppaste3 joined perl6
11:41 gaal pmurias_: done.
11:46 agentzh audreyt, gaal: my updates to Test.pm triggers a bug in the yml codegen. prove6 -Iext/Test/lib works fine but prove6 -Iblib6/lib fails.
11:46 agentzh *trigger
11:46 gaal perlbot nopaste
11:46 perlbot Paste your code here and #<channel> will be able to view it: http://sial.org/pbot/<channel>
11:47 gaal agentzh: nopaste it please?
11:47 agentzh gaal: okay
11:47 gaal ugh, looks like there's no easy way to get 6.5 on debian. *sigh*
11:49 pasteling "agentzh" at 210.22.200.67 pasted "new Test.pm triggers a bug in the yml codegen" (33 lines, 1.5K) at http://sial.org/pbot/19135
11:49 agentzh when i removed blib6/lib/Test.pm.yml, all test passed again.
11:50 gaal when did you gen the yml file? are you sure you genned the right one? :)
11:51 xdg joined perl6
11:51 gaal once you gen it, can you please grep it for version_lt?
11:51 agentzh i've already run "pugs.exe -CParse-YAML ext\Test\lib\Test.pm > blib6\lib\Test.pm.yml" for 40 times. :)
11:51 agentzh gaal: okay
11:52 agentzh gaal: there're a lot of "version_lt". :)
11:52 gaal also, what does ext\Test\lib\Test.pm line 201 say?
11:53 agentzh "    if (!$spec_ver.defined or $spec_ver eq '1' or version_lt($?VERSION, $spec_ver)) {
11:53 agentzh can you reproduce the error on your side?
11:53 gaal where is version_lt defined?
11:53 gaal agentzh: my co is broken right now...
11:54 agentzh right above it.
11:54 gaal hold on, I'll use another working copy.
11:54 agentzh fine
11:56 masak pmurias_, you were right. I am finding things I like :)
11:56 masak I will probably use this: http://www.perlmonks.org/?node_id=567025
11:56 lambdabot Title: Color diff for terminal
11:57 masak but it's not something I feel belongs in the READT* files
11:57 agentzh masak: the perl 6 version of color_diff is also in the pugs tree!
11:58 masak agentzh: yes, so in a way it's already referenced from there :)
11:58 agentzh aye
11:59 masak agentzh: where in the tree is it? I might check that a comment references the perlmonks node
12:00 agentzh examples/color_diff.pl
12:00 masak agentzh: thx
12:00 agentzh sorry, no underscore. :)
12:00 agentzh colordiff.pl
12:00 chris2 joined perl6
12:00 svnbot6 r12451 | masak++ | one more reference to READTOO
12:00 masak it's already referenced. nothing to see, move along
12:03 svnbot6 r12452 | agentz++ | [t/02-test-pm/4-version_lt.t]
12:03 svnbot6 r12452 | agentz++ | added one test for comparing "6.2.13" with "6.28".
12:06 buetow joined perl6
12:16 agentzh has anyone here noticed that Test.pm is now broken?
12:16 agentzh (in the case that blib6/lib/Test.pm.yml is used, which is the default setting)
12:18 agentzh please don't revert my changes to Test.pm since it's definitely not my fault. blame the yml codegen instead. thank you. :)
12:18 svnbot6 r12453 | agentz++ | [TASKS]
12:18 svnbot6 r12453 | agentz++ | - kicked off the Test::todo item since it's already done.
12:18 svnbot6 r12453 | agentz++ | - added more documentation for Test::todo to Test.pm's Kwid.
12:21 svnbot6 r12454 | masak++ | re-credited original mention of paper from gaal to audreyt
12:21 svnbot6 r12455 | agentz++ | [Test/lib/Test.pm]
12:21 svnbot6 r12455 | agentz++ | - more docs
12:23 * agentzh still has 40 min tonight to work on util/smartlinks.pl's HTML emitter.
12:27 svnbot6 r12456 | gaal++ | * util/prove6: don't probe for a pugs in path when HARNESS_PERL
12:27 svnbot6 r12456 | gaal++ |   is defined.
12:28 agentzh gaal: you now have a working copy?
12:30 * agentzh now see why putter was oppose to writing anything big in pugs.
12:30 agentzh *sees
12:31 agentzh predictability is really really important to productivity.
12:31 gaal agentzh: yes, looking into it.
12:31 agentzh gaal++
12:45 masak karma masak
12:45 masak dang
12:48 masak (I was explaining karma to my mom. It would have been so much more effective if the karma bot had been online. :)
12:50 agentzh whee, i've embedded test snippets to synopses via util/smartlinks.pl.
12:50 agentzh the next step is to HTMLfy them. :)
12:56 gaal fixed
12:57 gaal agentzh: please svk up and regen Test.pm.yml
12:57 agentzh ok
12:57 svnbot6 r12457 | gaal++ | * fix &Test::todo problem reported by agentzh++
12:57 svnbot6 r12457 | gaal++ |   (Precompiled code wants fully-qualified names in calls.)
12:57 audreyt 14:31 < agentzh> predictability is really really important to productivity.
12:57 audreyt indeed!
12:58 agentzh :)
12:58 audreyt unfortunately, the only way I know of to reach predictability is by trying over and over again
12:58 audreyt each time failing miserably in different places
12:58 gaal audreyt, I'm trying to set up 6.5 here, I'm really sick of the hs-boot problem
12:58 audreyt and finally smooth out all wrinkles :)
12:58 agentzh so i'll try my best to write more and more tests for pugs.
12:58 gaal well, always failing is also a form of predictability.
12:58 audreyt gaal: bindist?
12:58 gaal audreyt: yes
12:59 gaal but unfortunately not debianized
12:59 agentzh gaal: why "Test::version_lt"?
12:59 audreyt http://www.haskell.org/ghc/dist/current/dist/ghc-6.5.20060818-i386-unknown-linux.tar.bz2
12:59 gaal audreyt: yes, that's the one I'm using.
13:00 gaal 14:30 < gaal> audreyt: since we aren't planning a release before ghc 6.6, I want to drop support for 6.4
13:00 gaal 14:30 < gaal> a bit drastic, but the hs-boot problem makes it impossible to refer to oldExp from newVal land
13:00 audreyt wait a second...
13:01 audreyt surely you can put Exp in Internals.h.s-boot?
13:01 [mago] joined perl6
13:01 gaal instances...
13:02 audreyt which instances do you need? Typeable only?
13:02 gaal Data, Show etc
13:02 audreyt if it's just Data, Typeable and Show
13:02 gaal and Ord and Eq :)
13:03 gaal and the drifted ones, but we can comment-instance those
13:03 audreyt Typeable, Ord, Eq and Show can also be drifted
13:04 audreyt agentzh: currently the .yml producer does not resolve the three levels of sub call lookup
13:04 audreyt (lexical; package-scoped; global)
13:04 agentzh oh, got it.
13:04 audreyt agentzh: so it needs you to syntactically determine which level it is doing
13:05 agentzh i see.
13:05 audreyt foo(); Foo::foo(); &*foo()
13:05 agentzh sorry, end of day for me &
13:06 mauke_ joined perl6
13:06 gaal ouch, looks like the bindist of ghc-6.5 is built against libreadline.so.4 which debian doesn't carry?
13:07 gaal audreyt: how can those be drifted?
13:08 audreyt the usual way
13:08 audreyt simply use drift annotations to attain them
13:08 audreyt but let me think a bit...
13:10 Bit-Man joined perl6
13:12 audreyt yeah, drifting them will let us get out of the problem quickly. another thought is to relax the Data/Typeable restriction
13:12 audreyt since we are not actively using SYB yet
13:12 audreyt and then start using them only after 6.6
13:12 gaal we do in extractPlaceholderVars
13:12 gaal though that's oldExp
13:12 audreyt but in ePV the full instance is  in scope
13:12 audreyt so that's fine; only newland typeclasses needs to drop those restriction
13:12 gaal don't we use typeOf in some places?
13:13 gaal I still don't understand how the drifing will (a) work (b) help us
13:13 audreyt let me try a bit
13:13 gaal in the case of Show, for example
13:14 gaal k let me ci the Exp I want
13:14 audreyt k
13:14 audreyt sorry about the envelope-pushing situation :)
13:15 gaal which haskell compiler is it that puts everything in one big file?
13:15 gaal let's move to that one :)
13:15 gaal svk pull
13:18 svnbot6 r12458 | gaal++ | * Pugs.Exp, holding newland AST toplevel types (not compiled yet)
13:20 audreyt turns out we can supply Typeable instance without knowing constructor
13:20 svnbot6 r12459 | audreyt++ | * Pugs.Val: Relax ICoercible superclasses to be only Typeable.
13:20 audreyt unlike Data Eq Ord Show
13:21 audreyt so it's still fine to superclass it
13:21 audreyt where do you want to import Pugs.Exp?
13:21 mauke_ is now known as mauke
13:21 gaal ouch, I had a conflict and choosing 'm' I get a... four way merge? :)
13:21 xerox joined perl6
13:21 gaal audreyt: Pugs.AST but ultimately Pugs.Parser
13:26 audreyt done.
13:27 audreyt svk pull
13:27 audreyt :)
13:28 * audreyt ponders "VV ValVanguard" as complement to "EE ExpEmeritus"
13:28 svnbot6 r12460 | audreyt++ | * Pugs.AST now imports Pugs.Exp.
13:29 gaal I thought there was some kind of newtype trick to be played, but couldn't see it till now. thank you audreyt! :)
13:30 gaal PP PugsPotente
13:31 audreyt gaal: godo enough? :)
13:31 gaal "godo"?
13:31 audreyt *godot
13:32 audreyt er, *good
13:32 gaal Waiting for Good, by Samuel Buckett
13:32 audreyt glad to be of help (though I really pine for GHC 6.6 :))
13:33 gaal chasing down my local changes, probably yes
13:33 gaal audreyt++
13:36 audreyt yay :)
13:36 audreyt glad to be of help
13:36 gaal (not 100% done yet...)
13:37 audreyt (though I really pine for GHC 6.6 :))
13:37 audreyt audreyt{ brokenRecord = True }
13:37 * gaal gets on the groove
13:39 gaal mind if I commit? I have more instance errors
13:41 audreyt you mean breaking the buil?
13:41 gaal y
13:41 audreyt you mean breaking the build? sure!
13:43 gaal r12460 :)
13:43 svnbot6 r12461 | gaal++ | * WIP towards Capture parsing:
13:43 svnbot6 r12461 | gaal++ |   16:40 < audreyt> you mean breaking the build? sure!
13:43 gaal +1
13:48 audreyt fixed.
13:49 asz joined perl6
13:49 gaal thank you! !gla
13:49 svnbot6 r12462 | audreyt++ | * Unbreak the build via newtype transformation.
13:51 gaal urp? src/Pugs/Exp.hs:18:44: Not in scope: type constructor or class `OldAST.Exp'
13:51 svnbot6 r12463 | audreyt++ | * More unbreakage.
13:51 gaal but it was in the boot file..
13:53 audreyt thinking.
13:58 eden joined perl6
13:58 audreyt fixed
13:58 eden is now known as eden_c
13:59 gaal src/Pugs/Exp.hs:10:52: Module `Pugs.AST.Internals' (hi-boot interface) does not export `Exp'
13:59 svnbot6 r12464 | audreyt++ | * More unbreakage.
14:00 audreyt no way... rm the .hi file and .o for it?
14:02 gaal yes, looks better. apparently make ghci isn't as robust in dependencies as non-interactive --make
14:02 audreyt I think instead of shoving ExpCapt into a VV, we should have an EE form in oldExp that bridges to newExp, and so we can simply represent it as a CApply Noop
14:02 audreyt I need to fetch some food :) bbiab
14:04 gaal oy, now I remember why I never use make ghci -- it doesn't work with colinux :((
14:08 audreyt what breaks it again?
14:09 gaal maybe it's not colinux' fault - my libpthread.so is an ld script.
14:09 gaal apparently I'm not the first with this problem, chasing google.
14:12 audreyt surely building nonthreaded will fix it?
14:12 audreyt droppping -thread that is
14:12 cognominal joined perl6
14:12 audreyt oh hm. ghci wasn't using threaded ayway
14:14 gaal it's giving /usr/lib/libc.so: invalid ELF header now (w/o -lpthread)
14:14 gaal that's an ld script too....
14:15 soisoisoi joined perl6
14:22 audreyt I think libpcre is sufficient to express all of perl6 rules.
14:22 gaal !?
14:22 audreyt so librules would be better as a libpcre frontend.
14:22 audreyt notably: callout points and named captures are supported natively.
14:23 gaal ouch! ghci accepts .os but not .as?
14:23 audreyt aye
14:23 gaal then ghci w/p5 embedding can't work?
14:23 gaal (DynaLoader)
14:24 gaal not that I need it right now, but...!
14:28 audreyt just need to figure out an encodding for list captures
14:28 audreyt (similar to origuruma's (?@<name>))
14:29 audreyt or, alternately, find out a way to use origuruma with callout
14:30 gaal The characteristics of this library is that different character encoding for every regular expression object can be specified"
14:30 gaal -- sad
14:30 audreyt well, that does mean big5 can be matched as-is
14:30 audreyt without having to convert to utf first
14:31 audreyt which is in alignment with the ruby philosophy of supporting different charset semantics
14:31 audreyt known as MCS
14:31 gaal as long as they're not unicode </nasty>
14:31 audreyt 1.9 supports unicode as one of the charsets
14:31 audreyt as dos oniguruma, with UTF16 and UTF32 mode.
14:32 audreyt "unicode is just another charset" I think is the idea
14:33 gaal good to know!
14:34 audreyt hm. clearly list captures can be moded as callout, each closing nested parens replaced by a numbered (?C999)
14:34 audreyt and even better, I've coded that up before.
14:34 audreyt s/list captures/tree capture/
14:34 audreyt (Template::Extract)
14:35 ajs_home joined perl6
14:35 audreyt but I'll get MOP encoded first before chasing down that rabbit hole
14:35 audreyt it's the the next milestone, not this ;)
14:44 gaal well, it would be very useful to have! but you are crazy :)
14:54 audreyt I'm not the first one who've encoded this...
14:55 audreyt dconway did that
14:55 audreyt but his underlying engine is much more primitive
14:55 audreyt and much flakier at that time
14:55 gaal and he's the paradigm of sanity, you're right
14:55 audreyt lol
14:55 gaal how do I get my ruleCapture to be fired before the ops get a chance at it?
14:56 gaal seems that buildExpressionParser is getting in my way
14:57 audreyt hm
14:58 audreyt hacky way: remove \ from operator table for now.
14:58 audreyt slightly better: introduce Circumfix into expression parser.
14:58 audreyt (and \(...) would be circum)
14:59 audreyt clearly insane: use aheadSym to rule out the \( combiation
14:59 gaal ouch :)
14:59 audreyt right way: implement full optable
14:59 audreyt I think clear insanity is more attractive.
14:59 audreyt but that's because I'm the epitome of sanity
15:00 gaal "only the clearest insanity allowed"
15:00 gaal unsafePerformInsanity
15:02 gaal where in precedence would \() be?
15:04 audreyt term
15:04 audreyt as in S03 table
15:04 elmex joined perl6
15:09 FurnaceBoy joined perl6
15:10 clkao audreyt: what's the right way to extract all stuff those should be _()'ed ?
15:11 audreyt        find lib web/templates | grep -v 'swp\|gif\|png\|jpg' | xargs xgettext.pl -u -o po/zh_tw.po
15:16 clkao audreyt: i mean those hasn't been _()'ed, including templates
15:17 mdiep_ joined perl6
15:17 gaal audreyt: how to name a circum internally? specifically should I protect the whitespace / differentiate opening and closing marks with circumfix:<\( )> ?
15:18 gaal maybe just 'circumfix:\( )' is enough internally?
15:22 audreyt I think so yes.
15:23 audreyt clkao: you use heuristics... namely [A-Za-z]\w+ outside tags in templates
15:23 audreyt and string literals in source. but they are not reliable
15:23 audreyt there's no generally reliable process for this
15:24 TimToady does something need to be specced for Perl 6 for this?  (well, duh...)
15:24 clkao audreyt: iirc i wrote some interactive thing to do so
15:24 clkao i can't remember where it is
15:27 TimToady ?eval [1,2,3] >>+<< [4,5,6]
15:27 evalbot_12446 is now known as evalbot_12464
15:27 evalbot_12464 Error: No compatible subroutine found: "&infix:>>+<<"
15:27 audreyt TimToady: .as() :)
15:27 audreyt oy, hyper broken?
15:28 TimToady yes, couple days now...
15:28 audreyt wasn't aware of it. fixing
15:28 TimToady that's why I mentioned it.  :)
15:29 audreyt gaal: I refactored a lot of Parser.hs into Operator.hs
15:29 gaal right now?
15:29 audreyt probabaly will merge fine with you
15:29 gaal okay
15:30 gaal will make build faster, probably :)
15:30 audreyt that's why I did it :)
15:30 audreyt also removed the (?implicitparam)
15:30 svnbot6 r12465 | audreyt++ | * Refactor operator-related parts from Pugs.Parser
15:30 svnbot6 r12465 | audreyt++ |   into Pugs.Parser.Operator to decrease build time and
15:30 svnbot6 r12465 | audreyt++ |   lose the need for an implicit parameter passed through
15:30 svnbot6 r12465 | audreyt++ |   each expr call.
15:30 audreyt so will make parsetime faster too
15:30 audreyt (not benchmarked yet)
15:30 * gaal goes to watch audreyt's circularity saw
15:30 audreyt ?eval -<< 1,2,3
15:30 evalbot_12464 Error: Hyper OP only works on lists
15:31 audreyt ?eval -<< [1,2,3]
15:31 evalbot_12464 (-1, -2, -3)
15:31 xerox Wow, what is -<< ?
15:31 xerox Ah, - and << !
15:31 gaal ~<~<<-     # pugs has lightning arrows!
15:33 audreyt I wonder if the Var form should know about meta modifiers
15:33 audreyt aka [] and >><<
15:35 audreyt is [+]<< legal?
15:35 audreyt and [>>+<<]?
15:36 xerox Is [+]<< different from [[+]] =
15:36 xerox s/=/?/
15:36 audreyt [[+]] is probably illegal as [] only takes infix
15:36 audreyt and [+] is prefix
15:36 xerox Oh I see.
15:36 TimToady [>>+<<] is fine
15:37 TimToady except you have to worry about list context
15:37 xerox It returns a list of summed tuple of lists?
15:38 gaal [\m/]
15:38 TimToady \m/ is the "pulling down the clothesline" operator?
15:39 gaal I thought it was a triangular m/ operator!
15:39 xerox Looks also like...
15:39 * audreyt wonders why it's the case that every language but perl has native support for named captures now :)
15:39 TimToady you'll have to define infix:<m/> first...
15:40 gaal $x ~~ m/m/
15:40 gaal ok enough foolin around for 5 minutes
15:40 gaal audreyt: Java has named caprures?
15:41 xerox If you think of \ and / as the arm, and m as a hand on the elbow...
15:41 audreyt gaal: yes. http://jregex.sourceforge.net/
15:41 gaal if you think of m as the head, and \ and / as antlers...
15:41 TimToady hmm, culturally means different things though.
15:42 gaal in some places, "culturally" means nothign at all...
15:42 xerox !
15:42 gaal audreyt: I'll be.
15:43 audreyt because you think?
15:44 audreyt or rather, you'll think
15:44 TimToady when you said "named captures", I was thinking "sub foo (\$capture)"
15:44 TimToady and was dubious...
15:44 audreyt oh, sorry, regex context :)
15:44 gaal caribou, ergo moose
15:44 TimToady k, I'll just do a lookbehind
15:45 TimToady or maybe I should have done a lookahead.  <headscratcher>
15:45 audreyt you mean lookaround. :)
15:46 gaal :hoogle [a] -> [(a,a)]
15:46 gaal @hoogle [a] -> [(a,a)]
15:46 lambdabot Prelude.zip :: [a] -> [b] -> [(a, b)]
15:47 gaal nyuh.
15:47 DaGo joined perl6
15:49 TimToady @foo = [\>>+<<]<< @bar
15:49 lambdabot Maybe you meant: faq todo yow
15:49 audreyt fixed. was a typo
15:49 svnbot6 r12466 | audreyt++ | * Repair >>+<<.  "drop 2" was typo'ed into "take 2"
15:49 svnbot6 r12467 | audreyt++ | * Pugs.Prim.Keyed: sizeFromRef is unused
15:49 audreyt if I've used proper types for hyper, there won't be a chance for typo...
15:51 audreyt let's see. hyper only makes sense on prefix/postfix/infix
15:51 audreyt including postcircum
15:51 audreyt but not circum
15:51 audreyt hm. too many combinations.
15:52 audreyt so probably "Hyper / Fold / Scan" as enum
15:52 audreyt and each var can have a list of those on them
15:53 xerox gaal: map (id &&& id)
15:53 audreyt from innermost to outermost
15:53 audreyt TimToady: do they ever live in the sym table?
15:53 xerox (...or even map (join (&&&) id).)
15:53 gaal xerox: I think I should introduce you to asavige...
15:54 audreyt i.e. if the symtable has prefix:[+], then should it take prec
15:54 audreyt over the autogenerated fallback?
15:54 xerox gaal: yarrr, what?
15:54 gaal there's a guy I want you to meet
15:54 audreyt show him saturn :)
15:54 TimToady We've tried to keep the metas out of the sym table because if they're in there people will screw 'em up.
15:55 audreyt but S03:821.
15:55 TimToady yes
15:55 audreyt so probably still allowing its entry for now
15:56 xerox gaal: Okay!
15:56 TimToady so far we've only really allowed reduce ops
15:56 TimToady the mathematicians *will* screw up the hypers if you give 'em a chance though.
15:57 audreyt and if someone defines prefix:[>>+<<]
15:57 svnbot6 r12468 | gaal++ | * some golf in Pugs.Parser.Operator before audrey strikes
15:57 audreyt we can't help but let them get it.
15:57 audreyt so seems easier to just allow the userdefined hypers, if already in scope, win the dispatch...
15:57 TimToady it's either that or complain bitterly.
15:57 gaal xerox: http://search.cpan.org/~ASAVIGE/Acme-EyeDrops-1.51/lib/Acme/EyeDrops.pm
15:57 lambdabot Title: Acme::EyeDrops - Visual Programming in Perl - search.cpan.org
15:58 audreyt that's one way out too
15:58 gaal xerox: also, http://www.perlmonks.org/index.pl?node_id=397958
15:58 lambdabot Title: Saturn
15:58 spoop joined perl6
15:59 * xerox stares blankly
15:59 TimToady we do have to have some internal way of doing syntactically magical reduces like [,]
16:00 TimToady or more semantically magical, I guess
16:00 TimToady but reduce is the one we already have an escape valve for
16:01 xerox gaal: I did a eye in C at some point ^_^
16:01 gaal did it see better when you expanded the circumference? :p
16:01 TimToady and there's a sense in which all the names of the available metaops have to be pregenerated so that longest token can win.
16:01 audreyt wow. r12465 exceeds my expectation.
16:01 TimToady so I guess they all go in lexer table, if not sym table
16:01 gaal in compilation speed?
16:02 TimToady in failures?
16:02 audreyt in parse speed.
16:02 audreyt profs shows 2x speedup
16:02 audreyt but how is that possible.
16:02 clkao it's getting cold... is it christmas yet?
16:02 audreyt maybe implicit parameters are really slow ;)
16:02 clkao becuse it didn't parse at all?
16:02 TimToady I think maybe I'll start a smoke?
16:02 gaal must be the speedbugs :)
16:02 TimToady that means yml is useless now?
16:03 audreyt must be .prof specific
16:03 gaal TimToady: I think we can afford more than x2 speedup...
16:04 audreyt yeah. in nonprofiled build the speedup is less significant
16:04 audreyt so it's more like the GHC profiler didn't like impl params before
16:04 audreyt that's more like it ;)
16:04 TimToady whew!
16:04 gaal spj needs to profile the profiler?
16:05 TimToady still, have started new smoke to see how many more tests pass with hyper fix.
16:07 TimToady if we have [>>!===<<]<< in the lexer table it becomes rather easy to look up and carp about, since those are just magic hashes that can be used without the magic outside of regexen.
16:08 TimToady we need to be sure not to add any metaoperators that produce exponentially more lexer table entries though...
16:09 TimToady hmm, still getting:
16:09 TimToady Actual: An exception was thrown : No compatible subroutine found: "&infix:»-«"
16:09 xinming_ joined perl6
16:09 chris2 joined perl6
16:09 TimToady ext/Benchmark/t/basic.t line 10,
16:10 audreyt ?eval (1,2,3) >>-<< (4,5,6)
16:10 TimToady and following
16:10 evalbot_12464 is now known as evalbot_12468
16:10 evalbot_12468 (-3, -3, -3)
16:10 TimToady french naughtiness?
16:10 audreyt ?eval my @a >>-<< my @b
16:10 evalbot_12468 ()
16:10 audreyt no, it was using texan
16:10 audreyt probably your pugs is not r12468?
16:11 audreyt ohh wait
16:11 audreyt it was using french.
16:11 TimToady Updated to revision 12468.
16:11 audreyt sorry.
16:11 TimToady ?eval (1,2,3) »-« (4,5,6)
16:11 evalbot_12468 Error:  unexpected "\\" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
16:12 xinming_ joined perl6
16:12 gaal audreyt: I don't quite understand where the parsing for ops actually occurs. I'm looking at makeOp1 now: is it *just* symbol name >> lookAheadLiterals?
16:13 gaal if so presumably in my case I have to conditionally change that to between startOp endOp lookAheadLiterals
16:13 audreyt sure
16:13 gaal lookAheadLiterals is confusing me though. why does it sometimes contain prefix etc.?
16:14 audreyt but then you just made circumfix.
16:14 gaal I'm doing circumfix now, yes
16:14 audreyt the horrible kluge was there to make -e parse
16:14 audreyt because longest token doesn't span levels yet
16:16 audreyt you don't need that for circum
16:16 gaal what's the concept that differentiates circumfix from {prefix, postfix} etc.?
16:16 audreyt circums nest
16:17 gaal I mean what's the name for this?
16:17 audreyt parsefail
16:17 gaal parser = if prec == Circumfix then regularParser else circumfixParser
16:17 gaal where regularParser = symbol name
16:18 gaal circumfixParser = between opener closer lookaheadmoose
16:18 gaal (sorry, regularParser = symbol name >> lookaheadmoose)
16:23 cmarcelo joined perl6
16:23 bernhard joined perl6
16:26 Psyche^ joined perl6
16:33 audreyt    | MFold             -- [+]
16:33 audreyt    | MScan             -- [\+]
16:33 audreyt    | MPre              -- >>+
16:33 audreyt    | MPost             -- +<<
16:33 audreyt    | MHyper            -- >>+<<
16:33 audreyt    | MHyperFold        -- [>>+<<]
16:33 audreyt    | MHyperFoldPost    -- [>>+<<]<<
16:33 audreyt    | MHyperScan        -- [\>>+<<]
16:33 audreyt    | MHyperScanPost    -- [\>>+<<]<<
16:34 audreyt did I miss something?
16:35 gaal don't we call scans productions now?
16:35 gaal MProduce
16:35 gaal or MTriangulate
16:35 gaal <- ever ready with the paint bucket
16:35 TimToady I like triangulate as in "narrow in on the answer"
16:36 audreyt but is it narrowing?
16:36 gaal I liked the etymological profundity of produce
16:36 TimToady widening in on the answer?
16:36 TimToady produce is far to generic
16:36 TimToady *too
16:36 xerox Etymological profundity?
16:36 audreyt if I call it MTrig
16:37 audreyt that's principle of max surprise :)
16:37 gaal xerox: reduce/produce
16:37 gaal xerox: that's the same root in both
16:37 xerox Right.
16:37 TimToady it's almost as bad as "scan"
16:38 gaal TimToady: well, I was happy when you suggested it :-p
16:38 audreyt the spec wording is "triangular reduce
16:38 svnbot6 r12469 | audreyt++ | * Fix hypers with unicode chars.
16:38 gaal wow, here's an error I never got before.
16:38 gaal pugs: No match in record selector Pugs.Parser.Types.op_assoc
16:38 TimToady yay
16:39 audreyt gaal: how did you produce it?
16:39 audreyt or triangulate into it?
16:39 TimToady your meter doesn't scan.
16:40 TimToady and you're not allowed to rhyme with the same word...
16:40 gaal your merier doesn't run
16:40 gaal *metier
16:40 TimToady Meteor?  Run!
16:40 gaal audreyt: with the patch over at http://perlcabal.org:~gaal/tmp/circum.0.patch
16:41 audreyt 404
16:41 audreyt err nvm
16:41 audreyt gaal: Operator.hs line 57
16:42 audreyt add a case to splitop
16:42 rindolf Hi TimToady
16:42 Psyche^ is now known as Patterner
16:42 audreyt also instead of reuseing makeop1
16:42 audreyt I'd suggest makeOpCircum.
16:42 gaal so much for the error there...
16:42 TimToady howdy do!
16:42 gaal okies
16:43 rindolf TimToady: sup?
16:43 TimToady is my alias for "svn up"  :)
16:43 luqui joined perl6
16:43 rindolf TimToady: OK.
16:44 rindolf I don't have an alias for svn up. I type it quickly enough.
16:44 rindolf It's just 6 letters.
16:44 gaal I used to type 'cvs' when I meant 'svn'. Then I started typing 'svn' when I meant 'cvs'. Then 'svn' for 'svk'. Now I don't use source control any more.
16:45 rindolf I uploaded this today: http://search.cpan.org/~shlomif/Test-Count-0.01/ .
16:45 lambdabot Title: Shlomi Fish / Test-Count-0.01 - search.cpan.org
16:45 rindolf gaal: you're not using version control?
16:45 gaal cpan-upload -mailto [email@hidden.address] -user gaal Test-Baron
16:45 rindolf gaal: I've done my SICP exercises using CVS.
16:45 rindolf gaal: what's Test-Baron?
16:46 merlyn cp Module.pm Module.pm-GOOD
16:46 rindolf merlyn: hi.
16:46 merlyn cp Module.pm Module.pm-2006-08-20
16:46 gaal nobody gets my humor.
16:46 gaal so I'll cry and you'll get my vitreous humour.
16:46 rindolf gaal: but we still lvoe you!
16:46 TimToady I got it, which is why I didn't say anything.
16:46 TimToady because I'm kind.  :P
16:47 rindolf http://search.cpan.org/~shlomif/Test-Count-0.01/
16:47 lambdabot Title: Shlomi Fish / Test-Count-0.01 - search.cpan.org
16:47 TimToady or is that type, or wtf?
16:47 gaal Help! I am surrounded by unconditional love!
16:47 rindolf Sorry.
16:47 rindolf http://better-scm.berlios.de/docs/shlomif-evolution.html
16:47 lambdabot Title: Shlomi Fish - Evolution of a Revision Control User
16:48 rindolf gaal: I love you only in condition that you love me uncondtionally.
16:48 gaal too late, you already signed
16:48 TimToady unconditional lover's quarrels...
16:48 TimToady *lovers'
16:50 gaal is MkOpRow.o_circumfix :: ![UnaryOperator]  ?
16:50 audreyt sure
16:52 cmarcelo joined perl6
16:53 rindolf Yay! Test::Count works.
16:53 rindolf audreyt: what is your current location?
16:53 audreyt Taipei
16:53 svnbot6 r12470 | gaal++ | * remove redundant export
16:53 gaal xerox++ # OMG Lojban Y-combinator
16:54 * xerox chuckles
16:54 rindolf audreyt: what time is it there?
16:55 TimToady 01:54 I think
16:55 audreyt TimToady: infix:<[+]> should be definable
16:55 gaal in makeParser, what's the correct place to inject circumfixOp in the choice
16:55 audreyt right?
16:55 gaal    rassocP x <|> lassocP x <|> nassocP x <|> listAssocP x <|> return x <?> "operator"
16:55 xerox ....and it overloads [+] ?
16:55 audreyt and unrelated to folding at all
16:56 TimToady yes, real [+] only lives in %prefix
16:56 audreyt gaal: in termp
16:56 gaal wow, I think we just interleaved to related questions :)
16:56 audreyt termP
16:56 xerox unsafeInterleaveQuestions
16:56 xerox IRC = unsafeInterleaveQuestions -- hehe
16:57 TimToady ask 'em all, and STM will sort it all out
16:57 xerox @arrr
16:57 lambdabot Yeh scurvy dog...
16:57 gaal lol
16:58 gaal but I don't understand audreyt's answer.
16:58 TimToady bbl &
16:58 audreyt gaal:
16:58 audreyt        pres    <- many $ (fmap Left prefixOp) <|> (fmap Right optPrefixOp)
16:59 audreyt Operator.hs:522
16:59 audreyt I think there's an easier way here
16:59 audreyt let me think
16:59 gaal ah ok
17:01 elmex joined perl6
17:02 audreyt your conOp treatment won't work
17:03 audreyt the lookAheadLiteral doesn't do the actual match
17:03 audreyt it's postproc
17:03 audreyt so "between" will fail
17:03 gaal harumph.
17:03 audreyt Circum needs to carry two
17:03 audreyt gen parsers around
17:04 audreyt Circumfix (GenParser t st (a -> a)) (GenParser t st (a -> a))
17:04 gaal one for content and one for terminal?
17:04 audreyt yes
17:05 audreyt and actually the first one is just (GenParser t st ())
17:05 gaal Ah like ta carryah two pahsers in mah belt, yessum
17:05 audreyt it's the second one that will be a->a'ed
17:05 gaal so it's Circum terminal content?
17:06 audreyt Circum open close
17:06 audreyt Circum (GenParser t st ()) (GenParser t st (a -> a))
17:06 gaal erp. OK
17:06 audreyt is the constructor form
17:06 gaal wait no why is the seond one a->a?
17:07 audreyt because it gets Exp (the inner expression)
17:07 audreyt and returns Exp (wrapped in a circum)
17:07 audreyt same as other unaryops
17:08 gaal the exp it gets was already parsed? hmmmm
17:08 audreyt sure, just like postfix
17:10 cm joined perl6
17:10 ludan joined perl6
17:11 gaal okay, another thing I don't get (too much curry) :
17:11 gaal postOps     = (ops $ makeOp1 Postfix "&postfix:" doApp) . addHyperPostfix
17:12 gaal where's the parser arg to Postfix?
17:13 audreyt App (_Var str) Nothing
17:14 gaal that's a parser?
17:14 ludan joined perl6
17:14 audreyt oh sorry
17:14 audreyt line 324
17:15 audreyt    conOp name = return $ \x -> case x of
17:15 audreyt        Syn "" []   -> con name []
17:15 audreyt        _           -> con name [x]
17:15 gaal oh, ok
17:15 gaal got it!
17:15 gaal clevah
17:15 audreyt moose!
17:15 gaal brb, need H2O
17:15 audreyt considering that's my first lines of Pugs code
17:15 audreyt it's probabl too clever
17:15 audreyt (I was still recovering from over-point-freeing in OpenAFP at that time)
17:16 * xerox will NEVER recover.
17:17 audreyt xerox: you know point free is wrong when the eta-expanded form is _shorter_
17:17 audreyt i.e. when @pl gives out a longer line
17:17 * xerox closes his ears and sings ... ALALALALAL
17:18 xerox pl doesn't find the best ones some time.
17:18 xerox Also, some mild composition of points and points free is okay at times.
17:18 audreyt that I'd agree with.
17:18 xerox (For example for very-deep-into-the-expression formal parameters.)
17:18 gaal 20:15 < audreyt> considering that's my first lines of Pugs code
17:18 gaal !!!
17:18 audreyt sometimes comprehension is correct.
17:19 xerox But how I found that out is creepy.
17:19 audreyt gaal: it has to be, as without that there's no parser :)
17:19 gaal nothingmuch wrote a language with no parser...
17:20 xerox He writes ELFs ?
17:20 audreyt forth
17:20 gaal no, blondie
17:20 audreyt oh. that.
17:21 xerox On the other hand it's cool to do points-free contests
17:21 xerox One gives an expression and the people start trying to points-free it
17:21 xerox Without using \bot of coure.
17:21 xerox *course
17:21 audreyt it's like writing compressors
17:21 audreyt if you don't constrain the decompressor size
17:21 xerox Let's do it! yarrr :)
17:22 audreyt you can compress anything to nil ;)
17:22 xerox nil to anything? :D
17:22 xerox Oh, "write a crazy id function" is also quite nice
17:22 audreyt just use a different decompressor for each different nil :)
17:22 xerox "without using id, \x -> x, easy-ones"
17:22 audreyt unsafeCoerc#
17:23 gaal replicate 1
17:23 audreyt er no, that's singleton
17:23 gaal argh
17:23 xerox hehe
17:23 gaal busted
17:24 gaal head . (replicate 1)
17:24 gaal head . singleton for that matter
17:24 xerox That's id?
17:25 xerox > (head . (:[])) 1
17:25 lambdabot 1
17:25 gaal reverse . reverse
17:25 gaal no that only works for lists
17:26 xerox _finite_ lists :D
17:26 gaal :)
17:26 gaal ok this is distracting :)
17:26 xerox > ((flip const) undefined) 1
17:26 lambdabot 1
17:26 * xerox will stop :P
17:30 DaGo joined perl6
17:36 kanru joined perl6
17:37 mdiep joined perl6
17:38 audreyt gaal: note that inside Circum, the prec level is lifted to outermost
17:39 audreyt you can simulate it by not using <-termP
17:39 audreyt but simply use <-parsetightOperator
17:39 gaal audreyt: I'm still not grokking this fully. e.g.
17:39 gaal makeOp1 prec sigil con name = prec $ try $ do
17:39 gaal but makeOp1 Prefix "&prefix:" doAppSym
17:39 audreyt "prec" should be "fixity"
17:39 gaal Predix isn't a prec!?
17:40 audreyt please change away
17:40 audreyt bad name choice
17:40 gaal so the whole funtion body is an argument to its first arg?
17:40 gaal (almost)
17:41 audreyt yeah
17:41 audreyt ok, the metaop change is implemented
17:41 audreyt surprisingly straightforward
17:45 audreyt 9 possible metaops
17:45 svnbot6 r12471 | audreyt++ | * Pugs.Types and Pugs.Eval.Var: Make the choice of metaops
17:45 svnbot6 r12471 | audreyt++ |   apparent during parsetime, by making use of the v_meta
17:45 svnbot6 r12471 | audreyt++ |   slot in Var, instead of doing name mangling in runtime.
17:45 svnbot6 r12472 | audreyt++ | * Also remove sizeFromRef for real.
17:45 audreyt beats unbounded combinations ;)
17:45 gaal yay
17:45 audreyt though user-defined metaops will kill this
17:45 audreyt but fortunately, not going to do it until the Macro milestone
17:46 gaal I'm still confused about this 2nd parser stuff :(
17:46 pasteling "gaal" at 192.115.25.249 pasted "circumnabulation" (12 lines, 344B) at http://sial.org/pbot/19140
17:47 audreyt there's no \ex
17:47 justatheory joined perl6
17:48 gaal the retrurned closure's it?
17:48 audreyt Circumfix (symbol opener) (symbol closer >> return (con name . (:[])))
17:48 audreyt will do
17:48 gaal I'm so glad I had that little game with xerox earlier :)
17:48 * xerox is happy too
17:48 xerox hehe, box.
17:51 audreyt gaal: commit what you have and let me have a look? :)
17:51 audreyt (or post it as a patch)
17:52 gaal one moment
17:53 gaal http://perlcabal.org/~gaal/tmp/circum.1.patch
17:53 audreyt the prec level is wrong
17:53 audreyt unary \ is at that level
17:54 audreyt but \(...) is term level
17:54 audreyt fixing
17:54 gaal that's the makeParser change right?
17:54 gaal it also doens't compile as you must have (fixed . noticed)
17:58 xerox > (fix >>= const) (1:)
17:58 lambdabot [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
17:58 xerox :P
18:01 audreyt fixed. testing
18:05 audreyt worked.
18:05 audreyt we can convert [...] to it then
18:05 gaal yay
18:06 gaal though that's precircumfix
18:06 gaal isnt' it?
18:06 audreyt huh?
18:06 audreyt [1]@a
18:06 audreyt is the syntax like that now?
18:06 * audreyt missed the memo
18:06 ingy hola
18:06 audreyt ingy: hey!
18:06 ingy hi audreyt
18:07 ingy is there anything I need to do today?
18:07 rindolf Hi ingy
18:07 audreyt release YAML.pm :)
18:07 ingy oh ok...
18:07 ingy is it patched up?
18:07 audreyt sure, for some time now :)
18:08 audreyt *** No compatible subroutine found: "&circumfix:\( )" at <interactive> line 1, column 1-9
18:08 audreyt gaal: you'll take it from there? :)
18:08 rindolf ingy: did you end up integrating my patch to IO::All?
18:08 rindolf The one with the non-forking server.
18:08 gaal audreyt: hmm, it's [op
18:08 ingy rindolf: probably not yet :(
18:08 gaal [op] list
18:08 rindolf ingy: OK.
18:09 Patterner joined perl6
18:09 gaal ah: prefix_circumfix_meta_operator
18:09 gaal (whew)
18:11 audreyt I wonder if !>>cmp<< is legal
18:11 audreyt TimToady: does >><< retain the assoc for chainfix?
18:11 gaal audreyt: counterpatch url?
18:12 gaal or just commit...
18:12 audreyt also I think syntactically autoquoted barework
18:12 audreyt bareword
18:12 audreyt x => 1
18:12 audreyt should just produce
18:13 audreyt Syn "named" []
18:13 audreyt instead of
18:13 audreyt App "infix:=>"
18:13 audreyt that will save the post-munging
18:13 audreyt and will let \(...) automatically get named as named
18:13 gaal that's cool
18:14 gaal but again, metaops seem to be a different grammatical category according to S02
18:14 audreyt will you do that? I'm about to sleep :)
18:14 audreyt gaal: nono, that's where you _define_ metaops
18:14 gaal I'm not too wakeful myself
18:14 audreyt oh ok
18:14 audreyt tomorrow then
18:14 audreyt committed.
18:15 gaal $work tomorrow :(
18:17 gaal Circumfix (GenParser t st a) after all?
18:18 svnbot6 r12473 | audreyt++ | * Introduce Circumfix and circumfix:<\(  )>.
18:18 svnbot6 r12473 | audreyt++ |   It's all gaal++'s code, I just made it compile :)
18:18 audreyt yeah, since I pushed the entire term into it
18:18 audreyt it's better known as Term () actually.
18:19 luqui joined perl6
18:20 lidden joined perl6
18:20 diakopter joined perl6
18:25 audreyt ok, named calls are in.
18:26 gaal whoops primDecl will barf on circum names :/
18:26 gaal fixing
18:29 audreyt TimToady: now that we have
18:29 audreyt 'x'=>1 # pair
18:29 audreyt x=>1 # named
18:30 audreyt can we relax the () rule so that
18:30 audreyt (x=>1) # still named
18:30 audreyt ?
18:30 luqui I don't see an advantage to doing that...
18:30 audreyt will make implementation easier (one less parens to track)
18:31 audreyt luqui: you think () as disambiguator is still valuable?
18:31 luqui first answer this:  my $x = foo => 42;  # succeeds, $x is a Pair ?
18:31 audreyt sure
18:32 luqui then yes, I think () as a disambiguator is still valuable
18:32 luqui I'm seeing foo x => 42, y => 91 as "extended call syntax" not "pair construction"
18:32 audreyt I see your line of reasoning
18:32 audreyt because if we relax (), then that will fail with
18:32 audreyt infix:<=>: unknown named argument 'foo'
18:33 luqui also that...
18:33 luqui in a way, though that wasn't my direct concern
18:33 Patterner joined perl6
18:40 TimToady audreyt: cmp is not chainfix so you couldn't apply ! to it even without >><<
18:41 TimToady but !>>==<< is also nonsensical, I think
18:42 TimToady if you mean >>!==<< you should write that.
18:42 luqui >>==<< returns a list, right?
18:42 TimToady right
18:42 luqui yeah, so neither of them is probably what is intended when that is used
18:43 audreyt circumfix macros is in.
18:43 TimToady >>!==<< would return a list of booleans
18:43 TimToady yay
18:44 TimToady I don't really have a feeling one way or the other about (x=>42) yet.
18:44 audreyt that's ok, I'll just make circumfix macros take the same parse rule
18:44 audreyt as function calls with aprens
18:44 audreyt but that means
18:44 audreyt [x=>1]
18:44 audreyt and
18:44 audreyt \(x=>1)
18:44 audreyt the first one needs to do a post transformation to retain ordering
18:45 audreyt since it certainly does not mean named inside []
18:45 audreyt (hash construction doesn't care either way.)
18:46 TimToady or the decision to de-order is done lazily based on context...
18:46 TimToady like the meaning of *
18:46 audreyt yeah
18:47 TimToady sub foo (\$foo) { # can I here get the original ordering?
18:47 audreyt Pugs.Parser.Operator is looking more and more like PGE.OpTable now...
18:47 audreyt ...by neccessity
18:47 TimToady not suprising, since I keep boxing in all the parsers with strange ideas... :)
18:47 audreyt TimToady: the previous ruling is that ordering is retained only upto same-nameds
18:48 audreyt x=>1 y=>2 # would lose ordering
18:48 audreyt I'm not sure...
18:48 TimToady I suppose one could tag them so that you could at least sort them back into the right order.
18:48 audreyt tricky to do in the face of [,]%
18:49 audreyt still possible
18:49 TimToady or the named list is threaded through the positionals
18:49 audreyt painful, though. I think it's far easier to just say
18:49 audreyt in the signature list of circum[]
18:49 audreyt that "I don't take named, all named is just pairs"
18:49 audreyt using a shorthand of is parsed()
18:50 audreyt and let the Capture type retain its idea of unordered names
18:50 audreyt easier to explain, too
18:51 Psyche^ joined perl6
18:51 TimToady I hate throwing away information...
18:51 audreyt oy, we tag with match tree already
18:52 audreyt so you can get it with .from comparison if you must
18:52 audreyt it's just [,]% won't have that
18:52 audreyt (.from is parse/macro level only though)
18:53 audreyt I think a non-macro sub whose behaviour
18:53 audreyt depends on the ordering of named arguments
18:53 audreyt is hard to find a story for it
18:53 TimToady is kinda like a generic Unix command processor
18:54 audreyt -x -y
18:54 audreyt -y -x
18:54 audreyt would take different meaning?
18:54 audreyt (ordering here means "across names" not "within names")
18:55 TimToady many Unix commands have ordering dependencies of various sorts.
18:55 TimToady sort, for instance
18:56 audreyt not familiar with that
18:56 svnbot6 r12474 | gaal++ | * Captures make it to Prim.hs. Now we need to write the code inside Eval
18:56 svnbot6 r12474 | gaal++ |   to convert an old argstack to a new one.
18:56 gaal I wish Haskell had conditional bindings...
18:56 audreyt what's that?
18:57 audreyt let (x, y) | cond = (1,2) -- valid
18:57 svnbot6 r12475 | audreyt++ | * &circumfix:<\( )> now understands invocants and named parameters.
18:57 svnbot6 r12475 | audreyt++ | * Also, circumfix macros is now made possible in parser level.
18:57 gaal audreyt: make (x,y) variable
18:57 gaal see the ugly mangling to primDecl
18:58 gaal if only I could do
18:58 rindolf TimToady: maybe you'd like to read http://www.shlomifish.org/philosophy/case-for-file-swapping/
18:58 lambdabot Title: The Case for File Swapping
18:58 gaal let (isCircum ?? (a:b:c:d) !! (a:b:d:e)) <- moose
18:59 wolverian find is another that needs ordering
18:59 wolverian find dir -iname '*.pl' -and -size 100
18:59 gaal I always found that one annoying
18:59 wolverian (well, that particular one doesn't, but there are cases where it is required)
18:59 rindolf Hi wolverian
18:59 wolverian yay, my packet loss to feather is gone!
18:59 wolverian hello rindolf
18:59 rindolf wolverian: sup?
19:00 luqui audreyt, did you change Maybe Exp to ParamDefault?
19:00 wolverian just came back from animecon
19:00 rindolf wolverian: nice.
19:00 wolverian lots of cosplay :)
19:00 wolverian (not me, though)
19:00 rindolf wolverian: I like a lot of Anime art.
19:00 audreyt luqui: it's just a newtype
19:00 audreyt find($dir, iname => '*.pl', :and, size => 100)
19:00 audreyt is this really sane
19:01 audreyt and is it worth supporting? :)
19:01 luqui ugh...
19:01 luqui (about the find interface, that is)
19:01 luqui audreyt, right, but the maybe left
19:01 luqui why?
19:01 wolverian audreyt, junctions!
19:02 luqui find($dir, { .iname('*.pl') && .size(100) }  # match functions, not attributes
19:02 gaal luqui: point xx 2
19:02 audreyt right. in that case the ordering info can be thrown away across named params
19:03 luqui oh, I get it
19:03 luqui yes, throw away ordering
19:03 luqui !
19:03 luqui (I was not following the relevent discussion)
19:03 weinig joined perl6
19:04 gaal audreyt: or are you encoding no ParamDefault as Exp.Noop?
19:04 gaal (ick)
19:04 audreyt that's a thought.
19:04 svnbot6 r12476 | audreyt++ | * Pugs.Val.Code: luqui++ noticed I made a typo and forgot
19:04 svnbot6 r12476 | audreyt++ |   the Nothing case for ParamDefault in newland Code.
19:04 audreyt though no it was just a typo.
19:05 wolverian $dir.find(all FileMatch("*.pl"), FileSize(500)); # java+haskellish I suppose
19:06 audreyt 3am... need to sleep :)
19:06 wolverian don't know if it pays off much to lift that to the type level.
19:06 TimToady good, I can let my smoke run now instead of restarting it every few minutes. :)
19:07 wolverian (add .new()s there if required)
19:07 gaal how could Param derive Show when ParamDefault doesn't?
19:07 gaal it works, but it sohuldn't
19:07 gaal ah, it doesn't -- #include :(
19:07 gaal fixing
19:07 silug joined perl6
19:08 audreyt ParamDefault has a Show instance
19:08 gaal arghblrmn sometimes Haskell questions have the simplest answers
19:09 audreyt arghblrmn indeed.
19:09 cmarcelo hello #perl6.
19:09 gaal hey cmarcelo
19:09 lumi_ gaal: Is the new AST thing live?
19:10 gaal some of it is!
19:10 gaal ?eval vv "moose"
19:10 evalbot_12468 is now known as evalbot_12475
19:10 evalbot_12475 CCall "perl" CaptMeth {c_invocant = VPure (MkStr "moose"), c_feeds = [MkFeed {f_positionals = [], f_nameds = {}}]}
19:10 * audreyt chuckles
19:10 audreyt the MOP doesn't handle .perl yet
19:10 aph joined perl6
19:10 audreyt so it dumps the Capture
19:10 gaal where'd that Capture butt in from?
19:10 gaal oy
19:10 audreyt evalbot wants .perl from it
19:10 gaal yeah
19:10 svnbot6 r12477 | audreyt++ | * remove the commented-out, bogus Data pseudoinstance from Pugs.Val
19:10 lumi_ Wo. The Code types too?
19:11 luqui uh oh... Exp changed...
19:11 cmarcelo audreyt && gaal: using Judy.Hash for interning stopped segfaulting on prelude generation in ghc-6.5 + pugs-trunk. would you mind to checking if happens to you? (i'm checking 6.4.2 now too..)
19:11 luqui didn't realize
19:11 audreyt cmarcelo: I still sometimes get "Judy.StrMap: interruped"
19:11 gaal luqui: it's rather more articulated than the old one
19:11 audreyt and it's trunk GHC for me too
19:11 cmarcelo audreyt: from Judy.StrMap ?
19:12 audreyt and Judy.IntMap too
19:12 gaal lumi_: Code's active, but you can't construct one jsut yet
19:12 audreyt but only rarely
19:12 audreyt anyway, sorry but I really need to fade :)
19:12 audreyt g'nite!
19:12 cmarcelo ok
19:12 gaal lumi_: from userland that is. feel free to hack something up
19:12 gaal night audreyt
19:12 lumi_ Night audreyt
19:12 gaal lumi_: I'm wandering off soon too
19:13 TimToady emulate a log
19:13 gaal TimToady: length $number
19:13 gaal # perl 5 way to emulate a log
19:13 gaal # works for integers and in base 10 only
19:13 lumi_ Heh
19:13 gaal # also, is off by one
19:14 lumi_ Not much of an emulation
19:14 gaal well, consider that perl 5 has a built in way of telling you about how big an array is
19:14 gaal length @arr
19:14 TimToady length unpack('B*', $number) # base 2 log
19:15 Khisanth joined perl6
19:15 gaal length (1 x $number) # where's xerox
19:16 lumi_ M. Why do the parser state fields start with "rule" like the parsing rules?
19:16 TimToady funny way to write int()
19:16 gaal TimToady: it's a base 1 log
19:17 lumi_ Not generic id
19:17 gaal aka "pointless id function of the day"
19:17 luqui gaal, yeah?
19:17 luqui presumably, then:  1 ** (length(1 x $number)) == $number
19:17 luqui which, well, doesn't look right
19:18 lumi_ That works perfectly, for certain values of $number
19:18 luqui lumi_, that's a good question...
19:18 luqui lumi_, the serious one, that is
19:18 lumi_ I figured
19:18 luqui probably hacky oversight
19:19 lumi_ Maybe rs (for RuleState) or something
19:19 gaal it also works perfectly for certain values of ==...
19:19 luqui state?
19:20 gaal actually, by newconv, that would be:
19:21 gaal data RuleState = MkState { s_env :: .. , s_parsePrograms :: .., .. }
19:22 gaal fixing
19:22 jferrero joined perl6
19:22 luqui is Sig supposed to go in a Val?
19:23 luqui or is Sig a VPure?
19:23 gaal Sig is a VPure
19:23 gaal there's an alias
19:23 gaal type SigPure = Sig
19:24 luqui so to put it in a Val, I would write Pure (Sig ...) ?
19:24 gaal yes
19:24 gaal or even val . Sig
19:24 luqui what is lc val?
19:24 gaal autocast
19:24 gaal a -> Val
19:24 luqui not bad.
19:25 gaal class ICoercible m a => IValue m a where val :: a -> Val
19:25 gaal defined in Pugs.Val
19:25 luqui ah, Sig doesn't have one of those instances yet
19:26 gaal please see Pugs.Val.Base and add
19:27 luqui doing so
19:30 luqui left perl6
19:30 luqui joined perl6
19:30 luqui oh, what monad do I use?
19:30 luqui P?
19:31 gaal yes, that's for Pure
19:31 gaal (it's Identity)
19:33 DaGo joined perl6
19:36 luqui hmm
19:36 luqui No instance for (Pugs.Val.IValue m Pugs.Val.Sig)
19:36 luqui but there is an instance of Pure Sig
19:36 luqui which ought to imply that, right?
19:37 renormalist joined perl6
19:38 svnbot6 r12478 | gaal++ | * lumi++ observed that RuleState fields use names that are confusingly
19:38 svnbot6 r12478 | gaal++ |   similar to parser functions. Change them over to use the new naming
19:38 svnbot6 r12478 | gaal++ |   convention (perldoc lib/Pugs/Doc/Hack/Style.pod)
19:38 buubot Type 'perldoc lib' in your shell or go to http://perldoc.perl.org/lib.html
19:38 lambdabot Title: lib - perldoc.perl.org
19:39 gaal luqui: can you post a patch somewhere?
19:39 luqui sure
19:39 luqui paste?
19:39 luqui uh,
19:39 luqui perlbot, paste?
19:39 gaal perlbot nopaste
19:39 perlbot Paste your code to http://sial.org/pbot/perl or http://erxz.com/pb and #perl will be able to view it.
19:39 perlbot Paste your code here and #<channel> will be able to view it: http://sial.org/pbot/<channel>
19:39 lambdabot Title: sial.org Pastebot - pasteling
19:41 pasteling "luqui" at 67.174.183.183 pasted "Sig no instance" (254 lines, 9.9K) at http://sial.org/pbot/19142
19:41 cmarcelo build error: Type constructor `Pugs.Val.ValNative' has conflicting definitions in the module and its hs-boot file
19:44 gaal cmarcelo: indeed it does! what version of ghc do you have?
19:44 gaal it's a serious error but my ghc didn't catch it...
19:45 cmarcelo gaal: ghc-trunk..
19:46 cmarcelo gaal: the problem is that boot file doesn't have the other constructors?
19:46 gaal if it has one, it has to have them all identically
19:46 gaal fixed
19:50 svnbot6 r12479 | gaal++ | * cmarcelo++ notes a bogus datatype articulation in th boot file.
19:50 svnbot6 r12479 | gaal++ |   luckily, the constructor isn't required, so we just omit it.
19:50 svnbot6 r12480 | audreyt++ | * Pugs.Parser.Literal: Move all ruleLit and its subrules
19:50 svnbot6 r12480 | audreyt++ |   from Pugs.Parser to here to speed up compilation.
19:51 luqui gaal, any idea about that error?
19:51 gaal luqui: it's Just Working for me so far (I had to fix some minor problems in Eval.Var)
19:52 Psyche^ joined perl6
19:52 Psyche^ is now known as Patterner
19:52 luqui it fails to compile in Prim/Code
19:55 gaal what ghc are you using? just worksforme
19:55 svnbot6 r12481 | gaal++ | * unbreak the build for GHC 6.4
19:55 luqui The Glorious Glasgow Haskell Compilation System, version 6.4.2
19:55 luqui [
19:56 luqui svk pull + compile again
19:56 luqui (that's what I'm doing, rather)
19:56 gaal oh, #include
19:56 * gaal pines for 6.6
19:57 luqui ?
19:57 gaal ugh, turns out my fix for ValNative was wrong too, fixing
19:57 luqui what is in 6.6
19:57 gaal luqui: instance declarations in hs-boot files
19:57 luqui hm
19:57 gaal so we don't need to do the ugly #include crock
19:57 luqui I would like to see a lack of hs-boot files
19:58 cmarcelo gaal: it doesn't work here too.. i was realcleaning and make'ing again just in case..
19:58 gaal cmarcelo: yes my wc is a little weird right now
19:58 gaal fixing...
19:59 xerox gaal: I'm back!
20:00 xerox What was that?
20:00 gaal what was what?
20:00 xerox gaal: length (1 x $number) # where's xerox
20:01 luqui I don't think that was referring to you...
20:01 gaal xerox: it's an identity function on integers
20:01 gaal it may also help you as you puzzle over this:
20:01 gaal perl -wle '("1" x $_) !~ /^(11+)\1+$/ && print while ++ $_'
20:02 xerox I am not sure...
20:02 cmarcelo gaal: "wc"?
20:03 gaal working copy
20:03 cmarcelo testing...
20:04 gaal oh noes! the hs-boot conspiracy strikes again! I can't use existentials in hs-boot
20:04 gaal cmarcelo: not done yet
20:04 xerox You want to use crazy things in weird places!
20:04 gaal xerox: I want to unbreak the build
20:05 xerox ....for correct purposes.
20:05 SamB joined perl6
20:05 cmarcelo gaal: ok
20:07 foo\ joined perl6
20:07 luqui that is too slick
20:07 gaal what is?
20:07 * luqui just figured out that prime script
20:07 gaal luqui: don't spoil xerox's fun
20:08 gaal (credit to Abigail, btw)
20:08 luqui I'm not going to explain it... it is easy to tell what it does by, er, running it ;-p
20:08 gaal I know someone who figured it out without running it.
20:08 gaal And without knowing much Perl, too
20:08 luqui not bad
20:08 xerox OK!
20:09 * xerox thinks
20:09 MacVince joined perl6
20:10 luqui gaal, do you think that the desire to have the Val stuff in separate files is more trouble than it is worth?
20:10 xerox I am not sure what !~ is.
20:10 luqui maybe we ought to write a script to cat the files togheter
20:10 xerox ~~ is regext matching, ! adds a not?
20:10 luqui xerox, ! =~
20:10 xerox *regexp
20:10 xerox Okay.
20:10 gaal luqui: well, that's what we do with Val.Code
20:11 gaal it's included inside Val
20:11 luqui ah right
20:11 xerox I am not sure what print prints...
20:11 luqui xerox, print means print $_
20:11 xerox print while ++ $_
20:11 pmurias_ Convert::Binary::C++ #cool, usefull, and darned documented
20:11 gaal but that sucks - when I forget to touch the parent file, stuff's not rebuilt
20:12 gaal xerox: $_ is like 'it' in ghci
20:12 xerox I can't make sense of the while
20:12 luqui xerox, that is postfix while.  foo while blah means while (blah) {  foo }
20:12 gaal heh, that's a touch of obfuscation
20:12 gaal postfix while, prefix ++
20:12 xerox while (++ $_) {print $_}
20:12 xerox Is ++ like in Haskell?
20:12 luqui xerox, except while binds very loosely, so the whole script is inside the while
20:12 xerox Ah!
20:12 luqui xerox, ++ is like C
20:12 xerox ooooh.
20:13 xerox I think I have enough data
20:13 luqui :-)
20:13 xerox perl -wle '("1" x $_) !~ /^(11+)\1+$/ && print while ++ $_'
20:13 xerox $_ is the arguments you pass initially, or what?
20:14 luqui it's just like any other var.  starts as undef (which is basically 0)
20:14 xerox Ah-ha.
20:15 gaal OK I just don't understand this. In a hs-boot file I have data ValNative
20:15 gaal in the consuming file I have something that uses a constructor
20:16 gaal but it dies with Not in scope: data constructor `NBuf'
20:16 xerox So for 1, 2, 3, 4, ... it computes strings of ones of length 1, 2, 3, 4, ... and prints such numbers depending on the fact that such string is ...
20:16 luqui gaal, NBuf is in the boot file?
20:16 gaal xerox: yes
20:16 gaal luqui: no
20:16 gaal oh
20:16 gaal creap
20:16 xerox odd?
20:16 xerox Oh no.
20:16 gaal xerox: you're getting warmer
20:16 xerox \1+
20:17 luqui xerox, I think what you said was correct
20:17 luqui for a certain value of "..."
20:17 xerox That regexp involves much backtracking right?
20:17 luqui yes.
20:17 gaal hella backtracking
20:18 xerox I have a theory...
20:18 xerox But I don't know how it does accomplish it :)
20:18 cmarcelo xerox: what's your theory?
20:18 xerox Prime numbers?
20:18 luqui peano arithmetic
20:19 xerox That'd be the coolest thing you'd do with a series of numbers
20:19 gaal cmarcelo: please try 12482
20:19 xerox Aaaaah, there's the not!
20:20 xerox Yes, now I see it.  That's clever!
20:20 svnbot6 r12482 | gaal++ | * unbreak the build
20:20 xerox Clever clever.
20:20 luqui the regex is the neatest part about it
20:20 cmarcelo =)
20:20 cmarcelo gaal: i'll try it..
20:20 xerox Does it run on pugs?
20:20 xerox (That precise code)
20:20 luqui xerox, no
20:20 luqui you would have to perl6ify it
20:21 gaal TWO YEARS LATER... "Hey guys, this is xerox, want to help me write a Haskell compiler in Perl 6?"
20:21 luqui which... well
20:21 xerox @arrr
20:21 lambdabot Aye Aye Cap'n
20:21 * xerox laughs
20:21 luqui I think this is perl 6 (not sure about the !~ operator):
20:21 xerox gaal: I spot general recursion in your idea...
20:22 gaal xerox: that's okay, by then 6.6 will be out and boot files will work
20:22 luqui pugs -e '("1" x $_) !~ /^(11+)$1+$/ && .say while ++$_'
20:22 luqui ?eval ("1" x $_) !~ /^(11+)$1+$/ && .say while ++$_ < 20
20:22 evalbot_12475 is now known as evalbot_12481
20:22 evalbot_12481 Error:  unexpected "!" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
20:22 lumi_ !~~ I think?
20:22 luqui ?eval ("1" x $_) !~~ /^(11+)$1+$/ && .say while ++$_ < 20
20:22 gaal yes
20:23 traecer joined perl6
20:23 * gaal *still* hasn't reproduced luqui's breakage
20:23 pmurias_ gaal: was your comment regarding suckage regarding Convert::Binary::C?
20:23 gaal no
20:23 * luqui hasn't reproduced it either (rebuilding from clean)
20:24 xerox > let fun xs ys = join ["implement ",xs," in ",ys," "] in fix (fun "Perl6" . fun "Haskell")
20:24 lambdabot "implement Perl6 in implement Haskell in implement Perl6 in implement Haskel...
20:25 luqui ?eval "you there?"
20:25 * xerox grins
20:25 pmurias_ gaal: good :)
20:25 xerox luqui: ah cool, that would be it?
20:25 luqui I think so
20:25 luqui evalbot_12481 is k.o. apparently
20:26 xerox In Haskell it would just be [1..] >>= f . show, for some value f.
20:26 xerox Well, not exactly, sorry.
20:26 jferrero joined perl6
20:27 luqui xerox, in haskell it is just main for some value main
20:27 gaal filter isPrime $ 1 .. ...
20:27 svnbot6 r12483 | gaal++ | * do away with redundant import
20:27 xerox Well, I have a neat primes definition now that I think of it.
20:27 xerox But the (11+)\1+ is really funny.
20:28 xerox > let primes = 2 : 3 : [n | n <- [5,7..], all (\p -> n `mod` p /= 0) (takeWhile (\p -> p*p <= n) primes)] in primes
20:28 lambdabot [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
20:29 luqui yeah, that's more elegant than clever
20:29 xerox Which? :-)
20:29 luqui and I'm used to seeing elegant haskell, so whatever :-p
20:29 gaal luqui: how's your build going?
20:29 xerox :-D
20:30 luqui it died somehow, and I saw you committed, so I pulled and am rebuilding
20:30 luqui it did not die the same way as before though
20:30 luqui looks like it compiled
20:30 luqui :-D
20:30 gaal variant death
20:35 * luqui would like a hoogle that did project-local stuff easily
20:36 gaal luqui: run hihoo.pl on your own project
20:36 luqui hihoo?
20:36 gaal the thing that constructs the hoogle data
20:37 luqui oh
20:37 luqui after getting and compiling hoogle, of course ;-)
20:37 luqui later
20:37 gaal alternatively, ndm noticed that ghci has a command that almost does it for us. :i I think
20:37 luqui thanks though
20:38 gaal well, you wanted a project local hoogle that ran where exactly? :)
20:38 luqui uh pugs
20:38 luqui oh
20:38 luqui right
20:38 luqui yeah
20:38 luqui I was just whining
20:39 gaal luqui: also ask xerox++ about GOA
20:39 gaal I'm off to bed
20:39 gaal have a good 'un everybody!
20:39 xerox Goodnight!
20:39 luqui night
20:39 cmarcelo gaal: it worked! =)
20:40 gaal cmarcelo: excellent!
20:40 gaal night :)   z&
20:43 evalbot_12433 joined perl6
20:44 luqui ?eval "I'm back"
20:44 evalbot_12433 is now known as evalbot_12483
20:44 evalbot_12483 "I\'m back"
20:44 svnbot6 r12484 | luqui++ | * Added the beginnings of Code::signature (returning a VV Sig).
20:44 svnbot6 r12484 | luqui++ | * Changed all references to Val from AST/Internals to qualified.
20:44 luqui ?eval "I can do regexes" ~~ /regex/
20:44 evalbot_12483 Match.new(   ok => Bool::True,    from => 9,    to => 14,    str => "regex",    sub_pos => (),    sub_named => {} )
20:45 xerox ?where goa
20:45 lambdabot I know nothing about goa.
20:45 xerox Ack1
20:45 luqui ?eval ("1" x $_) !~~ /^(11+)$1+$/ && .say while ++$_ < 20
20:45 luqui hmmm.. I wonder if I killed it again...
20:46 xerox :-(
20:47 xerox luqui: can you do a wordy explanation of the regexp?
20:48 xerox I'd like to translate it but by brain isn't collaborating.
20:51 TimToady you wanted $0
20:51 TimToady $1 is gonna match a lot of nulls...
20:51 luqui oh right
20:52 TimToady a LOT of nulls
20:52 luqui ?eval "still here"
20:52 luqui damn
20:52 TimToady still thinking about the last thing you said, i suppose
20:52 svnbot6 r12485 | audreyt++ | * Oops; the Literal.hs refactoring accidentally broke
20:52 svnbot6 r12485 | audreyt++ |   interpolated variable parsing.  This fixed it.
20:53 TimToady I thought evalbot had resource limits, but maybe if it has delegated to pge they don't apply?
20:53 diakopter joined perl6
20:54 luqui but don't limits apply to forks too?
20:54 luqui hmm.
20:54 TimToady probably get the choice
20:55 svnbot6 r12486 | audreyt++ | * Pugs.Parser.Operator: Introduce an OpName type to more
20:55 svnbot6 r12486 | audreyt++ |   succintly capture the idea of longest-token matching;
20:55 svnbot6 r12486 | audreyt++ |   this currently only helps performance marginally
20:55 svnbot6 r12486 | audreyt++ |   (the schwartzian transform "ops" is now gone),
20:55 svnbot6 r12486 | audreyt++ |   but will be very helpful once we allow generalized
20:55 svnbot6 r12486 | audreyt++ |   longest-token matching across levels.
20:55 luqui xerox, oh, just saw your request
20:56 luqui yeah, the first parenthetical captures two or more 1s, right?
20:56 luqui call that string, oh, say $0
20:56 luqui then the regex asks whether the entire string is just a repetition of two or more $0s
20:56 TimToady actually, the manpages on setrlimit and fork are unhelpful
20:56 svnbot6 r12487 | audreyt++ | * restore evalbot-loop's "make" cycle
20:56 svnbot6 r12488 | audreyt++ | * restore mandel.pl so it draws 30, not 3, lines.
20:57 MacVince I was checking out t/operators/range.t and I saw that there were no tests for things like 1..10:by(2).  I tried it in pugs and it doesn't work, so I guess that hasn't been implemmanted yet.  I don't believe I know enough to implement it myself, however I could probably write tests for when it becomes available.  Shall I do that or should I wait until :by() is implemented to write the tests?
20:57 luqui that is, is the string a product of two numbers (the length of $0 and the number of times it matched)
20:58 TimToady go ahead and write the test.  if you get a parsefail, slap eval '...' around it
20:58 luqui MacVince, definitely write tests first!
20:58 MacVince okay!
20:59 luqui what was the rule for operator adverbs?
20:59 luqui it just binds to the tightest one preceding it?
20:59 TimToady yeah, not counting inside parens
20:59 luqui so (3..4):by(2) works?
20:59 TimToady *not* counting inside parens
21:00 xerox Aha
21:00 xerox I did it in Haskell.
21:00 luqui (the term "inside parens" confuses me)
21:00 xerox Thanks luqui, I just read.
21:00 TimToady an adverb outside parens doesn't modify an operator inside
21:00 luqui basically I can make the grammar rule for an operator: term op term advs
21:00 xerox Unfortunately lambdabot doesn't do parallel list comprehensions.
21:00 luqui and make it greedy, so if there are advs and they don't work, commit and fail
21:00 TimToady yes, it just has to be where an operator is expected
21:01 TimToady in which case it becomes a named parameter for operator in question
21:01 TimToady hmm, could have said that better...
21:02 * luqui tries to decipher Parser/Operator.hs
21:02 TimToady so anyway 3..(2+2):by(2) will become infix:<..>(3,(2+2),:by(2))
21:02 luqui right
21:02 xerox luqui: strangely enough, it's cool in Haskell too
21:03 luqui paste?
21:03 SageLT joined perl6
21:03 xerox Let me investigate how to desugar parallel list comprehension so I can do it in lambdabot for more coolness points.
21:03 luqui xerox, zip3 etc.?
21:03 luqui lambdabot supports parallel comprehension though, doesn't it?
21:03 xerox zip! that's an idea.
21:03 xerox No :(
21:04 xerox No fglasgow-exts.
21:04 luqui ah
21:04 xerox > [(n+m) | n <- [1..3] | m <- [1..3]]
21:04 lambdabot Parse error
21:05 xerox Wow
21:05 xerox It's *very* cool!
21:05 xerox A sec.
21:11 DaGo joined perl6
21:14 evalbot_12487 joined perl6
21:15 luqui ?eval ("1" x $_) !~~ /^(11+)$0+$/ && .say while ++$_ < 20
21:15 evalbot_12487 OUTPUT[1 2 3 5 7 11 13 17 19 ] Bool::False
21:15 luqui yee-hah!
21:15 xerox Prepare!
21:15 lumi_ Is it sane to generalize the parse state's s_blockPads to Exp->Exp transformations, so it could manage the closure traits in the same way?
21:15 xerox > map (length . (undefined:) . uncurry (++)) $ join zip $ flip replicate [undefined] `map` [1..]
21:15 lambdabot [3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,5...
21:15 xerox Ops. 15?
21:15 gaal 9?
21:15 luqui oops
21:15 lumi_ luqui: 1 isn't prime
21:15 xerox lumi_ is right
21:16 xerox unique factorization rocks
21:16 lumi_ gaal: Go to sleep!
21:16 luqui lumi_, yeah, kind of a definitional thing more than a purely mathematical thing though
21:16 xerox Well, it worked
21:16 xerox Let me see what I did wrong
21:16 gaal there's a good mathematical reason not to call 1 prime, but I'm asleep
21:16 xerox Unique factorization is it.
21:16 * luqui knows.
21:17 xerox Uff
21:17 lumi_ gaal: Or do you have an opinion on what I asked? Whether it's sane to generalize s_blockPads to any Exp->Exp and do closure traits inside the same mechanism?
21:17 xerox It didn't as parallel comprehension either
21:17 xerox I miss some check.
21:17 luqui lumi_, he is asleep
21:17 xerox It was too easy this way!
21:17 gaal looking
21:18 lumi_ xerox: A bit too pointless for me to follow
21:18 xerox lumi_: it is just:
21:18 mdiep joined perl6
21:18 xerox let yuck = map (\n -> replicate n [undefined]) [1..] in [undefined:xs++ys | xs <- yuck | ys <- yuck]
21:19 xerox But 9 = 1 + 4 + 4 so it doesn't make sense this way.
21:19 xerox Well, length (undefined:xs++ys) in fact.
21:19 svnbot6 r12489 | fglock++ | * v6 - fixed Statements and Expression grammars to implement
21:19 svnbot6 r12489 | fglock++ |   "new-line after a block may terminate an expression"
21:20 gaal lumi_: sorry, ENOWAKIES
21:20 lumi_ So it's generating odd numbers
21:20 xerox Right.
21:20 lumi_ Okie, night gaal
21:21 xerox What do I miss....
21:21 lumi_ The +
21:21 lumi_ :P
21:21 xerox ...
21:21 xerox Hmmmm!
21:22 lumi_ The + in \1+
21:22 xerox I can implement the first + .. I think
21:22 xerox But the latter one is a complete disaster.
21:23 fglock joined perl6
21:23 luqui xerox, aye
21:23 luqui I've been trying too
21:23 luqui the solution is uninteresting to me
21:23 luqui (Even though I didn't get it right, I got close)
21:23 lumi_ At last, Perl's more elegant than Haskell :)
21:24 xerox Well...
21:24 xerox > let primes = 2 : 3 : [n | n <- [5,7..], all (\p -> n `mod` p /= 0) (takeWhile (\p -> p*p <= n) primes)] in primes
21:24 luqui [ n | n <- [1..], l <- [2..n], m <- [2..n], replicate n () == concat (replicate l (replicate m ())) ]
21:24 xerox This is elegant.
21:24 lambdabot [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
21:24 luqui mine prints all non-primes
21:24 luqui ... multiple times
21:25 luqui and that is close to the method of the perl version
21:25 xerox I like the method
21:25 xerox But I need prolog for it I think :P
21:25 * luqui starts up prolog
21:25 xerox Programming in perl is like oracle programming, and the oracle is some regexp deity.
21:26 * luqui does not know the prolog builtins well enough to implement this
21:26 gaal > replicate 5 $ replicate 5 "moose"
21:26 lambdabot [["moose","moose","moose","moose","moose"],["moose","moose","moose","moose",...
21:26 gaal # based on a zen poem
21:27 xerox Well, I think I can do primes in the type system with that method...
21:28 xerox HELL I should hack cabal-install! Shame on you!
21:28 gaal xerox: start an (Evolution of a Haskell Programmer)' page
21:28 gaal it'll fill up quickly enough.
21:28 xerox I was thinking of a post, yuck.
21:29 gaal sorry... I'll go back to sleeping
21:29 xerox Well, I think I can..
21:29 dbrock joined perl6
21:29 xerox Will think about it.
21:29 xerox In fact I AM thinking about it, I can't avoid the challenge now that I know of it
21:29 gaal audreyt: in case you're sleeping well, I noticed that no primDecl line at the bottom of Prim.hs is correct for \( )
21:30 gaal with some decls, I only see positional elements
21:30 dbrock is there a specification for the subset of Perl 6 that Pugs implements?
21:30 gaal with others, it only finds th prim if there's on arg
21:30 gaal some don't work at all
21:30 gaal I tried rw!Any, Any, List, rw!Lst
21:30 dbrock it would be cool if there were, because that would be a specification for a non-vaporware language
21:31 gaal luqui: if you're looking for something to moose, maybe this?
21:32 gaal ?eval \(1)
21:32 evalbot_12487 is now known as evalbot_12489
21:32 evalbot_12489 "--- !hs/VInt \n- 1\n"
21:32 gaal ?eval \(1, 2)
21:32 evalbot_12489 Error: No compatible subroutine found: "&circumfix:\( )"
21:32 luqui uh, what the hell?
21:32 lumi_ [x | x <- [2..30], not $ x `elem` takeWhile (<= x) [n | n <- [1..], l <- [2..n], m <- [2..n], replicate n () == concat (replicate l (replicate m ())) ]]
21:32 gaal the yaml dump is instead of a Capture translation
21:32 luqui lumi_, yucky
21:32 gaal luqui: it's the expected interim result
21:32 lumi_ True
21:33 luqui oh that is capture syntax
21:33 luqui okay, that makes me feel better
21:33 luqui I'll have a look at it
21:33 gaal to make me feel better, I'll try to go back to sleep
21:33 luqui please do
21:34 gaal I feel better already
21:34 luqui (you're as bad as audrey)
21:34 gaal not by a mile! but &
21:37 hexmode joined perl6
21:45 weinig is now known as weinig|bbl
21:47 svnbot6 r12490 | fglock++ | v6 - fixed dispatch for Terms starting with ':' and 'perl5:'
21:47 svnbot6 r12489 | fglock++ | * v6 - fixed Statements and Expression grammars to implement
21:47 svnbot6 r12489 | fglock++ |   "new-line after a block may terminate an expression"
22:02 wolverian hm. the synopses really need tables of contents.
22:02 * MacVince agrees
22:05 svnbot6 r12491 | fglock++ | v6 - moved 'use v5;' to a Term "macro"
22:25 xerox lumi_: composite = do x <- liftM2 (:) (char '1') (many1 (char '1')); y <- many1 (string x); z <- look; guard (null z); return (x,y)
22:25 xerox lumi_: import Text.ParserCombinators.ReadP
22:25 xerox readP_to_S composite "111"  ===>  []
22:25 xerox readP_to_S composite "111111"  ===>  [(("11",["11","11"]),""),(("111",["111"]),"")]
22:25 xerox Thanks to Cale on #haskell
22:29 svnbot6 r12492 | fglock++ | v6 - 'do' doesn't require '{}'
22:33 rashakil joined perl6
22:37 MacVince If I want to start writing tests for Perl 6, do I just need to read the synopses to know what behavior the different elements should have or do I need to read the apocalypses and exegeses too?
22:37 wolverian synopses, generally. apos and exegeses are not updated anymore.
22:37 MacVince kay
22:38 wilx joined perl6
22:38 svnbot6 r12493 | fglock++ | * v6 - added given/when/default to the grammar (need emitter)
22:40 fglock left perl6
22:40 svnbot6 r12494 | Sage++ | Newest version of the translator test script. No big changes, just minor updates. It will recursively run the translator over all .yml files in the directory it is run in, and all subdirectories.
22:43 svnbot6 r12495 | Sage++ | The translator no longer explicitly names nodes. The node type is now a string, which means it can be grabbed directly from the .yml file.
22:43 svnbot6 r12495 | Sage++ | This is a major reversal of previous code, but I've come to see that my original design was unnecessarily bulky, and this revision makes code cleaner and gets rid of unknown nodes. All translation still runs correctly (or at least as correctly as before).
22:49 MacVince Does the cperl-mode.el for Perl 6 work for anyone here?  When I load it, I get an error saying "File mode specification error: (error "Non-hex digit used for Unicode escape")"
23:03 TimToady MacVince: dunno--I tend to use vim myself.  It's possible we broke it recently without noticing.
23:04 TimToady In which case, it would be good to have someone using it regularly.
23:04 MacVince TimToady: Does the maintainer hang around here?
23:07 TimToady everyone maintains everything around here.
23:07 TimToady so just whack on it if it's hosed.
23:07 TimToady we operate on the easier to ask forgiveness principle
23:08 TimToady well, that, and revision control.  :)
23:10 TimToady looks like renormalist has done most of it.
23:17 TreyHarris MacVince: fixing (no i'm not "the maintainer", but I found the problem)
23:18 TreyHarris how do people do the "[file]: comment" business in their commits?  manually, or is there a flag to svn commit i haven't noticed?
23:18 svnbot6 r12496 | Sage++ | Updating ASTTranslate.hs to match ASTranslate-sage.hs, to be compatible with major changes in ASTDefinition.
23:19 TimToady as far as I know it's manual.
23:19 TimToady if I see a comment go by and wonder about it, I just watch which files update in the next svn up.
23:20 TimToady does it not like \xFg or \x{FFF}?
23:20 svnbot6 r12497 | trey++ | Fixed compile error in cperl-mode.el
23:20 TreyHarris my elisp is too poor to figure out my problem.  $.y is interpreted as the start of a tr
23:21 TreyHarris TimToady: it was simpler than that.  the help text used the string "\u" literally, when you have to double-backwhack it.
23:22 Bit-Man joined perl6
23:22 TimToady I suppose whatever figures out variables needs to be taught about twigils.
23:24 traecer left perl6
23:24 TreyHarris well, the only reason i care is that Point is a very convenient playpen class.  for the moment my workaround is to just implementing the storage as polars, as it has no problem with $.r and $.[theta] (i can't do utf-8 in irc)
23:24 TreyHarris method x and method y work just fine :-)
23:27 TreyHarris TimToady: synopses have "but True" and "but false".  is one or the other a typo, or is it saying that True is provided but false is user-defined?
23:27 weinig|bbl is now known as weinig
23:30 TimToady probably can be considered a fossil.
23:30 TimToady (the false)
23:31 TreyHarris ok, so i can write tests for "but False"?
23:31 TimToady yes.
23:31 TimToady short for Bool::True and Bool::False, but "but" will intuit unambiguous enums.
23:33 TimToady well, actually, all imported enums are considered type names that just happen to represent one value.
23:34 TreyHarris what happens when somebody defines "SQL::True" and "SQL::False"?  everything preexisting breaks?
23:35 TimToady in the lexical scopes where both exist, you'd have to disambiguate.
23:35 TimToady better than silently doing the wrong thing.
23:35 TreyHarris the writer of SQL::True and SQL::False can't just say "these don't import so you have to refer to them by long name"?
23:35 TimToady at least it'd be caught at compile time
23:35 TimToady sure
23:36 Limbic_Region joined perl6
23:36 TimToady I dare say most module's enums won't be exported by default.
23:37 TimToady however, Bool is one that everone gets for free.  :)
23:37 TreyHarris ok.  i still don't quite have my head around how imports work in the context of mmd existing.  because if anyone defines a multi anywhere in your running program, even if it's not in your import path, you may call it, right?
23:38 TimToady yes, unless they lexically scope it, which is probably dumb most of the time.
23:40 TimToady but most imports will be of simple subs or types (incl enums), I expect
23:40 TimToady if you import a simple sub it hides all multies of the same name.
23:40 TimToady (lexically)
23:40 TimToady import is lexical by default in P6
23:41 TreyHarris really?  i thought at one point i read about a fallback from non-core multi to the core sub...
23:42 TimToady almost everything in core will be multi
23:42 TreyHarris i need to just brainwipe and read the synopses over again from scratch.  too much cruft hanging around.  i've been reminded umpteen times that it's ?? !! now but I still write ?? ::.  so i can register-shift between perl 5 and perl 6, but i can't register-shift to today's perl 6 :-)
23:42 TimToady if you set up non-core multi in a scope, you generally do it with a "my proto".
23:42 TimToady but that proto multi can explicitly call outward if it decides to.
23:43 TimToady think of it as an exercise in brain plasticity.  :
23:43 TimToady :)
23:48 TimToady biab &
23:54 TreyHarris i'm confused.  does eval_ok's eval not run in the lexical scope of the eval_ok?
23:55 TreyHarris ?eval use Test; my $foo; eval_ok '$foo = 3'; say $foo
23:55 evalbot_12489 is now known as evalbot_12497
23:55 evalbot_12497 pugs: *** Unsafe function 'use' called under safe mode     at -e line 16, column 7-108
23:55 TreyHarris oh.  well, the error is Actual: eval was fatal: Undeclared variable: "$foo"

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

Perl 6 | Reference Documentation | Rakudo