»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
ingy I like pie! 00:00
timotimo ingy: would pie delivered to your home lead to more YAML implementedness in the very near future? :)
ingy sure!
timotimo what part of the world do you live near again? 00:01
ingy I'm actually working on YAML2 again this week
00:01 spider-mario left
ingy Seattle 00:01
timotimo duckduckgo.com/?q=pie+delivery+near+seattle - is this workable?
ingy actually the pie has to wait
timotimo oh 00:02
bad local time?
ingy no, I'm on a diet
timotimo oh
well, bad for YAML :)
ingy unless it's a YAML Pie!
timotimo what is YAML 2?
00:02 colomon joined
ingy timotimo: I'm working on the yaml Pegex grammar, which should port easily to p6 00:03
here's a link to where I left off last time: github.com/ingydotnet/yaml-pgx/tre...r/yaml.pgx 00:04
timotimo: github.com/yaml/YAML2/wiki
I think I started yaml2 in 2011 at TimToady's house! 00:05
but p6 people wouldn't think that's a long time ago ;)
vendethiel :P
timotimo :3
ingy was at oscon when Orwant threw the mug 00:06
I think I even have an RFC
orwant threw the mug and TimToady announced perl 6 to the whole audience a couple hours later 00:07
I doubt many people here go back that far
vendethiel ingy: when was that? 00:08
ingy RFC 270: Replace XS with the Inline module as the standard way to extend Perl. [HTML]
2000
vendethiel oh. I was 6 back then :P 00:09
00:09 adu joined
ingy from www.perl6.org/archive/rfc/by-number.html 00:09
huf i was 14 but completely useless :)
ingy Jon Orwant started the whole thing and disappeared shortly after
huf that has stayed constant over the years :) 00:10
vendethiel hugme hug huf
hugme hugs huf and blushes
ingy :)
huf i think i finally learned to program at age 16... i have chosen to blame my dad because it's such a historically well-explored path :) 00:11
and blaming the soviets is so cliche
ingy vendethiel: Ironically I just finished RFC 270 last December (TPF Grant for Inline)
vendethiel ingy: that took some time :P 00:12
ingy 2 months
:)
I put it down for 12+ years though 00:13
huf sparse two months...
ingy no, Nov/Dec 2014
p6 probably should have done the same
it was way before its time 00:14
and churned for years
haskell/pugs is totally fast enough now, (one example)
sjn o/ #perl6 00:16
00:22 coffee` joined
avuserow_ \o sjn, #perl6 00:23
00:28 Hor|zon joined 00:32 Hor|zon left, BenGoldberg left 00:34 BenGoldberg joined 00:35 Kristien_ left 00:37 BenGoldberg left 00:38 BenGoldberg joined, BenGoldberg left, zakharyas left 00:39 BenGoldberg joined
Mouq m: my $a = 4; $a ~~= 5 00:39
camelia ( no output )
Mouq (I have a fix locally that makes that illegal, just wanted to check that Rakudo was wrong originally) 00:40
std: my $a = 4; $a ~~= 5
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of ~~ because chaining operators are diffy at /tmp/uumYonhCEY line 1:␤------> my $a = 4; $a ~~=⏏ 5␤Check failed␤FAILED 00:00 137m␤»
00:42 BenGoldberg left
psch m: my $a = 4; $a >== 5 # 00:42
camelia ( no output )
psch Mouq: do you catch that in your patch?
looks to me like it could be caught in the same grammar bit 00:43
00:43 BenGoldberg joined
psch std: my $a = 4; $a >== 5 # 00:43
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of >= because chaining operators are diffy at /tmp/JcXwSznRh5 line 1:␤------> my $a = 4; $a >==⏏ 5 #␤Check failed␤FAILED 00:01 137m␤»
psch (<== falls somewhere else because that's also feed) 00:44
Mouq psch: Yep 00:47
Just gotta spectest
psch Mouq++
Mouq several times tried to do this a very particular way, and spent much time before going, wait, why am I doing this in the first place? 00:50
psch m: my $a = 4; $a ~~= 5; say $a # ooc 00:51
camelia rakudo-moar d72866: OUTPUT«4␤»
psch m: my $a = 4; $a ~~= Int; say $a # ooc
camelia rakudo-moar d72866: OUTPUT«4␤»
psch m: my $a = 4; $a ~~= Str; say $a # ooc
camelia rakudo-moar d72866: OUTPUT«4␤»
Mouq m: my @foo; say @foo ,= 1, 2, 3; @foo.perl.say # Also fixed, fwiw 00:55
camelia rakudo-moar d72866: OUTPUT«123␤Array.new(1)␤»
00:57 BenGoldberg left, BenGoldberg joined
Mouq «is(@p[0],3, "or= operator parses as item assignment 1");» Well that's wrong 01:02
Not sure if it's been noted, but the last test of S17-supply/start.t is flapping for me 01:05
01:07 BenGoldberg left, BenGoldberg joined 01:09 BenGoldberg left 01:10 BenGoldberg joined 01:16 rurban left
BenGoldberg std: my $a = 4; $a <=>= 5; say $a; 01:20
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of <=> because structural infix operators are diffy at /tmp/_1IrdPMgNz line 1:␤------> my $a = 4; $a <=>=⏏ 5; say $a;␤Check failed␤FAILED 00:00 138m␤»
BenGoldberg std: my $a = 4; $a [R<=>]= 5; say $a; 01:23
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of R<=> because structural infix operators are diffy at /tmp/LGvzMB48Sc line 1:␤------> my $a = 4; $a [R<=>]=⏏ 5; say $a;␤Check failed␤FAILED 00:00 138m␤»
BenGoldberg m: say [R,] 1..4 01:24
camelia rakudo-moar d72866: OUTPUT«Too many positionals passed; expected 2 arguments but got 4␤ in block at src/gen/m-CORE.setting:20514␤ in sub at src/gen/m-CORE.setting:20664␤ in block <unit> at /tmp/Rmt_jFn1fH:1␤␤»
dalek ast: feba4cc | Mouq++ | S03-operators/assign.t:
Fix faulty tests; remove TODO for RT #76414
01:30
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=76414
dalek kudo/nom: 34669da | Mouq++ | src/Perl6/Grammar.nqp:
Improve metaop:<=>

Dies in the case of fiddly/diffy operators, and now adjusts to the proper precedence depending on the operator
01:32
Mouq m: my $a; $a =>= 1 01:36
camelia rakudo-moar d72866: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤ in sub infix:<=>> at src/gen/m-CORE.setting:10582␤ in block <unit> at /tmp/dwSV04r2o9:1␤␤»
Mouq Weird 01:37
At least that's not my fault
std: my @a; @a ,= 1 01:38
camelia std f9b7f55: OUTPUT«ok 00:00 137m␤»
01:43 espadrine left
Mouq std: my $a; $a but= role {} 01:44
camelia std f9b7f55: OUTPUT«===SORRY!===␤Cannot make assignment out of but because structural infix operators are diffy at /tmp/UuQRBYxnGh line 1:␤------> my $a; $a but=⏏ role {}␤Check failed␤FAILED 00:00 139m␤»
colomon : m: my $a; $a =[>=] 1 02:03
m: my $a; $a =[>=] a1
camelia rakudo-moar d72866: OUTPUT«===SORRY!=== Error while compiling /tmp/piLjju0yaG␤Undeclared routine:␤ a1 used at line 1␤␤»
colomon m: my $a; $a =[>=] 1
camelia ( no output )
colomon Mouq: that’s the expression you wanted, right? 02:04
Mouq colomon: Uh, wait, what is that even doing?
m: my $a = 0; $a =>= 1 02:05
camelia ( no output )
Mouq m: my $a = 0; $a =>= 1; say $a.perl
camelia rakudo-moar d72866: OUTPUT«0 => 1␤»
colomon should be metaop- = on >=
Mouq colomon: metaop = is a postfix
m: my $a; $a = [>=] 1
camelia ( no output )
colomon dang, you’re right 02:06
m: my $a; $a [=>]= 1
camelia rakudo-moar d72866: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤ in sub infix:<=>> at src/gen/m-CORE.setting:10582␤ in block <unit> at /tmp/1WKgp51djf:1␤␤»
Mouq m: [=>] # golf? 02:07
camelia rakudo-moar d72866: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤ in sub infix:<=>> at src/gen/m-CORE.setting:10582␤ in sub at src/gen/m-CORE.setting:20637␤ in block <unit> at /tmp/Tr578lxieH:1␤␤»
Mouq :D
colomon is clearly very confused 02:09
psch m: [+]
camelia ( no output )
psch does infix:«=>» have an identify? 02:10
or rather, a one element
Mouq psch: Probably not, but that's a LTA error
psch or zero element? 02:11
my algebra is bad :P
oh, yeah. the error is definitely LTA. i'm just wondering what it should be
Mouq m: [/]
camelia rakudo-moar d72866: OUTPUT«Unhandled exception: No zero-arg meaning for infix:</>␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:14599 (/home/camelia/rakudo-inst-2/languages/perl6/runtim…»
Mouq m: [/] 1,2,3,4 02:12
camelia ( no output )
02:12 adu left
colomon m: say [=>] 1, 2, 3 02:12
camelia rakudo-moar d72866: OUTPUT«1 => 2 => 3␤»
psch neutral element was what i looking for 02:14
m: say [*]
camelia rakudo-moar d72866: OUTPUT«1␤»
psch m: say [+]
camelia rakudo-moar d72866: OUTPUT«0␤»
psch but => isn't well defined like that i suppose
02:15 adu joined
psch and thus should probably error like [/] does 02:15
m: say () => ()
camelia rakudo-moar d72866: OUTPUT« => ␤»
psch m: say Nil => Nil
camelia rakudo-moar d72866: OUTPUT«Unexpected named parameter 'Nil' passed␤ in sub say at src/gen/m-CORE.setting:17348␤ in block <unit> at /tmp/CIma5oJNgF:1␤␤»
psch m: say (Nil => Nil)
camelia rakudo-moar d72866: OUTPUT«Nil => (Any)␤»
02:17 Hor|zon joined
raydiak => seems to be missing from the table at S03:4607 02:18
synopsebot Link: design.perl6.org/S03.html#line_4607
02:18 adu left
psch i guess an argument could be made for «$a [=>]= 1» to mean "assign the pair constructed with the value of $a as the key and 1 as the value to $a" 02:18
02:21 Hor|zon left
Mouq psch: And that's what it does; it's just that it doesn't work if $a is undefined, since it uses the value of [=>] as the initial arg in that case 02:23
m: my $a = 0; $a [=>]= 1
camelia ( no output )
Mouq m: my $a; $a [=>]= 1
camelia rakudo-moar d72866: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤ in sub infix:<=>> at src/gen/m-CORE.setting:10582␤ in block <unit> at /tmp/t9w1HxHtCz:1␤␤»
psch oh, alright 02:24
that's pretty cool heh
"but got 0" confuses me though
oh that's the result of => on an empty list 02:25
right, Mouq++
that's because the "make the lhs stringy" magic we have on => doesn't do anything there i guess 02:26
anyway, i'll go to bed. i don't think i really followed this that well up to now :) 02:28
02:29 coffee` left
Mouq 'night psch :) 02:31
dalek ast: f92b27d | Mouq++ | S03- (3 files):
Use new X::Syntax::Can'tMeta error
02:35
kudo/nom: d262118 | Mouq++ | src/ (2 files):
Add a very general X::Syntax::Can'tMeta and use it
02:40 colomon left, MadcapRusso joined, colomon joined 02:43 MadcapJake left 02:44 ilbot3 left 02:46 gfldex left, ilbot3 joined
dalek ast: 54b136e | Mouq++ | S03-operators/assign.t:
Add test for #72874
02:48
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72874
TimToady has finished writing up his email interview for infoworld, so maybe can pay some attention here again 02:55
03:10 xinming_ joined 03:14 noganex_ joined 03:17 noganex left 03:18 Psyche^ joined 03:21 xinming__ joined 03:22 Patterner left 03:23 camelia left
Mouq ...oops? :( 03:23
So, writing "b: ..." will apparently kill camelia? 03:24
03:24 camelia joined, xinming_ left
Mouq b: 1 03:24
Or... not 03:25
03:25 ChanServ sets mode: +v camelia
camelia b : OUTPUT«Can't chdir to '/home/camelia/rakudo/': No such file or directory at lib/EvalbotExecuter.pm line 166.␤ EvalbotExecuter::_auto_execute(HASH(0x1e6c2c8), 1, GLOB(0xa80c5d0), "/tmp/LbRG5QwrBj", "b") called at lib/EvalbotExecuter.pm line 114␤ EvalbotExecuter::_fork_and_eva…» 03:25
avuserow_ b is pre-nom IIRC, no surprise it's not running 03:39
TimToady we should use a fail-soft language so it doesn't blow up :) 03:40
03:48 BenGoldberg left
Mouq is ... supposed to flatten? RE: #80574 03:53
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=80574
TimToady yes 03:54
use $() or [] to prevent it
otherwise there's no way to return multiple values for the sequence from one call 03:55
Mouq TimToady: Ok, that's what I thought, I just wanted to check :) 03:56
03:57 xinming__ left 04:06 Hor|zon joined 04:10 Hor|zon left, skids joined 04:57 virtualsue joined 05:06 xinming_ joined 05:09 dj_goku left, dj_goku joined, dj_goku left, dj_goku joined 05:16 yeahnoob joined 05:24 Mouq left 05:29 virtualsue left 05:43 vendethiel left 05:45 vendethiel joined 05:47 fil__ joined
fil__ can my class have an array field? 05:48
if so, how do I initialize it without confusing the instantiator?
05:50 yeahnoob left
fil__ and can my array have a type? 05:50
05:55 Hor|zon joined
dj_goku fil__: just a guess from googling 'has @!items' 05:55
fil__ yes I figured that was the syntax 05:56
but I'm worried about instantiating it
with multiple items
won't it confuse it with the other fields...?
dj_goku that I don't know. 05:57
what do you mean by other fields?
fil__ MyClass.new(foo => 1, items => 3, 4, bar => 5); 05:58
the comma is kind of overloaded
worried that compiler will get confused
dj_goku items => <3, 4> maybe? 05:59
fil__ I would have thought () or []
raydiak m: class Foo { has @.bar }; Foo.new: :bar(1,2,3); Foo.new(bar => (1,2,3)); Foo.new: bar => [1,2,3]; # <-- fil__
camelia ( no output )
05:59 Hor|zon left
fil__ ok 06:00
guess they all work!
what's preferred? () or []?
raydiak () makes a parcel which gets flattened into @.bar ... [] makes an array which does the same...preference really 06:01
I guess you could benchamrk and see if one is currently faster, or if it all just gets optimized away yet 06:02
hm 06:03
m: class Foo { has @.bar }; say Foo.new(:bar(1,2,3)).bar.WHAT; say Foo.new(bar => [1,2,3]).bar.WHAT; 06:04
camelia rakudo-moar d26211: OUTPUT«(Array)␤(Array)␤»
raydiak m: class Foo { has @.bar }; say Foo.new( bar => (1,2,3) ).bar.WHAT; 06:05
camelia rakudo-moar d26211: OUTPUT«(Array)␤»
raydiak m: class Foo { has @.bar }; say Foo.new( bar => Parcel.new(1,2,3) ).bar.WHAT;
camelia rakudo-moar d26211: OUTPUT«(Array)␤»
raydiak yep, no difference in the end
fil__ stylistically, it feels to me like [] is clearer
raydiak I'm rather fond of the :bar(...) syntax myself, but maybe just because it's new and shiny...[] certainly is clearer to people with backgrounds in many other languages, too (including p5) 06:07
TimToady you can just as easily write :bar[1,2,3] 06:08
it's not a subscript
raydiak oh I forgot about that
06:08 Mouq joined
raydiak m: class Foo { has @.bar }; say Foo.new( bar => Blob[uint8].new(1,2,3) ).bar.WHAT; 06:09
camelia rakudo-moar d26211: OUTPUT«(Array)␤»
raydiak so the type of the positional thing you pass into an @ attribute at initialization doesn't matter? iow always list assignment, not binding? 06:10
TimToady hmm 06:11
m: class Foo { has @.bar }; say Foo.new( bar => [1,2,3] ).bar.elems
camelia rakudo-moar d26211: OUTPUT«3␤»
TimToady but apparently loses the itemization somewhere 06:12
you'd only get 1 elem if you assigned [1,2,3] directly to @foo
raydiak I thought I should be wrong about that after I explained it, but...it seems to always gives a flattened Array, regardless of what you pass in or whether it's itemized or not
TimToady yeah, something a little odd going on there 06:13
probably calling .list on the initializer
raydiak will rakudobug after impending dinner 06:14
Mouq m: say (1 => Array.new(1,2,3)).perl
camelia rakudo-moar d26211: OUTPUT«1 => [1, 2, 3]␤»
TimToady well, pairs always itemize anyway in p6 06:15
fil__ how do I test type? 06:16
$foo isa Bar
is there some kind of "isa" operator?
raydiak fil__: smartmatch (~~) is the most common way, I think 06:17
m: say 42 ~~ Int
camelia rakudo-moar d26211: OUTPUT«True␤»
fil__ so $foo ~~ Bar
raydiak yep :) 06:18
afk
Mouq $foo.isa(Bar) should work too 06:23
06:24 japhb left
Mouq m: multi $a 06:30
camelia rakudo-moar d26211: OUTPUT«===SORRY!=== Error while compiling /tmp/0yUyo4fJXp␤ scoped variables not yet implemented. Sorry. ␤at /tmp/0yUyo4fJXp:1␤------> multi $a⏏<EOL>␤ expecting any of:␤ constraint␤»
Mouq Oh, excuse me
m: my multi $a # much better
camelia ( no output )
Mouq :P 06:31
06:40 fil__ left 06:47 japhb joined 06:56 adu joined 07:05 japhb left 07:11 xfix joined
Mouq m: sub foo(::T $x, T $y) { $x + $y }; foo(42, 12e0) # I didn't know we had generics in subs :O 07:16
camelia rakudo-moar d26211: OUTPUT«Type check failed in binding $y; expected 'Int' but got 'Num'␤ in sub foo at /tmp/mpRUunygb_:1␤ in block <unit> at /tmp/mpRUunygb_:1␤␤»
07:17 japhb joined 07:23 wicope joined
dalek c: 24185e4 | paultcochrane++ | lib/Language/quoting.pod:
Typographical etc. corrections to quoting.pod
07:41
c: 9277006 | paultcochrane++ | lib/Language/quoting.pod:
Wrap paragraphs consistently in quoting.pod
c: 3dbfc41 | paultcochrane++ | lib/Language/variables.pod:
Typo: s/directoy/directory/
07:44 Hor|zon joined 07:48 Hor|zon left 07:52 MadcapRusso left 08:04 prime left 08:06 araujo joined
avuserow_ std: my multi $a; 08:07
camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
avuserow_ std: my proto $a;
camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
08:10 Mouq left 08:11 darutoko joined, prime joined 08:13 lumimies left 08:16 lumimies joined
moritz good morning 08:17
avuserow_ o/ moritz 08:18
08:19 adu left
moritz m: say 42.conj.^name 08:32
camelia rakudo-moar d26211: OUTPUT«Int␤»
moritz m: say (1+2i).conj 08:34
camelia rakudo-moar d26211: OUTPUT«1-2i␤»
moritz m: say (1+2i).sign 08:35
camelia rakudo-moar d26211: OUTPUT«Memory allocation failed; could not allocate 57472 bytes␤» 08:36
moritz rakudobug
m: say 1e2.sign.^name
camelia rakudo-moar d26211: OUTPUT«Int␤»
moritz m: say (-1).rand 08:39
camelia rakudo-moar d26211: OUTPUT«-0.196345961885758␤»
08:40 diana_olhovik joined 08:45 Hor|zon joined 08:49 Hor|zon left
dalek kudo/nom: 964aaea | moritz++ | src/core/Cool.pm:
Cool.sign coerces to Real, not Numeric

