Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-10-01

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 gnuvince ?eval 1..10:by(2)
00:01 evalbot_r13755 is now known as evalbot_r13761
00:01 evalbot_r13761 Error:  Unexpected ":" expecting "_", fraction, exponent, term postfix, comment, operator, statement modifier, ";" or end of input
00:01 dvorak left perl6
00:24 mako132_ joined perl6
00:43 dduncan joined perl6
00:45 dduncan left perl6
00:53 vel joined perl6
00:59 cventers joined perl6
00:59 cventers left perl6
00:59 cventers joined perl6
01:10 cventers joined perl6
01:10 cventers is now known as cventers_
01:11 Salzh joined perl6
01:12 mako132_ joined perl6
01:12 szabgab joined perl6
01:13 cventers_ is now known as cventers
01:14 cventers is now known as cventers__
01:14 cventers__ is now known as cventers[a]
01:16 cventers[a] is now known as cventers__
01:16 cventers__ is now known as cventers_
01:18 cventers_ is now known as cventers
01:19 cventers is now known as cventers_
01:19 cventers_ is now known as cventers__
01:19 cventers__ is now known as cventers[a]
01:20 cventers[a] is now known as cventers
01:27 TreyHarris argh... i need to figure out if i can make the perl debugger accept colons before its commands (:x, :q, :R, etc.), or if i can get ghci and Pugs to take just q, etc.  i am constantly using colons in perldebug and no colons in pugs and ghci
01:42 stevan seen ingy
01:42 jabbot stevan: ingy was seen 1 days 8 hours 36 minutes 48 seconds ago
01:42 stevan ingy: pingy
01:59 shobadobs joined perl6
02:07 audreyt ingy: can you cut 0.19 of Module::Compile for release? I've committed all neccessary stuff into the kwiki repo that fixed the bug reported by fglock (with tests)
02:07 lambdabot audreyt: You have 3 new messages. '/msg lambdabot @messages' to read them.
02:07 audreyt @tell ingy can you cut 0.19 of Module::Compile for release? I've committed all neccessary stuff into the kwiki repo that fixed the bug reported by fglock (with tests)
02:07 lambdabot Consider it noted.
02:09 clkao hi audreyt
02:13 buffer joined perl6
02:16 Limbic_Region joined perl6
02:16 ashleyb joined perl6
02:18 Limbic_Region salutations all
02:19 audreyt @tell lanny the bug was because implicit vars weren't ordered lexographically anymore!
02:19 lambdabot Consider it noted.
02:19 audreyt @tell lanny {$^a <=> $^b} were erroneously taking the params in the wrong order. thanks for spotting this before release!
02:19 lambdabot Consider it noted.
02:19 audreyt Limbic_Region: greetings
02:20 Limbic_Region audreyt - there are still a few tests that blow up with the windows error I told you about earlier
02:20 Limbic_Region but that has been going on for some time
02:20 Limbic_Region I just accepted it
02:20 Limbic_Region would you like me to run a smoke and give you the exact test names?
02:24 audreyt yes, please
02:25 Limbic_Region running now
02:25 Limbic_Region and I still have to delete several tests before smoking as they hang (already hivemindered)
02:27 audreyt k
02:31 Limbic_Region what did you think about leo taking a less active role in parrot?
02:33 audreyt I don't think about parrot much these days...
02:33 audreyt except when attempting (and failing) to fix embedding
02:34 audreyt not specific to parrot, though, I think a $job where one can deploy one's active free software proejct is a real plus
02:34 audreyt even though it may look like a distraction at first
02:34 audreyt I know that Dan Sugalski (and parrot) benefitted from his deployment of parrot in his prev $job
02:34 Limbic_Region oh definately
02:34 audreyt and jifty/pugs/ghc all benefitted from my day $job
02:35 Limbic_Region I was just thinking that it was a much overdue "break"
02:35 audreyt ^C
02:36 audreyt yeah. although if one's job was utterly unrelated, then the FOSS side may suffer
02:36 Limbic_Region well, that depends on if you are looking at long or short term benefits
02:37 Limbic_Region being away totally for a while can give you perspective and renewed energy
02:37 audreyt that's true too
02:37 Limbic_Region assuming you come back - you may have more to offer than if you had stayed
02:37 audreyt in any case leo deserves a sabbatical :)
02:38 Limbic_Region yep - that was my thinking though I hope code monkeys step up to fill the gap
02:38 audreyt there's certainly a lot of new PDDs to implement recently...
02:38 Limbic_Region yeah, I saw that
02:39 Limbic_Region going to try to build ghc on cygwin again tomorrow - afraid simon and I are talking past one another
02:39 audreyt oy
02:39 audreyt #ghc may help
02:39 Limbic_Region it is strangely quiet
02:39 audreyt I've found them really helpful
02:39 audreyt yeah, it only rises to action when someone raises some bork
02:39 TimToady rehi
02:39 Limbic_Region but I think the issue is that things *should* be getting further along then they are
02:40 audreyt TimToady: greetings!
02:40 audreyt TimToady: quick question. I realized that
02:40 Limbic_Region so I probably need to find out why they aren't before squawkig again
02:40 audreyt 1 < any(@x) 10
02:40 audreyt 1 < any(@x) < 10
02:40 audreyt cannot work the same way as
02:40 audreyt 1 < ($j = any(@x)) < 10
02:40 audreyt i.e. the latter has no way to rewrite into a grep
02:40 TimToady whoever is documenting min and max should probably put them near sort and cmp and eqv with similar parameterization
02:41 audreyt and since it's a syntactical rewrite it doesn't matter if it occurs in the first two operand pos or not
02:41 pasteling Someone at 220.135.90.73 pasted "S09 patch" (45 lines, 1.6K) at http://sial.org/pbot/20088
02:41 audreyt so I patched S09 (see above) to say that
02:42 lanny joined perl6
02:42 TimToady somewhere I proposed that that be 1 < those(@x) < 10 instead
02:42 audreyt where those() is also syntactic?
02:42 TimToady to make the desire for grep rewrite explicit
02:42 Limbic_Region lanny - did you see TimToady's comment from a minute ago?
02:42 audreyt what do you think about
02:42 TimToady and leave any() alone
02:42 audreyt 1 < list(@x) < 10
02:42 audreyt ?
02:42 TimToady might work
02:42 audreyt those() doesn't anything in isolation troubles me
02:42 TimToady we're getting dangerously close to list comprehensions here. :)
02:43 lanny Limbic_Region: Missed it.  There's always a delay between the logs and logging on through the browser irc
02:43 lambdabot lanny: You have 2 new messages. '/msg lambdabot @messages' to read them.
02:43 Limbic_Region lanny - [22:41] <TimToady> whoever is documenting min and max should probably put them near sort and cmp and eqv with similar parameterization
02:43 Limbic_Region I know you worked on sort.t
02:43 audreyt TimToady: we'll just call it "list() comprehension"
02:43 TimToady lanny: was it you asking about min/max?
02:43 lanny Got it.  :)
02:44 lanny Yes.  There's a lot of tests on them and Damian mentioned them in p.p6.lang.
02:44 TimToady audreyt‼
02:44 svnbot6 r13762 | audreyt++ | * Fix extraction of {$^a+$^b} so it's sorted lexographically
02:44 svnbot6 r13762 | audreyt++ |   again. (It was erroneously sorting with internal IDs.)
02:44 svnbot6 r13762 | audreyt++ |   lanny++ for noticing this.
02:44 lanny Wasn't sure about just going in to Functions.pod and fixing up whatever I thought was out of whack though.  I'll do the needful.
02:44 audreyt TimToady??
02:45 TimToady if something's missing, better to whack it in somewhere--can always be moved later.
02:45 TimToady audreyt: was just commenting on your list() comprehensible remark
02:45 lanny I noticed it but the tests were what did the work.  I'm just glad it wasn't in op1MinMax.  I must have looked through the code for 30 minutes trying to find the bug.
02:46 lanny @messages
02:46 lambdabot audreyt said 27m 28s ago: the bug was because implicit vars weren't ordered lexographically anymore!
02:46 lambdabot audreyt said 27m 5s ago: {$^a <=> $^b} were erroneously taking the params in the wrong order. thanks for spotting this before release!
02:47 svnbot6 r13763 | audreyt++ | * Pugs.Prim.List: Make max/min not compare the first element twice.
02:48 TimToady min/max should take exactly same args as sort
02:48 audreyt TimToady: I take that I can check it in? I'll move it from S09 to S02 where it belongs
02:48 Limbic_Region audreyt - the first test that causes Win32 to have the windows level error is t/regex/from_perl6_rules/codevars.t or combchar.t (it happens somewhere in between the two)
02:49 TimToady ci.WHICH?
02:49 Limbic_Region the second is t/regex/p6regex/p6regex.t
02:49 weinig is now known as weinig|sleep
02:49 lanny TimToady: min/max args -- noted
02:49 Limbic_Region err, let me hiveminder these instead - you are busy
02:50 TimToady audreyt: ci the list() thing?
02:50 TimToady if so, yes.
02:52 audreyt thx :)
02:54 mauke_ joined perl6
02:58 Limbic_Region ok, hivemindered
02:59 TimToady audreyt: did you notice that .pick merely defaults to .pick(1) now?
02:59 TimToady and that .pick(*) is a shuffle?
03:01 Limbic_Region ?eval say (1..10).pick
03:01 evalbot_r13761 OUTPUT[9 ] Bool::True
03:01 TimToady ?eval (^100).pick
03:01 evalbot_r13761 26.0
03:03 audreyt TimToady: no, that's cool
03:03 TimToady I keep wondering if there's some way to refactor the 0-or-1-ary rand into something saner.
03:04 audreyt also,
03:04 audreyt $x = list(@y) ~~ {...}
03:04 TimToady make people write 1.rand maybe.
03:04 audreyt should comprehend as well
03:04 audreyt the list-context constraint feels wrong here
03:04 TimToady those @x that match works there
03:05 TimToady if that's what it means
03:05 audreyt yup
03:05 audreyt $x = @y.grep:{...}
03:05 audreyt same as this
03:05 audreyt ok, implemented and specced and tested
03:05 TimToady $x = grep(@x) ~~ {...}
03:05 audreyt lunch, bbiab
03:09 mauke_ is now known as mauke
03:09 Limbic_Region joined perl6
03:14 svnbot6 r13764 | audreyt++ | * Implement "list() comprehension":
03:14 svnbot6 r13764 | audreyt++ |     pugs> 1 < list(1,1,2,3,5,8) < 8
03:14 svnbot6 r13764 | audreyt++ |     (2, 3, 5)
03:16 lanny TimToady: On pick() is there any reason not to allow @a.pick(*, :replacement)?
03:17 lanny Ooh.  Well that was a bad example.  @a.pick(7, :replacement);
03:17 TimToady seems like that would be hyperable somehow
03:18 TimToady but that would certainly be more readable in some sense.
03:18 wolverian * seems quite hyper already to me, intuitively
03:18 TimToady well, @a.pick(*, :repl) would presumably give you an eternal supply h
03:18 TimToady s/h//
03:18 lanny R has a sample() that will take a vector and do random selection with or without replacement.  Very useful in a Stats system but since pick() is already there seems like the place for it.
03:20 lanny Hmm.  "Pick a number from 1..100".  repeat { (1..100).pick(*, :repl); }
03:21 TimToady repeat isn't legal without a conditional, btw
03:21 lanny Darn.  Had a long "discussion" with Juerd today about for ^$num { do_something; } for loops of a given length.  He's agin' it and I can see his arguments.
03:22 TimToady yeah, I read it all.
03:22 lanny I guess for 0..^$num { do_something(); } is as easy.
03:24 lanny ah.  loop { ...pick(); }
03:24 Limbic_Region TimToady - even the part where I said you were subject to losing er uh, changing your mind
03:27 Limbic_Region TTFN all - almost tomorrow
03:27 TimToady laters
03:29 Khisanth besides you can only lose something if you still have it
03:32 lanny If sort, min, max, cmp, and eqv all have the same MMD signature (is there a name for the collective signature of all Codes of the same name?) any objection to renaming it.  CmpCriterion maybe?  OrderCriterion?  PosetCriterion?
03:32 lanny SortCriterion would also make sense but some folks might wonder at sort being the kernel.
03:33 TimToady Ordering?
03:33 lanny blah(@values, Ordering @by);  subset Ordering of Sig | KeyExt | Comp | OrderingPair;
03:34 TimToady seems really strange to call that a subset
03:35 lanny It makes coding it in Perl 6 a touch easier since given/when gets a bit easier.
03:36 lanny subset of Any where { self ~~ Sig | KeyExt | Comp | OrderingPair } if it makes you feel better.  :)
03:36 TimToady whew!
03:37 TimToady so maybe it's really subset Ordering where Sig | KeyExt | Comp | OrderingPair;
03:37 TimToady and it just defaults to "of Any"
03:39 lanny I need to read up on S05 so I can start talking the grammar but that would seem to have where taking a Junction or a Code.  It's good sugar but was wondering earlier if everything needed couldn't be state with subset of Blah where {  }?
03:40 TimToady after all, you can't actually have an Ordering that is more than one of those...
03:40 lanny * stated
03:40 lanny Agreed
03:40 kanru joined perl6
03:41 TimToady well, sure, in the same sense that every "when Blah" can be stated in terms of when {...}
03:41 TimToady but syntactic sugar is sweet
03:42 TimToady and the whole point of smart matching is to sweep as much dwimmery into one spot so that we can use it all sorts of other places.
03:42 TimToady including run-time type checking.
03:42 TimToady and MMD
03:43 lanny Yes.
03:44 lanny I like syntactic sugar.  Maybe that hsould have been, "It's good sugar and..."
03:45 lanny In the end all sugar goes to something canonical (or circular) and I like those small islands of stability sometimes.  Especially against the churning sea of the specs.
03:46 TimToady ?eval say ~(list(^100) ~~ /7/)
03:46 evalbot_r13761 is now known as evalbot_r13764
03:46 evalbot_r13764 *** Cannot parse regex: 7 *** Error: Error: 'require' trapped by operation mask at /home/audreyt/pugs/perl5/Pugs-Compiler-Rule/lib/Pugs/Runtime/Match/HsBridge.pm line 23.  *** Cannot parse regex: 7 *** Error: Error: 'require' trapped by operation mask at /home/audreyt/pugs/perl5/Pugs-Compiler-Rule/lib/Pugs/Runtime/Match/HsBridge.pm line 23.  *** Cannot parse regex: 7 *** Error: Error: 'require' trapped by operation mask at /home/audreyt/pugs/perl5
03:46 TimToady ?eval say ~(list(^100) ~~ m:P5/7/)
03:47 evalbot_r13764 OUTPUT[7 17 27 37 47 57 67 70 71 72 73 74 75 76 77 78 79 87 97 ] Bool::True
03:47 lanny * wanders off to type of Orderings.
03:47 lanny bah.  s/*/\/me/
03:47 TimToady whatever. :)
03:47 lanny That's what I said.
03:56 TimToady ?eval say ~(list(^100) !% 7)
03:56 evalbot_r13764 Error:  Unexpected "!%" expecting comment, operator or ")"
03:57 TimToady ?eval say ~(list(^100) !% 7)
03:57 evalbot_r13764 Error:  Unexpected "!%" expecting comment, operator or ")"
03:57 TimToady ?eval say ~(list(^100) % 7)
03:57 evalbot_r13764 OUTPUT[2 ] Bool::True
03:58 TimToady I wonder if it's worth having a !% operator that means "is evenly divisible by"
03:59 TimToady seems odd that "?%" would mean "isn't evenly divisible by".
03:59 lanny Back in Modern Algebra that was | but you just used that one up.  :)
03:59 svnbot6 r13765 | lanny++ | * minmax.t - fixed buggy test
04:00 TimToady just wondering, since chaining operators are special cased in various ways, and % is often used as a logical that way
04:00 TimToady but maybe we want ?/ and !/
04:00 lanny It would be nice.  Would save untold == 0 on $n % 2 == 0;
04:01 TimToady and list(^100) ~~ { $_ % 2 == 0 }
04:05 lanny Of course anyone that wanted those could just code em.  How do you tell when the Specs end and when "stuff the developer should do" begins?
04:06 TimToady the Specs end when I get tired.  :)
04:06 lanny :)
04:08 lanny Course if you coded it as an infix then you'd have to grep over a list to extract from a list.  Or MMD it I guess.
04:10 TimToady ?eval say ~(list(^100) ~~ { not $_ % 7 })
04:10 evalbot_r13764 is now known as evalbot_r13765
04:10 evalbot_r13765 OUTPUT[0 7 14 21 28 35 42 49 56 63 70 77 84 91 98 ] Bool::True
04:11 TimToady I'd do ?% and !% in a shot if they weren't bassackwards...
04:11 lanny Perl6 pass one question of the mini-mental physical.  News at 11.
04:11 lanny They are "more" correct but I really think ?/ and !/ will be easier to remember.
04:12 TimToady but don't really decompose to not a / b
04:13 TimToady whereas !% would, unless we make ?% mean not a % b
04:13 lanny You could do that.  If you just spell out, "yes, it's backwards.  sue me" then I think you could chalk it up as a win and move on.
04:15 lanny You hardly need the !% op from above since that's just !% := %
04:16 TimToady if ?% were chaining you'd get !?% for free.  :) !?!?!
04:16 buffer i want left behind: the rising
04:16 lanny The wheels within wheels of Perl 6 remind me a LOT of lisp.  It's gonna be a great language.
04:16 buffer anyone have it
04:18 buffer left perl6
04:23 TimToady maybe all the boolean ?^ ?& !| etc belong in chained ops rather than + and *
04:23 lanny sort { $^a <=> $^b } is insensitive(&abs), @values;
04:24 TimToady sort { +abs($_) }, @values
04:25 TimToady sort -> Num $_ { .abs }, @values
04:26 lanny Oh yes.  You *could* do it those ways.  But if someone tacks on is insensitive all I've got for a meaning right now is "see if $a.can('lc')"
04:26 TimToady sorry, didn't mean to trammel your very valid point.  :)
04:26 lanny Personally I'd like to see insensitive go away for writing what you mean and descending go away for reverse().
04:27 TimToady sort :(-Num), @values
04:28 lanny Is that a new kind of smiley?
04:28 lanny :)  But what I'm really wonder is if the '-' is a typo on Num or not.
04:28 lanny Wow.  What great typing.  Time for sleep soon.
04:29 TimToady right now it would be a typo, but we could have +/- "zones" like * and |
04:29 TimToady or just sort :(Num is descending), @values
04:30 TimToady descending is terribly cobolesque though
04:31 lanny That's already specced as I read it.
04:31 lanny And how do you define descending for sort :(Dog is descending), @values;
04:31 TimToady depends on whether the type does Ordered in the first place
04:31 lanny Unless there's something like Dog does Order;
04:32 TimToady anything that does Ordered presumably has a default ordering.
04:32 * lanny nods.
04:32 TimToady that's what makes Sig so powerful in sorts et al.
04:32 lanny Yeah.  That seems to have dropped out of the specs lately or google can't tease it out but I recall that from an earlier question I asked in here.
04:33 TimToady it's implicit in the Sig as criterion idea though
04:34 lanny Yes but implicit ideas in specs that others might code your language from to be standard might leave a lot of room for interesting Perl 6's.
04:34 TimToady that's kinda why we're pushing to the the Haskell one done first.  :)
04:34 TimToady s/the/get/
04:35 TimToady even if it's not The Spec, it can at least point the True Way
04:35 TimToady and if we're really lucky someone will have installed a regression test for the way pugs does it.
04:35 lanny Yeah.  :)  Saw that coming.
04:36 TimToady I've really been delighted with how that's been working out over the last while though.
04:37 TimToady I feel like the process is convergent.
04:37 TimToady things will certainly diverge later, and that's okay
04:38 TimToady but we're at a golden moment right now when the leverage on the future is spectacularly huge, for good and ill
04:39 TimToady I think the intersection of what fits in audrey's brain and what fits in my brain will be something really useful.
04:39 lanny Yeah.  Nice to watch y'all play off each other.
04:40 TimToady well, I oversimplify, of course, since @brains >>> 2
04:41 TimToady @brains ⋙  2
04:41 lambdabot I think so, Brain, but isn't that why they invented tube socks?
04:42 lanny Is that a hypered >?
04:42 lanny No.  Much-greater-than.
04:42 TimToady no, that's Unicode for VERY MUCH GREATER THAN
04:43 TimToady much greater than is just ≫
04:43 TimToady well, go put your brain in a tube sock.
04:43 lanny No.  One more question.
04:44 TimToady @questions ≫ 1
04:44 lambdabot Unknown command, try @list
04:45 lanny In role Ordered presumably there is cmp() to set up the ordering.  Does it need a desensitize() to state how to make something is insensitive?
04:45 TimToady more like :canonicalize($how) or some such
04:46 mako132_ joined perl6
04:46 TimToady that's really what KeyExt is doing
04:46 lanny Ah yes.
04:47 TimToady anyway, I prefer to state it in the positive
04:47 ruz hi, I don't get why "\Z(?!\n)" can be used instead of "\z" in perl5 code. And couldn't find anything related in docs. could you give me a hint?
04:48 lanny sort :(Dog is not_quite_there_on_the_empathy_thing_but_hopefully_soon), @values might be a bit rough just to say that Dog's are insensitive beasts.
04:48 TimToady :D
04:49 lanny Off to find a tube sock.  Cheers.
04:49 TimToady ruz: \Z means \z|\n\z
04:49 TimToady so the negative lookahead falsifies the second part.
04:50 TimToady fortunately, Perl 6 has neither \z nor \Z
04:51 TimToady but I have no clue why anyone would use the lookahead when \z works fine (except maybe for really old Perls?)
04:51 ruz is it possible that some perl 5.x version has no support for \z?
04:51 TimToady could be
04:51 Tman joined perl6
04:51 TimToady I think that's right, which is why there's \A and \Z and why \z doesn't match.
04:51 TimToady \Z and \z ought to have been switched.
04:52 Tman what's the general consensus on how far along pugs is/how far it has to go?
04:52 ruz TimToady: yep, but do you have time machine?
04:53 TimToady it's come along spectacularly far, it still has a long way to go, and insane people are starting to play with it for real things.
04:53 ruz :) ok, thanks, I think there is no another reason
04:54 Tman hmm.
04:54 Tman what kinds of things are missing?
04:54 TimToady we haven't really installed the Moose meta-object protocol yet, so the OO support is still chewing gum and bailing wire.
04:55 * Tman doesn't know what that is :p
04:55 TimToady we're still in the process of bootstrapping the compiler in itself.
04:55 TimToady and it's almost completely unoptimized.
04:56 TimToady we're going for correctness first.
04:56 Tman right
04:56 TimToady but the P5ish subset of P6 works pretty well, if you ignore the fact that we switched regex engines recently and it's still pretty creaky
04:57 Tman cool
04:57 TimToady would you like to help?
04:58 TimToady knowing any of Perl | Haskell | English is a plus
04:59 Tman no Haskell and not a whole lot of experience with Perl (but some)
05:00 TimToady we need the viewpoint of people who are just getting into it as well.
05:00 TimToady fresh eyes are always useful
05:00 Tman yeah
05:01 TimToady anyway, I can offer you a commit bit if you'd like
05:01 TimToady a lot of people just go in and start whacking on tests.
05:01 Tman I'll look into it
05:01 TimToady after finding holes in the specs
05:02 Tman not really any experience with interpreters either
05:02 Tman which is worrying
05:02 Tman :/
05:02 TimToady that matters very little, I think.
05:02 TimToady since Perl 6 is agnostic as to whether it's compiled or interpreted.
05:03 Tman well, with parsing I mean
05:03 TimToady anyway, you're welcome to hang around until you get the "itch"
05:03 Tman x)
05:03 Tman okay
05:05 TimToady reading through the specs is a good place to start, and if you read the ones that are backannotated with passing/failing tests, you can get a feeling for how far along pugs is.
05:05 Tman okay
05:05 Tman cool
05:06 TimToady you can get an annotated view of the synopses by following SYN links from http://m19s28.vlinux.de/cgi-bin/pugs-smokeserv.pl?
05:06 lambdabot Title: Pugs Smoke Reports, http://tinyurl.com/zs247
05:08 SubStack joined perl6
05:09 Tman kk
05:10 TimToady ciao & # chow
05:15 BooK joined perl6
05:15 shobadobs joined perl6
05:19 Aankhen`` joined perl6
05:34 gaal wow, those new list() comprehensions look weird
05:35 gaal ?eval list(1,2,3,4) < list(3,4,5,6)
05:35 evalbot_r13765 (1, 2, 3)
05:36 gaal > [(x,y) | x <- [1..4] | y <- [3..6]]
05:36 lambdabot Parse error
05:36 gaal hm?
05:37 gaal ah, no -fglasgow-exts
05:37 gaal anyway: what do we do for parallel comprehensions?
05:38 gaal for those not familiar with the feature: in shiny haskell, that's:
05:38 gaal [(1,3),(2,4),(3,5),(4,6)]
05:40 SubStack joined perl6
05:42 b00t joined perl6
05:43 takanori joined perl6
05:55 TimToady ?eval say perl map { [$^x, $^y] }, each(1..4; 3..6)
05:55 evalbot_r13765 OUTPUT[([1, 3], [2, 4], [3, 5], [4, 6]) ] Bool::True
05:57 TimToady ?eval say perl each(1..4; 3..6).map:{ [$^x,$^y] }
05:57 evalbot_r13765 OUTPUT[([1, 3], [2, 4], [3, 5], [4, 6]) ] Bool::True
06:03 gaal okay.. sometihng that eludes me for the moment in my pre-caffeinated state, how do you get all pairs such that x < y and each is selected from their own list?
06:04 shobadobs walk through the lists in the style of the merging algorithm that mergesort uses
06:04 gaal cartesian_product(@x, @y).grep:{$x<$y}
06:04 TimToady ?eval say perl each(1..4; 3..6).map:{ $^x < $^y ?? [$^x,$^y] !! () }
06:04 evalbot_r13765 OUTPUT[([1, 3], [2, 4], [3, 5], [4, 6]) ] Bool::True
06:05 gaal [1,6] e.g. shoudl be there too
06:05 gaal no longer a parallel query
06:05 TimToady ?eval say perl each(1..4; 3..6).map:{ $^x < $^y / 2 ?? [$^x,$^y] !! () }
06:05 evalbot_r13765 OUTPUT[([1, 3],) ] Bool::True
06:06 TimToady lessee.  Did anyone implement my X,X yet?
06:07 TimToady ?eval 1..4 X,X 3..6
06:07 evalbot_r13765 Error:  Unexpected "X" expecting comment, operator, statement modifier, ";" or end of input
06:07 TimToady nope
06:08 TimToady anyway, that should be grep -> [$x, $y] { $x < $y }, @x X,X @y or some suc
06:08 gaal ah, I don't think XxX is implemented at all yet
06:08 TimToady *such
06:09 gaal okay, thanks. I'd better go wake up.
06:09 TimToady list(@x X,X @y) ~~ -> [$x, $y] { $x < $y } in the new syntax
06:09 svnbot6 r13766 | Darren_Duncan++ | ext/Rosetta/ : minor update to Copying.pod
06:10 TimToady list(@x X,X @y) ~~ { $_[0] < $_[1] }
06:13 gaal ah, it's a shame you can't use placeholders there
06:13 gaal because there has to be unpacking
06:14 TimToady list(@x X,X @y) ~~ { infix:{'<'}(|$_) }
06:14 gaal use Golf; # turns '&infix:' into 'i'
06:14 TimToady but maybe < is smart enough to do:
06:15 TimToady list(@x X,X @y) ~~ .infix:{','}
06:15 TimToady s/,/</
06:16 TimToady s:2nd/,/</ that is.  'course if this were APL you'd have started with X<X to get a selector map
06:16 gaal 'course!
06:16 gaal anyway.. bbiab &   :-)
06:18 TimToady list(@x X,X @y) ~~ { [<] @$_ }
06:19 TimToady list(@x X,X @y) ~~ .[].'[<]'
06:20 TimToady list(@x X,X @y) ~~ .'[<]' might possibly be forced to dwym
06:24 masak @brain makes lambdabot give a random "pinky and the brain" quote?
06:24 lambdabot It must be inordinately taxing to be such a boob.
06:24 masak guess so
06:24 masak :)
06:27 TimToady list([0,2],[1,2],[2,2],[3,2]) ~~ { [<] @$_ } seems to be broken.
06:27 TimToady that's cuz this appears to be broken:
06:27 TimToady ?eval say grep { [<] @$_ }, [0,2],[1,2],[2,2],[3,2]
06:27 evalbot_r13765 is now known as evalbot_r13766
06:27 evalbot_r13766 OUTPUT[0 21 22 23 2 ] Bool::True
06:29 TimToady ?eval [<] 1,2
06:29 evalbot_r13766 Bool::True
06:29 TimToady ?eval [<] 2,1
06:29 evalbot_r13766 Bool::False
06:29 TimToady ?eval my @x = 2,1; [<] @x
06:29 evalbot_r13766 Bool::False
06:30 TimToady ?eval my $x = [2,1]; [<] @$x
06:30 evalbot_r13766 Bool::True
06:30 TimToady hmm
06:30 TimToady ?eval my $x = [2,1]; [<] |$x
06:30 evalbot_r13766 Bool::True
06:31 TimToady ?eval my $x = [2,1]; [<] |@$x
06:31 evalbot_r13766 Bool::True
06:31 TimToady ?eval my $x = (2,1); [<] @$x
06:31 evalbot_r13766 Bool::True
06:31 TimToady ?eval my $x = \(2,1); [<] @$x
06:32 evalbot_r13766 Bool::True
06:32 TimToady ?eval my $x = \(2,1); [<] |$x
06:32 evalbot_r13766 Bool::True
06:33 TimToady it really seems to want to believe that 2 < 1.
06:34 TimToady ?eval my $x = [2,1]; [~] @$x
06:34 evalbot_r13766 [2, 1]
06:35 TimToady ?eval my $x = [2,1]; [~] $x.[]
06:35 evalbot_r13766 [2, 1]
06:35 TimToady ?eval my $x = [2,1]; [~] $x.[0,1]
06:35 evalbot_r13766 [2, 1]
06:36 TimToady ?eval my $x = [2,1]; [~] $x[0],$x[1]
06:36 evalbot_r13766 "21"
06:36 TimToady this is wrong
06:37 TimToady [x] should process its list as a list operator and insert the operator between list elements, not at literal commas.
06:38 Khisanth heh so everything is behaving the the opposite way they are supposed to? :)
06:39 TimToady not really opposite, just kind of sideways.
06:40 TimToady well, it did work for [<] @x at least.
06:41 TimToady so for some reason @$x isn't interpolating the array in $x.
06:42 TimToady or maybe not.
06:42 Khisanth what is @$x supposed to be?
06:42 TimToady ?eval my @x = 2,1; [<] @x
06:42 evalbot_r13766 Bool::False
06:42 TimToady ?eval my @x = 1,2; [<] @x
06:42 evalbot_r13766 Bool::True
06:42 TimToady yeah, that's working
06:44 TimToady ?eval my $x = [2,1]; [~] @$x, 0
06:44 evalbot_r13766 "210"
06:44 TimToady ?eval my $x = [2,1]; [~] @$x
06:44 evalbot_r13766 [2, 1]
06:44 TimToady ?eval my $x = [2,1]; [~] @$x,
06:44 evalbot_r13766 [2, 1]
06:44 TimToady heh.
06:45 TimToady ?eval my $x = [2,1,0]; [~] @$x
06:45 evalbot_r13766 [2, 1, 0]
06:48 TimToady $pugs.=audreyt()
06:50 * TimToady .= zzz();
07:35 xinming_ joined perl6
07:43 yts joined perl6
07:50 shobadobs joined perl6
08:05 shobadobs joined perl6
08:05 iblechbot joined perl6
08:06 ashleyb joined perl6
08:14 shobadobs_ joined perl6
08:19 mdiep_ joined perl6
08:20 shobadobs__ joined perl6
09:00 norageek joined perl6
09:57 rodi joined perl6
10:07 kanru joined perl6
10:17 imago joined perl6
10:31 araujo joined perl6
11:07 imago is now known as gunya
11:12 pasteling "TreyHarris" at 207.171.180.101 pasted "Why is one parsefail? I just hit up-arrow return..." (32 lines, 523B) at http://sial.org/pbot/20089
11:13 TreyHarris this seems odd to me
11:14 TreyHarris but i can't figure out how to write a test for it
11:28 masak worksforme in r13746
11:29 xinming__ joined perl6
11:29 masak or, rather, I didn't come upon the same error...
11:30 masak hard to say anything about a test case involving randomness
11:30 frederico joined perl6
11:31 masak solving this probably requires some familiarity with the internals
11:32 masak i.e. having an idea of how to answer the question "what could possibly enable this to happen?"
11:32 TreyHarris yes, but i mean i just wrote a test with that "3 d 6" repeated 1000 times
11:32 TreyHarris and didn't get a single parsefail
11:34 masak TreyHarris: indeed. more likely it has something to do with pugs-the-commandline-interpreter than pugs-the-compiler
11:35 masak er, "commandline interpreter" is not a good term for what I had in mind
11:35 masak "interactive interpreter", maybe
11:41 SubStack joined perl6
12:19 lollan joined perl6
12:22 chris2 joined perl6
12:49 kanru joined perl6
12:50 integral|ZzZzz is now known as integral
12:56 imago joined perl6
12:56 svnbot6 r13767 | kudra++ | Summary for the week
12:58 rindolf joined perl6
12:59 pasteling "rindolf" at 88.154.17.16 pasted "Problem with ghc" (121 lines, 3.7K) at http://sial.org/pbot/20093
13:02 imago is now known as gunya
13:07 rindolf Hi all.
13:07 rindolf Anyone here?
13:08 Salzh joined perl6
13:11 holoway joined perl6
13:16 audreyt rindolf: "else return ()"
13:16 rindolf audreyt: thanks.
13:16 audreyt you need to give return something to return
13:16 audreyt np :)
13:16 Juerd I'm doing a PHP talk at amsterdam.pm next tuesday :)
13:17 audreyt cool!
13:17 masak kudra++ # summary
13:17 Juerd PHP appears to be designed, solely to annoy Perl programmers :P
13:18 Juerd So it makes a perfect subject for a Perl meeting.
13:18 masak Juerd: I've often thought the same thing
13:18 rindolf Juerd: nice.
13:18 Juerd -- http://nl3.php.net/manual/en/faq.languages.php
13:18 Juerd <strike>The biggest advantage of PHP over Perl is that PHP was designed for scripting
13:19 Juerd for the web where</strike> Perl was designed to do a lot more and can <strike>because of this</strike>
13:19 lambdabot Title: PHP: PHP and other languages - Manual, http://tinyurl.com/kjme4
13:19 Juerd get very complicated. <strike>The flexibility / complexity of Perl makes it easier
13:19 Juerd to write code that another author / coder has a hard time reading.</strike> PHP has
13:19 Juerd a <strike>less</strike> confusing and stricter format <strike>without</strike> losing flexibility. PHP is
13:19 Juerd easier to integrate into existing HTML than Perl. <strike>PHP has pretty much all
13:19 Juerd the 'good' functionality of Perl: constructs, syntax and so on, without
13:19 Juerd making it as complicated as Perl can be.</strike> Perl is a very tried and true
13:19 Juerd language, it's been around since the late eighties, <strike>but PHP is maturing
13:19 Juerd very quickly. </strike>
13:19 Juerd (My strikes, of course)
13:20 miyagawa_ haha
13:20 holoway left perl6
13:31 masak :)
13:34 rindolf audreyt: how do I split a sentence into words in Haskell?
13:34 rindolf Like split(/\s+/, $str) in Perl?
13:37 penk joined perl6
13:46 wolverian rindolf, words
13:47 wolverian > words "foo bar baz"
13:47 lambdabot ["foo","bar","baz"]
13:48 Limbic_Region joined perl6
13:53 svnbot6 r13768 | kudra++ | changed quote
13:57 polettix is now known as poletti
13:57 poletti is now known as polettix
13:58 rindolf wolverian: I see.
13:59 Ikarus Juerd: you need to strike the late eighties stuff aswell
13:59 wolverian rindolf, read the Prelude now and then - http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html - it's like reading perldoc perlfunc :)
13:59 lambdabot http://tinyurl.com/ovjef
14:01 prism joined perl6
14:26 Juerd Ikarus: Hm, indeed!
14:30 pasteling "rindolf" at 88.154.17.16 pasted "What's wrong with this Haskell function?" (6 lines, 162B) at http://sial.org/pbot/20095
14:33 audreyt hm.
14:33 audreyt in [+]<<, the [] part never gets run because << is defined recursively over arrays
14:33 audreyt that seems like a spec bug.
14:35 audreyt @tell TimToady I'm dropping support for [+]<< because << recurses into subarrays and so [+] never got a chance...
14:35 lambdabot Consider it noted.
14:41 audreyt rindolf: in the else clause you used monadic statements without a do.
14:41 audreyt else do rest <- main
14:41 audreyt        return (line:rest)
14:41 audreyt will work
14:41 rindolf audreyt: yes, someone on #haskell helped me.
14:42 audreyt k cool
15:00 count_leto joined perl6
15:13 Sartak joined perl6
15:18 svnbot6 r13769 | audreyt++ | * operator_overloading.t: localize the test scope somewhat.
15:21 svnbot6 r13770 | audreyt++ | * Remove support for reduce+posthyper form "[+]<<" because
15:21 svnbot6 r13770 | audreyt++ |   as specced the hyper will recurse into arrays, so the reduce
15:21 svnbot6 r13770 | audreyt++ |   never got a chance to run.
15:21 svnbot6 r13770 | audreyt++ | * Also add "Loop" as a subtype of "Block" (not used yet)
15:30 clkao audreyt: i am bored. give me an one hour task
15:30 svnbot6 r13771 | audreyt++ | * Pugs::Runtime::Match::HsBridge: Implement autoanchoring of anonymous token/rules:
15:30 svnbot6 r13771 | audreyt++ |     However, when a ratcheted regex is called directly, it is automatically
15:30 svnbot6 r13771 | audreyt++ |     anchored on both ends.  (You may override this with an explicit C<:p> or
15:30 svnbot6 r13771 | audreyt++ |     C<:c>.)  Thus, you can do direct pattern matching using a token or rule:
15:30 svnbot6 r13771 | audreyt++ |         $string ~~ token { \d+ }
15:30 svnbot6 r13771 | audreyt++ |         $string ~~ rule { \d+ }
15:30 svnbot6 r13771 | audreyt++ |     and these are equivalent to
15:30 svnbot6 r13771 | audreyt++ |         $string ~~ m/^ \d+: $/;
15:30 svnbot6 r13771 | audreyt++ |         $string ~~ m/^ <ws> \d+: <ws> $/;
15:30 clkao i thought we are in release mode? do't see the failing test count going down in the smoke
15:31 audreyt hm, for me it is
15:31 svnbot6 r13772 | audreyt++ | * t/operators/hyper.t: Comment out tests for [+]<<.
15:31 svnbot6 r13772 | audreyt++ |   Triaging for t/operators/ done, moving up to t/oo/...
15:31 clkao ok
15:31 audreyt it was going up for a while when I was fixing parsefails
15:31 audreyt in tests, that is
15:32 clkao anymoose. find something small for me to do ?
15:33 audreyt data_bind_callconv(\@pos1, \%nam1, \@pos2, \%nam2) support?
15:33 audreyt you can start by simply concat them together
15:33 clkao right, describe that @@ thing again
15:34 audreyt see =head2 Multidimensional argument list binding
15:34 audreyt in S06
15:34 audreyt I need to sleep ~now
15:34 audreyt but the idea is that a slurpy array marked with @@
15:34 clkao which test shuold i be looking t ?
15:34 audreyt become an array of captures with each element representing one feed
15:34 audreyt that will let v6.pm get zipp() and each()
15:35 clkao so there zipp and each in prelude?
15:35 audreyt zip, not zipp, sorry
15:35 audreyt yeah. see t/builtins/container/cat.t
15:35 audreyt and other container/*
15:36 audreyt e.g. each
15:37 audreyt sorry, *fades*
15:37 audreyt &
15:37 rindolf Hi clkao
15:37 clkao ~hi
15:38 rindolf clkao: I filed a bug report about that SVN Perl bindings building bug.
15:38 rindolf clkao: and found a fix.
15:38 clkao url?
15:39 rindolf clkao: http://subversion.tigris.org/issues/show_bug.cgi?id=2617
15:39 lambdabot http://tinyurl.com/j3ydb
15:39 clkao thanks
15:47 clkao s29 smart links are not working
15:48 buetow joined perl6
16:05 clkao in "S6/Multidimensional argument list binding", the linked test has "*@;AoA".  I don't find any reference to @;<bareword> in spec.  or is it just changed to *@@AoA ?
16:06 Sartak is now known as Eidolos
16:13 elmex joined perl6
16:18 audreyt it's just changed to @@A0A
16:18 clkao ok. i will update the test
16:19 imago joined perl6
16:19 clkao audreyt: sub get_multidim_arglist (*@@AoA) { @@AoA }
16:19 clkao audreyt: what about the return value? still multi dimension here
16:20 ashleyb joined perl6
16:20 clkao audreyt: current pugs fails to parse *@@
16:21 audreyt yes, pugs doesn't implement that
16:21 audreyt yet
16:21 audreyt (bbl)
16:21 clkao i will leave that as broken
16:22 clkao but is the '@@AoA' right for the return value? or is it @AoA ?
16:23 clkao and i don't quite understand how you bind multi named
16:23 audreyt both will work
16:23 audreyt the AoA is actually AoC
16:24 audreyt %(@@c[0]) is named
16:24 justatheory joined perl6
16:24 clkao so foo(blah => 1; (2,3,4);bzz => 2, fnord => 3) would do what ?
16:25 clkao or each slice would have their pos and named?
16:25 audreyt yes.
16:26 audreyt @@c[0]<blah>
16:26 audreyt @@c[1]<fnord>
16:26 clkao ok. i think i kind of understand. but i need to keep the c structure in runtime, so we can bind them later as well
16:26 audreyt really & :)
16:26 clkao you mean @@c[2]<fnord>
16:28 * Juerd needs to learn all these new metasyntactic variables.
16:28 Juerd I found myself googling for fnord and not getting it.
16:30 count_leto thats scary...
16:31 svnbot6 r13773 | clkao++ | 12:18 < audreyt> it's just changed to @@A0A
16:31 imago is now known as gunya
16:33 Psyche^ joined perl6
16:49 Psyche^ is now known as Patterner
17:00 Aankhen`` joined perl6
17:01 clkao i wonder where Container::cat is defined
17:01 clkao code, not spec
17:02 rindolf perlbot: karma clkao
17:02 jabbot rindolf: clkao has karma of 326
17:02 perlbot Karma for clkao: 33
17:14 MacVince joined perl6
17:31 mako132_ joined perl6
17:36 Aankh|Clone joined perl6
17:42 MacVince left perl6
17:42 MacVince joined perl6
17:47 cjeris joined perl6
18:32 wilx` joined perl6
18:33 wilx` is now known as wilx
18:44 count_leto joined perl6
19:06 TreyHarr1s joined perl6
19:08 weinig|sleep is now known as weinig
19:10 etzel_ joined perl6
19:14 kanru joined perl6
19:31 Eidolos joined perl6
19:31 mugwump joined perl6
19:32 buetow joined perl6
19:38 mugwump joined perl6
19:40 Eidolos joined perl6
19:56 lichtkind joined perl6
20:19 mdiep joined perl6
20:54 mako132_ joined perl6
21:01 crem joined perl6
21:07 theorbtwo joined perl6
21:10 Limbic_Region joined perl6
21:12 bcorn joined perl6
21:16 stevan joined perl6
21:32 weinig is now known as weinig|bbl
21:38 * Tman is totally lost on all this bootstrapping plan stuff
21:39 Tman so you're writing a perl6->AST compiler in haskell right now.. and then going from there to C? or how...?
21:40 Tman you meaning anyone working on pugs
22:05 Aankhen`` joined perl6
22:17 LimbicRegion joined perl6
22:22 LimbicRegion is now known as Limbic_Region
22:27 Teratogen joined perl6
22:28 Teratogen PHP will never be a Real Language until it has namespaces!
22:28 Teratogen oops wrong channel
22:28 Teratogen =)
22:32 justatheory joined perl6
22:44 aufrank joined perl6
22:55 Psyche^ joined perl6
22:55 TreyHarr1s is now known as TreyHarris
22:57 Psyche^ is now known as Patterner
23:03 weinig|bbl is now known as weinig
23:07 Salzh joined perl6
23:28 bsb joined perl6
23:47 mako132_ joined perl6
23:52 vel joined perl6

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

Perl 6 | Reference Documentation | Rakudo