»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:14 PZt joined 00:21 cosimo joined 00:22 Solarion_ left, Solarion_ joined, Solarion_ is now known as Solarion 00:28 Rotwang left 01:01 woosley joined 01:04 whiteknight left, woosley left 01:23 simcop2387 left 01:24 simcop2387 joined 01:53 jaldhar joined 01:56 icwiener left 02:14 acegrimm joined
acegrimm aye 02:14
02:16 acegrimm left 02:28 sufrostico joined 02:36 lue left 02:38 dsp_ left 02:42 arlinius joined 02:54 risou left 02:55 risou joined 03:24 agentzh joined 03:42 ajs joined
ajs evening all 03:42
sorear good * #perl6 03:43
03:48 satyavvd joined, sufrostico left 03:54 Holy_Cow joined
sorear hello ajs 04:12
cognominal does perl 6 supports what coffeescript calls destructuring assignment. It can be seen as a form of assignement on pattern matching. jashkenas.github.com/coffee-script/ 04:13
it is a feature of javascript harmony btw. 04:14
sorear rakudo: my [$x, $y] := [1,2]; say $y 04:15
p6eval rakudo e3bd9a: OUTPUT«===SORRY!===␤Malformed my at line 22, near "[$x, $y] :"␤»
sorear rakudo: my :([$x, $y]) := [1,2]; say $y 04:16
p6eval rakudo e3bd9a: OUTPUT«===SORRY!===␤Malformed my at line 22, near ":([$x, $y]"␤»
sorear rakudo: (-> [$x, $y] { say $y })([1,2]);
p6eval rakudo e3bd9a: OUTPUT«2␤»
sorear yes, but the parsing isn't fully implemented
cognominal oh, I remember now. I already bug jnthn on that 04:17
sorear (I haven't actually looked at the link, I'm working from the Haskell definition of destructuring binders)
cognominal and indeed, I was thinking haskell the first time I asked
for lack of a Perl 6 with a javascript backend, coffeescript is pretty nice. 04:18
and destructuring is pretty nice when extracting data from the DOM 04:19
sorear perl 6 with a javascript backend would have far, far too much overhead 04:20
perl 6 is not designed to run on a specific VM
it doesn't elegantly map to Javascript primitives the way Javascript-based languages do
cognominal When I reread myself I realize I speak english like Ali G. :( 04:22
sorear Who? 04:23
04:23 JimmyZ joined
sorear Don't be so hard on yourself. Your English is better than quite a few "native" speakers I know 04:24
04:24 Su-Shee_ joined
cognominal www.youtube.com/watch?v=fOIM1_xOSro # ali g interviews noam chomsky 04:25
JimmyZ good afternoom, #perl6
04:26 Su-Shee left 04:30 cosimo left
sorear hello JimmyZ 04:37
04:42 sftp left 04:45 noganex_ joined 04:49 noganex left, JimmyZ left
jdhore OK, I am currently working on the release of Rakudo 2011.03 05:01
PerlJam jdhore++ 05:04
05:19 am0c joined, JimmyZ joined
JimmyZ hi JimmyZ 05:20
er, hi sorear
05:35 donri left, nymacro joined 05:40 Holy_Cow left 05:42 orafu left 05:46 orafu joined
mberends colomon: thanks, replied to Aaron Sherman's comment :) 05:48
05:48 Holy_Cow joined
ajs oh? 05:52
mberends (the reply must be moderated before it appears publicly) 05:55
ajs ah
05:55 risou left, risou joined, Holy_Cow left
ajs should I just keep reloading or does someone want to fill me in? ;) 05:55
mberends commute &
05:56 mberends left 05:59 JimmyZ left
ajs So, I've been working on that... I found one bug that I think was causing some undue speedup (still getting right answers for the given inputs, but still a bug). 05:59
But it's still performing well
yeah, since I fixed the bug, I'm no longer beating colomon, but I'm still scaling decently. 06:04
jdhore Are any rakudo people around? 06:10
moritz_, please help 06:14
06:23 lestrrat left, alim joined 06:24 lestrrat joined 06:41 justatheory left 06:42 shortcircuit left, shortcircuit joined 06:48 wtw joined 06:49 Raynes left 06:50 Raynes joined 06:52 kaare_ joined 06:54 dsp_ joined 06:56 risou_ joined
colomon jdhore: what's up? 06:58
06:58 risou left
jdhore I've got a failing test and i'm not sure what to do with it 06:58
Test Summary Report 06:59
-------------------
t/spec/S02-builtin_data_types/instants-and-durations.t (Wstat: 0 Tests: 13 Failed: 1)
Failed test: 13
colomon that's okay, it's been an intermittent failure for a while
jdhore so just ignore it? 07:00
colomon yes
jdhore OK
07:02 fisted left
dalek kudo: e70f27d | jdhore++ | / (3 files):
[release] Add announcement, update release gude and add myself to
07:06
kudo: 5e60355 | jdhore++ | VERSION:
[release] bump VERSION
jdhore whoo 07:19
Rakudo 2011.03 release complete!!!!
ajs Wow, grats!
jdhore thanks 07:20
colomon \o/ 07:22
07:24 fisted joined 07:25 Su-Shee_ is now known as Su-Shee 07:28 dsp_ left
colomon moritz_: Test 13 in S02-builtin_data_types/instants-and-durations.t isn't valid, at least as things are currently implemented in Rakudo. $t1 - $t0 uses Real.Rat internally, which is only accurate to 1e-6. So there's no reason to expect that $t0 + ($t1 - $t0) will equal $t1 exactly. 07:32
07:38 dsp_ joined 07:44 alim left 07:45 Mowah joined 07:48 fhelmberger joined, fhelmberger left, fhelmberger_ joined 07:49 HarryS joined
moritz_ colomon: I think the test should be modified to allow a diff of 1e-6 or so 07:53
colomon moritz_: IMO, it should probably use is_approx and call .x on both sides. 07:54
moritz_ or use rats consistently 07:58
08:08 mtk left
tadzik hello 08:17
08:19 mtk joined
moritz_ jdhore++ # rakudo release 08:19
jdhore moritz_, thanks, dude
moritz_ jdhore: how did you find the release process? 08:20
any difficulties or time drains? 08:21
jdhore Pretty easy, actually, the most annoying part was waiting for all the tests in "make stresstest" to run...I have 8-cores, but they didn't parallelize (i didn't try make -j8 stresstest though, so that would fix my only annoyance if that is possible) 08:22
moritz_ jdhore: ah, TEST_JOBS=8 and a sufficiently new Perl 5 Test::Harness would have helped (see README) 08:23
jdhore ah
I'd love to do it again though 08:24
moritz_ feel free to add your name to docs/release_guide.pod 08:26
tadzik btw, didn't mberends appear twice in the announcement? 08:27
jdhore tadzik, I don't think so, though he may have once by nick and once by real name 08:28
moritz_ such things happen
tadzik yeah, that's what I mean. There's Martin Berends and there's martin :)
jdhore nope, there's a martin and Martin Berends
ah, I figured that may have been a different martin which is why i left it :) 08:29
tadzik yeah. For me the hardest part was probably figuring out who is who in the contributors.pl output :)
jdhore I think i'll go for my birth month (May) for the next release, but I could do April if no one volunteers by the time we near the release date. 08:30
moritz_ jdhore++ 08:31
good plan
08:32 mj41_nb joined
dalek kudo: d8e5dec | jdhore++ | docs/release_guide.pod:
Add myself as the release manager for the May release.
08:34
08:39 am0c left 08:40 alim joined 08:44 daxim joined
ajs BBC headline: "Google buys Parrot to aid YouTube" 08:49
;-) 08:50
www.bbc.co.uk/news/technology-12757153
jdhore :D 08:55
tadzik :)
08:58 risou joined 08:59 risou_ left 09:09 eso4g3_ joined
eso4g3_ soy gayyy 09:09
jdhore moritz_, do only R* releases get announced on rakudo.org? I just noticed that nothing was ever posted about 2011.02 09:11
moritz_ jdhore: yes, only R* releases
09:11 eso4g3_ is now known as eso4g3
jdhore ah 09:11
moritz_ people confuse compiler and distribution releases
so we make the compiler releases less public 09:12
jdhore Yeah, makes sense.
eso4g3 my mother fuck your father
09:13 cjk101010 joined
tadzik moritz_, can you? 09:13
jdhore moritz_, wow, looking at the download stats of R and R*, that's...yeah...Pretty apparent :P
09:13 eso4g3 left
tadzik oh, nevermind 09:13
09:19 pecastro is now known as pecastro|be-righ 09:20 pecastro|be-righ is now known as pecastro-be-righ 09:25 _twitch joined 09:27 tzhs joined 09:38 snearch joined 09:57 am0c^ joined, risou_ joined 10:00 risou left 10:09 am0c^ left 10:30 am0c joined 10:36 ab5tract joined 10:57 dakkar joined 10:59 risou joined 11:00 risou_ left 11:09 JimmyZ joined
tadzik flussence_: could github.com/flussence/p6-misc/blob/...ent.p6#L53 be just our Str multi method indent(0) ? 11:18
moritz_ tadzik: nope
tadzik that's not the same, yeah
moritz_ indent(0) boils down to (Int $ where 0)
not to ($ as Int where 0) 11:19
tadzik so it protects us from indent("foo")
flussence_ yeah, I tried most of the easy-looking things already
moritz_ rakudo: multi f($ as Int where 0) { say "yes" }; f "a"
p6eval rakudo d8e5de: OUTPUT«yes␤»
moritz_ flussence_: that's what you could use, if you don't like verbosity :-) 11:20
rakudo: multi f($ where 0) { say "yes" }; f "a"
p6eval rakudo d8e5de: OUTPUT«yes␤»
11:20 wallberg joined
moritz_ works too, since smart-matching against a number automatically coerces 11:20
11:21 Rotwang joined, am0c left
moritz_ TiMBuS: could you please open a new pull request for your second IO::Socket::INET iteration patch? 11:22
11:25 wallberg left 11:26 Rotwang left
TiMBuS moritz_, i guess so 11:27
11:29 wallberg joined
TiMBuS do you want me to merge it into a single patch or something? 11:32
11:33 wallberg left
moritz_ that would make the review easier, yes 11:33
11:34 snearch left
moritz_ rakudo: class dice { has $.eyes = (1..20).pick }; say dice.new.eyes 11:36
TiMBuS well its probably just easier to compare the entire file before and after, in this case heh. but alright
p6eval rakudo d8e5de: OUTPUT«15␤»
moritz_ rakudo: class dice { has $eyes = (1..20).pick }; say dice.new.eyes
p6eval rakudo d8e5de: OUTPUT«Method 'eyes' not found for invocant of class 'dice'␤ in main program body at line 22:/tmp/sWvoOd4yqZ␤»
11:42 wallberg joined
TiMBuS ok moritz_ done. had a bit of trouble with git 11:48
its all good now
11:49 coldhead left
TiMBuS but if you dodnt already know, you dont generally need a second pull request for the same branch. any new commits i make go into the topic 11:50
tadzik how far is this from being spec-conformant? 11:54
moritz_ tadzik: a spec change away :-) 11:56
tadzik hah :) 11:57
I kinda expected that answer
moritz_ I don't even know if there's a spec
11:57 bluescreen10 joined
moritz_ I tend to ignore much of the IO specs 11:57
12:01 simon__ joined
simon__ Hey. I have some questions regarding the whatever star. 12:02
tadzik go on 12:03
simon__ I understand it's a shortcut to make a closure
but sometimes it doesn't work like expected
for instance with the range operator
moritz_ simon__: it does't always construct a closure, some operators are special-cased
for examply my $x = *; assign a Whatever to $x, not construct a closure that assigns the argument to $x 12:04
rakudo: say (1..*).max
p6eval rakudo d8e5de: OUTPUT«Inf␤»
simon__ i see
what about inside the indexing brackets? 12:05
moritz_ in particular =, :=, .., ... and comma are special-cased
(and maybe more)
simon__ seems like it refers to the itemcount there?
moritz_ simon__: indexing brackets are just a shortcut for a method call, they don't imply any special syntax
@a[*] just passes a Whatever object to the postcircumfix:<[ ]> method 12:06
simon__ but you can do something like this: my @a = 1..5; say @a[1 .. *-1]
moritz_ simon__: you can, because - binds tigher than ..
so * - 1 is a closure
and thus 1 .. *-1 becomes a closure too
even if 1 .. * does not 12:07
(confusing, I know)
simon__ so [] can take a function as argument?
moritz_ yes
rakudo: say (1, 2, 3).[-> $x { say $x; $x - 1} ]
p6eval rakudo d8e5de: OUTPUT«3␤3␤»
simon__ i've also tried something like @a[1..*] which doesn't work. is this a bug?
moritz_ rakudo: say <a b >.[-> $x { say $x; $x - 1} ]
p6eval rakudo d8e5de: OUTPUT«2␤b␤»
TiMBuS thats why [1..*] currently goes forever in rakudo..
moritz_ simon__: yes, that should work too, but doesn't 12:08
(known bug, and probably not easy to solve)
TiMBuS i remember trying to patch that
you gotta rewrite Range or add a parse rule
12:09 satyavvd left
moritz_ simon__++ # asking good questions 12:09
simon__ if you give [] a function that takes multiple arguments, does it just plug in the itemcount for every one of them?
thanks ;)
moritz_ simon__: I think so, yes
rakudo: say <a b c>.[* - *]
p6eval rakudo d8e5de: OUTPUT«a␤»
moritz_ yes, it does :-)
12:11 jeeger joined
tadzik rakudo: say *-* 12:12
p6eval rakudo d8e5de: OUTPUT«_block131␤»
moritz_ rakudo: say (*-*).signature.perl 12:13
p6eval rakudo d8e5de: OUTPUT«_block131␤»
moritz_ oh ouch
rakudo: say (my $ = (*-*)).signature.perl
p6eval rakudo d8e5de: OUTPUT«:(;; Mu $x1, Mu $x2)␤»
12:15 JimmyZ left 12:19 Holy_Cow joined, daxim left 12:20 agentzh left
simon__ when @a[1..*] is fixed, is it gonna do @a[1 .. +*] or @a[1 .. *-1]? 12:23
moritz_ the latter (ie no trailing Any)
12:25 leprevost joined 12:29 am0c^ joined 12:31 mj41_nb left
moritz_ TiMBuS: I'll apply your patch when I get home, and fix LWP::Simple afterwards 12:32
12:46 mj41_nb joined 12:52 mtk left, mtk joined 12:53 am0c^ left
simon__ how come this works? @a[*-5 .. *] 12:53
shouldn't *-5 .. * make a closure that takes one argument and makes a sequence from that argument - 5 to infinity?
moritz_ has no idea 12:54
tadzik rakudo: say (*-5..*).perl
p6eval rakudo d8e5de: OUTPUT«_block131␤»
tadzik superb
rakudo: say Range.new( from => *-5, to => *).perl 12:55
p6eval rakudo d8e5de: OUTPUT«too many named arguments: 2 passed, 0 used␤ in main program body at line 22:/tmp/rkIibbM11f␤»
tadzik rakudo: say Range.new(*-5, *).perl
p6eval rakudo d8e5de: OUTPUT«{ ... }..Inf␤»
tadzik rakudo: say Range.new(*-5, *).Num
p6eval rakudo d8e5de: OUTPUT«Inf␤» 12:56
[Coke] ~~ 12:57
13:05 mtk left, [particle] joined, jeeger left 13:12 mtk joined, simon__ left 13:13 donri joined 13:14 jeeger joined 13:16 plainhao joined 13:19 [particle] left 13:22 _twitch left 13:23 MayDaniel joined, wallberg left 13:24 sftp joined, [particle] joined 13:25 [particle] left 13:33 MayDaniel left 13:41 jaldhar left 13:42 jaldhar joined
moritz_ brainstorming session! What project ideas could we offer for GSOC students? 13:43
13:43 Lorn_ joined 13:44 Lorn_ left, Lorn left
flussence_ Improving printf-ish stuff? 13:44
moritz_ POD parser in rakudo is one
13:45 Lorn joined
flussence_ rakudo: say printf('%2$s', 4, 3); 13:45
p6eval rakudo d8e5de: OUTPUT«Not enough arguments supplied for the given format string␤ in 'Cool::sprintf' at line 2754:CORE.setting␤ in 'sprintf' at line 2788:CORE.setting␤ in 'IO::printf' at line 5575:CORE.setting␤ in 'printf' at line 5789:CORE.setting␤ in main program body at line
..22:/tmp/L65RXhNixk␤»
moritz_ is that supposed to work? :-)
flussence_ apart from the first two words being obviously wrong... :)
it should do the same as what perl5 does 13:46
13:47 kaare_ left
moritz_ other project ideas? 13:53
13:55 [particle] joined
moritz_ modules that badly need porting? infrastructure tasks? 13:55
tadzik: do you have some TODOs in Panda that would make a good GSOC project? 13:56
flussence_ would be nice if it was easier to relocate a rakudo --gen-parrot install 14:00
moritz_ that's mostly a parrot task, not a rakudo one 14:01
flussence_ or at least so the result of "make install" will keep working while I'm recompiling it...
moritz_ it does
... if you recompile into a different location :-)
14:02 tty234 joined
tadzik moritz_: oh, I guess whatever's on my mind I'll make it myself before GSoC starts :) 14:03
maybe there's a task about creating an entire infrastructure, to CPAN and beyond :) 14:04
besides, I'm probably going to apply too 14:06
moritz_ \o/ 14:07
14:08 [particle] left 14:10 alester joined
tadzik so I'm quite yooking forward to task ideas, as jnthn's one, being awesome, seems out of my skills range 14:14
moritz_ does Pod6 parsing in rakudo sound saner to you? 14:15
tadzik I don't find that one insane :) But Pod parsind seems doable 14:16
or the .WHY things
moritz_ well, the two are related
tadzik aye 14:17
moritz_ you need to parse the Pod to attach it as .WHY
14:18 icwiener joined 14:19 mj41_nb left 14:22 [particle] joined
flussence_ (if someone writes a Pod parser, I'll write a pod2html5 thing for it) 14:25
moritz_ web tools: cookie jar, HTTP request and response, ... 14:26
14:27 colomon left
donri isn't .WHY supposed to be unparsed? 14:28
moritz_ rakudo: sub f(::Int $x) { say Int.WHAT }; f("Foo")
p6eval rakudo d8e5de: OUTPUT«Str()␤»
moritz_ rakudo: sub f(::Int $x) { say Int.WHAT }; f("Foo"); say Int.WHAT
p6eval rakudo d8e5de: OUTPUT«Str()␤Int()␤»
moritz_ found a way to lexically rebind types :-) 14:29
std: sub f(::Int $x) { say Int.WHAT };
p6eval std 4608239: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/bGNp2OxR8q line 1:␤------> sub f(::Int ⏏$x) { say Int.WHAT };␤ok 00:01 122m␤»
14:32 hercynium joined 14:42 jeeger left 14:51 pmurias joined 14:52 JimmyZ_ joined
tadzik moritz_: lokking at www.nntp.perl.org/group/perl.perl5....70045.html isn't the project ideas period over? 15:00
15:01 justatheory joined, risou_ joined, risou left
moritz_ tadzik: notreally; it just seems too late to change the URL that's submitted to google 15:01
tadzik: adding project ideas only becomes worseless once tasks are accepted/rejected 15:02
15:03 sufrostico joined 15:04 sufrostico is now known as Guest3473 15:09 envi joined
ajs Just had an interesting bug. Line of code used to contain "$a<foo>+$a<bar>". I made the two lookups local variables, but left one ">" so the code became: "$foo>+$bar" ... damn that was hard to find. 15:09
15:10 domidumont1 joined
moritz_ rakudo: my $foo; my $bar; $foo>+$bar 15:10
p6eval rakudo d8e5de: OUTPUT«Use of uninitialized value in numeric context in <anon> at line 22:/tmp/jHkN43mavW␤Use of uninitialized value in numeric context in <anon> at line 22:/tmp/jHkN43mavW␤»
moritz_ rakudo: my $foo = 1; my $bar = 2; $foo>+$bar 15:11
p6eval rakudo d8e5de: ( no output )
moritz_ rakudo: my $foo = 1; my $bar = 2; say $foo>+$bar
p6eval rakudo d8e5de: OUTPUT«Bool::False␤»
moritz_ ajs: there are reasons why I recommend whitespace around infix operators
ajs Yeah, I have an old habit of doing things like "if $a+$b == $c+$d" so that the two sides of the comparison are clear. I think I'm going to have to break that habit in Perl6.... 15:12
15:15 kaare_ joined
ajs I think I'm going to take on writing a clone of Python's argparse for P6... I've always thought it had a lot going for it, but there are a couple things I wish had been designed very differently. 15:18
15:19 wtw left
flussence_ rakudo: say [==] ([+] 2, 3), ([+] 1, 4) 15:19
p6eval rakudo d8e5de: OUTPUT«Bool::True␤»
ajs What is that, RP6N?
15:28 mj41_nb joined
arnsholt ajs: Perl 6 has quite powerful argument parsing built-in as well 15:30
ajs I'm just interested in playing with an alternate approach is all
arnsholt That's cool as well. Just in case you were looking for a Getopt for Perl 6 =) 15:31
ajs One thing I like about argparse is that it's equally at home with something like the svn/git model (cmd options subcmd options) as it is with traditional unixish command-lines (cmd options rest) 15:33
It does this by treating the command-line like a function call, breaking it down into positional and named parameters. 15:34
moritz_ that's something that MAIN can't really do
it can dispatch based on a string literal 15:35
15:35 colomon joined
moritz_ but it can't distinguish general options from options to a subcommand 15:35
ajs Anyway, I'll be toying with that later. Work now. 15:37
15:38 am0c joined 15:45 ymasory joined 15:55 mj41_nb left 15:57 colomon left 15:58 tzhs left
TimToady it would be fairly easy to preprocess the args into a form acceptable to MAIN, and the MAIN mechanism is designed to make such preprocessing easy, since the whole script runs first 16:08
moritz_ so it would just modify @*ARGS ? 16:09
TimToady sure
that's why MAIN is called from the end of the script
might have to provide a way to modify USAGE though... 16:10
moritz_ there is one already :-)
TimToady making sure that one can call the standard USAGE and massage that message 16:11
maybe viewing a user-defined USAGE as some kind of a wrapper around the standard one 16:12
moritz_ well, according to current spec you can just use $?USAGE and massage it before printing it
TimToady okay
moritz_ rakudo doesn't provide that yet, but it should be quite possible to do 16:13
TimToady though there's something wrongish about that, since $? means a compile-time constant, and you couldn't know its value till the end of the file
$?USAGE would have to imply a level of indirection to mean "the value it will have at CHECK time" 16:14
moritz_ sub USAGE { print massage $?USAGE }
of course we could have a my $*?USAGE = $?UAGE; in the setting implied, saving you the hassle to actually the print yourself 16:15
but IMHO that's overkill
TimToady alternately, maybe there's some way we can finesse MAIN parsing to allow application of destructuring to a field of options
16:15 Guest3473 is now known as sufrostico
TimToady sub MAIN ('command', { :$foo, :$bar }, 'subcommand', :$baz) {...} 16:16
16:16 sufrostico left, sufrostico joined
TimToady but then you have to copy/paste all those, which is a violation of DRY 16:16
moritz_ TimToady: and jnthn would strangle you :-) 16:17
TimToady or, we just baldly state that if the sigs contain a %hash, that's a subfield of switches managed positionally 16:18
or we provide some way of saying 'don't treat subsequent switch fiels as named parameters yet' 16:19
so it can be deferred to a submain function
moritz_ maybe abuse ;; for that?
TimToady or \$capture 16:20
or |$capture
moritz_ std: sub f($x, \$c) { } 16:21
p6eval std 4608239: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/VwNYtNw8rd line 1:␤------> sub f(⏏$x, \$c) { }␤ $c is declared but not used at /tmp/VwNYtNw8rd line 1:␤------> sub f($x, \⏏$c) { }␤ok 00:01 120m␤»
moritz_ rakudo: sub f($x, \$c) { say $x }; f 1, 2, 3, 4, :foo
p6eval rakudo d8e5de: OUTPUT«Too many positional parameters passed; got 4 but expected 2␤ in 'f' at line 1:/tmp/DliJYJLMMU␤ in main program body at line 22:/tmp/DliJYJLMMU␤»
TimToady something like that, but allow named params to be harvested before binding the remainder to $c 16:22
rakudo: sub f($x, |$c) { say $x }; f 1, 2, 3, 4, :foo
p6eval rakudo d8e5de: OUTPUT«1␤»
TimToady yeah, |, not \
moritz_ rakudo: sub f($x, |$c) { say $x; say $c.perl }; f 1, 2, 3, 4, :foo
p6eval rakudo d8e5de: OUTPUT«1␤\(2, 3, 4, "foo" => Bool::True)␤» 16:23
moritz_ \o/
16:23 cjk101010 left
TimToady but can you get at --foo if it's before? 16:23
moritz_ why not?
oh
TimToady more importantly, distingish pre-foo from post-foo
moritz_ I know why not
positional before named, and all that 16:24
seems that argument preprocessing is easier :-)
TimToady or a rule that turns embedded switch fields into a {...} 16:25
but only if the sigs have a {...} subfield 16:26
or a %hash subfield
could even be %*GLOBALOPTS as a parameter 16:27
TimToady is now thinking about protos that preprocess for their multis... 16:31
not sure {*} gives us enough rope to rewrite the arguments though... 16:32
won't fly unless proto MAIN can modify the args it feeds to {*} 16:33
also, won't help if the switches have already been denatured before the proto sees it 16:34
what it really comes down to is the 2-pass parsing problem, *again*... 16:37
so me wonders if there's some way to make it a 1-pass parse
something to think about in the shower & 16:40
16:41 aindilis left 16:48 ab5tract left 17:01 ab5tract joined, risou_ left, risou joined, alim_ joined 17:02 alim_ left, hudnix left 17:03 am0c left 17:04 hudnix joined, alim left 17:05 bluescreen10 left 17:08 cdarroch joined, cdarroch left, cdarroch joined 17:14 JimmyZ_ left 17:23 shi joined, shi left 17:24 shi joined 17:25 shi left 17:26 shi joined, shi left 17:27 shi joined, shi left 17:28 shi joined, bluescreen10 joined 17:29 shi left 17:30 shi joined 17:31 shi left 17:32 shi joined 17:34 shi left 17:35 shi joined, impious joined, shi left 17:36 shi joined 17:37 shi left, shi joined 17:42 shi left 17:43 shi joined, shi left 17:44 shi joined, shi left 17:45 shi joined 17:46 shi left, shi joined 17:47 shi left 17:48 shi joined, tyatpi_ joined 17:49 shi left 17:50 shi joined, shi left 17:51 shi joined 17:52 shi left, shi joined 17:53 shi left 17:54 shi joined 17:55 MayDaniel joined, shi left 17:56 shi joined 17:57 shi left 17:58 shi joined, dakkar left, shi left 17:59 shi joined, shi left 18:00 shi joined 18:01 shi left 18:02 shi joined, shi left 18:03 shi joined, risou_ joined, shi left 18:04 shi joined 18:05 shi left, MayDaniel left, risou left, shi joined 18:06 shi left 18:07 shi joined, shi left 18:08 shi joined 18:09 shi left, shi joined 18:10 shi left 18:11 shi joined, shi left 18:12 Hugmeir joined, shi joined, shi left
Hugmeir rakudo: my $test = [\+] 1..10; $test.perl.say; 18:12
p6eval rakudo d8e5de: OUTPUT«(1, 3, 6, 10, 15, 21, 28, 36, 45, 55)␤» 18:13
18:13 envi left
Hugmeir rakudo: my @test = [\+] 1..10; @test.perl.say; 18:13
p6eval rakudo d8e5de: OUTPUT«[1, 3, 6, 10, 15, 21, 28, 36, 45, 55]␤»
18:13 masak joined, shi joined
masak halloj, zebras! 18:13
18:14 shi left 18:15 shi joined, impious left 18:16 shi left 18:17 shi joined 18:19 Holy_Cow left
Hugmeir So alright, I'm kind of slow here. What does a triangle reduction return in scalar context? 18:19
18:19 Holy_Cow joined, shi left
masak depends what you mean by scalar context -- we don't really have scalar contexts in the same way as Perl 5 does. 18:19
18:20 plobsing left
masak rakudo: my @a = 1..10; my @b = [\+] @a; say +@b 18:20
jnthn The easy way to figure it out is to put .WHAT after the operation :)
p6eval rakudo d8e5de: OUTPUT«10␤»
18:20 shi joined
jnthn rakudo: my $test = [\+] 1..10; $test.WHAT.say 18:20
masak Hugmeir: but if you mean the above, it returns the length of the list, just like all other numifications of lists.
p6eval rakudo d8e5de: OUTPUT«List()␤»
masak jnthn! \o/
jnthn masak! \o/
18:21 shi left, jevin left
Hugmeir Stupid sexy context being contextual on the language it's used on. Who would've thought : ) 18:21
masak today's autopun spotting ^
18:21 shi joined 18:22 shi left 18:23 shi joined
diakopter hugme: hug Hugmeir 18:24
hugme hugs Hugmeir
Hugmeir Thnaks for the explanations! I meant it like in jnthn's message; assigning it to a scalar and asking .WHAT kindly did the trick.
18:24 shi left
masak ah. jnthn++ 18:24
18:25 shi joined
Hugmeir jnthnn++ I guess. #perl6++ in general. 18:25
18:27 shi left 18:28 shi joined 18:29 colomon joined, shi left 18:30 shi joined 18:31 shi left 18:32 shi joined, shi left 18:33 shi joined 18:34 shi left, Hugmeir left 18:35 shi joined, shi left 18:36 [hercynium] joined, [hercynium] left, [hercynium] joined, [hercynium] left, shi joined 18:37 shi left, shi joined 18:38 shi left 18:39 shi joined, hercynium left, shi left 18:40 shi joined 18:41 shi left, shi joined
pmurias who started the hugging meme? 18:43
18:44 Chillance joined
masak pmurias: au. 18:44
18:44 shi left, Patterner left, baest_ joined
pmurias au? 18:44
18:45 shi joined
PerlJam pmurias: audrey 18:45
masak pugs.blogs.com/audrey/2009/08/my-ho...gging.html
18:46 Psyche^ joined, Psyche^ is now known as Patterner, shi left 18:47 shi joined, shi left 18:48 shi joined 18:49 shi left 18:50 shi joined, shi left 18:51 shi joined, shi left 18:52 bluescreen10 left, shi joined 18:53 bluescreen10 joined 18:54 shi left, colomon left 18:55 shi joined, shi left 18:56 shi joined 18:58 shi left, pmurias left, shi joined 18:59 shi left 19:00 shi joined, shi left 19:01 shi joined
tadzik I think the "submethod BUILD { callsame; ... }" will become quite catchy 19:03
why is that submethod anyway?
19:04 risou joined
masak because we don't want it to inherit? 19:05
19:05 shi left 19:06 shi joined, risou_ left, shi left
tadzik I don't think I see the point... oh, so the BUILD in child will not override the parent one? 19:07
19:07 shi joined
masak right, all the BUILDs are meant to be called by BUILDALL. 19:07
19:08 shi left
masak (that way, you generally don't *have* to do 'callsame' in a BUILD) 19:08
tadzik well, otherwise you don't get your attibutes
19:08 shi joined 19:09 shi left 19:10 shi joined
masak I don't think I understand. do you have an example handy? 19:10
19:10 shi left 19:11 shi joined 19:12 shi left
tadzik sure, gimme a sec 19:12
19:12 shi joined 19:13 shi left, fhelmberger_ left 19:14 shi joined, shi left
tadzik masak: see wklej.org/id/494717/ 19:14
see the effect, then see what happens when you remove the callsame()
19:15 shi joined
masak reads 19:15
19:15 shi left
tadzik oh, the parent class is basically useless 19:16
it's from the time I was implementing AFTERPARTY for Rakudo :)
19:16 shi joined 19:17 shi left
masak ok, I see what the 'callsame' is doing, but I don't like it. 19:17
tadzik I don't like it either
19:17 shi joined
masak ISTR someone suggested a change to object initialization recently that would make that go away. 19:17
tadzik I prefer the Moose's way
masak who was it, and what was the solution? 19:18
was it mberends, in the living room, with the cudgel? :)
19:18 benabik joined, shi left
tadzik (: 19:18
masak the solution was something like "for each class, first initialize the attributes with their default values, then call BUILD" 19:19
19:19 shi joined
masak to me, that makes a lot more sense than having BUILD and attribute defaults compete. 19:19
hm, but maybe that was just a bug in Rakudo...?
19:19 shi left
tadzik no, that's a spec thingy 19:19
masak ok, then it officially sucks.
tadzik and Larry agrees on the current behaviour
I don't disagree 19:20
masak Larry agrees that it should change, or agrees with Rakudo's current crappy handling?
19:20 shi joined
tadzik agrees with what the spec says, so "you write BUILD when you want to organize the attribute setting yourself" 19:21
19:21 shi left
masak :( 19:21
what's Moose do?
tadzik and if you want to have Moose-like behaviour, write stuff after bless in new
hm?
masak how does Moose do all this?
19:21 shi joined
tadzik well, BUILD is called after everything is set up and ready 19:21
masak \o/ 19:22
tadzik that's the way I like it, and that's the way I expect it to work
19:22 shi left
tadzik I'm quite suprised Perl 6 is different 19:22
masak it's not just you. it's not just me. it's a bunch of people in RT.
19:23 shi joined, shi left 19:24 shi joined, shi left 19:25 shi joined 19:26 shi left
masak here's one argument against the behavior: (1) user reads list of attributes, sees the default initializations. makes conclusions. "aha, that attribute gets set to that value at object initialization. (2) user gets tired from reading lots of methods in the rest of the class. besides, the init bits were probably at the top anyway. 19:26
19:26 alim joined
masak (3) user misses BUILD halfway down the class. (4) BOOM 19:26
19:27 shi joined
masak and don't tell me programmer should've put BUILD further up. it's the language that shouldn't cause action at a distance without good cause. 19:27
19:27 shi left 19:28 shi joined
masak even worse action-at-a-distance: make class do nifty new role. role does a bunch of other roles. somewhere, a role contains a BUILD submethod. BOOM, attributes no longer get initialized. 19:28
19:28 shi left 19:29 shi joined
masak ss/ \(2/" (2/ 19:30
19:30 shi left 19:31 shi joined 19:32 shi left, shi joined 19:33 shi left 19:34 shi joined, shi left 19:35 shi joined 19:37 shi left, pyrimidine left, shi joined 19:38 shi left 19:39 shi joined, shi left 19:40 shi joined, shi left 19:41 shi joined 19:42 shi left 19:43 hercynium joined, shi joined 19:44 shi left 19:45 shi joined, shi left, jaldhar left 19:46 shi joined, shi left 19:47 shi joined 19:48 shi left, shi joined 19:49 shi left 19:50 shi joined, shi left 19:51 shi joined 19:52 shi left, shi joined 19:53 stkowski joined, shi left 19:54 shi joined, leprevost left 19:56 shi left 19:57 shi joined 19:58 shi left 19:59 shi joined 20:00 colomon joined, shi left 20:01 shi joined, shi left 20:02 shi joined
masak we need some conversation here to drown out shi's constant joining and leaving :) 20:02
20:02 shi left
flussence_ that BUILD thing sounds like a good reason to have something like "does RoleName except qw(BUILD)"... 20:03
20:03 shi joined 20:04 shi left
flussence_ (or perhaps to beat whoever wrote the role over the head with a cluestick) 20:04
20:04 shi joined
masak both of those solutions are only workarounds to the real problem of BUILD canceling out the effect of attribute initialization. 20:05
20:06 shi left, plobsing joined 20:07 shi joined, shi left 20:08 shi joined 20:09 shi left
flussence_ I'm pretty sure the only time I've ever used BUILD was... using it wrong. Hmm. 20:09
20:09 shi joined 20:10 shi left 20:11 shi joined, shi left 20:12 shi joined, shi left 20:13 shi joined 20:14 shi left 20:15 shi joined
masak tadzik: three people had the same expectations: in June 2009, August 2009, and July 2010. rt.perl.org/rt3/Ticket/Display.html?id=68498 20:15
20:15 shi left
tadzik hah, I was almost expecting "and The Month of The Seeds, Anno Domini 1132" 20:16
20:16 shi joined
masak tadzik: it's your country that has those strange month names, not mine :P 20:16
20:16 shi left
tadzik lies! :) 20:16
masak tadzik: by the way, your month names are totally charming. ;) 20:17
20:17 shi joined
masak "stitch-month"? priceless. 20:17
tadzik Styczeń, Luty, Marzec, Kwiecień, Maj, Czerwiec, Lipiec, Sierpień, Wrzesień, Październik, Listopad and Grudzień? Seems pretty normal to me :)
masak it stiches together the old year and the new one.
20:18 shi left
tadzik (: 20:18
masak I bet there's a bunch of flowers and old leaves in there as well.
20:18 shi joined
masak is "Kwiecień" to do with flowers? 20:18
20:19 shi left 20:20 shi joined, shi left
masak ah yes, so it seems. and "Październik" is "flax month". you can just make this stuff up. 20:20
can't*
20:21 shi joined 20:22 shi left, shi joined 20:23 shi left 20:24 shi joined, plobsing left, shi left
masak uh... and June is named after... an obscure insect? 20:24
tadzik nope, I think that has something to do with flora again 20:25
20:25 shi joined
tadzik oh no, you're right 20:25
a not-yet-bee
20:25 shi left
masak used to make a red dye of some kind. 20:26
tadzik they used to make a red paint out of it, our Red is Czerwony
yeah :)
20:26 shi joined
masak (Polish months)++ # making the Latin one's seem so boring! 20:26
s/one's/ones/
20:28 shi left, y3llow_ joined, pothos_ joined 20:29 shi joined 20:30 y3llow left, pothos left, shi left, y3llow_ is now known as y3llow, pothos_ is now known as pothos 20:31 shi joined, shi left 20:32 shi joined 20:33 shi left, shi joined 20:34 shi left 20:35 shi joined, shi left 20:36 shi joined 20:38 shi left, plobsing joined 20:39 shi joined, shi left 20:40 shi joined 20:42 shi left, shi joined 20:43 shi left, plobsing left 20:44 shi joined, shi left 20:45 shi joined, shi left 20:46 shi joined 20:47 shi left 20:48 shi joined, shi left 20:49 shi joined 20:50 shi left 20:51 plobsing joined, shi joined 20:52 shi left, sufrostico left, shi joined 20:53 sufrostico joined, shi left, sufrostico is now known as Guest32211 20:54 shi joined, shi left, colomon left 20:55 shi joined 20:56 shi left, ab5tract left 20:57 shi joined 20:58 shi left, shi joined 20:59 shi left, Guest32211 left, Guest32211 joined 21:00 shi joined, shi left
masak dduncan's email to p6l is classic p6l material... but also kind of a nice idea. :) to me that'd be a kind of a lint-like tool, and thus not even an extension so much as a "third-party" binary/module. 21:01
21:01 shi joined
masak the prerequisite of such an idea is something PPI/STD-like, of course. 21:01
moritz_ which we have 21:02
\o/
masak :)
moritz_ will you write it (3rd party app), or should I?
21:02 Guest32211 is now known as sufrostico_ 21:03 shi left
masak please go ahead... and then reply to dduncan's email ;) 21:03
moritz_ uhm, I meant if I should write the reply :-)
masak oh :P
21:04 shi joined
masak please go ahead and reply. I'm currently preparing for $teaching tomorrow. 21:04
21:04 shi left
moritz_ what are you going to teach? 21:05
21:05 shi joined, shi left
jdhore How to be Awesome 101 21:06
masak first day of two was today. Android development.
21:06 shi joined
masak jdhore: I'll take that as a compliment. thank you ;) 21:06
jdhore masak, ah, How to be Awesome 101 is next week?
masak depends how you count the GoOpen talk in Oslo :) 21:07
21:07 shi left
masak it's named "Herding Cats and Robots" :) 21:07
jdhore haha
21:07 colomon joined
masak and it's about you, #perl6! 21:07
21:07 shi joined 21:08 plobsing left
moritz_ I thought bacek was the robot, and he's mostly in #parrot :-) 21:08
21:08 shi left
masak dang, bacek is stealing my reputation of being a bot... :P 21:08
masak .oO( reverse Turing test... )
21:09 shi joined, Rotwang joined, shi left 21:10 shi joined, ab5tract joined 21:13 shi left 21:14 [particle] left, shi joined, ashleydev left, [particle] joined, shi left 21:15 shi joined, fhelmberger joined 21:16 shi left, ashleydev joined, Holy_Cow left, shi joined
tadzik can Rakudo compile STD.pm6? 21:17
moritz_ no
masak it will be a fine day when it can.
the turtles will laugh all the way down ;) 21:18
moritz_ :-)
21:18 shi left 21:19 shi joined, shi left 21:20 shi joined 21:22 ashleydev left, shi left
moritz_ rakudo: my $t = time; sleep 0.1 for ^10; say time - $t 21:22
p6eval rakudo d8e5de: OUTPUT«1␤»
21:23 shi joined, shi left, icwiener left 21:24 shi joined, coldhead joined, shi left
dalek ast: 15c1b74 | moritz++ | S32-io/IO-Socket-INET. (2 files):
[socket] adapt to more p5 like IO::Socket::INET implementation
21:25
21:25 shi joined 21:26 shi left, sufrostico_ is now known as Sufrostico 21:27 shi joined, Sufrostico left, shi left 21:28 shi joined, shi left 21:29 shi joined
tadzik "one spec change away" :) 21:29
21:30 shi left, shi joined 21:31 hercynium left, shi left, Mowah left 21:32 shi joined, shi left 21:33 shi joined 21:34 shi left, benabik left, shi joined 21:35 bluescreen10 left, shi left, ashleydev joined 21:36 shi joined, shi left 21:37 shi joined 21:38 shi left
tadzik moritz++ # nice 21:38
[Coke] (duncan) looks like a great padre thing.
tadzik installs LWP::Simple with Panda
21:39 shi joined
tadzik oh, it fails the tests for me 21:39
21:40 shi left
tadzik moritz_: nopaste.snit.ch/38011 21:40
21:41 shi joined, shi left 21:42 shi joined 21:43 shi left, Chillance left, shi joined 21:44 shi left 21:45 shi joined, shi left 21:46 plobsing joined, shi joined
moritz_ with newest rakudo? 21:47
tadzik aye
or, wait
21:47 shi left
tadzik ...how newest? Gimme a sec :) 21:47
moritz_ well, it needs 15c1b74 21:48
the patch I just pushed
21:48 shi joined
tadzik This is Rakudo Perl 6, version 2011.02-55-ge3bd9aa 21:48
moritz_ ETOOOLD
you're so last release
21:49 shi left
tadzik git pull => Already up-to-date.; make: Nothing to be done for `all'. 21:49
tadzik scrathes head
moritz_ don't forget "make install"
tadzik did
I don't see the patch in git log
jdhore moritz_, so i didn't break things?
21:49 shi joined
tadzik did you really push it? 21:49
moritz_ oh 21:50
jdhore oh, you were referring to the INET change?
tadzik caught in the act! :)
21:50 shi left
tadzik jdhore: yes 21:50
jdhore ah, I thought you were saying I broke something in 2011.03 :D
moritz_ tadzik: I tried, but got a [rejected]
21:51 shi joined
tadzik you're so pre-release :) 21:51
21:51 shi left
tadzik oh there it is 21:51
21:52 shi joined
dalek kudo: 25e5bd0 | TiMBuS++ | src/core/IO/Socket/INET.pm:
Changed IO::Socket::INET to act more like perl5's. One connection per object, acts a little more like a filehandle, and most importantly, actually works (the old code no longer connects).

Signed-off-by: Moritz Lenz [email@hidden.address]
21:52
21:53 shi left 21:54 shi joined
moritz_ TiMBuS++ 21:54
21:57 ashleydev left, shi left, ashleydev joined 21:58 shi joined 21:59 ymasory left
tadzik ==> Succesfully installed LWP::Simple 22:00
\o/
22:02 shi left 22:03 shi joined, shi left 22:04 shi joined 22:05 shi left 22:06 shi joined
tadzik masak: Web.pm has some broken dependencies, doesn't it? 22:07
masak likely. 22:08
proabably simply bitrot.
tadzik it could probably make use of HTTP::Server::Simple 22:09
masak oh, indeed.
moritz_ ... which probably needs updating after last rakudo changes :-) 22:10
tadzik oh crap :)
masak the Perl 6 world has largely moved on without Web.pm.
moritz_ -> sleep
masak -> sleep
colomon well, we need to fix that, then, no?
22:10 masak left 22:13 shi left 22:15 tyatpi_ left 22:32 plainhao left 22:35 cdarroch left, ab5tract left 22:36 ab5tract joined 22:37 jevin joined 22:43 kaare_ left 22:55 ab5tract left 22:56 ab5tract joined
TimToady tadzik: a role's submethods do not override a class's, so that problem doesn't arise with submethod BUILD 23:10
23:10 ab5tract left
TimToady phenny: tell masak a role's submethods do not override a class's, so that problem doesn't arise with submethod BUILD 23:10
phenny TimToady: I'll pass that on when masak is around.
23:14 alim left
tadzik TimToady: I see 23:19
23:23 stkowski left
tadzik rakudo: use LWP::UserAgent:from<parrot> 23:25
p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Parent of 'PCT;Grammar' is null␤»
tadzik that's funny
rakudo: use LWP::UserAgent:from<parrot>; 1 23:26
p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Parent of 'PCT;Grammar' is null␤»
tadzik rakudo: use LWP::UserAgent:from<parrot>; say 'alive'
p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Parent of 'PCT;Grammar' is null␤»
23:34 mtk left 23:36 fisted left 23:37 cognominal left 23:41 Rotwang left 23:43 mtk joined, fisted joined 23:58 jevin left