avoids infinite recursion on (1+2i).sign
08:57
08:57 diana_olhovik left 09:00 diana_olhovik_ joined 09:07 V_S_C joined 09:11 diana_olhovik_ left 09:12 Rounin joined 09:17 gfldex joined
dalek c: ae1b508 | moritz++ | lib/Type/Cool.pod:
Cool: start to document methods individually
09:20
ast: 752484f | moritz++ | S32-num/sign.t:
Test that sign(Complex) dies correctly
09:25
09:27 rurban joined 09:28 joethephish joined 09:30 joethephish left
V_S_C gist.github.com/VSChawathe/612fb57c2b1e0d4b0240 09:32
moritz V_S_C: please open an issue on github.com/tadzik/Bailador 09:38
09:38 molaf__ joined 09:41 molaf_ left 09:45 virtualsue joined
V_S_C moritz: thank you, done. 09:46
09:46 V_S_C left 09:53 Mouq joined 09:57 coffee` joined 09:58 rurban__ joined, Mouq left 10:00 Kristien joined
dalek c: e440b26 | moritz++ | lib/Type/Cool.pod:
Cool: document more methods
10:00
10:02 yeahnoob joined 10:03 diana_olhovik_ joined
jnthn morning, #perl6 10:03
FROGGS hi jnthn
hmmm 10:06
JimmyZ morning
nwc10 morning
FROGGS CONTROL does not catch Perl6::Grammar's worries, does it?
err, Perl6::Optimizer's, even 10:07
10:08 El_Che left
FROGGS hmmm, warnings in the optimizer are just nqp::printfh'd to stderr... I guess we want to throw an exception instead 10:09
bartolin FROGGS: I just found that, too ;-)
yoleaux 7 Feb 2015 22:53Z <FROGGS> bartolin: do you have an opinion to RT #123584?
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123584
10:09 abraxxa joined
bartolin FROGGS: though one could test with something like: perl6-m -e 'use lib "t/spec/packages"; use Test::Util; is_run q[$; my $b;], { status => 0, err => / ^ "WARNINGS:\nUseless use of variable \$ANON_VAR__1 in sink context" / }, "OK"' 10:11
FROGGS true
bartolin I would even think that's good enough to close the ticket for now (since the test could be improved later) 10:13
FROGGS aye 10:14
it is just that shelling out is not funny on the jvm
bartolin true enough 10:15
10:16 spider-mario joined
FROGGS adding that test now, thanks :o) 10:16
bartolin np! and timotimo++ for pointing me at CONTROL blocks for catching warnings. 10:18
dalek ast: 9364013 | FROGGS++ | S32-exceptions/misc.t:
add test for RT #123584
10:20
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123584
10:23 virtualsue left 10:30 espadrine joined 10:31 V_S_C joined
V_S_C moritz: github.com/tadzik/Task-Star/issues/4 10:32
10:32 V_S_C left 10:33 tgt joined 10:34 Hor|zon joined 10:38 Hor|zon left 10:40 fhelmberger joined 10:44 fhelmberger left
jnthn Pro tip: don't do meta-meta-programming until at least the first cup of coffee is finished... 10:45
10:48 pmurias joined
moritz vike: that's not a bug in Task::Star, it's simply how panda works 10:50
sorry, meant V_S_C
vendethiel
.oO( drink a meta-cup of metacoffee before )
10:51
11:03 telex left 11:04 telex joined
moritz vendethiel: the key is to meta-drink it :-) 11:06
nwc10 jnthn: *first*? it would feel more like one cup for meta-programming, and one more for meta-meta- 11:12
arnsholt I'd argue at least two more for meta-meta; if not four 11:13
I suspect the complexity here grows super-linearly =)
Kristien vendethiel: my code generation works :P 11:18
11:18 gr33n7007h joined
moritz arnsholt: come on, it's just OO :-) 11:19
11:21 Sir_Ragnarok left
jnthn moritz: Did we find any reason not to merge 6pe-mop? 11:21
11:23 Sir_Ragnarok joined
moritz jnthn: I didn't 11:23
dalek kudo/native-ref: 0a650d6 | jnthn++ | / (4 files):
MOP plumbing to support method ^foo($) { ... }.
11:26
11:32 Kristien left
dalek kudo/native-ref: b665ea8 | jnthn++ | src/Perl6/Actions.nqp:
Implement method ^foo($) { ... } syntax.
11:33
jnthn > class C { method ^omg($) { 'omg' } }; say C.^omg
omg
\o/
vendethiel jnthn++ 11:34
FROGGS jnthn++
vendethiel thought this syntax already worked for some rason :o)
FROGGS m: class C { method ^omg($) { 'omg' } }; say C.^omg
camelia rakudo-moar 964aae: OUTPUT«No such method 'omg' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/QXrf9hkW1a:1␤␤»
vendethiel I know, I know
FROGGS well, it was parsed correctly :o) 11:35
jnthn Yeah, the ^ was ignored
nwc10 m: class C { method ^omg($) { 'omg' } }; say C.^omg
camelia rakudo-moar 964aae: OUTPUT«No such method 'omg' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/AKw12Zqw_L:1␤␤»
nwc10 nope, future not yet evenly distributed
oh, I missed FROGGS doing that 11:36
I claim I'm distracted
FROGGS :o)
moritz jnthn: will you do the 6pm-mop merge? or shall I? 11:37
jnthn moritz: I don't mind :) 11:38
moritz: If you've time to do it, please go ahead. 11:39
jnthn is looking into the intersection of sig binding and native refs next. 11:40
moritz git++ 11:43
dalek Heuristic branch merge: pushed 16 commits to rakudo/nom by moritz
jnthn \o/ 11:44
moritz: Thanks! :) 11:46
moritz jnthn: was an automatic merge, so not much to do :-) 11:47
jnthn++ # doing all the hard work
11:51 pmqs joined 11:54 rindolf joined
dalek p/js: 8405324 | (Pawel Murias)++ | t/nqp/58-attrs.t:
Compare string in test with eq not ==.
11:57
p/js: 9106771 | (Pawel Murias)++ | / (3 files):
Implement nqp::getattr_*. Add tests for that.
p/js: bc8e865 | (Pawel Murias)++ | TODO:
Remove done item from TODO.
p/js: 06e2e84 | (Pawel Murias)++ | / (3 files):
Implemenent and test a bunch of integer comparision ops.
12:03 mj41 joined
pmurias m: my $list := nqp::list('1','2','3');nqp::setelems($list, 1); say(nqp::join(',', $list)); nqp::setelems($list, 3);say(nqp::join(',', $list)); 12:04
camelia rakudo-moar 964aae: OUTPUT«1␤1,2,3␤»
pmurias jnthn: ^^ an interesting thing I found in nqp-moar
pmqs Just installed star 2015.01 -- Panda doesn't want to play 12:07
12:07 yoleaux joined, ChanServ sets mode: +v yoleaux
pmqs $ panda 12:08
No such method 'ast' for invocant of type 'Any'
in sub from-json at /home/paul/perl/perl6/rakudo/languages/perl6/lib/JSON/Tiny.pm:51
in submethod BUILD at /home/paul/perl/perl6/rakudo/languages/perl6/lib/Panda/Ecosystem.pm:36
in method BUILDALL at src/gen/m-CORE.setting:979
in method bless at src/gen/m-CORE.setting:961
in method new at src/gen/m-CORE.setting:947
in sub make-default-ecosystem at /home/paul/perl/perl6/rakudo/languages/perl6/lib/Panda/App.pm:39
in block <unit> at /home/paul/perl/perl6/rakudo/bin/panda:11
FROGGS seems like you either can't parse the json file or were not able to download it
pmqs: are you able to wget $s.send("GET ecosystem-api.p6c.org/projects.json ? 12:09
pmqs let me try..
FROGGS err, without the '$s.send("GET ' 12:10
pmqs yep 12:11
$ wget ecosystem-api.p6c.org/projects.json
--2015-02-08 12:11:40-- ecosystem-api.p6c.org/projects.json
Resolving ecosystem-api.p6c.org... 62.252.172.241
Connecting to ecosystem-api.p6c.org|62.252.172.241|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: assets.virginmedia.com/malware.html [following]
--2015-02-08 12:11:40-- assets.virginmedia.com/malware.html
Resolving assets.virginmedia.com... 62.254.123.65
Connecting to assets.virginmedia.com|62.254.123.65|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `projects.json'
[ <=> ] 1,833 --.-K/s in 0s
2015-02-08 12:11:40 (23.6 MB/s) - `projects.json' saved [1833]
FROGGS pmqs: please dont paste that much to the channel
pmqs sore - no problem
sure
FROGGS pmqs: can you look at the projects.json? I bet it contains an html file from that malware service 12:13
pmqs contains HTML ... "This site has been blocked by Web Safe" 12:14
that what you mean?
FROGGS that means that your ISP is so nice to redirect away from our site, because it is listed as malware somewhere 12:15
pmqs How nice of them. I see the HTML does have instructions to change the settings. Will give that a go. 12:17
jnthn pmurias: heh, nice one :) 12:19
12:23 Hor|zon joined
pmqs froggs: Crap! The ISP feedback says "A resolution for cases like this can take up to 2-3 weeks" 12:24
FROGGS :o(
pmqs do you know if there is there a workaround? 12:25
12:25 Kristien joined 12:26 grondilu joined
FROGGS pmqs: not sure :/ 12:27
pmurias if it's per page blocked maybe https would help?
Kristien hi
12:27 Hor|zon left
pmqs will have a dig into the code - that URL must be present somewhere 12:28
FROGGS pmurias: that'd involve changing its source... so he'd have to clone from github
pmqs: github.com/tadzik/panda/blob/maste...tem.pm#L81
pmqs ta ta 12:29
moritz star-m: say 42 12:32
camelia star-m : OUTPUT«42␤»
moritz star-m: say 42 12:33
camelia star-m 2015.01: OUTPUT«42␤»
moritz camelia now runs the latest star
FROGGS moritz++
m: enum foo (bar => 42); enum baz (hurz => 21); sub marine($flag where {$_ ~~ foo|baz}) { say $flag }; marine bar 12:34
camelia rakudo-moar 964aae: OUTPUT«bar␤»
FROGGS is there a without a where clause to allow two types?
12:35 pmqs left
moritz FROGGS: well, using the common base type 12:35
12:35 El_Che joined 12:41 pmqs joined
pmqs froggs: copying the json file manually into languages/perl6/site/panda/projects.json got it to work. Phew! 12:44
FROGGS cool! 12:45
:o)
pmqs Ugh! Now I'm tripping over RT #122839 - will update the ticket again
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122839
FROGGS :o( 12:46
so yes, seems it only works on windows using the msi installer 12:47
pmqs yep
I can't be the only one to be tripping over #122839, can I? panda is the "official" way to install modules? 12:48
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122839
FROGGS I don't get it..., this works locally:
m: use v6; enum SDL_SurfaceFlags (SDL_SWSURFACE => 0x00000000,); enum SDL_VideoModes (SDL_ANYFORMAT => 0x10000000,); sub SDL_SetVideoMode(int32, int32, int32, int32 where { $_ ~~ SDL_SurfaceFlags|SDL_VideoModes }) is export { * }
camelia rakudo-moar 7ec55f: OUTPUT«===SORRY!=== Error while compiling /tmp/FS1dASIgPZ␤Cannot do non-typename cases of type_constraint yet␤at /tmp/FS1dASIgPZ:1␤------> $_ ~~ SDL_SurfaceFlags|SDL_VideoModes }⏏) is export { * }␤»
FROGGS pmqs: I guess other just do not care and reinstall modules 12:49
pmqs ok - will update the ticket
froggs: thanks for your help. much appreciated 12:50
12:52 jschulz joined 12:53 tgt left
dalek kudo/nom: b61dcf1 | moritz++ | src/ (2 files):
typed exception for when no matching paramatric role candidate is found

also improve error message a bit.
  <rant>the "not found" sounds like the compiler simply did not try hard enough.
Since that is most likely not the problem, boldly claim that there simply
  *is* no matching candidate.</rant>
12:56
jnthn :) 12:58
dalek ast: 733c00f | moritz++ | S14-roles/mixin.t:
Test for missing role candidate error by type
13:01 rurban__ left 13:02 colomon left
FROGGS jnthn: btw, the line I posted kinda works on my machine, as long as the sub with the where constraint is in another unit... though, the constraint does do anything 13:02
I'll report it this evening
vendethiel "does do anything"? :p 13:04
13:04 colomon joined
FROGGS vendethiel: I can pass what I want, it does not complain 13:04
dalek c: 21ab8b5 | moritz++ | lib/Type/Cool.pod:
Cool: add missing methods as a TODO comment
13:05
Kristien tomorrow perl book will arrive! 13:07
colomon \o/ 13:09
Modern Perl, right?
Kristien yes!
dalek ast: 860ba92 | moritz++ | S12-coercion/coercion-types.t:
Skip some tests that complain at compile time
13:13
moritz jnthn: fwiw most of coercion type tests still fail :( 13:14
jnthn moritz: I'm not surprised.
moritz: I said before, I've *only* implemented them on parameters.
moritz: So we can deprecate "as Foo" and give a migration path. 13:15
The rest can come later; it's less pressing.
13:15 Akagi201 left
moritz jnthn: yes, but even those on parameters fail 13:15
jnthn m: sub foo(Str(Any) $x) { say $x.WHAT }; foo(42) # wonder if it's built yet 13:16
camelia rakudo-moar 7ec55f: OUTPUT«(Str)␤»
moritz m: sub foo(Str(Any) $x) { $x }; say foo(42).^name
camelia rakudo-moar 7ec55f: OUTPUT«Int␤»
jnthn Oh... 13:17
Yeah, that optimizer bug.
jnthn forgot about that one
It's on my todo list now. 13:19
m: sub foo(Any $x as Str) { $x }; say foo(42).^name
camelia rakudo-moar 7ec55f: OUTPUT«Int␤»
jnthn It's not a regression, fwiw. 13:20
colomon DId pe get merged, or is moritz++ working there? 13:21
moritz colomon: it's merged
13:21 rurban__ joined
colomon jnthn++ too, then 13:21
jnthn thinks he has a design he's happy with for native "is rw" params and the bits needed to make them work 13:22
Kristien native is rw params :o 13:23
does native always assume C ABIs?
dalek ast: 7faa0b2 | moritz++ | S12-coercion/coercion-types.t:
Add some simpler coercion type tests; fudge the rest
moritz Kristien: no
Kristien cool
dalek c: 8722759 | moritz++ | lib/Type/Cool.pod:
Cool: add examples, document flip
13:25
13:27 pmqs left
jnthn takes a walk, while the weather is still nice 13:29
13:30 xtreak joined
moritz seems the merge fixed RT #121626 13:31
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121626
dalek ast: 07a6ec3 | moritz++ | S14-roles/anonymous.t:
Unfudge tests for RT #121626
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121626
13:33 xtreak left
dalek kudo/nom: d9f58f1 | moritz++ | / (2 files):
Run coerion type tests; mention in changelog
13:35
13:38 araujo left
dalek on: 4148627 | moritz++ | / (2 files):
Better error reporting on invalid input
13:49
13:55 colomon left, colomon joined 14:00 araujo joined
moritz tadzik: is it intentional that panda doesn't report its commits in here? 14:05
14:09 Hor|zon joined 14:13 BenGoldberg joined, Hor|zon left 14:14 BenGoldberg left, BenGoldberg joined
tadzik moritz: n 14:17
no
14:19 diana_olhovik_ left
pmurias jnthn: are such bizare errors expected: pastie.org/9902113 14:33
jnthn: I get it while cross compiling QRegex
jnthn pmurias: Often indicates version skew of some kind, that somehow went undetected. 14:36
pmurias: Expected as in "did I create such situations when working on bootstrapping other backends on NQP"? Yes, I got various things. :) 14:37
That one looks like "picking up wrong files" 14:38
pmurias shouldn't that be detected 14:40
?
as serialization object have there unique identifiers 14:44
14:45 abraxxa left 14:48 kaare_ left
itz_ pmqs: are you using Virgin ISP? 14:49
masak greetings, #perl6
itz_ p6c.org is blocked by Virgin WebSafe 14:50
masak .oO( Perl 6: parental advisory ) 14:51
itz_
.oO( more understandable with perl 5 )
14:52
pmurias ..oO( it must be all the swearing in regexes) 14:53
masak vendethiel: re irclog.perlgeek.de/perl6/2015-02-06#i_10070577 -- I actually have no objections against that use of "isomorphic". I know the etymology of the word, and I know the usage in mathematics. is there anything more than prescriptivist curmudgery behind the mislike? 14:54
vendethiel looks up curmudgery 14:56
masak hides :P
vendethiel can't find curmudgery
pmurias masak: is the term commonly used or is some trolling voting it in using behind the scene shenanigans?
masak vendethiel: maybe look up "curmudgeon" instead?
vendethiel oh, alright, that does it 14:57
masak pmurias: I got lost somewhere near the end of your question sentence.
pmurias: I don't know how commonly used it is. it's used by enthusiasts of the trade, seems to me. 14:58
pmurias: same people as would recommend es6 or coffee or react.
hipsters, in other words.
masak .oO( I was doin' isomorphic before it was a generally accepted term ) 14:59
pmurias s/trolling/troll/
masak pmurias: it's not just one person using it. but it's not generally accepted either. I'm just trying to understand the criticism of adopting that term for it. 15:00
pmurias: a more conservative term would perhaps be something like "client/server code unification".
but that's a bit of a mouthful.
pmurias so the isomorphism in isomorphic javascript is the identity function? 15:02
masak pmurias: I wasn't thinking "isomorphic", I was thinking geometry and isomorphic polygons.
there, it just means "same shape". 15:03
but you've just provided me with a big clue as to why some people may object to the term, if they take that path first to the meaning.
pmurias masak: I'm not that strongly opposed to using that name 15:04
masak: But I'm distrustful of wikipedia nowdays 15:05
masak not automatically accepting everything on Wikipedia is not a bad thing, methinks. 15:06
there's nothing magical about that wiki which makes it correct all the time.
even en.wikipedia.org/wiki/Isomorphism has a geometrical picture as the first thing that strikes the eye. 15:07
hoelzro pmurias: if I add a failing test (in this case, istype), should I *not* have it run via run_tests until it's been fixed?
masak so "the client and server code are isomorphic"/"the client and server code have equal shape" seems about right to me.
dalek p/js: 7fa747f | hoelzro++ | t/js/istype.t:
Add a test for nqp::istype
p/js: cf7f816 | hoelzro++ | src/vm/js/QAST/Compiler.nqp:
Impelement istype
pmurias hoelzro: I think it's best to only keep passing tests in run_tests 15:08
vendethiel is "istype" supposed to manage inheritance?
m: class A{}; class B does A{}; say nqp::istype(B.new, A);
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!=== Error while compiling /tmp/vL5sqtD36g␤A is not composable, so B cannot compose it␤at /tmp/vL5sqtD36g:1␤------> ␤»
vendethiel m: class A{}; class B is A{}; say nqp::istype(B.new, A); 15:09
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
Kristien not quite a type
FROGGS m: class A{}; class B is A{}; say nqp::istype(nqp::decont(B.new), A);
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
jnthn pmurias: In theory, yes. In practice...there must be something curious going on. 15:10
pmurias hoelzro: why did you put the test in t/js?
hoelzro: It's only intended for js specific tests 15:11
vendethiel masak: I'm mostly against it because then people might encounter the "other" use and get lost.
hoelzro pmurias: no particular reason, I gues
*guess
vendethiel Like functors.
dalek p/js: 342bafb | hoelzro++ | t/ (2 files):
Move istype test under t/nqp
15:12
masak vendethiel: "like functors"? I haven't seen "isomorphic" used about functors at all. functors are usually between categories, and isomorphisms tend to refer to morphisms inside of categories. 15:13
Kristien he means "functor" is an overloaded word
it can mean a mapping between categories, or a callable object in OOP
dalek p/js: ce7d50d | (Pawel Murias)++ | HACKING:
Mention t/nqp/js in HACKING.
15:14
hoelzro pmurias: is that a typo? it's t/js, right?
masak Kristien: ah.
Kristien: weird, that's another thing I totally don't have a problem with. 15:15
words are sensitive to context. news at 11.
Kristien Which is in my case even more confusing, since they both apply to FP for me, since I consider OOP objects to be tuples of functions. :D
pmurias hoelzro: yes ;)
dalek p/js: a25a690 | (Pawel Murias)++ | HACKING:
Fix typo.
15:16
masak should introduce the term "Kan extension" to mean something completely arbitrary in programming, just to mess with theorists :) 15:17
vendethiel masak: functors in c++, functors in ml, functors in haskell. None of these match the math version of functor
pmurias hoelzro: what I often do when trying to figure out more complex ops is check how other backends implement them (src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java+
Kristien masak: and teach Kan extensions on Kan Academy
vendethiel we lose a well-defined words for nothing else. we can just invent words. we don't need to "pollute" existing ones that could mean something else.
pmurias hoelzro: 2274 for istype)
vendethiel another word is "responsive". this is NOT what responsive means 15:18
masak vendethiel: are you sure? the functors in Haskell at least seem pretty close.
vendethiel: okay, so it was prescriptivist curmudgery. then I know. :P
vendethiel masak: "close", sue
sure*
hoelzro ah ha
masak "stop inventing new meanings for my words!"
hoelzro thanks for the tip; that belongs in HACKING 15:19
vendethiel now, when I want to talk about *actual responsiveness*, which word am I supposed to know? Why not simply use a *well-suited* word?
FROGGS .oO( de he meant DWORDs? )
vendethiel masak: I'm not against (natural) languages evolving, ofc
Kristien I thought of adding an arbitrary restriction to the identity function 15:20
so that it exhibits UB if you pass it 0, and works for everything else.
Such restrictions seems to be popular in JavaScript land, and JavaScript is all the rage.
pmurias UB? 15:21
Kristien undefined behaviour
Like, "id x returns x if x <> 0. If x = 0, the behaviour is undefined."
masak .oO( ND: "nose demons" )
15:22 zakharyas joined
Kristien time to ---poop--- 15:23
15:23 Kristien left
pmurias jnthn: is it possible to dissamble the .moarvm files to determine what hides behing the foo.moarvm:funcname:number? 15:23
jnthn pmurias: moar --dump thefile.moarvm 15:24
15:25 virtualsue joined
masak moritz++ # perlgeek.de/blog-en/perl-6/2015-doc...6-org.html 15:25
muraiki: re irclog.perlgeek.de/perl6/2015-02-06#i_10073124 -- not in my experience. quality is too bad, coverage is too spotty, and there's no guiding hand or principle. 15:28
geekosaur: re irclog.perlgeek.de/perl6/2015-02-06#i_10073306 -- I think you're wrong on that count. "The Unicode Standard permits the BOM in UTF-8, but does not require or recommend its use." en.wikipedia.org/wiki/Byte_order_mark#UTF-8 15:30
15:37 rurban left
geekosaur hm. context for that is microsoft itself says "illegal" and IIRC has a pointer to relevant unicode standard --- but some Notepad versions and apparently all Visual Studio versions embed a UTF8 BOM and use it to detect UTF8 vs. traditional code page 15:37
masak I agree a UTF-8 BOM is very silly, since byte order isn't a thing that needs to be established. 15:38
geekosaur which makes me wonder if the Unicode consortium decided they'd have better luck condoning that than trying to get Microsoft to fix their stuff. (also, I do appreciate the difficulty of the problem they're trying to solve; there aren't any *good* solutions, just ugly ones.)
masak but 'very silly" isn't the same as "illegal", or for that matter "not found in the wild".
15:40 Hor|zon joined 15:43 Kristien joined
arnsholt "not found in the wild" especially 15:44
15:44 Hor|zon left
Kristien hi 15:46
15:52 spider-mario left
mj41 Hi. 16:00
Anybody to test Rakudo Start 2015.01 Docker image? registry.hub.docker.com/u/mj41/perl6-star/ 16:01
s/Start/Star/
and fix my Czenglish :-)
nwc10 jnthn: you probably know this already, but you'll need to merge nom, or rebase, or not use the most current spectests 16:07
16:11 pmurias left 16:12 yeahnoob left
masak m: say "foo".comb(/o/) 16:15
camelia rakudo-moar d9f58f: OUTPUT«o o␤»
masak m: say "foo".comb('o')
camelia rakudo-moar d9f58f: OUTPUT«Cannot call 'comb'; none of these signatures match:␤:(Cool $: *%_)␤:(Cool $: Regex $matcher, Any $limit = { ... }, *%_)␤:(Str:D $: *%_)␤:(Str:D $: Regex $pat, Any $limit = { ... }, Any :match($match), *%_)␤ in block <unit> at /tmp/J1Kb0NvOXG:1…»
masak suggests the latter form work, too
16:16 Kristien left
masak reason: I saw some code I had written where I had a regex with just a literal string in it. I thought "hey, I ought to be able to get away with writing just the string here..." 16:16
didn't work.
colomon +1 16:18
m: say “foo”.subst(“o”,”e”) 16:19
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!=== Error while compiling /tmp/17n7ywQSIV␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/17n7ywQSIV:1␤------> say ⏏“foo”.subst(…»
colomon ack, stupid client
IRC
16:19 _mg_ joined
colomon anyway, just a string does work with subst. 16:20
masak m: say "foo'”.subst("o","e") 16:22
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!=== Error while compiling /tmp/4wD_kfYZMB␤Two terms in a row␤at /tmp/4wD_kfYZMB:1␤------> say "foo'”.subst("⏏o","e")␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
masak m: say "foo".subst("o","e") 16:23
camelia rakudo-moar d9f58f: OUTPUT«feo␤»
masak colomon: good point.
masak submits NYI rakudobug
16:23 _mg_ left 16:25 pmurias joined 16:26 dj_goku left, rurban__ left
dalek p/js: 9996314 | (Pawel Murias)++ | src/vm/js/bin/nqp-js.nqp:
Remove the :stable-sc flag from src/vm/js/bin/nqp-js.nqp
16:29
p/js: 25dfd25 | (Pawel Murias)++ | src/vm/js/bin/cross-compile.nqp:
Fix the serialize once hack.
p/js: 248b408 | (Pawel Murias)++ | tools/build/ (2 files):
Compile QRegex and QASTNode.
p/js: 5b187b8 | (Pawel Murias)++ | / (3 files):
Implement and test nqp::push_i, nqp::pop_i, nqp::list_i.
16:40
16:41 Hor|zon joined 16:45 dj_goku joined 16:46 Hor|zon left 16:59 Kristien joined 17:01 Guest82691 is now known as felher 17:04 BenGoldberg left 17:08 p6_newbee joined, mj41 left
p6_newbee hi all 17:09
masak p6_newbee: hi!
p6_newbee anyone know whether O'railly will publish a perl6 book?
masak p6_newbee: nothing certain yet.
p6_newbee :-( 17:10
masak but my guess is they will :)
17:10 mj41 joined
p6_newbee :-) 17:10
Hope so. Are books being written at the moment?
masak no. 17:11
(not to my knowledge)
p6_newbee It might be a bit early. However, when perl 6 is released at the end of the year, I hope there will be books also
Kristien hi 17:12
p6_newbee at the moment it is crueling to gather the information together from doc.perl6.org and the advent pages
hi
Kristien "Modern Perl 6"
17:13 diana_olhovik joined
Kristien "Perl 6 for Gardeners" 17:13
pmurias what happened to the Perl 6 book? 17:14
p6_newbee Hmm, modern perl was written by chromatic. I don't know, but he is not into perl6 anymore.
www.learningperl6.com
I think now would be a good time to start again ^^ 17:15
pmurias there was github.com/perl6/book
p6_newbee cool thx pmurias 17:17
Kristien Perl 6 for COBOL Programmers 17:19
COBOL Monks
pmurias p6_newbee: what's your previous programming experience? 17:20
p6_newbee unfortunatelly, not much. I know little about C# and Java. I am a perl fan since ~2011. 17:21
not really a perl5 newbee, but its not enough to release a module on CPAN yet 17:22
jnthn nwc10: Yeah, I'm well aware. I'll probably merge soon so as to get a cleaner test run before I dig into the native lexicals stuff...so I know how much I'm breaking. :) 17:28
vendethiel .oO (move slow, break things) 17:29
17:29 BenGoldberg joined
Kristien m: say +^2011 17:30
camelia rakudo-moar d9f58f: OUTPUT«-2012␤»
jnthn vendethiel: Well, the branch won't land until after the Feb Rakudo release, so I've plenty of changes to break stuff yet :)
vendethiel :P
Kristien How do you convert a number to a string with some radix? 17:33
grondilu .base
Kristien Rats in particular.
grondilu oh sorry
grondilu is not sure what "radix" means here. 17:34
Kristien m: (2264129042459209/3656158440062975).base(36).say
camelia rakudo-moar d9f58f: OUTPUT«0.MAKEITSTOPM␤»
Kristien nice
it works
grondilu cute
b2gills m: say (1767707668033969/3656158440062976).base(36) 17:38
camelia rakudo-moar d9f58f: OUTPUT«0.HELLOWORLD␤»
moritz \o 17:39
Kristien b2gills: that one doesn't repeat 17:40
17:42 Hor|zon joined 17:43 FROGGS[mobile] joined
b2gills Kristien: I didn't realize that was the point (as it only repeats one character) 17:45
grondilu interistingly enough, that denominator is 6**20. 17:46
m: say (1767707668033969/6**20).base(36)
camelia rakudo-moar d9f58f: OUTPUT«0.HELLOWORLD␤»
17:46 Hor|zon left
Kristien b2gills: perl does 17:47
the decimal representation of the rational number repeats indefinitely
17:47 Akagi201 joined
Kristien but perl truncates it 17:47
grondilu btw it could use the () notation though
0.77121212... would be noted 0.77(12) for instance 17:48
Kristien no
m: say (10/3)
camelia rakudo-moar d9f58f: OUTPUT«3.333333␤»
Kristien hmm weird
oooh wait
m: say (10/3).perl
camelia rakudo-moar d9f58f: OUTPUT«<10/3>␤»
Kristien m: say (2264129042459209/3656158440062975).perl
camelia rakudo-moar d9f58f: OUTPUT«<2264129042459209/3656158440062975>␤»
Kristien nevermind what I said
I normal decimal approximation is probably more useful that a repetition indicator though. 17:49
grondilu yeah, probably
17:50 Vlavv_ left
grondilu wonders what are the odds that a given random integer happens to be a power of an other integer. 17:51
Kristien grondilu: the probability is 1 17:52
masak sounds not well-posed.
geekosaur "other"
masak there are so many integers at the top.
grondilu a non-trivial power that is.
colomon Kristien: do you have a proof?
grondilu masak: that's what makes the question intriguing
17:52 pmurias left
Kristien colomon: no, I am a moron 17:53
I thought that for every n, n is (-n)^1
but that's obviously not true
the sign only collapses when the power is even
moritz well, obody yet said that the exponent must be an integer :-) 17:54
colomon Hurm, I wasn’t thinking of negative numbers.
moritz *nobody
Kristien do imaginary integers count? :D
m: say 2i 17:55
camelia rakudo-moar d9f58f: OUTPUT«0+2i␤»
Kristien m: say 2**1i
camelia rakudo-moar d9f58f: OUTPUT«0.769238901363972+0.638961276313635i␤»
Kristien m: say 2**-1i
camelia rakudo-moar d9f58f: OUTPUT«0.769238901363972-0.638961276313635i␤»
17:55 Mouq joined
grondilu jeez guys, it was obvious enough that I was talking about integer power of positive integers. 17:55
Kristien m: say 2**(3.1415*1i) 17:56
camelia rakudo-moar d9f58f: OUTPUT«-0.570180489850582+0.821519451378815i␤»
grondilu I mean, isn't that surprising that the rational number used to display HELLOWORLD has a denominator that happens to be 6**20?
thus: what were the odds? 17:57
colomon grondilu: integer power > 1, I hope, else certainly 1
grondilu yeah I meant "non-trivial power"
Kristien it's not 1 17:58
dalek c: 40cdf2e | moritz++ | lib/Type/Cool.pod:
[Cool]: document trim{,-leading,-trailing}
Kristien ask on math.stackexchange.com/ 18:00
dalek p/js: 7b47345 | hoelzro++ | HACKING:
Clarify that HACKING is for the JS backend
p/js: 3310b55 | hoelzro++ | HACKING:
Add a tip about implementing ops
18:03 Vlavv_ joined 18:07 grondilu left
moritz 11 projects in the ecosystem use the 'as' trait, 4 of which belong to tadzik++ 18:08
dalek c: e6489e9 | moritz++ | lib/ (2 files):
Get rid of "as" for coercion
18:09 araujo left
Kristien I prefer the 'ass' trait. 18:10
masak grondilu: in base 36? it's not surprising at all. 18:11
it's like saying "ain't it surprising that the number 0.xyzvw has a denominator of 10**5?"
colomon Kristien: class Malarky is ass 18:12
colomon is thinking the answer to grondlieu’s question is a probability of 0 18:13
Kristien m: say (0.xyzvw).nude
camelia rakudo-moar d9f58f: OUTPUT«No such method 'xyzvw' for invocant of type 'Int'␤ in block <unit> at /tmp/3asDP2pAL6:1␤␤»
Kristien Right, crap
masak I meant some arbitrary deimals there.
18:13 diana_olhovik left
masak it's true for most such numbers, I think. 18:14
m: say 0.12345.nude
camelia rakudo-moar d9f58f: OUTPUT«2469 20000␤»
masak m: say 0.12347.nude
camelia rakudo-moar d9f58f: OUTPUT«12347 100000␤»
Kristien the denominator can be many things
m: say (24694/200000).perl 18:15
camelia rakudo-moar d9f58f: OUTPUT«0.12347␤»
moritz but for five digits after the comma, it's usually 10**5
masak right.
my point is I don't really see why grondilu was so surprised.
Kristien I wish I had a house. 18:16
colomon gist.github.com/colomon/c03e8202e1604482c955 # for grondilu 18:21
Kristien follows colomon 18:23
colomon follows colomon where? 18:25
18:27 zakharyas left
Kristien GitHüb! 18:29
colomon didn’t know you could do that. 18:31
Kristien++ 18:32
Kristien I see Venus, Mars and Jupiter. 18:36
18:36 _4d47 joined
Kristien Absolutely fascinating. 18:36
masak I don't think you can see Jupiter with the naked eye. can you? 18:38
18:39 MadcapJake joined
moritz can't you? 18:39
masak I thought not.
moritz hubblesite.org/reference_desk/faq/a...olarsystem says yes
Kristien I have telescope.
18:39 FROGGS[mobile] left
masak oh! 18:39
ok then. 18:40
Kristien Mars is barely visible though.
18:40 FROGGS[mobile] joined
Kristien Venus is much brighter. 18:40
And can be seen with the naked eye very clearly.
see www.wolframalpha.com/input/?i=sky+chart for directions
18:41 fil__ joined
fil__ does perl6 have a notion of typed lists? 18:41
like Java: List<Foo> 18:42
moritz fil__: yes, but in practice, it rarely does what you want
fil__ ok
Mouq m: my Int @a; @a.push: "foo"
camelia rakudo-moar d9f58f: OUTPUT«Type check failed in .push; expected 'Int' but got 'Str'␤ in method push at src/gen/m-CORE.setting:9586␤ in block <unit> at /tmp/Wfg5R7i6Q4:1␤␤»
moritz m: my Int @a; @a[0] = 0; say "alive"; @a[1] = 'not an Int'
camelia rakudo-moar d9f58f: OUTPUT«alive␤Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in method assign_pos at src/gen/m-CORE.setting:10290␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3281␤ in block <unit> at /tmp/QeiCauIp7e:1␤␤»
moritz but
m: sub f(Int @a) { say @a.join; }; f [1, 2, 3] 18:43
camelia rakudo-moar d9f58f: OUTPUT«Type check failed in binding @a; expected 'Positional[Int]' but got 'Array'␤ in sub f at /tmp/PuWHpVtdl0:1␤ in block <unit> at /tmp/PuWHpVtdl0:1␤␤»
Mouq Aw, I kind of thought that's what the pe branch was for 18:44
jnthn Basically, if you're going to use typed arrays, you probably want to consistently use them.
Well, mostly the issue is that Array[Int].new(...) is apparently a too verbose way to construct a literal typed array for people :P 18:45
Mouq Could we coerce to typed arrays? :P sub f(Int(Any) @a)
masak I think it's just that people have high and sometimes contradictory expectations about typed arrays.
Mouq m: sub f(Int @a) { say @a.join; }; f Array[Int].new(1, 2, 3) 18:46
camelia rakudo-moar d9f58f: OUTPUT«123␤»
jnthn Mouq: That's awkward in so far as what exactly are we coercing there?
Mouq m: sub f(Int @a) { say @a.join; }; f(my Int @ = 1, 2, 3)
camelia rakudo-moar d9f58f: OUTPUT«123␤»
Mouq jnthn: Right
m: sub f(@nota, Int @a = Array[Int].new(|@nota)) { say @a.join; }; f [1, 2, 3] # :P 18:51
camelia rakudo-moar d9f58f: OUTPUT«123␤»
18:51 rurban__ joined
fil__ is there a way i can call a private method from a test? 18:51
I'm getting the error "Private method call to setTextNode must be fully qualified with the package containing the method" 18:52
but I can't figure out the syntax to fully qualify it
jnthn .PackageName::methodname, but for that to work your class must declare it trusts your tests.
moritz self!TheType::setTextNode
Kristien C++ calls that friendship. 18:53
jnthn In other words, no, there's not a good way, which is fine 'cus it's a really bad idea.
"Oh no I can't refactor my private stuff without breaking the tests!" D'oh.
Kristien I like the Python way of privatising.
fil__ Cannot call private method 'setTextNode' on package QFXManager because it does not trust GLOBAL
I guess I need to somehow put my test in the same package? 18:54
Does perl6 have a package statement?
jnthn package :)
Kristien I can't wait 18:55
fil__ oops 18:56
modules.perl6.org/ is broken
Kristien It works fine; there just aren't any Perl 6 modules! 18:57
jnthn modules.perl6.org/proto.json is also empty 18:59
fil__ this doesn't look right: Cannot call private method 'setTextNode' on package QFXManager because it does not trust QFXManager 19:01
Peter_R it was working last night when I looked
fil__ shouldn't packages trust themselves?
Mouq m: class FooTester {...}; class Foo { trusts FooTester; method !priv { "foo" } }; module FooTester { use Test; is Foo.new!Foo::priv(), "foo" } 19:07
camelia rakudo-moar d9f58f: OUTPUT«ok 1 - ␤»
Mouq ^^ Not sure how you have your code set up, fil__ , but if you are going to test private methods, you might consider something like that
jnthn Mouq: Do you need the stub first for it to work, ooc? 19:08
Oh wait
I mis-read
Mouq jnthn: Without stub: "Cannot call private method 'priv' on package Foo because it does not trust FooTester"
jnthn Probably better to stub it as module FooTester...
Mouq I'm surprised it parses in the first place
jnthn: Oh, yeah
moritz m: class P { method !priv { say 42 } }; my $m = P.^private_method_table<priv>; say P.new.$m() 19:09
camelia rakudo-moar d9f58f: OUTPUT«42␤True␤»
moritz the MOP lets you cheat :-)
jnthn That also
Kristien I like how in D private means file-private.
moritz and it's even documented: doc.perl6.org/routine/private_method_table
19:10 _mg_ joined
jnthn I'm fine with it being awkward, though. "Don't write tests that depend on private stuff" is one of the things I tell folks multiple times when I'm teaching testing stuff. 19:10
moritz +1
you should test against interfaces
Kristien I disagree. 19:11
moritz and if the interface is harder to test than the private method, maybe your interface isn't so great?
Kristien Implementation details should definitely be testable.
in isolation
19:12 diana_olhovik_ joined 19:13 Rounin left
Mouq Kristien: If you're depending on an implementation detail for something, is it really an implementation detail? 19:16
vendethiel Just Write More Factories *g*
Kristien Yes.
An implementation detail without dependencies can be deleted since it's dead code. 19:17
Mouq Kristien: Not what I meant :P
*"depending on the details of"? something like that
moritz m: sub f(Str(Any) $x) {}; &f.signature.params[0].type.^perl 19:22
camelia rakudo-moar d9f58f: OUTPUT«Cannot call 'perl'; none of these signatures match:␤:(Mu:U $: *%_)␤:(Mu:D $: *%_)␤ in block <unit> at /tmp/GrxjdJWZrM:1␤␤»
moritz m: sub f(Str(Any) $x) {}; &f.signature.params[0].type.perl
camelia ( no output )
moritz m: sub f(Str(Any) $x) {}; say &f.signature.params[0].type.perl 19:23
camelia rakudo-moar d9f58f: OUTPUT«Any␤»
moritz m: sub f(Str(Any) $x) {}; say &f.signature.params[0].type.^name
camelia rakudo-moar d9f58f: OUTPUT«Any␤»
moritz jnthn: can I get the coercion type for introspection somehow?
jnthn moritz: Um...it's certainly stored in the Parameter object 19:24
moritz has Mu $!coerce_type
jnthn moritz: It's possible we're missing an introspecty method
That one 19:25
moritz from the "coercion types are first class" I would have expected that to be handled by the type
jnthn *nod* 19:28
19:28 Hor|zon joined
jnthn Well, can implement the type introspection thingy to assemble the coercion type 19:28
19:32 Hor|zon left 19:34 beastd joined 19:41 p6_newbee left
fil__ i need to compare 2 strings ignoring whitespace 19:43
is there a way to do that, or do I need to strip out the whitespace before comparing? 19:44
moritz the latter
unless you want to write a custom comparison routine
19:45 Peter_R left 19:46 adu joined 19:48 rurban joined
awwaiid nice press lately 19:50
20:02 _mg_ left 20:04 rurban left
flussence github.com/voat/voat oh look someone made a reddit spinoff board in AN EVEN WORSE LANGUAGE 20:04
whoops, ww
.oO( happens to everyone at some point... )
20:05
Kristien what's the difference between --> and returns?
flussence Kristien: mostly a style thing 20:06
Kristien OK.
flussence those used to behave differently at one point, but it was a bug
not-ww question - do I *need* Pod::To::Text to print the contents of a pod block as it appears in source? 20:07
masak Kristien: they hook on different things. `-->` goes on a signature (which may or may not be attached onto a routine); `returns` goes directly on a routine.
flussence masak: does that mean one-or-the-other works on pointy blocks? 20:10
20:11 _mg_ joined, telex left
flussence (there's so much I know I don't know about this part of the language...) 20:11
20:12 telex joined 20:15 _mg_ left, kaare_ joined
flussence oh, none of the combinations I tried would parse, so I guess not. «-> -->» looks too weird anyway... 20:15
masak m: my &b = -> $x --> Int { 42 }; say b(5)
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!=== Error while compiling /tmp/XnlybdlHmu␤Missing block␤at /tmp/XnlybdlHmu:1␤------> my &b = -> $x --> Int ⏏{ 42 }; say b(5)␤»
masak I think it's only subs.
er, routines.
20:17 darutoko left
Mouq m: my Int &b = -> $x { 42 }; say b(5) 20:23
camelia rakudo-moar d9f58f: OUTPUT«Type check failed in assignment to '&b'; expected 'Callable[Int]' but got 'Block'␤ in block <unit> at /tmp/Z0TW_57Oyw:1␤␤»
Mouq m: my Int b ($x) { 42 }; say b(5) 20:24
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!===␤Type 'Int' is not declared. Did you mean 'int'?␤at /tmp/ALdrLrewc0:1␤------> my Int ⏏b ($x) { 42 }; say b(5)␤Malformed my␤at /tmp/ALdrLrewc0:1␤------> my Int ⏏b ($x) { 42 }; s…»
Mouq m: my Int sub b ($x) { 42 }; say b(5)
camelia rakudo-moar d9f58f: OUTPUT«42␤»
flussence that error message is a bit LTA...
moritz I think it's some backtracking or so that causes it 20:27
nine_ Is there some special variable that contains the extension for shared objects like .so, .dllib or .dll?
flussence notices that Pod::To::Text is part of the base rakudo install, and so stops complaining about needing it 20:28
20:32 rindolf left
masak huh. pmichaud solicited comments four days ago on #parrot. irclog.perlgeek.de/parrot/2015-02-04 20:34
not a single comment since then.
no email about it on parrot-dev.
dalek line-Perl5: 2fa40a1 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Replace hard coded .so extension with what LibraryMake does

May fix GH 11
masak I know Parrot activity has decreased a great deal, but I didn't expect there to be no reaction. 20:35
nine_ Apparently there is....sort of.
20:35 mj41 left
masak I guess that makes the decision easier, though. 20:36
flussence maybe they had no objections...? 20:37
masak or that.
though this is not a subject I'd expect to be Warnocked.
it's pretty central to Parrot's mission.
flussence oh wait, there was one on the gist page itself
masak oh! missed that.
FROGGS masak: scrollback to yesterday in this channel
or let me do that... 20:38
masak "...to kill parrot" -- huh?
moritz well, rakudo is parrot's only active customer 20:39
if we stop supporting parrot, parrot will be dead.
... again that claim for parrot thread superiority without any evidence to back it up. Sigh.
masak there can be no evidence because it doesn't work in Perl 6, IIUC. 20:40
which is a shame if Rakudo is Parrot's only active customer.
flussence I'm not sure what "better project management support" is supposed to mean...
FROGGS masak: irclog.perlgeek.de/perl6/2015-02-07#i_10075539
20:40 crux joined
nine_ Too bad that I didn't have the slightest idea of how Perl 6 was implemented on top of parrot :/ Maybe I could have made it work. 20:40
masak flussence: it's much easier to manage a project of one contributor.
FROGGS: oh! more feedback. 20:41
masak reads
moritz but ending parrot support is more like switching of life support systems than killing it 20:45
20:47 dolmen joined
masak but for rurban, that seems to have already happened. 20:47
moritz FROGGS: I still don't see how lagging parrot support would work practically 20:50
FROGGS: we disable parrot support in Configure.pl, otherwise leave the code in, and let it rot?
fil__ is there a nicer way to write this: $writer.Str().subst(/\s/, '', :g);
the .Str() feels messy... 20:51
flussence you don't need the ()...
moritz $writer.comb(/\S+/).join
fil__ moritz that's clever but a bit obfuscated
are () after methods always optional? 20:52
FROGGS moritz: we disable parrot support in rakudo, but we can leave nqp untouched, is all
fil_: after subs yes, after methods no
moritz fil__: I don't think it's obfuscate. It just takes the "what do we want?" road instead of "what do we throw away?"
fil__: you only need () for method calls with arguments
fil__ new() a method, and I just checked () are optional... 20:53
FROGGS fil_: as long as you dont pass arguments, yes
mst ruby.method args, go, here; #argh
FROGGS well, all boils down to TTIAR :o) 20:54
the question is just what to allow
flussence you can either write «subname $arg1, $arg2» or «$obj.meth: $arg1, $arg2». It's the $obj that requires punctuation in the middle there. 20:55
std: my (&foo, $bar); &foo $bar; 20:56
camelia std f9b7f55: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/PvvsimNr3a line 1:␤------> my (&foo, $bar); &foo ⏏$bar;␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse fail…»
Mouq std: my (&foo, $bar); foo $bar;
camelia std f9b7f55: OUTPUT«ok 00:00 140m␤»
flussence std: class Foo { }; my $bar; Foo.new $bar; 20:57
camelia std f9b7f55: OUTPUT«===SORRY!===␤Two terms in a row (method call with args requires colon or parens without whitespace) at /tmp/YnFuoNc4WW line 1:␤------> class Foo { }; my $bar; Foo.new⏏ $bar;␤ expecting any of:␤ feed_separator␤ i…»
FROGGS colon needed
(or parens)
flussence the difference between that and a sub is Foo.new can be used as a value on its own, to do that with a sub you need the "&".
FROGGS but, std is so nice and already said that
Kristien paamayim nekudotayim needed 20:58
FROGGS flussence: but &foo is not foo()
flussence FROGGS: I'm trying to explain the TTIAR to fil__ :)
m: my $bar; $bar 21:04
camelia ( no output )
flussence m: my $bar; $bar; Nil
camelia rakudo-moar d9f58f: OUTPUT«WARNINGS:␤Useless use of variable $bar in sink context (line 1)␤»
flussence m: my &bar; &bar; Nil
camelia ( no output )
flussence shouldn't that warn for & too?
FROGGS I guess so, since it is not a call
skids gist.github.com/skids/aabd2aad3d0b5ad8481b # I don't have a blog so... 21:05
FROGGS flussence: you'd have to add the & sigil here: github.com/rakudo/rakudo/blob/nom/....nqp#L1525
flussence hmm... maybe there's a good reason it names all but & there. 21:06
21:10 wicope left, fhelmberger joined
b2gills skids: you could create an account on blogs.perl.org 21:11
skids b2gills: thanks perhaps I will.
jnthn drops skids++ gist into a browser tab, to read later when he's not busy debugging stuff :) 21:13
21:14 wicope joined 21:17 Hor|zon joined
b2gills blogs.perl.org is LTA though 21:17
21:19 fil__ left, Peter_R joined 21:20 xfix left 21:21 Hor|zon left
dalek p/native-ref: 682dcdd | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
First stab at lexicalref scope handling.

We make the QAST code-gen aware of references to lexical variables, so it can emit appropriate instructions for accessing by reference or by value when needed. There's various optimizations to come; this tries to fill out the bits needed for things to have a chance of working.
21:21
21:30 pmqs joined
awwaiid in my p5 proggie I have a hash that has regex keys and string values to indicate file type (well, what to run), such as: my $map = { qr/\.ogg$/ => 'ogg123', qr/\.mp3$/ => 'mpg123' } 21:33
21:34 alini left
masak well, regexes feel like they ought to be hashable. but I'm not sure they are in Rakudo presently. 21:34
awwaiid I tried to do that in perl6, but it is apparently stringifying my regexes. Any advice on how to do this?
masak currently*
Mouq :{}
awwaiid ya 21:35
skids Or a grammar :-)
Mouq m: my $map = :{ /\.ogg$/ => 'ogg123' }; say $map.keys[0].WHAT
camelia rakudo-moar d9f58f: OUTPUT«(Regex)␤»
awwaiid what is this :p{ of which you speak?
er, :{}
Mouq (Only works in recent Rakudos
)
Object hash literal
jnthn awwaiid: Object hash literal
hah :)
Mouq :)
21:36 alini joined
masak awwaiid: Object hash literal 21:36
Mouq m: my %map{Any}; %map = /\ogg$/ => 'ogg123', /\.mp3$/ => 'mpg123'; say %map.keys[0].WHAT # Alternative 21:37
camelia rakudo-moar d9f58f: OUTPUT«===SORRY!=== Error while compiling /tmp/axgDaRYUJ6␤Unrecognized backslash sequence: '\o'␤at /tmp/axgDaRYUJ6:1␤------> my %map{Any}; %map = /\⏏ogg$/ => 'ogg123', /\.mp3$/ => 'mpg123';␤ expecting any of:␤ …»
Mouq Er
masak but that won't really do it here if two distinct /foo/ key differently.
Mouq m: my %map{Regex}; %map = /\.ogg$/ => 'ogg123', /\.mp3$/ => 'mpg123'; say %map.keys[0].WHAT # Alternative
camelia rakudo-moar d9f58f: OUTPUT«(Regex)␤»
awwaiid hmm. So that's forcing %map to have Any for keys?
er, Regexp 21:38
skids Well, regex but you could do Any.
Mouq masak: Hm. Yeah, it depends on what you're doing
awwaiid interesting
Mouq m: my %map{Regex}; %map = /\.ogg$/ => 'ogg123', /\.mp3$/ => 'mpg123'; say %map{/\.ogg$/} 21:39
camelia rakudo-moar d9f58f: OUTPUT«(Any)␤»
Mouq m: my %map{Regex}; %map = (my $og = /\.ogg$/) => 'ogg123', /\.mp3$/ => 'mpg123'; say %map{$og}
camelia rakudo-moar d9f58f: OUTPUT«ogg123␤»
jnthn Regex ain't a value type :) 21:40
masak jnthn: why not?
jnthn masak: No Code type is
masak: Ends up as the halting problem, no? 21:41
awwaiid m: my $x = rx/foo/ ; say $x.WHAT # looks like a value to me :)
camelia rakudo-moar d9f58f: OUTPUT«(Regex)␤»
Mouq m: say "abcd" === "abcd" # value type 21:42
camelia rakudo-moar d9f58f: OUTPUT«True␤»
Mouq m: say {"abcd"} === {"abcd"}
camelia rakudo-moar d9f58f: OUTPUT«False␤»
awwaiid ah. for some definition of value then.
jnthn awwaiid: Why're you doing a hash with regex keys, ooc? Are you actually looking up in the hash by the regex, or just using the hash to pair together the two?
I thought Perl 5 hashes had string keys (by default?) also? 21:43
awwaiid looks like I loop over the keys, do a comparison against a file, and then look up the value based on the current key, and then do some stuff depending on the value
geekosaur perl 5 hashes can only have string keys
awwaiid well it works in perl5 with my $map = { qr/.../ => "asdf" } just fine 21:44
well maybe it's all a lie. The line that does the match is: my ($type) = grep { $song =~ /$_/ } keys %$map;
(where $_ is the filename)
geekosaur qr in perl5 stringifies to the string representation of a regex, which can be substituted in and will be recompiled to a regex 21:45
jnthn Ah, yeah, so Perl 5 is stringifying it and...what geekosaur said
awwaiid right. so it is pretending to work. which is indistinguisable from working in this case.
so I guess I could just do the same, use string keys
21:45 rurban__ left
jnthn I'd do an object hash in Perl 6, and then $song ~~ $_ 21:46
Well, I'd probably actually just have an array of Pair objects, really... :)
awwaiid and then grab them two at a time, eh? yeah I could do that
jnthn No, in Perl 6 you actually have Pair objects
m: say (/abc/ => '123').WHAT 21:47
camelia rakudo-moar d9f58f: OUTPUT«(Pair)␤»
awwaiid oh. hmm
jnthn m: my @a = /a/ => 'a', /b/ => 'b'; @a.grep({ 'lad' ~~ .key }).perl.say 21:48
camelia rakudo-moar d9f58f: OUTPUT«No such method 'key' for invocant of type 'Str'␤ in block <unit> at /tmp/jIgr0pI3nM:1␤␤»
jnthn oh? :)
m: my @a = /a/ => 'a', /b/ => 'b'; say @a.perl
camelia rakudo-moar d9f58f: OUTPUT«Array.new(regex ($: *%_) { #`(Regex|40823264) ... } => "a", regex ($: *%_) { #`(Regex|40823440) ... } => "b")␤»
jnthn m: my @a = /a/ => 'a', /b/ => 'b'; @a.grep({ say .WHAT }) 21:49
camelia rakudo-moar d9f58f: OUTPUT«(Pair)␤(Pair)␤»
jnthn m: my @a = /a/ => 'a', /b/ => 'b'; @a.grep({ say .key })
camelia rakudo-moar d9f58f: OUTPUT«␤␤»
jnthn m: my @a = /a/ => 'a', /b/ => 'b'; @a.grep({ .key.match('lad') }).perl.say
camelia rakudo-moar d9f58f: OUTPUT«No such method 'match' for invocant of type 'Regex'␤ in block <unit> at /tmp/HmWEgDpg4e:1␤␤»
jnthn bah
m: my @a = /a/ => 'a', /b/ => 'b'; @a.grep({ 'lad'.match(.key) }).perl.say
camelia rakudo-moar d9f58f: OUTPUT«(regex ($: *%_) { #`(Regex|48524000) ... } => "a",).list␤»
jnthn There we go
awwaiid nice 21:50
gracias!
jnthn And >>.value if you want a list of just the values of what matches
awwaiid Pair has .key and .value rather than .first and .second or .head .tail? 21:51
Pair.^methods tells me so, actually
Kristien m: Pair.^methods.say 21:52
camelia rakudo-moar d9f58f: OUTPUT«key value ACCEPTS new BUILD key value fmt FLATTENABLE_LIST FLATTENABLE_HASH of ACCEPTS keys kv values pairs invert Str gist perl at_key exists_key␤»
Kristien m: Pair.new(1, 2)[0].say
camelia rakudo-moar d9f58f: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤ in method new at src/gen/m-CORE.setting:10510␤ in block <unit> at /tmp/hS2noJuOI1:1␤␤»
Kristien m: (1 => 2)[0].say
camelia rakudo-moar d9f58f: OUTPUT«1 => 2␤»
Kristien lol
skids Pair is considered an Associative.
Kristien m: (1 => 2).list[0].say
camelia rakudo-moar d9f58f: OUTPUT«1 => 2␤»
Mouq You want .kv 21:53
Kristien cooooooooooooooooooooooooooooooooooool
Mouq m: (1 => 2).kv[0].say
camelia rakudo-moar d9f58f: OUTPUT«1␤»
Kristien I get the impression that Perl 5 is much simpler than Perl 6 is.
Perl 6 seems to have myriads of similar but slightly different things. 21:54
TimToady in some spots
arguably parameter passing is too simple 21:55
awwaiid Kristien: I think perl6 has a lot of shiney edge-cases to explore, but that with more day-to-day usage the core concepts will be solidified into consistent concepts
(solidified in the minds of users; no statement meant as to the state of the concepts in the language :) ) 21:56
21:59 FROGGS[mobile] left 22:00 FROGGS[mobile] joined
Mouq Kristien: It's kind of more like, "You *can* use this tool for that job, but here's a tool that'll work better" 22:00
IMO
22:00 _4d47 left
Kristien yeah, but you have to know about all of them and how they behave differently 22:01
skids "There's arguably a best way to do it"?
22:01 FROGGS[mobile] left
Mouq Maybe "better" was the wrong wording :9 22:01
masak p5 has a simpler core for sure. but so does bf, and I get more out of p6 than either bf pr p5.
Mouq en.wikipedia.org/wiki/Iota_and_Jot 22:02
dalek ast: 5c22e22 | usev6++ | S14-roles/mixin.t:
Remove outdated comment
22:03
ast: 62633d4 | usev6++ | S14-roles/stubs.t:
Add test for RT #119643
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119643
Kristien Mouq: fascinating 22:04
22:04 FROGGS_ joined 22:07 adu left 22:08 FROGGS left 22:11 FernandoBasso joined 22:13 araujo joined, araujo left, araujo joined
dalek kudo-star-daily: b57c0be | coke++ | log/ (14 files):
today (automated commit)
22:15
kudo-star-daily: 5af8392 | coke++ | log/ (14 files):
today (automated commit)
rl6-roast-data: 09a10d7 | coke++ | / (5 files):
today (automated commit)
rl6-roast-data: 195382f | coke++ | / (5 files):
today (automated commit)
22:23 molaf__ left 22:29 beastd left, espadrine left
Mouq Heh. Oops. I'm guessing a patch that makes setting compilation take > 10 minutes isn't going to be accepted? :P 22:31
masak o.O
Kristien time to sleep 22:32
bye!
skids o/
22:34 Kristien left
masak FROGGS_, bartolin: re irclog.perlgeek.de/perl6/2015-02-07#i_10075774 -- here's my current stance: I would still be sad to see RT go, because I consider it to be not just "good enough" but pretty optimal for all my use cases with bugs. I say this as someone who uses both RT and GH issues extensively. 22:36
that said, I wouldn't like to be the single person going against everyone else if everyone else wants to move. 22:37
FROGGS_ masak: it is not that I have a strong feeling to move, I just think it would be nice
masak it's just... I have some weird kind of organic-digital connection with RT.
FROGGS_ to, for example, have milestones et
etc*
masak like it's attached to my arm or something. 22:38
FROGGS_ hehe
masak I cannot guarantee I'll be as prolific in submitting rakudobugs on GH issues... :/
Mouq doesn't quite like he can't add new tags to RT
FROGGS_ you should call yourself maRTak... would even sound like a good klingon name
geekosaur GHI seems underpowered to me
FROGGS_ geekosaur: please explain 22:39
geekosaur Mouq, that's a permissions issue really
so I help out with another project that was on bugzilla until they were forced to move to something else (by an admin oops). they're still trying to get the same functionality out of GHI 22:40
a current sticking point is that some levels of GHI access are tied to commit access
FROGGS_ ohh, fair point 22:41
[Coke] Following p5's lead in RT handling, created rt.perl.org/Ticket/Display.html?id=123766 for 2015 RC
FROGGS_ [Coke]++ # seen it a minute ago
geekosaur Mouq: it might be an argument for getting a different RT instance which either is adminned by p6 folks or gives sufficient access to some p6 folks to define new tags 22:42
masak Gmail claims I've submitted 1753 rakudobugs.
22:42 rurban joined
Mouq masak++ 22:42
[Coke] again, I am not a fan of RT, but switching is a HUGE undertaking, and it is not worth it.
masak it's an approximate number, but probably not that far off.
geekosaur RT itself certainly allows it; yours is a political issue 22:43
masak what [Coke] said.
geekosaur is not using the rt instance and at last check didn't even have access *or* particular reason to get it, so is simply contributing anecdata
FROGGS_ okay, I'd vote for one reason not to move away from RT: often newcomers start by poking RT tickets to learn more about the guts... if this happened in the rakudo repo, they'd probably need to sign the CLA just for that 22:44
Mouq geekosaur: It'd be nice to have tags like "Pod", "LTA Error", "Q Lang", "Macros", etc
FROGGS_ which would be a stolperstein for sure
Mouq "LHF" 22:45
geekosaur Mouq: sure. $employer does that kind of thing with their RT instance. problem is p6 folks don't run the RT instance and are not delegated sufficient access
22:45 diana_olhovik_ left 22:46 rurban left
geekosaur (I can't add new tags to our RT instance either, I have to file an internal IT ticket requesting that they do it. not because RT itself can't but because I am not granted permission by IT( 22:47
22:48 VAB6UUV joined
geekosaur (in fact I was just involved with addition of some new custom fields to our instance, 3-way between me, $boss, and IT mostly negotiating political issues) 22:48
[Coke] the perl rt bugadmins are very responsive when I ask for things.
masak we should have this conversation now and then, just so we realize what it is we want of RT ;) 22:53
22:58 araujo left 23:00 dolmen left
geekosaur btw it;s fine to look at bugs in GHI without commit access; IIRC it's owning them that requires it. but not all their issues are related to the source code and so they need issue owners who aren't committers 23:03
there may be other similar issues that they wouldn't run into but rakudo might, since different projects with different needs 23:04
23:06 Hor|zon joined 23:07 coffee` left, pmqs left 23:11 Hor|zon left
masak 'night, #perl6 23:14
FROGGS_ gnight masak 23:15
23:18 virtualsue left 23:19 virtualsue joined 23:29 adu joined 23:32 virtualsue left
dalek kudo/nom: af1c187 | Mouq++ | src/Perl6/ (2 files):
Enable, e.g., "my \term:<∞> = Inf; say ∞"
23:35
timotimo can somebody (with windows) try to reproduce the error in Base64 here? gist.github.com/VSChawathe/a79a95d58b8bf842c1e9 23:36
i wonder where in the core setting would "val" be well-placed? 23:41
and does it sound sane to have any q:val be interpreted by a lexically in-scope "val" sub? 23:42
flussence the test file there that's failing uses a heredoc to compare against something with "\n" in its output - afaik \n is magical depending on where it's run, but q"" would be a literal unix newline. That's probably causing it. 23:43
timotimo mhm 23:44
flussence otoh, I'm looking through S%02d.pod and can't find any mentions of OS-specifics here, only that \n means "LINE FEED". 23:51
23:52 gfldex left
timotimo right 23:52
23:53 adu left
flussence
.oO( thankfully nobody's trying to port perl6 to old mac os... )
23:55
23:56 adu joined
awwaiid Any existing way to start a REPL in the middle of the program, like ruby's binding.pry? 23:56
flussence nope, the repl in rakudo is a low-level thing :( 23:57
TimToady std: my &b = -> $x --> Int { 42 }; say b(5)
camelia std f9b7f55: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/4Sdywo4wBK line 1:␤------> my &b = -> ⏏$x --> Int { 42 }; say b(5)␤ok 00:01 144m␤»
TimToady std is fine with --> in a ->
23:57 rurban joined
awwaiid How about a debugger API? 23:58
TimToady std: my &b = -> --> Int { 42 }; say b()
camelia std f9b7f55: OUTPUT«ok 00:01 144m␤»
TimToady so I call rakudobug on that
timotimo awwaiid: the Rakudo Debugger relies on compiling a piece of code with slightly different code