»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:08 Manifest0 left 00:14 Manifest0 joined 00:27 sortiz joined
sortiz \o #perl6 00:31
00:38 sortiz left 00:40 khisanth_ left 00:52 khisanth_ joined 00:55 reach_satori joined
Xliff o7 #perl6 00:56
Xliff drools as he sets up Electric Sheep on his new 2k 32" curved monitor.
spacedbat pardon me if this has been discussed to death, but even the error message for rakudo star downloads is out of date: rakudo.org/latest/star/macos 01:06
01:10 Manifest0 left 01:13 molaf left 01:15 Manifest0 joined 01:17 zacts joined 01:19 jhill left 01:22 iviv left 01:23 SmokeMachine left
MasterDuke spacedbat: could you create an issue here github.com/perl6/rakudo.org, thanks 01:24
01:25 molaf joined 01:26 SmokeMachine joined 01:27 skaji left
spacedbat sure thing 01:33
01:33 rindolf left
spacedbat no need github.com/perl6/rakudo.org/issues/26 01:34
01:37 SmokeMachine left 01:38 lucasb left 01:47 iviv joined 01:48 skaji joined 01:52 jhill joined, SmokeMachine joined 02:01 Manifest0 left 02:09 Manifest0 joined 03:09 quotable6 left, squashable6 left, unicodable6 left, undersightable6 left, notable6 left, benchable6 left, reportable6 left, statisfiable6 left, greppable6 left, evalable6 left, committable6 left, bisectable6 left, shareable6 left, releasable6 left, nativecallable6 left, bloatable6 left, coverable6 left, nativecallable6 joined, ChanServ sets mode: +v nativecallable6 03:10 releasable6 joined, ChanServ sets mode: +v releasable6, notable6 joined, ChanServ sets mode: +v notable6, bisectable6 joined 03:11 committable6 joined, ChanServ sets mode: +v committable6, undersightable6 joined, ChanServ sets mode: +v undersightable6, squashable6 joined, quotable6 joined 03:12 statisfiable6 joined, benchable6 joined, ChanServ sets mode: +v benchable6, coverable6 joined 03:13 shareable6 joined, bloatable6 joined, ChanServ sets mode: +v bloatable6, unicodable6 joined, ChanServ sets mode: +v unicodable6, greppable6 joined 03:14 evalable6 joined, reportable6 joined 03:18 Manifest0 left 03:24 jhill left, skaji_ joined, Manifest0 joined 03:25 jhill joined, skaji left, skaji_ is now known as skaji 03:35 Manifest0 left 03:39 johnjohn101 joined 03:40 Manifest0 joined
johnjohn101 hi perl6 03:41
03:53 Manifest0 left 03:54 afresh1 left 03:58 afresh1 joined 03:59 Manifest0 joined 04:15 Manifest0 left 04:20 Manifest0 joined 04:30 molaf left 04:31 Manifest0 left 04:37 dominix joined
dominix hi everyone 04:37
I am stuck in a studid tric
how do I print a serial sequence from "01" to let say "15" but with zero pad 04:38
like 01 02 03 04 and so on until 15 04:39
04:39 Manifest0 joined
dominix m: <01 .. 63>.say 04:39
evalable6 (01 .. 63)
dominix m: <01 .. 15>.say
evalable6 (01 .. 15)
dominix m: <01 .. 05>.say
evalable6 (01 .. 05)
dominix m: [01 .. 15].say 04:40
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/c5e07a58ef3d363d1c...83fb7961f1
dominix m: 01 .. 15.say
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/0a7c53a28213ce6b01...b94809ec0a
dominix m: 1 .. 15.say
evalable6 WARNINGS for /tmp/jnmPowxv_I:
15
Useless use of ".." in expression "1 .. 15.say" in sink context (line 1)
dominix m: <1 .. 05>.say 04:41
evalable6 (1 .. 05)
dominix m: <1 ... 05>.say
evalable6 (1 ... 05)
dominix m: [01 ... 15].say
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/a33916b65be3ae1361...95bf371372
dominix m: (1 .. 05).say
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/d993eed788e197acf3...324240dd01
dominix m: (1..5).say.perl
evalable6 1..5
dominix m: (1..5).perl 04:42
evalable6
tadzik m: (1..15).map(sprintf("%02d", *).say 04:44
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/yMTstGAI5P
Unable …
tadzik, Full output: gist.github.com/452e925bf8dc8e44f1...3741f4543a
tadzik oopsie
m: (1..15).map(sprintf("%02d", *)).say
evalable6 (exit code 1) Directive d not applicable for value of type Whatever (*)
in block <unit> at /tmp/ovpL2othiv line 1
tadzik oh pffft
m: (1..15).map(sprintf("%02d", Int(*))).say 04:45
evalable6 (exit code 1) Cannot find method 'Int' on object of type Whatever
in block <unit> at /tmp/KscRUumx5r line 1
tadzik o_O
dominix m: (1 .. 05).WHAT
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/b4b8d979fd62e91983...85d6fb7bc3
tadzik m: (1..15).map({ sprintf("%02d", $_) }).say
evalable6 (01 02 03 04 05 06 07 08 09 10 11 12 13 14 15)
tadzik shrugs
at least it works :) 04:46
dominix m: (1..15).map({ sprintf("%02d", $_) }).say
evalable6 (01 02 03 04 05 06 07 08 09 10 11 12 13 14 15)
dominix m: (1..15).map({ sprintf("%02d", $_) }).say.what
evalable6 (exit code 1) (01 02 03 04 05 06 07 08 09 10 11 12 13 14 15)
No such method 'what' for invocant of type 'Bool'. Did you mean any of these?
Rat
flat

in block <unit> at /tmp/4iZpptgIzL line 1
dominix m: (1..15).map({ sprintf("%02d", $_) }).what
evalable6 (exit code 1) No such method 'what' for invocant of type 'Seq'. Did you mean any of these?
Rat
flat

