Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-08-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 jaldhar joined #perl6
00:00 quietfanatic The thing is it's not obvious whether positive should be right or left.
00:00 TimToady that's one of the things Perl 6 can't do--fix your comments
00:00 sjohnson hehe
00:01 TimToady it's obvious if you consider shift to be more natural than unshift
00:02 sjohnson rakudo: say <ART2 BIO1 BIO3>.rotate(1); # a statement will be executed
00:02 p6eval rakudo 0d4fe0: OUTPUT«BIO1BIO3ART2␤»
00:03 TimToady actually, by the time it gets to the comment, it's already done it :P
00:03 TimToady (not really)
00:03 quietfanatic It's the parser that sees the comment
00:03 quietfanatic yeah
00:04 sjohnson just had to clean up my act there
00:05 * jnthn gains a 64-bit Linux box to test Rakudo on too
00:05 TimToady quick, rewrite all the numeric code to use rat64s
00:06 jnthn Can't. Too tired from screwing with mail server migration. :-P
00:07 * jnthn was going to send a test mail to make sure it worked on his mail accounts...only to find that a spam got there first. :-/
00:08 jnthn meh. make spectest runs a bunch faster on this box too
00:12 Limbic_Region oh just what we need, an even more productive jnthn
00:12 jnthn :-P
00:13 jnthn oh
00:13 jnthn Probably because I never got parallel testing running locally
00:13 jnthn And it probably works out of the box here.
00:13 Limbic_Region were you on a winblows box before?
00:14 * Limbic_Region wrote a hack for the pugs harness using Parallel::ForkManager to get it running in parallel there
00:33 jnthn Limbic_Region: I still am, I just got a Linux box in a data center to run various things on that I like remote access to wherever I am.
00:45 carlin joined #perl6
00:57 pugs_svn r28075 | lwall++ | [STD] don't complain about ?: unless there's a : before the next ;
00:57 pugs_svn r28075 | [STD] don't guess on suspicion of two terms in a row, just check it already.
01:05 TimToady gah, now I'll have to remember to put a blank line first to keep my [STD]'s lined up...
01:12 lisppaste3 colomon pasted "DRY-violating spectests?" at http://paste.lisp.org/display/86106
01:12 colomon When I was messing around with Any.sin today, I stumbled across a scad of tests that look like this in trig.t.
01:13 colomon All the repetition makes my teeth hurt.
01:14 colomon And it's not testing a lot of cases.
01:18 lisppaste3 colomon annotated #86106 "Maybe a better approach?" at http://paste.lisp.org/display/86106#1
01:19 colomon (I may have the hash creation syntax mucked up, but that's just a matter of running it through rakudo and seeing what works.)
01:20 colomon The big advantage of doing it this way is it is vastly easier to add additional tests -- what happens if you're not in the principle domain of sin.  Does $x.sin work like sin($x)?  Etc.
01:22 colomon Does that seem reasonable?  I'm very new to Perl testing, and may still be missing nuances...
01:31 TimToady it's easier to fudge out individual tests when they're not table driven, is one consideration
01:31 TimToady probably not important in this case
01:31 colomon Yeah, it would be very weird to have sin work except for 180 degrees, or something like that.
01:35 colomon rakudo: say sin(3);
01:36 p6eval rakudo 0d4fe0: OUTPUT«0.141120008059867␤»
01:36 colomon rakudo: say sin("3");
01:36 p6eval rakudo 0d4fe0: OUTPUT«Return value type check failed; expected Num, but got Str␤in method Any::!to-radians (src/gen_setting.pm:371)␤called from method Num::sin (src/gen_setting.pm:1382)␤called from Main (/tmp/w0LtkNa5n3:2)␤»
01:38 pugs_svn r28076 | lwall++ | [irclog] link camelia to perl6.org now
01:40 Trey_ joined #perl6
01:43 ssandv joined #perl6
01:44 sjohnson happy toady
01:48 lisppaste3 colomon annotated #86106 "Working full rewritten sin test plus more" at http://paste.lisp.org/display/86106#2
01:48 jnthn night folks
01:49 colomon That's the full sin tests from trig.t in less than half the lines, with additional tests for -360 to 0 and 360 to 720 added.
01:51 sjohnson see ya jnthn don't let the p6 bugs bite
01:51 colomon If no one has told me not to by morning, I'll add a few more tests and then commit the new version to the spectests.  I can add a bunch of working and failing tests at the same time...  :)
01:52 * sjohnson pats colomon on the back
01:53 frew__ joined #perl6
01:55 frew__ is chamelia really trademarked?
01:55 frew__ or is that a joke?
01:58 quietfanatic All you need is the (TM)
01:59 TimToady see misc/camelia.txt
01:59 sjohnson perl 6 camel suggestion:  http://www.manalais.com.br/blog/wp-c​ontent/uploads/2008/02/joe_camel.jpg
02:00 frew__ where is misc?
02:00 TimToady pugs repo
02:00 frew__ yeah, I don't see it in there...
02:00 frew__ maybe I need to update
02:02 TimToady std: WHY?
02:02 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/o1chsor2Mh line 1:␤------> [32mWHY[33m⏏[31m?[0m␤    expecting any of:␤     POST␤   argument list␤      bracketed infix␤  infix␤  infix stopper␤    postfix␤  postfix_prefix_meta_operator␤       standard stopper␤       statement
02:02 p6eval ..modifier loop␤   term__S_424identi…
02:03 sjohnson TimToady: we haven't programmed it a spiritual side yet
02:03 TimToady std: WHY? 42
02:03 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/JsYNYwZd3B line 1:␤------> [32mWHY[33m⏏[31m? 42[0m␤    expecting any of:␤        POST␤   argument list␤      bracketed infix␤  infix␤  infix stopper␤    postfix␤  postfix_prefix_meta_operator␤       standard stopper␤
02:03 p6eval ..   statement modifier loop␤   term…
02:04 TimToady std: WHY? not 42: 43
02:04 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of ?: for the conditional operator; in Perl 6 please use ??!! instead at /tmp/51ikXL2WUi line 1:␤------> [32mWHY?[33m⏏[31m not 42: 43[0m␤Undeclared name:␤     WHY used at 1 ␤FAILED 00:02 37m␤»
02:05 sjohnson std:  1;
02:05 p6eval std 28076: OUTPUT«ok 00:02 37m␤»
02:10 sjohnson TimToady: i've asked it before, but i'd like to hear it straight from the camel's mouth.  what do you think of an array collapse method
02:10 sjohnson that removes blank / undef vals from the array
02:10 sjohnson (undef, '', 'data1', undef, '', 'data2').collapse
02:11 sjohnson like in Ruby
02:11 sjohnson i can't remember how many times i've had to reinvent the wheel for this when I am splitting CSV data and i don't want blank stuff.
02:11 sjohnson it was probably 1 time
02:11 sjohnson ( `ー´)
02:12 sjohnson well, just kidding, more than 1
02:12 justatheory joined #perl6
02:13 TimToady .grep: *.defined
02:14 TimToady and such
02:15 TimToady .grep: *.true will remove '' too
02:15 TimToady .grep: ?* is even shorter
02:16 TimToady in fact, that's the same length as .collapse
02:16 TimToady though masak will prefer .grep(?*)
02:16 TimToady same length
02:17 TimToady but usually if you're using split that way in Perl 6, you should be using comb instead, and not produce the spurious values in the first place
02:18 TimToady and comb is shorter than split :)
02:22 cognominal .say for 0,1 ... { $^a + $^b if $^a < 30 }
02:22 cognominal oops
02:22 cognominal rakudo:.say for 0,1 ... { $^a + $^b if $^a < 30 }
02:22 p6eval rakudo 0d4fe0: OUTPUT«0␤1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤»
02:29 sjohnson ... comb eh
02:29 * sjohnson rubs his hands together
02:29 TimToady not gonna add .times either...
02:30 sjohnson TimToady, you saw right through me
02:30 sjohnson you knew i was thinking about Perl technology
02:30 sjohnson err Ruby
02:30 sjohnson can i haz a times()?
02:30 sjohnson ( `ー´)
02:30 TimToady is that supposed to be a sleeping cat?
02:31 sjohnson susposed to be a squinty smiling fat face
02:31 colomon rakudo: say sin(0 + 1i);
02:31 p6eval rakudo 0d4fe0: OUTPUT«Return value type check failed; expected Num, but got Complex␤in method Any::!to-radians (src/gen_setting.pm:371)␤called from method Num::sin (src/gen_setting.pm:1382)␤called from Main (/tmp/irGqi6OEyY:2)␤»
02:32 colomon rakudo: say (0 + 1i);
02:32 p6eval rakudo 0d4fe0: OUTPUT«0+1i␤»
02:32 colomon good night all.
02:32 sjohnson ^ ^
02:32 sjohnson ( `ー´)
02:32 sjohnson ahh failed trying to make a cat for TimToady
02:32 sjohnson see ya colomon
02:32 sjohnson keep up the good work
02:35 sjohnson the reason Perl is better for me than Python, is because you can code like a ninja in it.
02:38 rba joined #perl6
03:01 molaf joined #perl6
03:10 jimmy_ joined #perl6
03:21 nihiliad joined #perl6
03:46 r0bby joined #perl6
03:49 ihrd joined #perl6
03:49 mrsaturn joined #perl6
03:50 mrsaturn howdy, world
03:51 synth joined #perl6
03:53 ihrd mrsaturn: hi
03:54 cognominal given the longest token rule, I would expect  that given a factorial fonction and  sub postfix:<!!> ($x) { $x! ** 2 }  I could write 3!!
03:55 TimToady should work
03:56 TimToady std: sub postfix:<+++> ($x) {...}; $_+++
03:56 p6eval std 28076:  ( no output )
03:56 TimToady std: sub postfix:<+++> ($x) {...}; $_+++
03:57 p6eval std 28076:  ( no output )
03:57 TimToady taking too long to generate the new language, I guess
03:57 TimToady std: sub postfix:<+++> ($x) {...}; $_+++
03:57 p6eval std 28076:  ( no output )
03:57 TimToady anyway, works locally
04:00 cognominal ./perl6 -e 'multi sub fact(0) { 1 } ; multi sub fact($n) { $n * fact($n-1) } ;  sub postfix:<!> ($x) { fact $x }; sub postfix:<!!> ($x) { $x! ** 2 }; say 3!!'
04:00 cognominal Syntax error at line 1, near "!!"
04:01 TimToady rakudo doesn't do LTM yet
04:01 cognominal ho, I did not notice your were using STD
04:02 TimToady that parses fine with STD
04:03 cognominal cool
04:03 TimToady though really, rakudo shouldn't have failed in any case
04:03 TimToady since it would just have misparsed as .!.!
04:03 TimToady so I don't know why it failed
04:04 TimToady btw, much easier to write fact as [*] 1..4n
04:04 TimToady $n
04:04 cognominal I thought so too.
04:06 TimToady so perhaps rakudo is only allowing one postfix
04:06 quietfanatic for some reason, dot-postfix doesn't work at all.
04:06 quietfanatic perl6 -e 'multi postfix:<!> (0) {1}; multi postfix:<!> ($x) {$x * ($x - 1)!}; say 3.!'
04:06 TimToady rakudo: $x++--
04:06 p6eval rakudo 0d4fe0: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/xUf9GDELtv:2)␤in Main (src/gen_setting.pm:3460)␤»
04:06 quietfanatic Statement not terminated properly at line 1, near ".!"
04:06 TimToady rakudo: $_++--
04:06 p6eval rakudo 0d4fe0:  ( no output )
04:06 quietfanatic rakudo: say $_++--
04:06 p6eval rakudo 0d4fe0: OUTPUT«Use of uninitialized value␤␤»
04:07 TimToady might not support . on postfixes
04:07 TimToady rakudo: $_ = 0; say $_.++; say $_
04:07 quietfanatic That's what I said, only less eloquently.
04:07 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ".++; say $"␤in Main (src/gen_setting.pm:3460)␤»
04:07 quietfanatic (I mean I said it less eloquently)
04:07 TimToady std: $_ = 0; say $_.++; say $_
04:07 p6eval std 28076: OUTPUT«ok 00:02 38m␤»
04:07 mrsaturn rakudo: sub postfix:<.> ($x) { return $x++; } say 5.;
04:07 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "say 5.;"␤in Main (src/gen_setting.pm:3460)␤»
04:08 TimToady std: sub postfix:<.> ($x) { return $x++; } say 5.;
04:08 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Decimal point must be followed by digit at /tmp/GWJtsX1kdx line 1:␤------> [32mpostfix:<.> ($x) { return $x++; } say 5.[33m⏏[31m;[0m␤    expecting integer␤FAILED 00:04 47m␤»
04:08 mrsaturn what?
04:09 TimToady match 5. under LTM and fails
04:09 TimToady though it ought to have failed first for lack of a semi
04:10 TimToady which is what rakudo is failing on, I suspect
04:10 meppl joined #perl6
04:11 TimToady quietfanatic just figgered it out, it's the term lookahead I just put in
04:11 TimToady guess I need a try around that...
04:11 TimToady std: 42 42.
04:12 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Decimal point must be followed by digit at /tmp/SicWGveUvc line 1:␤------> [32m42 42.[33m⏏[31m<EOL>[0m␤    expecting integer␤FAILED 00:02 37m␤»
04:12 TimToady yeah
04:12 TimToady std: 42 42abc
04:12 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/qrEYAEdc9s line 1:␤------> [32m42 [33m⏏[31m42abc[0m␤    expecting any of:␤       bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤FAILED 00:02 37m␤»
04:12 mrsaturn does anyone else see very wierd errors, or is it just my irc thing messing up the words?
04:12 TimToady std: 42abc
04:12 p6eval std 28076: OUTPUT«[31m===[0mSORRY![31m===[0m␤Whitespace is required between alphanumeric tokens at /tmp/bB0FIPLIj5 line 1:␤------> [32m42[33m⏏[31mabc[0m␤    expecting any of:␤  POST␤   postfix␤  postfix_prefix_meta_operator␤       standard stopper␤ terminator␤     whitespace␤FAILED 00:02
04:12 p6eval ..37m␤»
04:13 quietfanatic mrsaturn: It's the color-coding, I think, that is not interpreted correctly by something or other.
04:13 mrsaturn thank you quietfanatic
04:15 kyle_l5l joined #perl6
04:16 quietfanatic To tell you the truth, I think the big SORRY! is a little jarring, but maybe that's because I'm not used to it.
04:17 pugs_svn r28077 | lwall++ | [STD] 2nd-term lookahead should suppress errors
04:17 TimToady it used to say PARSE FAILED
04:17 TimToady which is even more jarring, and not terribly informative to newbies
04:18 quietfanatic Well, maybe I'll just edit my own perl6 to lc the sorry or something.
04:18 TimToady and sort of comes across like "YOU LOSE!"
04:18 quietfanatic That is what FAIL means on the interweb, only a little more harsh.
04:18 TimToady at least there's an env symbol to change the eject symbol to something else :)
04:18 quietfanatic I see.
04:22 quietfanatic If the terminal supports color-coding the eject symbol isn't exactly necessary, unless you're looking for syntax errors between whitespace characters.
04:24 TimToady quietfanatic: the eject was for red-green colorblind folk
04:25 quietfanatic Ah.  Your eyes have to support color-coding too.
04:28 quietfanatic "Couldn't find non-existent sub infix:::="
04:29 quietfanatic Oh, I see.
04:30 quietfanatic It's ::= not := that's unimplemented.
04:30 TimToady I've been trying to get parrotfolx to change that notation for years now
04:31 TimToady we hates it every time we sees it
04:31 TimToady hates it, hates it, hates it
04:42 pmichaud TimToady: I might be able to change it.  Is there a canonical form for a given operator?
04:44 SmokeMachine joined #perl6
04:44 quietfanatic iirc, it's category:<name> even if the name contains < or >
04:45 quietfanatic so like infix:<+<> for numeric bit-shift left
04:45 pmichaud I think not for < or >
04:45 pmichaud I think for those one has to use a different delimiter
04:46 TimToady one could do it with <> with backslashes, but I think I'd rather see «» as an alternate
04:46 pmichaud well, parrot internally wants to have a consistent name
04:46 quietfanatic What if there's an operator with both < and «?
04:47 pmichaud we can say use single angles unless the operator name contains a single angle, but that get's a bit tricky
04:47 pmichaud *gets
04:47 TimToady can always ['<', '»']
04:47 TimToady but the canonicalization is interesting
04:47 quietfanatic Perhaps backslashing is the best approach.
04:47 pmichaud that's the prime reason that Rakudo and other tools have skipped the angles altogether
04:47 pmichaud because it's easily canonicalized internally
04:48 TimToady it's just not very human friendly
04:48 pmichaud my best guess about making it user-friendly was going to be to change the display name to include angles, but leave the internal name w/o the angles
04:48 TimToady needs a pill
04:48 pmichaud but I'm not entirely satisfied with that approach either.  in some places the non-friendly names are just going to "leak out", no matter what we do.
04:49 quietfanatic_ joined #perl6
04:49 quietfanatic_ Sorry, Firefox Beta exploded
04:49 quietfanatic_ That's what I get for using beta.
04:49 TimToady well, I'd be happy enough with <\< \>> for canonical
04:49 quietfanatic_ I have it in the spec right here, I just need to link it...
04:50 quietfanatic_ S06:379
04:50 pmichaud we might be able to backwhack the angles
04:51 pmichaud S06:379 looks wrongish to me... is that really correct?
04:51 TimToady I think I'd prefer the backwhacks
04:52 TimToady it seems rather fossilish
04:52 quietfanatic_ Let me fix my username...
04:52 quietfanatic joined #perl6
04:52 quietfanatic There.
04:53 pmichaud I'm fine with what S06:379 currently says -- although I had never noticed that before.
04:53 pmichaud quietfanatic: nice catch, btw.
04:53 TimToady indeed
04:54 TimToady but I think it would be good if the canonical form was .perl-safe
04:54 pmichaud it will seem very odd that the canonical for numeric greater than is    'infix:<>>'.   I suspect that's not STD parse-able, though.
04:54 TimToady well, we could go with :['>'] as teh canonical form, I suppose
04:55 quietfanatic Naturally it's not, or I'd create an operater called "> ($x) { #`(do something bad) }"  :)
04:55 quietfanatic *operator
04:55 TimToady but maybe just that form for things containing < or >, and :<> for everything else
04:56 pmichaud anyway, that's the reason parrot's tools have omitted the angles entirely until now -- just easier for consistency in the tools.
04:56 TimToady hates it...
04:56 quietfanatic But of course, infix:::= is also non-parseable.
04:57 pmichaud well, Rakudo understands how to convert infix:<::=> to its internal form
04:57 pmichaud it's just a question of getting the correct name out :)
04:57 pmichaud or having a consistent internal form that is parseable
04:57 TimToady even when you use %symtab.keys :)
04:57 pmichaud yes, I was thinking in that case also
04:58 TimToady so maybe just straight <> with \
04:58 TimToady output can pretty that up if desired
04:58 pmichaud would we have any operators with \ in the token name?
04:59 pmichaud or is that semi-reserved for unspace?
04:59 quietfanatic circumfix:<\\( )>
04:59 pmichaud (yes, we can backwhack it as well.)
04:59 quietfanatic ...for Captures.
05:01 TimToady std doesn't call that a circumfix, fwiw
05:01 TimToady hadn't though about unspace in <> though
05:01 TimToady seems undwimmy
05:02 TimToady unspace would disappear entirely
05:02 quietfanatic_ joined #perl6
05:02 quietfanatic_ happened again
05:02 TimToady but <foo\ bar> will be expected to mean "foo bar"
05:02 quietfanatic_ I ought to get a real irc client.
05:03 TimToady well, maybe I'll whack on S06 tomorrow after sleeping on it
05:03 pmichaud that'd be great :-)
05:03 TimToady but probably :<\< \>>
05:04 pmichaud I'm not likely to be able to make a change in the immediate future anyway.  But I can start moving things in that direction.
05:04 cognominal .WHAT gives me the type name of a given type. But how can I know if it an enum, a class...?
05:05 pmichaud what would be the canonical Perl 6 mechanism for returning a block of type WhateverCode ?
05:06 pmichaud i.e., I'm currently writing
05:06 pmichaud multi sub infix:<+>(Whatever $a, $b) { -> $_ { $_ + $b } }
05:06 pmichaud but I need the returned closure to be of type WhateverCode
05:06 TimToady but how to bless it, yeah...
05:07 quietfanatic joined #perl6
05:07 TimToady well, in theory, WhateverCode(-> $_ { $_ + $b } })
05:07 quietfanatic Well I can't get ircii to work.
05:07 pmichaud oh, I might be able to get that to work.  Maybe.
05:08 quietfanatic ...trying irssi...
05:08 pmichaud maybe I'll just write an internal sub to do the blessing for now.  We're still having issues with postcircumfix:<( )> on type objects, I think.
05:11 TimToady I suppose in some sense WhateverCode could just be some kind of alias for Code:($)
05:11 pmichaud well, I don't think we want all Code:($) to be WhateverCode
05:11 pmichaud it really seems to want a special type
05:12 quietfanatic joined #perl6
05:12 TimToady not sure
05:12 quietfanatic Is there anything special it does?
05:12 pmichaud it's special for purposes of dispatch, yes.
05:13 TimToady question is whether you want 1 + { $_ * 3 } to automatically turn into { 1 + $_ * 3 }
05:13 quietfanatic Ah...
05:13 quietfanatic Yes that would be helpful.
05:13 TimToady something to be said on both sides
05:14 TimToady as usual
05:14 pmichaud istr that there were some cases against having it auto-handle Code:($)
05:14 quietfanatic Well, you could always overload infix:<+>:(Num, Code) ...
05:14 quietfanatic but that'd be too wierd.
05:14 quietfanatic weird
05:15 TimToady well, it'd only be code with 1 arg
05:15 TimToady but still
05:15 TimToady (Num, Code:($))
05:15 quietfanatic speaking of which, do braces always create a Code object without running it, or are there some cases it runs?
05:16 TimToady if used as a statement, runs immediately
05:16 quietfanatic I mean, would 1 + { 3 * 4} normally run 3 * 4?
05:16 quietfanatic Oh
05:16 TimToady would normally be an error
05:16 TimToady since closures don't have a numeric value intrinsically
05:16 TimToady 1 + do { 3 * 4 } would run
05:16 TimToady or 1 + ({3 + 4})
05:17 TimToady since inside parens is now considered a statement
05:17 TimToady which is how list comprehensions work out
05:17 quietfanatic Wait, WhateverCodes can have more than one argument, right?  Like (* + *)?
05:17 TimToady ({3 + $_} for 1..10)
05:17 TimToady the block is a statement
05:17 pmichaud quietfanatic: that's still just one argument there
05:17 quietfanatic Oh, I see.
05:17 TimToady that is currently considered { $_ * $_ }
05:17 quietfanatic same * both places.
05:17 TimToady not { $^a * $^b }
05:18 TimToady HyperWhateverCode is Code:(*@)
05:19 TimToady since it can represent an arbitrary number of dimensions, 0 or more
05:19 quietfanatic so like @multidim.map({**.grep({...})})
05:19 quietfanatic or would that still be *.grep?
05:19 synth^2 joined #perl6
05:19 TimToady dunno, brane hertz
05:20 pmichaud I keep asking tough questions again, I think.  :)
05:20 quietfanatic Well, Whatever... :)
05:23 finanalyst joined #perl6
05:30 rfordinal joined #perl6
05:35 pmichaud ls
05:35 pmichaud oops
05:35 pmichaud ww
05:38 JimmyZ rakudo: ('a','bb','cc').>>.chars;
05:38 p6eval rakudo 0d4fe0:  ( no output )
05:43 quietfanatic rakudo: ('a', 'bb', 'cc')>>.chars
05:43 p6eval rakudo 0d4fe0:  ( no output )
05:43 quietfanatic rakudo: say ('a', 'bb', 'cc')>>.chars
05:43 p6eval rakudo 0d4fe0: OUTPUT«122␤»
05:43 quietfanatic rakudo: say ('a', 'bb', 'cc').>>.chars
05:43 p6eval rakudo 0d4fe0: OUTPUT«122␤»
05:43 quietfanatic oh
05:52 JimmyZ rakudo: say (1..20 X~ 2..20).pick;
05:52 JimmyZ rakudo: say (1..20 X~ 2..20).pick;
05:52 p6eval rakudo 0d4fe0: OUTPUT«1116␤»
05:52 p6eval rakudo 0d4fe0: OUTPUT«110␤»
05:56 JimmyZ rakudo: say (1..20 X~ 2..20).pick(6);
05:56 p6eval rakudo 0d4fe0:  ( no output )
06:01 mrsaturn rakudo: (1..42).pick.say;
06:01 p6eval rakudo 0d4fe0: OUTPUT«5␤»
06:02 * sjohnson pats TimToady on the head
06:02 pmichaud off to sleep
06:02 pmichaud be back tomorrow
06:02 mrsaturn g'night
06:03 sjohnson bye pmi
06:03 JimmyZ rakudo: (0..9).pick(9, :repl).say
06:03 p6eval rakudo 0d4fe0: OUTPUT«430427615␤»
06:03 JimmyZ rakudo: (0..9).pick(9, :repl).say
06:03 p6eval rakudo 0d4fe0: OUTPUT«295091965␤»
06:04 JimmyZ rakudo: (0..9).pick(32, :repl).say
06:04 p6eval rakudo 0d4fe0: OUTPUT«76335634188642403928309212558741␤»
06:04 mrsaturn rakudo:147.sqrt.say;
06:08 mrsaturn rakudo:1004.sqrt.say;
06:08 flip913 joined #perl6
06:10 mrsaturn joined #perl6
06:10 flip913 Will there be lazy hashes in Perl6 as well? S07 only talks about lazy lists.
06:10 flip913 So I'd have to build a lazy hash by a lazy list of pairs and a hash myself?
06:12 JimmyZ rakudo: (*..*).pick(3, :repl).say
06:12 p6eval rakudo 0d4fe0: OUTPUT«!whatever_closure!whate​ver_closure!whatever_closure␤»
06:13 mrsaturn rakudo: 139.sqrt.say;
06:13 flip913 jimmyz: was that the answer to my question? If so, then sorry, I don't understand
06:13 p6eval rakudo 0d4fe0: OUTPUT«11.7898261225516␤»
06:15 moritz_ good morning
06:16 moritz_ flip913: there are no lazy hashes, no
06:16 mrsaturn_ joined #perl6
06:16 moritz_ and hashes aren't just lists of pairs either
06:16 JimmyZ lazy lists
06:19 sri_kraih_ joined #perl6
06:20 flip913 moritz: I know that hashes are not just lists of pairs ... but that way I'd build a lazy hash.
06:20 JimmyZ flip913: I am just testing something.
06:20 flip913 remember the data already read (or computed), or read more
06:20 flip913 maybe a memoized function would be better?
06:21 * moritz_ doesn't quite understand why a normal hash won't do, and what prolbem flip913 is trying to solve
06:22 flip913 well, think about a dictionary that's on disk
06:22 flip913 where some key and value are stored
06:22 flip913 now say that i don't want to read the whole data in
06:22 flip913 but want to do accesses hash-like, ie. by a non-numeric key
06:23 flip913 so I'd think of that like a lazy hash - read until the wanted key is found (and store everything), and as soon as the key is found
06:23 flip913 stop reading until another, still unknown, key is queried
06:24 flip913 like a lazy list, when asked for the 10th element, evaluates everything before
06:24 moritz_ if you want to write that with a hash interface, you can just write your own Hash type
06:25 moritz_ (in Perl 5 you'd use tie)
06:25 jauaor joined #perl6
06:25 moritz_ basically it sounds as if the interface can be normal, just the internals should be lazy
06:25 jauaor :)
06:30 flip913 I know that I can write that myself ... I just wanted to ask whether perl6 will help me there, ie. so that I only provide a single function returning (key, value), and the rest is done ...
06:31 flip913 But maybe that's the job of some module
06:31 eMaX joined #perl6
06:35 moritz_ presumably, yes
06:36 moritz_ also notice that this would be a read-only hash then
06:36 moritz_ if you supply only one function
06:40 mrsaturn_ joined #perl6
06:42 thiagumohan joined #perl6
06:42 mrsaturn__ joined #perl6
06:44 flip913 moritz: yes, of course.
06:44 mrsaturn_ joined #perl6
06:45 mrsaturn joined #perl6
06:45 mrsaturn yay i'm back
06:47 ihrd left #perl6
06:47 rfordinal joined #perl6
06:58 eMaX joined #perl6
07:24 RonOreck joined #perl6
07:27 iblechbot joined #perl6
07:34 ejs joined #perl6
07:38 Matt-W Morning
07:39 moritz_ oh hai
07:50 ejs1 joined #perl6
07:57 Matt-W hey moritz_
08:06 sjohnson hi!
08:10 moritz_ I'm currently thinking about an IRC bot that lets us add committers to a github project
08:10 moritz_ and I plan to use the Perl 5 Bot::BasicBot for that
08:10 sjohnson be sure to name it something cute
08:10 sjohnson like... cuteb0t or something
08:10 Matt-W Donald
08:11 moritz_ does anybody know how I can get the information in that bot if the user is registered with freenode, and under which account?
08:11 BinGOs moritz_: I've already implemented asynchronous access to the Github API
08:11 sjohnson moritz_: whois command to see if they have identified with the nickserv
08:11 moritz_ BinGOs: I prototyped the adding with Net::GitHub, which seems to work fiine for my purposes
08:12 sjohnson or /msg nickserv info <nickname>
08:12 BinGOs as you will.
08:12 moritz_ sjohnson: so how do I whois with Bot::BasicBot?
08:12 moritz_ hm, /msg'ing nickserv might be another option
08:12 cono_ /msg nickserv would be better I guess
08:12 moritz_ BinGOs: is it on CPAN?
08:13 BinGOs http://search.cpan.org/~bingo​s/POE-Component-Github-0.06/
08:14 BinGOs B::BB is great, but it starts to get tedious very very quickly.
08:14 moritz_ BinGOs: I know. So far I only did very simple stuff, and it already got a bit tedious...
08:14 sjohnson haven't checked basicbot too much, but it shouldn't be hard to just output a raw irc command to the socket
08:15 moritz_ BinGOs: but I haven't had the time and motivation yet to really dig into POE
08:15 BinGOs To get at any of the stuff you want in B::BB you have to get at the POE::Component::IRC session/object it uses under the hood
08:17 moritz_ Bot::BasicBot implements AUTOLOAD for sending arbitrary states to the underlying POE::Component::IRC compoment.
08:17 moritz_ ah
08:18 BinGOs literal might know if the Freenode registration stuff is automagically gathered by POE::Component::IRC::State
08:18 sjohnson moritz_: did you try the /msg thingy
08:19 sjohnson on your irc client
08:19 sjohnson to see what kind of good stuff it returns for you to parse?
08:19 moritz_ sjohnson: yes; but the problem with that is that it doesn't answer by normal message
08:20 BinGOs Like a good bot it'll reply with a NOTICE
08:20 sjohnson right
08:20 moritz_ ... which B::BB doesn't capture. meh.
08:20 sjohnson on Rizon IRC network, it will respond with /msg
08:20 sjohnson hmmmmmm
08:21 sjohnson freenode is different i guess
08:21 BinGOs Which is against good practice
08:21 moritz_ it's fine by me if it works only on freenode by now
08:21 BinGOs The idea is that you send PRIVMSG to bot, bot replies with NOTICE
08:22 BinGOs so bots don't go into cyclic loops with each other
08:22 BinGOs ( according to the RFC ).
08:22 BinGOs Its an understanding rather than a rule.
08:23 BinGOs the Quakenet service bots do it same ( unless you explicitly request them to use PRIVMSG to respond ).
08:23 moritz_ BinGOs: do you know an instructive example of a POE::Component::IRC based bot that doesn't use B::BB?
08:23 BinGOs </gabbling>
08:24 BinGOs There is http://search.cpan.org/~bingos/POE-Component​-IRC-6.10/lib/POE/Component/IRC.pm#SYNOPSIS
08:25 BinGOs literal also started writing a cookbook: http://search.cpan.org/~bingos/POE-Component​-IRC-6.10/lib/POE/Component/IRC/Cookbook.pod
08:25 moritz_ thanks
08:26 sjohnson BinGOs: you seem to know quite a bit about the RFC spec
08:26 * sjohnson is impressed
08:27 BinGOs I've been maintaining POE::Component::IRC for god knows how many years
08:27 BinGOs and I wrote an IRC server as well.
08:28 BinGOs http://search.cpan.org/~bingos/​POE-Component-Server-IRC-1.38/
08:30 sjohnson neat
08:31 masak joined #perl6
08:33 masak good morning, #perl6.
08:35 sjohnson masak!!!
08:35 masak sjohnson!!!
08:35 sjohnson hehe
08:35 sjohnson i wonder if i should be hitting the sack
08:36 sjohnson sometimes, i just don't want to sleep
08:36 Chillance joined #perl6
08:41 masak sjohnson: having gotten up relatively early today, let's just say I'm not experiencing that problem right now. :/
08:42 * masak apologises for the dangling modifier
08:43 * Matt-W would like to go to sleep
08:43 Matt-W Unfortunately I'm only 1h45m into the working day
08:43 masak aye, same here.
08:43 Matt-W should probably stop listening to such soothing, calming music
08:43 masak on the bright side, maybe it'll be easier than usual to fall asleep tonight.
08:44 * Matt-W puts Red Priest on instead
08:44 masak I giving a presentation at work today, and for some silly reason I had the notion that I would need an interactive Java shell to present my ideas.
08:44 masak so I wrote one in Perl 6.
08:44 Matt-W hah
08:44 Matt-W rather than in Java
08:45 masak it was deceptively easy.
08:45 masak it's not advanced, but it looks like magiv.
08:45 masak s/magiv/magic/
08:45 masak actually, it shells out to javac and java for the execution part.
08:45 Matt-W I'm contemplating an 'innovation' project at work to attempt to prove that we could operate much more efficiently if we used git or a similar sort of DVCS for source control instead of Subversion
08:45 masak but it tries to handle declarations and imports intelligently, so it's already better than the Rakudo REPL. :P
08:46 Matt-W :)
08:46 Matt-W Well then maybe you could work on that afterwards
08:47 Matt-W I'm going on holiday tomorrow! \o/
08:47 masak \o/
08:47 masak me too, in a way.
08:47 masak only over the weekend.
08:48 Matt-W I'm going tomorrow, returning on Tuesday
08:48 Matt-W So five days
08:48 EDevil joined #perl6
08:48 masak Matt-W: I know what needs to be done for the Rakudo REPL, but I don't know exactly how. I think someone like Tene could engineer a solution. I'm not so sure I have the sufficient amount of midi-chlorians to pull it off.
08:49 masak Matt-W: have the appropriate amount of fun.
08:49 Matt-W Five days by the seaside, eating fish and chips, and probably worrying if my cat's okay staying with friends
08:49 Matt-W Undecided on taking my laptop with me
08:49 masak hard choice.
08:49 Matt-W but I might and see if I can get some more of Form.pm working
08:49 Matt-W I want to get numbers lining up in columns
08:49 masak YaY
08:49 Matt-W parents won't mind too much
08:49 Matt-W they know I'm hard to separate from a computer
08:50 Matt-W and it's quite pleasant to sit in the caravan in the evening after a BBQ and idly write some code
08:50 masak I'm going north to spend the weekend in the company of Esperanto-speaking friends.
08:52 Matt-W nice
08:52 Matt-W I will just be speaking English, as usual
08:52 masak :)
08:59 EDevil_ joined #perl6
09:00 EDevil_ joined #perl6
09:01 cono masak: Cu vi paroli esperant lingve? :D
09:02 masak cono: Jes, ekde preskaŭ dek jaroj.
09:02 cono masak: Soz, that's only one that i know :D
09:03 masak :) kudos nevertheless.
09:04 cono masak: did you use pasporto servo ?
09:05 masak cono: I try sometimes.
09:05 masak but I've been hosting more than being a guest lately.
09:05 masak ok, meeting. see y'all later. &
09:05 cono nice
09:06 omega joined #perl6
09:10 jnthn morning, #perl6
09:11 szbalint morning
09:11 pctony joined #perl6
09:12 pctony moritz_: ping
09:13 pctony moritz_: just looking at using ilbot, your site or the subvcersion checkout doesnt seem to contain the mod_rewrite rules
09:13 pctony moritz_: any tips?
09:16 moritz_ pctony: just a second...
09:16 pctony thanks
09:20 Saran joined #perl6
09:20 Whiteknight joined #perl6
09:20 Saran perl6.org came with a new look
09:21 lollan joined #perl6
09:21 lollan hello :)
09:21 jnthn hello :-)
09:22 Saran @lollan @jnthn Hello guys :-)
09:23 lambdabot Error: 501 Syntax error, illegal parametersError: 501 Syntax error, illegal parametersError: 501 Syntax error, illegal parametersError: 501 Syntax error, illegal parameters
09:23 moritz_ pctony: they are in cgi/.htaccess
09:24 pctony have you just added them? as my checkout from http://svn.pugscode.org/pugs/misc/irclog/ - about 40 mins ago doesnt have a .htaccess
09:25 pctony rhorn1 cgi]# ls
09:25 pctony abbr.dat  at.png  camelia.png  cgi.conf  channel-index.pl  channels  database.conf  index.pl  jquery.autocomplete.js  jquery.min.js  links.dat  moose1.ico  moosecamel.png  nickfilter.js  out.pl  search.pl  spam.pl  style.css  template  text.pl
09:25 moritz_ pctony: ls -a # :-)
09:25 pctony erhorn1 cgi]# ls -a
09:25 pctony .  ..  abbr.dat  at.png  camelia.png  cgi.conf  channel-index.pl  channels  database.conf  .htaccess  index.pl  jquery.autocomplete.js  jquery.min.js  links.dat  moose1.ico  moosecamel.png  nickfilter.js  out.pl  search.pl  spam.pl  style.css  .svn  template  text.pl
09:25 pctony sorry, pasted wrong line
09:25 moritz_ pctony: files that begin with a dot are hidden by default
09:25 pctony yeah, i know that
09:25 moritz_ there you go, .htaccess in there
09:25 pctony hrmm, one sec
09:26 moritz_ http://svn.pugscode.org/pug​s/misc/irclog/cgi/.htaccess
09:26 pctony brain, gear, not in
09:26 pctony sorry fellas
09:26 moritz_ :-)
09:26 pctony long day
09:26 pctony no bed in 2 days
09:26 moritz_ no problem
09:26 moritz_ pctony: anyway, if you have more questions about ilbot we should go to private messages
09:26 pctony p.s. speaking with my freenode staff hat on, you really all shouldnt be sitting with a +o flag on
09:27 moritz_ uhm, why not?
09:27 pctony it's not the freenode way
09:27 lollan today is the day. I drop perl5, I don't touch it anymore
09:27 pctony it creates an "us and them" divide
09:27 pctony you become +o when you *need* it
09:28 moritz_ pctony: got a point there... so the channel owner needs to us to chanserv somehow?
09:28 * moritz_ is still not very familiar with the freenode infrastructure
09:28 moritz_ pctony: you can also point me to a FAQ or so :-)
09:29 BinGOs /msg Chanserv access list #perl6
09:30 BinGOs one of those guys should be able to add the appropriate access levels
09:30 moritz_ thanks
09:31 moritz_ diakopter, Tene, Juerd, obra_: could one of you please do that? (add the current ops to the access list, that is)
09:32 moritz_ pctony: if you have a public instance of the ilbot thing running, please tell me :-)
09:34 lollan as for now, what would be the most robust perl6 implementation ?
09:34 moritz_ lollan: I'd say it's rakudo
09:35 moritz_ pugs might still have a few more features, but it's outdated and not updated
09:35 moritz_ so it implements the specs from 2.5 years ago, or so
09:35 pctony moritz_: I will have soon enough, but it wont be for public consumption
09:36 omega_ joined #perl6
09:37 moritz_ pctony: ok
09:45 d3w joined #perl6
09:50 lollan thanks moritz_
09:55 smuj joined #perl6
09:56 sjohnson smuj
09:57 smuj hello
09:57 sjohnson smuj == smu johnson ?
09:57 sjohnson :)
09:58 smuj nah, 'nother smuj :)
09:58 sjohnson cool. bedtime!
09:59 * smuj thought he was unique! :)
09:59 smuj sjohnson: night!
09:59 pctony left #perl6
10:05 finanalyst joined #perl6
10:08 smuj rakudo: say 1..10;
10:08 p6eval rakudo 0d4fe0: OUTPUT«12345678910␤»
10:08 smuj rakudo 1..10.say
10:09 smuj rakudo 1..10.say;
10:09 smuj hmm
10:09 smuj rakudo say "hello";
10:10 smuj rakudo: say "hello";
10:10 p6eval rakudo 0d4fe0: OUTPUT«hello␤»
10:10 smuj doh!
10:10 smuj rakudo: 1..10.say;
10:10 p6eval rakudo 0d4fe0: OUTPUT«10␤»
10:11 smuj buglet | me?
10:17 PacoLinux joined #perl6
10:17 payload rakudo: (1..10).say
10:17 p6eval rakudo 0d4fe0: OUTPUT«12345678910␤»
10:18 payload rakudo: 1..10 .say
10:18 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ".say"␤in Main (src/gen_setting.pm:3454)␤»
10:18 Matt-W rakudo: 1..10\ .say
10:18 p6eval rakudo 0d4fe0: OUTPUT«10␤»
10:18 Matt-W have to unspace that sort of thing
10:19 payload okay
10:19 Matt-W it's the same rule that makes if () an if statement, and if() a sub call
10:20 Juerd moritz_: I don't see how I could add anyone to the access list here; I'm not even an op myself.
10:21 smuj rakudo: say 1..10; 1..10.say;
10:21 p6eval rakudo 0d4fe0: OUTPUT«12345678910␤10␤»
10:24 xinming joined #perl6
10:24 payload rakudo: say.(1..10); (1..10).say # ^^
10:24 p6eval rakudo 0d4fe0: OUTPUT«12345678910␤12345678910␤»
10:25 Matt-W I'm not sure what it's doing when you call it without the parens
10:25 Matt-W rakudo: 1..10.perl.say; (1..10).perl.say
10:25 p6eval rakudo 0d4fe0: OUTPUT«10␤1..10␤»
10:26 Matt-W I think it's calling the method on the 10, then using the result of that in the ..
10:26 payload sure
10:26 Matt-W that's mildly surprising
10:26 Matt-W but there are other situations where it wouldn't be
10:26 smuj yep :)
10:27 Matt-W like... 1..@array.elems
10:32 rba joined #perl6
10:35 smuj perl6: 1..10.say;
10:35 p6eval elf 28077, pugs, rakudo 0d4fe0: OUTPUT«10␤»
10:36 nbrown joined #perl6
10:37 donaldh joined #perl6
10:41 smuj rakudo: my $fred=1..10.say; say $fred; say $fred.perl;  # /me being silly :)
10:41 p6eval rakudo 0d4fe0: OUTPUT«10␤1␤1..Bool::True␤»
10:45 moritz_ Juerd: you seem to have privileges registered with chanserver
10:45 moritz_ *chanserv*
10:46 Juerd Interesting
10:46 Juerd Wow :)
10:50 Juerd moritz_: I don't have administrative privileges.
10:51 BinGOs hmmmm
10:51 BinGOs grab a freenode staff member they appear to be the only ones with +f +F access
10:52 Juerd That's weird :)
10:52 BinGOs play along at home /msg ChanServ help flags
10:52 BinGOs /msg chanserv access list #perl6
10:53 Matt-W indeed we need our friendly freenode staff member back
10:55 BinGOs http://freenode.net/faq.shtml#helpfromstaff
10:56 BinGOs This is the philosophy they were referring to: http://freenode.net/channel_guidelines.shtml
10:56 KyleHa joined #perl6
11:00 M_o_C joined #perl6
11:07 minskman joined #perl6
11:10 Su-Shee joined #perl6
11:10 Su-Shee good day. :)
11:18 jnthn oh hai Su-Shee
11:18 moritz_ BinGOs: thanks, I've /msg'ed our helpful staffer
11:20 Su-Shee joined #perl6
11:20 donaldh joined #perl6
11:33 ihrd joined #perl6
11:33 ihrd left #perl6
11:55 payload joined #perl6
11:58 ejs1 joined #perl6
12:00 takadonet joined #perl6
12:00 takadonet morning all
12:04 smuj_ joined #perl6
12:18 abra joined #perl6
12:23 ruoso joined #perl6
12:30 colomon morning!
12:31 colomon rakudo: say 2i.WHAT
12:31 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ".WHAT"␤in Main (src/gen_setting.pm:3454)␤»
12:31 colomon rakudo: say 2i;
12:31 p6eval rakudo 0d4fe0: OUTPUT«0+2i␤»
12:31 colomon rakudo: say (2i).WHAT;
12:31 p6eval rakudo 0d4fe0: OUTPUT«Complex()␤»
12:32 ruoso the css of perl6.org defines the width of the content in pixels
12:32 ruoso or any other absolute unit
12:32 ruoso this cause the blocks to fall to only two columns
12:35 * ruoso just notices it is in the svn
12:42 smuj joined #perl6
12:43 colomon rakudo: my $a = 2; my $b = $a + 0i; say $b.WHAT;
12:43 p6eval rakudo 0d4fe0: OUTPUT«Complex()␤»
12:45 colomon rakudo: my $a = 2; my $b = $a + 0i; say sin($b);
12:45 p6eval rakudo 0d4fe0:  ( no output )
12:46 colomon rakudo: my $a = 2; my $b = $a + 0i; say sin($a); say sin($b);
12:46 p6eval rakudo 0d4fe0: OUTPUT«0.909297426825682␤Return value type check failed; expected Num, but got Complex␤in method Any::!to-radians (src/gen_setting.pm:410)␤called from method Num::sin (src/gen_setting.pm:1421)␤called from Main (/tmp/MXP80IdRzq:2)␤»
12:47 ruoso the math type hierarchy in rakudo is not yet correct
12:47 colomon yes, I know.
12:47 colomon it's actually pretty damn borked at the moment.
12:48 colomon At the moment, I'm mostly puttering around pondering implementing sine/cosine for complex numbers.
12:50 colomon And wondering how much of the type chaos should be reported as bugs.
12:50 colomon rakudo: say (3.0).Num.Num.WHAT;
12:50 p6eval rakudo 0d4fe0: OUTPUT«Method 'Num' not found for invocant of class 'Num'␤»
12:51 colomon Like that.
12:56 ruoso colomon, I think a first "Math Type Hierarchy Refactoring" bug would make sense
12:56 Front_slash joined #perl6
12:56 ruoso and report all the weirdness in there
12:56 ruoso and the proposed solution
12:57 colomon ruoso: That's not a bad idea.  Hmmm...
12:57 ruoso first weirdness I see is
12:57 ruoso rakudo: say 1 ~~ Complex
12:57 p6eval rakudo 0d4fe0: OUTPUT«0␤»
12:58 ruoso rakudo: say 1 ~~ Rat
12:58 p6eval rakudo 0d4fe0: OUTPUT«Could not find non-existent sub Rat␤»
12:58 ruoso rakudo: say 1 ~~ Num
12:58 p6eval rakudo 0d4fe0: OUTPUT«1␤»
12:58 ruoso rakudo: say 1 ~~ Int
12:58 p6eval rakudo 0d4fe0: OUTPUT«1␤»
12:58 ruoso Complex is a superset where 1 is contained
12:59 colomon I've been assuming most of the issues were already known.
13:00 ruoso I'm not sure there's a summarized report on that
13:00 colomon Unfortunately, my skills for searching RT are very poor.
13:01 colomon Is this stuff supposed to be documented somewhere besides S32 Numeric?
13:02 colomon It only seems to talk about the functions on the various types, not what the types are.
13:07 jaffa8 joined #perl6
13:08 colomon Just did a google search on perlcabal.org/syn, and I don't see any sign that Complex is mentioned anywhere besides S32::Numeric and (weirdly) S32::Str.
13:12 colomon rakudo: say sqrt(-1);
13:12 p6eval rakudo 0d4fe0: OUTPUT«NaN␤»
13:12 colomon rakudo: say sqrt(-1+0i);
13:12 p6eval rakudo 0d4fe0: OUTPUT«0+1i␤»
13:13 colomon hey, that worked!
13:16 ruoso colomon, I guess S32 only mention the APIs
13:16 jaffa8 rakudo: my $r="9"; print $r.pos;
13:16 p6eval rakudo 0d4fe0: OUTPUT«Method 'pos' not found for invocant of class 'Str'␤»
13:16 ruoso I think S02 or S09 would be the place to document the type hierarchy
13:16 SmokeMachine joined #perl6
13:18 colomon S09 documents the low-level types: complex64 (for instance) being two 64-bit floats.
13:18 colomon But there's nothing about the hierarchy at all (or if there is, it doesn't include Complex).
13:20 pugs_svn r28078 | ruoso++ | [perl6-projects.org] refactor the css so that it works for people with large fonts
13:20 ruoso colomon, I guess you could start defining how a proper hierarchy should look like
13:22 colomon ruoso: I need to get to $work at the moment, but I will keep a background thread in my brain on exactly that.
13:22 ruoso colomon, I think we need to take a look at how math defines it...
13:23 ruoso and since all built-in types are roles, there's no need for a hierarchy in the traditional class sense
13:23 ruoso it's more like "subset" than "subclass"
13:24 ruoso rakudo: say 1i.i
13:24 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ".i"␤in Main (src/gen_setting.pm:3454)␤»
13:24 ruoso rakudo: say (1i).i
13:24 p6eval rakudo 0d4fe0: OUTPUT«Method 'i' not found for invocant of class 'Complex'␤»
13:24 ruoso rakudo: say Complex.^methods(:local).map:{~$_}
13:24 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ":{~$_}"␤in Main (src/gen_setting.pm:3454)␤»
13:24 ruoso rakudo: say Complex.^methods(:local).map: {~$_}
13:24 p6eval rakudo 0d4fe0: OUTPUT«relogperlimpolarScalar␤»
13:25 ruoso rakudo: say join ', ', Complex.^methods(:local).map: {~$_}
13:25 p6eval rakudo 0d4fe0: OUTPUT«im, polar, Scalar, re, log, perl␤»
13:25 ruoso rakudo: say (1i).im
13:25 p6eval rakudo 0d4fe0:  ( no output )
13:27 meppl joined #perl6
13:28 colomon ruoso: I don't see how it makes sense without a hierarchy?  possibly a hierarchy of roles, but the system needs to know that every float can be presented as a complex, but not vice versa.
13:28 ruoso colomon, that's what a "subset" is
13:29 ruoso subset Rat of Complex where { imaginary part is 0 }
13:29 colomon ah, I see what you're getting at.
13:29 colomon but that raises other issues -- I would have thought it would be
13:30 colomon subset Float of Complex where { $^z.im == 0 }
13:30 ruoso sorry, there's a superset of Rat and Float which is a subset of Complex as well
13:31 ruoso subset Real of Complex where { $^z.im == 0 }
13:31 ruoso subset Rat of Real where { ??? }
13:31 ruoso subset Float of Real where { ??? }
13:32 colomon It seems like that way lies madness.
13:33 colomon I certainly wouldn't expect p6 to support a Real type which is really the real numbers.
13:33 colomon I mean, I suppose you could use lazy evaluation to generate irrational numbers, but yow!
13:34 colomon I guess you could have subset Float of Rat.
13:35 ruoso ok... Float is not a set
13:35 ruoso float is a storage mechanism
13:35 colomon right
13:36 colomon other big fundamental questions: Does Int imply bignum? Or is there a BigNum type?
13:36 ruoso I think the storage is traversal to the type
13:37 ruoso Complex( Real( Rational( Integer( Natural ) ), Irrational) )
13:38 ruoso and I guess each of this roles only define API, while the behavior is implemented by the storage types
13:39 colomon S09 seems to imply that Num is a floating point number, which I find surprising: "The unsized types int and num are based on the architecture's normal size for int and double..."
13:40 ruoso http://www.mathsisfun.com/s​ets/images/number-sets.gif # a proper number sets representation
13:41 colomon Surely "I" there is imaginary, not irrational?  irrationals are the part of "R" which is not "Q".
13:41 ruoso Imaginary, yes
13:42 ruoso http://www.mathsisfun.com/sets/number-types.html # for the full explanation
13:42 * moritz_ is puzzled that I is smaller than R :-)
13:43 colomon those sets are not to scale.  :0
13:43 colomon :)
13:43 jaffa8 Is there pos like function in Perl 6
13:43 jaffa8 ?hi
13:44 moritz_ jaffa8: it's $/.to
13:44 jaffa8 that is not very good
13:44 moritz_ the depends on your point of view
13:45 jaffa8 now it is not possible to scan it parallel
13:45 jaffa8 in
13:45 moritz_ sure it is.
13:46 moritz_ you can store match objects in other variables too
13:46 pmichaud good morning, #perl6
13:46 jaffa8 good afternoon
13:46 ruoso good morning pmichaud...
13:46 ruoso we were just discussing something you migth find interesting
13:47 jaffa8 moritz_,in short, $/ has to be saved and restored.
13:48 ruoso jaffa8, you can always store the match directly, without using the $/ variable
13:48 moritz_ jaffa8: right. Just like pos() has to be saved and restored when you use the variable in a different match
13:48 ruoso my $match = $str ~~ /asdf/
13:48 ruoso say $match.pos
13:49 jaffa8 moritz_, what are you talking about?
13:49 ruoso jaffa8, if you use the same string in two different matches
13:49 moritz_ jaffa8: I'm talking about the benefits of the Perl 6 design
13:49 jaffa8 in Perl 6?
13:49 jaffa8 in Perl 5?
13:49 jaffa8 In Perl 5, nothing has to be donw
13:50 moritz_ depends on what you do.
13:51 jaffa8 using the same string, and matching different patterns on it.
13:51 jaffa8 Pos does not have to be touched.
13:51 moritz_ it does, if you want to use two different patterns with /g that should not influence each other
13:52 moritz_ and hey, pos() isn't even a variable
13:52 moritz_ you can't say if you want to share it between threads
13:53 jaffa8 moritz_, I did not need that.
13:54 moritz_ maybe not, but it's still something to be considered
13:54 moritz_ we're not writing a programming language for a single user
13:55 smuj rakudo: say 5..8;
13:55 p6eval rakudo 0d4fe0:  ( no output )
13:56 smuj rakudo: say "hello";
13:56 p6eval rakudo 0d4fe0: OUTPUT«hello␤»
13:57 smuj rakudo: say 'a'..'z';
13:57 p6eval rakudo 0d4fe0: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
13:57 ruoso but anyway... the idea of decoupling the number Storage from the number Type might be an interesting idea...
13:57 smuj rakudo: say 5..8;
13:57 p6eval rakudo 0d4fe0: OUTPUT«5678␤»
13:58 smuj rakudo: say "5"..8;
13:58 p6eval rakudo 0d4fe0: OUTPUT«5678␤»
13:58 smuj rakudo: say "5"..9;
13:58 p6eval rakudo 0d4fe0: OUTPUT«5678910111213141516171819202122232425​26272829303132333435363738394041424344454647​48495051525354555657585960616263646566676869​7071727374757677787980818283848586878889␤»
13:58 smuj hmmmm!!
14:00 ruoso because 1i is an imaginary number that might be stored as an integer
14:01 SmokeMachine joined #perl6
14:01 moritz_ ruoso: don't we do that already? (the decoupling, that is)
14:02 moritz_ all number except Complex do the Num role
14:02 moritz_ and they are stored as int, num or int64 or whatever
14:03 ruoso right... it's just that the "types" part is kinda weird in rakudo now..
14:03 * ruoso doesn't quite like the "Num" role
14:03 ruoso after all, complex numbers are numbers too
14:03 moritz_ that's probably because the spec is less-than-awesome in that respect
14:08 colomon Actually, as nearly as I can tell the spec is completely silent on those issues.  But maybe I'm looking in the wrong spot?
14:10 ejs2 joined #perl6
14:10 ruoso colomon, yeah... I was just looking for details on that part as well, and they're just missing
14:13 * pmichaud times his built-in operator overloading patch to see how much of a speed hit we take.
14:13 ruoso I think we could define the number "Conceptual Types" and the number "Storage Types"
14:15 moritz_ pmichaud: does it pass spectest?
14:17 smuj perl6: say "5"..8;
14:17 p6eval elf 28078, pugs, rakudo 0d4fe0: OUTPUT«5678␤»
14:18 smuj perl6: say "5"..18;
14:18 colomon ruoso: Looking at the functions Num supports, I do think a lot of them don't make particularly great deal of sense for Complex.
14:18 p6eval elf 28078, pugs: OUTPUT«56789101112131415161718␤»
14:18 p6eval ..rakudo 0d4fe0: OUTPUT«␤»
14:18 ruoso colomon, I see.. but "Num" is a bad name for that
14:18 colomon ruoso: but it might mean Real is a better name.
14:19 ruoso colomon, probably
14:19 smuj pugs: say "5"..9;
14:19 p6eval pugs: OUTPUT«56789␤»
14:22 Psyche^ joined #perl6
14:25 pmichaud moritz_: (operator overloading & spectest) -- spectest is what I'm using to time the speed hit :)
14:25 colomon ruoso: Actually, I get fuzzy on the usefulness of roles in cases like this.
14:26 kidd_ joined #perl6
14:26 ruoso colomon, is "fuzzy" good or bad?
14:26 pmichaud so far it seems to be passing the spectests.  Since the operator I chose to refactor first is infix:<+>, that's probably a good sign :)
14:26 moritz_ pmichaud: that's not directly an answer to my question - they can run even if some of them fail
14:26 colomon ruoso: fuzzy bad
14:26 moritz_ ok, that is.
14:27 colomon ruoso: What is the advantage of having a role Num rather than just taking Any objects that have +, -, * defined (etc)?
14:27 moritz_ colomon: that answer is that you need something more specific to dispatch to
14:28 colomon moritz_: how so?
14:28 moritz_ suppose you have a multi (Any, Any)
14:28 ruoso the role there works as an Interface
14:28 moritz_ and that coerces both arguments to a number
14:28 moritz_ but they are not of the same type
14:29 moritz_ then when you re-dispatch to infix:<+> again
14:29 moritz_ you get the (Any, Any) multi again
14:29 pmichaud it's possible that (Any, Any) can be implemented w/o a redispatch.
14:29 pmichaud This is what Rakudo does now.
14:30 pmichaud (it's probably semantically wrong, though)
14:30 moritz_ unless you want to define n**2 multis for n numeric types
14:30 moritz_ pmichaud: you can't as soon as you honour lift-statements
14:32 pmichaud hmmm, spectest finished.
14:32 pmichaud that was... quicker than I expected.
14:32 rfordinal joined #perl6
14:33 colomon I'm thinking of, say, a 3D vector class.  If we had the Num role that Complex can do, can Vector3D do Num as well?
14:34 colomon Vector3D wouldn't have a well-defined multiply operation which works on other Vector3Ds, but it would have it against "scalar" numbers.
14:36 colomon I guess you could have Group and Ring roles...
14:38 ruoso the changes to perl6-project.org already propagated... could anyone check if it works in other browsers/OSs
14:38 ruoso ?
14:39 pmichaud ruoso: box sizes changed...?
14:39 M_o_C joined #perl6
14:39 ruoso pmichaud, they are no longer absolute-sized
14:39 pmichaud the "Community" box is no longer large enough to hold the text in my browser (FF 3, Linux)
14:40 pmichaud the text bleeds off the bottom.
14:40 pmichaud also the boxes are much thinner than they were previously.
14:40 pmichaud I liked the fatter boxes better, fwiw
14:40 ruoso my intention was not to make them thinner
14:41 ruoso just to make them scale properly for people with bigger fonts
14:41 ruoso pmichaud, would you mind providing a screenshot?
14:41 moritz_ ruoso: but the text should *not* be larger than the box.
14:42 ruoso it shouldn't indeed...
14:42 ruoso I think I know what the problem is...
14:42 colomon moritz_: Is the idea you're talking about that the Num role basically means you can convert whatever type you have to a double?
14:42 ruoso the headers in the boxes are bigger than they were
14:42 moritz_ colomon: no
14:43 ruoso supposedly to a Number, but it's ruling out Complex currently
14:43 zamolxes joined #perl6
14:44 iblechbot joined #perl6
14:44 moritz_ ruoso: http://moritz.faui2k3.org/tmp/perl6.org.png
14:45 moritz_ it shows at least the overflow of the Community box
14:45 pmichaud moritz's screenshot looks like mine
14:47 pugs_svn r28079 | ruoso++ | [perl6-projects.org] the last change made it look wrong for people with small fonts
14:47 ruoso http://svn.pugscode.org/pugs/docs/fe​ather/perl6-projects.org/index.html
14:48 ruoso moritz_, pmichaud, ^^
14:48 pmichaud hasn't updated yet on my browser
14:48 ruoso pmichaud, look at the svn link
14:49 pmichaud oh yes, much better
14:49 pmichaud ruose++
14:49 pmichaud did the font change (say in the intro text at the top?)
14:49 pmichaud it looks different
14:49 pmichaud ruoso++  # fixing earlier typo
14:50 ruoso pmichaud, my changes supposedly didn't change the fonts...
14:51 pmichaud okay, I might just be misremembering
14:52 ruoso but some sizes are different indeed, since they were not fully scalable
14:52 ruoso so now they depend more on your local settings
14:52 pmichaud -    font: normal bold 12pt sans-serif;
14:53 pmichaud that probably explains the difference
14:53 ruoso pmichaud, that is inherited from other elements
14:53 M_o_C joined #perl6
14:55 ruoso pmichaud, hmm... wait... the font-weight in the header is different indeed...
14:55 pmichaud right
14:55 pmichaud it's not bold in my browser anymore
14:55 pmichaud screenshots coming
14:55 * ruoso fixing
14:55 pugs_svn r28080 | ruoso++ | [perl6-projects.org] make the intro text bold again
14:55 ruoso pmichaud, check the svn link again
14:56 pmichaud okay, now the text is as before
14:56 pmichaud there's less whitespace between the boxes.  Don't know if that's important, but whitespace is often a good thing
14:57 ruoso pmichaud, that was to giv more width to the boxes...
14:58 ruoso but I should probably make the entire site larger (in em), then set the whitespace back
14:58 zloyrusskiy joined #perl6
14:59 moritz_ then we risk having a line break after the first two boxes
14:59 pmichaud the link text at the bottom changed size also
14:59 pmichaud anyway, those are the changes I notice
14:59 moritz_ maybe we should make it a table layout
14:59 moritz_ I don't like that for most sites, because it enables horizontal scrolling in some cases
15:00 moritz_ but since our boxes are so small, maybe horizontal scrollling is not too bad
15:00 zloyrusskiy joined #perl6
15:01 jnthn pmichaud: oh hai :-)
15:02 pmichaud the new layout also moves the "download" box quite a bit lower in the overall display
15:02 ruoso moritz_, table for layout is not very good idea...
15:03 pmichaud I think the text at the bottom should be a bit smaller, overall.  It's too big now (compared to what it was before)
15:04 moritz_ ruoso: why?
15:04 pugs_svn r28081 | ruoso++ | [perl6-projects.org] make the overall width bigger, set a bit more margin between the boxes and reduce the size of the font in the footer
15:04 ruoso moritz_, because it makes the content layout-dependent
15:04 ruoso pmichaud, moritz_, see the svn link again
15:05 pmichaud ruoso:  much better on footer text
15:05 moritz_ ruoso: what do you mean by "makes the content layout-dependent"?
15:05 ruoso moritz_, when you see the content without the stylesheet
15:05 KyleHa joined #perl6
15:05 ruoso for accessibility purposes
15:05 pmichaud I'm done with my bikeshedding for now :)
15:06 jnthn pmichaud: how did the operator changes go?
15:07 moritz_ ruoso: then a table is not much worse than what we have now.
15:07 pmichaud jnthn: they seem to be going well so far.  I'm just struggling with Complex and Parrot's "vtable MMD"
15:07 jnthn pmichaud: oh, that "fun" :-|
15:07 ruoso moritz_, try seeing the current page without a stylesheet... it will degrade gracefully in a understandable way
15:08 ruoso when someone sees it in a phone, it'll be usefull
15:08 pmichaud I wonder what it looks like in my phone (and if I can still do web accesses from my phone)
15:08 * pmichaud tries
15:10 abra joined #perl6
15:10 pmichaud looks like not.
15:10 pmichaud (I disabled web services for my phone last week)
15:10 ruoso pmichaud, you should have tested the site before that then ;)
15:10 j`ey joined #perl6
15:11 pmichaud you're correct, I should've done that.
15:11 pmichaud oh well, I have a good test site for when I go after a new smartphone in a few months :)
15:11 ruoso heh...
15:11 * ruoso lunch &
15:12 j`ey ctrl-z
15:12 lisppaste3 colomon pasted "Use of Num?" at http://paste.lisp.org/display/86128
15:13 ejs joined #perl6
15:13 colomon This is what I was trying to get at earlier... what is the point of using Num in that sub?
15:14 pmichaud in this case it would be to constrain the sub to only working with Num arguments
15:14 j`ey left #perl6
15:19 colomon Right -- but unless I want to do something special if the argument is a Num, there's no point in that, is there?
15:20 colomon (Hypothetical minor performance improvements set aside for the moment.)
15:20 zamolxes about http://perl6.org/, don't you think it would be better to see the download link without a scroll? people expect a call-to-action, an obvious bannana. Imho a good position would be inside the top blue rectangle
15:20 donaldh joined #perl6
15:21 moritz_ zamolxes: thanks for the feedback. We're having another design in the making already where most people will see a download link on the first sreen page
15:22 SmokeMachine joined #perl6
15:23 payload joined #perl6
15:24 jaldhar joined #perl6
15:24 colomon pmichaud: I should say that I'm trying to think about what the math types should look like.
15:24 pmichaud (one phone)
15:24 colomon and whether it makes sense for Num to include Complex or not.
15:26 rdice joined #perl6
15:28 payload1 joined #perl6
15:30 pmichaud I think this discussion has already been had and the decision was what we have now
15:31 colomon pmichaud: (assuming you're talking to me)  What do we have now?  There's virtually nothing in the specs on numerical types, and in practice most of the type-related stuff doesn't seem to work in Rakudo at the moment.
15:31 desertm4x joined #perl6
15:31 pmichaud colomon: I mean the decision that Num did not include Complex
15:33 pmichaud jnthn: looks like Parrot's MMD doesn't play well with ObjectRef
15:33 finanalyst left #perl6
15:33 pmichaud (the vtable MMD, that is)
15:40 pmichaud just means we need a few extra deobjectref opcodes in useful places, I guess.
15:40 payload joined #perl6
15:43 colomon pmichaud: What is a Num, anyway?  The spec seems to imply it is a double?
15:44 moritz_ a Num is an abstract concept for a real number
15:44 moritz_ which can be an int, a float, a double, a rational, or high precision thing or whatnot
15:46 pmichaud jnthn: anyway, for the moment I've ended up putting everything into the setting -- I'm now seeing how big a performance hit we take from doing that
15:51 colomon moritz_: How does that work?
15:51 ejs joined #perl6
15:52 moritz_ colomon: all numeric types implement the Num role
15:52 moritz_ that's it.
15:53 colomon Isn't Num a class?
15:53 justatheory joined #perl6
15:54 moritz_ not primarily
15:56 synth joined #perl6
15:56 colomon okay, going the other way around: how do you implement the Num role?
15:56 moritz_ that's a much more interesting question
15:57 moritz_ maybe by defining common operations
15:57 moritz_ class Int does Num { method sin { ... } }
15:58 moritz_ but maybe one also needs to either overload primitive operations like +, or conversion to more low-level types
15:59 zloyrusskiy joined #perl6
15:59 colomon That reminds me: is there a distinction between +$a and $a.Num  ?
15:59 pmichaud yes.
16:00 pmichaud +$a could return a Complex
16:00 pmichaud (or something that isn't a Num)
16:01 kid51 joined #perl6
16:01 moritz_ so could .Num, in theory (but it would break all code depending on it)
16:02 moritz_ I mean it's just ordinary multi dispatch
16:02 moritz_ you can write a class whos .Num methods returns a Str
16:02 moritz_ but everybody who uses it will be greatly confused
16:02 pmichaud right; my point is that even without doing something like that there's a difference between +$a and $a.Num
16:03 pmichaud my $a = "3+4i";   say +$a;    say $a.Num;
16:03 pmichaud the first say will probably do what you expect.  The second will probably return a failure
16:03 kid51 left #perl6
16:04 nihiliad joined #perl6
16:04 colomon Is there some sort of default relationship between the two?
16:05 andrewz joined #perl6
16:05 pmichaud (operator overloading)  all spectests now pass, looks like at most about a 5% performance hit
16:05 jnthn pmichaud: Go for it then. :-)
16:05 TimToady they boty probably call Num($x) by default
16:05 pmichaud let's try infix:<-> and see what we get
16:05 TimToady *both
16:06 andrewz hi i have a haskell program but want to use a perl script http://softlayer.dl.sourceforge.net/pr​oject/ssspl/ssspl/sss.pl%20v0.1/sss.pl .  Can i use pugs to do this, and how well would it work?
16:06 TimToady but the definition of + can be overridden by inner lexical scopes, while the definition of .Num can be overridden by derived classes
16:06 colomon TimToady: you realize "they both probably call Num($x) by default" makes me want to cry....
16:07 TimToady I can think of several reasons for that :)
16:07 colomon Hint: not with joy.
16:08 TimToady more specifically, .() dispatch on the Num type, a low-level primitive
16:08 colomon okay, that's an interesting twist.
16:08 zloyrusskiy joined #perl6
16:09 TimToady part of our problem is that .() currently means two different things
16:09 colomon Do you mean the num type or the Num type?
16:09 TimToady num is just double
16:09 TimToady native
16:09 pmichaud actually, the Num type object.
16:09 TimToady Num is the abstract role
16:09 TimToady representing reals
16:10 TimToady but there's the .() that triggers multi dispatch, which is how the language is defined, basically
16:10 TimToady then there's methods, which are lower level, and controlled only by the class hierarchy
16:10 TimToady and then down at the bottom, there's how each object responds to invocation
16:11 TimToady when I say Num() I mean how Num responds to invocation, not a Num multi
16:11 TimToady it's possible we should find a way to make that clearer
16:13 cdarroch joined #perl6
16:13 colomon You've got me scratching my head here, I must admit.
16:13 TimToady that's better than crying, barely :)
16:14 colomon stepping back a moment to what pmichaud was saying:
16:15 colomon Is the ideal difference that +$a means "make $a into the sort of object one might do math upon", whereas $a.Num means "make $a into a real number"?
16:15 w0rmie joined #perl6
16:16 colomon (That's assuming some bozo hasn't overloaded either of those in an unnatural way.)
16:16 TimToady yes, basically...Num is a particular named type, so is a bit more specific than +
16:16 Su-Shee joined #perl6
16:16 Su-Shee back.
16:16 TimToady wb
16:17 M_o_C joined #perl6
16:17 colomon TimToady++: That I can understand.
16:17 pmichaud Su-Shee++  # deserves another karma point for the design leading up to http://perl6.org
16:17 TimToady so + is free to return any type it reasonably feels like, Int, Rat, Num, Complex
16:17 TimToady whereas if you actually name a type, there's more pressure to actually return that type :)
16:18 hehehehe joined #perl6
16:18 colomon Is there a class / role hierarchy for this out there somewhere?
16:18 hehehehe left #perl6
16:18 colomon I thought Ints and Rats were types of Nums.
16:19 TimToady it's tricky working out such a network of types in practice, so we feel it's better to let the implementation document itself for now, and later describe what we end up with in external docs
16:19 Su-Shee ha! niiice. perl6.org and perl6-projects.org now.
16:20 TimToady they are all interrelated in strange ways
16:20 TimToady people always come to grief in trying to construct a numeric class hierarchy
16:20 TimToady so we're trying it with roles instead
16:20 colomon TimToady: At the moment, it seems like the implementation is all over the place....
16:20 pmichaud Rakudo's implementation is a bit all over the place, yes.
16:20 pmichaud there are a large number of reasons for that
16:21 pmichaud one of which is that the spec changes as we learn more about the implementation
16:21 pmichaud it's cooperative evolution, and Rakudo isn't always able to adapt to new specification details as quickly as we identify them
16:21 TimToady but the relationships of one numeric type to another don't tend to analyze nicely in liskovian terms
16:22 pmichaud so some pieces of the Rakudo implementation are still based on ideas from long ago (e.g., before we really had the current type coercion mechanism)
16:22 colomon TimToady: sure, that's very understandable.
16:22 TimToady it's more of a tagmemic setup, where you have these various different kinds of things, and "I can use an X to mean Y"
16:23 quietfanatic joined #perl6
16:23 TimToady plus pragmatic constraints come into play
16:23 colomon I wandered off to this tangent wondering about the trig functions.
16:23 TimToady there's a sense in which everything is a Complex
16:23 TimToady but you don't want to store everything as a Complex
16:24 TimToady so we end up with subset types that obey certain constraints in order to achieve certain storage/performance goals
16:24 quietfanatic I always figured I'd be able to say sub x (Num $a) {...} and then say "34".x, because the string can convert into a Num.
16:24 colomon well, there's also the sense where a Complex is two of a real type, too.
16:24 quietfanatic *method x
16:25 TimToady we're working on a notation to mean that
16:25 quietfanatic ...oh right
16:25 TimToady method x (Num() $a) {...}
16:25 zloyrusskiy joined #perl6
16:26 TimToady would mean (Any $a) for binding, but coerce $a to Num
16:26 pmichaud TimToady: is that instead of "as Num"?
16:26 pmichaud or is "as Num" going away?
16:26 quietfanatic I see.
16:26 TimToady where Num() in a declaration is short for Num(Any)
16:26 ihrd joined #perl6
16:26 quietfanatic But what if the particular Any can't be converted to a Num?  Does it search other multis or fail here?
16:26 TimToady I suspect this is more general
16:27 TimToady for a multi, if it got here, it's already searched the more specific candidates
16:27 TimToady so it should fail
16:28 TimToady the sig probably inserts itself into the candidate list both as Any and as Num
16:28 quietfanatic I mean is multi x (Any $a, Any $b) not more general than multi x (Num() $a, Num()$b) ?
16:28 pmichaud that last line seems weird
16:28 jnthn I think those will conflict.
16:28 jnthn (ambiguous)
16:29 jnthn If that is just being used as "coerece to Num" syntax anyway.
16:29 pmichaud what about    sub foo( Num(XYZ) $a )
16:29 pmichaud would that accept Num | XYZ as an argument?
16:29 pmichaud or just XYZ ?
16:29 TimToady Num(), Num() implies an Any, Any already, along with a Num(), Num()
16:29 jnthn Just XYZ.
16:29 TimToady and probably the crosses too
16:29 TimToady *along with a Num,Num
16:29 jnthn TimToady: The type we coerce to isn't a constraint.
16:29 quietfanatic But then if I wanted that behavior, I'd have to write a seperate multi for evey possible Num conversion.
16:30 quietfanatic Is there a way I can restrain a Multi to those Anys than can be converted to Nums?
16:30 jnthn yes
16:30 pmichaud jnthn: that's why I'm thinking that  Num(Any)   is different from    Any $x as Num
16:30 jnthn pmichaud: My expectation was the latter was going away.
16:30 quietfanatic I suppose (Any where {.can('Num')}) or something
16:30 jnthn pmichaud: To be replaced by Num(Any)
16:30 jnthn quietfanatic: That's what I was just about to type. :-)
16:30 pmichaud jnthn: I think that conflicts with (more)
16:31 pmichaud 16:28 <TimToady> the sig probably inserts itself into the candidate list both as Any and as Num
16:31 TimToady well, where Num() would try the coercion
16:31 TimToady but then it would throw it away
16:31 jnthn pmichaud: "probably" = "not before I try and argue that we don't" ;-)
16:31 pmichaud jnthn: "probably"  sounds stronger than "I said 'maybe'"  :-)
16:32 TimToady we're talking about a way not to have to write anything in the Any package
16:32 TimToady but autogenerating the Any coercion variants automatically
16:32 pmichaud right (more)
16:32 pmichaud so what I'm reading is
16:32 pmichaud sub foo( Num(Any) $a )
16:33 pmichaud means
16:33 ruoso TimToady, re "you don't want to store everything as a Complex" -- that was why I was thinking that we should spec two different aspects... the "Conceptual Types", which relate to the math concepts, and the "Storage Types" which relate to how they're stored
16:33 TimToady ruoso: we may end up with that
16:33 pmichaud "I really want a Num here.  However, if I get an Any, then I'll accept that and have it automatically convert to a Num"
16:33 pmichaud that's different from
16:33 ruoso what I'm not confortable is that Num excludes Complex
16:33 TimToady but the mathematicians have already specced the conceptual types :)
16:33 pmichaud or more generally
16:33 pmichaud sub foo( Num(XYZ) $a )
16:34 pmichaud "I really want a Num here.  But I'll accept an XYZ object also, and convert it to a Num"
16:34 ruoso TimToady, that's the point, we could just use that
16:34 pmichaud that's different from
16:34 pmichaud sub bar( XYZ $a as Num )
16:34 pmichaud which means
16:34 TimToady ruoso: I can't timeshare this discussion; brane too small
16:34 pmichaud "I'll only accept an XYZ argument here, and then I'll convert it to a Num"
16:35 jnthn pmichaud: Hmm, true.
16:35 TimToady please ask again later
16:35 jnthn I wonder if both are useful.
16:35 [particle] "we've secretly replaced your language designer with a magic 8-ball.  let's see what happens..."
16:36 jnthn The problem I really worry about is that TimToady talked about it somewhat as generated a set of candidates.
16:36 jnthn I think we'll struggle on the type narrowness analysis if we do anything other than that.
16:36 TimToady the latter form is really the primitive that would be autogenerated by Num(XY)
16:36 TimToady *XYZ
16:36 jnthn *but* that means such syntax in an only won't fly.
16:36 pmichaud but then the latter form would only accept XYZ arguments
16:36 jnthn Or will have to mean a rather different thing to the dispatcher.
16:36 pmichaud it wouldn't accept Num
16:36 jnthn pmichaud: IMO that's a fine semantic.
16:37 jnthn It's a lot clearer what it does.
16:37 pmichaud jnthn: which one?  I'm seeing two semantics.
16:37 jnthn Having it accept Num also is a bit too magic for me.
16:37 jnthn I mean, sure, it will anyway, as Num is a subclass of Any.
16:37 jnthn In that specific case.
16:37 pmichaud yes, for the Any case it works out okay
16:38 pmichaud I'm curious about the general case
16:38 jnthn Right.
16:38 jnthn The general case I'd ratehr it was a constraint + a coercion.
16:38 pmichaud 16:28 <TimToady> the sig probably inserts itself into the candidate list both as Any and as Num
16:38 pmichaud confused me.
16:38 jnthn And we treat knowing not to coerce as an optimization.
16:38 jnthn pmichaud: I'd really rather we didn't go down that road.
16:38 jnthn One candidate becoming many candidates bothers me a bit.
16:39 colomon ruoso: Apparently Num is officially real numbers.  Seems fair enough to me.
16:39 jnthn The way this will work out if the types are from different hierarches also bothers me though, and there's no way to not probably tie ourselves in knots with the narrowness analysis without having many candidates.
16:39 pmichaud if   Num(XYZ) $x   is the same as   XYZ $x as Num, I'm not sure the syntactic sugar is a big win
16:40 TimToady indeed
16:40 ruoso colomon, isn't a Complex *Number* a *Number*?... having "Num" excluding Complex seems like a huge semantical goof
16:40 TimToady I want to be able to say my Int() $x = prompt ": "
16:41 jnthn pmichaud: Quite possibly not.
16:41 pmichaud hmmm
16:41 pmichaud what would one make of
16:41 jnthn I need to go now - will backlog.
16:41 pmichaud my Int(XYZ) $x = ...   ?
16:41 pmichaud I will have to leave in 4 mins also
16:42 ruoso colomon, my point is that the default *storage type* for a Number is "Float"
16:42 TimToady with the more powerful semantics would accept either Int or XYZ,and return Int
16:42 quietfanatic That would mean $x stores an Int, but can be assigned an XYZ as well, which is converted.
16:42 pmichaud except if XYZ is a type constraint, I'd take it to mean "can only be assigned an XYZ"
16:42 quietfanatic But isn't that how my Int $x normally works?  Converting on input?
16:42 TimToady no
16:43 pmichaud no,  my Int $x   means $x can only be assigned or bound to something that "does Int"
16:43 pmichaud rakudo:  my Int $x = "3";
16:43 p6eval rakudo 0d4fe0: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (/tmp/E3YgCCmAyX:2)␤»
16:43 quietfanatic I see
16:43 ruoso quietfanatic, no automatic cast in that case
16:43 ruoso if you use strong typing, you want strong typing
16:45 TimToady well, but sometimes you only want it *some* :)
16:46 jnthn OK, really gotta go...
16:46 jnthn bbl
16:50 rindolf joined #perl6
16:50 rindolf http://community.livejournal​.com/shlomif_tech/31840.html - new post about Haskell and Perl. I ask there about p6.
16:50 ruoso TimToady, then you just use *some* ;)
16:53 moritz_ rakudo: say "Hv o edyu IPtdy".comb Z "aeyura orSC oa?".com
16:53 p6eval rakudo 0d4fe0: OUTPUT«Method 'com' not found for invocant of class 'Str'␤»
16:53 moritz_ rakudo: say "Hv o edyu IPtdy".comb Z "aeyura orSC oa?".comb
16:53 p6eval rakudo 0d4fe0: OUTPUT«Have you read your SICP today?␤»
16:53 frederico joined #perl6
16:53 moritz_ rindolf: there you go
16:54 rindolf moritz_: thanks.
16:54 rindolf Z is Zip Iguess.
16:54 moritz_ I don't have any motivation to golve that further ;-)
16:54 moritz_ aye
16:54 rindolf You can use map $_.comb
16:54 moritz_ I leave that to you ;-)
16:54 rindolf Can one do Z([1,2,3],[4,5,6])
16:55 moritz_ no
16:55 rindolf rakudo: say Z([1,2,3],[4,5,6])
16:55 p6eval rakudo 0d4fe0: OUTPUT«Could not find non-existent sub Z␤»
16:55 moritz_ there's a zip() function, but I doubt it's implemented yet
16:55 moritz_ and there's [Z], but that needs captures/parcels first
16:56 ruoso TimToady, did the other task^Wdiscussion got on hold? can you context switch^W^W think about the nuber type system?
16:56 quietfanatic rakudo: &zip := &infix:<Z>; say zip(<a b>, <c d>, <e f>)
16:57 p6eval rakudo 0d4fe0: OUTPUT«acebdf␤»
16:57 quietfanatic There, implemented :)
16:59 colomon ruoso: Scroll back and look at what they told me while you were gone.
16:59 rindolf quietfanatic: thanks.
16:59 rindolf quietfanatic++
16:59 rindolf moritz_++
17:00 rindolf Let me see.
17:00 ruoso colomon, I saw... but I don't agree with it ;)
17:00 rindolf rakudo: infix:<Z>(map $_.comb, "Hv o edyu IPtdy","aeyura orSC oa?")
17:00 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ":<Z>(map $"␤in Main (src/gen_setting.pm:3454)␤»
17:01 ruoso I really don't think it's sane to spec that Complex is not a Num
17:01 rindolf rakudo: infix:<Z>(map .comb, "Hv o edyu IPtdy","aeyura orSC oa?")
17:01 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ":<Z>(map ."␤in Main (src/gen_setting.pm:3454)␤»
17:01 ruoso if Num is conceptually the real numbers, so let's just call it Real
17:01 rindolf Can anyone improve on this?
17:01 moritz_ &infix:<Z>(map *.comb,  "Hv o edyu IPtdy", "aeyura orSC oa?")
17:01 moritz_ rakudo: &infix:<Z>(map *.comb,  "Hv o edyu IPtdy", "aeyura orSC oa?")
17:01 p6eval rakudo 0d4fe0:  ( no output )
17:02 moritz_ rakudo: say &infix:<Z>(map *.comb,  "Hv o edyu IPtdy", "aeyura orSC oa?")
17:02 p6eval rakudo 0d4fe0: OUTPUT«Hv o edyu IPtdyaeyura orSC oa?␤»
17:02 moritz_ rakudo: say &infix:<Z>(map {[.comb]},  "Hv o edyu IPtdy", "aeyura orSC oa?")
17:02 quietfanatic map returns a single list here.
17:02 ruoso moritz_, rakudo doesn't do list flattening-unflattening correctly yet
17:02 p6eval rakudo 0d4fe0: OUTPUT«H v   o   e d y u   I P t d ya e y u r a   o r S C   o a ?␤»
17:02 ruoso quietfanatic, it wasn't supposed to
17:02 moritz_ ruoso: I know
17:03 quietfanatic Ah, it's suppose to match the dimensionality of its arguments.
17:03 moritz_ it's just a not-yet-implemented feature in rakudo
17:04 lionWrk joined #perl6
17:07 ruoso rakudo: [Z] map *.comb, "Hv o edyu IPtdy", "aeyura orSC oa?";
17:07 p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near "map *.comb"␤in Main (src/gen_setting.pm:3454)␤»
17:07 moritz_ [Z] is also NYI
17:08 ruoso hmm... is there any plan on making the meta-ops parsing dynamic?
17:08 moritz_ presumably STD.pm adoption
17:08 ruoso alrigth
17:09 moritz_ but pmichaud is re-working some of that operator stuff right now
17:09 moritz_ maybe it'll be a bit earlier then
17:16 moritz_ http://www.perlmonks.org/?node_id=791486
17:16 moritz_ anybody wants to chime in with Perl 6 interests?
17:26 kent\n joined #perl6
17:29 SmokeMachine joined #perl6
17:31 abra joined #perl6
17:39 andrewz left #perl6
17:39 jferrero joined #perl6
17:47 mberends joined #perl6
17:59 Tene rakudo: sau (0+1i)**2; say (0+1i)*(0+1i);
17:59 p6eval rakudo 0d4fe0: OUTPUT«Could not find non-existent sub sau␤»
17:59 Tene rakudo: say (0+1i)**2; say (0+1i)*(0+1i);
17:59 p6eval rakudo 0d4fe0: OUTPUT«1␤-1+0i␤»
17:59 moritz_ that's pretty much broken
18:00 Tene is it already reported?
18:00 moritz_ yes
18:00 moritz_ (back in the auld days)
18:01 moritz_ we also have tests for that
18:01 jan_ joined #perl6
18:03 colomon Seems like it would be easy to fix in the setting?
18:03 moritz_ colomon: patches welcome
18:03 colomon Is that the appropriate place to do it?  I'd certainly be happy to try.
18:04 colomon That was actually going to be my next question for pmichaud et al: what can mere mortals do to help with the numeric situation in Rakudo?
18:04 moritz_ colomon: src/setting/Complex.pm or so
18:05 colomon No such file yet, is there?
18:05 moritz_ not yet
18:05 moritz_ so add one, and add it to build/Makefile.in like the other files in the setting
18:06 colomon If you add a file there, will it automagically be picked up...
18:06 colomon ah, I see
18:06 moritz_ colomon: see also: docs/guide_to_setting.pod
18:06 colomon Let me see what I can do here.
18:06 colomon How do you turn pod into something easy to read?
18:06 moritz_ perldoc $file
18:07 colomon even with p6?
18:09 PZt joined #perl6
18:10 colomon ooo, pod2html guide_to_setting.pod > guide_to_setting.html works quite nicely.  moritz_++
18:10 moritz_ we use perl 5 POD in rakudo
18:10 moritz_ (except in the setting ;-)
18:12 iblechbot joined #perl6
18:27 patrickas joined #perl6
18:31 patrickas perl6: say 3|2;
18:31 p6eval rakudo 0d4fe0: OUTPUT«any(3, 2)␤»
18:31 p6eval ..pugs: OUTPUT«any(VInt 2,VInt 3)␤»
18:31 p6eval ..elf 28081: OUTPUT«3␤»
18:33 hugme joined #perl6
18:35 moritz_ let me introduce 'hugme', a new bot that can add contributors to github repositories
18:35 moritz_ but more importantly it can hug people
18:35 eMaX joined #perl6
18:35 moritz_ hugme: hug colomon
18:35 * hugme hugs colomon
18:35 moritz_ hugme: add masak to perl6-examples
18:35 colomon Thanks, I think I needed a hug.  :)
18:36 PZt joined #perl6
18:36 moritz_ colomon: you're welcome
18:36 Su-Shee wow, perl love on demand :)
18:36 colomon Complex exponentiation more complicated than I thought, but with luck I'll have something sorted out by the time I reach my parents' house.
18:36 moritz_ now why doesn't this stupid bot doesn't respond to my second command?
18:38 patrickas moritz_: maybe it needs a hug?
18:38 moritz_ hugme: hug hugme
18:38 * hugme hugs hugme
18:38 moritz_ hugme: add masak to json
18:38 moritz_ patrickas: didn't help :(
18:39 patrickas sorry :(
18:39 moritz_ well, it's back to debuggin mode then ;-)
18:40 patrickas well at least it's spreading the love :-) that part is working fine :-)
18:40 moritz_ but that's not the part I spent 3 hours on today
18:40 moritz_ ;-)
18:41 rindolf moritz_: thanks for commenting on my blog.
18:41 moritz_ rindolf: you're welcome
18:41 patrickas hehehe :-)
18:41 patrickas hugme: hug moritz_ and stop wasting his time.
18:41 * hugme hugs moritz_
18:41 rindolf moritz_: :-)
18:42 rindolf hugme: hug patrickas
18:42 * hugme hugs patrickas
18:42 Su-Shee .oO(and I always thought I'm just being metaphorical with spreading perl love.. ;)
18:43 rindolf hugme: hug Su-Shee
18:43 * hugme hugs Su-Shee
18:43 rindolf hugme: help
18:43 moritz_ rindolf: NYI
18:44 Su-Shee today I think, I missed perl 6 ops dearly.
18:45 hugme joined #perl6
18:45 moritz_ hugme: add masak to json
18:46 [particle] hugme: hug chromatic
18:46 * hugme hugs chromatic
18:48 hugme joined #perl6
18:53 hugme joined #perl6
18:53 moritz_ hugme: add masak to json
18:54 jrtayloriv joined #perl6
18:54 hugme moritz_: successfully added masak to json
18:54 moritz_ YaY, it finally works
18:56 * patrickas hugs hugme
18:56 patrickas it derserved it :-)
18:57 hugme joined #perl6
18:59 moritz_ hugme: list projects
18:59 hugme moritz_: I know about these projects: tufte, svg-plot, perl6-examples, json
18:59 jaldhar joined #perl6
18:59 Su-Shee moritz_: oh, that's cool.
18:59 moritz_ Su-Shee: do you want commit access to any of those? ;-)
19:00 Su-Shee moritz_: later, probably to examples.
19:01 moritz_ I need to get that script on feather now
19:02 desertm4x joined #perl6
19:03 Su-Shee ah, but what i've wanted to ask: do I have to write parrot code or rakudo code to do a release or is it really "just" wrapping all things nicely?
19:03 moritz_ Su-Shee: I did neither for the release
19:04 Su-Shee in that case I'd like to do a release this year.
19:05 moritz_ Su-Shee: all the slots this year are already taken
19:05 [particle] moritz_: jnthn will probably want you to add blizkost
19:05 moritz_ Su-Shee: the first I could offer woudl be 2010-02
19:05 Su-Shee whut?! unbelievable. :) ok, I'll take it. :)
19:05 moritz_ [particle]: if he does so, he has to hand me he github token :/
19:06 TimToady Su-Shee: you might find someone willing to trade
19:07 Su-Shee TimToady: well, it's a good sign having more people actually wanting to do something but too few.. :)
19:07 moritz_ Su-Shee: be sure to submit a send in a signed CLA
19:08 Su-Shee moritz_: I still have my CV somewhere and my article-list.. and a notarized copy of my diploma.
19:08 moritz_ Su-Shee: you don't need those to become a committer ;-)
19:09 moritz_ Su-Shee: http://www.perlfoundation.org/​contributor_license_agreement
19:09 Su-Shee moritz_: I thought you were kidding.. :)
19:10 * moritz_ is german. moritz_ never tells jokes.
19:10 M_o_C woot, I thought moritz_ is from austria?
19:11 moritz_ not quite ;-)
19:11 Su-Shee ah. good point. so I sent my paperwork along. I'm german too and german know a thing or two about bureaucracy.
19:11 Su-Shee +s
19:14 masak joined #perl6
19:14 masak hugme: hug moritz_
19:14 * hugme hugs moritz_
19:14 masak :)
19:14 moritz_ ;-)
19:14 pmichaud (src/setting/Complex.pm)  note that i've just added one here locally, so it might be worth waiting for that (in about 30 mins)
19:14 moritz_ masak: sorry for excessive hilighting :)
19:14 masak moritz_: no prob. :)
19:15 M_o_C moritz_: But you were born in austria, right?
19:15 moritz_ pmichaud: adding contributors to perl6-examples now works via IRC ;-)
19:15 pmichaud moritz++  excellent
19:15 moritz_ pmichaud: at least for a (now hardcoded) list of trusted people who are logged in to freenode
19:15 masak moritz_: for some reason, I was reminded of this: http://pbfcomics.com/?cid=PBF115-Hug_Bot.jpg
19:16 moritz_ the syntax ist 'hugme: add $user to $project'
19:16 moritz_ hugme: list projects
19:16 hugme moritz_: I know about these projects: tufte, svg-plot, perl6-examples, json
19:16 masak moritz_: would it be possible to add proto to that list?
19:16 alester joined #perl6
19:17 moritz_ lol (re comic)
19:17 moritz_ masak: it would, but you'd need to give me your github token for that
19:17 moritz_ (with all the security implications involved)
19:17 masak hm.
19:17 moritz_ that's not great, I know
19:18 masak how would it be stored?
19:18 masak (it's not you I don't trust, it's possible other factors.)
19:18 moritz_ as a plain text hex string
19:18 masak where?
19:18 moritz_ on feather2, and on my local (encrypted) hard disc
19:19 masak what would the permissions be on feather2?
19:19 pmichaud we could always move proto into the perl6 account :)
19:19 rindolf Hi alester
19:19 moritz_ (feather2 has far less users than the "normal" feather2, and no risky bots involved)
19:19 masak pmichaud: wrong direction :)
19:19 rindolf alester: I'd like to add a "Diversity statement" optional feature to Module-Starter.
19:19 moritz_ masak: currently I'm the only user on feather2, but Juerd has root access
19:19 alester rindolf: I don't.
19:20 rindolf alester: ah.
19:20 moritz_ masak: and I'd like to increase the bus number to maybe 2 or 3 additional admins (because perl6.org is hosted there)
19:21 masak moritz_: just to be clear here: we're talking about a file on the form .ssh/id_rsa? the one that has rw-user-only permissions on my computer?
19:21 pmichaud masak: no
19:21 pmichaud on github, go to your "account" page, then see the "API token"
19:22 pmichaud *that's* what gets used
19:22 masak oh.
19:22 pmichaud (iiuc)
19:22 masak that's a bit less bad.
19:22 pmichaud if you change your password on github, the api token changes
19:22 moritz_ which gives the user access to the github account, basically
19:22 pmichaud but someone knowing the api token can ... what moritz said
19:23 pmichaud I haven't been able to see if it's possible to change the account's email address
19:23 pmichaud (I tried but it didn't work)
19:23 pmichaud but certainly knowing the API token is sufficient to create and drop repositories
19:23 eMaX joined #perl6
19:24 nihiliad joined #perl6
19:24 pmichaud (changing the account's email address would make it possible for someone to take over the account)
19:24 TimToady hard to prevent man-in-the-middle attacks at the same time as installing your own man-in-the-middle :)
19:24 hugme joined #perl6
19:25 moritz_ masak: not that you must register with freenode (and log in) to use that part of "hugme"
19:26 masak sounds reasonable.
19:26 masak but I always do that anyway.
19:26 * masak hugs hugme
19:26 moritz_ great
19:26 sjohnson hugme, cute command name
19:27 rindolf TimToady: :-D
19:27 rindolf TimToady++
19:27 * moritz_ was inspired by audreyt++'s recent blog post
19:27 TimToady you can always trust Alice and Bob
19:27 masak hugme: list projects
19:27 hugme masak: I know about these projects: json, perl6-examples, proto, svg-matchdumper, svg-plot, tufte
19:29 moritz_ the hardest part of it all was to send an asynchronous whois request and have all the important data available when the server answers
19:32 pmichaud hugeme: add pmichaud to proto
19:32 pmichaud hugme: add pmichaud to proto
19:32 hugme pmichaud: successfully added pmichaud to proto
19:32 pmichaud \o/
19:33 moritz_ pmichaud: please verify on github if it worked
19:33 sjohnson hugme help
19:33 sjohnson hugme:help
19:33 sjohnson hugme: help
19:33 moritz_ NYI
19:33 moritz_ :(
19:33 pmichaud moritz_: that would be easier for masak++ to verify
19:33 masak pmichaud: hold on.
19:33 pmichaud (I'd have to do a commit or something like that)
19:33 moritz_ pmichaud: when you go on a repo page for which you are committer, you see a "your clone URL"
19:33 pmichaud maybe a clone would be sufficient, though.
19:33 pmichaud ahhhh
19:33 moritz_ otherwise it's just a public clone URL
19:34 pmichaud mine looks like a public clone url
19:34 masak pmichaud: I see you among the collaborators.
19:34 pmichaud okay, wfm
19:34 moritz_ you'd see two
19:34 pmichaud I only see one.
19:34 pmichaud but it might be a cache
19:35 masak aye.
19:35 masak or github being daft. that happens.
19:35 adam-pwgsc joined #perl6
19:37 pmichaud jnthn: ping
19:38 pmichaud (yay, infix:<-> now appears to be working.  spectest, then commit, then push if that's the case)
19:42 SmokeMachine joined #perl6
19:44 rfordinal3643 joined #perl6
19:45 hugme joined #perl6
19:45 moritz_ hugme: help
19:45 hugme moritz_: 'hugme: (add $who to $project | list projects | hug $nickname)
19:45 synth joined #perl6
19:46 hugme joined #perl6
19:47 moritz_ hugme: hug everybody
19:47 * hugme hugs everybody
19:47 dukeleto_ joined #perl6
19:47 moritz_ ok, now it runs on feather2
19:47 moritz_ if there's anything wrong with it, please kick it and tell me when I come back ;-)
19:48 patmat_ joined #perl6
19:48 awwaiid_ joined #perl6
19:50 Maddingue joined #perl6
19:50 gfldex joined #perl6
19:50 TimToady joined #perl6
19:50 nihiliad joined #perl6
19:50 patrickas joined #perl6
19:52 TimToady_ joined #perl6
20:02 rba joined #perl6
20:02 sjohnson masak, do you know anything about whether or not we will have to worry about tying hashes in Perl 6?
20:02 masak sjohnson: how do you mean?
20:02 niros joined #perl6
20:03 masak more precisely, how do you mean 'worry' and how do you mean 'tying hashes'?
20:03 sjohnson in p5, if you start adding elements to a hash, and you Dump it, it will reveal that the order you inserted values into it isn't what yuo will see on the screen
20:03 sjohnson unless you tie it with IxHash
20:04 masak sjohnson: I think someone will write an OrderedHash, and then you can use that.
20:05 masak sjohnson: the fact that ordinary hashes don't preserve the order for you is part of what makes them fast.
20:05 exekias joined #perl6
20:05 sjohnson oh i c
20:06 sjohnson i had a feeling there was a reason for it, but i trusted the higher power's judgement on that one :)
20:06 sjohnson cause i didn't know why myself in my meager state
20:06 masak sjohnson: I think you'd find the details of the reason interesting, too. check out this: http://en.wikipedia.org/wiki/Hash_function
20:07 diakopter hugme: hug you
20:07 * hugme hugs you
20:07 sjohnson hugme: hug diakopter
20:07 * hugme hugs diakopter
20:08 * masak is looking forward to hugme hugging its first channel troll
20:09 sjohnson masak: that troll will be corrected by the power of love
20:09 Su-Shee probably in april.. :)
20:09 masak
20:09 Su-Shee unicode 2665 ;)
20:09 masak ;)
20:10 frew joined #perl6
20:10 [particle] unfortunately, hugme doesn't take msgs
20:10 masak that could indeed be useful.
20:10 [particle] hugme: hug all trolls
20:10 * hugme hugs all
20:10 masak anonymous hugs :)
20:10 [particle] feh
20:11 [particle] masak: precisely
20:11 Su-Shee [particle]: for some alone time? ;)
20:11 diakopter TimToady: did 'troll' (in online context) come from "to be like a troll [under a bridge]" or "to fish by trolling"? or some other usage
20:11 reqamst hugme: hug hugme
20:11 * hugme hugs hugme
20:11 diakopter hugme: hug me
20:11 * hugme hugs me
20:12 * diakopter trolls only bots, usually.
20:12 [particle] diakopter: wikipedia says the latter
20:12 sjohnson hugme:  test
20:12 diakopter o
20:12 sjohnson how did the hugme bot get on here in the first place
20:12 * TimToady trolls the ancient yuletide carol
20:12 pmichaud can't trust Carol.
20:12 sjohnson which one, Jingle Bells?
20:12 [particle] diakopter: did you pick on TimToady because he's old enough to know?
20:12 pmichaud Alice and Bob, maybe.  but not Carol.
20:12 masak diakopter: 'Fig. sense of "to draw on as with a moving bait, entice, allure" is from 1565.' http://www.etymonline.com/index.php?term=troll
20:13 diakopter [particle]: I can't think of a comeback (let alone a reply other than this meta-reply) to that...
20:13 TimToady I don't want to troll Alice or Bob.  I ♥ them.
20:13 sjohnson will the Dumper look sexier in Perl 6 when dumping hashes?
20:14 masak sjohnson: first off, the Dumper is spelled .perl now.
20:14 [particle] rakudo: { 'a' => 1, 'b' => 2 }.perl.say
20:14 p6eval rakudo 0d4fe0: OUTPUT«{"a" => 1, "b" => 2}␤»
20:14 masak sjohnson: second off, in what way do you want it to be sexier?
20:15 sjohnson the way you just showed me is perfect
20:15 sjohnson in p5 it would show VAR1 = 'a'\n VAR2 = 1
20:15 sjohnson etc
20:15 sjohnson err, [particle] showed me it
20:15 sjohnson but still!
20:16 masak aye, if you send in a hash, and not a hashref, it would say that.
20:16 sjohnson what's the difference if an @array has keys set like that, and a %hash?
20:17 sjohnson in PHP the sigil is still $ so i believe they are no different, but i'm unsure in the Perl world
20:17 masak sjohnson: with the @array you'd get an ordered list of pairs.
20:17 masak sjohnson: but then you can't index on the keys, just on the integer indices.
20:17 diakopter there are a few ways to troll - using a dragnet, using bare hooks hoping to snag/gore a fish, or using non-trolling fishing techniques such as lures (prey replicas) with hidden hooks or bait (dead actual prey) with hidden hooks. and i'm sure others.  Great analogies to online troll patterns.
20:17 masak sjohnson: still, I use that trick sometimes when I want to preserve the order.
20:18 sjohnson nice
20:19 sjohnson masak u so helpful
20:19 masak woot, root.
20:19 TimToady diakopter: I suspect online trolling is derived from both ogres and angling
20:19 diakopter then there's folks who don't realize they are [being] trolls.
20:19 masak sjohnson: I like you too. :) I'm looking forward to your first Perl 6 module. :)
20:20 sjohnson TimToady: and computers
20:20 [particle] module First {}
20:20 masak :)
20:21 frew joined #perl6
20:21 diakopter std: module First {}
20:21 TimToady hugging is more effective on trolls who are just bored than on trolls who take delight in being evil
20:21 p6eval std 28081: OUTPUT«ok 00:02 37m␤»
20:21 sjohnson i know a troll on rizon, im gonna see what happens when i hug him
20:21 masak I believe the latter type of troll is called 'griefer'.
20:22 masak sjohnson: it's most effective if you also sympathise at the same time.
20:22 * alester is wrangling XHTML DTDs
20:23 sjohnson just don't show as much affection when hugging them as that brute in Of Mice and Men
20:24 sjohnson lest you get wanted by the police
20:24 masak right.
20:24 TimToady "I once had a friend, but he don't move no more..."
20:25 * diakopter empathizes with TimToady's grief.
20:25 xomas joined #perl6
20:25 sjohnson haha
20:27 xomas joined #perl6
20:27 pugs_svn r28082 | pmichaud++ | [t/spec]:  Fudge some tests that Rakudo was faux-passing.
20:28 [particle] hugme: hug alester
20:28 * hugme hugs alester
20:28 alester :-)
20:28 sjohnson will Perl 6 have a set of core modules like p5?
20:28 alester Hugs rock
20:28 sjohnson hugs++
20:28 alester Perl 6 won't.
20:28 alester But Rakudo might.
20:28 pmichaud I'm likely to start making a distinction between the "Rakudo compiler" and "Rakudo distributions"
20:28 justatheory joined #perl6
20:28 [particle] i hope nothing has a set of core modules like p5 O_o
20:28 zloyrusskiy joined #perl6
20:28 TimToady if Rakudo turns into a distribution...what he said
20:29 pmichaud to the point that the compiler and distributions will have separate release cycles and release numbers
20:29 moritz_ presumably just enough modules to install other modules
20:29 alester That's an excellent Rakudo FAQ, thought
20:29 alester s/t$//
20:29 sjohnson the Switch; core module in perl 5 is pretty ramshackle
20:29 rbaumer joined #perl6
20:29 moritz_ well, there are lots of modules in perl 5 core that are questionable
20:30 moritz_ Text::Abbrev - I've never seen anybody using it
20:30 sjohnson cludged together
20:32 sjohnson use Hugs;
20:32 TimToady use GHC is more likley
20:32 TimToady *likely
20:33 alester moritz_: I use tht mdul all th tm
20:34 sjohnson we should rename Pugs to Hugs cause it's cuter
20:34 moritz_ alester: which one?
20:34 alester Txt::Abrv
20:35 alester in fct im usng it nw
20:35 moritz_ oh.
20:36 alester svs bndwdth
20:36 moritz_ hey, and who writes Text::unAbbrev?
20:37 masak exercise left to the reader.
20:37 alester ppeerrhhaappss II sshhoouulldd
20:37 TimToady the UN, obviously
20:38 sjohnson United Nations?
20:38 masak :)
20:41 TimToady then there's un numbers they put on the backs of trucks
20:41 TimToady so we could interpolate random hazardous chemicals
20:43 masak so, Chinese for 'hug' is 拥抱 -- one of those dual-character words where each of the characters contains some of the intended meaning. both mean 'hold/embrace', but 拥 is more of a 'swarm/throng' whereas 抱 means 'surround/cherish'.
20:44 sjohnson kind of like Japanese
20:44 masak very probably kind of like Japanese, yes.
20:45 TimToady esp the parts of Japanese borrowed straight from Chinese :)
20:45 sjohnson i wonder if China will come out with a scripting language
20:46 masak it wouldn't surprise me if someone has already made one with hanzi in it.
20:48 masak yup: http://en.wikipedia.org/wiki/Chinese_BASIC
20:48 TimToady 赤蝶Perl
20:48 sjohnson hmm.. i wonder if that says ...  red butterfly
20:49 sjohnson or something
20:49 masak aye.
20:49 masak "Camelia"?
20:49 payload joined #perl6
20:50 masak also: http://en.wikipedia.org/wiki/ChinesePython
20:51 masak someone is bound to do that with Perl 6 as well. :)
20:51 masak anyway, tucking myself in early tonight. see y'all!
20:51 masak hugme: good night.
20:51 Woody2143 joined #perl6
20:52 moritz_ good night masa... too late
20:53 Chillance joined #perl6
20:53 moritz_ I'm about to change a bit of a server config of perl6.org
20:53 moritz_ and rename the dir in pugs svn
20:54 moritz_ so there's going to be short downtime
20:55 Juerd perl6.org is beautiful.
20:55 pugs_svn r28083 | moritz++ | [docs/feather] rename perl6-projects.org to perl6.org
20:56 pmichaud (I'm getting a redirect loop)
20:56 justatheory joined #perl6
20:56 moritz_ me too; working on it
20:56 pmichaud okay.  :)
20:57 moritz_ should be working again
20:57 moritz_ (unless your browser caches the redirect)
20:57 moritz_ perl6-projects.org is broken
20:58 hercynium joined #perl6
20:58 moritz_ it should redirect to perl6.org
21:00 moritz_ and it does now.
21:00 frew__ joined #perl6
21:02 pugs_svn r28084 | moritz++ | [perl6.org] update google webmasters identification tag to new domain name
21:02 Juerd Who designed perl6.org?
21:03 moritz_ Su-Shee did
21:03 Juerd Su-Shee: Great job :)
21:03 TimToady with various other tweakers
21:03 pmichaud see story at http://perlgeek.de/blog-en/p​erl-6/a-shiny-perl6-org.html
21:03 Juerd tHANKS
21:03 pmichaud (gratuitous article plug :-)
21:03 Juerd k0~~~~~
21:04 Juerd s/$/~/
21:04 * Su-Shee goes for "posh perl" ;)
21:05 colomon joined #perl6
21:05 rdice joined #perl6
21:05 Su-Shee thanks, but I go to bed now. (and I really have to fix hibernate... :)
21:05 Su-Shee n8 all. :)
21:06 TimToady n8
21:06 Juerd It's great that David Wright allowed this to happen. I asked in 2007 and he wasn't so happy about the idea back then.
21:06 Juerd Good night
21:06 Juerd s/David/Daniel/
21:06 explorer__ joined #perl6
21:07 moritz_ it might have helped to have a nicely designed, non-outdated page available as content
21:07 moritz_ like a "look, we can do *so* beautiful stuff with your domain if you let us"
21:08 Juerd Certainly. I had the reverse approach: iff we can get the domain, I'll invest time in making it a nice page.
21:08 TimToady indeed, @participants».++
21:08 colomon rakudo: multi sub infix:<**>(Complex $a, Num $b) { exp($b * log($a)) }; say 1i ** 3;
21:08 p6eval rakudo 0d4fe0: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/qLTBc2txwb:2)␤»
21:09 pugs_svn r28085 | fglock++ | mp6 update
21:09 pmichaud I personally think it was several factors -- his primary concern was to hold the domain for the benefit of the community and not just a few.  The openness of perl6-projects.org to modification was likely a big plus.
21:09 colomon rakudo: sub Pow(Complex $a, Num $b) { exp($b * log($a)) }; say Pow(1i, 3);
21:09 pmichaud so, moritz++ for that
21:09 p6eval rakudo 0d4fe0: OUTPUT«NaNNaNi␤»
21:09 TimToady maybe he got enough hugs
21:09 moritz_ NaNi is a nice number ;-)
21:09 molaf joined #perl6
21:09 Whiteknight joined #perl6
21:10 TimToady std: NaNi
21:10 p6eval std 28083: OUTPUT«Undeclared name:␤      NaNi used at 1 ␤ok 00:02 37m␤»
21:10 TimToady std: NaN\i
21:10 p6eval std 28083: OUTPUT«ok 00:02 37m␤»
21:10 colomon rakudo: sub Pow(Complex $a, Num $b) { exp($b * log($a)) }; say Pow(1i, 3.0);
21:10 p6eval rakudo 0d4fe0: OUTPUT«NaNNaNi␤»
21:10 diakopter third column hangs a bit lower
21:11 colomon rakudo: say exp(3.0 * log(1i));
21:11 p6eval rakudo 0d4fe0: OUTPUT«-1.83691e-16-1i␤»
21:11 colomon That's weird -- the last one at least worked on my MBP.
21:12 pugs_svn r28086 | moritz++ | [perl6.org] update SVN URL
21:12 colomon Oh, reading it wrong, that is correct.
21:13 colomon Anyway, that's the result of my complex ** investigations while my wife drove us to my parents.
21:13 pmichaud incoming.
21:14 colomon It's easily implemented using implemented Rakudo functions, but the actually operator overload gets you a Null PMC.
21:14 pmichaud right... operator overloading doesn't work yet
21:14 pmichaud at least, not for another 10 seconds
21:14 moritz_ ;-)
21:14 explorer__ left #perl6
21:14 pmichaud ...c'mon, dalek....
21:15 * moritz_ would love to test the new stuff, but has to go to bed early tonight to be ready for the sailing trip tomorrow
21:15 colomon oooo, looking forward to changes eagerly!
21:15 moritz_ colomon: git pull
21:15 moritz_ it's already in
21:15 pmichaud only infix:<+> and infix:<-> so far.
21:16 pmichaud I'm about to do * and /
21:16 pmichaud and **
21:16 pmichaud man, my computing environment is really cratering on me today
21:16 pmichaud keyboard has died twice, now wireless is shot
21:16 colomon moritz_: you mean git clone, I've learned enough not to override my main rakudo.  ;)
21:17 * pmichaud looks for sunspot activity or something.
21:18 moritz_ anyway, TTFN and see you all on Sunday (unless by some happy chance I'll have internet access earlier)
21:18 pmichaud great job this week, moritz -- see you Sunday!
21:18 TimToady have the appropriate amount of fun
21:18 TimToady and don't sink
21:19 TimToady unless appropriate
21:19 pmichaud looks like I killed dalek.
21:19 dalek joined #perl6
21:20 quietfanatic The layout of perl6.org looks lopsided compared to how it used to be.
21:21 TimToady you want a commit bit?
21:22 TimToady just msg me your email addre....oh, wait
21:22 quietfanatic ...
21:22 quietfanatic I have done a bit of web design before.
21:22 quietfanatic It's just a matter of lining up the margins right...
21:23 diakopter dalek: Excess Flood?
21:23 quietfanatic ...which HTML can make surprisingly tricky.
21:24 TimToady dalek survived in #parrot, but maybe that's because purl commented in the middle :)
21:24 [particle] is dalek not throttled on #parrot?
21:24 * [particle] throttles dalek, just to be sure
21:25 diakopter hrm
21:28 molaf joined #perl6
21:32 pugs_svn r28087 | diakopter++ | [perl6.org] if we're gonna send it as xml+xhtml, make it validate so firefox doesn't whine.
21:34 pugs_svn r28088 | diakopter++ | [perl6.org] revert last, but change svn:mime-type to match debian apache 2.2's "text/html"...
21:38 Woody2143 joined #perl6
21:44 payload joined #perl6
21:49 PZt joined #perl6
21:53 quietfanatic I think I shall straighten it by making the outer wrapper a little smaller, and changing the borders from px to em, to make it fit exactly.
21:53 quietfanatic Or should I grow the boxes instead of shrinking the page?
21:55 quietfanatic ...or should I just line them up in the middle?  Hard choices!
22:02 japhb joined #perl6
22:04 Whiteknight joined #perl6
22:09 justatheory joined #perl6
22:11 quietfanatic That's odd...
22:13 quietfanatic While I wasn't looking, perl6.org fixed itself.
22:13 cognominal joined #perl6
22:13 quietfanatic Oh, never mind
22:14 quietfanatic Firefox was still preview the stylesheet changes.
22:14 sjohnson hows it going quietfanatic
22:14 quietfanatic I believe I have a satisfactory layout now
22:14 quietfanatic I just have to figure out how to work svn.
22:23 pugs_svn r28089 | quietfanatic++ | [perl6.org] Recentered boxes by growing them a bit.
22:24 rocket_guatemala joined #perl6
22:25 quietfanatic Eck, the 5 in Perl 5 got sent to its own line.  That's not pretty.
22:25 quietfanatic I should have been wary.
22:25 rocket_guatemala left #perl6
22:29 diakopter quietfanatic: use a nbsp; ?
22:30 quietfanatic Maybe...I was about to cut the width back and increase margins.
22:30 quietfanatic An nbsp would make it correct on all displays.
22:31 quietfanatic But then should I &nbsp; all the Perl 5/6s?
22:32 quietfanatic I think I will.
22:38 _jaldhar joined #perl6
22:39 pugs_svn r28090 | quietfanatic++ | [perl6.org] Added &nbsp;s in certain places to reduce orphaning.
22:43 jan joined #perl6
22:43 dalek rakudo: 4276205 | pmichaud++ |  (7 files):
22:43 dalek rakudo: Move infix:<*>, infix:</>, and infix:<**> to setting.
22:43 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​27620514b9debf5d7309cf3dd69a75e55929400
22:46 ihrd left #perl6
22:48 pmichaud rakudo:  say +(3|4)
22:48 p6eval rakudo 0d4fe0: OUTPUT«Method 'Num' not found for invocant of class 'Int'␤»
23:02 pecastro joined #perl6
23:19 * diakopter waits
23:20 pmichaud rakudo:  say +(3|4)
23:20 p6eval rakudo 0d4fe0:  ( no output )
23:20 Avada joined #perl6
23:28 jaldhar joined #perl6
23:29 soupdragon joined #perl6
23:33 jrtayloriv joined #perl6

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

Perl 6 | Reference Documentation | Rakudo