»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 kid51 joined 00:02 k-man joined 00:16 pierre joined
b2gills m: given 'file.txt'.IO -> $io {say $io."$_"().perl for <path abspath absolute>} # stackoverflow.com/q/38731550 00:17
camelia rakudo-moar cc3932: OUTPUT«"file.txt"␤"/home/camelia/file.txt"␤"/home/camelia/file.txt"␤»
00:20 ds joined 00:21 ds left
gfldex b2gills: there is a multi candidate for .abolute that accepts a prefix, see github.com/rakudo/rakudo/blob/nom/...th.pm#L124 00:24
m: dd 'file.txt'.IO.absolute('home'); 00:25
camelia rakudo-moar cc3932: OUTPUT«"/home/camelia/home/file.txt"␤»
gfldex m: dd 'file.txt'.IO.absolute('foo'); 00:26
camelia rakudo-moar cc3932: OUTPUT«"/home/camelia/foo/file.txt"␤»
00:33 Zoffix joined 00:38 cpage_ joined 00:39 dainis joined
dalek ateverable: c792504 | (Daniel Green)++ | .gitignore:
Ignore .precomp since we're now running Perl 6 code
00:41
awwaiid how do I put a role in a signature? like if I have: role Foo { ... } ; sub gotfoo(Foo $n) { ... } 00:42
gfldex m: role R {}; class C does R {}; sub f(R $r){ dd $r }; f(C.new); 00:44
camelia rakudo-moar cc3932: OUTPUT«C.new␤»
dalek ateverable: 66262ba | (Daniel Green)++ | bisectable.pl:
Don't need a duplicate
00:45
gfldex m: role R {}; class C does R {}; sub f(R $r){ dd $r }; f(C.new); class B {}; my $b = B.new but R; f($b);
camelia rakudo-moar cc3932: OUTPUT«C.new␤B+{R}.new␤»
gfldex awwaiid: ^^^
00:46 aries_liuxueyang joined
gfldex m: role R {}; class C does R {}; sub f(R $r){ my R $r2 = $r; dd $r2 }; f(C.new); class B {}; my $b = B.new but R; f($b); 00:46
camelia rakudo-moar cc3932: OUTPUT«C $r2 = C.new␤B+{R} $r2 = B+{R}.new␤»
gfldex m: role R {}; class C does R {}; sub f(R $r){ my C $r2 = $r; dd $r2 }; f(C.new); class B {}; my $b = B.new but R; f($b); 00:47
camelia rakudo-moar cc3932: OUTPUT«C $r2 = C.new␤Type check failed in assignment to $r2; expected C but got B+{R} (B+{R}.new)␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
00:47 dainis left 00:49 El_Che joined 00:51 zacts joined 00:57 zacts left
MasterDuke .seen hoelzro 01:01
yoleaux I saw hoelzro 2 Aug 2016 20:30Z in #perl6: <hoelzro> we could even keep a ring buffer of sorts of one week of nightlies should we desire
01:03 lambd0x joined
MasterDuke .tell hoelzro with vim-perl syntax highlighting, is there a way to highlight strings delimited by curly quotes (e.g., <“ ” ‘ ’>)? 01:04
yoleaux MasterDuke: I'll pass your message to hoelzro.
lambd0x Hi guys!
01:06 espadrine left 01:09 BenGoldberg joined 01:10 lambd0x left 01:11 Rawriful left
dalek ateverable: 1c58482 | (Daniel Green)++ | Committable.p6:
Rename some variables so we can use the more idiomatic :$variable syntax
01:15
01:20 grondilu joined 01:25 adu joined 01:26 ShimmerFairy joined 01:32 zacts joined 01:33 Actualeyes joined 01:45 ilbot3 left, kalkin- joined
dalek c: 814fe24 | MasterDuke17++ | doc/Language/pragmas.pod6:
Fix link typo
01:46
01:47 ilbot3 joined 01:49 kalkin-_ left
BenGoldberg m: say join('', map {"foobar"}, (^2)); 01:50
camelia rakudo-moar 6183a5: OUTPUT«foobarfoobar␤»
BenGoldberg m: say join('', map {"foobar"}, (^2).race);
camelia rakudo-moar 6183a5: OUTPUT«␤»
BenGoldberg Is that a bug? 01:51
gfldex m: dd (^2).race
camelia rakudo-moar 6183a5: OUTPUT«HyperSeq.new␤»
timotimo that's a bug, but a known one
gfldex m: dd (^2).race.map({$_}) 01:52
camelia rakudo-moar 6183a5: OUTPUT«HyperSeq.new␤»
timotimo hyper and race seqs are known to lose all of their output sometimes
01:52 holyghost left
adu timotimo! 01:52
timotimo adu! 01:53
adu timotimo: how are you?
timotimo i'm all right
brushing my teeth right now so i can go to bed :)
adu timotimo: that's good!
timotimo how about you?
adu timotimo: I took some Melatonin, and if it works, then I'll go to bed soon too
timotimo cool, good luck with that
awwaiid gfldex: hm. thanks. that works... exactly like I thought it should. So debugging continues elsewhere! 01:54
BenGoldberg m: say join('', await map {start {"z"}}, ^33); 01:55
camelia rakudo-moar 6183a5: OUTPUT«Memory allocation failed; could not allocate 216 bytes␤»
BenGoldberg m: say join('', await map {start {"z"}}, ^33);
camelia rakudo-moar 6183a5: OUTPUT«zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz␤»
BenGoldberg m: say join('', await map {start {"z"}}, ^33);
camelia rakudo-moar 6183a5: OUTPUT«zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz␤»
BenGoldberg m: say join('', await map {start {"z"}}, ^34);
camelia rakudo-moar 6183a5: OUTPUT«Memory allocation failed; could not allocate 4 bytes␤»
timotimo adu: better be close to your bed, i hear melatonin kicks like a horse 01:57
BenGoldberg start sure gobbles up a lot of memory. 01:58
adu timotimo: it kicks in at around 15mg, but I usually take 3mg
timotimo oh, ok
01:58 jackson joined
adu timotimo: so I might be up for a while 01:58
timotimo it sounded like you just started trying that stuff
i haven't tried it so far 01:59
jackson I'm extremely new to perl6
01:59 jackson is now known as Guest77700
Guest77700 could anyone help me with grammars? 01:59
timotimo you've come to the right place
adu timotimo: on the contrary, I've been taking 3mg of Melatonin for 10 years now, I'm kind of addicted
timotimo oh
i suppose the body gets used to the stuff being supplied externally?
Guest77700 I take up to 8mg of melatonin every night lmao
adu timotimo: I'm not sure if I know if my brain can produce Melatonin on its own anymore... 02:00
timotimo i suppose i'll not try it, then :)
anyway, i'm off 02:01
see ya!
adu timotimo: good night
TEttinger melatonin was interesting for me
I slept super deeply, but I woke up feeling unrested because my dreams were so intense and lifelike
it was like i had just spent 8 hours dodging north korean spies and ghostbusting giant mi-go, which was my dream last night 02:02
Guest77700 So I have a file full of lines that are formatted like so: '<number>:<time>:<ipsrc>-><ipdst>:<protocol>:<size>:<srcport>:<dstport>', and example of a line being '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80' 02:03
How would I write a grammar to parse each line and pull out values I need?
I've written something I thought would work, but it didn't end up working 02:04
hoelzro MasterDuke: there *is*, but it's kind of tricky
yoleaux 01:04Z <MasterDuke> hoelzro: with vim-perl syntax highlighting, is there a way to highlight strings delimited by curly quotes (e.g., <“ ” ‘ ’>)?
hoelzro since we can't rely on Unicode properties, we basically need a syntax rule for every possible pair - and there are a *lot* of them 02:05
gfldex m: dd '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80'.split('<-')>>.split(':')
camelia rakudo-moar 6183a5: OUTPUT«(("1", "0.000000", "192.168.1.104->216.18.166.136", "TCP", "74", "49859", "80"),)␤»
gfldex Guest77700: ^^^ a grammar is overkill (and slow) for your usecase
m: dd '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80'.split('->')>>.split(':') 02:06
camelia rakudo-moar 6183a5: OUTPUT«(("1", "0.000000", "192.168.1.104"), ("216.18.166.136", "TCP", "74", "49859", "80"))␤»
MasterDuke hoelzro: i'm guessing it's not turned on by default?
hoelzro MasterDuke: what isn't turned on?
MasterDuke the highlighting for unicode quotes
hoelzro well, it's not present 02:07
we only accept some of the more common pairings
like "...", q{...}, etc
MasterDuke i see you saw my github issue. is that likely to get implemented? or should i try to just add it to my local perl6.vim? 02:09
hoelzro MasterDuke: if I can figure out a good way to implement all quotes, I will happily do it 02:10
but it's tricky, because the more rules we add to perl6.vim, the slower it gets
MasterDuke i have noticed it's not the fastest syntax highlighting 02:11
hoelzro yeah =/
Guest77700 ty gldex 02:12
I appreciate it
02:20 autarch left 02:21 zacts left 02:22 webstrand left 02:24 webstrand joined, dj_goku left 02:25 cuonglm joined
AlexDaniel \o/ github.com/perl6/doc/issues/561 02:26
02:27 pierre left 02:29 pierre joined 02:31 Guest77700 left, noganex_ joined 02:35 noganex left 02:44 kaare_ joined 02:48 pierre left 02:52 kid51 left 02:56 pierre joined, adu left 02:58 adu joined 03:00 wamba joined, pierre left 03:04 pierre joined 03:07 BenGoldberg left 03:10 autarch joined 03:16 ecallen joined 03:18 adu left 03:20 ecallen left 03:21 adu joined 03:22 adu left, dj_goku joined 03:24 benjikins joined
benjikins If I have a loop embedded in another loop, how would I continue the parent loop from inside the smaller loop 03:24
lol
like skip that iteration
jdv79 next? 03:25
not sure what you mean. could you show code?
gfldex m: MARK: for 1..10 -> $a { for 11..20 -> $b { next MARK if Bool.pick; put $a, $b } } 03:26
camelia rakudo-moar 6183a5: OUTPUT«311␤411␤412␤511␤811␤»
gfldex benjikins: ^^^ (i'm guessing what you mean)
see: docs.perl6.org/language/control#LABELs 03:27
benjikins so if next is inside of the child loop, it would skip the iteration for the parent loop? 03:28
gfldex please not the MARK
+e
03:29 pierre left, bob777 left 03:30 wamba left
benjikins alright, i think i got it now 03:31
thank you
03:34 beatdown joined 03:35 khw left 03:37 pierre joined 03:50 cpage_ left, skids left 04:00 pierre left
benjikins How do I define a constant hash? 04:01
jdv79 i'm not sure that's possible right now. 04:02
container ro'ness seems undefined at the moment
04:02 pierre joined
benjikins dang 04:02
AlexDaniel hoelzro: “a *lot* of them” – well, just 11, that's not too much. Although I probably need to dig into the grammar to see if I missed some 04:04
hoelzro: that being said, supporting just 「」 ‘’ and “” is probably a good start :) 04:05
llfourn benjikins: you can make an immutable hash with Map.new 04:11
AlexDaniel Yeah, that's it. (if anybody is interested: github.com/rakudo/rakudo/blob/nom/...nqp#L3541)
llfourn m: contant %map := Map.new: a => "b",c => "d"; say %map
camelia rakudo-moar 6183a5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%map' is not declared. Did you mean any of these?␤ &map␤ Map␤␤at <tmp>:1␤------> 3contant 7⏏5%map := Map.new: a => "b",c => "d"; say ␤»
llfourn m: constant %map := Map.new: (a => "b",c => "d"); say %map 04:12
camelia rakudo-moar 6183a5: OUTPUT«Map.new((:a("b"),:c("d")))␤»
llfourn m: constant %map := Map.new: (a => "b",c => "d"); %map<e> = "f"
camelia rakudo-moar 6183a5: OUTPUT«Cannot modify an immutable Nil␤ in block <unit> at <tmp> line 1␤␤»
llfourn you ofc don't need the constant there which just makes it initialize at compile time 04:13
benjikins ah, I see 04:16
alright thanks
04:17 cpage_ joined, cbk joined
cbk Anybody know if mod_perl works with the current Perl6? 04:23
llfourn cbk: it won't 04:27
cbk llfourn, so is there any way i can just write a simple Perl6 cgi script? 04:28
llfourn well you can use one of the p6 HTTP servers 04:29
but I don't think there is any rakudo integration with anything that would make it like cgi 04:30
github.com/ufobat/Bailador # I think ppl use this
cbk OK I'll look. really just wanted to have a simple cgi script though. 04:31
llfourn, Thanks. 04:33
llfourn cbk: it looks like some people have attempted to do some cgi like things: modules.perl6.org/#q=cgi&sort-c...sort-dir=d
YMMV
though tbh for me developing with app servers is simpler than cgi 04:35
04:37 Cabanossi left
cbk llfourn, I already have Apache running, I just want a Form that will pass data to an Perl6 cgi script. super simple nothing more then that. 04:37
hoelzro AlexDaniel: did you look at src/HLL/Grammar.nqp as well?
my last count was 196 pairs
(by this I mean Unicode bracketing characters, any of which may be used as a string delimiter with q and friends) 04:38
llfourn cbk: unfortunetly I don't think we have apache integration :( 04:39
04:39 _28_ria joined
cbk llfourn, Yes I saw that, and tried those but they do not work 04:39
Hope it gets added to the TODO list.
04:40 Cabanossi joined
gfldex cbk: implementing CGI by hand isn't that hard. 04:40
benjikins Does anyone know how it would be possible to convert parsed data from a pcap file (individual packets) to something like .flow files (netflow)
llfourn knows nothing about implementing cgi 04:41
cbk gfldex, I think I'm having problems with Apache and not really Perl6.
gfldex cbk: cgi should not be activated by default, IIRC all you need to do is to set the cgi dir 04:42
llfourn but woulnd't you need to make mod_rakudo or something for apache? 04:44
cbk gfldex, That was done, Perl 5 cgi scripts work just fine. As soon as I change a working perl5 script to use perl6 it stops working, and I get an internal error.
llfourn cbk: right because it's using mod_perl which embeds a p5 interpreter inside apache 04:45
gfldex cbk: may be a missing PATH or some other ENV vars
llfourn (as far as my understanding goes?)
gfldex the error log should tell you more 04:46
cbk I have #!/home/user/.rakudobrew/bin/perl6 as the shebang line
gfldex, You maybe right, I think my install of perl6 is messed up. only setup for my user account. 04:47
gfldex cbk: the user apache is running with may not have access to those files (if it does, shame on you :) 04:48
cbk gfldex, I have not changed any of the default file permissions for apache nor Perl6. So I don't expect that It would have access in that way. (hope not) 04:53
04:54 quester joined
cbk Should I install Perl6 globally for all users on my system? 04:54
04:54 pierre left 04:56 _28_ria left 04:57 leedo joined 05:01 samgwise joined
samgwise Hi :) 05:02
cbk hello samgwise
samgwise I'm trying to work out some stuff to do with exporting subroutines from modules
currently is export trait works like a charm for exporting from one module into the useing module but I'm wondering how to export up another level 05:03
for example if I export subroutine foo from module A and then import it into module B how do I export A::foo to any module which use module B 05:04
05:07 tx0h left 05:09 pierre joined 05:10 pierre left 05:13 Actualeyes1 joined, Actualeyes left, bjz left 05:18 pierre joined 05:22 pierre left
llfourn samgwise: "re-exporting" is NYI 05:23
samgwise OK, good to know :) 05:24
thanks.
llfourn samgwise: github.com/LLFourn/p6-CompUnit-Uti...-exporting
I was desperate to do this at one point so I made that module 05:25
samgwise Thanks I'll give it a go! 05:26
05:36 pierre joined 05:41 pierre left 05:50 jersni joined, jersni left 05:52 NEveD joined
benjikins How do I remove duplicates in an array quickly 05:54
05:55 pierre_ joined, cognominal left
cuonglm benjikins: Use unique 05:56
docs.perl6.org/routine/unique
benjikins ah, thanks, all I could find was the older uniq 05:57
05:59 pierre_ left 06:13 pierre_ joined 06:17 pierre_ left 06:18 pierre_ joined 06:27 firstdayonthejob joined 06:33 movl joined 06:40 darutoko joined 06:41 cuonglm left 06:54 bjz joined, CIAvash joined 06:56 woodruffw joined, woodruffw left 06:57 benjikins left, woodruffw joined, woodruffw left, woodruffw joined, woodruffw left 06:58 quester left, woodruffw joined, woodruffw left, movl left, woodruffw joined, woodruffw left 06:59 woodruffw joined, woodruffw left, woodruffw joined, woodruffw left 07:07 samgwise left 07:15 eone joined 07:25 rindolf joined
AlexDaniel hoelzro: ah. Well, that's a separate issue 07:30
07:31 [Sno] left 07:49 firstdayonthejob left 07:53 damnlie joined 07:55 damnlie left 07:57 damnlie joined 08:00 jonas2 joined 08:03 CIAvash left 08:04 dakkar joined, bob777 joined 08:07 eone left, xtreak joined
xtreak p6: sub say-hello($name where { .chars >= 20 or warn "MyStr should have at least 20 characters" }) { return "Hello " ~ $name; } ; say-hello("Ram").say; 08:08
camelia rakudo-moar 6183a5: OUTPUT«MyStr should have at least 20 characters in block at <tmp> line 1␤MyStr should have at least 20 characters in block at <tmp> line 1␤Constraint type check failed for parameter '$name'␤ in sub say-hello at <tmp> line 1␤ in block <unit> at <tmp>…»
08:08 trnh joined
xtreak The condition warning is executed twice. Is there a reason for this? 08:09
08:13 RabidGravy joined
AlexDaniel m: sub foo($x where { False or warn "Counter: {$++}" }) { }; foo(42) 08:19
camelia rakudo-moar 6183a5: OUTPUT«Counter: 0 in block at <tmp> line 1␤Counter: 1 in block at <tmp> line 1␤Constraint type check failed for parameter '$x'␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel committable: releases sub foo($x where { False or warn "Counter: {$++}" }) { }; foo(42)
committable AlexDaniel: gist.github.com/83c9c7f81ad113e16e...ab649d0f78 08:20
08:21 rindolf left
xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" } 08:30
camelia ( no output )
xtreak p6: subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }
camelia rakudo-moar 6183a5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'MyLongStr'␤at <tmp>:1␤------> 3subset MyLongCapsStr of MyLongStr7⏏5 where { .uc ~~ .Str or fail "MyLongCaps␤»
xtreak :p6 subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" } 08:31
p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" } 08:32
camelia ( no output )
xtreak Sorry for the syntax errors. Is it possible to subtype a subset? I tried to apply the constraint of MyLongCapsStr and it fails for "r" with MyLongStr message and passes for "ram" 08:34
psch xtreak: that seems correct from where. you do have .chars >= 2 in MyLongStr 08:35
s/where/here/
08:37 rindolf joined
xtreak I tried to apply MyLongCapsStr which I thought should inherit .chars >=2 and also add the new condition .uc ~~ .Str . I thought MyLongCapsStr will be .chars >= 2 and .uc ~~ .Str 08:37
psch m: subset A of Int where * > 0; subset B of A where * < 10; say 5 ~~ B; say 10 ~~ B 08:38
camelia rakudo-moar 6183a5: OUTPUT«True␤False␤»
psch m: subset A of Int where * > 0; subset B of A where * < 10; say 0 ~~ B; say 10 ~~ B
camelia rakudo-moar 6183a5: OUTPUT«False␤False␤»
08:38 CIAvash joined
psch xtreak: looks like that's exactly what's happening? :) 08:38
xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram" ~~ MyLongCapsStr; 08:41
camelia rakudo-moar 6183a5: OUTPUT«False␤True␤»
psch m: say "foo" ~~ .Str
camelia rakudo-moar 6183a5: OUTPUT«True␤»
psch ^^^ that's your actual issue
xtreak: the RHS of smartmatch always gets the LHS as topic 08:42
m: with "foo" { $_ ~~ .say }
camelia rakudo-moar 6183a5: OUTPUT«foo␤»
psch m: with "foo" { "bar" ~~ .say }
camelia rakudo-moar 6183a5: OUTPUT«bar␤»
psch m: with "foo" { .say; "bar" ~~ .say } # probably the clearest
camelia rakudo-moar 6183a5: OUTPUT«foo␤bar␤»
xtreak subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram"
psch that's two different whatevers 08:43
xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram"
camelia rakudo-moar 6183a5: OUTPUT«False␤ram␤»
psch ...i thought. apparently where blocks only curry with one param
xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram" ~~ MyLongCapsStr;
camelia rakudo-moar 6183a5: OUTPUT«False␤WhateverCode object coerced to string (please use .gist or .perl to do that) in whatevercode at <tmp> line 1␤MyLongCapsStr should have at least 2 characters and capital letters␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CO…»
psch ah, no, i was right
xtreak I forgot the * inside the where clause for MyLongCapsStr I hope was the issue 08:44
psch m: subset LStr of Str where { .chars >= 2 }; subset LCStr of LStr where { $^a.uc eq $^a }; say "ram" ~~ LCStr
camelia rakudo-moar 6183a5: OUTPUT«False␤»
xtreak Thanks a lot got it :) 08:46
08:51 cooper left 08:52 zakharyas joined 08:59 [Sno] joined, [Sno] left, sno joined 09:29 TEttinger left 09:36 bob777 left, bob778 joined 09:38 margeas joined, Woodi joined 09:39 bob778 is now known as bob777, mindos left 09:40 mindos joined 09:59 mcmillhj joined 10:01 labster left 10:03 mr-foobar left 10:04 cpage_ left, mcmillhj left 10:05 telex left 10:06 telex joined 10:12 mcmillhj joined 10:14 PotatoGim left, PotatoGim joined 10:16 stigo left, domm left 10:18 mcmillhj left 10:19 stigo joined, domm joined 10:27 dalek left 10:28 dalek joined, ChanServ sets mode: +v dalek 10:40 bjz_ joined 10:41 bjz left, mcmillhj joined 10:42 pierre_ left, canopus left 10:46 mcmillhj left 10:47 pierre_ joined 10:51 canopus joined 10:52 pierre_ left 10:57 mcmillhj joined 10:59 pistacchio joined
pistacchio hi 11:00
perl6: ([1,2], [2, 2], [3, 3]).map({.sum});
camelia ( no output )
pistacchio perl6: say ([1,2], [2, 2], [3, 3]).map({.sum});
camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«(3 4 6)␤»
psch perl6: ([1,2], [2, 2], [3, 3]).map({.sum}).say
camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«(3 4 6)␤»
pistacchio perl6: say ([1,2], [2, 2], [3, 3])».sum 11:01
camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«([1 2] [2 2] [3 3])␤»
pistacchio why don't they return the same result?
11:02 pierre_ joined
moritz pistacchio: because >> potentially descends recursively into data structures 11:02
11:02 mcmillhj left, woodruffw joined, woodruffw left 11:03 woodruffw joined 11:08 neuraload joined 11:12 pistacchio left 11:18 pierre_ left 11:19 Actualeyes1 left 11:28 cpage_ joined
masak m: my @a; @a.splice(0, 0, 42); say @a 11:33
camelia rakudo-moar 942a69: OUTPUT«[42]␤»
masak \o/
lizmat++ # rt.perl.org/Ticket/Display.html?id=128736
11:34 holyghost joined, kid51 joined 11:50 avenj left
dalek c: c7d59aa | (Tom Browder)++ | doc/Language/pragmas.pod6:
try to make pragmas searchable
11:52
c: 0230453 | (Tom Browder)++ | doc/Language/pragmas.pod6:
Merge pull request #790 from tbrowder/pragma2

try to make pragmas searchable
11:55 Actualeyes joined
gregf_ m: say [[1,2,3]] 12:00
camelia rakudo-moar 942a69: OUTPUT«[1 2 3]␤»
gregf_ why does this get flattened automatically? :/
m: say [[1,2,3],[4,5]] 12:01
camelia rakudo-moar 942a69: OUTPUT«[[1 2 3] [4 5]]␤»
gregf_ m: my @a = [[1,2,3]]; say @a
camelia rakudo-moar 942a69: OUTPUT«[1 2 3]␤»
jnthn m: my @a = [[1,2,3],]; say @a 12:02
camelia rakudo-moar 942a69: OUTPUT«[[1 2 3]]␤»
jnthn Because of the single arg rule 12:03
Same reason [1..10] gives you an array of ten itels
*items
gregf_ oh - ok. so using a ',' would make it override the single arg rule? 12:04
jnthn Well, it means that your single arg is now a list
m: say ([1,2,3]).perl; say ([1,2,3],).perl;
camelia rakudo-moar 942a69: OUTPUT«[1, 2, 3]␤([1, 2, 3],)␤»
jnthn Note that it's , that constructs lists, not parens 12:05
gregf_ ah - i see 12:06
jnthn: thanks for clarifying! 12:07
12:09 pmurias joined 12:11 adu joined
tbrowder can someone say how often p6 docs website is updated? 12:18
moritz tbrowder: the cron job for updating it is started every 5 minutes, but only if there isn't an instance of it running yet 12:19
tbrowder thanks, moritz 12:20
moritz tbrowder: ... and when changes are available in git, the logs are afterwards sync'ed to docs.perl6.org/build-log/ 12:21
you're welcome
12:23 adu left
tbrowder hm, I see the page i just updated (pragmas) is on view, but i don't see that, say, monkey, is searchable. what have i missed? 12:23
moritz the search isn't a fulltext search 12:26
it only makes sub/method/operator defintions available, and things specificially marked with X<...>, iirc 12:27
tbrowder BTW, it would very cool to have the build log dir either: split to show latest and all others in a subdir or a listing in reverse time order (latest first), or, better, both. 12:28
12:28 pierre_ joined
tbrowder but the update i made have the X<> enclosing the pragma names 12:28
hm, maybe the pipe part is mandatory--i'll try that 12:30
12:31 wamba joined 12:33 itaipu joined
tbrowder i just looked at the current pragma page source and the names are marked with the index* attribute. does the search engine need a tweak?? 12:33
12:34 Sgeo__ left
tbrowder that's beyond my pay grade at the moment 12:34
moritz tbrowder: you can sort the directory index by clicking on the table headers 12:36
12:37 adu joined
masak m: gist.github.com/masak/57a50e1f4eae...c5f3c92a1f 12:42
camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Scissors␤Player 2 chooses Scissors␤It's a tie!␤»
masak a modern take on "rock, paper, scissors" :)
comments welcome. I'm happy about every line except line 14
12:43 ufobat joined
unmatched} m: gist.github.com/masak/57a50e1f4eae...c5f3c92a1f 12:43
camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Paper␤Player 2 chooses Scissors␤Player 2 wins!␤»
12:44 lichtkind_ joined
unmatched} :D awesome use of a custom op 12:44
m: gist.github.com/zoffixznet/92acd16...50fec83950 12:45
camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Scissors␤Player 2 chooses Paper␤Player 1 wins!␤»
masak ooh 12:46
why didn't I think of that? :P
unmatched}++
moritz masak: because your {} are matched :-)
masak :P
let this be a less to you, kids: you can *say* "given and when are orthogonal constructs and can be used independently" -- but it's a whole 'nother thing to internalize it and make use of it naturally 12:47
peteretep Couldn't you do it as a sort?
masak peteretep: show how you mean with code :) 12:48
12:48 lichtkind left
masak peteretep: it doesn't feel like rock-paper-scissors is a total order, or even a partial one, since the `beats` relation is cyclical 12:48
but since we're only "sorting" two elements, that may not really become a problem 12:49
moritz
.oO( but we *can* partially beat you )
masak heh
I'll never live this down, will I?
masak .oO( hey, remember the time masak wrote `given *` for no good reason whatsoever? )
peteretep thinks 12:50
moritz masak: oh, you will. Just pile up other blunders that make us forget about this one :-)
masak sounds like a plan 12:51
masak tries to think of worse things
jast hey, remember the time masak wrote `given *` for no good reason whatsoever? it was a whole ten minutes ago, I think 12:52
moritz masak: copy&pasting confidential emails from your employer on IRC is a "standard" worse thing :-)
12:53 lvr joined
unmatched} default {} isn't really needed there either 12:54
m: gist.github.com/zoffixznet/c5583f2...a756b7706c
camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Paper␤Player 2 chooses Scissors␤Player 2 wins!␤»
DrForr Unless you're a White House intern, in which case 'worse' doesn't really describe it :)
nine Speaking of custom ops: what do you guys think of using a custom op to communicate to Inline::Perl5 that it should call a Perl 5 method/function in scalar context?
unmatched} All I'm reminded of is the startup penalty with custom ops. 12:58
perlpilot nine: $= $p5-obj.method; # :-) 13:01
13:02 mcmillhj joined
[Coke] nine: like prefix:<scalar> ? 13:04
nine [Coke]: that would certainly be the most intuitive. I'm not sure however if that would even be possible as surely the op's arguments are evaluated first and this op would need to change the way the argument's evaluated 13:05
masak unmatched}: yes, I had the thought about `default` not being needed when I wrote it. still, it adds some clarity, IMHO. 13:08
13:09 prammer joined
pmurias nine: it would need to be a slang 13:09
13:09 rba_ joined
pmurias nine: what happens to named arguments passed to a Perl 5 sub/method? 13:11
13:11 lvr left 13:13 sufrostico joined
nine pmurias: ok the issue is definitely not worth creating a slang. 13:14
pmurias: named arguments are turned into key/value pairs
lizmat masak unmatched} sometimes I wish we had a "ternary" syntax for handling -1,0,1 13:15
pmurias nine: so p5sub(:abc(123)) is turned into p5sub('abc', 123)? 13:16
lizmat cause the "beats" is a lot like "cmp"
DrForr Balanced ternary is a common numbering system.
unmatched} nods
nine pmurias: yes
DrForr :3b(+0-)
pmurias nine: scalar($obj).foo(123, ...) would be possible 13:18
nine So far I've found 3 different ways to implement scalar/list context for method/function calls: 1. have a custom call operator for scalar calls (maybe -> for old times sake? ;), 2. encode the context into the method name: $foo.do_something-s(...), 3. use a sentinel value as first argument: $foo.do_something(P5Scalar)
13:20 adu left
pmurias nine: options ones seems really ugly 13:21
* option one
psch do the insane, almost-timetravel one! clone the p5 interpreter in memory, call both contexts, and then create a Perl 6 object wrapper that returns the needed one and deletes the wrong clone
unmatched} option three as well
13:22 ufobat left
masak lizmat: that should be possible with `is parsed` macros 13:22
lizmat: I just sketched up this one for 007: github.com/masak/007/issues/163
pmurias nine: method chaining also would be possible: $obj.scalar.foo(123, ...) 13:23
nine I've thought the method name one is the perfect solution because in Perl 5 function names cannot contain hyphens anyway. But then github.com/niner/Inline-Perl5/issues/67 came along and I found out that it's actually possible to call a function with a hyphen in its name in Perl 5 13:25
masak nine: betting against Perl 5 being able to do a thing (somehow, no matter how unsavorily) is a dangerous game :P 13:26
13:26 skids joined
mst what about minting a reserved package 'scalar' 13:27
unmatched} TIL you can "react" with more than one reaction on Github
mst and using $obj.scalar::foo
ala the way Object::Remote uses $obj->start::method to indicate a non-blocking call
moritz unmatched}: expressiveness for split personalities! One can thumbs-up, the other can thumbs-down, all within a single github account! 13:28
13:28 jkramer joined
jkramer Hello 13:28
tbrowder moritz: i don't see anything clickable on my ipad. BTW, now the pragmas page shows the index attribute on the page--yikes, maybe the pipe part is needed--i'll try to fix that...
unmatched} I'm gonna do that all the time now :P
moritz hello jkramer
jkramer How do I start the perl6 shell with 2016.07.1? I upgraded recently and when I start perl6 without any arguments now I don't get the prompt anymore. 13:29
unmatched} jkramer: that still should be the way. What OS?
jkramer FreeBSD 13:30
nine mst: looks like something very much worth investigating!
mst nine: and the :: in perl5 makes for dispatch via that package
jkramer Both the 2016.04 and 2016.07 were built from rakudo star, if that changes anything. But with 04 I got the REPL shell
mst nine: see also p3rl.org/curry
nine mst: I wonder if the same trick works in Perl 6 13:31
unmatched} tbrowder: I recall in the past the indexer having issues with tags inside of it, so X<B<foo>> would have to be written as X<B<foo>|foo>
tbrowder: and another one is issues with X<> not working when used in =head.... not sure if the same is the case for =item 13:32
jkramer Actually when I start perl6 without arguments there's a moar process that used 200M (growing) and 50% CPU while doing nothing (visibly)
unmatched} jkramer: what happens? Does it just exit or is there output?
or does it hang 13:33
jkramer unmatched}: See last line
unmatched} jkramer: would you, please, report it as a bug?
jkramer Oh now I got a shell after forever
unmatched} :o
tbrowder zoffix: thanks for the hint--trying that...
jkramer And now it starts much faster. No idea what it did before, maybe compile some REPL modules or whatever :)
unmatched} Mabby 13:34
moritz precompile the setting? :/
jkramer zostay: Thanks for the super-quick channel password feature BTW :)
I'll now built lots of bots and annoy people
unmatched} :) 13:35
grondilu m: sub (:param($x)) {}
camelia ( no output )
grondilu m: sub (:param(\x)) {}
camelia rakudo-moar 942a69: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (:param(7⏏5\x)) {}␤»
grondilu ^can I make sigilless named parameters? 13:36
13:36 canopus left
timotimo maybe "is raw" will do what you want? 13:37
zostay jkramer: ?
unmatched} zostay: wrong nick; meant to go to zoffix 13:38
jkramer Zoffix
Yeah sorry, autocomplete :)
lizmat m: sub a(:$foo is raw) { $foo = 42 }; my $foo = 666; a :$foo; say $foo # grondilu
camelia rakudo-moar 942a69: OUTPUT«42␤»
jkramer I blame the high amount of people in this channel and the lack of unique letters in the alphabet
lizmat m: sub a(:$foo! is rw) { $foo = 42 }; my $foo = 666; a :$foo; say $foo # grondilu: probably better 13:40
camelia rakudo-moar 942a69: OUTPUT«42␤»
13:41 Actualeyes left
dalek c: 0c0a266 | (Tom Browder)++ | doc/Language/pragmas.pod6:
try index method per zoffix's hint
13:41
c: d82fb78 | (Tom Browder)++ | doc/Language/pragmas.pod6:
Merge pull request #793 from tbrowder/pragma3

try index method per zoffix's hint
13:42 ptolemarch joined, Actualeyes joined 13:44 pmurias left
grondilu what I wanted to do was more: sub f(:long-name-for-param(\short-name) { do-stuff-with short-name } 13:45
13:46 mr-foobar joined
grondilu forgot to close a paren though 13:46
neither rw nor raw traits are related anyway 13:47
psch well, 'is raw' is functionally what sigilless parameters are
13:47 avenj joined, avenj left, avenj joined
psch or semantically i guess 13:47
m: sub f(\a) { }; say &f.signature.params[0].raw 13:48
camelia rakudo-moar 942a69: OUTPUT«True␤»
grondilu ok but I was only interested in the syntactic aspect
I wanted to use Greek letters for params but I hate to use them with sigils. 13:49
13:50 sena_kun joined
grondilu ("hate" is strong a word though, on second thought) 13:52
13:52 avenj left 13:54 pdcawley left
moritz rage against the sigil! 13:54
psch well, you can still do *%_ and look for the symbols you want...
i don't know how sensible sigilless nameds are, but maybe we can have them too 13:55
jkramer How can I do this: irc-addressed($ where /freitag/) case-insensitive? Using m:i/freitag/ gives me a weird error from inside the module I'm using (IRC::Client) 14:07
Is there something wrong with the regex or the object which comes in as the first parameter? 14:08
moritz jkramer: where rx:i/freitag/
jkramer Ah, I see. Thanks!
moritz jkramer: m// is an immediate match, but what you want there is a regex as an object 14:09
(which the type-checker uses in a regex match)
jkramer That makes sense :)
unmatched} jkramer: $ where /:i freitag/ 14:16
m: sub foo ($ where m:i/bar/) { say "Got a bar" }; foo 'BAR' 14:17
camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
unmatched} m: sub foo ($ where /:i bar/) { say "Got a bar" }; foo 'BAR'
camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
unmatched} m: sub foo ($ where rx:i/bar/) { say "Got a bar" }; foo 'BAR'
camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
unmatched} Not sure what weird error you had with m:i//
jkramer unmatched}: I think that $ is not a string but some object that overrides ~~ so it matches against $_.text 14:18
Method 'match' not found for invocant of class 'IRC::Client::Message::Privmsg::Channel' in block 14:19
unmatched} ah
tbrowder zoffix: excellent! pragmas and their names are now searchable. yr hint to use "X<B<foo>|foo> 14:20
did the trick!! thnks, ++zoffix
lizmat has taken her own advice: act.yapc.eu/alpineperl2016/talk/6868
unmatched} \o/ lizmat++ 14:21
jkramer Is there something like Module::Refresh for perl6? 14:23
moritz I'm not aware of anything 14:25
unmatched} Don't think so
14:27 canopus joined, AndyBotwin joined 14:28 prammer left 14:29 trnh left, Rawriful joined
lizmat hopes other people will take her advice as well: act.yapc.eu/alpineperl2016/call_for_papers.html 14:30
unmatched} jkramer: that bug has been fixed. Latest and greatest IRC::Client will take an m:i// too 14:31
lizmat: so what was the advice? :) 14:33
lizmat "There is still time to submit a Perl 6 talk!" 14:35
unmatched} Ah
m: class Foo { method Str { "meow" } }; say Foo ~~ /meow/ 14:36
camelia rakudo-moar 942a69: OUTPUT«「meow」␤»
unmatched} m: class Foo { method Str { "meow" } }; say Foo ~~ m/meow/
camelia rakudo-moar 942a69: OUTPUT«Method 'match' not found for invocant of class 'Foo'␤ in block <unit> at <tmp> line 1␤␤»
unmatched} m: class Foo { method Str { "meow" } }; say Foo ~~ rx/meow/
camelia rakudo-moar 942a69: OUTPUT«「meow」␤»
unmatched} shrugs
jkramer unmatched}: Awesome, thanks :) 14:40
14:42 Rawriful left, rurban joined, rurban left, Rawriful joined 14:43 neuraload left
unmatched} star: use Pod::To::HTML; say Pod::To::HTML.^ver 14:43
camelia star-m 2016.04: OUTPUT«(Mu)␤»
unmatched} How do we find out versions of modules installed? 14:44
m: say class Foo:ver<42> {}.^ver # but how to go about a module?
camelia rakudo-moar 942a69: OUTPUT«v42␤»
14:45 khw joined
psch m: module Foo:ver<42> { }; Foo.^ver.say 14:47
camelia rakudo-moar 942a69: OUTPUT«v42␤»
unmatched} Hm, Pod::To::HTML doesn't have a :ver<>. So I guess only a package manager would know? 14:48
timotimo the compunit repo should know, i think 14:49
because it nommed the meta.info?
[Coke] perl6/doc - perl6 htmlify.p6 --parallel # generates a ton of Use of uninitialized value $file of type Any in string context 14:50
unmatched} star: say $*REPO.need(CompUnit::DependencySpecification.new(:short-name("Pod::To::HTML"))).version
camelia star-m 2016.04: OUTPUT«v*␤»
timotimo :\
unmatched} Too verbose for quick one liners, but at least it works :)
timotimo except PTH doesn't have the version set properly :) 14:51
14:51 sufrosti1o joined
unmatched} It does now. But I guess it was at * in 2016.04 star 14:51
timotimo OK
14:51 mcmillhj left
sena_kun [Coke], with latest docs? At what place exactly? 14:52
unmatched}
.oO( s/DependencySpecification/DepSpec/ .... )
14:55 sufrostico left
[Coke] sena_kun: it begins emitting them immediately. just did a git pull 14:55
14:56 ecallen joined, sufrosti1o left
[Coke] Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in any load_module at src/Perl6/World.nqp line 1193 14:56
sena_kun [Coke], what rakudo do you using? I had a bit similar issue witt about a two week old rakudo release.
[Coke] using rakudo 2016.07.1
sena_kun [Coke], it's strange. I use 2016.07.1-57-g0419194 built on MoarVM version 2016.07-3-g and cannot reproduce. 14:57
14:57 mcmillhj joined 15:00 wamba left
dalek c: fd54601 | (Zoffix Znet)++ | Makefile:
Add missing items to make help
15:00
c: 086db7f | (Tom Browder)++ | doc/Language/about.pod6:
Add some details and examples to show fine points.

Distinguish between the source code and how it's rendered. Emphasize the searchable format coding and its nuances.
15:01
c: b6b3952 | (Zoffix Znet)++ | .gitignore:
Ignore generated html/links.txt
15:06
c: f0b31f1 | (Zoffix Znet)++ | Makefile:
Add make webdev-build

Builds with --sparse=200; useful for testing website related changes where only a few generated files are needed.
unmatched} m: gist.github.com/zoffixznet/ae6d37d...dec847ceb6 15:07
camelia rakudo-moar d97e09: OUTPUT«Player 1 chooses Rock␤Player 2 chooses Paper␤Player 2 wins!␤»
unmatched} masak: ^ per suggestion on Twitter :) twitter.com/notcalledjack/status/7...8294691840 15:08
m: "👊".uninames.say
camelia rakudo-moar d97e09: OUTPUT«(FISTED HAND SIGN)␤»
unmatched} I'm not getting any 'Any of ...' with --parallel on Rakudo version 2016.06-151-gc843682 built on MoarVM version 2016.06-9-g8fc21d5 15:13
dalek c: 385aa21 | (Tom Browder)++ | doc/Language/about.pod6:
Another tweak.
15:16
15:16 harmil_wk joined
unmatched} I'm not getting any 'Any of ...' with --parallel on RRakudo version 2016.07.1-91-g373634e built on MoarVM version 2016.07-11-g11e02fe either 15:18
[Coke]: perhaps your Pod::To::HTML/Pod::To::BigPage need an update?
timotimo Rrrrrrakudo
unmatched} What's 91 in 2016.07.1-91-g373634e 15:19
?
jkramer When I accept an argument with ($ where ...), is there still a way to access that $ thing inside the method? Just wondering.
Or does it need a name
unmatched} jkramer: no, $ is anonymous. You need to name it
jkramer Ok, thanks
unmatched} ($_ where ...) { .text.uc } # or name it as the topic var 15:20
psch m: sub f($ where * < 10) { }; f 10 15:21
camelia rakudo-moar d97e09: OUTPUT«Constraint type check failed for parameter '<anon>'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
dalek c: 87cc875 | (Tom Browder)++ | doc/Language/about.pod6:
more tweaks
15:22
15:22 avenj joined, avenj left, avenj joined 15:23 aindilis left 15:24 aindilis joined 15:27 avenj left 15:30 titsuki joined 15:32 canopus left 15:37 pierre_ left, mwal_atikon joined 15:39 jonas2 left, canopus joined 15:43 mwal_atikon left
tbrowder hm, more tweaks will be needed... 15:44
15:46 mcmillhj left, mwal_atikon joined 15:48 araujo joined
dalek c: 2899fc5 | (Tom Browder)++ | doc/Language/about.pod6:
use the verbatim code to see the actual formatting codes
15:49
15:49 araujo left, araujo joined 15:51 AndChat|176409 joined, araujo left, mcmillhj joined 15:52 araujo joined 15:53 araujo left 15:54 araujo joined 15:55 mwal_atikon left 15:56 araujo left, mcmillhj left, araujo joined, araujo left, araujo joined
moritz anyone up for a bit of a linguist discussion? :-) 15:58
15:58 n0tjack joined 15:59 araujo left
moritz what is the difference between a stepback and a rollback? 15:59
15:59 araujo joined, araujo left
dalek c: 795e2f7 | (Tom Browder)++ | doc/Language/pragmas.pod6:
tweaks

Remove colon (":") separators between item and following text, put abbreviations NYI and TBD in square brackets.
15:59
n0tjack I'm trying to fiddle Zoffix's neat rock-paper-scissors script by substituting cutesy emojis where he has words, but p6 doesn't seem to like them. 16:00
gist.github.com/anonymous/89082d25...f8ac336a10
Is there any way to get p6 to accept those emojis as enums and function names?
jast moritz: the only meaning of 'stepback' that I've seen so far relates to furniture 16:01
moritz n0tjack: only characters that are identifiers can serve as enum values or constants 16:02
jast: ok, then I might have picked up some unidiomatic English there
n0tjack I can't hack my way around with something like "\xFFFF" or whatever the unicode code points are?
jast the phrase 'step back' is more common
someone may have nominalized it
psch m: enum Hand <👊 ✋ ✌>; say Hand.enums
camelia rakudo-moar 051339: OUTPUT«Map.new(("✋" => 1,"✌" => 2,"👊" => 0))␤»
psch well the enum decl works
dalek c: 276d799 | (Tom Browder)++ | doc/Language/about.pod6:
fix an error in the rendered code section
16:03
moritz m: enum Hand < ✌>; say Hand::('✌')
camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Combination of indirect name lookup and call not supported␤at <tmp>:1␤------> 3enum Hand < ✌>; say Hand::('✌')7⏏5<EOL>␤ expecting any of:␤ argument list␤»
moritz m: enum Hand < ✌>; say ::Hand::('✌')
camelia rakudo-moar 051339: OUTPUT«✌␤»
gregf_ stepback is for humans , rollback for db's? :| 16:04
n0tjack @moritz, psch: on my system, p6 isn't carping about the enum, but the function
16:04 mcmillhj joined
n0tjack ===SORRY!=== Error while compiling /Users/dbron/Dropbox/perl6/./rochambeau.p6 Missing block at /Users/dbron/Dropbox/perl6/./rochambeau.p6:5 ------> multi infix:<✊>(⏏✋, 👊) { True } 16:04
TimToady a stepback is something you do yourself, a rollback is something you do to other people and/or things 16:05
unmatched} m: gist.github.com/zoffixznet/31bddde...dcfe8104ab 16:06
camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:7␤------> 3multi infix:<✊>(7⏏5✋, 👊) { True }␤»
unmatched} Looks like terms can't be in sigs :(
m: sub term:<👊> { 'Rock' }.name.say 16:07
camelia rakudo-moar 051339: OUTPUT«term:<👊>␤»
unmatched} hm
n0tjack Ah well, it's probably truer to the logic to make a triangular boolean matrix anyway. That way I can add "shotgun" or "spock" more easily. 16:08
Thanks guys.
unmatched} :)
m: gist.github.com/zoffixznet/cc38622...1fa4fd20a2 16:10
camelia rakudo-moar 051339: OUTPUT«Player 1 chooses: ✋␤Player 2 chooses: ✋␤It's a tie!␤»
unmatched} n0tjack: ^
Not the same as original, but you get cutesy emoji :)
n0tjack unmatched}: Nice. Well done. Though of course the golfing purist in me wants to avoid quotation :)
timotimo make it a macro :P 16:11
n0tjack I'm psyched macros are now a thing. That was a hurdle for some project I made a go at last year.
Also stoked to see docs in the default install. 16:12
Hmm, I just realized I don't need a matrix. Just an ordered tuple and a custom comparitor that knows how to "wrap around". 16:13
timotimo tbh, macros aren't much more of a thing than they were a year ago
masak has been doing some good research over at 007, though 16:14
n0tjack what's 007?
16:15 Tonik joined
timotimo very good 16:16
16:16 acrussell joined
timotimo github.com/masak/007/blob/master/README.md 16:16
dalek c: 312f7e4 | (Tom Browder)++ | doc/Language/about.pod6:
more errors fixed (fingers crossed)

the C<C<>> construct doesn't render properly, use C<B<>> instead.
16:17
gregf_ is the do {} construct nowhere near to the Perl5 construct? 16:20
like so, i can do : do { ##} if/unless ( <cond> )
n0tjack m: do {say "Sure"} if (3>4); 16:21
camelia ( no output )
n0tjack m: do {say "Sure"} if (5>4);
camelia rakudo-moar 051339: OUTPUT«Sure␤»
unmatched} m: do { say "hi" } if 42
camelia rakudo-moar 051339: OUTPUT«hi␤»
gregf_ o_O
unmatched} gregf_: you can't do {} while; tho; use repeat {} until 16:22
timotimo i think the do + if/unless is nothing to do with do
TimToady do {} is just a term 16:23
gregf_ oh - yes
TimToady m: do { 42 } while 43;
camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of do...while; in Perl 6 please use repeat...while or repeat...until␤at <tmp>:1␤------> 3do { 42 } while 437⏏5;␤»
gregf_ these spaces after ' {' or after an if/while/for can melt ones brain :|
TimToady we do catch this braino though
16:24 zakharyas left, zakharyas joined
gregf_ sub reversematch($val){ my @data = $val.split(""); my ($i, $flag) = (0, True); while ( $i < @data.Int/2){ do { $flag = False;last; } if ( @data[$i] ne @data[@data.Int - 1 - $i] ); $i++; }; return $flag;}; say reversematch("pete"); #was trying this and the error was misleading :/ 16:24
unmatched} gregf_: what's the error? 16:25
dalek c: 05c9ba6 | (Tom Browder)++ | doc/Language/about.pod6:
more teaks, and more info
unmatched} gregf_: you don't need () on if expressions in Perl 6
gregf_ unmatched}: i just had to comment bits out :/ till i figured out where the problem was :/
16:26 BrassLantern joined
gregf_ expecting any of: block or pointy block 16:26
unmatched} gregf_: and @data[@data.Int - 1 - $i] can be written as @data[*-1-$i]
gregf_ *silly message imho*
unmatched}: yeah, sure. thats the refactoring bit ;) 16:27
16:27 dakkar left 16:28 jkramer left 16:29 zakharyas left, WhopperSwan007 left
gregf_ ta all! 16:30
unmatched} gregf_: in the future, it's helpful to report such "silly message" errors
m: while (0){}
camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3while (0){}7⏏5<EOL>␤ expecting any of:␤ block or pointy block␤»
unmatched} m: while (0) {}
camelia ( no output )
gregf_ yeah, that can be quite annoying :| 16:31
unmatched} Well, we do have access to source code to make it better :)
TimToady {} is a perfectly value postfix on a (), so "Missing block" is pretty accurate
*valid
unmatched} m: while 0 {}
camelia ( no output )
TimToady we do bother to catch the error if a listop eats the brackets 16:32
m: while say {}
camelia rakudo-moar 051339: OUTPUT«5===SORRY!5===␤Function 'say' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3while say {}7⏏5<EOL>␤Missing block (apparently claimed by 'say')␤at <tmp>:1␤------> 3while say {}7⏏5<EOL>␤␤»
TimToady we might be able to swing something similar for (){}
16:33 travis-ci joined
travis-ci Doc build failed. Tom Browder 'more teaks, and more info' 16:33
travis-ci.org/perl6/doc/builds/149521307 github.com/perl6/doc/compare/312f7...c9ba65c879
16:33 travis-ci left
unmatched} m: (:42foo, :72bar){'foo'}.say 16:33
camelia rakudo-moar 051339: OUTPUT«Type List does not support associative indexing.␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
unmatched} m: ({:42foo, :72bar}){'foo'}.say
camelia rakudo-moar 051339: OUTPUT«42␤»
TimToady we would presumably only issue the diagnostic if the block actually turned out to be missing 16:34
unmatched} I think going for (){} may be too wide. just detect if the ( is preceded by a while or something
Oh, sure.
TimToady m: while say {} {}
like that parses fine 16:35
camelia rakudo-moar 051339: OUTPUT«(timeout){}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}…»
16:35 lambd0x joined
lambd0x Hi there! 16:35
unmatched} \o 16:36
lambd0x Does anyone of you know how internally works an array in Perl6? I mean how does its memory management is done and how each basic operation that rakudo performs is done... 16:37
unmatched}: o/
16:37 pierre_ joined
unmatched} Considering there are developers in the channel who wrote that code, sure someone knows :) What's the actual question? 16:38
timotimo easy to find out
just check out the moarvm source and look into src/6model/reprs/, where you'll find the VMArray.h and VMArray.c files
lambd0x memory management performed by rakudo for array type
timotimo: that helps :) 16:39
16:41 labster joined 16:43 pierre_ left
jnthn Also src/core/Array.pm and src/core/List.pm (Array inherits a bunch from List) are relevant 16:43
lambd0x thanks. Want to know because I plan to use this language in a algorithm complexity course in my university.. 16:44
timotimo it's good to point out that our VMArray uses "realloc", which apparently has some implementations that have their own heuristics when it comes to growing memory regions 16:45
i.e. they sometimes grow more than requested and will then do future growth requests without doing copies 16:46
i forgot who told us about that
ilmari glibc has malloc_usable_size() which tells you how much was actually allocated 16:47
timotimo oh that's helpful
hoelzro TIL 16:48
ilmari++
I only knew about mallinfo
ilmari OSX has malloc_size() and malloc_good_size()
lambd0x hm... but its use of realloc is subjected to internal fragmentation?
hoelzro 16:49
hoelzro++
ilmari hoelzro: is that for when you decide memory management is hard and go shopping?
timotimo what is "good size" for? 16:50
hoelzro ilmari: haha 16:51
16:51 mcmillhj left
lambd0x timotimo: My install directory of perl6 is kinda different btw :P 16:51
ilmari timotimo: the supplied size rounded up to not have any padding 16:53
16:55 mcmillhj joined
lambd0x is there a prevision of rakudo's support for jagged arrays? e.g. my @array[*;*] ? 16:58
[Coke] prevision? 16:59
17:00 mcmillhj left 17:03 mcmillhj joined 17:04 sno left
lambd0x [Coke]: sorry, prediction :) 17:04
typo there...
gfldex at some point in the future
lambd0x so?
17:05 sufrostico joined, sufrosti1o joined
lambd0x ah nice, yesterday I've learned a lot about how to work with arrays is general and also tried to have a jagged which failed. 17:05
gfldex if you asked about the future expect to get what you deserve :)
17:05 BrassLantern left
lambd0x gfldex: hahaah 17:06
gfldex: the fact there shall be such a feature is enough for my curiosity... :)
thanks 17:07
gfldex it is in the specs
17:09 prammer joined
lambd0x indeed it is. 17:10
dalek c: dc0e321 | (Tom Browder)++ | doc/Language/about.pod6:
last tweak failed, possibly D<> construct not recognized at least in an =item

Changed from D<> to B<>
lambd0x thanks everyone!
dalek c: 826d978 | (Zoffix Znet)++ | template/search_template.js:
Display 5to6 items in search results last

Fixes #792
17:17
17:17 setty1 joined 17:18 avenj joined 17:25 firstdayonthejob joined
dalek c: 961d204 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod6:
make example stand out
17:30
17:30 travis-ci joined
travis-ci Doc build passed. Tom Browder 'last tweak failed, possibly D<> construct not recognized at least in an =item 17:30
travis-ci.org/perl6/doc/builds/149531767 github.com/perl6/doc/compare/05c9b...0e321af6f0
17:30 travis-ci left 17:35 khw left 17:37 travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Display 5to6 items in search results last 17:37
travis-ci.org/perl6/doc/builds/149533481 github.com/perl6/doc/compare/dc0e3...6d9787b0f5
17:37 travis-ci left
tbrowder Okay, p6 folks, the doc "Language/About the Docs" page is now much more correct and informative (given the current pod rendering situation). 17:39
17:39 firstdayonthejob left
tbrowder tweaks welcome 17:39
unmatched} tbrowder: the 'Generating this documentation requires' is missing Pod::To::BigPage from required modules 17:42
17:44 mcmillhj left, margeas left
tbrowder Hm, wasn't that in the top chunk? I didn't intentionally touch that--I'll fix, though... 17:45
unmatched} And a big-picture thought is that `About the Docs` page just duplicates the CONTRIBUTING.md and doesn't even need to be on docs.perl6.org/Language github.com/perl6/doc/blob/master/C...IBUTING.md
17:45 mcmillhj joined 17:46 prammer left 17:47 prammer joined
dalek href="https://perl6.org:">perl6.org: c2366d9 | (Zoffix Znet)++ | README.md:
Mention Edge in browser support
17:48
href="https://modules.perl6.org:">modules.perl6.org: 8fe1075 | (Zoffix Znet)++ | README.md:
Mention Edge in browser support
17:49
tbrowder zoffix: I don't see that module mentioned in the file before I touched it today.
17:50 travis-ci joined
travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'make example stand out' 17:50
travis-ci.org/perl6/doc/builds/149536314 github.com/perl6/doc/compare/826d9...1d204a6761
17:50 travis-ci left
dalek c: 4676aff | (Zoffix Znet)++ | CONTRIBUTING.md:
Document required browser support
17:50
17:51 wamba joined 17:52 AndyBotwin left
dalek c: 710fb7c | (Zoffix Znet)++ | doc/Language/about.pod6:
List Pod::To::BigPage as needed module
17:52
17:52 firstdayonthejob joined
dalek c: 0d037cf | (Zoffix Znet)++ | CONTRIBUTING.md:
Add TOC for easier navigation
17:53
sena_kun gfldex, hi. I see you're working on making the docs examples compile. What parts do you plan to take? I'd want to help here, most likely, with Types/ directory. Do you plan to take Language/ entries? 17:55
dalek c: 1fb61d4 | (Zoffix Znet)++ | CONTRIBUTING.md:
Add Pod::To::BigPage to module install instructions
gfldex sena_kun: i'm doing /Language/* ordered by find examples/ -type f -ls | sort -n -k 7 17:56
17:57 spider-mario joined 17:59 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Document required browser support' 17:59
travis-ci.org/perl6/doc/builds/149541173 github.com/perl6/doc/compare/961d2...76aff94a2d
17:59 travis-ci left
sena_kun gfldex, okay, I'll take all(in best case) Type/* then. Can I ask you for an advice about this task in the future, if something I'm not sure about pops out? 17:59
tbrowder zoffix: I agree bout the redundancy. We can either delete the page (not my call), or reference it on the About page, and make it clear that the About page is merely an overview. On difference between the two pages (I think--haven't kept up with yr speedy changes) is any mention of the detailed indexing cross-reference aspects of the pod source. 18:01
gfldex sena_kun: i try to :skip-test as least as possible but will not be religious about it. Anything that throws an exception is skipped but I first try to include an exception handler first. If the example gets convoluted skipping is better as clarity for the reader is more important then our ability to sleep soundly. 18:02
tbrowder When I said "delete the page" I was referring to the "About the Docs Page." 18:03
18:05 FROGGS joined
sena_kun gfldex, I use :skip-test when I have some fake call(like Pair.fmt, see github.com/perl6/doc/issues/794). I also skip endless code(like say 1 .. *, etc) and catch all exceptions with a proper output(by your example). 18:06
dalek c: 08e2e86 | Altai-man++ | doc/Type/ (6 files):
Make Bool/Label/Mix/Numeric/RatStr/Setty documentation files compile
18:07
18:07 prammer left, prammer joined 18:12 mcmillhj left 18:13 mcmillhj joined, autarch left 18:15 autarch joined, TEttinger joined 18:22 xtreak left, dwarring joined 18:24 iH2O joined
iH2O great room, great contribution to mankind 18:24
gfldex now we only need to find out a way to let mankind know :-> 18:25
iH2O ok, i understand perl6 is lost among 1000 other programming languages 18:26
18:26 prammer left
iH2O that are less good 18:27
18:27 prammer joined
unmatched} iH2O: "lost"? Lost what? 18:28
iH2O explain them that perl6 is better. its like a classical music concert you have to tell the audience when to applaud
lol 18:29
skids :D
skids decides not to pan classical music. To each his own. 18:30
unmatched} Most of classical music sucks. 18:31
But at least it's not country music.
unmatched} hides
18:31 prammer left
mst most of most genres sucks 18:31
unmatched} heh, that's also true. 18:32
perlpilot most of most anything sucks ;)
iH2O statistically speaking given 7M humans, there should be a few Mozarts around 18:33
*7B
stmuk_ Sturgeon's law
iH2O there was only 1B humans in his time
18:36 setty1 left
geekosaur provided they have opportunity... 18:36
18:36 setty1 joined
El_Che TimToady's and DrForr's talks at this year OSCON are now on the O'Reilly Safari bookshelf for those with a subscription 18:37
perlpilot The population of the planet today is double what it was when I was born ... ETOOMANYHUMANS
iH2O 10B humans in 2050, twice the planet's capacity
:(
perlpilot iH2O: how do you figure capacity? 18:38
iH2O it was just comfortable when there was 5B in the 1980s
El_Che iH2O: at the current eco-footprint?
iH2O the env is doomed!! 18:39
El_Che oh, and they call it the "Perl6 Track" 18:40
unmatched} iH2O: but we also put out crap in 80s, like CFCs. The more humans there is the more we can progress and fix the issues 18:41
iH2O wat
sounds like a circular twisted argument
:)
El_Che www.safaribooksonline.com/library/...Start=True 18:42
"The Perl 6 Fundamentals Video Collection"
unmatched} iH2O: not really. Your argument says we do X—which is bad— and the fewer of us there is the fewer times we'll do X, while my argument says the more of us there is the more likely we'll figure out how to avoid doing X. 18:43
iH2O i give up, your logic is too advanced for my course of Critical Thinking 101 18:44
unmatched} ¯\_(ツ)_/¯ 18:45
TimToady wonders if Gaia ever puts forth presidential candidates intended to kill off half of humanity... 18:46
unmatched} Just half? :) 18:47
gfldex TimToady: not presidents but Reichskanzlers 18:48
dalek c: 8236877 | coke++ | doc/Type/Mu.pod6:
Fix broken link
c: 093f18f | coke++ | doc/Language/about.pod6:
fix whitespace
gfldex but then, the spanish flu was actually better at killing off humans then both WWI and WWII combined 18:49
sena_kun We don't really need to kill. Just reduce birth rate and all will be cool after some time. But we don't have a time for rational methods!
[Coke] what is the naming convention in docs for routine vs. method? 18:50
gfldex for some time i believed that the problem of humanoverflow will solve it self because we will run out of food. But the i realised that humans can and did eat humans.
El_Che the bubonic plague was nice as well
vcv Any recommendations on Perl 6 web application frameworks? I don't need anything fancy like django in python, just something simple. 18:51
El_Che and not to be forgotten: smallpox
[Coke] we have, e.g. docs.perl6.org/type/Mu#routine_defined - but several things are linking to docs.perl6.org/type/Mu#method_defined
gfldex [Coke]: use routine if you talk about something that can be either method or sub
[Coke] vcv: Bailador is very simple, functional.
gfldex: ok
TimToady I expect feeding antibiotics to cattle will have the appropriate population control effect downstream
vcv supports mustache? Sold. Thanks [Coke]
unmatched} I wouldn't really call it functional.
vcv Well I'll try it at least 18:52
unmatched} Well, I guess it depends on what your app does. But there's no way to make it non-blocking.
gfldex TimToady: Death by Kindness? o.O
[Coke] looks like the link to docs.perl6.org/type/Mu#method_defined is not explicitly listed in the source.
vcv that's ok, it will be a light use internal web app
unmatched} Cool. 18:53
[Coke] ah, I'm misreading the bug report.
vcv Just need an excuse to write some Perl 6 at work
harmil_wk Man, I wish there were a more descriptive way to say where a builtin was defined than just "line 9212 of m-CORE.setting" :-)
m: for Int.^methods {say "{.file}:{.line}: {.name}"}
camelia rakudo-moar 08e39e: OUTPUT«gen/moar/m-CORE.setting:9368: Int␤gen/moar/m-CORE.setting:9374: Num␤gen/moar/m-CORE.setting:9378: Rat␤gen/moar/m-CORE.setting:9381: FatRat␤gen/moar/m-CORE.setting:9385: abs␤gen/moar/m-CORE.setting:9389: Bridge␤gen/moar/m-CORE.setting:9393: chr…»
unmatched} harmil_wk: what would be more descriptive than the actual line number of where it's defined? 18:54
harmil_wk setting is generated, right? In C-land, generated files generally have preprocessor sugar that tells the compiler where they were generated from. 18:55
TimToady yes, we need some file/line setting sugar
m: constant $?LINE = 42; die 18:56
camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Constants with a '?' twigil not yet implemented. Sorry. ␤at <tmp>:1␤------> 3constant $?LINE = 427⏏5; die␤»
TimToady m: BEGIN $?LINE = 42; die
camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤ Cannot modify an immutable Int␤ in code at <tmp> line 1␤␤»
TimToady we could just make that work 18:57
well, and $?FILE
harmil_wk Yeah, that seems the sane way to go about it.
TimToady there might be some assumptions inside the compiler about monotonically increasing line numbers though 18:58
jnthn Can't think of one.
TimToady but yeah, something we've wanted for quite some years now, but ENOTUITS 18:59
unmatched} Well, I think I can make a small script that can translate the setting line number to file/linenumber
unmatched} tries 19:00
19:01 canopus left
skids read that as ENOTNUTS 19:06
19:06 Begi joined
unmatched} succeeds 19:10
19:10 canopus joined
TimToady m: while ($_){ say "hi" } 19:10
camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3while ($_){ say "hi" }7⏏5<EOL>␤ expecting any of:␤ block or pointy block␤»
unmatched} harmil_wk: it won't work in camelia (restricted) but works fine on non-restricted: gist.github.com/zoffixznet/23a9c85...296e5114c0
m: gist.github.com/zoffixznet/23a9c85...296e5114c0
camelia rakudo-moar 08e39e: OUTPUT«Failed to open file /home/camelia/gen/moar/m-CORE.setting: no such file or directory␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub where at <tmp> line 6␤ in block at <tmp> line 16␤ in block <u…»
unmatched} hmmm
TimToady m: while ($_){ say "hi" } 19:11
camelia rakudo-moar 7ec824: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block (whitespace needed before curlies taken as a hash subscript?)␤at <tmp>:1␤------> 3while ($_){ say "hi" }7⏏5<EOL>␤ expecting any of:␤ block or pointy block␤»
19:11 iH2O left
unmatched} It may need tweaking, I guess. Works fine for my rakudobrewed perl 6 19:11
hmmm
TimToady gregf_: ^^^ 19:12
unmatched} m: Int.^can("say")[0].file.IO.absolute.say
camelia rakudo-moar 7ec824: OUTPUT«/home/camelia/gen/moar/m-CORE.setting␤»
unmatched} aha
19:12 trnh joined, trnh left, trnh joined 19:13 Tonik left
unmatched} Ah, that won't work. 19:13
So yeah, you gotta tweak the script so it can find the setting file and then it'll work :) 19:14
unmatched} pats self on the back
19:17 darutoko left 19:20 kid51 left
unmatched} Well... I murdered huggable. She needs a rewrite to IRC::Client 3.0 :( 19:20
19:21 andrzejku joined, cooper joined, cooper left, cooper joined 19:22 itaipu left, espadrine joined
unmatched} m: &say.file.say 19:33
camelia rakudo-moar 7ec824: OUTPUT«gen/moar/m-CORE.setting␤»
unmatched} Is there any way to get the full path to that file?
perlpilot m: &say.file.IO.abspath.say 19:37
camelia rakudo-moar 7ec824: OUTPUT«/home/camelia/gen/moar/m-CORE.setting␤»
unmatched} That's not it though. .file returns a Str and .abspath just plops CWD to it 19:38
perlpilot Sorry, that's as far as my brain got :) 19:40
unmatched} :) 19:41
19:49 mcmillhj_ joined 19:50 mcmillhj left 19:51 ecallen left 19:52 labster left 20:07 andrzejku left 20:11 s34n left, kaare_ left 20:12 s34n joined 20:14 sena_kun left 20:18 AlexDaniel left 20:22 canopus left 20:27 canopus joined 20:28 wamba left 20:29 AlexDaniel joined 20:31 sno joined 20:32 ufobat joined
ufobat how do i "add" 2 Buf or Blobs? 20:35
there is no method add() or append() 20:36
20:36 tbrowder left
lizmat ~ 20:42
m: dd Blob.new(1,2,3) ~ Blob.new(4,5,6)
camelia rakudo-moar 7ec824: OUTPUT«Blob.new(1,2,3,4,5,6)␤»
masak .oO( Bufs and Blobs have both string nature and list nature )
20:42 pmurias joined
lizmat m: dd Buf.new(1,2,3).push(Blob.new(4,5,6)) 20:43
camelia rakudo-moar 7ec824: OUTPUT«Failure.new(exception => X::TypeCheck.new(operation => "push to Buf", got => Blob.new(4,5,6), expected => uint8), backtrace => Backtrace.new)␤»
lizmat hmmmm
m: dd Buf.new(1,2,3).push(Buf.new(4,5,6)) 20:45
camelia rakudo-moar 7ec824: OUTPUT«Buf.new(1,2,3,4,5,6)␤»
lizmat hmmm... apparently we cannot push a Blob onto a Buf (yet)
moritz wouldn't that be .append anyway?
lizmat for Blob/Buf there is no difference between .append and .push anyway
m: dd Buf.new(1,2,3).append(Buf.new(4,5,6)) 20:46
camelia rakudo-moar 7ec824: OUTPUT«Buf.new(1,2,3,4,5,6)␤»
lizmat ufobat: ^^^ 20:48
20:49 zakharyas joined 20:50 domidumont joined
ufobat mmmm 20:50
20:51 xnrand joined 20:52 domidumont left
ufobat but 20:53
m: my Blob $b; my Blob $a = Blob.new(1,2,3); $b = $b ~ $a;
camelia rakudo-moar 7ec824: OUTPUT«Use of uninitialized value $b of type Blob in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at <tmp> line 1␤Cannot use a Buf as a string, but you called the Stringy method on it␤ in b…»
ufobat m: my Blob $b; my Blob $a = Blob.new(1,2,3); $b ~= $a; 20:54
camelia rakudo-moar 7ec824: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤ in block <unit> at <tmp> line 1␤␤»
ufobat why is there a difference?
20:54 s34n left
lizmat ah, good point 20:55
ufobat i was confused bacause my $b was not defined :( now it's fine
masak TimToady: did I hear you heckling in response to your name in www.youtube.com/watch?v=a5Q7td6t-iw ? :P
ufobat if $b is actually Buf:D or Blob:D it is working 20:56
lizmat m: my Buf $a; $a.push(Buf.new(1,2,3,4)
camelia rakudo-moar 7ec824: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3my Buf $a; $a.push(Buf.new(1,2,3,4)7⏏5<EOL>␤»
lizmat m: my Buf $a; $a.push(Buf.new(1,2,3,4))
camelia rakudo-moar 7ec824: OUTPUT«Cannot modify an immutable Buf␤ in any at gen/moar/m-Metamodel.nqp line 1736␤ in block <unit> at <tmp> line 1␤␤»
lizmat ok, that needs to be fixed
ufobat thanks for the help! 20:58
lizmat m: my Buf $a .= new; $a.push(Buf.new(1,2,3,4)) # workaround
camelia ( no output )
masak TimToady: oh, and "Perl wants to be Haskell" was definitely you :D
20:59 margeas joined 21:02 skids left 21:03 n0tjack left 21:13 mcmillhj_ left 21:14 AndChat|176409 left 21:15 AndChat|176409 joined 21:17 s34n joined 21:27 zakharyas left 21:31 e163 joined 21:32 CIAvash left
dj_goku so if I wanted to hack on the perl6 REPL this is what I want right: rakudo/src/core/REPL.pm 21:33
hoelzro dj_goku: yup 21:34
dj_goku hoelzro: sweet. I have a few functions I want to add. Not sure how easy it'll be. 21:35
hoelzro dj_goku: what kind of functions? 21:36
dj_goku ls/pwd(this would probably just call another function)
nothing really special
make chdir
hoelzro hmm
dj_goku most REPLs have that and is really helpful. 21:37
21:37 FROGGS left
hoelzro would ls call run 'ls', or would it list the symbols in the current scope? 21:37
dj_goku run ls
hoelzro is it too much to do run 'ls' or do dir '.'? 21:38
I dunno - I (personally) tend not to like it when REPLs contaminate their environments with functions that are shell-like 21:39
it would be nice, imo, if we allowed an RC file of sorts for the REPL, so users could stick whatever functions/etc they want in there
dj_goku ahh I live there, maybe that isn't the best way to figure things out.
hoelzro: so in python I use ipython and it is great. I just started checking out the elixir REPL. THey both have LS, but ipython has a lot of shell-like. Where elixir only has ls/pwd 21:41
arnsholt The neat thing would be to have a module where you can sort of 'use Shell::Commands qw/ls rm/' and it generates ls(*@args) and rm(*@args) for you, that call the right programs with the args
hoelzro see, I don't mind if someone wants to build a fancier REPL ala iPython 21:42
I just don't know if that kind of functionality belongs in Rakudo itself
dj_goku ahh. well I have no idea of hacking a new REPL so I just wanted it in the rakudo repl. :D
arnsholt There's always the Perl 6 ipython kernel 21:43
I'd be happy to hand out commitbits =)
dj_goku arnsholt: I think I remember being told about that. so Perl6 <==> ipython kernel? 21:44
21:45 e163 left 21:46 ptolemarch left
arnsholt dj_goku: Yup 21:51
21:56 acrussell left 22:08 pmurias left 22:11 wbill joined 22:13 cpage_ left
vcv if my module depends on a module from Perl 5 using use Module::Name:from<Perl5>; Can i define that as a dependency in META6.json? 22:15
22:15 margeas left 22:16 margeas joined
[Coke] tcl's interactive mode would just automatically convert any unknown command to a shell invocation. 22:17
22:18 setty1 left
gfldex vcv: you can list it but don't I doubt any Perl 6 module installer will take it. 22:18
22:18 AndChat|176409 left
vcv I tried listing it with and without :from<Perl5> and panda install . chokes. Ok, thought maybe I was just missing something. Thanks 22:19
22:23 firstdayonthejob left 22:26 skids joined 22:27 Zoffix left
vcv I am amazed how well imported Perl 5 modules works. Props to anyone who worked on that. 22:28
22:31 kid51 joined
timotimo moaty nine did that 22:32
mostly 22:33
22:35 trnh left 22:40 ufobat left 22:42 cpage_ joined 22:46 RabidGravy left 22:49 avenj left 22:55 Sgeo__ joined, ufobat joined, avenj joined 22:59 rindolf left 23:02 spider-mario left 23:04 ufobat left 23:05 mcmillhj joined 23:10 kurahaupo joined 23:11 mcmillhj left 23:14 bjz_ left 23:15 kurahaupo left 23:17 ufobat joined 23:25 ufobat left 23:26 labster joined 23:32 espadrine left 23:35 bjz joined 23:49 bjz left 23:58 Actualeyes left