in block <unit> at /tmp/_Czi4AKDh6 line 1
dominix m: (1..15).map({ sprintf("%02d", $_) }).WHAT
evalable6
dominix m: (1..15).map({ sprintf("%02d", $_) }).perl
evalable6
tadzik what are you trying to do now?
dominix m: (1..15).map({ sprintf("%02d", $_) }).perl.say
evalable6 ("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15").Seq
dominix ok it is a list 04:47
tadzik effectively, yes
dominix how to make it a string
?
like 01 02 03 ..
tadzik join it
m: (1..15).map({ sprintf("%02d", $_) }).join(" ").say
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
dominix m: (1..15).map({ sprintf("%02d", $_) }).join.say
evalable6 010203040506070809101112131415
dominix m: (1..15).map({ sprintf("%02d", $_) }).join(" ").say 04:48
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
dominix ok, nice
but tricky
tadzik well, you have to be specific with these things :)
dominix it would be lots easier in perl5 .... :-(
tadzik would it?
dominix perl -E 'print " $_ "for "01" .. "63"' 04:49
tadzik hm 04:50
.say for "01".."15"
evalable6 01
02
03
04
05
11
12
13
14
15
tadzik this is curious :)
04:50 zacts left
dominix it is 04:51
tadzik but tbh I find it confusing that it works in perl 5 this way 04:52
dominix m: say(sprintf("%02d", $_)) for 01 .. 63 04:55
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/d82de081a2f0181e60...cded0b66fb
dominix m: say(sprintf("%02d", $_)) for 1 .. 15
evalable6 01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
dominix m: print(sprintf("%02d", $_)) for 01 .. 63 04:56
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/05e8ca76d6795e6e8a...b21059fe52 04:57
dominix m: print(sprintf("%02d", $_)) for 01 .. 15
evalable6 Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal numb…
dominix, Full output: gist.github.com/e7e70197f1772d3efa...72c4728ee8
dominix m: print(sprintf("%02d", $_)) for 1 .. 15
evalable6 010203040506070809101112131415
dominix m: print(sprintf("%02d ", $_)) for 1 .. 15
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
dominix m: (1..15).map({ sprintf("%02d", $_) }).join(" ").say 04:58
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
05:03 robertle left 05:17 sauvin joined 05:21 maettu joined 05:24 araraloren joined, araraloren left 05:28 araraloren joined, jmerelo joined, cpan-p6 left 05:29 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
jmerelo releasable6: status 05:29
releasable6 jmerelo, Next release in ≈3 days and ≈13 hours. 2 blockers. 132 out of 272 commits logged (⚠ 2 warnings)
jmerelo, Details: gist.github.com/ffbf7ce228ede1202a...36c95d2894
Geth doc: 424918aa3a | (JJ Merelo)++ | doc/Type/Map.pod6
Some reflow and minor corrections
05:46
doc: ab850be568 | (JJ Merelo)++ | doc/Type/Cool.pod6
De-dups fmt and reflows, closes #2740
elcaro dominix: ['01' .. '15'] is the best way, but instead of sprintf you can also use the .fmt method 05:52
m: say (1..15)».fmt('%02d')
evalable6 (01 02 03 04 05 06 07 08 09 10 11 12 13 14 15)
elcaro or if you want the whole thing as a string, .fmt will act on single elems in a list 05:53
m: say (1..15).fmt('%02d').perl
evalable6 "01 02 03 04 05 06 07 08 09 10 11 12 13 14 15"
elcaro FYI, sprintf and friends is rather slow right now, but lizmat is working on a faster solution that will be faster 05:55
erm... i meant, working on a new implementation that will be faster
jmerelo fmt is sprintf in method form, basically. 05:56
elcaro kinda, but has slightly different semantics as i showed above, ie. @list.fmt('%s') will format each elem in @list as %s, then join the whole thing together (with spaces) as a single string 05:57
m: say (^15).fmt('%X')
evalable6 0 1 2 3 4 5 6 7 8 9 A B C D E
elcaro but yes, on a String, $s.fmt('%s') is eqv to '%s'.sprintf($s) 05:58
jmerelo elcaro: Cool and Stringy; it's special-cased in many other classes but it's basically "stringify every element and apply fmt" instead of "stringify the whole thing and apply fmt" 06:00
araraloren I thought it's like `"foo".sprintf("%s")` when I know there is a method version sprintf .. 06:02
jmerelo araraloren: the implementation is not exactly the same: github.com/rakudo/rakudo/blob/0105...e/Cool.pm6 06:03
araraloren: fmt passes a list to nqp::sprintf, while sprintf works slighly differently. Can't tell you exactly what because it's NQP, but my impression is that it's slightly different 06:05
So I take back that fmt is sprintf in method form. It's not. Including the fact that sprintf can also be in method form. 06:06
araraloren yeah, I see
06:08 nebuchadnezzar left, dominix_ joined, nebuchadnezzar joined 06:11 araraloren left, araraloren joined, dominix left 06:15 domidumont joined
dominix_ m: say (1..15)».fmt('%02d').join.say 06:20
evalable6 010203040506070809101112131415
True
dominix_ m: say (1..15)».fmt('%02d').join(" ").say 06:21
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
True
06:21 dominix_ is now known as dominix
elcaro dominix: you used 'say' twice, hence the 'True' at the end 06:22
m: say 1.say
evalable6 1
True
elcaro say('foo') returns True
(provided say succeeds... it might fail if, eg $*OUT cannot be written to) 06:23
dominix yes, your right, useless use of say :-) 06:25
m: say (1..15)».fmt('%02d').join(" ")
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
dominix m: say (1..15).fmt('%02d') 06:26
evalable6 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
dominix neat
that looks better
elcaro yep, i use .fmt on List often when formatting data in columns, eg. for @list.batch(4) { .fmt('%-16s').say }) 06:29
06:35 abraxxa joined
elcaro example... 06:36
tio.run/##K0gtyjH7/z@3UsEhMacgIzEp...G6Jlft//8A
06:37 netrino joined 06:38 abraxxa left, abraxxa joined 06:41 yuriii joined 06:59 jhill left, Manifest0 left 07:00 jhill joined 07:04 dominix left, Manifest0 joined, dominix joined, Grrrr left 07:08 dominix left, nekomune left 07:09 nekomune joined 07:11 patrickb joined 07:14 Grrrr joined 07:23 reach_satori left 07:25 kensanata joined 07:41 ayerhart left 07:42 ayerhart joined 07:46 netrino left 08:00 Manifest0 left 08:01 cgfbee left 08:05 Manifest0 joined 08:17 scimon joined 08:19 netrino joined 08:31 Manifest0 left 08:34 robertle joined, xinming left 08:36 xinming joined, Manifest0 joined, molaf joined 08:40 kurahaupo left, kurahaupo joined, kurahaupo left 08:41 kurahaupo joined 09:02 rindolf joined 09:15 zakharyas joined 09:17 reach_satori joined 09:23 a3f left, a3f joined, a3f left, a3f joined 09:27 dogbert11 joined 09:29 dogbert17 left 09:40 molaf left, ZZZzz joined 09:45 gfldex left
ZZZzz Browsing docs.perl6.org I failed to find a method to retrieve a file's user and group which I expected in IO::Path. Did I miss something? 09:46
elcaro I believe the reasoning is that file group is no a platform independent concept 09:49
but P5getgrnam exists on the ecosystem that mimics Perl 5's getgrnam() functuin 09:50
timotimo modules.perl6.org/dist/UNIX::Privi...pan:JSTOWE - does this do everything you need?
hm, doesn't seem to be able to read the owner/group of something, only set it? 09:51
ZZZzz I'll check out both. brb.
elcaro JSTOWE also has IO::Path::Mode for permission-y stuff
but he wrote that on my request before IO.mode existed, so it overwrites that method 09:52
i believe he was going to resolve that conflict, but I don't think that's been done
Woodi docs.perl6.org/language/5to6-perlfunc#stat says available via NativeCall :) probably no one needet it yet. and maybe libuv have this 09:57
*needed
ZZZzz Gotta fix my build system first. UNIX::Privileges won't build because it does not find some include. 09:58
10:05 reach_satori left 10:09 epony left, netrino left
ZZZzz Unfortunately they do not work for me. Both modules provide means to get info about a user/group but not the uid/gid of a given file. 10:15
No big deal. I'll just resort to ls(1) then. 10:16
I'll look into natively calling stat(2) later. First I need a working script. Thank you all for your time! 10:18
10:18 Mikey_ joined 10:19 MikeyG left 10:22 gabiruh left 10:25 gabiruh joined 10:30 atroxaper joined
atroxaper Hello, #perl6 ! 10:30
Does anybody know, is react block threadsafe? I mean should I call $*THREAD.full-barrier in each whenever block to sync memory changes? Or whenever block does it for me automatically? 10:32
timotimo a react block will only ever have one thread be in it at a time 10:33
though of course you can run the same react block on multiple threads, in which case they are not counted as "the same react block" 10:34
10:34 Manifest0 left 10:36 JappleAck left
jnthn atroxaper: A react block is a bit like an actor: a given instance of it will only process one message at a time. 10:37
So unless you're doing anything really odd, you should be safe :)
10:40 Manifest0 joined 10:43 araraloren left, araraloren joined 10:50 Black_Ribbon left
atroxaper jnthn: 'one message at a time', but not 'each message in the same thread'. If I store some value variable while handle a message, do it syncronized to another thread and another message handle. In the same react of cource. 10:50
jnthn atroxaper: Yes, because enforcement of the concurrency control implies a write barrier inside of the locking mechanism. 10:57
atroxaper jnthn: Oh... I was obviously... Sorry. I had to figure it out on my own. If we have an "actor" then we have a barrier. Thank you :) 10:59
11:04 Manifest0 left 11:07 epony joined 11:09 Manifest0 joined 11:17 molaf joined, zakharyas left, Manifest0 left 11:26 Manifest0 joined 11:30 domidumont left 11:31 domidumont joined
Xliff m: role A { say self.b }; 11:42
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/puWx7yrbGB
'self' …
Xliff, Full output: gist.github.com/2515b93d6ccfa3631c...b13bc016ba
Xliff m: role A { method a { self.b.say}; };
evalable6
Xliff m: role A { method b { ... }; method a { self.b.say}; }; 11:44
evalable6
Xliff m: role A { method b { ... }; method a { self.b.say}; }; class B does A { }
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/PDt3EGrgbp
Method 'b' must be implemented by B because it is required by roles: A.
at /tmp/PDt3EGrgbp:1
Xliff \o/
cpan-p6 New module released to CPAN! Game::QFG (0.1.4) by 03HOLYGHOST 11:52
12:05 kktt joined, llfourn left 12:07 jmerelo left
cpan-p6 New module released to CPAN! GTK::V3 (0.10.2) by 03MARTIMM 12:22
elcaro ZZZzz: if you have Inline::Perl5 set up, you could just do: use POSIX:from<Perl5> <stat>; say stat($filename); 12:24
ZZZzz elcaro: That looks useful. Thank you very much for pointing it out! 12:28
elcaro actually... i remember nqp has a stat implementation 12:30
use nqp; say nqp::stat($?FILE, nqp::const::STAT_UID);
evalable6 1005
elcaro use nqp; say nqp::stat($?FILE, nqp::const::STAT_GID);
evalable6 1005
elcaro refer to this doc for other consts github.com/perl6/nqp/blob/master/d...kdown#stat
could easily be wrapped in a File::Stat module... but would only work on POSIX systems 12:31
12:36 llfourn joined 12:44 llfourn left
Geth doc/Xliff-patch-1: ebe9132756 | Xliff++ (committed using GitHub Web editor) | doc/Language/functions.pod6
Adds output to nextsame example.

This way new users can understand the point of the call without having to open a REPL and figuring it out for themselves.
12:45
doc: Xliff++ created pull request #2744:
Adds output to nextsame example.
12:47
12:50 sena_kun joined 12:55 zakharyas joined
holyghost .tell jmerelo I have updated the in-code docs of latest modules somewhat, I need an online link for documenting my modules all through. If I have it by tomorrow I'll try to document 3 modules of mine 12:59
yoleaux holyghost: I'll pass your message to jmerelo.
13:00 Guest2775 left 13:01 raschipi joined
holyghost .tell jmerelo I want a link to document a module, what used to be perldoc, so not in-code but in some file 13:02
yoleaux holyghost: I'll pass your message to jmerelo.
13:12 JappleAck joined 13:15 raschipi left 13:18 Guest55475 joined 13:22 netrino joined, zacts joined, lucasb joined 13:26 chuff joined 13:32 johnjohn101 left 13:34 zacts left 13:36 skids joined, robertle left
Xliff m: role A { my @a; }; 13:37
evalable6
cpan-p6 New module released to CPAN! Game::QFG (0.1.5) by 03HOLYGHOST 13:38
13:38 robertle joined
elcaro ZZZzz: github.com/0racle/p6-File-Stat 13:43
should be on ecosystem shortly, or you can just git clone it and install 13:44
Xliff m: my @a = <a b>; multi sub ($a where * eq @a.any) { say 42 }; multi sub a(*@a) { say 'WTF?' }; a('a'); a('b'); a(24) 13:48
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/2JDiFL_AIN
An anon…
Xliff, Full output: gist.github.com/bb75ad4c8d5e798211...5e43c376bf
Xliff m: my @a = <a b>; multi sub a ($a where * eq @a.any) { say 42 }; multi sub a(*@a) { say 'WTF?' }; a('a'); a('b'); a(24) 13:49
evalable6 42
42
WTF?
masak just got bitten by "you can put a semicolon in an array, and it's not a syntax error" for the first time ever 13:50
ZZZzz elcaro: This is perfect. Thank you so much! 💐
masak if I'd been a betting person, I'd have guessed that'd'd happened much earlier ;)
Xliff m: my @a = <a b>; my @b = <c d>; multi sub a ($a where * eq (|@a, |@b).any) { say 42 }; multi sub a(*@a) { say 'WTF?' }; a('a'); a('c'); a(24)
evalable6 42
42
WTF?
Xliff m: my @a = <a b>; my @b = <c d>; multi sub a (Str() $a where * eq (|@a, |@b).any) { say 42 }; multi sub a(*@a) { say 'WTF?' }; a('a'); a('c'); a(24) 13:51
evalable6 42
42
WTF?
elcaro ZZZzz: np... Arguably I should also add lstat to the module 13:52
ZZZzz elcaro: That might be useful, too. At the moment I'm not working with symlinks, so your implementation is perfect for my use case. Looking at the code it seems like I could do that myself once needed. It certainly makes me want to have a look at the functionality provided by NQP. Again, thank you. Your time and effort is much appreciated. 13:58
holyghost elcaro : get a pause login at metacpan.cpan.org to ecoify your module 14:09
elcaro Yeah, I figure rather than creating a whole new class, File::Stat->new('filename', :lstat) will use lstat, then export a lstat func 14:10
i *do* have a pause login (ELCARO) but, i think there were issues getting it validated, but that was before auth was migrated to OAuth or whatever it's using,
so i'll give it another shot
holyghost sure 14:11
14:15 zacts joined 14:24 mowcat joined 14:31 chuff left 14:37 kktt left
cpan-p6 New module released to CPAN! File::Stat (0.0.1) by 03ELCARO 14:38
14:40 llfourn joined 14:46 llfourn left
JappleAck is this cpan bot for perl5 packages or perl6? 14:46
timotimo perl6 14:47
JappleAck can't find announced package modules.perl6.org/search/?q=File%3A%3AStat
timotimo that page takes a while to update 14:48
actually, i'm not sure if the cron job is turned back on yet
JappleAck back after what?
timotimo after our server asploded 14:49
JappleAck and when did it happened actually? 14:51
timotimo just before easter
JappleAck was it really exploded?) or it's just a figure of speech?
timotimo not quite exploded, but the hardware seems to be damaged beyond repair
moritz it's dead, jim 14:54
speaking of which, is anybody interested in the list of sites that it hosted, and the apache configs for each? 14:58
timotimo that would be helpful
moritz cat: apache2/sites-available/design.perl6.org.conf: Input/output error 15:00
FUUU
timotimo d'oh
elcaro JappleAck: It's there now
moritz I'll try to reboot, and then mount that image again 15:01
rba uhh
patrickb moritz: I think you should get in contact with rba and maettu. They are currently looking into the re-setup of the infrastructure...
JappleAck yeah, i can see it now
rba we are currently try to understand what all is gone and put a list together. 15:02
15:03 llfourn joined
rba moritz: timotimo meant you might eventually know how ecosystem-api.p6c.org/ was put together and where the source is... 15:06
timotimo yeah, i think it was only on hack's hard drive
i wonder if putting up a webserver at that address that just 404s will make zef fast again for everybody stuck on previous versions
patrickb rba: I think ugexe is the right person to ask about ecosystem-api 15:07
rba: github.com/ugexe/Perl6-ecosystems
rba patrickb: thank you. will look into it. 15:08
15:08 llfourn left
moritz rba: I can try to recover its config as well 15:09
timotimo: perlgeek.de/p6/apache2.tar.gz there you go 15:13
timotimo JappleAck: anyway, i started the modules.perl6.org update again, it'll be ready in ... perhaps half an hour?
moritz timotimo: anything else you might need from the old www.p6c.org? like cron jobs, maybe? 15:15
rba moritz: was there an irc bouncer software install/configured on irc.perl6.org?
moritz rba: no, just screen/tmux + irssi/other chat software 15:16
timotimo moritz: maybe rescue the collectd database for posthumous analysis 15:17
but that was probably not on www.p6c.org
15:18 jmerelo joined
moritz timotimo: my experience with that is not great. In the past it had always stopped recording when things went south :( 15:18
timotimo yeah
but there could still be an interesting nugget somewhere 15:19
15:20 domidumont left
moritz re ecosystem-api, I'm pretty sure you just need to clone github.com/perl6/ecosystem and run update.pl 15:22
or maybe the more modern server/updatelist.pl 15:23
and that generates a static file `projects.json`, which should be in the document root 15:24
and that is statically served, and that's all there's to it
timotimo huh 15:26
15:26 AlexDani` joined
timotimo i don't think updatelist.pl does that 15:26
Geth doc: ebe9132756 | Xliff++ (committed using GitHub Web editor) | doc/Language/functions.pod6
Adds output to nextsame example.

This way new users can understand the point of the call without having to open a REPL and figuring it out for themselves.
15:27
doc: 633d30462e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
Merge pull request #2744 from perl6/Xliff-patch-1

Adds output to nextsame example.
timotimo we need projects1.json, not projects.json
oh
server/updatelist
sorry
yeah, that seems righter
now i feel stupid
15:28 Xliff left 15:29 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined, Xliff joined
AlexDaniel github.com/perl6/problem-solving/p...-488716403 15:30
timotimo JappleAck: can you check if modules.perl6.org has everything you were expecting? 15:37
JappleAck timotimo: i didn't expecting more that an anounced module on that page modules.perl6.org/search/?q=File%3A%3AStat 15:38
timotimo well, it looks like it's there :)
JappleAck and that was already working, i reported above
timotimo oh, OK!
cpan-p6 New module released to CPAN! Game::AI::Messaging (0.1.5) by 03HOLYGHOST 15:39
JappleAck why does the bot called "cpan" anyway?
holyghost ^-- some people asked me to release the messaging system solo from Game::QFG
JappleAck is it because it's just a fork of perl5 cpan? 15:40
timotimo the data lives on the actual cpan
araraloren the module was update to CPAN
holyghost AFAIK it's META.json for perl6 15:41
I just dump everything in a Perl6 dir on CPAN, which won;t work solo 15:42
15:42 robertle left
holyghost I saw your upload, elcaro++, yw 15:47
moritz timotimo: do you need more input for ecosystem-api? 15:49
mounting a gzip'ed qcow2 image is harder than I thought, and I don't have enough free space to decompress it
timotimo holyghost: you're uploading distributions without tests again? 15:51
15:52 llfourn joined
holyghost hail. 15:52
xinming timotimo: I don't like writing tests too, Seems lone worker doesn't do that, The program just need to pass the test of his heart. :-)
araraloren You need test ensure your module design :) 15:53
timotimo i'm just saying, the code doesn't look like most of it works right
moritz heresy! hearsay! 15:54
timotimo holyghost: for example, using == against Nil is probably not doing what you think it's doing
method BUILD will not be passed any positional parameters, only named parameters 15:55
holyghost right
timotimo in the Message class, you define the attributes to be "is rw" but you also have accessors there that are not rw
if there's no "method elems" in the objects that split-message will receive - and from the methods you're calling on it it looks like it'd be an instance of Message at least), it'll return 1 15:56
15:56 llfourn left
timotimo so in particular, it'll never be > 4 15:56
15:56 abraxxa left
holyghost aagh, I'll update later on 15:57
timotimo m: my @test; my $i = 1; push (@test, $i);
evalable6 (exit code 1) Cannot call 'push' on an immutable 'List'
in block <unit> at /tmp/968lQxMSYn line 1
timotimo m: my @test; my $i = 1; push(@test, $i);
evalable6
araraloren yeah, and maybe there are some spelling mistake :D
timotimo ^- you need to remove the space here, this code is in AI.pm6
unless the objects in @entities actually have a .Numeric or .Bridge or some other kind of numification, comparing them using == is not going to do what you want 15:58
araraloren oh, intesting error
holyghost ok 15:59
araraloren s/intesting/interesting/
15:59 patrickb left
timotimo intestine error? :D 15:59
holyghost multi method split-message works ?
anyway, I'll debug it tomorrow :-) *blush*
araraloren m: my @test; my $i = 1; push (@test, $i); # I mean this
evalable6 (exit code 1) Cannot call 'push' on an immutable 'List'
in block <unit> at /tmp/XXDfxiO3KL line 1
timotimo i don't know if it works, how about you try running it against some actual data? 16:00
xinming timotimo: termbin.com/2o34
Could you please check wether it's a parser bug?
I think it's a parser bug.
But not sure
araraloren I was trying spacemacs yesterday, it's awesome :D 16:01
xinming Ignroe me
araraloren But seems like perl6.mode is not maintained right now :/
moritz xinming: it's a precedence problem
xinming timotimo: Ignore me, I just realized I need parens
yes.
moritz: ignore me. :-)
moritz or use && instead of "and" 16:02
/ignore xinming
holyghost araraloren : I don't know much about the immutablility of lists, I guess I need to use arrays
except for NSMutableArray etc :-) 16:03
araraloren holyghost Using .method style will avoid this problem :D
holyghost I understand :-)
timotimo yeah, the precedence of "and" is very loose
araraloren m: my @test; my $i = 1; @test.push($i) # you don't have to worry about whitespace
evalable6
holyghost timotimo : so you cannot equivalency check instances ? 16:04
with == I mean
timotimo no, == is numeric comparison
holyghost ok
araraloren maybe using ===
timotimo it will always try to numerify
araraloren Is === will try to numerify ?
timotimo no 16:05
16:05 llfourn joined
araraloren okay, thanks 16:06
holyghost I've debugged all you said
I'll upload tomorrow though it's 6pm here 16:07
I'll talk with JJ about documenting everything tomorrow
I'm get up at 6am 16:08
s/I'm/I
too much sun :-)
jmerelo It's been raining cats and dogs here in southern Spain... 16:10
yoleaux 12:59Z <holyghost> jmerelo: I have updated the in-code docs of latest modules somewhat, I need an online link for documenting my modules all through. If I have it by tomorrow I'll try to document 3 modules of mine
13:02Z <holyghost> jmerelo: I want a link to document a module, what used to be perldoc, so not in-code but in some file
16:10 llfourn left
jmerelo holyghost: it's called POD6 or Perl 6 Pod docs.perl6.org/language/pod Similar to POD, but improved. 16:11
holyghost hi jmerelo
ok
16:11 Xliff left
holyghost I'll take a look at it tomorrow or next week, thanks 16:12
16:12 Xliff joined
holyghost hi Xliff 16:12
jmerelo holyghost: sure
holyghost I have to debug 2 modules also, see above
I'm into the spiffiness of writing modular Quest for Glory games :-) 16:13
timotimo holyghost: IMO debugging is not finished when the program compiles and/or is free of the most glaringly obvious problems
jmerelo holyghost: I think everyone would very much prefer them debugged and documented before being uploaded to CPAN, but it's your call. Also see: CPAN is not a source control management system. 16:14
holyghost right
xinming m: multi sub test ($name, *%args) { %args.perl.say; %args<a>.say; %args<c>.say; }; my %h = <a b c d>; test("T2", |%h<a c>:p);
evalable6 (exit code 1) Cannot resolve caller test(Str:D, Str:D, Str:D); none of these signatures match:
($name, *%args)
in block <unit> at /tmp/M9RRZIeNLF line 1
xinming In this example, how do we turn %h<a c> list of pairs to named args? 16:15
timotimo |(%h<a c>:pairs)
should do it
holyghost problems with test writing for am AI messaging system is it needs more data
xinming m: multi sub test ($name, *%args) { %args.perl.say; %args<a>.say; %args<c>.say; }; my %h = <a b c d>; test("T2", |(%h<a c>.pairs)); 16:16
evalable6 (exit code 1) Cannot resolve caller test(Str:D, Pair:D, Pair:D); none of these signatures match:
($name, *%args)
in block <unit> at /tmp/2ZxrLxGg7U line 1
16:16 Xliff left
xinming timotimo: It doesn't. :-) 16:16
holyghost anyhow, I do like to debug off the top off my head, but I'm not fool-proof :-)
ok, I'm going to grab a beer, I'm not afk however
jnthn m: multi sub test ($name, *%args) { %args.perl.say; %args<a>.say; %args<c>.say; }; my %h = <a b c d>; test("T2", |%(%h<a c>:p));
evalable6 {:a("b"), :c("d")}
b
d
timotimo ah, yes, an extra %
16:16 Xliff joined
xinming jnthn: Thanks 16:16
timotimo what i wrote will literally put Pair objects as positionals
jnthn To flatten as nameds it needs to be hashish 16:17
xinming Got it, thanks.
jmerelo jnthn: I'd like to see that on a t-shirt 16:18
jnthn: maybe with "The p6y way" on the back. 16:19
jnthn omg, I only just saw the other reading :D
jmerelo jnthn: :-) 16:20
16:21 Xliff left, zacts left
xinming m: class T { has $.t = "def"; submethod BUILD (:$t) { $!t = $t ?? $t !! $!t; } }; T.new.t.perl.say 16:23
evalable6 Any
xinming What is the best way to write this kind of logic?
attribute has default value, But whenever user provided, it'll be updated 16:24
m: class T { has $.t = "def"; submethod TWEAK (:$t) { $!t = $t ?? $t !! $!t; } }; T.new.t.perl.say
evalable6 "def"
jnthn I'd probably move the default 16:25
xinming This worked. Is there simpler way for this?
jnthn: So, You mean move default things to BUILD, right?
jmerelo m: class T { has $.t = "def"; }; T.new.t.perl.say; T.new(t=>'abc').t.perl.say
evalable6 "def"
"abc"
jnthn m: class T { has $.t; submethod BUILD(:$!t = 'def') { } }; T.new.t.perl.say
evalable6 "def"
jnthn m: class T { has $.t; submethod BUILD(:$!t = 'def') { } }; T.new(:42t).t.perl.say
evalable6 42
xinming Ah, in build method with default in method arg is better. 16:26
the default is a big hash anyway. thanks for the idea.
jnthn m: class T { has $.t = 'def'; submethod TWEAK(:$!t = $!t) { } }; T.new.t.perl.say # this works but, hmm :)
evalable6 "def"
jnthn m: class T { has $.t = 'def'; submethod TWEAK(:$!t = $!t) { } }; T.new(:42t).t.perl.say # this works but, hmm :) 16:27
evalable6 42
jnthn (It works just as I expect, it's completely defined behavior, it just looks a tad odd :))
jmerelo jnthn: but what's the difference? Sorry, can't really see that...
jnthn jmerelo: Between which two?
jmerelo jnthn: between just using the default value as I did above. 16:28
m: class T { has $.t = "def"; }; T.new.t.perl.say; T.new(:42t).t.perl.say
evalable6 "def"
42
16:28 scimon left
jnthn jmerelo: Nothing, I'm assuming xinming has reason to need to write the BUILD method that wasn't featured in the example :) 16:28
But of course, if no BUILD is needed then it's easy to just let the default behavior take care of it :) 16:29
jmerelo jnthn: Ah, OK. So that's just a part of a bigger class where you positively need a BUILD for the other attributes or whatever. Thanks! 16:30
xinming It's just a habit of using BUILD, since the TWEAK method comes later, and I just don't know the diff between them. even read the docs.perl6.org
jmerelo reminds that StackOverflow is also a great place to get your questions answered, sometimes with more extensive explanations :-) 16:31
jnthn xinming: TWEAK runs after defaults construction behavior has taken place. BUILD gives you complete control over construction behavior.
*default
jmerelo xinming: that's pretty much in the documentation, here: docs.perl6.org/language/objects#Ob...nstruction but of course if you don't find it enough, or find it confusing, just raise an issue. 16:32
jmerelo reminds that tomorrow we have a documentation hackathon:
squashable6: status
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in ≈19 hours (2019-05-04 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
xinming It's not confusing, I just don't read the doc clear enough. 16:33
I've read the perl6 docs several times, there are still many things I know perl6 has it, But I'm not able to use it well. :-)
even for cocurrency, It takes me 2 weeks to get the idea right. 16:34
guifa One way to think of it is that during BUILD, the object isn’t yet fully made — so none of the attributes are set yet. But in TWEAK, it’s made, you’re just doing some modifications to it — but attributes have already been set.
holyghost I don't find perl6 easy indeed
I'm just doing the OOP thing with it :-) 16:35
although it has far more adavnced OOP features
s/adavnced/advanced
xinming holyghost: design of perl6 is elegant, But if you want to use it well, it has many things to learn. But perl6 is the only worth learning language ATM IMHO.
holyghost I agree
xinming before I wished to learn many other languages, to understand what good features there are in these language, in perl6, You have them all already. :-) 16:36
have all the best of them.
16:36 patrickb joined
holyghost I understand 16:36
I need to read up sometimes for having its features, get lost in hack attacks 16:37
s/its features/using its features
16:37 zacts joined
guifa new = not even started, the object isn’t instantiated, so no attribute access period. BUILD = in process, it’s been instantiated, but attributes aren’t set (but can be set) — bless passes its arguments here. TWEAK = completed, instantiated with attributes, but you can still tweak them a bit if you need to. 16:37
xinming guifa: thanks for the explanation. 16:38
16:39 zakharyas left
timotimo "new" == "Not Even Wreal" 16:39
16:39 zacts left 16:41 squashable6 left 16:42 squashable6 joined
squashable6 Webhook for perl6/doc is now active! Approachable is better than simple. 16:42
holyghost lol 16:43
jmerelo AlexDaniel: thanks!
16:45 jeromelanteri joined
guifa xinming, generally I think of it as use BUILD if you know more of the inner workings. Use TWEAK otherwise. In the docs, there’s an example of a rectangle class with a cached area. You could imagine having a base class Rectangle, but everytime you call $rectangle.area, it would calculate it. So you subclass to make it RectangleCached. You don’t want to fiddle with the new or BUILD stuff, because you don’t know how it works interna 16:46
All you want to do is ensure that .area is a saved value that’s guaranteed. So you TWEAK to calculate it, and store it in a new attribute for your subclass. If you do RectangleCached.new(0,0,4,6), you can be guaranteed that the area is calculated, and you didn’t need to know anything about its internal workings.
16:47 zakharyas joined
holyghost m: class A { multi method B {}; multi method B($msg) {}; }; A.new.B(0); 16:48
evalable6
holyghost void overrun :-) 16:49
now I know the multi keyword :-) 16:50
16:52 kensanata left
guifa If you have full control over the object, there’s theoretically nothing you can in BUILD or TWEAK that you can’t do in the other. From a practiacl standpoint, the only difference is that default attribute values are not yet set in BUILD. (but of course, if you have full control, you can just set them manually in the BUILD method) 16:52
16:54 Manifest0 left
moritz the key difference is that BUILD is called before the subclasses' BUILD submethods are called 16:57
16:58 domidumont joined 16:59 kaare__ left, kaare__ joined 17:00 Manifest0 joined 17:12 Sgeo_ joined, robertle joined 17:15 llfourn joined, Sgeo__ left 17:18 zacts joined
atroxaper sub named(:$name = 'Jone') {say $name // 'Jane'}; sub caller(:$name) {named(:$name)}; caller() 17:18
evalable6 Jane
atroxaper sub named(:$name = 'Jone') {say $name // 'Jane'}; sub caller(:$name) {$name.defined ?? named(:$name) !! named}; caller() 17:19
evalable6 Jone
atroxaper Is there pretty way to do second result. I mean without .defined ?? !!
araraloren / 17:20
'//'
mst aaaaa: twitter.com/jimmykoppel/status/112...2737601537 17:21
tadzik at least they seem to support unicode?
atroxaper araraloren: For example? :) 17:22
araraloren m: say Any // 123; 17:23
evalable6 123
17:25 JappleAck left
atroxaper araraloren: It is not my question. I what to forward a parameter of one sub to another with default value. I the parameter are missed and I forward it then the default value will not be used. But I want to use default value in that case. That is why I do .defined ?? !!. I think it is ugly. 17:25
17:28 molaf left 17:29 kurahaupo left, kurahaupo joined, kurahaupo left, kurahaupo joined, JappleAck joined
holyghost is going to the bar, afk for an hour 17:30
El_Che don't drink and drive 17:31
or at least, commit first
(and don't forget to push)
:)
araraloren atroxaper not have any idea :)
atroxaper araraloren: me too :) 17:32
17:34 zakharyas left
tobs m: sub named(:$name = 'Jone') {say $name // 'Jane'}; sub caller(|c) {named |c}; caller() # atroxaper: I assume capturing *all* args is too rigid? 17:34
evalable6 Jone
atroxaper tobs: Hm... Nice hack. It will work in not all cases but why not :) 17:36
tobs My suspicion is that you have to call &named with a Capture which doesn't have `name` as a key (as opposed to having a `name` key with an undefined value) for the default in the signature to take effect. But I'm failing to find that in the docs right now. 17:38
atroxaper tobs: You right. I is true. But I try to find an elegant way to call &named without .defined ?? !! check. 17:42
17:43 jeromelanteri left
atroxaper tobs: If we will have two such parameters then we will have to check 4 variants. Or create %params map with parameters, grep it for defined values and call named(|%params) 17:45
tobs I got that :) I was stuck figuring out why exactly the first line didn't do it.
atroxaper sub named(:$name = 'Jon') {say $name // 'Jane'}; sub caller(:$name) {named(|%(:$name).grep(*.value.defined))}; caller(); # tobs my variant 17:49
evalable6 Jon
17:55 jeromelanteri joined
tobs atroxaper: that seems to be the best I can come up with, too. But I put it into a sub so it doesn't look so daunting. 17:55
atroxaper sub postfix:<¥>($map) {$map.grep(*.value.defined)} sub named(:$name = 'Jon') {say $name // 'Jane'}; sub caller(:$name) {named(|%(:$name)¥)}; caller(); # tobs: the new postfix maybe :) 17:57
m: sub postfix:<¥>($map) {$map.grep(*.value.defined)} sub named(:$name = 'Jon') {say $name // 'Jane'}; sub caller(:$name) {named(|%(:$name)¥)}; caller();
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/HWnSP4HQBB
Strange…
atroxaper, Full output: gist.github.com/b732dc47a3f728dcbd...91c1b945c8
atroxaper m: sub postfix:<¥>($map) {$map.grep(*.value.defined)}; sub named(:$name = 'Jon') {say $name // 'Jane'}; sub caller(:$name) {named(|%(:$name)¥)}; caller(); 17:58
evalable6 Jon
xinming m: multi sub test ($name, *%args) { %args.perl.say; %args<a>.say; }; my %h = <a b c d>; test("T2", "x" => 2); 18:01
evalable6 (exit code 1) Cannot resolve caller test(Str:D, Pair:D); none of these signatures match:
($name, *%args)
in block <unit> at /tmp/aYJ2GYRJtg line 1
xinming I read the doc before, I forgot where the doc is, But wonders, how p6 handles the "x" => 2 vs x => 2 in sub call? 18:02
m: multi sub test ($name, *%args) { %args.perl.say; %args<a>.say; }; my %h = <a b c d>; test("T2", x => 2);
evalable6 {:x(2)}
(Any)
xinming m: multi sub test ($name, *%args) { %args.perl.say; %args<x>.say; }; my %h = <a b c d>; test("T2", "x" => 2);
tobs m: sub postfix:<¥>(&f, *%args) { f |%args.grep(*.value.defined)}; sub named(:$name = 'Jon') {say $name // 'Jane'}; sub caller(:$name) { (&named, :$name)¥ };
evalable6 (exit code 1) Cannot resolve caller test(Str:D, Pair:D); none of these signatures match:
($name, *%args)
in block <unit> at /tmp/J5W8rRvsq4 line 1
xinming I know, when we code "x" => 2 It forces a pair 18:03
But x => 2 is also a pair, How does p6 handles this? Or, The "x" => 2 is a special case when we are calling functions?
tobs xinming: the x is sufficiently identifier-like, so it is quoted automatically. 18:06
m: say (x => 2).perl; say ("x" => 2).perl
evalable6 :x(2)
:x(2)
tobs it's mentioned near the top of the Pair docs 18:07
oh sorry, maybe I misunderstood your question.
xinming tobs: the diff is in calling the sub 18:08
m: multi sub test ($name, *%args) { %args.perl.say; %args<x>.say; }; my %h = <a b c d>; test("T2", "x" => 2);
evalable6 (exit code 1) Cannot resolve caller test(Str:D, Pair:D); none of these signatures match:
($name, *%args)
in block <unit> at /tmp/UW2BFURbAQ line 1
18:08 Black_Ribbon joined
xinming In this example, "x" => 2 forces a "pair" generation, which makes it doesn't goes into %args. But if x => 2 vs "x" => 2 is the same in normal circumstance, How do we explain the diff behavior in sub arg. 18:09
tobs I can't explain it. 18:10
timotimo it's a syntactic difference that is important in argument lists 18:11
araraloren m: sub caller
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/yso9MLRSs0
Missing block
at /tmp/yso9MLRSs0:1
------> 03sub caller08⏏04<EOL>
expecting any of:
new name to be defined
araraloren m: sub caller(*@args) { }; caller(name => 123);
evalable6 (exit code 1) Unexpected named argument 'name' passed
in sub caller at /tmp/GQrTJL0uEV line 1
in block <unit> at /tmp/GQrTJL0uEV line 1
araraloren m: sub caller(*@args) { }; caller("name" => 123);
evalable6
timotimo anything that's a valid identifier on the LHS of the => will be autoquoted and the whole thing turns into a keyword argument syntax, otherwise it's a literal pair object constructor 18:12
araraloren I don't like this design..
timotimo it has to do with "foo bar" being invalid as the name of a keyword argument, and we make a distinction between callsites that do vs don't have flattening, and having something like "foo $bar" => 1 counts as flattening
well, wanting to use something like "foo$bar" as a named argument requires flattening i should say 18:13
araraloren what's the difference between named argument and Pair ?
holyghost is back from the cafe/bar 18:14
I had 2 pints, to relax bit after coding
s/bit/a bit
18:17 zacts left 18:18 Sgeo__ joined 18:21 Sgeo_ left 18:23 sauvin left
xinming m: my $x = DateTime.now.earlier(minute => 1) .. DateTime.now; my @a of Range = $x; @a.perl.say; 18:28
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,27,17.553879976272583,:timezone(7200))..DateTime.new(2019,5,2,20,28,17.555992603302002,:timezone(7200)))
xinming m: my @x of Range = (DateTime.now.earlier(minute => 1) .. DateTime.now); @x.perl.say
evalable6 (exit code 1) Type check failed in assignment to @x; expected Range but got DateTime (DateTime.new(2019,5,2,20,27,3...)
in block <unit> at /tmp/J8w_fUrqwh line 1
xinming Why will the assignment of the second one fails?
m: sub x returns Array[Range] { [$(DateTime.now.earlier(minute => 1) .. DateTime.now)] }; x.perl.say; 18:29
evalable6 (exit code 1) Type check failed for return value; expected Array[Range] but got Array ($[DateTime.new(2019,5...)
in sub x at /tmp/NmJOIYqqci line 1
in block <unit> at /tmp/NmJOIYqqci line 1
xinming m: my @x of Range = ($(DateTime.now.earlier(minute => 1) .. DateTime.now)); @x.perl.say
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,29,0.14324045181274414,:timezone(7200))..DateTime.new(2019,5,2,20,30,0.14524555206298828,:timezone(7200))) 18:30
xinming I can't make the sub call work as expected.
tobs m: my @x of Range = $(DateTime.now.earlier(minute => 1) .. DateTime.now); @x.perl.say
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,29,21.617377281188965,:timezone(7200))..DateTime.new(2019,5,2,20,30,21.619345664978027,:timezone(7200)))
MasterDuke m: my @x of Range = (DateTime.now.earlier(minute => 1) .. DateTime.now),; @x.perl.say
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,29,34.70745921134949,:timezone(7200))..DateTime.new(2019,5,2,20,30,34.709498167037964,:timezone(7200)))
xinming tobs: what about the sub call?
MasterDuke parens don't make lists/arrays, commas do
xinming m: sub x returns Array[Range] { [$(DateTime.now.earlier(minute => 1) .. DateTime.now)] }; x.perl.say; 18:31
evalable6 (exit code 1) Type check failed for return value; expected Array[Range] but got Array ($[DateTime.new(2019,5...)
in sub x at /tmp/W_lP4sFyDc line 1
in block <unit> at /tmp/W_lP4sFyDc line 1
xinming m: sub x returns Array[Range] { [$(DateTime.now.earlier(minute => 1) .. DateTime.now),] }; x.perl.say;
evalable6 (exit code 1) Type check failed for return value; expected Array[Range] but got Array ($[DateTime.new(2019,5...)
in sub x at /tmp/wg0U6JavPi line 1
in block <unit> at /tmp/wg0U6JavPi line 1
18:31 araraloren left
xinming MasterDuke: I missed that one. :-) 18:31
I forgot that rule
18:32 Sgeo_ joined
xinming m: sub x returns Array[Range] { [(DateTime.now.earlier(minute => 1) .. DateTime.now),] }; x.perl.say; 18:32
evalable6 (exit code 1) Type check failed for return value; expected Array[Range] but got Array ($[DateTime.new(2019,5...)
in sub x at /tmp/tuo07VRzlZ line 1
in block <unit> at /tmp/tuo07VRzlZ line 1
18:33 johnjohn101 joined
tobs m: sub x returns Array[Range] { [(DateTime.now.earlier(minute => 1) .. DateTime.now),].&(Array[Range]) }; x.perl.say; 18:33
xinming I'd think maybe a rakudo bug on check values for things returned.
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,32,36.13373303413391,:timezone(7200))..DateTime.new(2019,5,2,20,33,36.13567566871643,:timezone(7200)))
tobs I think this is a typical case of: the type is correct, but it's not correctly typed.
xinming tobs: Why do we need the .&(Array[Range]) thing?
18:34 kiwi_44 joined
xinming Ok, the type is correct, but it's not correctly typed. 18:34
tobs the [...] gives you an Array (that happens to contain Ranges) but that doesn't match the Array[Range] type
18:35 Sgeo__ left
xinming m: sub x returns Array[Range] { my @a := [(DateTime.now.earlier(minute => 1) .. DateTime.now),]; Array[Range].(@a); }; x.perl.say; 18:35
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,34,40.86149024963379,:timezone(7200))..DateTime.new(2019,5,2,20,35,40.86353635787964,:timezone(7200)))
xinming m: sub x returns Array[Range] { my Range @ := [(DateTime.now.earlier(minute => 1) .. DateTime.now),]; }; x.perl.say; 18:36
evalable6 (exit code 1) Type check failed in binding; expected Positional[Range] but got Array ($[DateTime.new(2019,5...)
in sub x at /tmp/GZYrc2fTtv line 1
in block <unit> at /tmp/GZYrc2fTtv line 1
xinming m: sub x returns Array[Range] { my Range @ = [(DateTime.now.earlier(minute => 1) .. DateTime.now),]; }; x.perl.say;
evalable6 Array[Range].new(DateTime.new(2019,5,2,20,35,11.70474910736084,:timezone(7200))..DateTime.new(2019,5,2,20,36,11.707048416137695,:timezone(7200)))
xinming tobs: Thanks for the clear explanation, I understand why we need coercion here.
18:38 kiwi_44 left
tobs then I'm at ±0 again with my wrong comment earlier :) 18:38
xinming tobs: what does .&() do? 18:40
m: sub x ($str) { $str.say }; "String".&(x);
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/nUM6hmTiQ3
Calling…
xinming, Full output: gist.github.com/5622ef762fa124bdc9...b824700edf
xinming I thought it makes a function call look like method call
Doesn't seem to be right. 18:41
18:41 jeromelanteri left
tobs but it should 18:41
m: sub x ($str) { $str.say }; "String".&(&x);
evalable6 String
18:41 domidumont left
tobs you need to use &x as a noun 18:41
otherwise it's calling the sub `x` inside the .&() construct
xinming So, my assumption is right about the .& syntax
tobs yes 18:42
xinming Yea, I just realized it.
perl6 rocks
I have strong feeling that perl6 will be the programming language lasting centuries.
18:43 raschipi joined
jmerelo xinming: that will definitely need some more people helping with the docs 18:43
wink, wink, elbow, elbow
johnjohn101 i am thinking of doing perl 6
jmerelo do y'all know we have a squashathon coming up tomorrow? You can help make the documentation (and thus Perl 6) much better! 18:44
xinming perl 7 will be perfect where most of the things in perl6 will be kept.
jmerelo: will do, But now still strugging learning things. :-) 18:45
jmerelo xinming: you don't need to be an expert to help with the documentation. I'm sure you know more than enough to fix some of the issues.
Or to find new ones.
MasterDuke xinming: perfect, then you know where the docs weren't able to answer your questions!
raschipi xinming: someone struggling to learn is perfect to help with the docs. If something isn't clear, file bugs please. 18:46
xinming raschipi: will do. :-)
jmerelo johnjohn101: great! 18:47
johnjohn101: and welcome!
johnjohn101 jmerelo: i know perl5 but after watching perl 6 vid, i can see some things have improved 18:49
holyghost johnjohn101 : everyone's always here to help
jmerelo, timotimo : I've uploaded again, but the immutable list thing seems a bit vague to me, wait for cpan-p6 to cope 18:50
arara is gone apparently
jmerelo johnjohn101: a lot has improved :-) 19:00
19:01 jmerelo left 19:04 kurahaupo left, kurahaupo joined, kurahaupo left, kurahaupo joined 19:08 raschipi left 19:21 zakharyas joined
holyghost .eco : Game::QFG 19:31
19:31 Sgeo__ joined
holyghost .ecosystem : Game::QFG 19:31
I don't remember the ecosystem question about a package ... ?
19:34 atroxaper left, Sgeo_ left
holyghost ecocode_: Game::QFG 19:36
eco : Game::QFG
timotimo the bot that used to do that no longer exists
holyghost ok
19:38 kaare__ left
holyghost package messages from cpan-p6 more than half an hour are normal in the evening ? 19:38
I have a .meta and .readme on pause
timotimo i'm not sure how cpan-p6 works, maybe it regularly rsyncs and checks what's new? 19:39
it's probably not enough to have a meta and a readme
holyghost ok, I have to wait for it before going to bed 19:43
the META.json should be ok, it's been 45 minutes 19:45
There's probably more cpan actions at night
Can you ask cpan-p6 something ? 19:49
timotimo cpan-p6: source 19:50
holyghost cpan-p6 : Game:QFG
cpan-p6 : Game::QFG
I'll look in zef locally 19:53
19:56 Xliff joined
holyghost hi Xliff 19:58
Xliff \o
holyghost spells curses on cpan-p6 19:59
20:02 pecastro joined
Xliff Ahh... the joys of multiple monitors. I can watch TV and IRC at the same time. 20:04
holyghost no new version from zef ...
timotimo Xliff: alternatively, use transparent terminals :D 20:07
IRC over teletext!
Xliff timotimo++: LOL! I can do both, now!!!
20:08 ufobat_ joined 20:11 ufobat__ left 20:14 hythm_ joined
holyghost ok, I'll check zef tomorrow if versions 0.1.6 are out :-) 20:14
cpan never failed on me, yet :-)
timotimo you still have the "== Nil" in AI.pm6 20:16
Xliff Best Nil check is still .defined, yes?
Or using =:= 20:17
holyghost timotimo : how did you see my code ?
timotimo i downloaded it from cpan 20:18
hythm_ hello, if there are two instances sending data to same 'Channel', how can the reciever know which instance is sending?
holyghost it's === Nil then ?
timotimo hythm_: that's not something the Channel can do on its own
these instances have to cooperate and send their own identity along with the message in some way 20:19
holyghost ok, I've fixed with === Nil 20:21
hythm_ timotimo, thank you
timotimo holyghost: do you know about the shift method? 20:22
holyghost no
timotimo on arrays? 20:23
oh
AIMessage's method BUILD is wrong
and it still does the .elems thing that doesn't seem to make any sense
20:24 cpan-p6 left
timotimo oh and the accessor methods in Message.pm6 will actually infinitely recurse without giving anything back 20:24
and you still don't have one single test
20:24 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
timotimo and if you try to compile the AI module, it will complain about the "is rw" on @!msg-list and @!msg-return-values 20:25
20:28 zacts joined
holyghost ok, I'll fix tomorrow 20:28
timotimo will you write tests?
holyghost yes
timotimo what are you going to have the tests do?
how do you make sure that the tests don't pass just by accident or because there's some mistake in them? 20:29
holyghost field some messages, then flsuh everything to start with
s/flsuh/flush
timotimo OK, how do you compare if what you got is correct?
holyghost if it does not loop infinitely 20:30
you make some messages, field them to the AI, then process them
there's no processor code in there though
it needs to go into the Entity subclasses of Game::QFG 20:31
timotimo perl6 -I . -e 'use Game::AI::Messaging::Message; Game::AI::Messaging::Message.new.originator' ← this will immediately balloon up to as much ram as your machine has and then crash. or maybe your machine will crash instead.
holyghost I still need to decide on a Parser class or something else
I use BUILD as a default ctor 20:32
so it should be Game::AI::Messaging::Message.new(1,2,3,4).originator
timotimo oh actually
you don't even need to .originator
holyghost indeed
timotimo in order to make it crash, i mean
also, your code is also wrong
it would have to be originator => 1, acceptor => 2, friend-or-foe => 3, msg-body => 4 inside the new call 20:33
and it will still immediately infinitely recurse and eat all ram
holyghost indeed
timotimo there is no reason for your method BUILD to even exist for this case
holyghost I'm sorry but why would the BUILD method recurse ? 20:34
timotimo $.originator is just sugar for self.originator.item
so you have self.originator.item = $originator
holyghost oh I see
timotimo and method originator also does $.originator, which is sugar for self.originator.item
so BUILD calls originator, originator calls originator, infinite recursion 20:35
holyghost yeah
it's ambigous syntax .. though ..
timotimo it is not
and even if it didn't infinitely recurse, originator doesn't "is rw" and doesn't "return-rw", so assignment to $.originator will throw an exception
20:36 robinsmidsrod left
holyghost how can I access/assign the attribute $.originator then without calling the method originator ? 20:36
20:37 robinsmidsrod joined
timotimo $.originator is not the attribute, that's the accessor 20:37
holyghost the named variable itself .. ?
timotimo $!originator is the attribute
holyghost damn, I'm mistaking on that perl6 syntax
timotimo "has $.originator is rw" means your class will have an attribute $!originator and it will have a method "originator" that will return $!originator as a read/write-able container
you wouldn't keep uploading broken code if you would actually ever test anything 20:38
holyghost I thought $.o is public, $!o private, but that's not it ...
is $!o the accessor of the attribute in the class ? 20:39
such as e.g. in CLOS ?
20:40 zakharyas left
holyghost I guess "is rw" is the public field in C++ 20:42
then accessed by $! or $., but to me that seems ambiguous in the fact that you call $.originator the originator method 20:43
I know . leads to metasyntactic variables though
skids m: [1,2,3][1..^*].say 20:44
evalable6 (2)
holyghost timotimo : basically I can delete the originator, acceptor, friend-or-foe and msg-body methods 20:47
tobs m: [1,2,3][*.say]
evalable6 3
tobs skids: isn't that odd? ^
skids * is supposed to be .elems in that context.
tobs If * inside the array accessors evaluates to the number of elements, 1..^* should have given you (2 3)
holyghost 1..* 20:48
skids Yes and I think it used to work.
Because something I had using that broke :-)
skids never liked *-1 20:49
tobs commit: 2015.12 [1,2,3][1..^*].say
committable6 tobs, ¦2015.12: «(2 3)␤»
tobs bisect: [1,2,3][1..^*].say 20:50
bisectable6 tobs, Bisecting by output (old=2015.12 new=8ec2c43) because on both starting points the exit code is 0
tobs, bisect log: gist.github.com/2dd110285de60a50ac...29943cf5de
tobs, (2017-10-08) github.com/rakudo/rakudo/commit/45...51c42a52ff
Elronnd is it possible to use zef atm? Seems to be stuck at ===> Updating p6c mirror: ecosystem-api.p6c.org/projects.json 20:51
tobs commit: 2018.12 [1,2,3][1..^*].say 20:52
committable6 tobs, ¦2018.12: «(2)␤»
tobs skids: you probably know more exactly when it broke. 2017 is kinda long ago. 20:53
skids I haven't touched this code in apparently years.
tobs In any case bisectable6++. It's an amazingly useful bot. 20:54
timotimo holyghost: perl6 has only private attributes, "public" attributes are just exposed via methods of (usually) the same name
skids Yeah, I had forgot which bot to use for what.
Looks like an "oopstimization" 20:55
AlexDaniel c: 456358e3c3^,456358e3c3 [1,2,3][1..^*].say
committable6 AlexDaniel, ¦456358e3c3^: «(2 3)␤» ¦456358e: «(2)␤»
AlexDaniel tobs: kinda hard to argue with that ↑ ?
c: 2015.12,456358e3c3^,456358e3c3,HEAD [1,2,3][1..^*].say
tobs skids: if in doubt github.com/perl6/whateverable/wiki
committable6 AlexDaniel, ¦2015.12,456358e3c3^: «(2 3)␤» ¦456358e,HEAD(8ec2c43): «(2)␤»
tobs AlexDaniel: could argue that it's a regression :P 20:57
AlexDaniel heh, oopsiemization
skids Hrm github issues search not special char friendly. 21:08
holyghost m: class A { }; class B { multi method new { self = self.bless; }; }; B.new 21:11
evalable6 (exit code 1) Cannot modify an immutable 'B' type object
in method new at /tmp/4v7G_wdckC line 1
in block <unit> at /tmp/4v7G_wdckC line 1
holyghost m: class A { }; class B { multi method new { self := self.bless; }; }; B.new 21:12
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/JRBp3od4Jc
Cannot …
holyghost, Full output: gist.github.com/7cb868b4265b2f2536...68751101fe
holyghost m: class A { }; class B { multi method new { self.bless; }; }; B.new
evalable6
holyghost m: class A { has $.a; multi method new($aa) { $!a = $aa; }; class B { has $!b; multi method new($x) { self.bless(:x); $b = 2; }; }; B.new(0) 21:14
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/54W1ENyJee
Variabl…
holyghost, Full output: gist.github.com/c65edbc82a5b94b700...e6241af453
21:20 __jrjsmrtn__ joined 21:21 _jrjsmrtn left
holyghost timotimo : I uploaded versions 0.1.8, it should fix everything, I'm off for the weekend however 21:25
21:26 holyghost left 21:31 skids left, traxex left 21:32 Xliff left 21:33 sena_kun left 21:34 lichtkind joined 21:35 pierrot_ joined, pierrot left 21:36 Xliff joined
Xliff m: $*PERL.compiler.version.say 21:37
evalable6 v2019.03.1.273.g.532.d.19.fc.4
Xliff m: $*VM
evalable6
Xliff m: $*VM.version.say 21:38
evalable6 v2019.03.97.g.8.fef.19994
21:40 sena_kun joined
Xliff Does 2019.3.1-272 have issues? Because I can't do a full compile of GTK with it without the machine bogging. 21:44
21:49 sena_kun left, pierrot_ is now known as pierrot 21:50 pierrot left, pierrot joined, sno left
Xliff OK. I am on 1-273, and started recompiling. 21:51
Things were looking fine until I got to a specific module.
Now all activity has stopped, but it's apparent that there is memory being allocated.
22:02 patrickb left 22:04 sno joined
Xliff Compiler is now hanging on compiling a single class. 22:05
22:05 sno left, [Sno] joined 22:06 hythm_ left
Xliff OK, guys. You might have an issue here. I don't know enough to bug it, yet. 22:07
I am nuking my moar and recompiling... again... *sob*
On second thought... I may have to hold off on that if there are still problems with zef. 22:08
22:14 MilkmanDan left 22:16 zacts left, MilkmanDan joined 22:22 Kaiepi joined 22:29 johnjohn101 left
Xliff Back on Perl6 version 2019.03.1-246-g84144c794 22:30
^^ Last version I was able to go through the entire build with.
22:31 woolfy left, woolfy joined 22:32 uzl joined 22:36 pecastro left
uzl m: my %h = :{ ['cold', 'card'] => 'cold - cord - card' }; say %h; 22:37
evalable6 Potential difficulties:
Useless use of hash composer on right side of hash assignment;…
uzl, Full output: gist.github.com/29d0557885dd05c366...64680f1e3d
uzl m: my $h = :{ ['cold', 'card'] => 'cold - cord - card' };
evalable6
uzl m: my %h := :{ ['cold', 'card'] => 'cold - cord - card' };
evalable6
uzl Why does assigning an object hash to a %-variable prints that warning? 22:39
Xliff my %h = ( ["cold", "card"] => "cold - cord - card" ); say %h; 22:43
evalable6 {cold card => cold - cord - card}
Xliff uzl: You're using curly braces. 22:44
m: my $h = { ['cold', 'card'] => 'cold - cord - card' }; say %h;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/3v6JJQwjmh
Variabl…
Xliff, Full output: gist.github.com/d95ef5c6fd5ac377d4...1f781f412c
Xliff m: my $h = { ['cold', 'card'] => 'cold - cord - card' }; say $h;
evalable6 {cold card => cold - cord - card}
uzl Xliff: Oh, I see. Thanks! 22:46
The documentation only uses :{} for both binding to %-variables and assigning to $-variables. The parenthesis seem to work for all of them, including assigning to %-variables. 22:49
22:49 sena_kun joined
Xliff uzl: You might want to raise an issue with perl6/docs and see what jmerelo thinks. 22:50
Docs have a bit of bitrot, imho
uzl They should get a honorary mention at least ;-)!
I'll try to do so.
Xliff :) 22:51
uzl Thanks! Until later.
22:51 uzl left 23:03 rindolf left 23:05 lizmat_ joined 23:08 lizmat left 23:16 Manifest0 left 23:17 uzl joined
uzl I was playing around and in fact one has to bind the object hash (OH) to a %-variable regardless of using either () or :{}. When assigning the OH using (), the keys are stringified. 23:18
m: my %h = ( ["cold", "card"] => "cold - cord - card" ); say %h.keys.first.^name; 23:19
evalable6 Str
uzl m: my %h := :{ ["cold", "card"] => "cold - cord - card" }; say %h.keys.first.^name;
evalable6 Array
uzl m: my %h := ( ["cold", "card"] => "cold - cord - card" ); say %h.keys.first.^name;
evalable6 Array
uzl m: my $h = :{ ["cold", "card"] => "cold - cord - card" }; say $h.keys.first.^name; 23:21
evalable6 Array
23:21 Manifest0 joined
uzl m: my $h = ( ["cold", "card"] => "cold - cord - card" ); say $h.keys.first.^name; 23:21
evalable6 Array
uzl I guess it could be mentioned that parentheses can also be used if binding to %-variables or assigning to $-variables. Same as :{}. 23:24
23:24 uzl left 23:34 Kaypie joined, Kaiepi left 23:37 sena_kun left, sena_kun joined