Camelia, the Perl 6 bug

IRC log for #perl6, 2009-07-29

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 al23 How reduce should work? I thought it is just right fold by binary function, but it seems than n-ary is OK, isn't it?
00:01 TimToady "maybe"
00:01 TimToady and a little later: I'm not in a mental state this morning yet to generate the alternatives
00:02 jnthn TimToady: That was in the context of representations.
00:02 jnthn *sigh*
00:02 jnthn Well, whatever.
00:02 jnthn I'll ask you in a week's time and hope you're thinking metaobject again.
00:02 TimToady :)
00:03 TimToady well, in STD the declarand is available as a context var, so maybe it doesn't matter
00:04 jnthn Sure, but equally we'll need to spec how to implement a trait that you want to apply to a class/role/whatever.
00:05 TimToady but if you call methods on the metaobject, you still have to know what to feed those methods as the first arg for the "real" object
00:05 synth joined #perl6
00:06 TimToady so you might as well start with the declarand, which is going to be the proto typeobject
00:08 TimToady biab &
00:08 jnthn Hmm, yes
00:08 jnthn Though Rakudo's default metaclass kinda doesn't care what you pass there, since it keeps the info about the class in the metaclass, rather than in the proto-object.
00:08 jnthn ooh, it's 2am...
00:08 * jnthn -> sleep
00:19 wayland76 pmichaud: ping?
00:26 pmichaud wayland76: pong
00:35 al23 Anybody using n-ary reduce?
00:35 kst joined #perl6
00:37 al23 Maybe I just got out of the Perl habbits, but it looks quite useless for me when reduce takes missing values to be undef.
00:38 wayland76 pmichaud: I haven't had time to backlog yet, but just checking if you had a chance to look at the ins2 patch I sent :)
00:38 kst joined #perl6
00:38 pmichaud looked at it briefly.  What's the purpose of including all of the setting.pm files in the install?
00:39 wayland76 Well, is there another way that the setting files are going to get on the system after the build tree is deleted?
00:39 pmichaud they're compiled into the .pbc
00:40 wayland76 Ah, ok
00:40 wayland76 In that case, they could probably be left out
00:40 wayland76 How long have they been compiled in?
00:40 pmichaud like, always :-)
00:40 wayland76 ok
00:40 pmichaud the stage 1 compiler gets used to compile the settings to .pir
00:41 pmichaud then we build a new compiler that has all of the settings already compiled in
00:41 pmichaud (and that's the perl6.pbc)
00:41 pmichaud it's entirely possible that someday we'll split the settings out into a separate .pbc file, but the odds that we'll ever read the sources at runtime are really really small
00:41 wayland76 I had a problem some time ago, and it seemed to be cured by doing this, but I now suspect that the real thing that fixed the problem was other changes to Rakudo that were made by other people during the same time :)
00:42 wayland76 Anyway, I'll get rid of them, and re-send the patch
00:42 pmichaud where does the DESTDIR variable get set?
00:43 wayland76 It means you can run "make install DESTDIR=whatever"
00:43 wayland76 Which is needed for RPM building, and quite possibly other sorts of packaging
00:44 pmichaud hmmm.
00:44 wayland76 It also means that you can install even as non-root
00:44 pmichaud But won't it also have the full parrot paths added as well?
00:44 wayland76 So if you have an account on the Unix box at your Uni, you can use perl6 even if the sysadmin hasn't installed it
00:44 wayland76 Well, yes
00:45 pmichaud i.e., if parrot has  "/usr/local/parrot/...", then adding DESTDIR would result in  "my/destdir/value/usr/local/parrot/..." ?
00:45 wayland76 Yes
00:45 pmichaud that's considered "normal"?
00:45 wayland76 There may be better ways of doing it
00:45 wayland76 But everything should begin with DESTDIR
00:45 misssingthepoint joined #perl6
00:46 pmichaud I'm used to there being a --prefix option to Configure that says where to install stuff.
00:46 wayland76 Hmm.  Well, we could do it that way too
00:46 wayland76 I nicked this from Parrot
00:46 wayland76 The general concept of being able to install as non-root in a particular folder is normal
00:47 pmichaud sure, I agree with that.
00:47 wayland76 But the way it's implemented may not be
00:47 pmichaud But using a DESTDIR prefix that is simply prepended to directories isn't normal.
00:47 pmichaud (at least, not in my experience.)
00:47 wayland76 Well, also keep in mind...
00:48 wayland76 That when we build RPMs, if it says ~/src/rpm/BUILDROOT/usr/lib/​parrot/1.4.0-devel/whatever  ...
00:48 wayland76 Then the RPM software will put the file in /usr/lib/parrot/1.4.0-devel/whatever   ...
00:48 wayland76 On the machine that Rakudo is installed on
00:48 pmichaud that seems reasonable-ish
00:49 wayland76 So that's why the DESTDIR makes sense for packaging
00:49 pmichaud okay, time for dinner here
00:49 pmichaud (family is calling me to table)
00:49 wayland76 But that's also why it's blank by default
00:49 wayland76 Yup, l8r :)
00:49 pmichaud is the ':='  standard for makefiles?
00:50 pmichaud (and not just gnu make?)
00:50 wayland76 Not sure.
00:50 pmichaud I'd prefer to see a plain =
00:50 wayland76 I nicked it from somewhere
00:50 pmichaud Parrot switched to using those
00:50 wayland76 Ok
00:50 pmichaud but then Parrot's configure.pl converts them back to ='s
00:50 wayland76 Ah, ok
00:50 pmichaud which seems really bizarre to me.
00:50 pmichaud anyway, gotta run, bbl
00:50 wayland76 In that case, I'll switch it back :)
00:50 wayland76 l8r
00:55 KyleHa joined #perl6
00:58 misssingthepoint good morning, wayland
00:58 wayland76 morning :)
01:04 misssingthepoint re makefiles: http://www.gnu.org/software/m​ake/manual/make.html#Flavors
01:05 wayland76 Thanks.  ":=" doesn't Google well :)
01:05 misssingthepoint i know ;)
01:06 * misssingthepoint wishes for a nice API to all Google's scraped data, so he can use Perl regexes on it.
01:06 wayland76 Well, it looks like we can get rid of it then :)
01:06 misssingthepoint wayland76: probably, unless you have "CFLAGS = $(CFLAGS) -O"
01:06 wayland76 I think this was suggested once, but the problem was that it was slow :)
01:07 wayland76 Not in this case
01:07 misssingthepoint wayland76: :)
01:07 wayland76 We have DESTDIR :=
01:07 wayland76 And it gets overridden from the outside
01:08 misssingthepoint ok... how's ins2 going? :)
01:10 wayland76 Well, pmichaud has pointed out that some parts of my patch are unnecessary
01:10 wayland76 So when I've eliminated those, then WORKSFORME with patch :)
01:10 wayland76 But I think some others had some test failures
01:10 orafu joined #perl6
01:10 wayland76 And I don't know if any work has been done on that
01:11 misssingthepoint hmm
01:13 misssingthepoint i'll test
01:16 pmichaud there were some failures on Solaris that I need to see if I can overcome
01:16 pmichaud (having to do with the paths generated into #line directives)
01:17 pmichaud RT #66560
01:17 KyleHa pmichaud: Would you have time to look at a test I wrote today?  I've been holding back the commit until someone can keep me from dropping in something wrong-ish.
01:18 pmichaud I can look, yes.
01:18 pugs_svn r27787 | kyle++ | [t/spec] label existing RT #63994 test
01:19 pugs_svn r27788 | kyle++ | [t/spec] Test for RT #64002
01:19 pugs_svn r27789 | kyle++ | [t/spec] Test for RT #64080 (may be misplaced)
01:19 KyleHa This one:  http://dev.pugscode.org/changeset/27789
01:19 pugs_svn r27790 | kyle++ | [t/spec] Test for RT #64904
01:22 pmichaud the test look okay to me
01:22 pmichaud *looks
01:22 Whiteknight joined #perl6
01:22 KyleHa Great!  Thanks for looking.
01:25 misssingthepoint KyleHa: "it's easier to ask forgiveness, than permission"... or so I've been told here :)
01:26 KyleHa Yes, I've gone that route sometimes.
01:26 KyleHa I find that I fret later that I made a boo boo and nobody noticed.
01:26 KyleHa Or I commit thinking I'll ask later, and I worry that I'll forget to ask.
01:26 KyleHa This is sort of a least anxiety route for me.
01:27 misssingthepoint I can relate to all that :)
01:27 KyleHa YMMV.
01:27 wayland76 The great thing about tests is, if the test is wrong, then the implementer will hopefully pick it up :)
01:27 misssingthepoint "WFT, that should pass..."?
01:28 pmichaud which then often turns into a message to p6l, which TimToady++ then explains (or otherwise indicates "uh, we need to work on that" :-)
01:28 KyleHa Unfortunately I think we have some tests that used to be correct and verify the current implementation, but they've been made wrong by changes to the spec.  So you have tests and implementation matching and wrong.
01:29 pmichaud that happens.
01:29 pmichaud I'm okay with the tests being updated to match the spec (and being fudged until Rakudo passes them)
01:30 misssingthepoint are spec change commits tagged properly so it's easy to go through and convert the relevant tests?
01:31 misssingthepoint (for some value of 'easy')
01:31 pmichaud what would "tagged properly" mean?
01:31 pmichaud if you're asking if there's a x-reference between them, there is, but it's not complete
01:31 misssingthepoint [docs/perl6/spec], [OH HAI SPEC UPDATE KTHX]
01:32 pmichaud oh, the messages go to the mailing lists, yes.
01:32 misssingthepoint ah, ok.
01:34 KyleHa In t/spec/TODO, there's a list of spec changes (with revision numbers) that have invalidated some tests.  I don't know how accurate it is.
01:35 misssingthepoint ... which is why x-references are a Good Thing.
01:35 misssingthepoint what has to happen to improve those?
01:35 KyleHa Yes.  That's the "smart links", if I understand correctly.
01:36 al23 (1,2,3).reduce({"(f $^a $^b)"}) --- should it work?
01:38 meppl joined #perl6
01:39 misssingthepoint al23: use the evalbot :)
01:39 misssingthepoint or have you tried and got errors
01:39 al23 rakudo: (1,2,3).reduce({"(f $^a $^b)"})
01:39 p6eval rakudo 6999e5:  ( no output )
01:39 al23 rakudo: say (1,2,3).reduce({"(f $^a $^b)"})
01:40 p6eval rakudo 6999e5: OUTPUT«(f (f 1 2) 3)␤»
01:40 al23 pugs: say (1,2,3).reduce({"(f $^a $^b)"})
01:40 p6eval pugs: OUTPUT«*** Cannot bind to non-existing variable: "$a"␤    at /tmp/PveBzigdTQ line 1, column 5 - line 2, column 1␤»
01:40 al23 :(
01:41 al23 rakudo: say (1,2,3,4,5).reduce({"(f $^a $^b $^c)"})
01:41 p6eval rakudo 6999e5: OUTPUT«(f (f 1 2 3) 4 5)␤»
01:41 al23 rakudo: say (1,2,3,4,5,6).reduce({"(f $^a $^b $^c)"})
01:41 p6eval rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce␤(f (f 1 2 3) 4 5)␤»
01:42 al23 pugs: say (1,2,3,4,5,6).reduce({$^a + $^b * $^c})
01:42 p6eval pugs: OUTPUT«27␤»
01:42 al23 rakudo: say (1,2,3,4,5,6).reduce({$^a + $^b * $^c})
01:42 p6eval rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce␤27␤»
01:48 misssingthepoint al23: what are you expecting?
01:48 al23 Pugs doesn't handle {"(f $^a $^b)"}.
01:50 al23 Also, it silently drops values while doing n-ary reduction unlike rakudo...
01:51 misssingthepoint Pugs has kinda been abandoned in favor of Rakudo...
01:51 al23 Also, should the "reduction operator" [op] work like operator substitution or like fold?
01:53 al23 For example, at least in Pugs, [**] (2,3,4) is 2 ** 3 ** 4 == 2 ** (3 ** 4) while (2,3,4).reduce({$^a ** $^b}) is (2 ** 3) ** 4.
01:53 al23 rakudo: say [**] (2,3,4)
01:53 p6eval rakudo 6999e5: OUTPUT«4096␤»
01:54 al23 pugs: say [**] (2,3,4)
01:54 p6eval pugs: OUTPUT«2417851639229258349412352␤»
01:55 misssingthepoint al23: i think rakudo is correct there; AFAIK the spec mandates proper operator precedence apply with [...]
01:56 misssingthepoint hang on, wait
01:56 al23 As for me, I expect *reduction operator* to work like right fold, not like substitution.
01:57 misssingthepoint That may be your expetation, but I don't think that's what the spec says
01:57 misssingthepoint *expectation
01:58 misssingthepoint honestly i'm outta my depth here, you want to talk to TimToady :)
02:00 wayland76 or moritz_ or maybe masak
02:01 misssingthepoint moritz_ would be good to talk to, he seem to know about this sort of stuff.
02:01 al23 Should I check http://perlcabal.org/syn/ for the right answer?
02:02 misssingthepoint al23: yes and no, it's hard to navigate right now, but we're working on that
02:02 misssingthepoint al23: feel free to look through it, in other words... the google tool thingo may be of assistance
02:03 misssingthepoint ok: exponentiation is right associative (http://www.perlcabal.org/syn/​S03.html#Operator_precedence)
02:03 davidm123 joined #perl6
02:04 wayland76 pmichaud: Attached a new patch to http://rt.perl.org/rt3/Tic​ket/Display.html?id=63360
02:04 wayland76 pmichaud: Let me know how it looks
02:04 colomon http://perlcabal.org/syn/S0​3.html#Reduction_operators
02:04 wayland76 colomon++
02:04 wayland76 @karma colomon
02:04 lambdabot colomon has a karma of 8
02:05 misssingthepoint colomon++, that's what i was looking for
02:05 misssingthepoint al23: hope that helps :)
02:05 al23 It is clear that exponentiation is right associative, it is not the Perl 6 issue at all. But it is not clear is [**] a right fold or ** substitution.
02:06 misssingthepoint right fold?
02:06 colomon al23: according to the spec,     [**] 4, 3, 2;     # 4**3**2 = 4**(3**2) = 262144
02:07 al23 Oh, just a kind of Haskell terminology :-)
02:07 al23 colomon: thanks, I found that.
02:07 wayland76 http://en.wikipedia.org/wiki/​Fold_(higher-order_function)
02:08 wayland76 afk &
02:09 al23 Well, if so, the term "reduction" sounds quite confusing since the reduction is a right fold in other languages... But it makes sense since it's abount pre-defined operators and not about functions.
02:09 TimToady we're optimizing for usability by mere mortals here
02:10 TimToady and the substitution principle is very easy to explain
02:10 TimToady and if you want the fancy stuff, there are real function calls
02:10 al23 Yes,
02:10 al23 (2,3,4).reduce({$^a ** $^b})
02:11 al23 rakudo: (2,3,4).reduce({$^a ** $^b})
02:11 p6eval rakudo 6999e5:  ( no output )
02:11 al23 rakudo: say (2,3,4).reduce({$^a ** $^b})
02:11 p6eval rakudo 6999e5: OUTPUT«4096␤»
02:11 TimToady of course, one can also play games with reverse() and with [Rop] for reversed ops
02:11 al23 rakudo: say [**] (2,3,4)
02:11 p6eval rakudo 6999e5: OUTPUT«4096␤»
02:11 al23 So, Rakudo is wrong here, according to the spec.
02:12 TimToady rakudo: say 2 ** 3 ** 4
02:12 p6eval rakudo 6999e5: OUTPUT«2.41785163922926e+24␤»
02:12 TimToady yes
02:13 TimToady though if it had said 4096 for that, I'd've said it was (perhaps) doing [op] correctly :)
02:13 colomon rakudo: say (2,3,4).reducerev({$^a ** $^b})
02:13 p6eval rakudo 6999e5: OUTPUT«Method 'reducerev' not found for invocant of class 'List'␤»
02:14 TimToady rakudo: say [R**] reverse 2,3,4
02:14 p6eval rakudo 6999e5: OUTPUT«2.41785163922926e+24␤»
02:14 TimToady :)
02:15 TimToady there's your opposite fold
02:15 TimToady but yes, [**] is wrong in rakudo
02:15 TimToady should be right assoc
02:16 colomon Wait, now I'm totally confused.
02:16 TimToady rakudo: say infix:<**>(2,3,4)
02:16 p6eval rakudo 6999e5: OUTPUT«Statement not terminated properly at line 2, near ":<**>(2,3,"␤in Main (src/gen_setting.pm:3359)␤»
02:16 colomon According to the spec, [**] is right in rakudo.  It's the reduce function which is wrong, no?
02:17 TimToady [**] is not right, but ** is
02:17 TimToady [**] is supposed to obey the associativity of the ** operator, but it isn't
02:18 colomon ack, you're right.  clearly I should have gone to bed 15 minutes ago.
02:18 alester Are we at a point that I can build and install a rakudo?
02:19 TimToady that would depend on the definition of "I"
02:19 alester or is installation still manual?
02:19 alester I = I
02:19 TimToady I think that's still in the works
02:19 TimToady and may have some parrot deps
02:20 alester I want to start a Cool Perl 6 Thing Per Day (Or So) on Perlbuzz
02:20 alester I was reading thru Damian's Perl 6 talk packet in the SJC airport
02:20 alester and thinkin' a handful of those nuggets each week oughta get people goin' "Oh cool"
02:20 alester but I want to wait until we're at the point where we can do make && make install
02:21 alester for my own sanity, if nothing else.
02:21 misssingthepoint alester: that's a good idea, IMO :)
02:21 alester Which?
02:21 misssingthepoint CP6TPD
02:21 TimToady it's definitely front burner right now
02:21 alester well, I won't promise per-day. :-)
02:21 misssingthepoint alester: :)
02:21 alester It's tough enough remmebering to bathe!
02:22 al23 Maybe it's just because I'm using the functional languages, but I think that recursive definition of reduction is clear and unambiguous, while a kind of substitution model is confusing.
02:22 TimToady yes, well, we're all trying to underpromise except when we aren't :)
02:22 eternaleye_ joined #perl6
02:23 alester It'll be a Perl 6 advent calendar.
02:23 TimToady then don't think of [**] as a reduction, but as a shorthand.  use reduce &[**], @list for the real reduction
02:24 TimToady note that the [op] shorthand works for things that are "list associative" rather than left or right
02:25 TimToady and chained ops, where the meaning is not something you can propagate from recursion to recursion because of type mismatches
02:25 al23 Also, I'm sorry for my ignorance, but where can I find an explanation of the blocks with implicit params? Should I treat them just as poor man's lambdas? :-) (I'm aware of such things in Perl 5, like passing comparators to sort, but they are differ very much...)
02:25 TimToady so you can have [<] @list for monatonically increasing
02:25 TimToady well, true lambda is spelled -> in p6
02:26 TimToady and all the other blocks are defined in terms of that, so they're really all true lambdas in some sense
02:26 TimToady most of this will be in S04
02:28 TimToady the difference from Perl 5 is that sort's comparator in p5 hardwires the meanings of $a and $b, whereas in p6 it just naturally falls out of the def of $^a and $^b
02:28 al23 Yes, I see it.
02:28 TimToady 'course, generally in p6 you'll want to use just a single parameter as a key extractor
02:29 TimToady there are also ways of currying
02:29 TimToady so for instance you can often use the * Whatever to curry an ordinary operator
02:29 TimToady sort +*, @list will sort numerically
02:30 TimToady where +* is really just -> $key { +$key }
02:30 colomon BTW (don't know if anyone else mentioned/noticed this just now), there is a test for [**] in S03-operators/reduce-metaop.t, appropriately marked "rakudo todo".
02:31 TimToady thanks for checking that
02:32 al23 Well, thank you very much, I'll try to read all http://perlcabal.org/syn/
02:32 TimToady have the appropriate amount of fun
02:32 TimToady and feel free to note inconsistencies
02:33 TimToady only some of which are intentional :)
02:33 al23 Actually, I thought there are some nice informal tutorials on Perl 6, but I found most of them unclear or outdated.
02:34 misssingthepoint al23: http://perlgeek.de/blog-en/
02:34 TimToady most of them will not be pitched to someone coming from FP
02:35 al23 Actually, I'm using Perl 5 as well.
02:35 TimToady then http://perlgeek.de/blog-en/perl-5-to-6/ is good
02:36 TimToady more overview than completist though
02:36 al23 Thanks.
02:36 colomon rakudo: say (1, 2, 3).sort(+*)
02:37 p6eval rakudo 6999e5: OUTPUT«invoke() not implemented in class 'Float'␤in Main (/tmp/zbvsX3zOT2:2)␤»
02:38 misssingthepoint also
02:38 colomon rakudo: say sort +*, (1, 2, 3)
02:38 TimToady I'm not sure how to get the "lessons" in order though
02:38 p6eval rakudo 6999e5: OUTPUT«0123␤»
02:38 misssingthepoint rakudo: my @l = 1,2,3; say [<] @l; # what should this do?
02:39 p6eval rakudo 6999e5: OUTPUT«1␤»
02:39 TimToady al23: oh, it's the buttons on the left that are in order
02:39 TimToady misssingthepoint: it should return true
02:39 TimToady which it does
02:39 misssingthepoint ah
02:40 TimToady that is, same as 1 < 2 < 3 would return
02:40 misssingthepoint "is this list in increasing order"?
02:40 misssingthepoint AH
02:40 misssingthepoint *lightbulb*
02:40 TimToady "substitution" that we were discussing earlier
02:41 TimToady "as if" it were written the other way
02:41 TimToady but with an ordinary reduce, that doesn't work, because 1<2 return boolean, not 2
02:41 TimToady unless you play Icon tricks, which I don't like
02:42 misssingthepoint rakudo: say ~True
02:42 p6eval rakudo 6999e5: OUTPUT«1␤»
02:42 misssingthepoint :)
02:42 colomon TimToady: my two sort examples there: am I doing something wrong, or did I find two different ways for +* to fail?
02:43 TimToady rakudo: say True.name
02:43 p6eval rakudo 6999e5: OUTPUT«Method 'name' not found for invocant of class ''␤»
02:43 misssingthepoint TimToady: (never say someone's true name)
02:43 al23 Aha. But is "<" n-ary?
02:44 TimToady all such comparisons are n-ary together
02:44 TimToady 1 < $a == $b < 10
02:44 TimToady this is the "chained" precedence level in S03
02:45 al23 If I recall correctly, something 1 < 2 < 3 was not legal in Perl 5...
02:45 TimToady worse
02:45 TimToady it's legal, but doesn't mean what you want it to
02:45 al23 perl -e '1 < 2 < 3'
02:45 al23 syntax error at -e line 1, near "2 <"
02:45 al23 Execution of -e aborted due to compilation errors.
02:45 al23
02:47 TimToady okay, that happened since I last looked at it
02:47 TimToady but it's still a bad error message :)
02:47 al23 While 1 < (2 < 3) or (1 < 2) < 3 works.
02:47 TimToady probably declared it non-associative
02:47 TimToady and that's the best that yacc can do
02:48 TimToady but anyway, it's allowed and encouraged in P6
02:48 TimToady rakudo: say 1 < 8 > 3 < 10
02:48 p6eval rakudo 6999e5: OUTPUT«1␤»
02:49 TimToady rakudo: say 1 < 8 > 3 < 10 ~~ 9..11
02:49 p6eval rakudo 6999e5: OUTPUT«0␤»
02:49 TimToady ooh, that's a bug
02:49 TimToady rakudo: say 10 ~~ 9..11
02:49 p6eval rakudo 6999e5: OUTPUT«1␤»
02:51 KyleHa If there are any monks listening, be aware that the passwords for user accounts on the site were compromised.  Saint and janitor passwords were posted publicly.
02:51 misssingthepoint KyleHa: eek
02:52 KyleHa As far as I know, the hole's not closed, so if you go change your password, you should assume the  bad guys have the new one too.
02:52 misssingthepoint hmm
02:55 pmichaud I suspect that Rakudo doesn't know how to chain ~~
02:55 pmichaud rakudo:  say 1 < 10 ~~ 9..11
02:55 p6eval rakudo 6999e5: OUTPUT«0␤»
02:58 al23 And what is [\op]? Something like a'[i] := a[i] op a[i-1], i > 1? Why it is still called reduction"
02:58 al23 ?
02:58 al23 rakudo: [\+] (1,2,3,4,5,6)
02:58 p6eval rakudo 6999e5: OUTPUT«Syntax error at line 2, near "[\\+] (1,2,"␤in Main (src/gen_setting.pm:3359)␤»
02:58 al23 rakudo: say [\+] (1,2,3,4,5,6)
02:59 p6eval rakudo 6999e5: OUTPUT«say requires an argument at line 2, near " [\\+] (1,2"␤in Main (src/gen_setting.pm:2463)␤»
02:59 al23 pugs: say [\+] (1,2,3,4,5,6)
02:59 p6eval pugs: OUTPUT«136101521␤»
02:59 al23 pugs: [\+] (1,2,3,4,5,6)
02:59 p6eval pugs:  ( no output )
03:00 TimToady I believe it's called "scan" in Haskell
03:00 al23 My pugs says that [\+] (1,2,3,4,5,6) evaluates to (1, 3, 6, 10, 15, 21).
03:01 TimToady it's still a reduction, but return all the intermediate results
03:01 al23 :-)
03:02 TimToady and the results tend to look like a triangle when you put them on separate lines :)
03:02 TimToady so the [\ is a visual clue
03:04 al23 Yes, it works like scanl.
03:05 TimToady rakudo: *.say for 0,1 ... { $^a + $^b if $^a < 30 }
03:05 p6eval rakudo 6999e5:  ( no output )
03:05 TimToady rakudo: .say for 0,1 ... { $^a + $^b if $^a < 30 }
03:05 p6eval rakudo 6999e5: OUTPUT«0␤1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤»
03:06 TimToady eventually fibonacci will just be 0,1...&[+], but rakudo isn't lazy yet
03:10 al23 LOL. At least, there is a Parrot implementation of Unlambda. I hope it's complete.
03:11 damyan^ joined #perl6
03:13 al23 rakudo: sqrt -1
03:13 p6eval rakudo 6999e5:  ( no output )
03:13 al23 rakudo: say sqrt -1
03:13 p6eval rakudo 6999e5: OUTPUT«NaN␤»
03:13 al23 rakudo: say sqrt -1 + 0i
03:13 p6eval rakudo 6999e5: OUTPUT«0+1i␤»
03:13 al23 Oh.
03:14 TimToady been argued both ways
03:16 al23 Yes, it's nice.
03:17 ingy joined #perl6
03:18 LCamel joined #perl6
03:19 andreasg_ joined #perl6
03:21 lumi joined #perl6
03:22 s1n joined #perl6
03:31 dukeleto joined #perl6
04:22 PerlJam ping
04:23 PerlJam check out http://perlpilot.blogspot.com/
04:23 * PerlJam is finally getting with the blog
04:25 eternaleye joined #perl6
04:39 iblechbot joined #perl6
04:49 lumi joined #perl6
04:52 sri_kraih joined #perl6
04:55 cbk PerlJam, Nice web site, Looks like it's going to be very useful for me (bookmarking now)
04:56 PerlJam ah, someone else /is/ awake.
04:56 cbk yes working on a perl 6 regex
04:56 cbk <[\w+]>\.gif
04:57 cbk trying to get that to match a file name that may have _ - and numbers
04:57 cbk it's not working
04:57 PerlJam Hmm.  Does <ident> match _ and -  ?
04:58 cbk do I have to escape the . with \. or something?
04:58 mberends cbk: '.gif' is more readable
04:59 PerlJam What mberends said
04:59 cbk here is an example of what I'm looking for => SD_logo-50x50.gif
05:00 mberends cbk: try the \w+ without the <[ ]> around it
05:00 cbk .gif did not work for some reason
05:00 cbk ok..
05:00 PerlJam mberends: he won't get - that way.
05:01 mberends PerlJam: right, <ident> is better then
05:01 cbk what is <ident> ?
05:02 mberends cbk: a predefined character class, for identifiers
05:02 PerlJam It's a built-in assertion.  I'm not sure if it matches - yet though
05:03 cbk PerlJam, well I'm trying to keep it simple (and working)
05:04 cbk here is my line => SAN Chargers SanDiego 00 00 SD_logo-50x50.gif
05:04 cbk and my regex:
05:04 cbk if $line~~ /(<[a..zA..Z]>+\s)(<[a..zA..Z]>+\s)(<[a​..zA..Z]>+\s)(\d+\s)(\d+\s)(\w+\.gif)/ {
05:05 cbk $0 ..$5 are my setting vars but the last part is not matching up?
05:07 synth joined #perl6
05:07 PerlJam cbk: you want [\w|\-]+ '.gif'
05:07 PerlJam Why are you capturing the spaces after your numbers and such?
05:08 PerlJam or maybe you want to match a rule instead of a rx
05:08 cbk yes but I do a .trim to get rid of then :(
05:09 PerlJam if you don't capture them, there's no reason to do .trim
05:10 cbk PerlJam, well I wanted to start off simple and build up from there, (my regex foo is poor! I have read that intro to perl 6 regex many times now.)
05:11 PerlJam cbk: well, an intro isn't a tutorial and that's probably what you need instead :)
05:12 cbk PerlJam,  [\w|\-]+ '.gif' WORKED!!!! thanks!
05:12 PerlJam cbk: of course it did  :)
05:13 cbk :) whats the \-
05:13 cbk :) whats the \- mean
05:13 PerlJam \- matches a - character
05:14 PerlJam you have to put the \ in front of it because all non-alphanumerics are meta-syntactic
05:14 cbk ok so it like escaped with the \
05:14 cbk ok
05:14 cbk ok ok I got it now! Thanks
05:14 PerlJam you backwhack meta-syntax to make them literal and you backwhack literals to make them meta-syntactic
05:14 cbk ok
05:15 justatheory joined #perl6
05:15 PerlJam you really should move your ) such that they don't capture your whitespace.
05:16 cbk how
05:16 PerlJam and you might want to use \s+ instead of just \s to be a little more conservative
05:16 cbk ok
05:16 PerlJam (do you *know* that there will always be exactly one whitespace character?)
05:16 cbk yes
05:16 dukeleto joined #perl6
05:17 cbk the file is a config file that I make for the game
05:17 cbk will always be a space between vars. and each line is a obj
05:18 PerlJam here's an alternate way to match:  $line ~~  rule { (<[a..zA..Z]>+) (<[a..zA..Z]>+) (<[a..zA..Z]>+) (\d+) (\d+) ([\w|\-]+\.gif) }
05:19 cbk View data for NYG, which is Object number, 4:
05:19 cbk Giants
05:19 cbk NewYork
05:19 cbk 00
05:19 cbk 00
05:19 cbk NYG_logo-50x50.gif
05:19 cbk cool!
05:19 PerlJam I didn't put any anchors in because you didn't have any in your original, but you might want to consider that
05:20 cbk by anchors you mean like :'s or *'s
05:20 PerlJam I mean ^ and $
05:20 cbk I was using the space as a anchors
05:20 cbk ?
05:21 cbk anchors in the regex?
05:21 PerlJam that works for the interior parts but not the beginning and end.  your lines could look like this:  "lskdfalksdj SAN Chargers SanDiego 00 00 SD_logo-50x50.gif asldkfasdlkj" and youre regex will still match.
05:21 PerlJam (that may be a feature though :)
05:22 ihrd joined #perl6
05:22 cbk dont like the lskdfalksdj part but I had some thing like that at first but thought it looked bad.
05:23 PerlJam if you stick a ^ in front and a $ at the end of your regex, it precludes matching such extraneous stuff
05:23 cbk I used *** in the front and at the end
05:23 cbk ok
05:25 cbk PerlJam, Thanks you know I'll be checking out your site daily!
05:30 alester_ joined #perl6
05:34 cbk Could you do something like this => if DEBUG() say "Debug Code here..";  Where sub DEBUG() can return true and trigger the say block?
05:36 eternaleye joined #perl6
05:47 ihrd left #perl6
06:15 moritz_ good morning
06:15 misssingthepoint morning moritz_ :)
06:17 cbk morning
06:17 jauaor_ joined #perl6
06:18 misssingthepoint cbk: well, yes
06:18 eternaleye_ joined #perl6
06:18 misssingthepoint rakudo: sub DEBUG { return Bool::True }; if DEBUG() { say "debugging" }
06:19 p6eval rakudo 6999e5: OUTPUT«debugging␤»
06:29 cbk misssingthepoint, thanks this will help clean up the mess I call code :)
06:33 misssingthepoint no worries :)
06:37 moritz_ you can also put the conditional into the DEBUG sub
06:38 moritz_ sub DEBUG(*@a) { say "Debugging output: ",  @a if True }; DEBUG('foo')
06:38 eternaleye joined #perl6
06:42 moritz_ ha, a non-golfed Perl 6 version is shorter than a golfed Perl 5 version: http://www.perlmonks.org/?node_id=784139
06:45 cbk misssingthepoint, moritz_ I just did it like this: sub DEBUG {  if $debug > 0 { return Bool::True } else { return Bool::False} };
06:46 moritz_ you can write that shorter as sub DEBUG { $debug > 0 }
06:46 moritz_ the comparison returns a boolean already
06:47 xinming cbk: do remember that perl is expressive, People don't like that kind of "crap"   ;-)
06:48 cbk thats what thought but was putting the return block with "retrun true"  silly me :)
06:50 moritz_ I mean it's fine to write more, but I just don't want people getting the idea that you have to write so much in Perl
06:50 moritz_ after all, it's not Java ;-)
06:51 misssingthepoint lol, thank God for that
06:51 misssingthepoint :)
06:52 misssingthepoint moritz_++ for both things you just said. (helpful)
06:52 cbk I'm putting BOTH ways in with one commented out to show the different ways
06:54 mj41 joined #perl6
06:57 Su-Shee joined #perl6
06:57 Su-Shee good morning future. :)
07:00 moritz_ oh hai
07:02 Su-Shee I dreamt of rakudo releases tonight... this is not a good sign.. ;)
07:02 moritz_ or maybe it is ;-)
07:03 Su-Shee not really, if I really start to think about something more complex, I really lose sleep over it. :/
07:04 Su-Shee I'm the 4 hours sleep while writing thesis candidate. ;)
07:04 rfordinal joined #perl6
07:19 eternaleye_ joined #perl6
07:22 Matt-W I don't think that's a bad thing
07:22 Matt-W I think it's better than my tossing and turning trying to get comfortable with a bad shoulder and aching muscles all over
07:22 Matt-W Remind me why I started aikido again?
07:24 moritz_ because it was -Ofun?
07:25 Su-Shee (i know why I stick with yoga.. ;))
07:28 finanalyst joined #perl6
07:31 Su-Shee hm. i just realized, that due to rakudo I'm gonna skip moose and all this.
07:33 Matt-W moritz_: There is that. We did have a lot of fun last night
07:33 moritz_ I've been meaning to learn Moose for two years now, but haven't found the motivation so far :)
07:33 Matt-W I only heard about it a couple of months ago
07:34 Matt-W And since I'm unlikely to get it installed on the servers at work, let alone actually getting legal approval to use it, I'm just going to have to go straight to Perl 6
07:34 Su-Shee well I have to focus anyway and I just realized, that I'm mentally saying goodbye to p5.
07:35 Matt-W I'm already viewing it as a bit archaic
07:36 Matt-W Although it's remarkable what you can get Perl 5 to do
07:37 Matt-W It's the only language other than Haskell that I've seriously used with proper closures and things
07:37 Su-Shee that convinced me a few years back that perl is still the way to go
07:37 Su-Shee otherwise I would have probably gone ruby all the way. ;)
07:38 damyan joined #perl6
07:41 xomas_ joined #perl6
07:44 dakkar joined #perl6
07:45 Matt-W Well Ruby's got cool stuff
07:45 Matt-W But I never felt like it was quite right
07:45 Matt-W Bits of syntax just don't work for me
07:48 cosimo Matt-W: what you mean by "legal approval" ?
07:49 cosimo and good $morning to all
07:49 Matt-W cosimo: my employer are incredibly strict about getting formal approval for any piece of third party software we want to use
07:49 Matt-W cosimo: this includes CPAN modules
07:49 Su-Shee Matt-W: I want to cool stuff in rakudo.
07:49 Matt-W And it goes through the legal department, who see the letters 'GPL' and press 'reject'
07:50 Matt-W So you then have to scream at them for an hour before they 'remember' that GPLed compilers don't mean you have to GPL the stuff you compile with them
07:51 Matt-W They actually rejected GCC the other month
07:51 Matt-W and GNU Make
07:51 moritz_ wow.
07:55 cosimo Matt-W: that's sad
07:55 Matt-W yeah
07:56 Matt-W We're still trying to get approval to set up a dev system running Linux
07:56 Matt-W We've got customers who want to run one of our comms servers on Linux boxes they already have
07:56 Matt-W But we're still wrangling with the legal people to get the approval to even try the port
07:56 Matt-W Still, on the bright side, by the time we've got the Linux server, the porting work's going to seem easy...
07:56 cosimo Matt-W: is this a really big company?
07:57 Matt-W absolutely enormous
07:57 Matt-W we're in the top 40 brands in the world
07:57 Matt-W I think on the whole I prefer working somewhere smaller
07:58 * cosimo is curious now
07:59 * cosimo found matt's homepage :)
07:59 moritz_ URL?
08:00 Matt-W Yes and soon you will know which absurdly large company I work for
08:00 cosimo yes
08:00 cosimo cool, really, i'd love to know more about it... :)
08:01 Matt-W Pfft
08:01 Matt-W We've got some cool tech
08:01 Matt-W Some stuff that's so old and crusty it's a wonder it works at all
08:01 Matt-W And, fortunately, a collection of pretty clever people to sort it all out
08:02 Matt-W It is the clever people who make it all worthwhile
08:02 cosimo I see
08:04 Matt-W Sometimes we have to fix up code that really needs ripping out and redoing
08:04 Matt-W But we don't get the time to do that
08:04 Matt-W So we have to come up with creative ways to get it to work
08:05 Matt-W It makes the occasional new system design task much sweeter :)
08:05 cosimo I guess 99% of the programmers have do that :) did you see the source code for the Apollo lunar module?
08:05 Matt-W And yes, we do use Perl for internal test driver stuff mostly
08:05 Matt-W I didn't, but I imagine it's pretty horrible
08:10 cosimo IMHO is beautiful, but maybe they had the same problems :)
08:11 Matt-W maybe
08:11 Matt-W Our chief problem is that parts of the core codebase were written when the company which was eventually bought (three times) to turn into what I work for now was written a) in a hurry and b) in C++ by Java programmers
08:18 moritz_ it's probably the managers thinking "C++ and Java are so similar, and Java programmers are easier to hire, so let's pick those"
08:23 Matt-W I think it's mostly because the people they had were Java experts, but they realised they needed to use C++ for the server side
08:23 Matt-W This was before Java had a decent JIT
08:25 Su-Shee I'd love to understand more about benchmarking and c++, I've got a guy I'm fighting for 8 years now over his overly complicated web stuff written in c++ insisting on "perl's too slow"
08:25 Matt-W depends what you're doing!
08:25 Matt-W C++ can be slow
08:25 Matt-W In fact, C++ offers you numerous things that look like a good idea but are horribly slow
08:25 Matt-W C++0x should help with that though
08:26 * Matt-W can't wait for rvalue references and move constructors
08:26 Su-Shee well he is definetely doing everything as complicated and overly bureaucratic as possible. ;)
08:27 Su-Shee I should start ignore him.
08:28 Su-Shee *rotfl* this quote I just found: "You know, Perl. "It's like Java, only it lets you deliver on time and under budget."
08:29 Matt-W ...
08:29 Matt-W ...and it doesn't drive you mad with its arbitrary restrictions
08:29 Matt-W (except for not being able to share arrays between threads)
08:29 zamolxes joined #perl6
08:31 moritz_ that's why we need Perl 6 :-)
08:31 moritz_ less global state, more contextual variables, ligther "everything shared" threads
08:35 Matt-W and STM
08:35 Matt-W which for some thread workflows will be great
08:36 moritz_ we'll see how STM works out in practice
08:36 Su-Shee I'm a total java idiot, I never really got around it.
08:36 Su-Shee "stm"?
08:37 moritz_ Su-Shee: "software transactional memory"
08:37 fridim_ joined #perl6
08:37 Su-Shee "ah!" I have no idea what that means.
08:38 moritz_ the idea is that you don't do locking, but just execute your code...
08:38 moritz_ and at the end you check if another thread disturbed you
08:39 moritz_ and if yes, you let the VM roll back everything you did
08:39 moritz_ and maybe try again
08:45 moritz_ it's the latest silver bullet in concurrency programming, but there haven't been all that many really scalable implementations yet
08:45 masak joined #perl6
08:45 pugs_svn r27791 | bpetering++ | [misc/irclog] Finished nick filtering :)
08:45 masak good (late) morning, Perl 6 adventurers!
08:48 charsbar joined #perl6
08:49 rfordinal joined #perl6
08:49 desertm4x_ joined #perl6
08:49 moritz_ oh hai masak
08:50 masak I had so much fun tracking down the jnthn-bug yesterday night, that I don't really care that I'm up a bit later than desired today. :)
08:54 arejay joined #perl6
09:08 szabgab joined #perl6
09:15 Matt-W STM is clearly only applicable to particular types of threaded workflow
09:15 Matt-W we'll need other methods
09:26 jnthn o/
09:27 Matt-W o/ jnthn
09:28 * Matt-W has a sudden urge to program in Haskell
09:31 kimtaro joined #perl6
09:38 masak Matt-W: do it!
09:39 masak jnthn: morning.
09:39 masak jnthn: so, you said http://rt.perl.org/rt3/Tic​ket/Display.html?id=67992 would probably not be a biggie?
09:42 moritz_ this bug is exactly why I wish we had some kind of real-world application in the test suite
09:44 jnthn masak: should be easy fix, yeah
09:46 wayland76 We had a guy come through here a few months ago
09:46 wayland76 He was saying that STM is rubbish, and he wanted POSIX threads
09:47 wayland76 His reasoning was that the STM model being proposed was only good for co-operative multithreading
09:47 moritz_ I don't see what's wrong with co-operative multithreading
09:47 moritz_ as long as we offer other options too
09:48 masak lunch &
09:48 wayland76 I'd love to see the concurrency stuff come along, but I don't know enough about it to be able to help
09:49 wayland76 moritz_: I agree, but the assumption both of us work working with at the time was that there would be the One True Threading Model to bring them all and in the darkness bind them
09:49 wayland76 Or something :)
09:49 wayland76 Is anyone working on Sets.pm :)
09:50 Matt-W There's no such thing as one true threading model
09:50 Matt-W unless you just provide the bare-metal basics that allow the implementation of any other threading model
09:50 Matt-W which is barely a threading model at all
09:51 jnthn Heh. In that case the only primitive you really need is CAS. ;-)
09:52 * jnthn would love it if Parrot provided access to such a thing.
09:52 jnthn You can build all kinds of stuff out of that.
09:53 Matt-W yes
09:54 Matt-W but let's please provide something more than that at some point :)
09:58 * Su-Shee cuts her keyboard. *strike* another fellow hooked on perl 6.
10:00 donaldh joined #perl6
10:02 pmurias joined #perl6
10:03 pmurias Matt-W: what's horribly slow in C++?
10:05 jnthn Matt-W: Of, for certain.
10:06 Matt-W pmurias: passing large and complicated objects by value, of course :)
10:06 jnthn Matt-W: The point is that you can build a lot on top of it.
10:06 jnthn (And that we would.)
10:06 * jnthn would really like to see us invest in lock-free data structures.
10:06 jnthn Or invest some time looking into them.
10:06 wayland76 CAS = http://en.wikipedia.org/wi​ki/Computer_algebra_system   ???
10:07 Matt-W jnthn: yes, I think even if we do have something high level like STM, we need to also expose some concurrency primitives to help people build alternatives
10:09 wayland76 Is that what CAS is?
10:10 Matt-W no, CAS is check-and-set isn't it?
10:10 jnthn wayland76: http://en.wikipedia.org/wiki/Compare-and-swap
10:11 Matt-W it's an atomic operation which you can build all the ordinary threading stuff on top of
10:11 jnthn http://www.cl.cam.ac.uk/res​earch/srg/netos/lock-free/
10:12 * jnthn was lectured in concurrency by one of the guys working on that stuff
10:12 wayland76 I was having trouble seeing how a Computer Algebra System would help with threading :)
10:14 * Matt-W was lectured in concurrency by a lecturer who really seemed to find the dining philosophers problem as amusing as a large book of lolcats
10:14 Matt-W although this was before lolcats
10:15 * wayland76 does not recall being lectured in concurrency
10:15 wayland76 despite doing a Distributed Systems course :)
10:15 jnthn Yeah, I remember the days of my youth, when I'd see cats walking down the street captionless.
10:16 wayland76 Speaking of funny memes, has everyone seen http://www.youtube.com/watch?v=Tx1XIm6q4r4 ? (Potter Puppet Pals, the Mysterious Ticking Noise)
10:31 |Jedai| joined #perl6
10:35 pmurias Matt-W: does any one pass large objects by value?
10:36 pmurias * anyone
10:38 meppl joined #perl6
10:54 Front_slash joined #perl6
10:57 dalek grok: 2cb1f97 | (Hinrik Örn Sigurðsson)++ |  (2 files):
10:57 dalek grok: Forgot to check Pod::Parser version
10:57 dalek grok: review: http://github.com/hinrik/grok/commit/2c​b1f97732ccc951714ba661f2fe70793276b238
10:57 dalek grok: c8c05c2 | (Hinrik Örn Sigurðsson)++ |  (9 files):
10:57 dalek grok: Bump version to 0.18_02
10:57 dalek grok: review: http://github.com/hinrik/grok/commit/c8​c05c249fc13583e66ffda88625fa0f5aedb0e1
10:57 dalek grok: 5b818a6 | (Hinrik Örn Sigurðsson)++ |  (2 files):
10:57 dalek grok: Depend on Pod::Parser 1.36
10:57 dalek grok: Pod::Xhtml uses it, and versions prior to 1.36 don't recognize the
10:57 dalek grok: =encoding directive
10:57 dalek grok: review: http://github.com/hinrik/grok/commit/5b​818a6f5dbcf66493127b98fa3003d2d4b331a6
10:59 masak right, there's a #p6s meeting tonight.
11:01 Matt-W pmurias: It happens...
11:03 pmurias Matt-W: how did you manage to hurt yourself during aikido? you don't do sparring?
11:04 rfordinal joined #perl6
11:05 wayland76 I know a guy who in one day, did Muy Thai Kickboxing, tennis, and swing dancing, just fine, but then was turning while walking and did his knee :)
11:06 snearch joined #perl6
11:06 masak ouch.
11:18 pmurias is defining methods with eval specced anywhere?
11:18 masak pmurias: why would it need to be specced, apart from ordinary method definitions?
11:20 donaldh joined #perl6
11:20 pmurias masak: it just seemed strange to me
11:20 masak :)
11:21 masak rakudo: class A { submethod BUILD { eval 'method foo { say "OH HAI" }' } }; class B is A {}; B.new.foo
11:21 p6eval rakudo 6999e5:  ( no output )
11:21 masak rakudo: class A { submethod BUILD { eval 'method foo { say "OH HAI" }' } }; class B is A {}; B.new.foo; say "alive"
11:21 p6eval rakudo 6999e5:  ( no output )
11:21 masak gives "bus error" locally.
11:21 * masak submits rakudobug
11:23 jnthn Because it's essentially a back-door monkey patch.
11:23 masak oh, right. because it's done at run-time.
11:23 moritz_ a bus error is very similar to a segmentation fault, no?
11:23 masak anyway, I'm not saying it's right. I'm saying it's doing a bus error.
11:24 masak moritz_: so similar that I've had the difference explained to me and not understood it. :)
11:24 wayland76 A bus error is where you have a bus number of 1, and that person gets hit by a bus :)
11:25 wayland76 (bus number also known as truck number; used in eXtreme Programming circles)
11:25 * masak hasn't been that eXtreme yet
11:26 wayland76 Or maybe agile
11:26 wayland76 instead of eXtreme
11:26 jnthn If you were agile enoguh, you'd be able to get out of the way of the oncoming bus.
11:26 masak I'm way more limber now after a half year of swimming, that's for sure.
11:27 wayland76 For those missing it, http://everything2.com/index.pl?node_id=1543370
11:27 wayland76 Cool.  I have ultra-flexible shoulders because I sleep funny :)
11:27 wayland76 But my legs don't flex much
11:28 Su-Shee me can still stick her toe in her ear. good enough.
11:28 wayland76 (the link is for "truck number")
11:28 wayland76 I can get my toe to my forehead, but that seems to be about my limit
11:29 masak I picked up a screw from the floor with my foot yesterday. I felt very satisfied as a primate doing that.
11:29 wayland76 And I had to use my hands/arms to help me do that
11:30 pmurias Su-Shee: standing up? or does doing it while siting in front of the laptop counts?
11:30 Su-Shee pmurias: I can do both. yoga. :)
11:30 wayland76 That could be useful.  The place my computer is is in a different building than the place I eat/sleep/ablute/etc, so I don't go barefoot much, unfortunately
11:32 Su-Shee wayland76: luckily, notebooks dont have those nasty little screws anymore I used to set my naked foot on at night.. ;)
11:32 wayland76 Hmm.  It seems that standing up, I can get my toe to my ear, but not in it.
11:32 wayland76 Ouch!
11:32 wayland76 That's why I put mine on the bottom shelf that I can reach from my bed
11:35 masak today's discussion is calling up more interesting mental images than usual.
11:39 pmurias Su-Shee: i'm allowed to bend my back when doing the toe to the ear exercise?
11:44 colomon rakudo: say <1 2 10>.sort
11:44 p6eval rakudo 6999e5: OUTPUT«1102␤»
11:44 colomon rakudo: say <1 2 10>.sort(+*)
11:44 p6eval rakudo 6999e5: OUTPUT«invoke() not implemented in class 'Float'␤in Main (/tmp/Xn1IAm65XN:2)␤»
11:45 colomon rakudo: say sort +*, <1 2 10>
11:45 p6eval rakudo 6999e5: OUTPUT«01102␤»
11:45 masak o_O
11:45 masak rakudo: say (sort +*, <1 2 10>).perl
11:45 p6eval rakudo 6999e5: OUTPUT«[0, "1", "10", "2"]␤»
11:46 masak oh, the +* is taken to be part of the list sent in.
11:46 masak rakudo: say (<1 2 10>.sort({.int})).perl
11:46 p6eval rakudo 6999e5: OUTPUT«["1", "2", "10"]␤»
11:46 colomon but it's supposed to be shorthand for what you just did, yes?
11:47 colomon .* is more or less .int, I mean.
11:48 colomon At least, that's what TimToady said last night.  :)
11:48 masak I wouldn't know, I tend to stay away from the closure-creating magic of *
11:48 colomon (Well, he said it was -> $key { +$key }, but it's all the same idea.)
11:49 colomon rakudo: say (sort -> $key { +$key }, <1 2 10>).perl
11:49 p6eval rakudo 6999e5: OUTPUT«["1", "2", "10"]␤»
11:52 colomon Any notion where the test cases for something like +* would be?  I'm trying to figure out if I should file a bug report.
11:55 masak colomon: t/spec/S02-builtin_data_types/whatever.t
11:57 colomon masak++
12:01 masak @karma masak
12:01 lambdabot You have a karma of 271
12:01 masak @karma jnthn
12:01 lambdabot jnthn has a karma of 457
12:01 masak jnthn++ # many commits
12:02 masak oh wait, the jnthn nick doesn't get autokarma from commits, does it?
12:02 masak so all those karma points come from other things. that's even more impressive.
12:06 ejs joined #perl6
12:07 Matt-W pmurias: just general aches and pains from being rather poor at falling last night
12:08 payload joined #perl6
12:15 lisppaste3 colomon pasted "(potential) tests for +*" at http://paste.lisp.org/display/84369
12:15 colomon Do those look okay?
12:18 * masak thinks so
12:18 * Matt-W sighs with relief
12:18 Matt-W I just read the 'confusing list assignment tests'
12:19 Matt-W I was completely baffled, but TimToady's last post explained it all to my satisfaction
12:19 Matt-W hurrah!
12:21 jnthn masak: My Pugs commit bit is under jnthn
12:21 jnthn masak: But I guess my Rakudo commits aren't.
12:22 jnthn Oh, akshually, I think they are.
12:23 masak ah, ok.
12:24 Matt-W @karma Matt-W
12:24 lambdabot You have a karma of 12
12:24 Matt-W whee
12:30 jnthn IT'S A PIPE BOMB....YAAAAY!
12:31 masak I'm sorry?
12:32 jnthn Ah, wayland76 is the gone.
12:32 jnthn He posted a link to http://www.youtube.com/watch?v=Tx1XIm6q4r4 earlier on today, which I just watched.
12:35 * masak watches it too
12:35 masak yay!
12:37 pugs_svn r27792 | colomon++ | Add tests for +*
12:38 jauaor joined #perl6
12:39 ruoso joined #perl6
12:39 * jnthn deals with the masakticket.
12:40 ruoso ¡Hello!
12:41 jnthn oh hai, ruoso
12:41 masak ¡OH HAI!
12:42 ruoso what's up in the Perl 6 land?
12:42 jnthn Pipe bomb admiration, random bits of implementation progress.
12:42 masak oh? what implementation progess? :)
12:43 jnthn rakudo: class Foo { method ^bar($obj) { say 42 } }; Foo.new.bar; Foo.new.^bar
12:43 p6eval rakudo 6999e5: OUTPUT«42␤42␤»
12:43 jnthn Class methods for one.
12:44 * masak wants new things to punch until they blow up -- http://wondermark.com/520/
12:44 masak jnthn: wow, cool!
12:44 ruoso jnthn, you know that's a part of S12 I never really digested
12:44 jnthn ruoso: There's an easy-enough way to implement it.
12:44 ruoso jnthn, are you installing that method in the metaclass instance?
12:44 jnthn Right
12:45 jnthn I stick it in an anonymous role and mix it into the metaclass instance.
12:45 jnthn TimToady didn't have an immediate OH NOES at that approach.
12:45 jnthn And it builds trivially on existing primitives.
12:45 ruoso jnthn, but you're still using one metaclass instance for each type..
12:45 jnthn ?
12:45 jnthn You say that as if it's something you expect to change?
12:46 jnthn (I'm not expecting it to.)
12:46 ruoso it is possible to haev a single metaclass instance shared among several types
12:46 Matt-W jnthn: should that bar method be callable as Foo.^bar?
12:46 jnthn Matt-W: Yes.
12:46 colomon rakudo: say sort(&[<=>], <1 10 2 3>).perl
12:46 Matt-W excellent
12:46 p6eval rakudo 6999e5: OUTPUT«Statement not terminated properly at line 2, near "(&[<=>], <"␤in Main (src/gen_setting.pm:3359)␤»
12:47 jnthn Matt-W: You'd just better make sure it knows to take a parameter for the instance it's dealing with.
12:47 ruoso Matt-W, it could even be called as Foo.HOW.bar(Foo)
12:47 jnthn Right
12:47 masak colomon: that &[<==>] is not supported yet.
12:47 masak er, s/==/=/
12:47 Matt-W jnthn: naturally. I'm not sure I get what's different with a ^ method then.
12:47 * Matt-W looks at the spec
12:47 jnthn ruoso: I guess if you're sharing a single mtaclass instance over many times, the thing is going to end up shared.
12:47 colomon masak: I'd gathered as much from my experiments.
12:48 jnthn Matt-W: It's a method called on the metaclass.
12:48 masak colomon: feel free to file a TODO ticket to RT if you want.
12:48 ruoso jnthn, just to make sure people is aware of that
12:48 jnthn Matt-W: $foo.^methods for example is sugar for $foo.HOW.methods($foo)
12:48 Matt-W jnthn: yes, but defining them in a class called Foo inserts them into Foo's metaclass (as relating to the instance of it that exists to service Foo, presumably)?
12:48 Matt-W So then, what do you use them for?
12:49 jnthn Matt-W: They function as more traditional class methods.
12:49 jnthn Matt-W: That is, a method foo() { ... } may be called.
12:49 ruoso jnthn, except that they don't
12:49 jnthn On a non-istance.
12:49 ruoso jnthn, class methods usually don't require special syntax
12:49 ruoso jnthn, and this is really a meta-method
12:50 Matt-W the syntax for it is irrelevant
12:50 jnthn ruoso: Tell that to S12. ;-)
12:50 Matt-W Java class methods need special syntax anyway
12:50 jnthn Also, class methods often *do* need special syntax. Consider C#.
12:50 ruoso jnthn, I've been trying to :)
12:50 Matt-W jnthn: so what does a class method get as self? the metaclass instance?
12:50 ruoso Matt-W, yes
12:50 jnthn Matt-W: Correct
12:50 Matt-W aaah
12:50 Matt-W okay
12:50 Matt-W it becomes clearer
12:51 jnthn Plus the instance as the first parameter.
12:51 jnthn Thus why you need to take a $obj there.
12:51 ruoso the instance, meaning the class
12:51 jnthn Right, instance of the class.
12:51 ruoso since it's a "class" method
12:51 Matt-W if you wanted to do the kind of stuff you can do with static members in C++, you could do it with class methods and maybe sticking some extra attributes into the metaclass
12:51 ruoso Matt-W, that doesn't sound sane
12:51 Matt-W doesn't it?
12:52 jnthn S12 gives the example of an "our" variable.
12:52 Matt-W mmm package scope of course. Mustn't forget classes are still packages.
12:52 ruoso I really think S12 needs a patch there... method ^bar is not adding a method to the class, it's adding it to the meta-class
12:53 ruoso which is a completely different beast
12:53 ruoso and might have completely different side-effects
12:53 ruoso including making that same meta-method visible in other classes
12:53 Matt-W certainly S12 doesn't mention getting the instance as a parameter
12:54 Matt-W ruoso: I think it's not unreasonable to assume that if the compiler sees you adding metamethods, it'll ensure that the class which does it has its own instance of the metaclass
12:54 jnthn ruoso: The "making it visible in toher classes" doesn't happen in Rakudo.
12:54 jnthn ruoso: It really depends on the meta-class.
12:54 ruoso jnthn, doesn't happen in the default type system
12:54 jnthn ruoso: I don't think the spec justifies that assumption.
12:55 ruoso jnthn, the spec says you can have different type systems... that's the reason for having a metaclass
12:55 jnthn Oh for sure, but it also suggests that the default ClassHOW is not a singleton.
12:56 jnthn There are multiple mentions of "metaclass instance"
12:56 ruoso right... but either way, saying that "method ^bar" is a class method is simply wrong
12:56 Matt-W And if you're using a different type system, different semantics for certain things are desired, so there's no reason to exclude the possibility...
12:56 jnthn Alternately, you can associate a class method with the current metaclass instance,
12:56 ruoso Matt-W, I don't want to exclude it...
12:56 ruoso I just want it to be properly documented
12:56 jnthn Yes, you could remove the word "class" from there.
12:56 Matt-W jnthn: actually you probably should, it's not a helpful word there
12:56 Matt-W because it's still a method
12:56 jnthn I agree the word "class" in that sentence should go away
12:57 Matt-W and it should mention the parameters it'll get
12:57 jnthn "associate a method with the current metaclass instance"
12:57 Matt-W much better
12:57 jnthn Is probably fine though
12:57 Matt-W the section title is fine I think, it's a section on how to achieve things which behave like class methods from other languages
12:57 jnthn ruoso: Fine with removing the word "class" there?
12:57 ruoso jnthn, yewah
12:58 jnthn ruoso: OK. Plus as Matt-W suggests, note that you really should remember to take the current object?
12:58 jnthn As an argument?
12:58 jnthn (since .^ syntax passes it...)
12:59 ruoso the signature of the method gets an explicit ($metaclass: $class) in the beggining
12:59 Matt-W $class is the class object, rather than any particular instance of it?
13:00 jnthn rakudo: use Test; role R4 { has @!foo; method bar() { @!foo } }; class C5 does R4 { has $.baz; }; is C5.new().bar(), [], 'Composing an attribute into a class that already has one works';
13:00 ruoso $class as in $class.^method
13:00 p6eval rakudo 6999e5: OUTPUT«Null PMC access in type()␤in Main (/tmp/gk53YKk2ns:2)␤»
13:00 Matt-W ruoso: just checking I'd got it straight
13:00 jnthn ruoso: Gets that implicitly?
13:00 jnthn :-S
13:00 Matt-W talking these things through is usually a good way to find out if the documentation is good enough
13:00 ruoso jnthn, yeah...
13:01 jnthn That being provided implicitly is an interesting idea, but not suggested by curent spec.
13:01 ruoso jnthn, actually, it's implicitly called with that
13:01 jnthn Correct.
13:01 jnthn .^ does that.
13:01 ruoso but...
13:01 Matt-W that needs to be noted
13:02 ruoso when you do method foo { };
13:02 ruoso it creates an empty signature (with just the invocant)
13:03 ruoso when you create method ^foo {}
13:03 ruoso it needs to have the signature with the two element
13:03 ruoso otherwise it won't work
13:03 jnthn "won't work" in so far as "you need to write the signature yourself"?
13:03 Matt-W surely the invocant can remain implicit
13:04 ruoso well... you can explicitly ask for the complete signature
13:05 ruoso rakudo: class A { method ^b { 42 } }; say A.^b
13:05 p6eval rakudo 6999e5: OUTPUT«positional inside named args at position 2␤in method A::b (/tmp/X9Pwv6i03t:2)␤called from Main (/tmp/X9Pwv6i03t:2)␤»
13:05 pugs_svn r27793 | jnthn++ | [t/spec] Test for RT#7992.
13:06 dalek rakudo: 3910fce | jnthn++ | src/builtins/guts.pir:
13:06 dalek rakudo: Fix bug in role attribute composition introduced with fix for attribute ordering. Fixes RT#67992.
13:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​910fcef8dc6bac8e3e73820f3dfc16edd963f08
13:06 jnthn ruoso: I suspect that one should work as default signature should take a *@_?
13:07 ruoso jnthn, it should only take *@_ when you use placeholders
13:07 jnthn Ah
13:07 jnthn No signature is like ()
13:08 jnthn masak: Hopefully that commit fixes your Druid issue.
13:08 masak jnthn: many thanks. I'll try it immediately.
13:09 ruoso jnthn, the error for the code I tried could be "meta methods require an additional parameter"
13:09 meppl joined #perl6
13:09 ruoso jnthn, and that could happen at compile time
13:09 pugs_svn r27794 | jnthn++ | [spec] Remove the word 'class' from a sentence where it adds confusion to the meaning.
13:09 jnthn ruoso: Yes, we could try and detect that.
13:10 jnthn masak: Great. :-)
13:12 moritz_ you can still call it $obj.HOW.meth(),no?
13:13 PerlJam greetings #perl6
13:14 moritz_ oh hai PerlJam
13:14 Juerd In case people haven't heard yet - perlmonks password list was published
13:14 PerlJam Juerd: perlmonks--
13:14 ruoso moritz_, you need to send $obj as a positional
13:14 SmokeMachine joined #perl6
13:14 al23 joined #perl6
13:14 Juerd PerlJam: Definitely. I'm angry.
13:15 Juerd crypt() has been in perl forever.
13:15 ruoso Juerd, the hashes or in plain text?
13:15 Juerd ruoso: Very much plain text.
13:15 ruoso Juerd, gah
13:15 Juerd http://r00tsecurity.org/files/zf05.txt  has the list
13:15 Juerd For example, my password was "potstal"
13:16 al23 Hi! Did anybody found list reduction by n-ary functions (n > 2) useful?  Should it take missing elements to be undef or drop extra elements?
13:16 PerlJam Juerd: are the still vulnerable?  (Would changing my password make any difference?)
13:16 PerlJam s/the/they/
13:16 moritz_ al23: I think it should die
13:16 Juerd PerlJam: I haven't read any message about it being fixed.
13:17 PerlJam :-(
13:17 Juerd PerlJam: However, it'll still be useful to change it now even if they're still compromised. zf05.txt is static
13:17 al23 rakudo: (1..4).reduce({$^a + $^b + $^c})
13:17 p6eval rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce␤»
13:17 moritz_ oh wait
13:17 al23 rakudo: say (1..4).reduce({$^a + $^b + $^c})
13:17 p6eval rakudo 6999e5: OUTPUT«1 trailing item(s) in reduce␤6␤»
13:17 ruoso Juerd, is that the only list? my user doesn't seem to be ther
13:17 moritz_ we had a discussion of that with TimToady some time ago
13:17 moritz_ I think it was agreeed to drop and warn.
13:17 Juerd PerlJam: And of course, if you used the same password in several places, like I did, you must change it in the other places too.
13:17 al23 pugs: say (1..4).reduce({$^a + $^b + $^c})
13:17 p6eval pugs: OUTPUT«10␤»
13:18 Juerd ruoso: That's the published list. They have all passwords, whether published or not.
13:19 al23 moritz_: spec does mention n-ary reduction. But is it specified how it should treat extra elements?
13:19 PerlJam On a more positive note, for those that missed it last night ... I'm going to attempt to blog  :-)  See http://perlpilot.blogspot.com
13:19 * moritz_ is glad that they acquired only an old list with an old password of mine
13:20 moritz_ al23: it's agreed upon, not yet specced. But it should be in the spec
13:20 ruoso how old is the list?
13:20 moritz_ al23: so feel free to add it
13:20 moritz_ ruoso: April
13:20 PerlJam moritz_: I'm glad I used my most absolute throw away password
13:20 * masak is glad he wasn't registered in April
13:20 masak still perlmonks--
13:20 moritz_ it was an old database server that wasn't being updated anymore
13:20 Matt-W ouch
13:21 Matt-W that's really bad
13:21 al23 moritz_: Actually, I think n-ary reduction is useless and illogical.
13:21 PerlJam still ... passwords in plain text ...  What are we?  PHP folks?
13:21 Juerd 15:20 <@PerlJam> moritz_: I'm glad I used my most absolute throw away password
13:21 Juerd Same here.
13:21 Juerd But apparently I did use the same password on CPAN.
13:21 moritz_ al23: then don't use it.
13:21 Matt-W PerlJam: no, they know better.
13:21 skids_ joined #perl6
13:22 Juerd PerlJam: PHP also has crypt.
13:22 masak I hope some constructive blog posts come out of this.
13:22 Juerd I just hope everyone changes their passwords quick enough
13:22 pugs_svn r27795 | jnthn++ | [t/spec] Tweak, unfudge and extend some tests for method ^foo syntax.
13:23 jimmy_ joined #perl6
13:23 moritz_ PerlJam: did you already submit it to the ironman feed?
13:23 Juerd List has been public for almost a day now. More and more people read the passwords
13:24 PerlJam moritz_: I did not.
13:24 masak from the hack file: "These Perl guys are alright, just a little dumb apparently." -- my sentiments exactly.
13:24 moritz_ PerlJam: you should, then I don't have to follow your feed indivually
13:24 Juerd I'm beginning to think that maybe perlmonks should pre-emptively just block accounts
13:24 PerlJam moritz_: got a quick link to it?
13:24 Juerd Before the entire site is defaced (you can edit old posts forever)
13:25 PerlJam moritz_: nevermind, google was quick enough :)
13:30 hercynium joined #perl6
13:32 masak maybe I should make a blog post where I analyze those passwords (anonymized) using Perl 6...
13:33 masak something like "number of pwds containing only letters", "only numbers", "only lowercase letters" etc.
13:33 moritz_ masak: please do. Then there'll be at least one positive aspekt
13:33 moritz_ *aspect
13:33 masak it's a deal, then.
13:33 moritz_ mixing de and en isn't good :/
13:33 masak istn't gut. :)
13:34 Juerd My password is one of those ^<alpha>+$ ones
13:34 jnthn moritz_: Often it just ends up looking like English spelt more sanely. ;-)
13:35 moritz_ :-)
13:36 Matt-W german spelling is great
13:37 colomon PerlJam: lovely post on the Euler #52.
13:37 moritz_ no. Capitalizing all Nouns is reall a bad Idea
13:38 Matt-W That's not really spelling though
13:38 masak jnthn: Druid iz teh works again! \o/ jnthn++
13:38 jnthn masak++: Yay!
13:38 Matt-W That's just a typographic thing, the letters you use are still the same
13:38 Matt-W figuring out pronunciation from the letters is much easier in German
13:38 moritz_ it just took 70minutes on my machine (the Eluer #52 program)
13:39 moritz_ vs. 1.2 seconds in my Perl 5 version :/
13:39 jnthn omfg
13:39 PerlJam yeah.  rakudo is *slow*
13:39 pmichaud Good morning #perl6
13:39 colomon Typical, IME.
13:40 jnthn There's slow and there's glacial...
13:40 PerlJam colomon: thanks
13:40 jnthn pmichaud: morning
13:40 colomon I'm pretty sure I've got one good optimization for this Euler #52 program.
13:41 masak morning, pmichaud.
13:41 abra joined #perl6
13:42 moritz_ a good optimization is "don't check it unless chars($n*2) == chars($n*6)
13:42 adhoc joined #perl6
13:43 colomon thought that one was implied in the last code?
13:43 PerlJam That's what it does, yes.
13:43 moritz_ colomon: implied, but it's much faster to check first
13:43 colomon don't check unless $n is divisible by 3
13:44 PerlJam Benchmark!
13:44 PerlJam :)
13:44 * moritz_ benchmarks the chars() == comparison
13:45 moritz_ colomon: why does it have to be divisible by 3?
13:45 PerlJam colomon: I don't get it.  how does that help?
13:45 colomon 3*$n will be divisible by 3
13:46 colomon so its digits will also be divisible by 3, right
13:46 moritz_ oh.
13:46 moritz_ right
13:46 moritz_ I forgot the divisibility rules
13:46 colomon so the digits to any answer must be div by 3
13:46 pmichaud so one can do  $n += 3
13:46 PerlJam colomon: now blog about it!  :)
13:46 moritz_ right.
13:46 pmichaud and reduce the number of loops by 3
13:46 pmichaud (factor of 3)
13:47 pmichaud ...and maybe stick the example into perl6-examples repo
13:47 pmichaud (if it's not there already)
13:47 hoelzro joined #perl6
13:48 PerlJam maybe rakudo being so slow is a good thing.  Not only do we get the problems solved, but people spend time optimizing them to death so that they run in a reasonable time.
13:49 Matt-W then when rakudo is fast, they'll be incredibly quick
13:49 colomon any answer must have a 0 digit?  maybe -- trying to figure out how to leverage the 5*$n portion.
13:50 colomon but I'm also watching a ten-month-old, which makes thinking tricky.
13:50 moritz_ colomon: no, doesn't have to have a 0 digit, if $n is odd
13:51 colomon I'm getting confused because I keep thinking $n is also one of the sets of digits being compared.
13:52 colomon 2 * $n has to have a 0 or 5
13:52 moritz_ right
13:52 colomon because 5 * $n will end with one of those.
13:53 colomon but 2 * $n doesn't have to end with a 0 or a 5, so you can't rule out the 5, which is what I was trying to do above.
13:54 * PerlJam notes that there are 251 other problems to solve in Project Euler  :)
13:54 PerlJam (that's why I didn't spend too much time worrying about optimization actually)
13:55 colomon but optimization is fun!
13:55 PerlJam It's also a trap for the unwary
13:55 PerlJam ;)
13:55 moritz_ PerlJam: many of these are much harder, so it's nice to spend more time on optimizing those where it's easy :-)
13:56 * pmichaud works to catch up on backscroll
13:56 PerlJam There are some interesting graph-type problems that would be amenable to some sort of graphical output.
13:59 pugs_svn r27796 | jnthn++ | [t/spec] Tests for :tree option to .^parents, plus for Object.^parents.
14:01 dalek rakudo: 6ff39ce | jnthn++ | src/classes/ClassHOW.pir:
14:01 dalek rakudo: Implement :tree in .^parents; fix Object.^parents which for some crazy reason I once thought should return something other than an empty list.
14:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​ff39ce84614ca68d7860ffbd2efde1a5531b6b4
14:03 colomon Actually, is PerlJam's final Euler #52 correct?  shouldn't $n = $msg / 2 when it jumps ahead?
14:05 PerlJam colomon: be sure to post a comment when you find out I'm wrong :)
14:07 moritz_ the perl 5 script which I wrote back in the days[tm] printed out the same
14:07 colomon that's one of the tricky bits with this problem, I suspect -- you can get the right answer for the wrong reason
14:08 colomon I'm thinking this would be a nightmare of TDD.  :)
14:09 alester So who is working on "make install"?
14:09 alester Is anyone?
14:10 alester Can I pitch in there somehow?
14:10 pmichaud alester: I'm currently working on "make install"
14:10 pmichaud I have a patch or two to apply.  The work is in the "ins2" branch of github.
14:10 alester As soon as we have a "make install" released, I'm going to be doing a series of "cool Perl 6 thing of the day*" for Perlbuzz
14:10 alester * for varying values of "day"
14:11 PerlJam and a strawberry perl 6 can't be too far behind a working make install either
14:11 PerlJam ;)
14:11 pmichaud afaik, the only remaining issue is getting it to build properly with Sun's compiler
14:12 pmichaud particle++ reported yesterday tht it's working with msvc
14:12 alester is there anything you need from me, pmichaud ?
14:13 pmichaud just testing that it works on various platforms
14:13 pmichaud comments on it are helpful also (as in, does this work the way we expect?)
14:13 alester I don't think I ahve anything more "various" than we have already
14:13 alester ok
14:14 KyleHa joined #perl6
14:14 pmichaud TimToady++  # I _really_ like the new organization of perl6-projects.org
14:15 al23` joined #perl6
14:16 pmurias joined #perl6
14:20 jnthn Ooh, layout issues I spotted before are fixed too. Nice!
14:20 al23`` joined #perl6
14:21 nihiliad joined #perl6
14:21 zamolxes i wonder if the download button should be visible without a vertical scroll?
14:21 moritz_ for me the right column starts a few millimeters further down than the rest
14:22 SmokeMachine joined #perl6
14:22 jnthn moritz_: Now I look closely, I see that too
14:23 PerlJam what browsers are you guys using?  It looks fine to me on FF
14:23 jnthn PerlJam: Also FF
14:23 jnthn (3.0.12)
14:24 PerlJam same here
14:24 PerlJam on ubuntu
14:24 moritz_ ff 3.0.6
14:24 moritz_ (iceweasel on Debian)
14:24 colomon for me the right column starts very  noticeably further down than the rest -- looks like it is being offset by Camelia's wing sticking out above it.
14:24 colomon FF 3.5.1, BTW
14:25 jnthn lolie7
14:25 jnthn Typically, IE7 gets it wrong.
14:25 * ruoso glad that Perl 6 communication is becoming more and more gender-friendly...
14:25 jnthn Safari has the right column starting very noticably furtehr down too.
14:25 ruoso specially in a time when some other communities enforce sexism in such ugly ways
14:27 al23``` joined #perl6
14:28 [particle] moritz_: yes, on ff 3.5 i see the right column lower
14:28 [particle] er, colomon
14:28 [particle] sorry, too damned hot to sleep comfortably, i'm not all here
14:30 Su-Shee hm. that layout isn't supposed to look that way. ;)
14:30 * [particle] doesn't require scrolldown with 1280x1024 monitor
14:31 [particle] i think the download button might be better in the header, or as a horizontal bar above community/specification/compilers
14:31 Su-Shee (it was placed right in the middle of the center to not have to scroll.. ;)
14:32 [particle] but 900px monitors do need to scroll down
14:32 PerlJam that bit of vertical white space between the header and the other boxes bothers me.  Maybe a thin download box could work there.
14:32 [particle] pj: that's what i'm thinking
14:32 Su-Shee yeah because the blue box didn't have that much text in it when I started.
14:33 [particle] and eventually, it could include more than just one distro
14:33 [particle] there should be a comma after 'Perl programming language' in the header text
14:33 pmurias ruoso: how will we implement things like       return $prototype.bless($prototype.CREATE(), |@protoobjects, |%initialize);
14:34 pugs_svn r27797 | jnthn++ | [t/spec] Tests for .^attributes with the :tree option.
14:34 ejs1 joined #perl6
14:34 moritz_ [particle]: feel free to patch it
14:34 pmichaud I disagree about the comma.
14:34 jnthn Debatable.
14:35 PerlJam me too, it looks fine the way it is
14:35 jnthn It changes the meaning if you put a comma there.
14:35 [particle] it makes the meaning correct with the comma
14:35 [particle] Perl 6 is the next major version of the Perl programming language.
14:36 [particle] Perl 6 is currently being developed by a team of enthusiastic volunteers.
14:36 ruoso pmurias, you mean the capture composition
14:36 ruoso ?
14:37 pmichaud particle:  so is "the next major version of the Perl programming language"
14:37 [particle] there's no Foo, the next major version of the Perl programming language currently being developed by ruthless elves.
14:37 * PerlJam wonders if there's a term for bikeshedding punctuation ...  :)
14:37 pmichaud really?  I thought that was 5.12  :-P
14:38 * masak thinks the ruthless elves are doing a great job
14:38 pmurias ruoso: yes
14:38 dalek rakudo: b6f792c | jnthn++ | src/classes/ClassHOW.pir:
14:38 dalek rakudo: Implement :tree option for attribute introspection.
14:38 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​6f792c47eadead06a889002b5a3918df3b153f3
14:39 pmichaud does anyone else think that having "team of enthusiastic volunteers" as a link would be a good idea?  ;-)
14:39 ruoso pmurias, I started sketching something about it in the wiki some time ago
14:39 pmurias ruoso: btw what should i be working on now?
14:39 PerlJam pmichaud: is there a page that lists the team somewhere? or is that the corollary?
14:39 jnthn pmichaud: It depends what it points to. :-P
14:39 pmichaud PerlJam: that's the corollary
14:39 pmichaud I'm always a fan of showing the people involved in a project
14:39 ruoso pmurias, on getting ClassHOW.pm to compile
14:40 ruoso pmurias, we're still waiting on a TimToady's answer on the S11 issue
14:40 pmurias ClassHOW does a lot of things incorrectly
14:40 PerlJam pmichaud: do we each get little super-hero avatars next to our bios ?  :)
14:40 ruoso pmurias, but even when we fix the code, a lot of the features will be the same
14:40 pmichaud PerlJam: Perhaps.  Although the p5p BOF at OSCON was talking about merit badges.  :-)
14:41 pmurias do we need ($how: ....) or is using self enough?
14:42 pmurias ruoso: there is a lot of stuff in ClassHOW that could be rewritten in a much simpler way
14:42 ruoso pmurias, feel free to make such changes
14:42 pmurias perl6: my $foo = 1 if 0;say $foo;
14:42 p6eval elf 27797: OUTPUT«Global symbol "$foo" requires explicit package name at (eval 122) line 6.␤ at ./elf_h line 5881␤»
14:42 p6eval ..rakudo 3910fc: OUTPUT«Null PMC access in isa()␤in Main (/tmp/rItcVnISQp:2)␤»
14:42 p6eval ..pugs: OUTPUT«␤»
14:43 kidd_ joined #perl6
14:46 jferrero joined #perl6
14:49 pmurias ruoso: shouldn't bless be moved to Object?
14:49 ruoso pmurias, my idea is that only the HOW should use the REPR API
14:51 jnthn ruoso: That's something I'm aiming for also.
14:51 ruoso pmurias, http://www.perlfoundation.org/perl​6/index.cgi?smop_capture_expansion the sketches I mentioned
14:52 ruoso pmurias, maybe the native capture could provide a "capture expansion mode"
14:52 ruoso pmurias, but, actually, I think that notes are prior to the idea that a unflattened list is just a capture
14:53 ruoso which means that the native capture need to be able to expand inner captures when fetching the positionals
14:53 ruoso jnthn, are you using the .^!foo notation also?
14:54 PerlJam alester: your vim-perl email seems to be missing some words.  The second paragraph ends with "...to have the support files installed into your"  I can guess what's missing from that sentence, but I didn't know if maybe there was more that got truncated.
14:55 M_o_C joined #perl6
14:56 jnthn ruoso: No
14:56 jnthn ruoso: No current plans to adopt that.
14:56 ruoso jnthn, right... STD already parses it, fwiw
14:56 jnthn ruoso: But OTOH no immediate plans for making alternate representations work.
14:57 jnthn ruoso: I'm happy we're going to be able to now.
14:57 ruoso std: say $a.^!b
14:57 jnthn ruoso: Which I wasn't before.
14:57 p6eval std 27797: OUTPUT«Potential difficulties:␤  Variable $a is not predeclared at /tmp/E5vLvM648E line 1:␤------> [32msay $a[33m⏏[31m.^!b[0m␤ok 00:02 37m␤»
14:57 moritz_ std: 1.^!b
14:57 p6eval std 27797: OUTPUT«ok 00:02 36m␤»
14:57 ruoso jnthn, that's great... it's nice to see different efforts helping each other...
14:57 jimmy_ rakudo: say $a.^!b
14:58 p6eval rakudo b6f792: OUTPUT«Statement not terminated properly at line 2, near ".^!b"␤in Main (src/gen_setting.pm:3359)␤»
14:58 jnthn ruoso: If STD is parsing that too, then it doesn't look like such a crazy syntax.
14:58 alester PerlJam: yeah, I goofed when I sent it
14:58 ruoso jnthn, think of it as "meta-private-method"
14:59 jnthn ruoso: So I don't see why Rakudo wouldn't be able to adopt that syntax for calls to the representation too.
14:59 ruoso that'd be great
15:00 ruoso if we manage to sync the APIs too, it would the ideal world...
15:00 ruoso because it would mean we would be able to share HOW implementations
15:01 jnthn Sure, I'm just not sure the world is sufficiently ideal on that yet.
15:01 jnthn Our repr API is basically Parrot's vtable API.
15:02 zamolxes_ joined #perl6
15:02 jnthn Perhaps the best hope is that we may be able to do some name mapping in the .^! calls.
15:02 jnthn Or similar.
15:02 ruoso maybe we could change p6opaque to implement something closer to that
15:02 jnthn Maybe.
15:02 jnthn For now though, I think it's best put off until Rakudo is looking at supporting this stuff.
15:03 jnthn (Which will be a little bit away yet, I suspect.)
15:04 ruoso jnthn, is there a concise document on the vtable API?
15:04 pugs_svn r27798 | jnthn++ | [t/spec] Tests for :tree option for .^roles.
15:05 pmurias ruoso: shouldn't it be $candidate.^!does = [] instead of $candidate.^!does = ()?
15:06 jnthn ruoso: http://docs.parrot.org/parrot/lates​t/html/docs/pdds/pdd17_pmc.pod.html and see Vtable functions section.
15:06 jnthn ruoso: Though only a subset of those would be needed to make up the repr API.
15:06 ruoso pmurias, I'm not sure...
15:06 jnthn If it's meant to be a mutable array you're assigning there, I'd guess []
15:07 ruoso jnthn, ouch... that's a huge list
15:08 ruoso rakudo: my $a = (); $a.push(1);
15:08 p6eval rakudo b6f792: OUTPUT«Method 'push' not found for invocant of class 'Failure'␤»
15:08 jnthn ruoso: Sure, thus "subset". :-)
15:08 ruoso jnthn, :) I guess I'll wait you to compile that subset ;)
15:08 jnthn rakudo: my $a = []; $a.push(1);
15:08 p6eval rakudo b6f792:  ( no output )
15:09 jnthn ruoso: :-)
15:09 jnthn That's fine by me. :-)
15:09 ruoso pmurias, yeah... I think [] is ok
15:10 dalek rakudo: c4f0a93 | jnthn++ | src/classes/ClassHOW.pir:
15:10 dalek rakudo: [t/spec] Support :tree option for .^roles.
15:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​4f0a934417e7633bcb22f7718449d65be1e3179
15:10 icwiener joined #perl6
15:14 nihiliad joined #perl6
15:19 pmurias ruoso: BUILDALL in ClassHOW uses a context var, i don't know what for
15:20 ruoso pmurias, to initialize the attributes of each type in the hierarchy
15:20 donaldh joined #perl6
15:21 pmurias ruoso: what uses that variable
15:21 szabgab joined #perl6
15:22 ruoso pmurias, method BUILD in the object
15:26 * pmichaud finally catches up with backscroll
15:26 pmichaud (on #perl6)
15:27 jnthn quick everybody type loads!
15:27 jnthn ;-)
15:28 pugs_svn r27799 | jnthn++ | [t/spec] Tests for .rw and .readonly attribute introspection.
15:29 jnthn Whee. I think Rakudo's introspection capabilities are looking pretty good now. :-)
15:29 moritz_ aye
15:29 moritz_ now I just want to get the value of private attributes
15:30 moritz_ you can't write serialization without that.
15:30 ruoso std: class A { method b($object: *%initialize) { my $key = "a";  $object.::($*CLASS)!"$key" = %initialize{$key}; } };
15:30 p6eval std 27798: OUTPUT«ok 00:04 39m␤»
15:30 jimmy_ rakudo:class A { method b($object: *%initialize) { my $key = "a"; $object.::($*CLASS)!"$key" = %initialize{$key}; } };
15:30 jimmy_ rakudo: class A { method b($object: *%initialize) { my $key = "a"; $object.::($*CLASS)!"$key" = %initialize{$key}; } };
15:31 p6eval rakudo b6f792:  ( no output )
15:31 moritz_ $object.:: is bound to confuse rakudo
15:31 moritz_ I'm surprised it acutally parses
15:31 ruoso rakudo: class A { has $.a; method b($object: *%initialize) { my $key = "a"; say $object.::($*CLASS)!"$key"; } }; my $a = A.new; $a.a = 4; $a.b
15:32 p6eval rakudo b6f792: OUTPUT«Cannot assign to readonly variable.␤in Main (/tmp/gOpFwG9YzD:2)␤»
15:32 ruoso rakudo: class A { has $.a is rw; method b($object: *%initialize) { my $CLASS = "A"; my $key = "a"; say $object.::($CLASS)!"$key"; } }; my $a = A.new; $a.a = 4; $a.b
15:32 jnthn I'm surprised it parses too.
15:32 p6eval rakudo b6f792: OUTPUT«Method '::($CLASS)' not found for invocant of class 'A'␤»
15:32 ruoso heh
15:32 jnthn oh heh
15:32 cj_ joined #perl6
15:32 jnthn It parses it then stringififes. :-)
15:32 mkelly32 is there some equivalent to ruby's Object#public_methods?
15:32 jimmy_ ;)
15:33 jnthn mkelly32: I don't know Ruby well enough to know what that does.
15:33 moritz_ rakudo: say 3.methods.map({.name}).join: ", "
15:33 p6eval rakudo b6f792: OUTPUT«Method 'methods' not found for invocant of class 'Int'␤»
15:33 jnthn ^
15:33 moritz_ rakudo: say 3.^methods.map({.name}).join: ", "
15:33 p6eval rakudo b6f792: OUTPUT«pred, succ, WHICH, ACCEPTS, perl, Scalar, abs, Str, trim, chr, floor, rand, truncate, round, sort, rindex, sqrt, split, match, grep, words, values, can, lcfirst, srand, Complex, map, polar, cis, kv, samecase, log, min, capitalize, max, first, trans, flip, does, Int, p5chop,
15:33 p6eval ..lc, sub…
15:34 mkelly32 jnthn: http://ruby-doc.org/core/c​lasses/Object.html#M000365
15:34 moritz_ rakudo: say 3.^methods.join: ", "
15:34 p6eval rakudo b6f792: OUTPUT«succ, perl, ACCEPTS, WHICH, Scalar, 2, Str, pred, p5chop, lc, join, 1, can, lcfirst, roots, reduce, 1, trim, map, 1, cis, 1, 1, 1, min, rand, max, 1, bytes, 1, 1, 1, grep, 1, 1, uc, ceiling, p5chomp, unpolar, samecase, floor, 1, ord, round, flip, does, 1, split, 1, words,
15:34 p6eval ..srand, re…
15:34 jimmy_ rakudo: say '3'.^methods.map({.name}).join: ", "
15:34 p6eval rakudo b6f792: OUTPUT«pred, encode, succ, ACCEPTS, perl, WHICH, sprintf, Scalar, reverse, isa, ucfirst, kv, samecase, capitalize, fmt, bytes, flip, does, p5chop, lc, reduce, chr, :d, :e, :f, comb, floor, round, chop, split, match, words, can, lcfirst, uc, Complex, srand, keys, polar, map, cis, log,
15:34 p6eval ..subs…
15:34 jimmy_ rakudo: say "3".^methods.map({.name}).join: ", "
15:34 p6eval rakudo b6f792: OUTPUT«WHICH, perl, ACCEPTS, sprintf, Scalar, pred, encode, succ, min, capitalize, max, first, trans, flip, Int, does, p5chop, lc, subst, elems, abs, chomp, end, reduce, index, ceiling, p5chomp, :d, pairs, :e, :f, comb, unpolar, ord, chop, int, chars, roots, uc, reverse, keys, isa,
15:34 p6eval ..ucfirs…
15:34 moritz_ jimmy_: what are all these 1?
15:34 dalek rakudo: a48b31a | jnthn++ | src/ (3 files):
15:34 dalek rakudo: Implement .rw and .readonly for attribute introspection.
15:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​48b31a703d15a21489ebc3fd1cab5cac1f8dddc
15:34 ruoso rakudo: say 3.^methods(:local).map({.name}).join: ", "
15:34 moritz_ sorry, meant to ask jnthn
15:34 p6eval rakudo b6f792: OUTPUT«Str, pred, succ, WHICH, ACCEPTS, perl, abs, Scalar␤»
15:35 ruoso rakudo: say 3.4.^methods(:local).map({.name}).join: ", "
15:35 p6eval rakudo b6f792: OUTPUT«asec, cotanh, acotanh, sech, ACCEPTS, atan, asech, acos, tanh, asin, atanh, cosec, cosh, succ, acosh, perl, WHICH, cotan, atan2, Scalar, sec, tan, cos, sin, pred, acosec, sinh, asinh, cosech, acotan, acosech, Str␤»
15:35 jnthn mkelly32: Returns the list of public methods accessible to obj. # does that mean all the methods that can be called on it?
15:36 jnthn mkelly32: Then yes, .^methods
15:36 ruoso for the ones declared by it, .^methods(:local)
15:36 jimmy_ rakudo: say '3'.^methods.map({.name}).join: ", "
15:36 mkelly32 jnthn: yeah, ok. thanks.
15:36 p6eval rakudo b6f792: OUTPUT«WHICH, perl, ACCEPTS, sprintf, Scalar, pred, encode, succ, reduce, chr, :d, :e, :f, comb, floor, round, chop, split, match, words, can, lcfirst, uc, Complex, srand, keys, map, polar, cis, log, substr, min, max, pick, first, evalfile, trans, Int, join, subst, elems, abs, end,
15:36 p6eval ..chomp,…
15:36 jimmy_ rakudo: say '3'.^methods.map({.name}).join: ", "
15:36 p6eval rakudo b6f792: OUTPUT«pred, encode, succ, ACCEPTS, perl, WHICH, sprintf, Scalar, flip, does, chars, can, lcfirst, roots, Complex, map, cis, comb, log, min, max, bytes, chop, rindex, Int, values, abs, end, ceiling, p5chomp, keys, kv, unpolar, floor, ord, capitalize, pick, evalfile, round, int,
15:36 p6eval ..split, mat…
15:37 jimmy_ seems that the results are not the same, lazy list?
15:37 pmichaud rakudo:  say Num.^methods(:local).map({.name}).join: ", "
15:37 moritz_ hash keys/values I s soppose
15:37 p6eval rakudo b6f792: OUTPUT«acotanh, ACCEPTS, asech, pred, atanh, cosec, acosh, acosec, sinh, WHICH, cotan, cosech, atan2, acotan, sec, asec, cotanh, tan, sech, atan, cos, acos, sin, tanh, asin, cosh, succ, asinh, perl, acosech, Scalar, Str␤»
15:37 PerlJam jimmy_: sort is your friend
15:37 pmichaud that looks wrongish to me.
15:37 pmichaud I would expect many of those to be in Any.
15:38 jimmy_ I don't want to sort
15:38 moritz_ jimmy_: then don't expect a particular order
15:38 moritz_ pmichaud: we've had that discussion before :-)
15:38 pmichaud moritz_: sure, but there's been a spec change since then.
15:38 jimmy_ It looks like rand
15:39 moritz_ so, what's wrong about it?
15:39 TimToady why wouldnn't there be one in both Any and Num
15:39 jimmy_ rakudo: say '3'.^methods.map({.name})
15:39 pmichaud rakudo:  say "3.2".sin
15:39 p6eval rakudo b6f792:
15:39 p6eval ..OUTPUT«sprintfScalarpredencodesuccACCEPTSperlWH​ICHabselemschompendindexceilingtrimp5chomppairsun​polarordrandtruncatesortrindexsqrtintgrepvaluesch​arsrootsreverseisaucfirstkvsamecasecapitalizefmtb​ytesflipdoesp5choplcreducechr:d:e:fcombfloorround​chopsplitmatchwordscanlcfirstucsrandComplexkey…
15:39 p6eval rakudo b6f792: OUTPUT«Method 'sin' not found for invocant of class 'Str'␤»
15:39 TimToady the Any version just casting and calling the Num version
15:39 jimmy_ rakudo: say '3'.^methods
15:39 pmichaud TimToady: I'd be fine with that, yes.
15:39 p6eval rakudo b6f792:
15:39 p6eval ..OUTPUT«predencodesuccACCEPTSperlWHICHsprintfSca​larflipintdoessplitmatchwordssrandreverseisapolar​ucfirstcombfmtfirsttranschoprindexvaluessubstelem​schompindexkeyschrpairskvcapitalizepickevalfilep5​choplcjoincharscanlcfirstrootsComplexreducetrim:d​map:ecis:flogminrandtruncatemaxbytessortsqrtIn…
15:40 solarion joined #perl6
15:40 jimmy_ rakudo: say '3'.^methods.join: ", "
15:40 pmichaud TimToady: In general, is that how you think most of this should be done?  Defined in the appropriate class and then have Any cast+forward?
15:40 moritz_ pmichaud, TimToady: actually that makes re-dispatching much easier when you implement it for a new type
15:40 p6eval rakudo b6f792: OUTPUT«pred, encode, succ, perl, ACCEPTS, WHICH, sprintf, Scalar, trim, chr, floor, rand, 1, round, 1, 1, 1, split, 1, grep, words, values, can, lcfirst, 1, srand, map, 1, cis, kv, samecase, 1, min, capitalize, max, first, trans, flip, does, 1, p5chop, lc, 2, 1, 1, 1, 1, 1, reduce,
15:40 p6eval ..ceilin…
15:40 PerlJam so ... what *are* all those 1s ?
15:40 masak PerlJam: internal Parrot methods?
15:41 moritz_ then they shouldn't show up here.
15:41 pmichaud moritz_: I didn't follow that.
15:41 PerlJam masak: and why aren't they all 1s?  (There's a 2 in that last output)
15:41 pmichaud I suspect the 1's have to do with multis
15:42 moritz_ pmichaud: suppose you write a new math class, and want to define an abs() multi...
15:42 masak PerlJam: obviously an extra large internal method. :)
15:42 PerlJam masak: heh!
15:42 pmichaud Parrot multimethods stringify to the number of items in the method
15:42 moritz_ pmichaud: then you'll want that to re-dispatch to the Num abs() multi, not to the Any() multi...
15:43 pmichaud moritz_: I can buy that, yes.
15:43 arthur-_ joined #perl6
15:43 pmichaud anyway, I'm not for-or-against either approach, I just want to know what guideline to follow
15:43 gpm1982 joined #perl6
15:43 moritz_ and that guideline should be in the specs.
15:43 pmichaud if the Any methods should generally act as re-dispatchers, great.  We can put that in place.
15:44 pmichaud and I'll rewrite my talk slides :-)
15:44 pmichaud (the ones related to this issue, at any rate)
15:45 TimToady well, the current S32 specs place most of the actual definitions into Num etc
15:45 TimToady and the Any spec should list what it redistpatches separately, I suspect
15:45 pmichaud yes, but the S32 specs were doing that also when it was first decided that things should go in Any
15:46 gpm1982 left #perl6
15:46 TimToady yes, but some of them were documented Any at the time, and I specifically changed them back to Num etc. :)
15:46 pmichaud ahhhh
15:46 pmichaud okay, so redispatch is the guideline of the day, then?  ;-)
15:46 jauaor morning
15:46 TimToady is how I've been thinking of it all along :)
15:47 pmichaud okay.  I didn't catch that.
15:47 pmichaud We'll update Rakudo to match.
15:47 pmichaud (and my talk slides)
15:50 jnthn sorry, back, had phone call
15:50 pmichaud KyleHa: I see that there's a "tests available" message for RT #7992.... but RT #7992 isn't a rakudo/perl6 ticket.
15:50 KyleHa Typo, I'd guess.
15:51 moritz_ typo in the commit mess... what KyleHa said :-)
15:51 pmichaud unfortunately that means it went to the wrong ticket in RT :-)
15:51 jnthn moritz_: The 1 in there is probably instances of Parrot MultiSub hanging around, that stringify weirdly.
15:52 jnthn moritz_: I don't plan to fix it since they should become Perl6MultiSub in the end.
15:52 KyleHa Here it is:  http://dev.pugscode.org/changeset/27793
15:52 moritz_ jnthn: ok, thanks for the explanation
15:52 justatheory joined #perl6
15:52 KyleHa Yeah, 7992 was resolved 7 years ago.
15:53 jnthn moritz_: Or perhaps Parrot will decide to change there.
15:53 moritz_ it's just a spam ticket, so no worries
15:53 pmichaud rakudo:  multi foo() { };  multi foo($x) { };  say &foo;
15:53 p6eval rakudo a48b31: OUTPUT«foo␤»
15:54 pmichaud rakudo:  say '3'.^methods.grep({ .name ne $_ }).join: ", "
15:54 p6eval rakudo a48b31: OUTPUT«1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1␤»
15:54 KyleHa What's funny is that 67992 (the one jnthn intended) is also resolved.
15:54 pmichaud rakudo:  say '3'.^methods.grep({ .name ne $_ }).map({.name}).join: ", "
15:54 p6eval rakudo a48b31: OUTPUT«pick, evalfile, truncate, sort, rindex, sqrt, match, Complex, polar, log, Int, subst, elems, abs, end, chomp, index, :d, :e, :f, int, chars, substr␤»
15:54 jnthn pmichaud: Heh. And I poked .name into Parrot's MultiSub.
15:54 jnthn Which is evil.
15:55 jnthn But we poke stuff everywhere, so... ;-)
15:55 pmichaud right.
15:55 pmichaud but why is .polar defined on Str ?
15:55 pmichaud I suspect :local isn't.
15:55 pmichaud oh, I didn't say :local
15:55 pmichaud rakudo:  say '3'.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", "
15:55 * ruoso later &
15:55 p6eval rakudo a48b31: OUTPUT«␤»
15:56 pmichaud rakudo:  say (~'3').^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", "
15:56 p6eval rakudo a48b31: OUTPUT«␤»
15:56 pmichaud rakudo:  say 3.0.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", "
15:56 p6eval rakudo a48b31: OUTPUT«␤»
15:56 pmichaud oh well.
15:57 moritz_ rakudo:  say 3.^methods.grep({ .name ne $_ }).map({.name}).join: ", "
15:57 p6eval rakudo a48b31: OUTPUT«abs, truncate, sort, rindex, sqrt, int, chars, :d, :e, :f, match, Complex, polar, log, substr, pick, evalfile, Int, subst, elems, abs, chomp, end, index␤»
15:58 pmichaud those are the multi-methods that are written in PIR still.  :-)
15:58 moritz_ rakudo: 'a' ~~ /a/;  say $/.^methods(:local).grep({ .name ne $_ }).map({.name}).join: ", "
15:58 p6eval rakudo a48b31: OUTPUT«postcircumfix:[ ]␤»
16:00 jnthn Looks about correct.
16:00 PerlJam rakudo:  say 3.^methods.grep({ .name ne $_ }).map({.name}).uniq.join: ", "
16:00 p6eval rakudo a48b31: OUTPUT«abs, chars, Complex, log, rindex, Int, end, pick, evalfile, int, match, polar, :d, :e, :f, truncate, sort, sqrt, subst, elems, chomp, index, substr␤»
16:01 TimToady .oO(monkey poking)
16:01 TimToady or parrot poking in this case...
16:01 pmichaud these all look like good candidates for moving to rakudo's setting, fwiw :-)
16:01 masak reminds me of this t-shirt: http://store.engrish.com/letsholetshirt.html
16:01 PerlJam abs was duplicated.  why?
16:02 pmichaud maybe two abs?
16:02 pmichaud I dunno.
16:02 abra joined #perl6
16:02 pmichaud one from Any, one from Int, perhaps
16:02 masak one for positive numbers, and one for negative :)
16:03 pmichaud there's no :local there, so it gives them all (iiuc)
16:03 jnthn Heh, I implement introspection and people use it to find TODOs. :-)
16:03 PerlJam ah.  that's it.
16:03 jnthn Next we know, masak'll be using it as an advanced bug finding technique. ;-)
16:04 TimToady You are in a twisty maze of PMCs, all different.
16:05 Su-Shee left #perl6
16:07 * jnthn afk for a little bit
16:11 dalek rakudo: ce21ffe | pmichaud++ | docs/spectest-progress.csv:
16:11 dalek rakudo: spectest-progress.csv update: 423 files, 12048 passing, 8 failing
16:11 dalek rakudo: Failure summary:
16:11 dalek rakudo:     S12-enums/basic.rakudo aborted 2 test(s)
16:11 dalek rakudo:     S12-introspection/walk.t aborted 6 test(s)
16:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​e21ffe6dabf187613da17bbd1f447663c9d7091
16:30 Psyche^ joined #perl6
16:32 molaf joined #perl6
16:33 TimToady jnthn: actually, no signature is currently specced to mean (*@_, *%_), but I'm wondering if that's going to bite us long term
16:34 szabgab joined #perl6
16:38 TimToady if people expect no sig to default to (), it's gonna mess up their mmd somewhat
16:38 pmichaud I think we speculated that we might require methods to have a signature?
16:38 TimToady multis anyway
16:39 pmichaud it would be inconsistent with regex/token/rule, though.
16:39 TimToady it's a tough nut
16:39 pmichaud although, at the moment, PGE tends to treat regex as being (*%_)  and not (*@_, %*_)
16:40 pmichaud so perhaps method should default to ()
16:40 pmichaud (or, more precisely, default to  (*%_)
16:43 TimToady perhaps we could move a bit more toward assuming (*@_) in routines only if we see @_
16:44 TimToady so a bit more like a full-fledged placeholder
16:44 pmichaud that seems very reasonable.
16:45 pmichaud I do see a lot of folks (in examples and other places)   using  "sub foo { ... }"  in the sense of "no parameters"
16:45 TimToady yes, I think recent experience has taught us that this will be a perennial failure
16:46 TimToady so I think I'm okay with routines defaulting to () or (*@_) depending
16:46 moritz_ I think it's better to always default to ()
16:46 pmichaud S06 still says:
16:46 moritz_ so that declaration less dependent on the body of the routine
16:47 pmichaud A function containing placeholders may also refer to either C<@_>
16:47 pmichaud or C<%_> or both, each of which (if so used) will be added to the
16:47 pmichaud signature as a normal readonly slurpy pararmeter:
16:47 pmichaud { say $:what; warn "bad option: $_\n" for keys %_; }
16:47 pmichaud turns into
16:47 pmichaud -> :$what, *%_ { say $what; warn "bad option: $_\n" for keys %_; }
16:47 pmichaud we need to fix that.
16:47 moritz_ what about a magical signature?
16:47 moritz_ sub foo(*) means:
16:48 moritz_ 1) if there are placeholders or @_ present in the body of the sub, use the signature implied by that
16:48 moritz_ 2) otherwise imply ()
16:48 moritz_ and if there's no *, always assume ()
16:48 pmichaud moritz_: part of the purpose of having   sub foo { ... }   imply the   @_   was so that it would fit with p5 sub definitions
16:48 pmichaud i.e., without any additional syntax.
16:48 moritz_ pmichaud: I know
16:48 moritz_ but I don't like it ;-)
16:49 pmichaud I think that simply saying that @_ is a placeholder implying a signature works for me
16:49 moritz_ 99% of all subs I write are much better off with an explict signature
16:49 pmichaud in the same way that one can do:    sub foo { say $^a }   to mean    sub foo($a) { say $a }
16:49 moritz_ it just irks me that we don't see the signature by looking at the declaration
16:50 moritz_ so if a doc tool wants to extract the signature, it has to parse the whole body of the sub
16:50 hercynium joined #perl6
16:50 literal hm, why isn't @_ called @^_ ? :P
16:50 pmichaud for long subs, I agree.  For very short subs, an explicit parameter list might just be repetitious
16:50 moritz_ that's why I'd love some syntax that tells me "the signature as you see it is not complete"
16:50 pmichaud moritz:    sub foo #(*)  { ... }
16:51 pmichaud :-P
16:51 moritz_ anyway, my opinion isn't all that strong here
16:51 moritz_ I just wanted to voice it
16:51 moritz_ pmichaud: ;-)
16:51 pmichaud moritz++ # voicing opinions
16:51 Tene moritz_: using placeholders is forbidden in subs with an explicit sig
16:51 TimToady darn, was hoping for a fight...
16:51 Tene moritz_: so the lack of sig is what tells you that.
16:52 pmichaud lack of sig means "look for placeholders"  :-)
16:52 pmichaud if there aren't any placeholders, lack of sig means "programmer was too lazy to add ()"
16:52 Tene Although, how does this play into @_ meaning "the sig"?  If I declare a sig, does @_ hold nothing, or aliases to my positional params?
16:52 PerlJam moritz_: maybe we (the perl 6 community) need time to use these constructs to find out that you are right  :)
16:52 pmichaud Tene: interesting question.
16:52 TimToady std: sub foo ($a) { @_ }
16:53 p6eval std 27799: OUTPUT«Potential difficulties:␤  Variable @_ is not predeclared at /tmp/SeWjtuqmhZ line 1:␤------> [32msub foo ($a) { @_[33m⏏[31m }[0m␤ok 00:03 38m␤»
16:53 TimToady there you go
16:53 moritz_ std: sub foo { @_ }
16:53 TimToady the answer is "neither"
16:53 p6eval std 27799: OUTPUT«ok 00:02 37m␤»
16:53 literal std: sub foo () { @_ }
16:53 p6eval std 27799: OUTPUT«Potential difficulties:␤  Variable @_ is not predeclared at /tmp/HpSKCjblVb line 1:␤------> [32msub foo () { @_[33m⏏[31m }[0m␤ok 00:02 38m␤»
16:54 PerlJam TSa++  I don't understand him most of the time, but what I do understand makes sense :)
16:54 TimToady we'd have to change it to promote @_ to placeholder in the absence of sig
16:54 TimToady hmm
16:55 TimToady std: { @_ + $^a }
16:55 p6eval std 27799: OUTPUT«ok 00:02 37m␤»
16:55 TimToady whew
16:55 pmichaud std:  { @_ }
16:55 p6eval std 27799: OUTPUT«ok 00:02 37m␤»
16:56 TimToady unwhew
16:56 pmichaud std--
16:56 pmichaud (rakudo still makes the same mistakes too :-)
16:56 pmichaud what if we just said that @_ was a placeholder only for routines ?
16:56 pmichaud but not other types of blocks?
16:57 pmichaud too much "special case knowledge"?
16:57 TimToady I think it might be better to be consistent
16:57 Tene yes, too much, IMO
16:57 pmichaud Well, I'm wondering what "consistent" means in this case.
16:57 TimToady they can always say @OUTER::_ in a subblock
16:57 Tene hmm
16:57 pmichaud if @_ is always a placeholder, then not only can they say @OUTER::_ in a subblock, but they *must* do so.
16:58 Tene What about a context variable for the signature of the routing?
16:58 Tene $SIGNATURE
16:58 Tene oslt
16:58 PerlJam pmichaud: yuck
16:58 Tene then you get your alias for args there, and @_ can be the placeholder slurpy positional
16:58 pmichaud PerlJam: (yuck)  -- yes, I know, this is what caused us to say that @_ was placeholder only in the context of other placeholders
16:59 moritz_ so it should really be @^_ on first mention, and @_ in inner blocks
16:59 pmichaud ...and it has to be mentioned in the outermost block
16:59 moritz_ yes, it looks ugly. Yes, that's on purpose
16:59 moritz_ pmichaud: right.
16:59 moritz_ just like with other placeholders
17:00 pmichaud sub foo {  if $global { say @^_; } }     # doesn't work
17:00 moritz_ aye.
17:00 pmichaud perhaps having @_ be any sort of automatic placeholder is just asking to be too clever
17:01 pmichaud sub foo(*@_) { ... }    # unambiguous.
17:02 pmichaud the other problem I would have with @^_ is that it then becomes "special"
17:02 pmichaud unlike other @^x  placeholders.
17:02 pmichaud (because @^_ would be slurpy)
17:03 moritz_ @^*_ ;-)
17:03 lambdabot Unknown command, try @list
17:03 moritz_ pmichaud: good point
17:03 pmichaud also,   @^_  doesn't come at the end lexicographically :-)
17:03 pmichaud i.e.,   @^_ is before @^a  :-P
17:04 PerlJam Any syntax  that causes more questions to be asked than it does to be answered probably needs to be re-thought  ;)
17:04 pmichaud well, speaking purely from a dwim perspective
17:05 pmichaud if @_ is used in a block with placeholders, I'd want the @_ to be on the block having the placeholders
17:05 literal std: sub foo { @^args }
17:05 pmichaud if @_ is used in a block without placeholders, I want it to refer to the outer @_ (more)
17:05 p6eval std 27799: OUTPUT«ok 00:02 37m␤»
17:05 PerlJam pm: why? on that first statement
17:05 pmichaud if @_ is used in a routine that doesn't have an explicit signature, I'd want it to be a slurpy for that routine
17:06 pmichaud PerlJam:  for the first statement,  @_ becomes an easy way to say "and the rest"
17:06 pmichaud (thinking lisp-ishly)
17:06 pmichaud { do_something($^a, $^b, @_); }
17:07 moritz_ so let's rename it to ¢dr ;-)
17:08 PerlJam I was thinking @et_alia, but renaming it seems sound anyway :)
17:08 Tene my memory was that @_ was the slurpy positional placeholder, exactly the same as %_ is the slurpy named placeholder
17:08 pmichaud Tene: it was that at one time, yes.
17:09 Tene but no more?
17:09 pmichaud The problem with having @_ always mean "placeholder of current block" is that there's no easy way to get to the @_ of an outer scope.
17:09 pmichaud (short of always using OUTER)
17:09 TimToady a good indication that the outer block ought to have a real sig, I think
17:09 Tene Ah, right.
17:10 PerlJam { do_somthing($^a,$^b,@*) }   # It says slurpy to me :)
17:10 TimToady I think it comes down to how to prevent it from silently doing the wrong thing
17:10 PerlJam (and maybe in other contexts @_ and @* are the same thing)
17:11 pmichaud PerlJam: we get conflicts with the * twigil
17:11 TimToady can't have @* and @*foo
17:12 PerlJam okay ... why not?
17:12 moritz_ two slurpies never make sense
17:12 moritz_ two positional slurpies
17:12 moritz_ the first one takes up all positionals
17:13 pmichaud * in twigil position doesn't mean "slurpy"
17:13 pmichaud it means "contextual"
17:13 moritz_ sorry, I was confused
17:13 pmichaud right :-)
17:14 TimToady because looking ahead to see if it's \w is tacky
17:14 PerlJam i'm not confused but maybe my inner conceptual bindings are a little weaker in some areas as compared with others
17:14 moritz_ strawberries, blueberries and ice cream should lift my confusion ;-)
17:16 PerlJam I won't argue that because we have some "tackiness" in the language that it's okay to add another, but ... consider the idea wearing different clothes  (@- maybe?)
17:17 pmichaud PerlJam: how is that different from @_ ?
17:17 PerlJam It's the slurpy for implicit signatures
17:18 pmichaud I'm having trouble with the pronouns... what is "it" in this last case?
17:18 desertm4x joined #perl6
17:18 PerlJam @- is like @_ but only for the case where there are implicit signatures.
17:18 lambdabot Maybe you meant: . ? @ v
17:19 PerlJam (or pick your own syntax)
17:19 pmichaud Then I don't see the difference, given that @_ is already an "implicit placeholder"
17:19 PerlJam Hmm.
17:19 Tene obviously the slurpy placeholder twigil should be *̂
17:19 Tene Hmm.  that shoudl have been combining.
17:20 PerlJam @_ is an implicit placeholder when there is an explicit signature.
17:20 lambdabot Maybe you meant: . ? @ v
17:20 Tene .u  ̂
17:20 phenny U+0020 SPACE ( )
17:20 phenny U+0302 COMBINING CIRCUMFLEX ACCENT (◌̂)
17:21 PerlJam When there's an implicit signature, having an implicit placeholder causes syntactic grief when accessing @_ in outer scopes.
17:21 PerlJam right so far?
17:21 PerlJam (except that first statement could be more general)
17:23 pmichaud depends on what we mean by "implicit signature"
17:24 PerlJam { $^a } has an implicit signature of ($a)
17:24 pmichaud in that case, I'm not as worried about accessing the outer @_
17:24 pmichaud i.e., having to use OUTER:: in that case would be okay with me
17:24 PerlJam I think I'm missing something then.
17:24 pmichaud the tricky one is a block that doesn't have an implicit signature -- we want to make sure that   { @_ }   doesn't hide an outer @_
17:25 pmichaud s/that doesn't have an implicit signature//
17:25 pmichaud I'll rephrase
17:25 pmichaud in any block that has parameters (but not an explicit signature), I'd expect @_ to be a slurpy parameter of that block
17:26 pmichaud routines are somewhat exceptional, though.
17:26 pmichaud blocks that don't have any explicit parameters should not treat @_ as a slurpy, but should instead look to an outer-scoped @_
17:26 pmichaud so
17:27 PerlJam I have a question related to this though.  In the following is the result of the conditional bound to $^a?   if $x > 5 { say $^a }
17:27 pmichaud Yes.
17:27 Tene it has always seemed inconsistent to me that that's not the case for 'while', though.
17:27 PerlJam What's not the case?
17:27 TimToady why do you think it's not the case?
17:28 Tene oh, right, nm.
17:28 Tene I was confusing that with not being bound to $_
17:28 TimToady yes, requires more explicit decl
17:29 TimToady maybe we should define $^, @^ and %^ (sans identifier)
17:30 TimToady or maybe not :)
17:30 pmichaud ...but does that solve the problem?  I think not.
17:30 pmichaud we still have the issue of needing to see the slurpy from an inner block
17:30 TimToady I was thinking @_ would only be cognizant of routines, not blocks
17:30 pmichaud I'd be fine with that.
17:30 pmichaud It means we lose the  { $^a, @_ }   case, but I'm not sure it's a big loss
17:31 TimToady that'd be { $^a, @^ } instead
17:31 pmichaud right
17:31 pmichaud That seems like we're just adding more icky $&#^@#$ syntax
17:31 TimToady troo
17:32 PerlJam (that's also essentially what I was trying to advocate a minute ago, so that's two strikes against it :)
17:32 TimToady indeed
17:33 abra joined #perl6
17:33 TimToady maybe we should just say that things are just like they are right now, but under strict you can't omit a routine signature
17:34 TimToady and maybe add moritz's *
17:34 SmokeMachine joined #perl6
17:34 pmichaud That has some potential, yes.
17:35 TimToady so bare * in a sig would be short for *@_, *%_
17:35 pmichaud do we then require the ()'s for regex/token/rule ?
17:35 TimToady sub foo ($a, $b, $c, *)
17:35 moritz_ pmichaud: only for those with arguments
17:35 moritz_ s/arguments/parameters/
17:36 pmichaud moritz_: that would go against what TimToady just proposed, I think.
17:36 TimToady actually, if we do the *, we can just default to () maybe
17:36 clintongormley joined #perl6
17:36 pmichaud "under strict you can't omit a routine signature" implies to me that you always have to have the parens
17:36 TimToady so p5 mode would minimally be (*) under strict
17:37 TimToady the golfers will hate it
17:37 moritz_ they use -e, which isn't strict ;-)
17:37 zamolxes joined #perl6
17:38 moritz_ $a={...} is just as short as sub{...}
17:38 pmichaud personally, I somewhat like our current ability to omit the parens
17:38 PerlJam so ... methods too?  class A { method foo () { say "hi" } }
17:39 TimToady rakudo: my $a={...}; $a() # :P
17:39 p6eval rakudo ce21ff: OUTPUT«Can't return outside a routine␤in Main (/tmp/1hMphtwBOH:2)␤»
17:39 hoelzro joined #perl6
17:40 pmichaud I like being able to write     sub postfix:<!> { [*] 1..$^n }
17:40 TimToady well, the other play is to assume (*@_,*%_) only if they use them
17:40 pmichaud I like that too.
17:40 PerlJam magic!
17:40 PerlJam (but no more magical that $^a vars :)
17:40 pmichaud The only question is what scope applies to @_
17:41 pmichaud if we say that @_ applies to the block it is in, we get problems.
17:41 pmichaud If we say it applies to the routine, that's less problematic.
17:41 TimToady I think leave that the way it is with placeholders
17:41 pmichaud I agree.
17:41 pmichaud so @_ is a slurpy param for a block with placeholders
17:42 pmichaud and @_ is a slurpy param for a routine without a signature
17:42 TimToady otherwise slurpy for current routine if no sig, error otherwise
17:42 pmichaud that seems to cover it.
17:42 TimToady (unless explicitly declared @_, of course)
17:42 TimToady and that fixes the mmd issue with accidental unused *@_
17:43 pmichaud Yes.
17:43 TimToady which is what bugged me in the first palce
17:43 TimToady *place
17:43 pmichaud That works very well for me.
17:43 TimToady okay, let's go that route for now
17:45 TimToady .oO(now, how to make STD do that...)
17:45 colomon PerlJam: got #52 down to 15m22s.  :)
17:45 pmichaud afk -- being called to lunch
17:46 moritz_ colomon: 21m44.487s here :-)
17:46 PerlJam colomon: cool.  Are you going to blog about it?
17:47 colomon PerlJam: did already (on use.perl -- link in your comments).
17:47 PerlJam ah.
17:47 * PerlJam looks
17:50 hercynium_ joined #perl6
17:55 colomon moritz_: What optimizations did you use?
17:56 moritz_ colomon: increment in steps of 3, and check lengths first
17:57 pugs_svn r27800 | hinrik++ | [Text::SmartLinks] when looking for X and C tags, also look for << >>, <<< >>>, and «» variants
17:57 colomon moritz_: did you fix the issue with ignoring the possible $n from 50..100, 500..1000, etc?
17:58 literal re: the above commit, at what interval is Text::SmartLinks run?
17:58 moritz_ colomon: no
17:58 moritz_ literal: hourly, iirc
17:58 literal just in time then, I hope
17:58 colomon moritz_: that makes me feel better about the quality of my optimizations, then.  :)
17:59 moritz_ literal: if you need a sooner trigger, I could do that
17:59 pugs_svn r27801 | lwall++ | [S06] only add @_ and %_ to default sig if actually used in body
18:00 al23 joined #perl6
18:00 al23 join linux
18:00 al23 oops
18:00 al23 left #perl6
18:00 literal heh
18:01 literal I guess he meant to join #perl and #linux there
18:03 moritz_ 01 * * * * nice -n5 /home/agentzh/update-syn
18:03 moritz_ so hourly, but not quite at the full hour
18:03 literal it seems to have worked
18:04 literal fewer broken index entries
18:05 literal the urls to headings that contained formatting tags are still broken though
18:05 literal *fix fix fix*
18:05 pmichaud seems like one could ignore $n not beginning with a 1
18:06 moritz_ right
18:06 moritz_ that's what my length check does, but a bit slower but more generic ;-)
18:07 pmichaud where's the length check?
18:07 pmichaud (can I see code?)
18:07 moritz_ if chars(2*$n) == chars(6*$n) { ... }
18:07 colomon pmichaud: why?
18:08 pmichaud colomon: why what?
18:08 pmichaud why can one ignore $n not beginning with 1?
18:08 colomon yes.
18:08 moritz_ but it doesn't increment smartly if not ^1
18:08 pmichaud Because  $n * 6 for anything beginning with 2 or higher will have more digits
18:09 colomon not anything higher than 4.
18:09 pmichaud okay, 4
18:09 pmichaud agreed
18:09 colomon example: 51 * 2 = 102, 51 * 6 = 306
18:09 pmichaud increment smartly can just be    '1' ~ '0' x * ~ '2'
18:09 pmurias moritz_: re doc tool if you want to parse Perl you have to do it properly using the Perl grammar
18:09 colomon http://use.perl.org/~colomon/journal/39371
18:10 pmichaud or really   '5' ~ '0' x * ~ '1'
18:10 colomon is my code: my quick reckoning is that you need to look between 5 and 17, 50 and 170, etc.
18:10 moritz_ pmurias: yes, but the question is also: how much of the parse tree does the tool (or a human doing the same task) has to examine?
18:11 colomon (sorry, two thoughts got combined into one line in my last post.  The link is my solution, everything after the colon is my reasoning.)
18:11 pmichaud colomon: knowing that you're starting at '5', you can always figure out the exact number by appending zeroes and a 1
18:12 pmichaud i.e.,   the first number divisible by three that is after 5000 is 5001
18:12 pmichaud i.e.,   the first number divisible by three that is after 50000 is 50001
18:12 colomon ah, yes, good point.  much cleaner than my $n -= $n % 3 solution, though probably not faster...
18:13 pmichaud one can find the starting point as:
18:13 pmurias literal: do you mantain the perl6 vim syntax highlighting?
18:14 pmichaud for 0..* -> $zeroes { my $start = '5' ~ ('0' x $zeroes) ~ '1'; ... }
18:14 literal pmurias: alester does officially now, but yeah, I wrote pretty much all of it
18:14 literal pmurias: found a bug?
18:15 colomon pmichaud: Am I correct in thinking that the range :by modifier doesn't work yet?
18:16 pmichaud colomon: that's correct.  We don't have operator adverbs yet.
18:16 moritz_ and even if we had, the underlying Range object couldn't handle it
18:16 pmichaud oh, getting Range to handle it wouldn't be too hard.
18:16 colomon Shame, it would look lovely with this problem.  :)
18:17 pmichaud that might prompt me to add 'by' to the range constructor :-)
18:17 moritz_ rakudo: say Range.new(1, 4, :by(3))
18:17 p6eval rakudo ce21ff: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in method Range::true (src/gen_setting.pm:1671)␤called from Main (/tmp/ZfqnQ15PzG:2)␤»
18:17 moritz_ rakudo: say Range.new(1, 4, :by(3)).perl
18:17 p6eval rakudo ce21ff: OUTPUT«Range.new(from => undef, to => undef, by => 3, from_exclusive => Bool::False, to_exclusive => Bool::False)␤»
18:18 moritz_ rakudo: say Range.new(from => 1, to => 4, :by(3)).perl
18:18 p6eval rakudo ce21ff: OUTPUT«Range.new(from => 1, to => 4, by => 3, from_exclusive => Bool::False, to_exclusive => Bool::False)␤»
18:18 pmichaud rakudo:  say (1..5).perl
18:19 p6eval rakudo ce21ff: OUTPUT«1..5␤»
18:19 pmichaud huh?
18:19 pmichaud oh, is it the :by that does it?
18:19 pmichaud rakudo:  say Range.new(from => 1, to=>5).perl;
18:19 moritz_ I think it is, yes
18:19 p6eval rakudo ce21ff: OUTPUT«1..5␤»
18:19 pmichaud rakudo++
18:22 colomon Is it possible to "last" out of two loops at once?
18:22 moritz_ not in rakudo, afaict
18:22 literal yes, put a label on the outer loop and call last on it
18:23 literal oh, rakudo doesn't have labels?
18:23 moritz_ don't think so
18:23 pmichaud we don't do labels yet, no.
18:23 pmichaud sorry.
18:23 pmichaud we're still having to work out how to get those into PCT
18:23 pmurias literal: was thinking if it would be possible to have a perl plugin which would autodetect perl5/perl6
18:23 |Jedai| joined #perl6
18:23 colomon Is there an "exit" (a graceful "we're ending properly" "die")?
18:24 pmichaud I think exit() works, yes.
18:24 pmichaud rakudo:  exit(0);
18:24 p6eval rakudo ce21ff:  ( no output )
18:24 pmurias colomon: or do you want to throw a graceful death exception
18:24 pmichaud and of course one could do "return" and put the code in a sub
18:24 colomon I just want to end my program in the middle of the loop.
18:24 literal pmurias: I was tinkering with that the other day. To do it properly, one would have to patch filetype.vim in vim, which is a bit too eager in deciding that .pl/.pm files are Perl 5
18:24 colomon like the "return" in a sub, exactly.
18:25 literal pmurias: shouldn't be too hard, just haven't gotten around to it
18:25 ivast joined #perl6
18:25 pmurias i really had the vim ex dialect so i can't help here
18:26 pmurias s/had/hate/
18:26 literal pmurias: in the meantime, vim modelines will have to do :P
18:27 pugs_svn r27802 | hinrik++ | [Text::SmartLinks] fix typo affecting «» tags
18:30 moritz_ literal: I just updated /syn/ again
18:31 literal cool
18:37 lisppaste3 colomon pasted "Euler #52 updated" at http://paste.lisp.org/display/84391
18:37 colomon I like this version a lot better, though the exit is a little ugly, IMO.  (FIrst test currently running.)
18:38 moritz_ if you don't like exit, wrap the whole thing in a sub, an return
18:40 moritz_ rakudo: say 'l' ~~ /<lower>/
18:40 p6eval rakudo ce21ff: OUTPUT«l␤»
18:42 japhb joined #perl6
18:45 charsbar_ joined #perl6
18:49 masak joined #perl6
18:49 masak #p6s in 10.
18:52 hamez joined #perl6
18:53 masak hm, now (or yesterday) the Rakudo announcement is finally up on the use.perl.org homepage.
18:53 masak only took five days.
18:54 moritz_ masak: yesterday
18:54 masak yes.
18:55 cdarroch joined #perl6
19:01 masak http://use.perl.org/~masak/journal/39373
19:01 masak oh, and #p6s starts now.
19:06 colomon masak++ -- beaut-i-ful code.
19:07 masak colomon: thank you. it's just something I threw together. :P
19:08 moritz_ only thing that's missing is password length
19:09 masak true.
19:09 lisppaste3 moritz_ pasted "my password analyzing script" at http://paste.lisp.org/display/84397
19:09 colomon What's that @types>>.key?
19:10 masak colomon: the items in @types are pairs.
19:10 masak colomon: so I want an array with only the keys of those pairs.
19:10 colomon ah, and you can't use normal .keys because it's an array and not a hash.
19:11 moritz_ @foo>>.method calls .method on every item of @foo
19:11 moritz_ and returns the result
19:11 lambdabot Unknown command, try @list
19:11 moritz_ colomon: actually @array.keys exists, but it returns the indexes, not the keys of the stored items
19:11 colomon so it's essentially @types.map({.key})
19:11 colomon (I mean the first, not @array.keys.)
19:12 moritz_ yes, except that we don't guarantuee order of execution in >>.
19:12 masak we don't?
19:12 moritz_ no
19:13 masak um, do we care about the order the results are returned?
19:13 szabgab joined #perl6
19:13 moritz_ just that the order of the return values is kept
19:13 masak oh, good.
19:13 moritz_ but the compiler is free to parallelize >>. calls
19:13 masak so without side effects, there's no way to tell?
19:13 moritz_ right
19:14 colomon is there any actual advantage to that in this case?
19:14 PerlJam masak++  (just read use.perl)
19:14 moritz_ colomon: not for a 10 item list or so
19:15 masak colomon: no, and my bet is that Rakudo essentially does a .map right now.
19:15 pmichaud I wonder if Rakudo should randomize its >>. calls just so people don't rely on the sequential behavior.
19:15 masak :)
19:15 moritz_ colomon: but for example @a »+« @b could make linear algebra calculations faster
19:16 colomon In this case the order of the output is important (and not potentially modified by >>), right?
19:16 * jnthn back
19:16 jnthn colomon: It is allowed to compute it in any order.
19:16 jnthn colomon: But the output will be ordered.
19:16 jnthn where output = return values
19:17 jnthn If you start sticking impure stuff in then you're liable to be screwed.
19:17 pmichaud jnthn:  19:15 <pmichaud> I wonder if Rakudo should randomize its >>. calls just so people don't rely on the sequential behavior.
19:17 jnthn pmichaud: We could, I guess, though of course it costs.
19:18 pmichaud sure, but how often do we >>. ?
19:18 jnthn Heh.
19:18 masak hold on, how do lazy lists and >>. interact?
19:18 jnthn If you treat every language feature as "how often do we X" then you end up making everything slow... ;-)
19:18 PerlJam rakudo is so slow now that no one would notice the extra randomization time ;)
19:18 moritz_ it'll parallelize lazily ;-)
19:18 colomon yeah, laziness is what I was wondering about.
19:19 TimToady moritz_: I feel like my password with non-alnums plus *both* letters and digits didn't get proper recognition :)
19:19 colomon it seems like parallelization is not much of an advantage in this particular code.
19:19 antiphase joined #perl6
19:20 TimToady well, letters and digit
19:20 masak TimToady: guess you're talking to me and not moritz_ :)
19:20 moritz_ TimToady: should I blog about your password? :)
19:20 TimToady oh, sorry
19:20 masak moritz_: sometimes it feels like we're some kind of twin duo on this channel. :P
19:20 c1sung_ joined #perl6
19:21 moritz_ masak: aye, in this case I didn't mind because I also nopasted a password analyzer ;-)
19:21 masak you did? I missed that. :)
19:21 pmichaud masak+moritz:  pmurias and I have the same difficulty :)
19:21 moritz_ 21:09 < lisppaste3> moritz_ pasted "my password analyzing script" at  http://paste.lisp.org/display/84397
19:21 masak pmurias: yes, I know. :)
19:22 moritz_ pmichaud: you have even more starting letters in common
19:22 moritz_ also masak and Matt-W are hard to tab-complete
19:22 jnthn That's the one I mess up most often.
19:22 masak I never run into that problem.
19:22 TimToady but I maligned the wrong password analyzer :)
19:23 masak oh darn, I missed the lower-upper distinction as well!
19:23 PerlJam pmichaud: at least that *other* Patrick Michaud doesn't hang out here :)
19:23 pmichaud PerlJam: thanks for that.
19:23 moritz_ ;-)
19:26 jnthn OOh, a TSa most that I mostly agree with. :-)
19:26 jnthn s/most/post/
19:27 jnthn TimToady: To ahve my 2 cents...I really don't like:
19:27 jnthn my $capture := \($x++);
19:27 jnthn foo(|$capture); # increments $x
19:27 jnthn bar(|$capture); # increments $x again
19:27 jnthn Since if that generalizes to every call, well...ouch.
19:28 masak nod.
19:28 jnthn Unless foo($x++) would somehow be different.
19:28 jnthn But my understand was that this built a capture.
19:28 jnthn At least in principal.
19:28 TimToady yes, but 1-to-1 means it works as expected
19:28 pmichaud jnthn:  wouldn't you expect    foo($x++); bar($x++);    to increment $x twice?
19:28 jnthn pmichaud: Yes, I would.
19:28 TimToady $x isn't the Capture in question
19:29 pmichaud or am I missing the point?
19:29 jnthn pmichaud: My point was more that I'm confused about why forming a capture thunks the various things in it.
19:29 jnthn I'm guessing until you bind it.
19:30 jnthn OK, I can buy that if we use the capture straight away in a call, then *in theory* we don't have to bother thunking.
19:30 pmichaud that's been my (not entirely solid) expectation
19:30 jnthn Though I'm curious whether a receiving signature of sub foo(|$x) { } would cause issues in that it expects the thunks.
19:30 pmichaud yeah, that's the piece I haven't quite resolved yet.
19:30 pugs_svn r27803 | moritz++ | [t/spec/TODO] r27801 needs our attention
19:31 jnthn It's a bothersome piece, because we often don't statically know the signature of the thingy we're calling.
19:31 jnthn And even when we can, we currently have no optimization infrastructure to tell us.
19:31 masak jnthn: thanks again for fixing Druid so quickly!
19:32 pmichaud jnthn: I agree; thunks are a pain.
19:32 jnthn masak: How's Druid going? Does it do cool SVG renderings and stuff now?
19:32 masak I'll go offline now and play a bit with it. and maybe write some on my YAPC::EU presentation.
19:32 jnthn Have fun!
19:32 masak jnthn: very soon, it does.
19:32 masak \o/
19:32 jnthn Yay!
19:33 jnthn pmichaud: I'm not really seeing the benefit of captures having the thunk semantics.
19:33 jnthn What am I missing?
19:33 pmichaud I'm not arguing they're beneficial
19:33 jnthn Ah, OK. :-)
19:34 * jnthn re-targets his question at TimToady :-)
19:34 pmichaud I'd prefer to not thunk everything, correct.
19:34 pmichaud or lacking that, I'd like a clearer designation about when things get thunked and when they don't.
19:34 * moritz_ is sorry for starting that thread
19:35 * [particle] thunks moritz_
19:35 moritz_ ouch, that hurt.
19:35 molaf joined #perl6
19:35 * jnthn just thunk of a worse comment...but doesn't type it :-)
19:35 moritz_ is @a[0,] the same as @[0]?
19:35 pmichaud but yes, in the general case I'd like   \($foo.bar)  to capture the result of $foo.bar, and not capture a thunk of $foo.bar
19:36 pmichaud moritz_: I think so, yes.
19:36 moritz_ pmichaud: thanks. assign.t agrees, but I don't really trust that file.
19:36 jnthn pmichaud: I don't know what the latest is on the unify-captures-and-lists thing is either, but if that's still on the table this would see to affect list formation too, no?
19:36 pmichaud (assuming you meant "@a[0]")
19:36 moritz_ I meant, yes
19:37 pmichaud jnthn: as far as I know the specification is still out on lists, captures, and parcels
19:37 jnthn OK.
19:37 moritz_ there are no parcels in the spec.
19:37 pmichaud moritz_: I'm talking about the spec that has been sent to me from the future.
19:37 jnthn We get parcels for christmas? ;-)
19:38 moritz_ from teh future!
19:38 pmichaud yes.  In the infinite space of "many future worlds", I've able to determine that we're likely to pass through some spaces where the specification includes "parcels".
19:39 pmichaud However, there are still a huge number of possiblities within that subset, so I'm not entirely able to view the collapsed wave function yet.
19:39 * pmichaud completely mangles quantum physics in his metaphor.  :-)
19:39 PerlJam Do the parcels contain any cats?
19:39 payload joined #perl6
19:40 pmichaud PerlJam: I tried looking for some cats, but just found butterflies.
19:40 pmichaud There was a cat function, yes.
19:40 PerlJam maybe the butterflies ate the cats.
19:40 pmichaud I haven't found out if that cat function dies.
19:44 [particle] there's no quantum difference between cats and butterflies
19:45 moritz_ did you know that you can't properly define quantum mechanics without classical mechanic?
19:45 moritz_ because the process of measuring needs a classical observer
19:45 PerlJam and the world would be a tougher place without automechanics
19:53 icwiener joined #perl6
19:59 icwiener joined #perl6
20:03 moritz_ pmichaud: are you still planning (or even preparing) to make RPG-like job/hero descriptions for Perl 6 tasks?
20:05 sjohnson that'd be pretty neet
20:07 PerlJam heck, make a real RPG out of it  :)
20:11 lucs joined #perl6
20:19 moritz_ rakudo: sub l { 1, 2 }; my $x = l; say $x.perl
20:19 p6eval rakudo ce21ff: OUTPUT«[1, 2]␤»
20:20 ruoso joined #perl6
20:30 KyleHa Is there more documentation for the .signature method than the four lines my grep found?
20:30 pugs_svn r27804 | moritz++ | [t/spec] continue to fight with assign.t
20:30 moritz_ KyleHa: I'd be surprised
20:30 pugs_svn r27805 | moritz++ | [t/spec] don't WANT (in assign.t; still a few dozens left)
20:30 pugs_svn r27806 | moritz++ | [t/spec] get rid of some of the exzessive repeated tests
20:30 pugs_svn r27806 | moritz++ |
20:30 pugs_svn r27806 | moritz++ | There's really no point of testing that all of @a[0], @a[0-0], @a[$x++],
20:30 pugs_svn r27806 | moritz++ | @a[0/1] and @a[0*0] provide list contexts if every invocation of @a[...] does.
20:33 moritz_ assign.t is down from 309 to 251 tests
20:33 moritz_ still lots to clean up
20:33 jnthn \o/
20:33 jnthn moritz++
20:37 fridim_ joined #perl6
20:41 dukeleto joined #perl6
20:42 dukeleto_ joined #perl6
20:42 dukeleto_ joined #perl6
20:46 lumi_ joined #perl6
20:58 jnthn lolz...I just wondered what I'd done to make Rakudo go so slow running a file with 2 tests all of a sudden.
20:58 jnthn Turns out, I'd done a realclean. And thus was compling Test.pm each time. ;-)
20:58 hoelzro joined #perl6
21:00 moritz_ I wouldn't object to 'make' with default target building Test.pir too
21:01 Whiteknight joined #perl6
21:01 pmichaud I would prefer that it not build Test.pir immediately.
21:01 pmichaud many times I'm testing things that don't require Test.pm
21:01 jnthn pmichaud: Oh, I wasn't complaining. :-)
21:01 pmichaud that said, if we do switch "make" to automatically build Test.pir, then I'd probably switch my commands to be "make perl6"
21:02 jnthn pmichaud: Just had an "omg did i makez infinite loop in the startup" moment. :-)
21:02 pmichaud I've had that happen as well, where I forget to precompile Test.pm :-)
21:06 KyleHa What's the right way to compare a &sub.signature to an expected signature?
21:06 KyleHa is &sub.signature.perl, ':()', 'works but stinks';
21:07 jnthn BOOM SEGFAULT
21:07 jnthn oh,
21:07 jnthn I deref'd a null.
21:07 jnthn Silly me.
21:07 jnthn Generally testing with .perl is a fail.
21:08 jnthn rakudo: :()
21:08 p6eval rakudo ce21ff:  ( no output )
21:08 jnthn rakudo: use Test; sub foo() { }; is &foo.signature, :(), 'yes';
21:08 p6eval rakudo ce21ff: OUTPUT«error:imcc:syntax error, unexpected COMMA (',')␤   in file 'EVAL_25' line 61␤No applicable candidates found to dispatch to for 'is'␤in Main (/tmp/VW1Dbzou5x:2)␤»
21:08 jnthn youch!
21:09 KyleHa Yeah, that didn't work for me either.
21:09 jnthn I'm not sure we handle signature "literals" too well atm.
21:09 jnthn rakudo: :().perl.say
21:09 p6eval rakudo ce21ff: OUTPUT«The opcode 'descalarref_p' (descalarref<1>) was not found. Check the type and number of the arguments␤in Main (src/gen_setting.pm:3363)␤»
21:09 jnthn Yes. I think our siglits are FAIL.
21:10 KyleHa I guess I'll use .perl for now and then strip them out before I commit.
21:14 payload joined #perl6
21:22 hercynium joined #perl6
21:26 xinming_ joined #perl6
21:39 synth joined #perl6
21:42 maja joined #perl6
21:47 _Jedai_ joined #perl6
21:47 jnthn (ms vc++ debugger)++
22:07 hamez joined #perl6
22:07 lumi joined #perl6
22:13 M_o_C joined #perl6
22:20 Limbic_Region joined #perl6
22:28 alester We're all aware that Perlmonks' database is compromised and cleartext passwords are available on the net?   Just in case: http://twitter.com/perlbuzz/status/2915304452
22:31 Juerd It's been discussed here, yes.
22:31 Juerd I wonder why you would post a link to a specific tweet.
22:31 Juerd If you're copy/pasting anyway, why not just paste the tweet itself?
22:32 Juerd "Perlmonks.org has been hacked. Your cleartext passwords are now public. http://use.perl.org/~masak/journal/39373"
22:32 alester Juerd: I wonder why you would complain about it.
22:33 Juerd It's not a complaint
22:33 Tene Juerd: the traditional motivation to link to a tweet is so that people can notice "This person sometimes reports on topics that are relevant to me.  I'll follow this person"
22:33 Juerd I see
22:36 cls_bsd joined #perl6
22:55 dalek rakudo: 23a640d | jnthn++ |  (6 files):
22:55 dalek rakudo: Implement .^can returning something that as well as being useful in boolean context can also be invoked to run the first method that would be handed back or used as an iterator to get all methods that we could call. Also re-work a few things in P6Invocation to look more like it probably should have in the first place - I'd seen this coming anyway. One bug .^can on proto-objects + iteration does not yet work.
22:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​3a640d5e981f40af696a83a87055673a1273b72
22:55 dalek rakudo: 13ba2f3 | jnthn++ | perl6.pir:
22:55 dalek rakudo: Oops, forgot a file in the last commit.
22:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​3ba2f319293b4a77b84c52bc85c80f93bb3e859
22:55 pugs_svn r27807 | jnthn++ | [t/spec] Vastly improve the state of testing for .^can - from 2 tests to 22 tests.
22:55 jnthn Rakudo. The implementation that can.
22:57 japhb jnthn: Does this allow one to get the Code for an operator?
22:58 jnthn japhb: Can't you do that with &infix:<+> for example?
22:58 jnthn rakudo: say &infix:<+>(2,2)
22:58 p6eval rakudo ce21ff: OUTPUT«4␤»
22:58 japhb I'd love to do the final tweak to (masak? moritz?)'s multi-dispatch RPN calculator that instead of a given/when for the four different arithmetic ops can instead get the correct Code for the op by string name.
22:59 japhb I want essentially: &infix:<<$op>>
22:59 jnthn rakudo: for <+ - * /> -> $op { say eval("&infix:<$op>).(2,2) }
23:00 p6eval rakudo ce21ff: OUTPUT«Statement not terminated properly at line 2, near "(\"&infix:<"␤in Main (src/gen_setting.pm:3363)␤»
23:00 jnthn rakudo: for <+ - * /> -> $op { say eval("&infix:<$op>").(2,2) }
23:00 p6eval rakudo ce21ff: OUTPUT«4␤0␤4␤1␤»
23:00 jnthn I think with eval is the best Rakudo can manage so far.
23:00 japhb jnthn: ah so.
23:00 jnthn But as you can see, it works as a workaround.
23:00 jnthn But yes, there should I think be a Better Way eventually.
23:01 jnthn std: &infix:<<$op>>
23:01 p6eval std 27806:  ( no output )
23:01 jnthn std?
23:01 jnthn std: &infix:<<$op>>
23:01 p6eval std 27806:  ( no output )
23:01 jnthn std: 42
23:01 p6eval std 27806: OUTPUT«ok 00:02 36m␤»
23:01 jnthn std: &infix:<<$op>>
23:01 p6eval std 27806:  ( no output )
23:01 jnthn Very odd.
23:01 jnthn std: &infix:<+>
23:01 japhb stdbug?
23:02 p6eval std 27806: OUTPUT«ok 00:03 53m␤»
23:02 jnthn I dunno if it's bug or overloaded sever
23:02 jnthn std: &infix:<<+>>
23:02 p6eval std 27806:  ( no output )
23:02 jnthn Hmm
23:02 jnthn There is some pattern to the fail...
23:02 japhb Only single brackets supported?
23:02 jnthn TimToady: When you backlog next, see above...
23:03 jnthn japhb: I'm not sure whether what you suggested is the right syntax. My Evil Plan was to feed it to std and see if it complained about $op not being pre-declared. :-)
23:03 jnthn (In which case it's clearly trying to interpolate it, suggesting it was the right syntax)
23:03 japhb :-)
23:03 jnthn std: &infix:<$op>
23:03 p6eval std 27806: OUTPUT«ok 00:03 53m␤»
23:04 jnthn See, it's treating it literal there, since it doesn't complain. But that's what I expected.
23:04 jnthn std: &infix:{$op}
23:04 p6eval std 27807: OUTPUT«Potential difficulties:␤  Variable $op is not predeclared at /tmp/u0s7OUsDWU line 1:␤------> [32m&infix:{$op[33m⏏[31m}[0m␤ok 00:03 54m␤»
23:04 jnthn Ah, that one it likes more.
23:04 jnthn std: &infix:<<$op>>
23:04 jnthn It's that one that seems to upset it.
23:04 p6eval std 27807: OUTPUT«Potential difficulties:␤  Variable $op is not predeclared at /tmp/KPX07iG8Jr line 1:␤------> [32m&infix:<<$op[33m⏏[31m>>[0m␤ok 00:05 55m␤»
23:04 jnthn oh no
23:04 jnthn it works now.
23:04 jnthn huh
23:05 jnthn ...guess server was just a tad overloaded.
23:05 jnthn On the timeout caught it.
23:05 jnthn s/On/And/
23:08 japhb rakudo: my $op = '+'; say &infix:{$op}(2, 2)
23:08 p6eval rakudo ce21ff: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (/tmp/fK901CKmSk:2)␤»
23:09 japhb Wheeee
23:11 jnthn I wonder what that compiles down to.
23:12 jnthn ah, nothing sensible.
23:13 jnthn (literally looks up 'infix:{$op}' in the namespace)
23:13 jnthn Feel free to file a ticket. I may be able to fix that up.
23:13 jnthn But not tonight.
23:16 dukeleto joined #perl6
23:19 stepnem joined #perl6
23:21 japhb rakudobug?
23:21 jnthn japhb: Yes
23:21 japhb jnthn: I was trying to get the email address.  :-)
23:22 japhb ENOBOT I guess
23:24 jnthn oh, channel fail ;-)
23:25 ihrd joined #perl6
23:32 xinming joined #perl6
23:34 felipe joined #perl6
23:51 dukeleto joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs