»ö« 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:02 pmurias left 00:14 canopus left
[Coke] If so, why do we even have that option? :) 00:15
00:15 skids joined
timotimo because if you don't have inline::python, we still want you to have syntax highlighting 00:15
oh, maybe the doc build would be a good opportunity for nine to optimize inline::python 00:16
[Coke] we already require a few modules. doesn't seem like a big deal to require one more.
timotimo though i fear it's probably only a very few calls that are drowned out by perl6 work time
00:18 unicodable6 joined
[Coke] yay, it finished. 00:20
timotimo yay 00:24
00:25 canopus joined
[Coke] ... and search didn't seem to pick up on my changes. hurm. 00:28
timotimo is that perhaps a separate step?
[Coke] hurm. Inline::Python install fails for me, cannot find pyhelper.c:1:10: fatal error: 'Python.h' file not found 00:30
timotimo ah 00:31
install python-dev or python-devel
00:33 eyck left
[Coke] nosuch package on macports. swear i had this working at somepoint. (there are many py-*-devel packages. no idea which one is right) 00:34
timotimo does macports have something like "apt-file" or "dnf provides"?
00:35 eyck joined
geekosaur port provides 00:36
[Coke] guessing, "which port provides this executable I'm looking for"?
geekosaur but only for installed ports; variants make the problem of uninstalled ports rather difficult 00:37
TimToady
.oO(Duke Nukem Forever provides?)
timotimo well, apt-file and dnf provides work based on file-per-package lists they download separately
geekosaur (debian and fedora ship prepopulated databases generated for every installable package. variants change what files a port can install, so the equivalent file is rather large)
00:56 wamba left 01:00 BenGoldberg joined 01:01 aborazmeh joined, aborazmeh left, aborazmeh joined 01:02 cdg left 01:15 Actualeyes joined 01:17 cibs left 01:19 cibs joined
ZzZombo m: my \self = π; say self 01:29
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'self' used where no object is available␤at <tmp>:1␤------> 3my \self = π; say 7⏏5self␤ expecting any of:␤ argument list␤ term␤»
ZzZombo m: my \sеlf = π; say sеlf
camelia rakudo-moar 843a6b: OUTPUT«3.14159265358979␤»
ZzZombo WTF? 01:30
01:31 Actualeyes left 01:33 zakharyas joined
MasterDuke m: say 'self'.uninames 01:35
camelia rakudo-moar 843a6b: OUTPUT«(LATIN SMALL LETTER S LATIN SMALL LETTER E LATIN SMALL LETTER L LATIN SMALL LETTER F)␤»
MasterDuke m: say 'sеlf'.uninames 01:36
camelia rakudo-moar 843a6b: OUTPUT«(LATIN SMALL LETTER S CYRILLIC SMALL LETTER IE LATIN SMALL LETTER L LATIN SMALL LETTER F)␤»
yoleaux AlexDaniel: go through clog and see if there are any other < > cases that are obviously wrong 01:38
AlexDaniel .in 1d go through clog and see if there are any other < > cases that are obviously wrong
yoleaux AlexDaniel: I'll remind you on 2 Dec 2016 01:38Z
AlexDaniel :P
u: SPACE MODIFIER 01:40
unicodable6 AlexDaniel, Found nothing!
AlexDaniel :(
u: MODIFIER
unicodable6 AlexDaniel, U+02B0 MODIFIER LETTER SMALL H [Lm] (ʰ)
AlexDaniel, U+02B1 MODIFIER LETTER SMALL H WITH HOOK [Lm] (ʱ)
AlexDaniel, U+02B2 MODIFIER LETTER SMALL J [Lm] (ʲ)
AlexDaniel, gist.github.com/9e9ba0755e9aefa43c...06d4081ef2 01:41
AlexDaniel u: Lm space
unicodable6 AlexDaniel, Found nothing!
AlexDaniel u: Lm 01:43
unicodable6 AlexDaniel, U+02B0 MODIFIER LETTER SMALL H [Lm] (ʰ)
AlexDaniel, U+02B2 MODIFIER LETTER SMALL J [Lm] (ʲ)
AlexDaniel, U+02B1 MODIFIER LETTER SMALL H WITH HOOK [Lm] (ʱ)
AlexDaniel, gist.github.com/b5cd8f0e7db5642cdb...78c776247f
AlexDaniel m: my \ꘌ = 42; say ꘌ == ꘌ 01:44
camelia rakudo-moar 843a6b: OUTPUT«True␤»
AlexDaniel m: my \ꓼ = 42; say 5+ꓼ 01:45
camelia rakudo-moar 843a6b: OUTPUT«47␤»
ZzZombo m: my \хрясь=2;put ++хрясь 01:46
camelia rakudo-moar 843a6b: OUTPUT«Cannot resolve caller prefix:<++>(Int); the following candidates␤match the type but require mutable arguments:␤ (Mu:D $a is rw)␤ (Int:D $a is rw)␤␤The following do not match for other reasons:␤ (Bool $a is rw)␤ (Mu:U $a is rw)␤ …»
ZzZombo m: my \хрясь=2;put хрясь 01:47
camelia rakudo-moar 843a6b: OUTPUT«2␤»
AlexDaniel m: my \х=2; say х Xx х × х xx х 01:49
camelia rakudo-moar 843a6b: OUTPUT«(2222 2222)␤»
ZzZombo stop having fun :V 01:51
01:52 ZzZombo left 01:55 Actualeyes joined
TimToady is suddenly rather glad he didn't make the optional... 01:58
01:59 adu joined 02:02 pat_js left 02:05 obfusk left, pierre_ joined, obfusk joined 02:11 Vynce joined 02:12 adu left 02:17 thowe joined
thowe Hello. 02:25
02:26 kurahaupo__ joined
AlexDaniel 🙋 02:29
thowe hm, that must be something my font doesn't have. 02:30
AlexDaniel u: 🙋 02:31
unicodable6 AlexDaniel, U+1F64B HAPPY PERSON RAISING ONE HAND [So] (🙋)
thowe So... Interesting. WHat does one need on a Debian box to have all of these unicode characters?
AlexDaniel thowe: ttf-unifont package is a must 02:32
but this one should be rendered by something else, actually 02:33
MasterDuke fonts-noto maybe
02:33 Actualeyes left
AlexDaniel yea, I have fonts-noto-mono installed 02:34
thowe OK, now I see you waving. The next question is, how do you type these things? have them someplace you can paste in? Keyboard mapping? 02:36
🙋
AlexDaniel thowe: compose key 02:41
I have a custom keyboard layout, so yes, I have added some commonly used characters there 02:42
but most people use compose key for everything
thowe not even sure what "compose key" means
AlexDaniel well, dead keys too, but I don't think these ones can help with emojis
thowe: google it :) 02:43
02:46 ilbot3 left 02:47 ilbot3 joined 02:49 Actualeyes joined
thowe problem is alt key wants to be menu shortcut in word processor... 02:49
still, now I know how to type an 􏿽xF1 if there isn't a menu. 02:53
02:53 synopsebot6 left, synopsebot6 joined
thowe Anyone know if Util is ever around? 02:53
TimToady this could easily be determined by searching the ir clogs 02:58
MasterDuke .seen Util
yoleaux I saw Util 9 Oct 2016 22:28Z in #perl6: <Util> p3rln00b: thanks!
thowe ah ".seen". Hm. Bummer. I wanted to say "Hi"> 02:59
AlexDaniel thowe: you make it sound like alt is the only key on your keyboard :) 03:08
thowe: for example, you can use caps lock as a button for your compose key
thowe I think what I would want to do is probably map the Windows button. I don't use it for anything else. 03:09
03:13 Actualeyes left
TimToady that's what I do 03:14
AlexDaniel is using both Super and Hyper buttons all the time
thowe: do you have Ctrl on caps lock or something? 03:18
03:19 labster left
thowe I haven't made any alterations 03:21
TimToady my keyboard doesn't even have caps lock, except occasionally by accident
03:21 ZzZombo joined
TimToady it has home/end where caps lock should be, if it wasn't where control was supposed to be instead of where it is... :) 03:22
03:22 ZzZombo is now known as Guest92221, Guest92221 left, Guest92221 joined, Guest92221 is now known as ZzZombo
AlexDaniel TimToady: does not sound too bad 03:23
03:25 noganex joined
thowe is excited for the Learning Perl6 book. 03:27
If I can have a book at the office, I can make an argument for rewriting my invoice processor in Perl6. 03:28
03:28 noganex_ left
AlexDaniel Changing caps lock to any other key is a win anyway 03:30
03:35 user9 left, user9 joined
ZzZombo Can we get --ll-exception to print paths using OS-aware path separators? 03:37
03:45 AlexDaniel left
ZzZombo why the hack: 03:46
m: gist.github.com/ZzZombo/5caa51f9b2...556920a0d8
camelia rakudo-moar 843a6b: OUTPUT«Perl6::Metamodel::ClassHOW.new␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in block at <tmp> line 48␤ in method handler at <tmp> line 44␤ in submethod tweak at <tmp> line 15␤ in block <unit> at <…»
ZzZombo why does it look into Perl6::Metamodel::PackageHOW instead of Perl6::Metamodel::ClassHOW??
TimToady would be more excited about the LP book if he knew it wouldn't be written with that barfaliciously pythonic bracket style 03:47
03:56 solarbunny left
thowe not sure what this message means... when doing ""Howdy World".^methods(:local).join(',')" I get a message "Control flow commands not allowed in toplevel". 04:00
what does that mean? 04:01
join is a control flow command? 04:02
ZzZombo m: "Howdy World".^methods(:local).join(',') 04:04
camelia rakudo-moar 843a6b: OUTPUT«Submethod object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (pl…»
ZzZombo m: dd "Howdy World".^methods(:local).join(',')
camelia rakudo-moar 843a6b: OUTPUT«Submethod object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (pl…»
ZzZombo m: dd "Howdy World".^methods(:local) 04:05
camelia rakudo-moar 843a6b: OUTPUT«(submethod BUILD (Str $: :$value = "", *%_ --> Nil) { #`(Submethod|46742088) ... }, method Int (Str:D $: *%_) { #`(Method|46742240) ... }, method Num (Str:D $: *%_) { #`(Method|46742392) ... }, method chomp (Str:D $: *%_) { #`(Method|46742544) ... }, metho…»
ZzZombo m: put "Howdy World".^methods(:local).join(',')
camelia rakudo-moar 843a6b: OUTPUT«Submethod object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤Method object coerced to string (pl…»
ZzZombo I don't get your results. 04:06
thowe might be a REPL thing(?)
04:11 cdg joined
thowe hm. I was just trying an example from docs.perl6.org/language/classtut#Introspection 04:11
"say $o.^methods(:local).join(', ');" 04:12
04:13 cdg left
ZzZombo I think it's a mistake then. You shouldn't stringify methods like that. It probably meant to concat their names only. 04:13
04:13 cdg joined
ZzZombo m: put ("Howdy World".^methods(:local)>>.name).join(',') 04:14
camelia rakudo-moar 843a6b: OUTPUT«BUILD,Int,Num,chomp,subst,pred,succ,ords,parse-base,samecase,samemark,samespace,word-by-word,trim-leading,trim-trailing,trim,encode,NFC,NFD,NFKC,NFKD,wordcase,trans,indent,codes,chars,uc,lc,tc,fc,tclc,flip,ord,WHY,WHICH,Bool,Str,Stringy,DUMP,ACCEPTS,chop,s…»
ZzZombo m: put ("Howdy World".^methods(:local)>>.name).join(', ')
camelia rakudo-moar 843a6b: OUTPUT«BUILD, Int, Num, chomp, subst, pred, succ, ords, parse-base, samecase, samemark, samespace, word-by-word, trim-leading, trim-trailing, trim, encode, NFC, NFD, NFKC, NFKD, wordcase, trans, indent, codes, chars, uc, lc, tc, fc, tclc, flip, ord, WHY, WHICH, B…»
ZzZombo thowe ^
thowe so, ^methods doesn't return a list of names, it actually returns "methods". Method objects(?) 04:15
ZzZombo yes
thowe ah ha... I come from a Ruby world once upon a time, so I wasn't quite ready for that. That's next level. 04:16
is >>. a special operator on Method? 04:17
ZzZombo well, to be pedantic, it returns a List of methods.
no
it is a generic operator called hyper operator
04:17 pierre_ left
thowe looks like it might be iterating(?) 04:18
ZzZombo basically performs actions on all members of a list, and returns results in order
so here, I tell it to iterate over the result of ^methods() call, call .name on it and the results of all calls are then returned in another list. 04:19
s/on it/on each item/ 04:20
thowe yeah, I got that. Nifty.
Kinda like .each in Ruby I guess.
wow, there's a lot of hyper operators. 04:21
I guess I know some of these already though. I think the term "hyper operator" is just new to me. 04:22
I'm also not reading the page right, so don't mind me... 04:23
04:24 pierre_ joined
thowe what makes something a "Hyper" operator? 04:25
is it an operator on an operator? 04:26
ZzZombo yea, it applies another operator 04:27
thowe I probably shouldn't annoy the channel with stuff I should just be reading up on. Sorry for the noise.
04:29 pierre_ left 04:36 thowe left 04:37 solarbunny joined
BenGoldberg . o O (A hyper operator is one which has ADHD) 04:38
MasterDuke ZzZombo: are you on windows? 04:40
04:40 Actualeyes joined
MasterDuke well, assuming you are, are all the paths in the output of --ll-exception non-windows? or just some? 04:56
ZzZombo Yes 04:58
they look like "C:\rakudo/share/perl6/runtime/CORE.setting.moarvm"
04:58 aborazmeh left
ZzZombo note the first separator is Windows-like, while the rest are not. 04:59
oh, user files properly use only '\'. 05:00
so it affects only internal files.
there is also no consistency in paths on the beginning of strings, I was talking earlier about paths in parentheses: 05:02
from src/Perl6/Compiler.nqp:27 (C:\rakudo\share\nqp\lib/Perl6/Compiler.moarvm:command_eval)
from gen\moar\stage2\NQPHLL.nqp:1508 (C:\rakudo\share\nqp\lib/NQPHLL.moarvm:command_line)
and there are instances of mixed separators as well. 05:03
MasterDuke some parts of those paths are kind of hard-coded, some are pulled from the filesystem 05:05
05:05 awwaiid left 05:06 awwaiid joined
MasterDuke and a bunch of the code is from NQP, which i don't believe has as much OS-awareness as Perl 6 does 05:06
ZzZombo well sure we can decorate the paths but only in the output.
MasterDuke could you rakudobug it? 05:07
ZzZombo Yes.
MasterDuke cool. i'll try and look into it, but it would be good to have in RT in case it slips my mind 05:08
05:09 rburkholder joined
ZzZombo m: gist.github.com/ZzZombo/5caa51f9b2...556920a0d8 05:18
camelia rakudo-moar 843a6b: OUTPUT«Perl6::Metamodel::ClassHOW.new␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in block at <tmp> line 48␤ in method handler at <tmp> line 44␤ in submethod tweak at <tmp> line 15␤ in block <unit> at <…»
ZzZombo why does it look into Perl6::Metamodel::PackageHOW instead of Perl6::Metamodel::ClassHOW?? 05:19
05:23 ZzZombo left, ZzZombo joined 05:24 ZzZombo is now known as Guest67198, Guest67198 left, Guest67198 joined, Guest67198 is now known as ZzZombo 05:25 pierre_ joined
seatek is this a bug or a feature? 05:26
gist.github.com/adaptiveoptics/a4b...054dbd5dca
i can't quite decide myself! 05:27
ugexe thats how once works 05:28
ZzZombo m: sub fragile{ once put 'You broke dis...'};fragile;fragile; 05:29
camelia rakudo-moar 843a6b: OUTPUT«You broke dis...␤»
seatek ok sounds good to me :) i'll doc it in the things to watch out for with once
ugexe "A block prefix with once will be executed exactly once, even if placed inside a loop or a recursive routine."
05:30 pierre_ left
seatek different class isntances are supposed to have different scope though 05:30
that's what makes it unexpected 05:31
ugexe it does not say once per instance
it works just like `state`
m: class foo { method bar { state $x = rand; say $x } }; foo.new.bar; foo.new.bar
camelia rakudo-moar 843a6b: OUTPUT«0.590090676209819␤0.590090676209819␤»
seatek actually, that just made me think of a good use for it 05:32
ugexe different scope doesnt matter if its only executed once 05:33
seatek clones? 05:34
threads?
ZzZombo m: sub fragile{ once put 'You broke dis...'};fragile xx 2
ugexe what about them?
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ xx used at line 1␤␤»
ZzZombo m: sub fragile{ once put 'You broke dis...'};fragile x 2
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ x used at line 1␤␤»
05:35 khw left 05:36 pierre_ joined, pierre_ left
ugexe m: class foo { method bar { { once say 42 } } }; foo.new.bar; foo.new.bar # you can do this if you really want to 05:38
camelia rakudo-moar 843a6b: OUTPUT«42␤42␤»
ugexe but then you lose what you wanted to begin with if you use the same instance more than once 05:39
seatek no i think it works great the way it is.
05:40 pierre_ joined
BenGoldberg m: BEGIN { my $once; sub fragile { $once //= put 'You broke dis...' } }; fragile xx 2; 05:44
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤ fragile used at line 1␤ xx used at line 1␤␤»
BenGoldberg m: BEGIN { my $once; sub fragile { $once //= put 'You broke dis...' } }; fragile for ^2;
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ fragile used at line 1␤␤»
BenGoldberg m: BEGIN { my $once; sub OUTER::fragile { $once //= put 'You broke dis...' } }; fragile for ^2;
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use pseudo package OUTER in sub declaration␤at <tmp>:1␤------> 3BEGIN { my $once; sub OUTER::fragile7⏏5 { $once //= put 'You broke dis...' } };␤»
BenGoldberg m: BEGIN { my $once; our sub fragile { $once //= put 'You broke dis...' } }; fragile for ^2;
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ fragile used at line 1␤␤»
BenGoldberg frowns 05:45
ugexe m: BEGIN { my $once; my &fragile = sub fragile { $once //= put "You broke dis..." } }; fragile for ^2 05:46
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
BenGoldberg That's my favorite perl5 way of giving some shared state to a small handful of subs, without that state being seen outside of them.
05:46 James0r joined
BenGoldberg m: my &fragile = BEGIN { my $once; sub { $once //= put "You broke dis..." } }; fragile for ^2; 05:47
camelia rakudo-moar 843a6b: OUTPUT«You broke dis...␤»
BenGoldberg m: my (&foo, &bar); BEGIN { my $counter = 0; &foo = sub { --$counter }; &bar = sub { ++$counter } }; say foo() xx 3, bar(); 05:49
camelia rakudo-moar 843a6b: OUTPUT«(-1 -2 -3)-2␤»
BenGoldberg m: my (&foo, &bar); say foo() xx 3, bar() xx 2; BEGIN { my $counter = 0; &foo = sub { --$counter }; &bar = sub { ++$counter } }; 05:50
camelia rakudo-moar 843a6b: OUTPUT«(-1 -2 -3)(-2 -1)␤»
ZzZombo m: sub fragile{ once put 'You broke dis...'};fragile() x 2 05:52
camelia rakudo-moar 843a6b: OUTPUT«WARNINGS for <tmp>:␤Useless use of "x" in expression "fragile() x 2" in sink context (line 1)␤You broke dis...␤»
ZzZombo m: sub fragile{ once put 'You broke dis...'};fragile() xx 2
camelia rakudo-moar 843a6b: OUTPUT«You broke dis...␤»
ZzZombo m: sub fragile{ once put 'You broke dis...';put 'Stop you criminal scum!'};fragile() xx 2 05:53
camelia rakudo-moar 843a6b: OUTPUT«You broke dis...␤Stop you criminal scum!␤Stop you criminal scum!␤»
05:56 BenGoldberg left 05:59 cdg left 06:00 Cabanossi left 06:02 Cabanossi joined 06:05 wisti left 06:09 cibs left 06:10 cibs joined 06:13 Vynce left 06:14 skids left 06:16 darutoko joined 06:18 ugexe left 06:23 domidumont joined 06:24 wamba joined 06:32 ugexe joined 06:36 domidumont left 06:47 rindolf joined 06:49 pierre_ left 06:50 RabidGravy joined 06:51 James0r left 06:55 pierre_ joined 07:00 xtreak joined 07:03 pierre_ left 07:06 pierre_ joined
xtreak p6: (1..*).grep: * % 2 == 0.map: * + 2.take(10) 07:08
camelia rakudo-moar 843a6b: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at <tmp> line 1␤␤»
07:08 Woodi left 07:20 CIAvash joined, CIAvash left 07:23 pierre_ left, CIAvash joined 07:26 geekosaur left 07:27 geekosaur joined 07:29 pierre_ joined 07:31 rburkholder left 07:33 wamba left 07:46 ufobat joined 07:51 Tonik joined 08:01 Tonik left 08:11 dogbert2 joined 08:14 dogbert17 left 08:15 firstdayonthejob joined 08:23 dj_goku_ joined 08:26 dj_goku left, thib left 08:28 wamba joined 08:30 rurban joined 08:33 m0ltar left 08:34 cxreg joined 08:35 m0ltar joined 08:41 dakkar joined 08:48 aborazmeh joined, aborazmeh left, aborazmeh joined 08:51 xtreak left 08:53 dg joined 09:02 xtreak joined 09:04 jonas1 joined 09:08 domidumont joined 09:10 Actualeyes left 09:13 domidumont left, domidumont joined 09:15 pierre_ left 09:17 Unavowed left 09:18 Unavowed joined 09:20 wamba left 09:23 pierre_ joined 09:28 pierre_ left 09:29 pierre_ joined, brillenfux joined, aries_liuxueyang left 09:30 aries_liuxueyang joined
xtreak p6: (1..*).grep: * % 2 == 0.map: * + 2.take(10) 09:34
camelia rakudo-moar 843a6b: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at <tmp> line 1␤␤»
xtreak Works on my repl but breaks here . Any clue? Also how do I convert (...) to give the actual results
09:35 scimon joined 09:38 giraffe left
scimon Hi folks. Can anyone give me any good pointers on the state of Perl6 on the JVM? 09:39
Right now i've got it running via rakudobrew but panda won't install and this makes my plan to convince my boss it's a viable option is hitting a speed bump. 09:40
09:41 CIAvash left, CIAvash joined 09:42 wamba joined
ZzZombo try zef? 09:44
scimon That won't build either. 09:45
(Just runing them both now to give some more details) 09:46
Panda fails at the bootstrap stage with Cannot unbox a type object and a metric ton of nqp stacktrace. 09:47
09:47 giraffe joined
scimon (Ubuntu Linux 16.04 with the Oracle Java 8 VM) 09:48
I know Rakudo star currently says the JVM stuff has issues and I figured I'd see if I could help with them. Even if it is by tracking down bugs.
Zef fails with "Serialization Error: could not locate static code ref for closure" 09:49
09:49 CIAvash_ joined
scimon (Meeting... will try zef build outside of rakudobrew on my return, any pointers people can give would be great) 09:50
ZzZombo I don't know anything about that, sorry. Wait for someone else. Just hang around, you'll get help.
CIAvash_ m: (1..*).grep(* %% 2).map(* + 2)[^10] 09:51
camelia ( no output )
scimon Cheers. :)
CIAvash_ m: say (1..*).grep(* %% 2).map(* + 2)[^10]
camelia rakudo-moar 843a6b: OUTPUT«(4 6 8 10 12 14 16 18 20 22)␤»
CIAvash_ xtreak: ↑
09:52 CIAvash left 09:54 zakharyas left
xtreak CIAvash_: Thanks. Why does using the colon notation yield a lazy list and how can I make it as a list? 09:54
09:54 zakharyas joined
gregf_ m: ((1..*).grep: * %% 2.map: * + 2)[1..10] 09:55
camelia ( no output )
gregf_ doesnt look quite right :| 09:57
xtreak Is there a way to convert the output of take(10) itself as a list?
m: say ((1..*).grep: * %% 2.map: * + 2)[1..10]
p6: say ((1..*).grep: * %% 2.map: * + 2)[1..10] 09:58
gregf_ m: (^10).^name.say
09:58 zakharyas left
gregf_ m: (^10).List.^name.say 09:58
ZzZombo GJ team
that will shut those pesky bots for sure 09:59
10:02 lizmat left 10:03 dontbe^2 left, abruanese left 10:04 dontbe^2 joined
camelia rakudo-moar 843a6b: OUTPUT«(2 3 4 5 6 7 8 9 10 11)␤» 10:04
rakudo-moar 843a6b: OUTPUT«Range␤»
rakudo-moar 843a6b: OUTPUT«List␤»
arnsholt I think "say (1..*).grep(* %% 2).map(* + 2)[^10]" and "((1..*).grep: * %% 2.map: * + 2)[1..10]" are different
The latter is equivalent to "((1..*).grep(* %% 2.map(* + 2)))[1..10]
10:04 lizmat_ joined, abruanese joined
xtreak arnsholt: Makes sense :) Sorry to repeat but how do I convert (...) that is the output of take() to a list? 10:05
10:05 simcop2387 joined 10:07 CIAvash_ left 10:08 CIAvash joined, CIAvash left, CIAvash joined 10:09 aborazmeh left 10:13 siamak joined 10:14 siamak left
CIAvash xtreak: "take" should be used with "gather" docs.perl6.org/routine/take it doesn't do what you think it does AFAIK. 10:17
arnsholt Using take outside of a gather should raise an exception 10:18
xtreak CIAvash: Thanks. I got confused take function in other languages 10:19
arnsholt Yeah, it's not Haskell's take at all 10:20
jnthn Try head 10:21
At least, if the take semantics your thinking of are like the C# ones...
*you're # OMG o.O
jnthn drinks the coffee faster
CIAvash m: say (1..*).grep(* %% 2).map(* + 2).head: 10 # xtreak 10:23
camelia rakudo-moar 843a6b: OUTPUT«(4 6 8 10 12 14 16 18 20 22)␤»
10:24 zilti joined
zilti To whoever made the Template-Mojo module: Congrats! I get a "Useless use of constant string "blarg" in sink context (line 1)" :P 10:24
10:27 andrzeju_ left 10:37 krakan_ left, brillenfux left, Unavowed left, firstdayonthejob left, geekosaur left, RabidGravy left, tadzik left, ggoebel left, zacts left, ShoaibJahejo left, Spot__ left, tomaw left, solarbunny left, SourceBaby left, Undercover left, dalek left, mniip left, jervo left, CIAvash left, dakkar left, ugexe left, ilbot3 left, mohae left, effbiai left, ribasushi left, timeless left, vcv_ left, apejens left, gfldex left, domm1 left, TimToady left, mattp_ left, ggherdov left, buggable left, beatdown left, jferrero left, hobbs left, ilmari left, lucs left, bitmap left, silug left, Hotkeys left, dataangel left, jsimonet left, chansen_ left, DarthGandalf left, BuildTheRobots left, f3ew_ left, SHODAN left, DANtheBEASTman left, dustinm` left, jercos left, mindos left, tbrowder left, mithaldu_ left, BooK left, Timbus left, cxreg left, ufobat left, rindolf left, synopsebot6 left, dp[m] left, M-Illandan left, ilmari[m] left, Khisanth left, mitchum left, Lucas_One left, parisba left, Juerd left, ponbiki left, samcv left, bpmedley left, cyphase left, Upasaka left, smash left, go|dfish left, m0ltar left, dj_goku_ left, Cabanossi left, kurahaupo__ left, unicodable6 left, committable6 left, benchable6 left, bisectable6 left, evalable6 left, ChoHag left, pecastro left, zostay left, leego left, alimon1 left, ugjka left, nowan left, salparadise left, kent\n left, flaviusb left, NeuralAnomaly left, wtw left, obra left, erdic left, mephinet left, esh left, yoleaux left, dylanwh left, clkao left, TeamBlast left, BinGOs left, huggable left, profan left, literal left, kipd left, PotatoGim left, nightfrog left, cognominal left, telex left, pochi left, chee left, ingy left, diakopter left, stmuk_ left, dudz left, zilti left, darutoko left, obfusk left, Matthew[m] left, babydrop left, nchambers left, rblackwe left, [particle] left, mad__ left, tyil left, abraxxa left, xfix left, ranguard left, imcsk8 left, titsuki left, salva left, Praise left, Bucciarati left, Ulti left, sQuEE left, isacloud left, notbenh_ left, rodarmor left, robinsmidsrod left, damnlie_ left, integral left, haircode left, d^_^b left, eater left, gregf_ left, MasterDuke left, krokib left, domidumont left, seatek left, matt_ left, b2gills left, avuserow left, jdv79 left, [ptc] left, eiro left, sivoais left, gensym left, sergot left, revere left, rurban left, dogbert2 left, Matias[m] left, chris2 left, huf left, DrForr left, PerlJam left, sjohnsen left, kaare_ left, stevieb left, sunnavy left, andrewalker left, garu left, Celelibi left, risou___ left, w4and0er96 left, Alikzus left, stanley left, ccakes left, john51 left, saki left, xinming left, Dunearhp left, vytas left, leedo left, skaji left, giraffe left, scimon left, pierre_ left, cpage left, musca left, jonadab left, japhb left, Kaffe left, broquaint left, mspo left, Exodist left, jnthn left, mls left, Util left, olinkl left, inokenty left, kst left, simcop2387 left, aries_liuxueyang left, xtreak left, user9 left, timotimo left, r3m left, amalia_ left, hahainternet left, bartolin left, avalenn left, roguelazer left, mst left, mrsolo left, cosimo left, hoelzro left, SmokeMachine____ left, adrusi left, JimmyZ left, jantore left, konobi left, cibs left, geraud left, jonas1 left, awwaiid left, noganex left, vendethiel left, shadowpaste left, mr-foobar left, baest left, xiaomiao left, Sgeo__ left, sftp left, moritz left, rjbs left, luis left, jnap_ left, nebuchadnezzar left, kshannon left, wamba left, dg left, ZzZombo left, perigrin_ left, bhm left, breinbaas left, jast left, cgfbee left, jeek left, felher left, perlpilot left, ttkp6 left, rmusial left, arnsholt left, abruanese left, lizmat_ left, eyck left, canopus left, TEttinger left, setty1 left, ilbelkyr left, camelia left, El_Che left, Grrrr left, emdashcomma left, stux|RC left, araujo left, vike left, masak left, petercommand left, shmibs left, hcit left, Gothmog_ left, avar left, notbenh left 10:44 CIAvash joined, xxpor_ joined, diego_k joined, Dunearhp_ joined, krakan joined, zilti joined, simcop2387 joined, abruanese joined, lizmat_ joined, giraffe joined, wamba joined, scimon joined, aries_liuxueyang joined, brillenfux joined, pierre_ joined, Unavowed joined, domidumont joined, jonas1 joined, xtreak joined, dg joined, dakkar joined, m0ltar joined, cxreg joined, rurban joined, dj_goku_ joined, firstdayonthejob joined, dogbert2 joined, ufobat joined, geekosaur joined, RabidGravy joined, rindolf joined, ugexe joined, darutoko joined, cibs joined, Cabanossi joined, ZzZombo joined, awwaiid joined, solarbunny joined, user9 joined, noganex joined, synopsebot6 joined, ilbot3 joined, kurahaupo__ joined, obfusk joined, eyck joined, canopus joined, unicodable6 joined, seatek joined, committable6 joined, benchable6 joined, evalable6 joined, bisectable6 joined, cpage joined, dp[m] joined, Matias[m] joined, M-Illandan joined, Matthew[m] joined, tadzik joined, ilmari[m] joined, ChoHag joined, TEttinger joined, ggoebel joined, pecastro joined, setty1 joined, zacts joined, mohae joined, vendethiel joined, nightfrog joined, babydrop joined, chris2 joined, effbiai joined, ShoaibJahejo joined, Spot__ joined, ribasushi joined, shadowpaste joined, Khisanth joined, nchambers joined, zostay joined, musca joined, timeless joined, timotimo joined, vcv_ joined, saki joined, huf joined, DrForr joined, ilbelkyr joined, r3m joined, apejens joined, rblackwe joined, gfldex joined, PerlJam joined, mr-foobar joined, jonadab joined, baest joined, weber.freenode.net sets mode: +vv committable6 bisectable6, domm1 joined, perigrin_ joined, japhb joined, leego joined, xinming joined, cognominal joined, camelia joined, sjohnsen joined, alimon1 joined, ugjka joined, mitchum joined, [particle] joined, telex joined, matt_ joined, El_Che joined, Lucas_One joined, TimToady joined, bhm joined, Grrrr joined, mattp_ joined, SourceBaby joined, Undercover joined, dalek joined, Kaffe joined, ggherdov joined, parisba joined, b2gills joined, buggable joined, beatdown joined, Juerd joined, jferrero joined, amalia_ joined, kaare_ joined, emdashcomma joined, hahainternet joined, nowan joined, hobbs joined, mad__ joined, tyil joined, gregf_ joined, abraxxa joined, xfix joined, ponbiki joined, samcv joined, MasterDuke joined, stevieb joined, pochi joined, weber.freenode.net sets mode: +vvv camelia Undercover dalek, haircode joined, stux|RC joined, krokib joined, bartolin joined, araujo joined, ranguard joined, revere joined, xiaomiao joined, Sgeo__ joined, salparadise joined, imcsk8 joined, breinbaas joined, sftp joined, bpmedley joined, cyphase joined, avalenn joined, jast joined, cgfbee joined, avuserow joined, broquaint joined, kent\n joined, flaviusb joined, mniip joined, mspo joined, vike joined, titsuki joined, salva joined, sunnavy joined, ilmari joined, geraud joined, Upasaka joined, eiro joined, roguelazer joined, Praise joined, andrewalker joined, smash joined, vytas joined, chee joined, masak joined, Bucciarati joined, garu joined, lucs joined, jeek joined, petercommand joined, NeuralAnomaly joined, moritz joined, ingy joined, Celelibi joined, bitmap joined, Ulti joined, risou___ joined, silug joined, wtw joined, mst joined, sQuEE joined, jdv79 joined, go|dfish joined, Exodist joined, diakopter joined, Hotkeys joined, isacloud joined, [ptc] joined, dataangel joined, stmuk_ joined, tomaw joined, jsimonet joined, felher joined, w4and0er96 joined, rjbs joined, Alikzus joined, jnthn joined, mls joined, perlpilot joined, leedo joined, obra joined, erdic joined, mrsolo joined, mephinet joined, cosimo joined, Util joined, esh joined, stanley joined, shmibs joined, ccakes joined, tbrowder joined, eater joined, dudz joined, skaji joined, john51 joined, chansen_ joined, notbenh_ joined, rodarmor joined, olinkl joined, hoelzro joined, SmokeMachine____ joined, luis joined, adrusi joined, inokenty joined, kst joined, ttkp6 joined, sivoais joined, yoleaux joined, JimmyZ joined, jnap_ joined, dylanwh joined, robinsmidsrod joined, clkao joined, damnlie_ joined, TeamBlast joined, BinGOs joined, huggable joined, nebuchadnezzar joined, DarthGandalf joined, BuildTheRobots joined, kshannon joined, gensym joined, rmusial joined, integral joined, jervo joined, jantore joined, arnsholt joined, konobi joined, profan joined, d^_^b joined, literal joined, kipd joined, PotatoGim joined, Timbus joined, BooK joined, mithaldu_ joined, mindos joined, jercos joined, dustinm` joined, DANtheBEASTman joined, SHODAN joined, f3ew_ joined, sergot joined, sjn joined, zoosha_ joined, Possum joined, KotH joined, weber.freenode.net sets mode: +v yoleaux, freeze joined, dsp_ joined, yeltzooo joined, tony-o joined, hanekomu joined, revdiablo joined, ambs_ joined, tinita joined, TheDir joined, psch joined, gabiruh joined, kmwallio joined, riatre joined, jcallen joined, Peter_R joined, tailgate joined, protium joined, [Coke] joined, spider-mario joined, hcit joined, Gothmog_ joined, avar joined, notbenh joined, eythian joined, nine joined, pnu_ joined 10:55 rmusial left 10:57 pierre_ left 11:02 rmusial joined
scimon zef build outside of rakudobrew failed with the same message. Trying with --ll-exception now 11:02
So it looks like it's the load_module code which would match with the comments in the Rakudo Star about JVM not doing modules... 11:04
babydrop During last release there were JVM issues even on nqp level, so .... 11:05
Works fine on the much better supported MoarVM tho.
And as much as I want Perl 6 to succeed the JVM backend is not a "viable option" for any boss IMO. 11:07
scimon Sigh. 11:08
babydrop :)
scimon Mine are wedded to the JVM and think it's the best thing since sliced bread.
I foresee one of two annoying options.
babydrop We've a bit of a shortage of JVM volunteers. The ones we have can only do so much with their time. 11:09
scimon Well I can try and help. Might take me a while to get up to speed. 11:10
psch ++scimon 11:11
babydrop scimon: that would be awesome.
scimon Not sure how much help I'll BE. I'll start noodling around. 11:12
babydrop scimon: we also have #perl6-dev the couple of JVM folks who can give you hints are psch and bartolin
psch jnthn++ to most likely, as well as arnsholt++ 11:13
s/to /too/
11:13 xtreak left
psch tbh, maybe shifting towards at-least-installing-modules might be reasonable for me instead of prodding at jvminterop almost exclusively... :) 11:13
scimon Being able to install the module installer would be nice :) 11:14
right now I should do some dayjob as the sprints started. 11:16
(Joined perl6-dev going to lurk for a while) 11:27
babydrop Would be sweet if someone took a gander at failing JVM nqp tests :) They're kind of a pain in the ass, because we don't have a fudger in nqp and Rakudo's automated release system was built on the assumption that nqp tests always pass :) 11:28
psch guesses that's new tests again and we just never noticed that the jvm fails them :/ 11:29
babydrop at least some of them definitely yeah
scimon goes off to read nqp stuff. 11:30
psch scimon: did you find the edumentab slides? those are pretty great 11:31
scimon I have now.
dalek c: ce7c9f6 | gfldex++ | doc/Language/typesystem.pod6:
tell where default types are used
synopsebot6 Link: doc.perl6.org/language/typesystem
11:32 roman_ joined
dalek c: c7b14ae | gfldex++ | doc/Language/containers.pod6:
doc type constraints and their introspection for containers
11:43
synopsebot6 Link: doc.perl6.org/language/containers
ZzZombo sorry for nagging, but I could use some help 11:44
m: gist.github.com/ZzZombo/5caa51f9b2...556920a0d8
camelia rakudo-moar 843a6b: OUTPUT«Perl6::Metamodel::ClassHOW.new␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in block at <tmp> line 48␤ in method handler at <tmp> line 44␤ in submethod tweak at <tmp> line 15␤ in block <unit> at <…»
ZzZombo why does it look into Perl6::Metamodel::PackageHOW instead of Perl6::Metamodel::ClassHOW??
11:47 jonas1 left 11:48 jonas1 joined
psch m: package Attribute::Handling { sub do-stuff is export { my method foo { self!"bar"() } } }; import Attribute::Handling; do-stuff()("foo") 11:48
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤»
dalek c: 0bf8b18 | gfldex++ | doc/Language/variables.pod6:
be precise where the default type constraint actually comes from
11:51
synopsebot6 Link: doc.perl6.org/language/variables
11:51 pierre_ joined
psch ZzZombo: i'd try using an explicit invocant in the methods you're adding to the things you're putting your trait on 11:52
ZzZombo like method m(Class:)? 11:53
psch ZzZombo: i.e. 'method handler(Class $class:) {...}' instead of getting it via the package
ZzZombo but I do not get the type object, I get there an instance.
psch ZzZombo: i'd guess the lexical self gets bound a bit wrongly
not really sure about that though 11:54
ZzZombo Do you really mean the class here?
psch ZzZombo: you're doing ^add_method with a method that doesn't have an explicit invocant, instead you're using 'self'
ZzZombo: i suspect that might bind wrongly, which is why you get the error you do 11:55
ZzZombo: hence i suggest using an explicit invocant instead of 'self'
11:56 lukaramu joined
psch ZzZombo: it might be that doesn't help, too, it's just the only thing that immediately comes to mind 11:56
11:56 cibs left
ZzZombo didn't help indeed. 11:57
dalek c: b9a6dc8 | gfldex++ | doc/Language/containers.pod6:
fill in links I forgot
synopsebot6 Link: doc.perl6.org/language/containers
11:58 cibs joined 12:00 CIAvash left, CIAvash joined, CIAvash left
DrForr [Coke] Re: syntax highighting - Pretty damn close actually. I'm redoing the strings so I can properly address here-docs, there's an errant semicolon in array accesses that I need to address, and a few other minor corner cases. 12:00
12:00 CIAvash joined 12:01 CIAvash left 12:02 TEttinger left
dalek c: 3ffdc37 | gfldex++ | doc/Type/Variable.pod6:
doc trait of
12:05
synopsebot6 Link: doc.perl6.org/type/Variable
dalek c: 19169cc | gfldex++ | doc/Language/ (2 files):
link to trait of
12:08
12:08 roman_ left
dalek c: 78c92fc | seatek++ | doc/Language/traps.pod6:
behaviour of once in classes
12:12
synopsebot6 Link: doc.perl6.org/language/traps
12:14 travis-ci joined
travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'link to trait of' 12:14
travis-ci.org/perl6/doc/builds/180375810 github.com/perl6/doc/compare/3ffdc...169cc29699
12:14 travis-ci left 12:15 telex left, pmurias joined 12:16 telex joined 12:17 rurban left 12:18 rindolf left, canopus left 12:19 travis-ci joined
travis-ci Doc build errored. seatek 'behaviour of once in classes' 12:19
travis-ci.org/perl6/doc/builds/180376735 github.com/perl6/doc/compare/19169...c92fc76197
12:19 travis-ci left
seatek travis... he only comes by to complain 12:20
gfldex i found many complains of travis to be very helpful
not his fault that the ssl module for a heisentest
s/for/comes with/ 12:21
seatek oh it's still the ssl stuff. gotcha :)
12:24 itaipu joined
seatek he's still having trouble loading dependencies in another module... i have no idea what to do about it either 12:24
12:24 eythian left 12:26 canopus joined
seatek does travis (zef) recursively get dependencies or must you list the dependencies of your dependencies in your .json file? 12:29
12:34 kurahaupo_ joined 12:37 kurahaupo__ left
tadzik no, module installers handle them recursively 12:39
you only have to list the toplevel ones
seatek well one of my "upstreams" must be screwy then, but his tests passed... trying it again listing some of his dependencies too 12:40
12:40 kurahaupo_ left, kurahaupo joined 12:41 eythian joined
seatek yeah this time failed on HTTP::Server::Tiny 12:44
babydrop Oh... It's Dec 1st! Advent!!! weeeeeee 12:49
perl6advent.wordpress.com/
timotimo tadzik: how do you feel that one of your humble modules is used for the first advent calendar post? :) 12:51
DrForr Sh*t, right, need to write this weekend. 12:52
timotimo if you don't write it, there'll be no weekend? 12:53
[Coke]: i'm going to fix a html mess-up in your code
oh dang it, the original data's gone 12:54
DrForr Obviously you don't know my alter ego :) Have you by chance seen /Dr. Strange/? :)
timotimo i have
[Coke]: can you put the $data<this-stuff-here> back into your post? it got turned into html, then discarded ;(
i hope coke is here, otherwise i'll have to follow the code along manually and check it for myself 12:55
gfldex i wonder if we could link to perl6.org from the advent blog 12:56
12:57 wamba left
timotimo sounds like a good idea to have 13:01
El_Che nice words of brian d foy fir the perl6 community in his last update 13:02
babydrop .tw dfoy_perl 13:04
yoleaux Och, A cannae finde nae tweet
DrForr Yes, they are.
13:04 Khisanth left
babydrop :/ 13:04
Well, what are they? 13:05
.tw briandfoy_perl
yoleaux The Perl 6 Advent Calendar has started. perl6advent.wordpress.com Day 1: Consuming GitHub Webhooks. (@briandfoy_perl)
timotimo i can't json-parse the damn blob that i received with nc -l
El_Che www.kickstarter.com/projects/14228...ts/1751787 13:06
babydrop tl;dr
13:06 wamba joined
timotimo [Coke]: emergency :S 13:08
babydrop timotimo: what did you do? :) 13:11
psch edit an advent post with a different editor than the original author i'd guess 13:12
note, the guess is only the "different editor" part :)
babydrop I wonder if blog posts have some sort of diff history... I think pages do. 13:14
timotimo i did nothing
i'm just not able to infer the right things to put into the code there 13:15
13:15 firstdayonthejob left
ZzZombo m: class A {method !m{put 'Hi!'};method n{self!'m'()};A.new.n 13:16
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3{put 'Hi!'};method n{self!'m'()};A.new.n7⏏5<EOL>␤ expecting any of:␤ statement end␤ statement modifier␤ statement modifier loop␤»
ZzZombo m: class A {method !m{put 'Hi!'};method n{self!'m'()}};A.new.n
camelia rakudo-moar 843a6b: OUTPUT«Hi!␤»
13:18 Khisanth joined
ZzZombo m: class A {method !m{put 'Hi!'};BEGIN {my method n{self!'m'()};A.^add_method('n',&n) }};A.new.n 13:19
camelia rakudo-moar 843a6b: OUTPUT«Hi!␤»
13:19 firstdayonthejob joined 13:21 bjz joined 13:24 mr_ron joined
babydrop .seen kyclark 13:25
yoleaux I saw kyclark 30 Nov 2016 21:54Z in #perl6: <kyclark> Thanks.
babydrop m: say DateTime.new("2016-12-02T00:00:00Z") - DateTime.now.utc 13:26
camelia rakudo-moar 843a6b: OUTPUT«Cannot resolve caller Numeric(DateTime: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
babydrop :/
babydrop expected a Duration in return 13:27
m: say DateTime.now.utc
camelia rakudo-moar 843a6b: OUTPUT«2016-12-01T13:27:32.696996Z␤»
babydrop .tell kyclark reminder: your Advent post is meant to be published in about 10.5 hours since I write this message... 13:28
yoleaux babydrop: I'll pass your message to kyclark.
babydrop m: say (DateTime.new("2016-12-02T00:00:00Z").Instant - DateTime.now.utc.Instant)/60/60 13:29
camelia rakudo-moar 843a6b: OUTPUT«10.5151594994058␤»
babydrop woo, I was totally close \o/
ZzZombo m: package P{role R{submethod TWEAK{my method n{self!'m'()};self.^add_method('n',&n)}}};import P;class A does R {method !m{put 'Hi!'} }};A.new.n 13:30
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'R'␤at <tmp>:1␤------> 3ethod('n',&n)}}};import P;class A does R7⏏5 {method !m{put 'Hi!'} }};A.new.n␤»
ZzZombo m: package P{role R is export{submethod TWEAK{my method n{self!'m'()};self.^add_method('n',&n)}}};import P;class A does R {method !m{put 'Hi!'} }};A.new.n
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque; NQPMu)␤»
babydrop heh 13:31
ZzZombo bah
tadzik timotimo: Like a proud parent seeing his child leave home and be strong and independent :') 13:36
and kudos to ufobat++ for maintaining it and keeping it great :)
ZzZombo m: package P{multi sub trait_mod:<is> is export($target,:$wut){my method n{self!'m'()};$target.^add_method('n',&n)}};import P;class A is wut {method !m{put 'Hi!'} }};A.new.n
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$target' is not declared␤at <tmp>:1␤------> 3ge P{multi sub trait_mod:<is> is export(7⏏5$target,:$wut){my method n{self!'m'()};$␤»
ZzZombo m: package P{multi sub trait_mod:<is> is export(:$target,:$wut){my method n{self!'m'()};$target.^add_method('n',&n)}};import P;class A is wut {method !m{put 'Hi!'} }};A.new.n
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$target' is not declared␤at <tmp>:1␤------> 3e P{multi sub trait_mod:<is> is export(:7⏏5$target,:$wut){my method n{self!'m'()};$␤»
ZzZombo m: package P{multi sub trait_mod:<is>($target,:$wut) is export{my method n{self!'m'()};$target.^add_method('n',&n)}};import P;class A is wut {method !m{put 'Hi!'} }};A.new.n 13:38
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5===␤Trait 'is export' needs whitespace before block␤at <tmp>:1␤------> 3self!'m'()};$target.^add_method('n',&n)}7⏏5};import P;class A is wut {method !m{put␤Missing block (apparently claimed by 'is export')␤at <tmp>:1␤------…»
ZzZombo m: package P{multi sub trait_mod:<is>($target,:$wut) is export {my method n{self!'m'()};$target.^add_method('n',&n)}};import P;class A is wut {method !m{put 'Hi!'} }};A.new.n
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'A' cannot inherit from 'wut' because it is unknown.␤at <tmp>:1␤»
babydrop ZzZombo: FWIW, camelia can take /msg and there's also #zofbot 13:39
ZzZombo so this is the minimal example of the roadblock 13:42
m: package P{multi sub trait_mod:<is>(Method $target,:$wut) is export {my method n{self!'m'()};$target.package.^add_method('n',&n)}};import P;class A {method !m is wut {put 'Hi!'} };A.new.n
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method n at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo I suspect this to be a bug. 13:43
Hm... 13:44
actually I managed to strip it down even further 13:45
m: sub trait_mod:<is>(Method $target,:$wut) {my method n{self!'m'()};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method n at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: sub trait_mod:<is>(Method $target,:$wut) {my method n{put self.^name;self!'m'()};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n 13:46
camelia rakudo-moar 843a6b: OUTPUT«A␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method n at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: sub foo { my method :: { self!"bar"() } }; foo()("baz") # actual golf
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method <anon> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: sub trait_mod:<is>(Method $target,:$wut) {my method n{put self.HOW.^name;self!'m'()};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n
camelia rakudo-moar 843a6b: OUTPUT«Perl6::Metamodel::ClassHOW␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method n at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: my method m { self!"bar"() }; m(1) # or even this...
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo but your last example has no invocant, so that is probably legit. 13:48
13:48 AlexDaniel joined, AlexDaniel left
psch ZzZombo: non of your examples have an invocant either 13:48
ZzZombo: in the method signature at least
ZzZombo how so? they do have
psch "my method n"
"method !m " 13:49
no invocant marker in the signature
ZzZombo m(1) calls m with argument 1 and no invocant.
13:49 thib joined
psch m: class A { method m { say self } }; my &m = A.^lookup('m')[0]; m(A.new) 13:49
camelia rakudo-moar 843a6b: OUTPUT«A.new␤»
psch ZzZombo: you're wrong :)
ZzZombo my example have invocant of a newly created instance of type A
13:50 Actualeyes joined
ZzZombo WTF is that legal? 13:50
psch m: sub f(A:D $) { say "got an A!" }; class A { }; A.&f 13:51
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'A' in parameter declaration.␤at <tmp>:1␤------> 3sub f(A:D7⏏5 $) { say "got an A!" }; class A { }; A.␤ expecting any of:␤ pair value␤»
psch m: class A { }; sub f(A:D $) { say "got an A!" }; A.&f
camelia rakudo-moar 843a6b: OUTPUT«Parameter '<anon>' requires an instance of type A, but a type object was passed. Did you forget a .new?␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch m: class A { }; sub f(A:D $) { say "got an A!" }; A.new.&f
camelia rakudo-moar 843a6b: OUTPUT«got an A!␤»
psch works the other way around too vOv
(even if it took me a while :P )
ZzZombo I know about ^, and it actually makes sense and is consistent, but the m(1) form is dumb. 13:52
13:52 AlexDaniel joined
psch it makes the same amount of sense and is similarly consistent... 13:53
ZzZombo no. It's customary to put the invocant ina special place, like $foo.bar or $foo: bar. But in bar($foo) it gets lost as an argument, and can be confused with a sub call. 13:55
babydrop um.... It *is* a sub call 13:56
psch ah, appeal to tradition
well, if that's your argument vOv
ZzZombo ugh, should I take that as methods and subs are intechangable, so you can just use one as the other? 13:57
babydrop ZzZombo: they're both Routines, yes
psch they're not completely interchangeable though
babydrop ZzZombo: I wouldn't say "interchangable," but you can use subs as methods
ZzZombo why even make a distinct keyword then?
psch m: sub($: ) { } # invocant marker 13:58
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3sub($: )7⏏5 { } # invocant marker␤ expecting any of:␤ infix␤ in…»
babydrop ZzZombo: methods automatically place their invocant to self
psch m: sub ($a: ) { } # what i wanted to show :P
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can only use the : invocant marker in the signature for a method␤at <tmp>:1␤------> 3sub ($a: 7⏏5) { } # what i wanted to show :P␤»
babydrop I put the sub-as-method-call to good use in my presentation: tpm2016-2.zoffix.com/
psch m: sub { self };
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'self' used where no object is available␤at <tmp>:1␤------> 3sub {7⏏5 self };␤ expecting any of:␤ term␤»
babydrop </shameless-self-promotion>
13:58 aries_liuxueyang left
psch methods are sorta like subs but more OO-friendly 13:58
ZzZombo good try?
psch so, they give you a few OO things 13:59
like allowing an invocant marker and binding a lexical 'self'
also they add themselves to a method table on a object which is why we need the & in $obj.&sub
because that means "look for the code object lexically, not in the method cache" 14:00
in a way *handwave*
14:00 aries_liuxueyang joined
babydrop *handwave*? Like, these aren't the droids you're looking for handwave? :) 14:00
psch no, like "i'm sure that's not all the reason and probably not perfectly detailed either" :S 14:01
babydrop :D
ZzZombo m: my method m($a?,$b?) { dd self;self!"bar"() }; m(1)
camelia rakudo-moar 843a6b: OUTPUT«1␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: my method m($a?,$b?) { dd self;self!"bar"() }; m(1,2,3)
camelia rakudo-moar 843a6b: OUTPUT«1␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: my method m($a?,$b?) { dd (self,$x,$y);self!"bar"() }; 1.m(1,2,3) 14:02
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3my method m($a?,$b?) { dd (self,7⏏5$x,$y);self!"bar"() }; 1.m(1,2,3)␤»
ZzZombo m: my method m($a?,$b?) { dd (self,$a,$b);self!"bar"() }; 1.m(1,2,3)
camelia rakudo-moar 843a6b: OUTPUT«No such method 'm' for invocant of type 'Int'␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: my method m($a?,$b?) { dd (self,$a,$b);self!"bar"() }; 1.&m(1,2,3)
camelia rakudo-moar 843a6b: OUTPUT«Too many positionals passed; expected 1 to 3 arguments but got 4␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
ZzZombo m: my method m($a?,$b?) { dd (self,$a,$b);self!"bar"() }; 1.&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«(1, 1, 2)␤No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
babydrop giggles
ZzZombo anyway, let's go back to the original topic. 14:03
what's wrong with that code?
babydrop .tell [Coke] advent post problem: twitter.com/mcreenan/status/804320288921907200
yoleaux babydrop: I'll pass your message to [Coke].
psch probably something about what's bound to the invocant and where it looks for private methods
babydrop I guess that's what timotimo was trying to fix... 14:04
ZzZombo but the invocant is the right object, the reason must be lying deeper. 14:05
babydrop ZzZombo: a wild guess would be the reason is how private methods are looked up. 14:06
I mean, you can't have multi private methods, for example either.
And normally, you'd have to specify what class the private method is from, unless it's from current class and there ain't a current class in that case
ZzZombo what do you mean no current class? 14:07
babydrop ZzZombo: well, that method is not defined inside any class {}... It's "detached method" or wahtever we call it
14:07 cdg joined
ZzZombo I add it via ^add_method(). 14:08
It's inside the class since then.
psch ZzZombo: so, at runtime
ZzZombo: which proobably makes stuff weird too vOv
babydrop ZzZombo: but normally you just give add_method a code block, not a detached method, don't you?
14:08 wamba left
ZzZombo Not really at runtime. It is done before the class is composed initially. 14:08
babydrop m: my method m($a?,$b?) { dd (self,$a,$b);self!bar }; (1 but role { method !bar {say "woot"} ).&m(1,2) 14:09
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to bar must be fully qualified with the package containing the method␤at <tmp>:1␤------> 3od m($a?,$b?) { dd (self,$a,$b);self!bar7⏏5 }; (1 but role { method !bar {say "woot␤ …»
dalek c: 65d800b | gfldex++ | doc/Type/Nil.pod6:
fix markup
synopsebot6 Link: doc.perl6.org/type/Nil
babydrop m: my method m($a?,$b?) { dd (self,$a,$b);self!bar }; 1.&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to bar must be fully qualified with the package containing the method␤at <tmp>:1␤------> 3od m($a?,$b?) { dd (self,$a,$b);self!bar7⏏5 }; 1.&m(1,2)␤ expecting any of:␤ …»
babydrop ^ you even get a sane error if you don't use the quotes thing
m: my method m($a?,$b?) { dd (self,$a,$b); self!Foo::bar }; (1 but role Foo { method !bar {say "woot"} ).&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤»
ZzZombo But that method is the detached one here.
babydrop crap error (no location)
ZzZombo m: sub trait_mod:<is>(Method $target,:$wut) {my method n{put self.HOW.^name;self!m()};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n 14:11
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to m must be fully qualified with the package containing the method␤at <tmp>:1␤------> 3{my method n{put self.HOW.^name;self!m()7⏏5};$target.package.^add_method('n',&n)};c␤»
ZzZombo m: sub trait_mod:<is>(Method $target,:$wut) {my method n{put self.HOW.^name;self!A::m()};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n 14:12
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol A␤»
timotimo babydrop: i wonder if we should put an editor's note or something into the article
babydrop timotimo: why not just fix the issue?
m: class Foo { trusts GLOBAL; method !bar { say "w00t" } }; my method m($a?,$b?) { self!Foo::bar }; (Foo.new).&m(1,2) 14:13
camelia rakudo-moar 843a6b: OUTPUT«w00t␤»
14:13 rindolf joined
timotimo gist.github.com/timo/4a13dab83d075...355e4fa80f - please go ahead and figure out which exact keys coke was using 14:13
babydrop timotimo: well, what's the issue exactly? The tweet said something about $data<> parsing as HTML but I see it fine :/ 14:15
oh the HTML editor already shows mangled data 14:16
timotimo yeah, it's no longer there to see what it was meant to be 14:17
otherwise i would have Just Done It
babydrop yeah I can fix it 14:18
ZzZombo m: sub trait_mod:<is>(Method $target,:$wut) {my method n{put self.HOW.^name;self.^find_private_method('m')(self)};$target.package.^add_method('n',&n)};class A {method !m is wut {put 'Hi!'} };A.new.n 14:19
camelia rakudo-moar 843a6b: OUTPUT«Perl6::Metamodel::ClassHOW␤Hi!␤»
ZzZombo screw this, gonna hack into
14:19 lizmat_ is now known as lizmat
[Coke] TimToady: it's not too late to make that bracket style illegal, is it? 14:20
yoleaux 14:03Z <babydrop> [Coke]: advent post problem: twitter.com/mcreenan/status/804320288921907200
DrForr [Coke]: Howdy.
babydrop [Coke]: oh... I guess you can fix it now. I did half of it, but now I think whether they're meant to be all the same :) 14:21
DrForr Looks like you're getting dogpiled there :) Sorry.
babydrop bails out of the editor
[Coke] reminds people that camelia works in private.
ZzZombo So, what's the resolution? Was it even intended to have mirrored to self."method"() call notation as self."!method"()?
whoops, meant self!"method"(). 14:22
14:22 kyclark joined
babydrop kyclark: ! 14:22
You have a robo-message
[Coke] timotimo: ... why are you breaking things? :| 14:24
timotimo i did nothing at all, [Coke]
[Coke] skips backscroll.
what's the problem
?
babydrop [Coke]: the $data<foo><bar> gets rendered as $data because <foo> and <bar> get parsed as HTML tags 14:25
ZzZombo If not, it probably should be noted in the docs.
babydrop [Coke]: you need to write them as $data&lt;foo&gt;&lt;bar&gt;
timotimo not only did it get rendered as just $data, but the stuff after $data also disappeared from the HTML source code in the editor. 14:26
[Coke] (this, btw, is why I posted it days earlier to get eyes on. :)
fixing..
timotimo sorry :( :( :( 14:27
[Coke] A more recent version of this post exists, restore? that's not good.
14:27 dj_goku_ left
[Coke] has anyone been in editing? not sure what I'm getting if I restore here. 14:27
14:27 rindolf left, kurahaupo__ joined
babydrop [Coke]: I was, but you can toss it. 14:27
[Coke]: I was trying to fix it 'cause I didn't know you'd come around so fast :) 14:28
timotimo i opened it for editing, but i tossed whatever i did by using the "back" button and clicking "yeah whatever"
14:30 amalia_ left
[Coke] should be better now. 14:31
14:31 matiaslina joined
timotimo sorry for not looking earlier 14:32
babydrop Great
timotimo i should make a point of checking other people's posts
14:32 amalia_ joined
[Coke] timotimo: not your fault, don't worry about it. 14:32
I missed it too. (which is annoying, because I thought I proofed it too!) 14:33
timotimo hm
[Coke] s/too/myself/
babydrop [Coke]: what time are the posts supposed to get published at midnight UTC? 14:34
ZzZombo Why does
class A{method m{put 'Yea'}};my $a=A.new;$a.'m'()
works, but
class A{method m{put 'Yea'}};my $a=A.new;'m'($a)
doesn't?
[Coke] (thankfully, I had 95% of that posted saved locally as a .md file. :)
ZzZombo: you're trying to call a string as a sub. Not sure what magic you're expecting there. 14:35
babydrop ZzZombo: the former uses the method infix op, the latter uses CALL-ME on a Str object
[Coke] I mean, I know the end result you're expecting, but there's no way to infer that on a string.
timotimo ZzZombo: you want ::('m')($a) for the lookup
14:35 wamba joined
babydrop [Coke]: .. meaning, you successfully inferred it? :) 14:35
[Coke] ROTFLS as "skip backscroll" was about 1 line before backscrool. 14:36
ZzZombo thanks, that clears things up.
[Coke] babydrop: so that's ONE thing I can do that the perl 6 compiler can't. :)
babydrop :)
14:37 rindolf joined
ZzZombo <ZzZombo> Was it even intended to have mirrored to self."method"() call notation as self!"method"()? 14:37
babydrop There's a ."!methodname"() call in core... so *shrug*
(note the ! being inside the quotes) 14:38
ZzZombo like a."!x"()
?
babydrop yeah
ZzZombo hmm
babydrop ZzZombo: like here: github.com/rakudo/rakudo/blob/nom/....nqp#L2182
I don't know if that's calling a private method tho :) 14:39
jnthn self.'!foo'() style things are because NQP doesn't really have private methods, so we use that as a convention :)
babydrop Ahhh
jnthn I'd expect self!"foo"() to be the appropraiate name-indirect syntax in Perl 6
ZzZombo yeah, I was surprised because earlier I it didn't worked. 14:40
work*
jnthn m: my $a; $a!"foo"() 14:41
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in block <unit> at <tmp> line 1␤␤»
jnthn Seems it parses fine
m: class A { method !x() { say 42 }; method y() { self!"x"() } }; A.y 14:42
camelia rakudo-moar 843a6b: OUTPUT«42␤»
jnthn It even works fine :)
babydrop The way we came onto this is using it in detached methods
jnthn Hmm 14:43
ZzZombo m: my method m { self!"bar"() }; m(1)
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
dalek c: 3813c8e | gfldex++ | doc/Type/Signature.pod6:
show how to slip a complex Hash into named arguments
synopsebot6 Link: doc.perl6.org/type/Signature
jnthn You'd need to find a way to qualify it
babydrop m: class Foo { trusts GLOBAL; method !bar { say "w00t" }}; my method m($a?,$b?) { self!Foo::bar }; (Foo.new).&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«w00t␤»
jnthn self!foo really means self![compiler inserts current package here]::foo 14:44
babydrop And I guess ZzZombo's original expectation was that self!"bar"() would work
m: class Foo { trusts GLOBAL; method !bar { say "w00t" }}; my method m($a?,$b?) { self!bar }; (Foo.new).&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to bar must be fully qualified with the package containing the method␤at <tmp>:1␤------> 0300t" }}; my method m($a?,$b?) { self!bar7⏏5 }; (Foo.new).&m(1,2)␤ expecting any o…»
babydrop jnthn: what about self!"foo"()?
ZzZombo Look at gist.github.com/ZzZombo/5caa51f9b2...56920a0d8, I get the name from outside as a string.
jnthn If you're not lexically inside the package it'd have to be qualified.
babydrop m: class Foo { trusts GLOBAL; method !bar { say "w00t" }}; my method m($a?,$b?) { self!"bar"() }; (Foo.new).&m(1,2)
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method m at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
babydrop because the quoted version has that ^ weird error, while unquoted version gives a sane error
m: method { self!"bar"() }(42) 14:45
camelia rakudo-moar 843a6b: OUTPUT«No such method 'find_private_method' for invocant of type 'Perl6::Metamodel::PackageHOW'␤ in method <anon> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
babydrop m: method { self!bar() }(42)
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Private method call to bar must be fully qualified with the package containing the method␤at <tmp>:1␤------> 3method { self!bar()7⏏5 }(42)␤»
babydrop shorter golf
jnthn Yeah, we could catch and complain at compile time the quoted case too 14:46
Unless the intent was to make self!"A::$foo"() style things work
But we don't try to do anything like that today 14:47
And I guess maybe shouldn't 14:48
Making self!A::("foo")() work would probably be the consistent way 14:49
14:49 bazzaar joined
jnthn Calling privates from the outside is probably best done through the MOP though 14:50
Which is the "official" mechanism to defeat the compiler's enforcement of privacy :)
ZzZombo I'd be fine just if somebody could tell me why somehow it ends up looking for the method it Perl6::Metamodel::PackageHOW instead of ClassHOW, in my case, as it's clearly what the object is inside the handler method.
14:51 wisti joined
ZzZombo I already ended up using ^find_private_method, so I don't really pursue the issue. 14:51
s/it/in/
jnthn ZzZombo: Oh, that's easy: it just takes the current pakcage you're in to qualify the private method call 14:52
And if you write your method at the top level, you're in the GLOBAL package
It's a static, not a dynamic, decision, since private methods are not virtual 14:53
By definition :)
That's the reason why stuff like:
ZzZombo A better error handling should suffice then. I've spent the whole day banging my head against it.
jnthn m: class C { method !xx() { }; method y() { self!x } }
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤No such private method 'x' for invocant of type 'C'␤at <tmp>:1␤------> 3C { method !xx() { }; method y() { self!7⏏5x } }␤»
jnthn Can tell you that private method x doesn't exist
Yes, agree the error isn't good
Please do file an RT about it. We should be able to catch it at compile time, even. 14:54
14:54 seatek left
ZzZombo Will do. 14:54
babydrop [Coke]: oh, so what about the UTC and stuff?
[Coke]: the reason I ask is the next post we have scheduled is the one for Dec 5 and I don't know if kyclark remembers about their post...
14:55 rindolf left 14:57 setty1 left
kyclark Yes, sorry, I do. I’m working on it now. 14:57
yoleaux 13:28Z <babydrop> kyclark: reminder: your Advent post is meant to be published in about 10.5 hours since I write this message...
babydrop \o/
kyclark Who do I get it to?
^whom
To whom do I get it?
babydrop kyclark: do you have a wordpress account? I can send you an invite and you'd publish it using the editor
14:58 khw joined
babydrop /msg me your email address and I'll send you an invite 14:58
ZzZombo What is the name of the !"m" call syntax? So I could be more technical in the mail.
14:58 canopus left
jnthn Private method call syntax 14:59
[Coke] babydrop: I don't think we care what time the article drops.
jnthn Well, indirect private method call syntax with the quotes
[Coke] "it's Friday somewhere" is probably fine.
15:00 canopus joined
babydrop kyclark: "Invitation successfully sent" 15:00
[Coke]: oh, OK.
kyclark Got it. Thanks for having me! 15:01
dalek c: 23da782 | gfldex++ | doc/Language/classtut.pod6:
fix example
synopsebot6 Link: doc.perl6.org/language/classtut
gfldex thowe++
[Coke] hah! already got a comment about how my cheating on getting the branch name is cheating. :) 15:02
babydrop :)
15:03 rindolf joined
ZzZombo Done. 15:05
babydrop So what's thunking?
I understand it conceptually, but... what's a 1-sentence explanation?
ZzZombo RT #130228 15:06
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130228
15:06 dj_goku joined
jnthn babydrop: It's where the compiler takes an expression and turns it into a code object automatically 15:07
babydrop Thanks
jnthn has $.a = rand; # the rand here is thunked, so that it can be run every time we initialize an object
15:11 pierre_ left, setty1 joined, dj_goku left 15:14 pierre_ joined 15:16 brillenfux left
[Coke] the doc build modifies html/css/style.css 15:17
(after installing the SASS modules that the build warned were needed)
guessing this isn't happening in prod, since it's adding the external-link icon that I see everywhere locally but not on the site. 15:18
babydrop :/ 15:19
IIRC it'd modify it only if you start the dev web app
Well, "modify"... It merelly converts asset/sass/style.sass to that file
[Coke] yes. but it shouldn't be doing that. 15:20
(and, ideally, local and the dev site should be using the same toolset, but that's a different issue.)
babydrop Right, the build should generate that file instead of it being stored in the repo 15:21
[Coke] modify - it's a file that's checked in. it's changed. that's modifying. no scare quotes needed. :)
we're on teh same page, ok. :)
dalek c: c812821 | coke++ | / (3 files):
fix typos, learn code snippet
15:25
[Coke] docs. community page. bare minimum, larry's quote about the rewrite, and a mention of this IRC channel. what else?
babydrop m: subset Foo where { say "checkin..."; $_ }; my Foo $x = 0; 15:26
camelia rakudo-moar 843a6b: OUTPUT«checkin...␤Type check failed in assignment to $x; expected Foo but got Int (0)␤ in block <unit> at <tmp> line 1␤␤»
babydrop m: subset Foo where { say "checkin..."; $_ }; sub (Foo $x){}(0)
camelia rakudo-moar 843a6b: OUTPUT«checkin...␤checkin...␤Constraint type check failed for parameter '$x'␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
15:26 bazzaar left
babydrop So.. why does it run the subset twice? 15:26
Or more importantly, can I avoid or compensate for it somehow?
[Coke] sounds like the noisy PROXY issue. 15:27
15:29 itaipu left 15:30 Tonik joined 15:31 pierre_ left
AlexDaniel m: subset Foo where { say "checkin..."; $_ }; sub (Foo $x){}(‘foo’) 15:32
camelia rakudo-moar 843a6b: OUTPUT«checkin...␤»
AlexDaniel m: subset Foo where { say "checkin..."; $_ }; sub (Foo $x){}(‘’)
camelia rakudo-moar 843a6b: OUTPUT«checkin...␤checkin...␤Constraint type check failed for parameter '$x'␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
15:32 pierre_ joined
jnthn It does it twice because the past-path binder doesn't know how to produce decent error messages, so upon a bind failure it just re-runs the bind through the slow-path one that does. 15:33
babydrop Oh
There goes my carreer of absusing subsets then
jnthn Uh...yes, don't do that, it'll end badly :) 15:35
babydrop haha
jnthn We're potentially even free to run them at compile time if we've got the value to hand :)
AlexDaniel so… one advent post less? :o 15:36
babydrop AlexDaniel: which one? 15:37
15:37 pierre_ left
AlexDaniel the one about abusing subsets :P 15:37
babydrop AlexDaniel: I actually was about to nix the core hacking one, but then I remembered about you mentioning it
And I kinda still wanna nix it :)
AlexDaniel :(
timotimo u nix it, bruh? 15:38
babydrop AlexDaniel: why, does yours depend on mine heavily? 15:39
AlexDaniel I thought it was a great topic for the last day… like a call to action
babydrop Hm. OK. I'll write it 15:40
m: my %seen; subset Foo where { %seen{$*THREAD.id ~ .VAR.WHERE}++ ?? (%seen{$*THREAD.id ~ .VAR.WHERE} = 0) !! say "checking... $_"; $_ }; for ^3 { .say; sub (Foo $x){}(42); try {sub (Foo $x){}(0)} }
camelia rakudo-moar 843a6b: OUTPUT«0␤checking... 42␤checking... 0␤1␤checking... 0␤2␤checking... 42␤checking... 0␤»
babydrop Al..most
jnthn That...is not a threadsafe way to use a hash :) 15:43
babydrop oh, right :D 15:44
jnthn (Emit them into a Supplier, and then start react { ... } or whatever to watch and analyze them, maybe...) 15:45
15:46 wamba left 15:47 kurahaupo left 15:48 rurban joined
timotimo tadzik: how do you feel about adding an "unmarshal-multiple" to JSON::Unmarshal that handles turning a list of hashes into a list of constructed objects? 15:48
or maybe accepting Positional[MyObjectType] as $obj and using the .of to make it work? and then also support associative even? 15:49
ZzZombo m: sub x(Rat:D subset :: where *>13 $x: Rat:D $y){ put $x+$y};x(1,2); 15:51
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub x(Rat:D7⏏5 subset :: where *>13 $x: Rat:D $y){ put␤ expecting any of:␤ constraint␤ formal parameter␤»
ZzZombo why don't anon subsets work here? 15:52
timotimo because you can't declare a subset in a signature 15:53
babydrop ZzZombo: omit the `subset :: ` bit
timotimo why don't you use the normal syntax for that?
babydrop Well, the subset :: is just part of the problem I see 15:54
15:54 skids joined
timotimo yeah, it's also in the wrong place 15:54
the "where" comes after the name of the parameter
ZzZombo It's from gist.github.com/ZzZombo/5caa51f9b2...t-pl6-L38. I wanted to get rid of that named subset declaration.
[Coke] Day 1. 8 slots left in the advent calendar; first empty slot in 8 days.
also, zoffix is overbooked with 4 slots. give the guy a break. 15:55
babydrop plugs in perl6.party/post/Perl-6-Types--Made-for-Humans
ZzZombo I have a suspiction it won't work well when I start actually using the code in multiple classes.
moritz babydrop++ 15:56
is the advent post for tomorrow lined up already?
timotimo ZzZombo: i have a different suggestion for you
ZzZombo yes?
babydrop moritz: kyclark confirmed it will be :)
timotimo ZzZombo: you should be able to just declare my \TheClass := $class and use that as the constraint
no subsets needed at all
moritz babydrop: thanks 15:57
kyclark Writing it as we speak.
timotimo also, "where *.isa($class)" is better written as just "where $class", as long as $class is a proper type object and not accidentally an instance
moritz kyclark++
kyclark: btw I' noticed that your book page doesn't really tell the reader what the book is about 15:58
15:58 abraxxa left
moritz kyclark: it talks about bioinformatics and metagenomics, but not about all the "IT stuff" that the book covers 15:58
[Coke] Anyone have an -idea- for an advent post that they are not going to get around to writing?
gregf_ *bookmarks that link*
ZzZombo but if accidentally the type will get passed in as the invocant, then it will pass your constraint, yes?
that construction is a runtime version of $class:D. 15:59
yours is just $class.
kyclark moritz: I guess I’m still trying to frame it. Would take any suggestions. 16:00
moritz [Coke]: I don't think we've ad advent post about CSV parsing (using that excellent module), have we? 16:01
*had
kyclark: I'll think about it, and let you know
16:01 wamba joined
moritz [Coke]: otherwise I'm low on ideas myself 16:02
[Coke] I mean, I feel like if it zoffix is willing to do 4, I should at least be willing to do two. :)
s/it//
16:03 cygx joined 16:04 firstdayonthejob left
cygx I can probably take a calender slot, but I'll have to writ some code first 16:05
something along the lines of "Targetting MoarVM: The Wrong Way"
cf github.com/cygx/moar-assembler/blo.../hello.asm
[Coke] last open slot is the 21st, plenty of time. :) 16:06
timotimo ZzZombo: won't ThatClass:D work?
also, if you want the invocant thing, just write ThatClass:D:
babydrop huggable: advent
huggable babydrop, github.com/perl6/mu/blob/master/mi...6/schedule
babydrop cygx: ^ book a spot :)
16:07 dj_goku joined, dj_goku left, dj_goku joined
ZzZombo timotimo: but the class comes from a variable $class. You can't write $class nor $class:D in signature. 16:07
m: my $a=Int;sub x($a:D $b?){dd $a,$b};x(4);
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'D' in parameter declaration.␤at <tmp>:1␤------> 3my $a=Int;sub x($a:D7⏏5 $b?){dd $a,$b};x(4);␤»
timotimo that's why i told you to have my \TheClass := $class 16:08
did you read what i wrote? :(
ZzZombo I did, did you read my response?
timotimo yeah, your worry was that it'd have invocant problems 16:09
babydrop [Coke]: are you sure Zoffix is even human? :)
ZzZombo m: my $c=Int;my \c:=$c:D
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$c:D' is not declared␤at <tmp>:1␤------> 3my $c=Int;my \c:=7⏏5$c:D␤»
timotimo you put a : at the very end to get the invocant
m: my \C := Int; my C:D $foo = 10
camelia rakudo-moar 843a6b: OUTPUT«===SORRY!===␤No compile-time value for C␤»
timotimo okay, so it doesn't actually work. that's good to know.
babydrop :)
dalek : 9067b12 | (Will Coleda)++ | misc/perl6advent-2016/schedule:
claim a day
16:10
: 5605f5b | cygx++ | misc/perl6advent-2016/schedule:
take a slot
babydrop \o/
cygx let's take something right in the middle 16:11
if it doesn't pan out, I can probably come up with something else
timotimo ZzZombo: you never tried the \TheClass syntax, that's why i assumed you didn't read what i wrote 16:12
16:12 dj_goku left
tadzik timotimo: the latter was my plan initially iirc, but typed arrays weren't up to the task then 16:17
(or something)
babydrop m: constant C := Int; my C:D $foo = 10; 16:18
camelia ( no output )
babydrop m: constant C := Int; my C:D $foo = "meows";
camelia rakudo-moar 843a6b: OUTPUT«Type check failed in assignment to $foo; expected Int:D but got Str ("meows")␤ in block <unit> at <tmp> line 1␤␤»
timotimo tadzik: so, will you do it now? we have someone on stackoverflow who could use this feature :)
tadzik oh :)
might, might
perhaps tomorrow, I just got back from work and flying to London in a few hours
16:18 firstdayonthejob joined
timotimo oh, i see 16:19
plane flight isn't the right opportunity to do it? ;) 16:20
you're free to do whatever you like, of course
oh, thing is: do we want to actually create a list of the exact type given? including the type constraint?
16:20 telex left
timotimo or just "ah they passed in some Positional, maybe the punned role even, we'll just build a list" 16:20
because i could implement it if i knew how you'd like it to behave, exactly 16:21
tadzik I'm flying ryanair, if there'll be enough room to open my backpack... 16:22
timotimo heh heh
tadzik I think a typed list would be more in order
timotimo okay. i wish you a good flight in any case!
typed lists of course have the disadvantage that they won't allow you to append more stuff after creating the initial thing 16:23
kyclark I’m having a bit of trouble pasting in a block of code into the Wordpress site for my Advent entry. Any suggestions?
tadzik flight choice is the unfortunate combo of $gf wanting to fly cheaply but refusing to be gifted a ticket %)
timotimo give up on life. wordpress is the most terrible thing in existence :(
babydrop kyclark: my plan is to write it in markdown, paste it into a github gist, and copy the generated markup and use that in wordpress
tadzik wha, typed lists are immutable? 16:24
timotimo no
tadzik kyclark: last I tried wordpress had a wysiwig editor an an html editor, with the latter working mostly ok
timotimo you can't append *other* stuff ;)
tadzik oh
timotimo some people just like to end all their lists with a Flourish.new()
tadzik I guess that's fair, if that's how you specced your class to unmarshal into :)
timotimo inside classes, you of course have to rely on the .of of the attribute if it's listy to figure out what class to unmarshal into 16:25
tadzik yep
timotimo so i'll come up with some test cases that'll rely on unmarshal($jsondata, Positional[MyClass]) or something 16:26
and maybe even try to implement it
tadzik awesome :)
kyclark gist -> WP worked. Thanks, takzik! 16:32
16:34 domidumont left
tadzik yw :) 16:45
glad it still works
16:46 kent\n left
dalek c: d82871b | coke++ | doc/Language/ (2 files):
Add a community page.

Resolves #1001, minimally
16:47
16:48 kent\n joined 16:50 telex joined
babydrop What do we call the multi resolution criteria?.... "specificity"? 16:53
Int is more specific than Any?
timotimo narrowness 16:54
babydrop Ah. Thanks :D
timotimo sure
tadzik: i'm failing to actually make the thing work 16:56
i seem to be calling _unmarshal($_, $obj.of) for @(data), which gives me the little hashes for each entry in the json list, but it's not creating Dog, it's creating Any
but dd $obj.of gives me Dog 16:57
16:57 wamba left 16:58 scimon left
timotimo ah, i see my mistake 16:58
AlexDaniel [Coke]: wow, that's a whole new level of minimalism :)
[Coke]++
16:59 wamba joined
babydrop :D 16:59
tadzik timotimo: glad to be a duck :)
17:01 ZehCnaS34 joined
timotimo hah 17:02
my stuff is finished
got time to review it quickly?
babydrop AlexDaniel: what was the thing with help in your bots that involved subset specificity? 17:03
Imma try and solve it
bisectable6: source 17:04
bisectable6 babydrop, github.com/perl6/whateverable
AlexDaniel babydrop: github.com/perl6/whateverable/blob...ble.p6#L32 17:05
jnthn AlexDaniel: Guess you noticed I put a fix in for the zeroed work pass target thingy yesterday? Please let me know if whateverables still continue to experience it after upgrading to latest Rakudo, but since it was thanks to a bug in the guts behind Proc::Async I'm hopeful it's nailed.
AlexDaniel jnthn: yeah, we did notice. No, the problem did not vanish completely 17:06
but the error about zeroed work pass target is gone, I think
17:06 aries_liuxueyang left
AlexDaniel unicodable6: { say 42; False } 17:06
jnthn Yes, that's the one I was talking about. :) 17:07
lizmat jnthn AlexDaniel: same for HARNESS_TYPE=6 make spectest
unicodable6 AlexDaniel, Oops, something went wrong!
AlexDaniel unicodable6: { say 42; False }
17:07 unicodable6 left
AlexDaniel MasterDuke: do you have any additional info? 17:07
17:07 aries_liuxueyang joined
jnthn lizmat: Yeah, I suspect the next issue is grammar/regex compilation related. 17:08
babydrop m: gist.github.com/zoffixznet/d41b3aa...d2b85db481
camelia rakudo-moar 843a6b: OUTPUT«Just foos...␤»
jnthn Will have to look into that
babydrop AlexDaniel: ^ the goal is for that to print "Meow meow!" right? :)
timotimo seems like tadzik already left for the plane
babydrop as in that method needs to be narroer
17:08 dj_goku joined, dj_goku left, dj_goku joined
AlexDaniel babydrop: yes 17:08
tadzik no, I'm here
babydrop AlexDaniel: Challange Accepted! 17:09
tadzik I didn't notice your message tho :)
babydrop :D
tadzik will review on the planeport or so tho :) gotta pack and things
17:09 ZehCnaS34 left
babydrop Yikes... my subset article is already 2,500 words :O 17:10
gfldex maybe you should publish a subset of your subset article?
babydrop gfldex++ 17:11
[Coke] gist.github.com/coke/2801691cb9578...e2b5272f76 - any idea which of these I need to run Inline::Python? 17:14
17:14 dj_goku left
timotimo none of those seem correct 17:14
could it be the python package already comes with Python.h, but it's in some place that I::P isn't looking at? 17:15
babydrop m: gist.github.com/zoffixznet/53dcd74...848417b557 17:16
camelia rakudo-moar 843a6b: OUTPUT«Meow meow!␤»
[Coke] timotimo: ooh, that's a clue.
babydrop AlexDaniel: hackety hack :D Challenge won :)
oh 17:18
m: gist.github.com/zoffixznet/ad2bfbd...addc4055da
camelia rakudo-moar 843a6b: OUTPUT«Meow meow!␤»
babydrop I thought I tried that and failed, but turns out that works too
Now a bonus challenge: make them all effectively type contraint for Str :) 17:19
17:19 pyrimidine joined
[Coke] DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib GIT_PROTOCOL=https panda install Inline::Python still not right. 17:19
babydrop hmmm 17:21
[Coke] ... ah. another clue, one sec. 17:22
babydrop m: gist.github.com/zoffixznet/a878c68...44a7e82794
camelia rakudo-moar 843a6b: OUTPUT«Meow meow!␤»
babydrop Bonus challenge won :)
[Coke] I needed this: sudo cp /opt/local/bin/python2.7-config /opt/local/bin/python2-config 17:23
so Inline::Python might need to look for a few more -config scripts.
babydrop AlexDaniel: c'mon man. I expected applause and to be carried around, while the crowd cheered. 17:26
or be poured champagne onto?
No?
Fine!
:)
AlexDaniel babydrop: well, I don't see a PR :P
babydrop lol 17:27
[Coke] opens a ticket.
ugexe there are sober children in Africa and you want to just pour champagne on people? 17:28
17:29 domidumont joined 17:31 dakkar left 17:33 davercc joined, Actualeyes left 17:36 labster joined
[Coke] AMAZING how much faster inline::python is than shelling out. :| 17:41
17:42 davercc left, domidumont left
babydrop
.oO( or is it... amazing how much slower shelling out is than... )
17:43
17:43 cibs left
kyclark By default, the variables used in a for loop, e.g., “for <foo bar> -> $s” are immutable, right? The $s, that is. If so, where is this covered? 17:44
babydrop kyclark: it's just a normal block
geekosaur -> makes it read-only, it specifies a one-way relationship. iirc you can use <-> for 2-way
babydrop m: -> $s { $s = 42 }($)
camelia rakudo-moar 843a6b: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at <tmp> line 1␤␤»
babydrop m: <-> $s { $s = 42 }($) 17:45
camelia ( no output )
babydrop m: -> $s is rw { $s = 42 }($)
camelia ( no output )
geekosaur (which requires the things you send into the block be lvalues though. I don't think you can use a shorthand for "is copy")
17:45 cibs joined
babydrop kyclark: so it'd be covered whereever blocks/subs are covered. 17:46
[Coke] adds X<|Environment Variables> to doc/Programs/00-running.pod6, but it still doesn't show up in search. hurm.
geekosaur if you need that, you need to use an anonymous sub with `is copy' parameters instead
babydrop you can do that on a block too
m: for <foo bar> -> $s is copy { $s = 42; say "zomfg! what has he done!" }
camelia rakudo-moar 843a6b: OUTPUT«zomfg! what has he done!␤zomfg! what has he done!␤»
17:48 girafe joined, pyrimidine left
babydrop finishes first draft of subsets article 17:48
17:49 pyrimidine joined
babydrop 3000 words. ~3 hours of writing. 17:49
babydrop feels less bad about booking 4 spots now :D
babydrop & 17:50
17:50 wisti left 17:53 rurban left, pyrimidine left
babydrop kyclark: BTW, that of course means you can make implic signatures and do unpacking and all kinds of crazy stuff: 17:54
m: for <a b c d e f> { dd [$^a, $^b, $^c] }
camelia rakudo-moar 843a6b: OUTPUT«["a", "b", "c"]␤["d", "e", "f"]␤»
babydrop m: for %(:42a, :72b) -> (:$key, :$value){ dd [$key, $value] }
camelia rakudo-moar 843a6b: OUTPUT«["a", 42]␤["b", 72]␤»
babydrop etc
s/implic/implicit/ 17:55
17:55 rurban joined, rurban left 17:56 domidumont joined 18:03 thowe joined 18:05 labster left 18:10 dj_goku joined, dj_goku left, dj_goku joined 18:15 itaipu joined, dj_goku left
thowe It was mentioned in this channel recently that the kickstarter project book Learning Perl6 would have a coding style described as being a Python-like bracketing style, and that this was not preferred (at least) by some. I was wondering if someone could explain that to me (the style, and contrasting preferred style). 18:19
Or, perhaps better yet, point me to an example of what is currently considered good Perl6 style. I plan to start writing some perl6 and I want to form good habits early... 18:20
babydrop thowe: most stuff in github.com/rakudo/rakudo/tree/nom/src/core is good style :D
18:21 pyrimidine joined
babydrop thowe: but I don't think there's anything uber cannonical yet. I prefer to use .foo: method calls and pass int named args as :42bar 18:21
What's "good style" really?
El_Che babydrop: nqp code could be somewhat confusing for someone not doing nqp
babydrop El_Che: read it as a subroutine call... the rest is all Perl 6 18:22
gfldex thowe: examples: github.com/jnthn?tab=repositories 18:23
thowe babydrop, well, "good style" is subjective, like "good health", but like health it is still easy to tell good from bad. Also, communities tend to develop certain standards that, when used, help others absorb your code better. 18:24
El_Che there is good style and (fuzzy) conventions
e.g. there is nothing wrong about $var_name, while perl6 core people tend to use $var-name 18:25
AlexDaniel no space after a comma… meh
babydrop I'd call $var_name a bad Perl6 style tho
thowe I'm still curious about the comment about python bracket style that Brian Foy must be known for and what it is so that I can spot it. Also, what is preferred to it.
El_Che babydrop: why?
18:26 grondilu joined
El_Che there is nothing in the language that discourage it and the code is as readable as with - 18:26
AlexDaniel thowe: this kind of thing: github.com/briandfoy/perl6-chemist...s.pm6#L175
El_Che it's more of a cultural thing
babydrop El_Che: because core stuff uses kebob-case so if you're not using it everywhere, you have incosistent casing in your code and if you publish such an API as a module, you're just propagating the swine casing
El_Che babydrop: if Perl6 gets into that situation it will be a luxury problem :) 18:27
thowe AlexDaniel, Ah. Yeah, I tend to close the bracket at the same column as the opening statement.
babydrop El_Che: which situation?
El_Che babydrop: a zillion of inconsistent apis 18:28
babydrop :S
18:28 pmurias left
babydrop El_Che: I'm not sure where you got that from. 18:28
thowe Although, for C++, I got in the habit of opening the brackets on their own line, also at the same column. Seems to add readablity to C++ and perhaps Java. I think I picked that up from some Qt guys.
babydrop El_Che: we already have DBI that provides half the methods snake_cased and other half kebob-cased
El_Che babydrop: atm I'll settle with incosistent naming between libs for more libs
AlexDaniel sub foo(… … … … …) {
bar;
} # like this? :P
El_Che thowe: I hate that style on java 18:29
thowe: yet again, cultural
thowe AlexDaniel, no
kyclark OK, I’ve got 1800 words on bioinformatics. Would anyone like to proofread?
babydrop kyclark: sure
thowe AlexDaniel, sub foo(􏿽x85 􏿽x85 􏿽x85 􏿽x85 􏿽x85) {
18:29 synopsebot6 left
kyclark Do I need to do anything special, or can you see it? 18:29
babydrop Bioinformatics! That's what I studied in the college for 18:30
thowe bar;
18:30 synopsebot6 joined
thowe }; <- like this 18:30
babydrop heh
thowe same column as s in "sub".
El_Che bioinformatics. Is that the field when they connect your brain directly to the matrix?
thowe is my habit anyway.
babydrop thowe: but even "};" is not Perl 6-ish :) It's a supersticious semincolon we call it 18:31
AlexDaniel I'd love to see some justification for what Brian does
especially if he is going to do that kind of thing in a book /o\
thowe babydrop, Oh, yeah, I don't do a ";" there.
18:32 nowan left
babydrop AlexDaniel: I dunno, I look forward to the day when people will try to convince me my code is bad because it's not like in Learning Perl :) 18:32
thowe AlexDaniel, I don't know that he is, I think it was suggested that he would as it seems to be his habit.
heh
babydrop kyclark: I don't see it... what's the URL? 18:33
kyclark: oh wait, got it
18:33 wamba left
kyclark Cool. Nothing like a deadline to light a fire under my ass. 18:34
thowe Getting a start in Perl6 will be like coming full circle for me... Interest in Perl6 is what got me started in Perl5 after having mostly done Ruby. Perl6 looked like a better Ruby than Ruby to me at the time.
18:34 nowan joined
thowe I think that's a non-typical path to have taken... 18:34
kyclark I assume someone else will pull the trigger to publish the post tomorrow? 18:35
babydrop kyclark: you can schedule it 18:36
kyclark Fancy.
Scheduled for midnight. 18:37
babydrop kyclark: I assume "contigs" is a thing? :) 18:39
kyclark Contiguous bits of sequence.
I should explain that.
18:40 dwarring joined
pyrimidine kyclark++ # perl6 bioinformatics advent post 18:42
kyclark: pretty great to see you advocating for perl6 in this domain :) 18:43
kyclark Perl has a long, glorious history in bioinformatics (cf my old boss’s www.foo.be/docs/tpj/issues/vol1_2/...0001.html)
pyrimidine yes, I know # I'm aka CJFIELDS (CPAN) 18:44
kyclark It’s only natural for Perl 6 to take up the mantle. I also want to advocate for Perl 6 as a beginner’s language.
Ah, well, I can’t keep track of everyone’s nicknames. :-P
:-)
pyrimidine kyclark: np 18:45
kyclark One day I’ll contribute something to BioPerl6!
I’m quite impressed by the start you have. I used it a bit in class this fall.
pyrimidine I think you are already a committer, will have to check that
kyclark Yes, I think you gave me the right, but I haven’t done anything. 18:46
I have to shower and get to class now!
18:46 unicodable6 joined
pyrimidine have fun! re: bioperl6, s'okay, I have been a bit tied up myself and mainly tinker with it (but have some ideas...) 18:47
18:48 domidumont left 18:49 domidumont joined
[Coke] finally sees an example of bdf's bracketing style. me no likey. 18:51
babydrop kyclark: my notes: gist.github.com/zoffixznet/b419d7c...a553c6c545
18:51 FROGGS joined
FROGGS o/ 18:56
babydrop So.. when are we ganging up on bdf about the bracketing style? Who's got the bats?
\o\
FROGGS hi babydrop 18:57
18:57 hanekomu left
AlexDaniel babydrop: uh, I'm confused. How can I import Message from IRC::Client::Message whithout having to type “IRC::Client::Message” everywhere? 19:00
babydrop huh? 19:01
What Message?
AlexDaniel the one that is passed to irc-to-me ? 19:02
babydrop It's IRC::Client::Message
What are you trying to do? 19:03
AlexDaniel babydrop: your champagne thing
19:04 Coffeeframe joined
Coffeeframe Hello 19:04
AlexDaniel hi
babydrop Just `use IRC::Client::Message;` in the help file and put IRC::Client::Message as a type constraint on the multi that prints help
AlexDaniel babydrop: that's my question! How can I type just “Message”?
babydrop That's the only place that you'd need to have it at
AlexDaniel: ummm... constant Message = IRC::Client::Message; I guess
Like here: github.com/zoffixznet/perl6-IRC-Cl...ge.pm6#L16 19:05
AlexDaniel I see… 19:06
babydrop But that's nothing to do with my champagne thing :P
I don't get why you need just Message. You only need it once, on thi sline: github.com/perl6/whateverable/blob...ble.p6#L32 19:07
well, for each robot 19:08
AlexDaniel babydrop: that's exactly where I don't need it
babydrop Oh right :)
pyrimidine babydrop kyclark: added a quicky example script for using BioPerl (p5) from Perl6 19:09
kyclark: if you want to use it, that is. that would be on the gist by babydrop in the comment gist.github.com/zoffixznet/b419d7c...a553c6c545 19:10
babydrop m: constant Z = Int; multi foo(Z $){ say "here" }; multi foo($) {say "there" }; foo 42 19:11
camelia rakudo-moar 843a6b: OUTPUT«here␤»
19:11 dj_goku joined, ufobat left
thowe this "Why hasn't Perl 6 taken off yet?" hacker news thread has got some gold in it. 19:11
pyrimidine thowe: link? 19:12
thowe news.ycombinator.com/item?id=12888784
babydrop thowe: gold like what?
The poo-coloured gold? :)
pyrimidine ah yes, I remember this one. 19:13
babydrop doesn't feel like coming back to that thread after the shitstorm from last time...
A group of ignorant apes flinging poop at each other is what it looks like to me.
pyrimidine babydrop: pretty much 19:14
babydrop :) 19:15
19:15 darutoko left 19:16 giraffe left, dj_goku left
Coffeeframe Silly question, I'm on ArchLinux, and there's a couple rakudo packages on the AUR, which one should I be using? 19:17
geekosaur and this differs from most geek (or, for that matter, people) comment threads how?
babydrop geekosaur: no how, which is why those threads are a waste of time :)
Coffeeframe: the one with the biggest version number I guess :)
Coffeeframe: what are the names of choices? 19:18
Coffeeframe babydrop: aur.archlinux.org/packages/?O=0&K=rakudo
babydrop :o 19:19
19:19 rodarmor left
thowe babydrop, hm, I don't know if I can link to a particular comment... But it is an interesting study in finding logic to justify 19:19
babydrop, ... justify whatever opinion you come to first 19:20
babydrop Coffeeframe: hm, rakudo 2016.11-1 looks like the best choice there.
Coffeeframe tbh I should probably just compile from source
thanks
19:20 labster joined
babydrop Coffeeframe: sure, that would work too. Just get the Star from rakudo.org/downloads/star 19:20
thowe also, there are some great little bits of insight in how people think of programming languages, history, whatnot. Also some neat little code examples.
It's just kind of fascinating to read the exchanges; differing view points colliding. 19:21
babydrop Coffeeframe: the `rakudo` package would be compiler only and you'd also need to install a module manager manually with it. The rakudo-star package listed there is ancient.. .even before our first stable release
thowe babydrop, sorry for the delay in my comment, work got in the way.
19:22 jonas1 left
babydrop thowe: I think a lot of those "points" come from people entirely ignorant of the core development process. 19:23
...or the number of people involved....
...or their average hourly pay rate for their labour...
...or the reasons why they do this... 19:24
thowe babydrop, 99.99% of users are going to be ignorant of the core development process, I'm one of them. I think those impressions matter.
still, I think the comments from people who are pro Perl6 are great here as well. 19:25
19:25 giraffe joined 19:26 kyclark left, rodarmor joined
thowe I'm most fascinated by the stuff here that I just can't get behind... 19:27
babydrop thowe: my problem is mostly not with "users" but with people who throw up inane material like "They should just rename it" or "where's the big marketing event for the release?"
19:27 rurban joined
Ulti meh just ignore it, its just the negative version of bike shedding... it makes peope feel like they know something to vomit up that stuff 19:28
babydrop Yeah, I was hoping to...
19:28 rurban left
babydrop thowe-- for bringing that awful thread back again 19:28
dalek ateverable: 7cd3281 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (6 files):
Substitute one hack for another

Having a stricter signature bumps up its priority, so there is no need for the previous hack.
19:28 wamba joined, domidumont left
babydrop :) thow++ # fine fine... 19:28
AlexDaniel babydrop: thanks 19:29
thowe its thowe not thow ;P
sorry, it was new to me...
babydrop thowe++ fine fine.
Ulti looks around at all the new faces 19:30
babydrop thowe: well, it's not your fault I know. It's just when that thread first went popular I found out a bunch of people were talking shit about me personally due to the comments on that thread.
Ulti did people just change nick or is this a load of new peeps?
masak Ulti: ...and you are? :P
19:30 rurban joined
babydrop Ulti: there's a bunch of new peeps 19:31
19:31 rurban left
masak .oO( get off my lawn ) 19:31
AlexDaniel Ulti: no, it's just Zoffix having a lot of fun
masak Everyone is Zoffix
thowe oh, do you have comments on there?
babydrop AlexDaniel: thowe and Coffeeframe aren't Zoffix
Ulti one of many fans apparently
AlexDaniel babydrop: and everyone else is. OK
geekosaur still isn't zoffix either...
thowe Who is Zoffix?
babydrop thowe: a very famous person. 19:32
We love him very much.
Ulti the pluritude that is Zoffix
babydrop hehe www.urbandictionary.com/define.php?term=Zoffix
19:33 kurahaupo joined
AlexDaniel “by sexy-coder-girl”, yeah 19:33
thowe I'm not sure I am new, I know a few people in Perl5 land and I have now been to 2 conferences :) I'm just not interested because I'm really just a hobbyist.
19:33 cdg left
Ulti I've been to 0 conferences and have been writing p5 since about 2004 19:34
thowe Bruce Gray took a picture of my and captioned it "I break things". I was very amused. I was also at Damien's class on functional programming.
Ulti p6 since about 2010 which worryingly makes me an early adopter
thowe er s/my/me/
Ulti I think there is increasingly outside echo chamber Perl 6 usage in the wild which is really nice to see 19:35
thowe Perl people are almost universally super nice -- I don't know how you do it.
19:35 prammer joined
Ulti its testament to where rakudo on moar is at the moment perf and reliability wise 19:35
babydrop \o/ 19:36
thowe er maybe I should say "we".
AlexDaniel \o/
babydrop AlexDaniel: is it really a hack tho?
Ulti its when you say we that you understand why its nice
AlexDaniel babydrop: of course it is
babydrop AlexDaniel: the resolution order felt sane to me when I was writing my examples 19:37
AlexDaniel: I mean, as the answer to "how do I force the parent to resolve first" it's pretty clean
thowe they're even almost always nice to me, and I'm annoying, so that's special.
AlexDaniel babydrop: are there any tests for resolution order?
babydrop AlexDaniel: there.... can be :P
Ulti naw I keep missing kylark, I guess they must be in a US time zone?
AlexDaniel babydrop: I don't think so. IMO that's completely the business of the compiler, I should not expect anything 19:39
babydrop: unless somebody introduces an actual feature to control the priority
babydrop: and #123577 should be resolved somehow too 19:40
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123577
babydrop AlexDaniel: that IS a feature!
AlexDaniel *shrug* 19:41
babydrop AlexDaniel: what do you mean expect? You *should* expect the presicely defined resolution
AlexDaniel why?
babydrop :S
AlexDaniel: because otherwise it's useless and unpredictable?
FROGGS are we talking about resolution order of subs and methods? 19:42
err, multis so to say?
babydrop FROGGS: the multi resolution yeah, specifically how it pertains to resolving multis provided by class and its subclasses
AlexDaniel babydrop: the way it changes just because somebody slapped “Message” is not exactly what I'd call predictable
babydrop: it is a bit too implicit, I think 19:43
FROGGS the rules are written down in the synopsis fwiw
AlexDaniel oh, link?
FROGGS gimme a minute
babydrop AlexDaniel: You made the candidate narrower, of course it's change!
19:43 kyclark joined
babydrop m: multi foo (Int $x) { say "here" }; multi foo($x) { say "there" }; foo 42 19:44
camelia rakudo-moar 843a6b: OUTPUT«here␤»
babydrop AlexDaniel: to me, what you're saying sounds like "Hey look! it works just because someone slapped an Int over there"
It's perfectly predictable, just like with the champagne thing
The Int (or Message) gives more narrowness than the narrowness provided by the thing coming from a subclass 19:45
AlexDaniel yea, that's exactly what I'm saying. Because irc-to-me is always called with Message
babydrop The above code is also called with an Int
also always calledd 19:46
AlexDaniel yea
babydrop Yeah.
FROGGS there is S12:1157, but I thought there was something more specific
synopsebot6 Link: design.perl6.org/S12.html#line_1157
19:46 grondilu left
babydrop So why are you OK with the above Int type contraint but not with Message type constraint? 19:46
tadzik timotimo: I merged things! \o/
thowe I'm curious about the motivation to post a comment about how you are not going to be using something (Perl6 in this case). It's never occurred to me to comment in a thread about Python or TCL to tell people it has no appeal to me. I have to assume there is some kind of emotion that Perl6 is triggering to make someone say "yeah, well, I'm not gonna use it! Hmf!" 19:47
tadzik I appreciate a Panda reference, as a spirit animal of sorts :)
sounds like someone expressing their insecurity
AlexDaniel babydrop: that's not what I'm saying. I'm saying that it would be better to have an option to set the priority manually, so that it becomes explicit and readable 19:48
thowe who are they trying to convince?
babydrop thowe: um, I take it you never used YouTube? :)
thowe I've watched things on YouTube, is that using it?
babydrop thowe: people talk shit about everything. This is no different. They call something crap to feel superiour.
tadzik hah, right, there's that
"I'll say something is stupid, people will think I'm smart!"
stupid people, maybe 19:49
AlexDaniel
.oO( “I am crap, I am superior” )
thowe That must be a busy job... Finding everything that is crap and expressing your opinion on it.
19:49 grondilu joined
stmuk_ to dislike a language you have to use it! 19:49
babydrop "I don't know Perl 6, but if I call it utter failed crap, I don't have to worry about being seen as 'weak' for not knowing something or worrying about my job prospects"
masak tadzik: that's right! all those stupid people, needing to call stuff stupid in order to feel superior! so stupid! :P 19:50
tadzik I know right!?
AlexDaniel to be honest, that's what I did before I started loving Perl 6. I did not say it out loud, but I did think this way, yeah
masak tadzik: we would never do that!
babydrop huggable: php
huggable babydrop, nothing found
babydrop huggable: php sucks
huggable babydrop, blog.aurynn.com/contempt-culture
tadzik no, we're the good ones, but others are wrong and stupid!
babydrop thowe: ^ that's a good read on the topic :)
masak tadzik: that almost follows by definition
tadzik I love modern web, where images load faster than text 19:51
babydrop hah
AlexDaniel: what would that look like? 19:52
thowe as someone who has had to write PHP: PHP is stupid and the people who like it are stupid.
babydrop (the manual priority thing)
thowe: I like PHP :(
tadzik as someone who writes Perl: go away, less programmers means more money for me, shoo 19:53
thowe babydrop, and that's why I am better than you
babydrop hahaha
thowe hahahhaa
masak hahhhhh... *cough* 19:54
thowe HA HA HA :| 19:55
babydrop 𝐇𝐀 𝐇𝐀 𝐇𝐀 19:56
I win!
thowe you win
babydrop collects the coins
19:57 domidumont joined, Tonik left
masak .oO( на на на ) 19:57
20:04 wamba left, wamba joined
[Coke] HÁ HA HA 20:06
20:06 xylixy joined
[Coke] awww, something in my chain to IRC is losing all my combining chars. :| 20:06
wonder if I have to enable tmux to do something. 20:07
xylixy i'm new to perl6. why doesn't this compile 'aaaa' ~~ g/a/;
FROGGS m: say 'aaaa' ~~ m:g/a/; 20:08
camelia rakudo-moar 843a6b: OUTPUT«(「a」 「a」 「a」 「a」)␤»
[Coke] set -g utf8
set-window-option -g utf8 on
FROGGS xylixy: :g is an adverb you can put after the m or after the first slash
xylixy ok, i guess that with plain // it can have no options
nine [Coke]: come on, it's 2016. You cannot expect Unicode support out of the box after just 28 years
FROGGS m: say 'aaaa' ~~ /:g a/;
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :g␤at <tmp>:1␤------> 3say 'aaaa' ~~ /:7⏏5g a/;␤ expecting any of:␤ term␤»
FROGGS errr, or not 20:09
20:09 pyrimidine left
babydrop Not for :g 20:09
FROGGS ahh true
babydrop Since it affects how the match is done, rather than match itself
FROGGS cannot work for :g inside of a regex
xylixy thx
FROGGS m: say 'aaaa' ~~ /:i A/;
camelia rakudo-moar 843a6b: OUTPUT«「a」␤»
20:09 pyrimidine joined
FROGGS these work inside and outside 20:09
[Coke] nine: sadly, I had it working all fine in screen :|
babydrop AlexDaniel: I'm doing hackety stuff!!
AlexDaniel babydrop: dunno, multi(4) sub foo {} ? :-/ 20:10
babydrop AlexDaniel: and you'd consider that readable? :S
AlexDaniel: wtf is 4?
What does it do?
AlexDaniel babydrop: nope :S but can't think of anything else
babydrop multi foo () is important {... } 20:11
ala CSS
But that's not the hackety stuff I'm doing :)
AlexDaniel what if you have one that is even more important?
[Coke] ... call them different names so you can be sure you're calling the right one?
20:11 kurahaupo__ left
[Coke] (I missed the original problem statement here.) 20:12
20:12 dj_goku joined, dj_goku left, dj_goku joined
babydrop AlexDaniel: same as with CSS. You'd have to make it more specific by other means, with the intent that you're not meant to use `important` all too often. 20:12
20:12 xylixy left
babydrop But it can also take an arg of priority, I suppose 20:12
20:12 ssm left, kurahaupo__ joined
babydrop And I'm not saying that in a way that we should add that to core... :) That's just musing 20:13
And my hackety is about trying to see if that's possible from module space :)
20:14 pyrimidine left 20:15 ssm joined 20:16 Coffeeframe left 20:17 dj_goku left
AlexDaniel [Coke]: the problem is that sometimes in a subclass you want to have a similar signature but want it to have less priority over the one that is in a parent 20:17
[Coke]: additionally, see #123577. It is a slightly different issue, but kinda related
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123577
babydrop Well, "problem"
There's a method to do it, but AlexDaniel does not find it palatable :) 20:18
AlexDaniel yea, because you have to change your parent class
babydrop hmmm
20:18 cpage_ joined
babydrop You don't, if the parent class has a type constraint 20:19
babydrop tries another trick if it doesn't...
AlexDaniel what's needed, actually, is “is not important” 20:20
[Coke] if it's not meant to override, and you want it to have the same signature, don't give it the same name.
AlexDaniel but that's kinda not going to work
[Coke] that seems very obvious to me, so I must be missing something.
20:20 grondilu left
[Coke] crap. I'm going to have to give up tmux and go back to screen. 20:21
babydrop [Coke]: the API uses the multi candidates to choose which one to call, so using a different name is not an option
AlexDaniel [Coke]: well, see this as an example: github.com/perl6/whateverable/comm...8a5759f60f
timotimo tadzik: did you also bump the version?
AlexDaniel [Coke]: and feel free to point out what is wrong there
20:21 prammer left
[Coke] "don't use where clauses to try to set precedence", I guess. 20:22
20:22 ssm left
[Coke] (but that's a half baked answer. I'll give it some more thought later.) 20:22
babydrop [Coke]: there is an answer to be described in my Advent article :) 20:23
[Coke] for that kind of thing, I think you want to try all the methods in the hierarchy until someone says "I've processed it", which sounds like something other than method inheritance to me.
babydrop The only niggle is it doesn't work when there's no type constraint on the parent class's method :)
"Ambiguous call to 'stuff'; these signatures all match:"
hmm
Actually, that may be a bug 20:24
Because one is a regular method stuff ($) {} and the other is subset MySubset of Mu where { $_ ~~ Str }; method stuff (MySubset)
20:24 prammer joined
babydrop And the subset stuff supposed to be narrower 20:24
kyclark Thanks for the suggestions on my Advent article. I’ve amended accordingly.
babydrop ... and it is, if I make it `of Any` or anything narrower 20:25
[Coke] Please make sure you have "Day X -" prependend on titles.
babydrop m: gist.github.com/zoffixznet/c40cbf0...20ce11c553 20:26
camelia rakudo-moar 843a6b: OUTPUT«Ambiguous call to 'stuff'; these signatures all match:␤:(Thingie $: $, *%_)␤:(SubThingie $: Mu $ where { ... }, *%_)␤ in block <unit> at <tmp> line 10␤␤»
20:26 ssm joined
[Coke] (I think we want days listed...) 20:27
20:28 pyrimidine joined
babydrop damn, how do I reverse an NQPArray 20:28
I tried messing with atpos, but it's telling me "This type cannot unbox to a native string: P6opaque, Int"
for "nqp::atkey($disps, 0);" 20:29
ugh, it's atpos!
stupid PHP messed my brain :)
20:30 domidumont left
babydrop My hackety is not working!! :D 20:31
[Coke] warns bdf of the <> vanishing problem which impacted his article also.
20:32 labster left
babydrop m: gist.github.com/zoffixznet/b8f05fc...9a986cd723 20:33
camelia rakudo-moar 843a6b: OUTPUT«here␤P6opaque: no such attribute '$!dispatchees' in type Routine when trying to get a value␤ in sub handle-important at <tmp> line 8␤ in block <unit> at <tmp> line 15␤␤»
babydrop weird, that stuff works locally
[Coke] whos article is "Yule the..."
*whose
babydrop Anyway, that was my idea to hackety-hack the guts of routines to change the order.
20:33 itaipu left
babydrop There's a mentally ill person is yelling here, so I can't focus >_< 20:33
[Coke] You have a weird HTML glitch that starts in the bulleted list. 20:34
20:34 Wiertek joined
[Coke] oh. I see who it is. 20:35
20:35 pyrimidine left
babydrop TimToady 20:35
And I think.. that's last years?
[Coke] ... which I didn't know if it was a secret so I sent him a private message. 20:36
arnsholt babydrop: NQPClassHOW.nqp suggest the following idiom for reversing: "my @out; for @in { nqp::unshift(@out, $_) }; @out"
[Coke] OH 20:37
it's 4 years old.
babydrop "Draft saved 4 years ago"
arnsholt: thanks
[Coke] guess he's NOT writing a surprise article for the calendar this year!
babydrop :P
arnsholt Or you can of course iterate the indexes from +@arr-1 down to zero
timotimo tadzik: i just saw you did bump that version
20:45 Guest42590 joined 20:46 labster joined, kyclark left
samcv regarding Inline::Perl5, does anybody know how to call a perl 5 module that's in the same directory and not one that's installed in the module folder? 20:46
i mean i try `use lib` but i can't use lib in precompiled things 20:47
babydrop samcv: just use lib '.';
tadzik timotimo: yup :)
samcv 'use lib' may not be pre-compiled
nine samcv: use lib:from<Perl5> '.';
samcv ok great thanks nine :)
20:47 labster left
babydrop \o/ 20:48
20:48 itaipu joined 20:54 TEttinger joined 20:55 FROGGS left 21:01 pyrimidine joined 21:02 kyclark joined, cdg joined, matiaslina left 21:07 itaipu left 21:10 ssm left 21:13 dj_goku joined 21:17 nowan left 21:18 dj_goku left 21:20 nowan joined 21:21 imcsk8 left 21:22 chris2 left, rindolf left 21:24 cygx left 21:26 rindolf joined
stmuk_ aldi++ # stollen bites 21:30
timotimo stolen bytes? 21:31
stmuk_ more like nybbles 21:32
kyclark stollen is delish 21:33
21:34 rurban joined
[Coke] aldi++ 21:35
21:38 prammer left 21:41 trnh joined, trnh left, trnh joined 21:42 nowan left 21:43 labster joined
dalek line-Perl5: 997ccd8 | samcv++ | README.md:
Show how to load a Perl 5 from a folder to README
21:44
line-Perl5: 9f07780 | niner++ | README.md:
Merge pull request #78 from samcv/master

Show how to load a Perl 5 module from a folder in README
21:44 labster left
samcv nine, i'm still having problems using my perl 5 module with Inline::Perl5 unfortunately. it is not actually importing the functions. is there anything I need to do special inside the module? 21:45
use CurlTitle:from<Perl5> <get_url_title_new>; this doesn't work and <:all> doesn't work. says "Undeclared routine"
hahainternet is it possible to define for example, a 2d vector type, which is a list of only 2 numbers? 21:50
it's probably on the front page of the docs and i've missed it :/
[Coke] hahainternet: an object? or a list-but-with-only-two-elements? 21:51
hahainternet [Coke]: i'm not fussy, but i'm more interested in learning the features available 21:52
i know i could make a class with two private variables, for example
but i presume there's some fancy methods i know nothing of :)
[Coke] m: my @a[2] = 1,2; my @b[2] =1,2,3;
camelia rakudo-moar 843a6b: OUTPUT«Index 2 for dimension 1 out of range (must be 0..1)␤ in block <unit> at <tmp> line 1␤␤»
jnthn docs.perl6.org/language/list#Fixed_Size_Arrays maybe
[Coke] m: my @a[2] = 1,2; say "a"; my @b[2] =1,2,3; say "b";
camelia rakudo-moar 843a6b: OUTPUT«a␤Index 2 for dimension 1 out of range (must be 0..1)␤ in block <unit> at <tmp> line 1␤␤» 21:53
hahainternet can i define that as a type, something a scalar can contain? or is that always an object?
AlexDaniel hahainternet: what about a pair?
hahainternet sorry if i'm not 100% on terminology too
perlpilot hahainternet: "is it possible?" questions are "yes" most times around here :) 21:54
hahainternet haha yeah that's certainly true 21:55
[Coke] I use JIRA, which has a SQL like language to search for tickets. You can say "text ~ dns" to look for all tickets that mention dns somewhere.... I regularly mistype this as a smartmatch.
AlexDaniel m: dd Pair.new 21:56
camelia rakudo-moar 843a6b: OUTPUT«(Mu) => Mu␤»
AlexDaniel why is it Mu?
[Coke] there's more than one way to do it, hahainternet, and you now have at least 3 of them. :)
perlpilot JIRA is more like awk than Perl 6 ;)
jnthn AlexDaniel: Why wouldn't it be Mu?
What would you prefer it to be, and why? 21:57
AlexDaniel jnthn: well I dunno, this seems to suggest Nil github.com/rakudo/rakudo/blob/nom/...Pair.pm#L2
but I'm not saying that it is wrong, just wondering why Mu 21:58
perlpilot m: Nil ~~ Mu
camelia ( no output )
perlpilot m: say so Nil ~~ Mu
camelia rakudo-moar 843a6b: OUTPUT«True␤»
perlpilot I don't see the problem : )
er, :-)
jnthn AlexDaniel: Hm, that is a tad curious :)
AlexDaniel jnthn: especially… 21:59
committable6: all dd Pair.new
committable6 AlexDaniel, gist.github.com/71871206d6f8d96776...df90a7864f
AlexDaniel ¦«2015.04,2015.05,2015.06,2015.07.2,2015.09»: Any => Mu
so it was different, then was changed 22:00
I guess there was some justification for it?
bisectable6: old=2015.09 new=2015.12 all dd Pair.new
bisectable6 AlexDaniel, Bisecting by output (old=2015.09 new=2015.12) because on both starting points the exit code is 0
22:00 pyrimidine left
bisectable6 AlexDaniel, bisect log: gist.github.com/a6ae56b85852382a17...a82c172834 22:01
AlexDaniel, (2015-09-24) github.com/rakudo/rakudo/commit/8e...68f1bd977c
22:01 pyrimidine joined, Technaton joined
AlexDaniel huh? 22:01
jnthn It's been consistent for a while at least :)
22:01 labster joined
AlexDaniel m: dd Pair.new(Nil, Nil) 22:01
camelia rakudo-moar 843a6b: OUTPUT«(Nil) => Nil␤»
[Coke] anything tht changed before christmas is ignorable.
AlexDaniel well, again, I'm not saying that it is a problem 22:02
jnthn *nod*
I think there's something "special" about is default(Nil) 22:03
babydrop samcv: you have a robomessage in #perl6-dev BTW
We should kickban yoleaux and join yoleaux2 into #perl6, so it could cross-channel messages
[Coke] we should really combine the 2 yolos.
heh.
babydrop :D
[Coke] was going to note that after seeing the list of IRC bots in the help ticket.
jnthn Just do it now, lol yoolo
babydrop Well, who's got the banhammer? I can make part 2 happen 22:04
jnthn *yolo # gah! :P
Oh. Well, that complicates things :)
babydrop Why?
AlexDaniel babydrop: what about all messages that were not delivered?
[Coke] well, I'd leave the first one ... right.
babydrop hm...
22:04 kurahaupo__ left
[Coke] leave it here for a bit. 22:04
babydrop [Coke]: but then both robots will trigger to .tell and such
[Coke] arglebargle.
jnthn stops trying to remember how to obtain his ops bit :)
[Coke] or find the original owner (mst? can you help?) 22:05
22:05 kurahaupo__ joined
babydrop It's /chanserv op #perl6 22:05
or /msg chanserv ... if your client isn't fancy enough :) 22:06
AlexDaniel so why is it Mu? Did I miss the answer?
babydrop But yeah, I dunno what to do with existing messages :D
jnthn m: my $a is default(Nil); say $a
AlexDaniel and what's the general idea? When should I expect Mu, Nil and Any?
camelia rakudo-moar 843a6b: OUTPUT«Nil␤»
babydrop AlexDaniel: everything is Mu
m: say 42 ~~ Mu
camelia rakudo-moar 843a6b: OUTPUT«True␤»
babydrop AlexDaniel: or did you mean something else? 22:07
jnthn m: class A { has $.a is default(Nil); }; say A.new.a
22:07 skids left
camelia rakudo-moar 843a6b: OUTPUT«(Any)␤» 22:07
AlexDaniel babydrop: yea I mean why is it not Any or Nil
jnthn m: class A { has $.a is default(Nil); method x() { $!a.gist } }; say A.new.x
camelia rakudo-moar 843a6b: OUTPUT«(Any)␤»
AlexDaniel again, not implying that something is wrong, I'm just trying to understand
jnthn At this point, I'm confused too ;)
babydrop AlexDaniel: so you could store Mus in it
m: dd class { has Mu $.foo }.new.foo 22:08
camelia rakudo-moar 843a6b: OUTPUT«Mu␤»
jnthn babydrop: Yes, the question is why the default value in there is Mu
babydrop That's its type
m: dd class { has Int $.foo }.new.foo
camelia rakudo-moar 843a6b: OUTPUT«Int␤»
babydrop This one's Int
jnthn m: class A { has Mu $.a is default(Nil); method x() { $!a.gist } }; say A.new.x
camelia rakudo-moar 843a6b: OUTPUT«(Mu)␤»
jnthn Oh :)
AlexDaniel has $.key is default(Nil); 22:09
jnthn But again there ain't a Mu in Pair.pm
babydrop s: Pair, 'new', \()
SourceBaby babydrop, Sauce is at github.com/rakudo/rakudo/blob/abc6...air.pm#L17
22:09 RabidGravy left
jnthn ohhh 22:09
I see why
multi method new(Mu :$key, Mu :$value) {
Technaton Hello, world! Hope I am not intruding. :) I am thinking of creating a Vindinium bot in Perl6. There are some parts to it, e.g., the A* algorithm. Would that algorithm be appreciated as perl6 module, and if so, what would be the best namespace to put it in?
jnthn $key and $value are optional
22:09 espadrine_ joined
jnthn And we call that candidate for Mu 22:10
uh
for new()
And it ends up setting them to Mu
Mystery solved.
AlexDaniel jnthn: so why does it say “is default(Nil)” ?
babydrop \o/
jnthn AlexDaniel: Because otherwise assigning Nil to it would lose your Nil
AlexDaniel: is default(Nil) is the only way to get a container that you can assign Nil into 22:11
babydrop Technaton: the module would certainly be appreciated
AlexDaniel jnthn: oh, ok. This part is now clear
Technaton babydrop: Well, I guess that was the stupid part of the question, since m.p6.org doesn't yield any search result for A*. :) 22:12
babydrop Technaton: as for namespace... I see other modules use Algorithm:: so maybe somewhere there?
Technaton: yeah, our ecosystem is baby-sized :D
AlexDaniel ah… so if something should accept Nil as its value, then it will also return Mu if unset?
otherwise I should be expecting Any, right?
Technaton So, Algorithm::Astar? I am trying to get the vibe of p6. Perl5 I know, Ruby I know, I am a long-year C++ programer… P6 is quite unknown terrain.
jnthn AlexDaniel: No, we assign Mu to it explicitly
22:13 pyrimidine left
AlexDaniel jnthn: sure, but from a standpoint of a user 22:13
babydrop m: my $x = Nil;
camelia ( no output )
babydrop m: my $x is default(Nil) = Nil; dd $x
camelia rakudo-moar 843a6b: OUTPUT«Nil $x = Nil␤»
babydrop And the Mu is there to make it possible to accept Mus
And is default(Nil) is to make it possible to accept Nils 22:14
22:14 dj_goku joined
AlexDaniel Pair is supposed to allow Nils, so we get Mu. Arrays, on the other hand, don't store Nils, so we get Any as a default value 22:14
babydrop m: my $x = Nil; dd $x # 'cause otherwise they turn to other stuff
camelia rakudo-moar 843a6b: OUTPUT«Any $x = Any␤»
22:14 pyrimidine joined
jnthn Technaton: Personally I'd go for Algorithm::AStar but opinions may vary on that. 22:14
babydrop +1 on that name 22:15
babydrop & for the day
jnthn Algorithm::Astar I'd probably do a double-take at :)
22:15 pyrimidine left
jnthn (As in, wonder what algorithm this is that I didn't hear about, then realize... :)) 22:16
22:16 girafe left
jnthn AlexDaniel: I guess there's a few ways to argue it; generally, the places we let Any crop up are those that allow auto-viv to happen 22:17
m: my $p = Pair.new; $p.value++; say $p 22:18
camelia rakudo-moar 843a6b: OUTPUT«Cannot resolve caller postfix:<++>(Mu); the following candidates␤match the type but require mutable arguments:␤ (Mu:U $a is rw)␤␤The following do not match for other reasons:␤ (Bool:D $a is rw)␤ (Bool:U $a is rw)␤ (Int:D $a is rw)…»
jnthn m: my $p = Pair.new(:key(Any)); $p.value++; say $p
camelia rakudo-moar 843a6b: OUTPUT«Cannot resolve caller postfix:<++>(Mu); the following candidates␤match the type but require mutable arguments:␤ (Mu:U $a is rw)␤␤The following do not match for other reasons:␤ (Bool:D $a is rw)␤ (Bool:U $a is rw)␤ (Int:D $a is rw)…»
jnthn d'oh :)
22:18 pyrimidine joined
jnthn m: my $p = Pair.new(:value(Any)); $p.value++; say $p 22:18
camelia rakudo-moar 843a6b: OUTPUT«Cannot resolve caller postfix:<++>(Any); the following candidates␤match the type but require mutable arguments:␤ (Mu:U $a is rw)␤␤The following do not match for other reasons:␤ (Bool:D $a is rw)␤ (Bool:U $a is rw)␤ (Int:D $a is rw…»
jnthn Curious, value is marked "is rw"... 22:19
22:19 kurahaupo left, dj_goku left
jnthn Oh, but that constructor binds :) 22:20
Interesting. :)
22:20 kurahaupo__ left
jnthn Time for some sleep...'night 22:21
Technaton jnthn: Good night! 22:27
AlexDaniel m: dd (;;) 22:28
camelia rakudo-moar 843a6b: OUTPUT«(Nil, Nil)␤»
Technaton Well, I see I have quite a lot to learn. P6 is very different from p5. The interface question is the best way to learn a new language. :)
Thanks for the suggestions!
Is there something akin of template functions in p6? 22:29
For example, in C++, I'd probably define something along the lines of `template <class Node> Node::Iter neighbors(Node const& node);`, and have the user specialize the template to get the neighbors of a tree node (for A*). 22:31
Pro: Clean interface. I could simple have `Path a_star::path(Node const& from, Node const& to)`, even with the five predicates A* needs. 22:32
Pure OO doesn't look so good, it would need an interface and finally multiple inheritance. Quite cumbersome.
How does one create a functional/predicate-based interface in p6? 22:33
AlexDaniel committable6: 2016.09,2016.10 Nil.chrs 22:34
committable6 AlexDaniel, gist.github.com/764af00892bb0df6db...ec8b02e571
22:35 rindolf left
timotimo Technaton: you can just take any kind of object and call .neighbours on it, for example 22:36
"duck typing"
you would need templates for the same thing in cpp because you have to compile new code to make it work with different classes; there's no "call method by its name" functionality in vanilla c++ 22:37
22:37 grumble joined
timotimo (qt, for example, adds this) 22:37
22:37 espadrine_ is now known as espadrine
Technaton Okay, in the same way as, e.g., a Ruby programmer would do it. So I've got "node.neighors", "node.heuristic(to)", etc. - But the point is: How do I convey that clearly to the potential API user? In C++, a bit of doco and the compiler suffices (cf. boost), but with duck typing, how does one figure out how to implement this kind of "deep interface" correctly? It's not simply an abstract interface (i.e., 22:38
API) to program against…
Perhaps I'm just an old guy, but I'm willing to learn new tools. 22:39
timotimo write it into the docs? maybe supply a role that user code can inherit that makes sure the necessary methods are all implemented?
Technaton How do I make sure that all necessary methods are implemented? By supplying a default method that throws an exception? 22:40
I'm just asking widely, coming from another language I've used for 10 years. Sorry if the questions seem overly naive. 22:41
*wildly
kyclark Technaton: docs.perl6.org/language/operators#...b_operator 22:45
Would that work? Kind of like declaring abstract methods?
Technaton kyclark: "Abstract methods": I don't want them. I would ideally like the user to supply some predicates, the way Boost.Graph does it, for example. I know that this probably sounds obsucre, since its not the usual "here, implement that interface" stuff. 22:46
Is it possible in p6 to (a) have a namespace, (b) predefine Stubs for predicates (without class binding), and (c) document them? 22:47
22:47 aries_liuxueyang left
Technaton Because the Fatal stub error looks like I'd need a class to tie it to? 22:47
sergot n: my @abc; my @a = 1,2; @abc.push: @a.clone; @a[0] = 42; @a[1] = 42; say @abc; 22:48
camelia niecza : OUTPUT«No such file or directory»
sergot m: my @abc; my @a = 1,2; @abc.push: @a.clone; @a[0] = 42; @a[1] = 42; say @abc;
camelia rakudo-moar 843a6b: OUTPUT«[[42 42]]␤»
sergot is this ok?
camelia niecza : OUTPUT«(timeout)cat: /home/camelia/niecza/VERSION: No such file or directory␤#perl6 <sergot> rakudo-moar: my @abc; my @a = 1,2; @abc.push: @a.clone; @a[0] = 42; @a[1] = 42; say @abc;␤»
sergot I use .clone there, shouldn't it be [[1 2]]? 22:49
m: my @abc; my @a = 1,2; @abc.push: @a.clone; @a[0] = 42; @a[1] = 42; say @abc.perl;
22:49 pyrimidine left
camelia rakudo-moar 843a6b: OUTPUT«[[42, 42],]␤» 22:49
22:49 pyrimidine joined
sergot it works fine when I do @a = 42, 42; :) 22:50
I can imagine why, but I don't know if the answer is correct up there :) 22:51
ugexe it works if you do `@abc = @a.clone` as well 22:53
hmm works with .append
sergot :D
ugexe m: my @abc; my @a = 1,2; @abc.append: @a.clone; @a[0] = 42; @a[1] = 42; say @abc.perl; 22:54
camelia rakudo-moar 843a6b: OUTPUT«[1, 2]␤»
sergot what's the difference between .push and .append here?
22:54 pyrimidine left
ugexe dunno. the only difference I consider is push is for single items, and append handles multiple items 22:55
22:56 Technaton left
geekosaur iirc .push follows the single-arg rule, so if you (*.push: @a) it pushes a single item containing the list instead of all the elements separately 22:57
TimToady that's not the single-arg rule, that's just a single arg :) 22:58
single-arg rule expands a single arg into multiple
which push doesn't
22:59 thowe left, Technaton joined
Technaton Whoops, UnexpectedKernelUpdateException thrown. :) 22:59
timotimo Technaton: when you have methods with their body { ... } and the user tries to "does TheRole" on their class, it'll explode at compile time if that method isn't implemented 23:01
sjn \o 23:02
timotimo yo sjn
23:02 labster left
Technaton timotimo: Okay, that sounds reasonable. I'll look into it. Thanks! :) 23:03
sjn was thinking of making a subtype Coord of Pair, but I'm failing. Am I approching this wrong?
subset* 23:04
timotimo what kind of error do you get? 23:05
m: subset Coord of Pair; say (a => 1) ~~ Coord
camelia rakudo-moar 843a6b: OUTPUT«True␤»
sjn I need it with a where clause
both k and v in the pair need to be Int
timotimo m: subset Coord of Pair where { .key ~~ Int and .value ~~ Int }; say (a => 1) ~~ Coord 23:06
camelia rakudo-moar 843a6b: OUTPUT«False␤»
timotimo m: subset Coord of Pair where { .key ~~ Int and .value ~~ Int }; say (99 => 1) ~~ Coord
camelia rakudo-moar 843a6b: OUTPUT«True␤»
sjn aah, thanks
23:07 kyclark left
sjn hmf. seems a Pair isn't the best type for that 23:10
how are shaped arrays going? :)
ugexe m: role Interface { method req { ... } }; role Impl1 does Interface { method req { 42 } }; class My::Module { has Interface $.iface; }; my $module = My::Module.new(iface => Impl1.new); say $module.iface.req; # Technaton 23:11
camelia rakudo-moar 843a6b: OUTPUT«42␤»
23:15 dj_goku joined
timotimo shaped arrays are working except for views, and they are speeding up nicely thanks to liz' work 23:15
sjn can they be used in subtypes? (e.g. for ensuring an array only has two elements, and both values are Int) 23:18
sjn is looking for docs
timotimo my @foo[2] = 0, 0; @foo = 99, 99, 99; 23:19
m: my @foo[2] = 0, 0; @foo = 99, 99, 99;
camelia rakudo-moar 843a6b: OUTPUT«Index 2 for dimension 1 out of range (must be 0..1)␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: my @foo[2] = 0, 0; @foo = 99, 99;
camelia ( no output )
timotimo m: sub takes-two(@foo[2]) { say @foo.perl }; takes-two([4, 5])
camelia rakudo-moar 843a6b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@foo' is not declared␤at <tmp>:1␤------> 3sub takes-two(@foo[2]) { say 7⏏5@foo.perl }; takes-two([4, 5])␤»
timotimo not like that apparently
sjn ok
23:20 rurban left, dj_goku left, kyclark joined 23:23 committable6 left, evalable6 left, benchable6 left, bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6, evalable6 joined, committable6 joined, ChanServ sets mode: +v committable6, lukaramu left, benchable6 joined, unicodable6 left 23:24 unicodable6 joined, Wiertek left 23:26 adrusi left 23:27 kyclark left 23:35 firstdayonthejob left 23:39 skids joined 23:40 labster joined, labster left, labster joined 23:42 thowe joined 23:52 pyrimidine joined 23:53 Guest42590 left 23:56 pyrimidine left 23:58 Vynce joined 23:59 BenGoldberg joined