»ö« 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:00 reportable6 left 00:01 Kaypie is now known as Kaiepi
squashable6 🍕 tbrowder++ edited wiki page “Document file specification”: github.com/perl6/doc/wiki/Document...cification 00:01
🍕🍕🍕 First contribution by tbrowder++! ♥
00:02 reportable6 joined
Kaiepi i ran into an issue with some custom metamodel code i'm writing where trying to call a method on anything that uses it at runtime doesn't call the method once, it keeps calling it repeatedly until moarvm runs out of memory. does anyone have a general idea of what's going on here? 00:04
00:05 dolmen left
timotimo is it a meta method or a regular method? are you providing the method via find_method? is there anything with the method cache? 00:05
00:08 Kaypie joined
Kaypie this started happening after i changed it not to extend Metamodel::ParametricRoleHOW anymore, rather do the roles it does that the class needs and implementing everything else myself 00:09
timotimo when you say "uses it at run time" does it work right at compile time?
Kaypie i haven't checked
i can post the code if needed but it's like 300 lines
00:09 Kaiepi left
Kaypie timotimo, `BEGIN say <type>.gist` does the same thing 00:13
it also calls type_check on the meta class way more than i actually use the type in my code, but i'm not sure if that's a bug or just how it's supposed to work 00:15
actually wait it doesn't do the same thing, i'm not sure what it's doing but it still makes moarvm run out of memory before it tries to call the method 00:17
wait i was forgetting .new, it does do the same thing 00:18
timotimo "run out of memory" is often endless recursion 00:19
if you run perl6-gdb-m you can ctrl-c it at a random point, "up" however often needed to get to a frame that has a "tc" 00:20
and then "call MVM_dump_backtrace(tc)"
00:24 wildtrees left 00:40 jaldhar left, jaldhar joined
Kaypie timotimo, i can't get any backtrace since it interrupted in the middle of a call to uv_cond_wait every time i tried it but it looks like an issue somewhere either in something that uses the ConcBlockingQueue REPR or the REPR itself 00:43
timotimo may have to find the right thread to look at
oh, disable the JIT, otherwise stack frames in gdb will appear totally messed up 00:44
00:45 Garland_g[m] left
Kaypie how do i find the right thread? 00:46
00:48 jaldhar left, lucasb left, jaldhar joined 00:56 TeamBlast joined 00:58 jaldhar left, jaldhar joined 01:00 jaldhar left, jaldhar joined
timotimo just go through all of them 01:02
"info threads", then "thread 1" and so on
maybe "thread apply all bt"
01:04 jaldhar left, jaldhar joined 01:08 squashable6 left 01:11 squashable6 joined 01:13 jaldhar left
timotimo bedtime o/ 01:14
Kaypie aight, thanks for the help 01:41
01:47 vrurg joined 01:51 syb joined 01:52 syb left 01:55 Kaypie left, Kaypie joined 02:53 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined
Elronnd I'm getting an error compiling perl6 on arch linux 03:11
I run this 3perl Configure.pl --backends=ALL --gen-moar --gen-nqp --prefix=$HOME/.perl6install0, and get this error ix.io/1Qy7 03:12
squashable6 🍕 Altai-man++ submitted a review on pull request “Proofread several documents”: github.com/perl6/doc/pull/2936#pul...-270479436 03:35
🍕🍕🍕 First contribution by Altai-man++! ♥
🍕 Altai-man++ wrote a comment on a review for “Proofread several documents”: github.com/perl6/doc/pull/2936#dis...r310368985
03:50 jaldhar joined 03:51 jaldhar left 03:52 jaldhar joined, jaldhar left 03:53 jaldhar joined 03:54 AlexDani` joined 03:58 AlexDaniel left 04:06 jaldhar left, jaldhar joined 04:08 jaldhar_ joined, jaldhar left 04:10 jaldhar_ left, jaldhar_ joined 04:12 molaf joined 04:14 jaldhar_ left, jaldhar_ joined 04:18 jaldhar_ left, jaldhar_ joined 04:20 jaldhar_ left, jaldhar_ joined 04:21 sjm_uk joined 04:30 jaldhar_ left, jaldhar_ joined 04:34 jaldhar_ left, jaldhar_ joined 04:36 jaldhar_ left, jaldhar_ joined 04:40 jaldhar_ left, jaldhar_ joined 04:44 jaldhar joined 04:46 jaldhar_ left, jaldhar left, jaldhar joined 04:52 jaldhar left, jaldhar joined 04:56 jaldhar left, jaldhar joined 05:04 jaldhar left, jaldhar joined 05:08 jaldhar left, jaldhar joined 05:10 jaldhar left, jaldhar joined 05:16 jaldhar left, jaldhar joined 05:20 jaldhar left, jaldhar joined
cpan-p6 New module released to CPAN! Algorithm::NaiveBayes (0.0.4) by 03TITSUKI 05:21
05:22 jaldhar left, jaldhar joined
squashable6 🍕 JJ++ submitted a review on pull request “Correct all methods' sig…”: github.com/perl6/doc/pull/2934#pul...-270481158 05:23
Geth doc: 19fc625e58 | (Ben Davies)++ | doc/Type/Metamodel/EnumHOW.pod6
Correct all methods' signatures in Metamodel::EnumHOW's page

None of its methods actually specify what type the object the method is called on must be.
synopsebot Link: doc.perl6.org/type/Metamodel::EnumHOW
doc: 6b7a514e5e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Metamodel/EnumHOW.pod6
Merge pull request #2934 from Kaiepi/squashathon

Correct all methods' signatures in Metamodel::EnumHOW's page
squashable6 🍕 JJ++ merged pull request “Correct all methods' sig…”: github.com/perl6/doc/pull/2934
05:23 lizmat left 05:36 jaldhar left, jaldhar joined 05:40 nepugia joined 05:44 jaldhar left, jaldhar joined 05:48 jaldhar left, jaldhar joined 05:54 jaldhar left, jaldhar joined 05:56 squashable6 left 05:58 squashable6 joined 06:00 reportable6 left 06:03 reportable6 joined, ChanServ sets mode: +v reportable6 06:04 jaldhar left, jaldhar joined 06:06 jaldhar left, jaldhar joined 06:08 jaldhar left, jaldhar joined 06:10 jaldhar left, jaldhar joined 06:12 jaldhar left, jaldhar joined 06:14 jaldhar left, jaldhar joined 06:18 jaldhar left, jaldhar joined
MasterDuke Elronnd: i think i've had the same error when trying to build the JS backend. does it work for you if you just specify moar and jvm? 06:19
Elronnd MasterDuke: it does
MasterDuke probably want to ping pmurias then 06:20
06:22 jaldhar left, jaldhar joined 06:28 jaldhar left, woolfy left, jaldhar joined 06:30 jaldhar left, jaldhar joined 06:32 jaldhar left, jaldhar joined 06:33 [particle]1 left 06:34 jaldhar left, jaldhar joined 06:36 jaldhar left, jaldhar joined 06:38 jaldhar left, jaldhar joined 06:40 jaldhar left, jaldhar joined
nine camelia's build is failing with: /usr/bin/perl Configure.pl --prefix=/home/camelia/rakudo-m-inst-2 --make-install --git-protocol=https --backends=moar --gen-moar 06:41
"read_config_from_command" is not exported by the NQP::Config module
Can't continue after import errors at /home/camelia/rakudo-m-2/nqp/tools/lib/NQP/Config/NQP.pm line 8.
vrurg: ^^^ 06:42
06:44 jaldhar left, jaldhar joined 06:46 marcel_ joined 06:48 jaldhar left, jaldhar joined 06:52 jaldhar left, jaldhar joined 06:54 rindolf joined 06:56 jaldhar left, jaldhar joined 06:58 jaldhar left, jaldhar joined 07:00 jaldhar left, jaldhar joined 07:08 jaldhar left, jaldhar joined 07:09 chloekek joined 07:10 jaldhar left, jaldhar joined 07:12 jaldhar left, jaldhar joined 07:13 holyghost left 07:16 jaldhar left, jaldhar joined 07:18 jaldhar left, jaldhar joined 07:20 jaldhar left, jaldhar joined 07:22 jaldhar left, jaldhar joined 07:24 jaldhar left, jaldhar joined 07:28 jaldhar left 07:34 nepugia left 07:37 MasterDuke left 07:41 ayerhart_ left 07:42 ayerhart joined 08:09 marcel_ left 08:48 marcel_ joined 08:59 pecastro joined 09:07 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined 09:11 sjm_uk left 09:12 Black_Ribbon left 09:14 antoniogamiz joined
AlexDaniel squashable6: status 09:30
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈2 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, Log and stats: gist.github.com/2e30e5934af0696c3f...ab2e993aa1
09:30 sjm_uk joined 09:32 marcel_ left 09:56 Doc_Holliwood joined
Doc_Holliwood I'm confused about the latest SoPW on Perlmonks. There is syntax like "my $a = &#948;t" but that's not valid Perl6, is it? 10:00
Maybe a C&P fragment?
www.perlmonks.org/?parent=11103847;node_id=3333
meh. corrected link: www.perlmonks.org/?node_id=11103847 10:03
chloekek p6: my $a = &#948;t 10:05
camelia ( no output )
AlexDaniel m: say & 10:06
chloekek #948;t is a comment and & is a subroutine.
camelia (Callable)
10:06 cygx joined
AlexDaniel what's &#948; though 10:06
chloekek & is a state variable like $ and @ and %
AlexDaniel: it's a combining character 10:07
No, I'm a fool. That's decimal.
AlexDaniel is it Δ ?
cygx Doc_Holliwood: that's a HTML entity, encoding the Greek letter delta
AlexDaniel: no, a small delta 10:08
chloekek So that makes sense, my $a = δt
AlexDaniel it's defined a bit earlier: return -> \t, \y, δt { 10:09
chloekek Probably someone escaped it before posting it to PerlMonks, and then PerlMonks escaped it again.
Doc_Holliwood PM has some problems with Unicode methinks
chloekek Rewrite it in Perl 6.
AlexDaniel Doc_Holliwood: so yeah, that code snippet just had a little bit of unicode :)
e: gist.github.com/AlexDaniel/c05920c...643b1edabf 10:11
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /home/bisectable/git/wh…
AlexDaniel, Full output: gist.github.com/f124456ac6ff53754a...b03ed068ae 10:12
AlexDaniel e: gist.github.com/AlexDaniel/c05920c...643b1edabf
evalable6 t = 0.00 : +0.000e+00 +0.000e+00 +0.000e+00 +1.500e+11 +0.000e+00 +0.000e+00 +1.497e+11 +0…
AlexDaniel, Full output: gist.github.com/56b1a1a80e606cbc1b...4da7288f7c
AlexDaniel I guess that's the right output?
cygx You'd have to plot it to check that it makes sense 10:18
I have yet to set up my phone to be able to do that ;) 10:19
AlexDaniel actually evalable should probably learn to do that 10:20
github.com/perl6/whateverable/issues/352 10:21
Doc_Holliwood perl6: (1..2 X* 3..4).say 10:27
camelia (3 4 6 8)
( no output )
Doc_Holliwood perl6: (1..2 X 3..4).say
camelia
(timeout)
((1 3) (1 4) (2 3) (2 4))
Doc_Holliwood neat. it takes the cross product and applies the operator 10:28
squashable6 🍕 AlexDaniel++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924 10:30
Doc_Holliwood multi infix:<°>($a, $b) { ($a+$b+65).chr }; (1..2 X° 3..4).say 10:32
evalable6 (E F F G)
10:33 veesh1 joined
Doc_Holliwood Such a wonderful language. Shame nobody is pouring a few million dollars onto it 10:34
Geth doc: 6995071999 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/containers.pod6
Remove unnecessary word

  @Altai-man++
synopsebot Link: doc.perl6.org/language/containers
squashable6 🍕 AlexDaniel++ submitted a review on pull request “Proofread several documents”: github.com/perl6/doc/pull/2936#pul...-270491216
🍕 AlexDaniel++ wrote a comment on a review for “Proofread several documents”: github.com/perl6/doc/pull/2936#dis...r310381027
AlexDaniel Doc_Holliwood: yeah, but honestly we get enough code contributions regularly 10:36
Doc_Holliwood: and the development pace of rakudo is quite crazy in the last few months 10:37
Doc_Holliwood You would not have to be involved honestly. I'd be just as happy if Google came along with their own project that compiles P6 to Rust 10:38
I mean, that's why we have the spec, right? 10:39
AlexDaniel yeah, everyone is free to implement their own perl 6 compiler, that's right :)
or transpiler, or whatever you want :) 10:40
chloekek It seems like Pod::Load can't cope with unit modules. 10:41
Oh, it greps for =begin pod and =end pod. 10:42
antoniogamiz chloekek: raise an issue!
that module was made to work with the documentation pod file 10:43
s
chloekek Yeah, not with normal source files.
Pod::To::HTML can cope with such files if invoked with perl6 --doc=HTML, but then you can't specify a custom template. 10:44
So I'll have to patch that. 10:45
Geth doc: 48de16184b | Antonio++ | 3 files
move output blocks inside pod section
10:54
AlexDaniel squashable6: status 10:56
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈1 hour. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, Log and stats: gist.github.com/f26ff69bf76ee26410...1b70a2cb1f
Geth doc: 5955a99402 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_ascii.pod6
Proofreading: unicode_ascii.pod6
11:04
synopsebot Link: doc.perl6.org/language/unicode_ascii
squashable6 🍕 AlexDaniel++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924 11:05
🍕 AlexDaniel++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924 11:06
11:06 antoniogamiz left 11:09 squashable6 left 11:11 squashable6 joined, ChanServ sets mode: +v squashable6
Geth doc: 9468f59044 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/nativetypes.pod6
Simplify the table by not mentioning char/short/etc

Not only it makes the table easier to understand, it is actually more correct given that `int` can be of different size depending on architecture and compiler.
11:13
synopsebot Link: doc.perl6.org/language/nativetypes
doc: 770a850947 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/nativetypes.pod6
Remove unnecessary space
11:16
synopsebot Link: doc.perl6.org/language/nativetypes
squashable6 🍕 AlexDaniel++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924 11:17
11:17 veesh1 left 11:30 veesh1 joined 11:42 marcel_ joined 11:43 MasterDuke joined 12:00 reportable6 left 12:01 gdonald joined 12:02 reportable6 joined 12:07 abraxxa joined 12:17 cygx left 12:20 Manifest0 joined 12:38 abraxxa left 13:05 daxim joined 13:27 squashable6 left 13:29 squashable6 joined, ChanServ sets mode: +v squashable6 13:57 nepugia joined 14:00 john_parr left 14:11 Xliff joined
Xliff \o 14:11
m: my $S = Supplier.new; my $s = $s.Supply; $s.tap({ once { say "Hi!" }; say "Boo!" }); $s.emit for ^3; 14:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use variable $s in declaration to initialize itself
at <tmp>:1
------> 3my $S = Supplier.new; my $s = $7⏏5s.Supply; $s.tap({ once { say "Hi!" }; s
expecting any of:
term
Xliff m: my $S = Supplier.new; my $s = $S.Supply; $s.tap({ once { say "Hi!" }; say "Boo!" }); $s.emit for ^3;
camelia emit without supply or react
in block <unit> at <tmp> line 1
14:13
Xliff m: my $S = Supplier.new; my $s = $S.Supply; $s.tap({ once { say "Hi!" }; say "Boo!" }); $s.emit($s) for ^3;
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
Xliff m: my $S = Supplier.new; my $s = $S.Supply; $s.tap({ once { say "Hi!" }; say "Boo!" }); $s.emit([$s]) for ^3;
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
Xliff m: my $S = Supplier.new; my $s = $S.Supply; $s.tap(-> *@a { once { say "Hi!" }; say "Boo!" }); $s.emit([$s]) for ^3;
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
14:14 dolmen joined
Xliff m: my $S = Supplier.new; my $s = $S.Supply; $s.tap({ once { say "Hi!" }; say "Boo!" }); $S.emit([$s]) for ^3; 14:14
camelia Hi!
Boo!
Boo!
Boo!
Xliff \o/
14:15 niceplace joined 14:17 niceplace left, veesh1 left 14:18 niceplace joined 14:20 niceplace left, niceplace joined 14:21 niceplace left, niceplace joined, niceplace left, niceplace joined
timotimo m: my $S = Supplier.new; my $s = $S.Supply; $s.once.tap({ say "oh my" }); $s.tap({ say "boo!" }); $S.emit(1) for ^3; 14:26
camelia No such method 'once' for invocant of type 'Supply'. Did you mean any of these?
none
one

in block <unit> at <tmp> line 1
timotimo m: my $S = Supplier.new; my $s = $S.Supply; $s.first.tap({ say "oh my" }); $s.tap({ say "boo!" }); $S.emit(1) for ^3;
camelia oh my
boo!
boo!
boo!
14:36 lucasb joined 14:38 andrzejku joined 14:55 MilkmanDan left 14:58 MilkmanDan joined
chloekek p6: split(/\s+ <:Pd> \s+/, "Foo::Bar $_ Foo the bars", 2).say for < - ‐ ‑ – — 〜 ⸻ > 14:59
camelia (Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
(Foo::Bar Foo the bars)
chloekek Exactly what I need for parsing NAME sections in PODs.
15:07 squashable6 left 15:11 [particle] joined 15:12 squashable6 joined 15:18 marcel_ left 15:20 lgtaube joined 15:32 pilne left 15:35 pilne joined 15:40 echoprinter joined 15:46 Sgeo left 15:47 camelCaser joined 15:49 Sgeo joined 15:54 molaf left 15:56 andrzejku left 16:01 ajs35 joined 16:04 empee0 joined 16:05 andrzejku joined 16:12 daxim left 16:18 daxim joined 16:20 andrzejku left 16:29 uzl joined, niceplace left
uzl .seen jmerelo 16:30
16:35 antoniogamiz joined 16:38 pmurias joined
pmurias timotimo: re binding a game engine, I think that would be the most practical way to get a performant game in Perl 6 16:40
timotimo yeah
uzl Can somebody explain this => docs.perl6.org/language/glossary#diffy ? ;-) 16:44
timotimo m: my $foo = 1; $foo ..= 5; say $foo 16:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot make assignment out of .. because structural infix operators are too diffy
at <tmp>:1
------> 3my $foo = 1; $foo ..=7⏏5 5; say $foo
timotimo m: my $bar = 0; $bar cmp= 99 16:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot make assignment out of cmp because structural infix operators are too diffy
at <tmp>:1
------> 3my $bar = 0; $bar cmp=7⏏5 99
timotimo m: my $bloop = "hi"; $bloop (elem)= set "a", "b", "c"
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot make assignment out of (elem) because chaining operators are too diffy
at <tmp>:1
------> 3my $bloop = "hi"; $bloop (elem)=7⏏5 set "a", "b", "c"
16:48
timotimo uzl: here's some examples
16:50 dolmen left, sena_kun joined 16:52 [Sno] joined
uzl m: (2 cmp 3).^name.say 16:53
camelia Order
uzl I think I get it. So the type of the operator (e.g, cmp) result (e.g, Order) is so different to its arguments (integers in this case) that it makes little to no sense to perform the op= operation. 16:55
timotimo right 16:56
antoniogamiz :tag element at =begin pod is currently used for something? 16:57
uzl timotimo: Thanks for the examples. I was like what? It'd be great to have some examples illustrating ;-).
So is diffy a shortening of different? 16:58
timotimo if you're wondering how i found them, i grepped "diffy" in the rakudo source code, it was mentioned in the Grammar (which i expected) and there's two "kinds" of operators that have the diffy bit set; %structural and %chaining
and just searching for mentions of %structural and %chaining gives you a bunch of ops that behave like that
17:01 ajs35 left, sjm_uk left 17:05 sena_kun left, sena_kun joined
chloekek My web app can now search modules and display their rendered POD :D 17:06
timotimo cool
pmurias timotimo: is this bitbucket.org/gtkshooter/p6-gtk-sh...aceship.p6 supposed to have the cool pilot cabin like on the livecoding video?
timotimo i might not yet have put it in, actually
yeah, it doesn't have that yet
bitbucket.org/gtkshooter/p6-gtk-sh...aceship.p6 17:07
this should have it
antoniogamiz cholekek: link please? :D
pmurias timotimo: I'm first translating the code the js using the canvas and was wondering why my spaceship didn't end up nearly as cool ;) 17:09
chloekek antoniogamiz: I don't have it hosted anywhere but the source code is here: github.com/chloekek/cp6t/tree/master/p6al Building the database requires Nix and patience, but I want to do that in CI later.
timotimo it's not that much cooler with the cabin in it tho :P
i'm hoping to add some lighting effects
17:10 harmil joined, andrzejku joined
timotimo it'd be great to have like a set of masks for different "directions" and whenever the ship turns or a light source is nearby, the masks could individually have light values calculated based on normals 17:10
i.e. the simplest lighting you can come up with in, say, an opengl scene
antoniogamiz ty
17:10 MilkmanDan left
harmil What is the most up-to-date source of info on writing slangs? 17:11
17:11 MilkmanDan joined 17:16 sena_kun left
timotimo harmil: i'd probably cargo-cult stuff from the different slangs we have; Tuxic is in active use, so it's kept working with newest rakudo releases and such 17:16
17:17 sena_kun joined, sena_kun left
harmil timotimo: thanks 17:19
second question: is there a way to ask an operator for its associativity? I had assumed &infix:<+>.assoc would be something like 'left' but there's no such method. 17:21
timotimo m: say &infix:<+>.prec.perl 17:22
camelia {:assoc("left"), :prec("t=")}
timotimo it's hidden inside the precedence attribute
harmil Thanks again!
timotimo NP
17:24 echoprinter left
harmil Oh good, "sub infix:<foo>($a, $b) is assoc(&infix:<+>.prec<assoc>) {...}" just works. 17:26
antoniogamiz is there a way to modify the first line of a file without having to rewrite the entire file? 17:28
timotimo only if the file ends up the same size afterwards
i.e. if your stuff is shorter post-rewrite, you can fill it up with whitespace or so 17:29
antoniogamiz mmm
I will have to rewrite it then
ty
rba timotimo: did you do the fine-tuning for the temp hosting of rakudo.org? 17:38
timotimo what is fine-tuning? :)
i'll gist you the /etc/nginx/sites-enabled/rakudoorg
rba There are a lot of rewrite rules in the apache config.
great. 17:39
timotimo gist.github.com/timo/3c8f6f7ad0f66...e118afd35e - we have only these active
rba I have all the rakudo/nqp releases ready for the download dir. Do we still like rakudostar.com?
timotimo not sure 17:40
rba I will setup everything temporary on rakudo.p6c.org and then we can have a look, wha'ts missing or need to be changed... 17:41
17:43 uzl left 17:48 sjm_uk joined
chloekek antoniogamiz: I'll see if I can set up hosting later, but I have to figure out licensing issues first, since it'll display documentation from third parties. 17:53
antoniogamiz chloekek: oh right
are you going to highlight the code in the html output?
chloekek Syntax highlighting of code inside POD isn't implemented yet, and displaying source code of a comp unit isn't either. 17:54
antoniogamiz ah ok, I would recommend you to take a look at Text::VimColour 17:55
chloekek Thanks, I will.
Hmm, Vim as a build dependency. No problem. 17:56
I thought of using Pygments first but I don't know how well that works with Perl 6 input. 17:58
antoniogamiz highlighters are quite hard for perl and perl6
in the docs we use perl6-atom-language 17:59
but it needs node and more additional setup
chloekek Yeah, I use perl6-atom-language fork for VS Code in my editor, and it sometimes chokes on <!before ...> :)
Dependencies aren't an issue for me as long as they're in Nixpkgs.
18:00 reportable6 left
rba So, temp rakudo.p6c.org on new server is ready. 18:00
timotimo node_modules oh my
chloekek E.g. i.imgur.com/E6BJjY3.png 18:01
antoniogamiz ah good then :)
chloekek Oh yeah the use of npm is a security vulnerability, can't do that.
18:02 reportable6 joined, ChanServ sets mode: +v reportable6
chloekek antoniogamiz: I suppose I also have to patch Pod::To::HTML if I want to add syntax highlighting support? Or does docs.perl6.org also use that? 18:04
antoniogamiz you can use a dynamic variable called %*POD2HTML-CALLBACKS 18:05
chloekek Oh sick.
antoniogamiz github.com/perl6/doc/blob/770a8509...y.p6#L1050
that's how is done in the docs
but it uses coffe script too
with Text::Colour is easier 18:06
chloekek Ah yeah cool I see it.
antoniogamiz see => github.com/perl6/perl6-examples/bl...y.pm6#L192
chloekek I'll see how well it goes. Currently I generate build scripts for each library, and those build the docs, which means I can't build docs for Pod::To::HTML and its dependencies. :( Have to figure out a way to break that cycle. 18:07
Probably by making docs building a separate step.
antoniogamiz mmm yep, make it a separate setp makes sense 18:09
chloekek Or I could manage the dependencies of Pod::To::HTML separately, that's a little easier. 18:11
Add a flag to the build script generator indicating whether it should include code to generate the docs.
That ultimately causes them to be built twice: once without docs and once with docs. 18:12
antoniogamiz mmm I do not know, I'm a bit lost sorry haha 18:13
chloekek That's fine, I was rubber duck debugging. 18:14
antoniogamiz someone here is going to record the TPCIR? 18:18
18:18 nepugia left
rba .tell hankache I will revert the changes on github.com/perl6/rakudo.org to use local dir and not rakudostar.com any more. 18:19
tell hankache I will revert the changes on github.com/perl6/rakudo.org to use local dir and not rakudostar.com any more.
where is yoleaux ? 18:20
18:21 pamplemousse joined
chloekek yoleaux is dead. 18:21
colabti.org/irclogger/irclogger_lo...07-29#l367
rba just realised: colabti.org/irclogger/irclogger_lo...07-29#l371
AlexDaniel rba: I have a replacement for it 18:22
rba AlexDaniel: Cool.
AlexDaniel it was up yesterday until I realized that the db dump I received wasn't full enough, that was quickly fixed and now I should just replace the file and run the bot
so should be up really soon, unless I keep getting distracted with fun stuff like the squashathon and other things :) 18:23
chloekek If yoleaux ever comes back the name is a lie.
timotimo "i've not been dead! that was but a flesh wound!" 18:25
antoniogamiz how can i check is something is a role? 18:26
timotimo check what .HOW it has
AlexDaniel .tell uzl re fiddly/diffy/iffy, these words are never used in the docs and honestly never used anywhere, but they do appear in error messages. I think it's fun to come up with cute names for things but it makes life harder for other people in the end. So if you have a decent more explicit replacement for these I'd be happy to see the terms removed from the glossary and error messages tweaked accordingly. 18:27
ahhhhhh shoot
antoniogamiz x'd
timotine: see:
m: CX::Warn.HOW
AlexDaniel and of course right after discussing yoleaux I forgot that .tell doesn't work xD
camelia ( no output )
timotimo m: say CX::Warn.HOW
camelia Perl6::Metamodel::ClassHOW.new
antoniogamiz then is a class? 18:28
timotimo oh, does calling .HOW immediately pun the class?
antoniogamiz idk
timotimo i'm sure someone else will be able to help with that 18:29
i think i need a short nap
antoniogamiz good dreams :D
vrurg nine: ping 18:33
18:36 Kaypie is now known as Kaiepi, pamplemousse left
Harzilein a 18:45
Geth doc/master: 6 commits pushed by Antonio++
harmil I kept writing things like: $x.defined ?? $x ~ " " !! "" -- so I thought this would be a nice place for a metaoperator, e.g. $x ///~ " " where /// is the meta-operator for definedness and so ///~ is "concatenate if defined". So I started writing a slang, but it turns out that would mean redefining infixish from Actions and that in turn relies on LO 18:46
TS of other stuff from Actions. Is there a simpler way to add an infix_prefix_meta_operator other than modifying rakudo directly?
18:49 sjm_uk left, pmurias left
AlexDaniel harmil: it does seem to be a pain point indeed. In whateverable I recently added this: github.com/perl6/whateverable/blob...ts.pm6#L47 18:49
example on how it's used: github.com/perl6/whateverable/blob...ble.p6#L95 18:50
18:52 uzl joined
APic Harzilein: b 18:52
AlexDaniel uzl: re fiddly/diffy/iffy, these words are never used in the docs and honestly never used anywhere, but they do appear in error messages. I think it's fun to come up with cute names for things but it makes life harder for other people in the end. So if you have a decent more explicit replacement for these I'd be happy to see the terms removed from the glossary and error messages tweaked accordingly.
18:54 Doc_Holliwood left 18:58 marcel_ joined 19:01 antoniogamiz left
uzl AlexDaniel: They're used in the Rakudo source code. If it wasn't for timotimo (colabti.org/irclogger/irclogger_lo...-04#l428), I'd have never figured it out. It seems it's part of the Perl culture to give things cute names but it can be confusing sometimes. However, after timotimo provided some examples I think got the gist of their meaning (well, at least for diffy). Thus if they're not removed from the glossary, a few 19:07
examples could clarify them.
AlexDaniel in my opinion, it's the shitty part
and we should be working to fix that, which is why I think a PR fixing the error message is a good start for this particular case 19:08
19:08 marcel_ left 19:09 quester joined
Kaiepi m: grammar ExcitedAgreement { token TOP { '^ ' <agreement> <.ws> {} <yelled-agreement: ~$<agreement>> }; token agreement { "this" }; token yelled-agreement($agreement) { <{ $agreement.uc }> } }; say ExcitedAgreement.parse: '^ this THIS' 19:16
camelia 「^ this THIS」
agreement => 「this」
yelled-agreement => 「THIS」
Kaiepi sweet 19:18
19:20 pamplemousse joined
Kaiepi m: grammar Foo { token TOP { <{ self.foo: "foo" }> }; token foo($foo) { $foo } }; say Foo.parse: 'foo'; 19:23
camelia 「foo」
19:24 marcel_ joined 19:25 pamplemousse left, pamplemousse joined 19:30 molaf joined 19:34 pecastro left 19:35 andrzejku left
uzl Should the "use keyword" link point to "/language/modules#index-entry-use" instead of "/language/5to6-nutshell#index-entry-import"? 19:35
What I'm referring to: docs.perl6.org/language/glossary#iffy
AlexDaniel uzl: yes definitely not to the 5to6 docs 19:36
uzl OK
19:40 pecastro joined 20:01 pmurias joined 20:04 andrzejku joined 20:09 dolmen joined
uzl In " ... classes are objects too, which inherit from the ur-class which, in our case, is Mu.", what's "ur-class"? 20:15
20:15 molaf left 20:17 pamplemousse left 20:20 pamplemousse joined
AlexDaniel uzl: O_o 20:24
20:25 chloekek left
AlexDaniel uzl: you're really brave for proofreading the glossary 20:25
uzl AlexDaniel: It's from here: docs.perl6.org/language/glossary#Type_objects
AlexDaniel yeah I see that
uzl I'm inclined to believe it might a typo?! 20:26
* might be ...
tobs I don't think so
AlexDaniel uzl: I think it means something
you should remove it from that sentence for sure, but it was put there intentionally :) 20:27
tobs I believe it's a non-technical term the documenter made up, but the prefix ur- exists in German for example. It could be understood like pre-, I'd say.
MasterDuke prefix ur exists in english too 20:28
uzl Probably the root class? That's what Mu is in the class hierarchy. 20:29
MasterDuke e.g., from dictionary.com: a combining form meaning “earliest, original,” used in words denoting the primal stage of a historical or cultural entity or phenomenon: ur-civilization; urtext.
AlexDaniel uzl: “Classes are objects too, and they inherit from Mu.” Something simple like that should work, probably 20:31
uzl MasterDuke: The more one knows. Never heard of it before ;-)
AlexDaniel the way things are named drives me mad
like, Mu? 20:32
there must have been a better name for that…
uzl AlexDaniel: I'll go with that then.
tobs AlexDaniel: maybe UrClass? :) 20:33
uzl AlexDaniel: Mu has quite the transcendental meaning ;-), en.wikipedia.org/wiki/Mu_(negative) 20:34
20:40 [particle]1 joined 20:41 [particle] left 20:44 irced joined 20:45 marcel_ left 20:47 ayerhart left
irced hi, i'm trying to give a nested class access to the parent classes private variables. i've looked at this a few ways including passing self into the nested class but without success. any suggestions? 20:48
i guess i could methodize the private variable
but any suggestions that maybe wouldn't require passing self into the nested class in the first place maybe? 20:49
exposing private variables seems to defeat the purpose a bit 20:50
20:50 nepugia joined
irced a bit not much 20:50
just that methodizing the private variable means exposure to non nested classes 20:51
20:58 lizmat joined
tobs irced: by nested class you lexically nested, like `class A { ... class B {} }`? In that case, you are just creating two independent classes A and A::B. The instances of those classes are not nested and neither has a special kind of access to the data of the other. In particular A.new does not create an instance of B. It's really just the class *declaration* that is nested. 20:58
irced tobs: thanks for that point. right class A { class B {} } or class A { my class B {} }
20:59 pmurias left
lizmat please note that classes are by default "our" 20:59
m: class A { class B { } }; dd A::B.new # this works
camelia A::B.new
21:00 pmurias joined
lizmat m: class A { my class B { } }; dd A::B.new # a lexical class is only visible inside the scope 21:00
camelia Could not find symbol '&B'
in block <unit> at <tmp> line 1
lizmat ah, I guess I missed part of that conversation :-)
irced lizmat: thanks for that finer point. i only need the class from within
tobs lizmat: appreciate the point nevertheless 21:01
still, nesting the declaration of class B into class A doesn't give instances of B access to privates of instances of A (right?) 21:02
irced tobs: that's the issue. but i can pass in a reference to self and also define the accessor/mutator for the private variable. but this workaround exposes the private variable to other objects 21:03
maybe there is something equivalent to c++ friend ? I think that might work. 21:06
tobs yes, that is exactly what I was searching for :)
irced might being the operative word, since private variables are really tightly scoped
in the syntax it seems. 21:07
still it would require passing a reference to self but at least it would minimize exposure
i haven't tried a private method in the nested class, who knows, trying now 21:10
lizmat private methods won't work 21:11
subs would work, though: normal lexical scoping rules apply
irced lizmat: confirmed, private methods are not granted to the nested class. 21:12
lizmat: ok, considering subs now.
tobs on the other end of the spectrum, Rosetta Code shows how to use the MOP to intrude any class' privacy rosettacode.org/wiki/Break_OO_privacy#Perl_6
irced tobs: i will take a look at that after thanks
lizmat tobs: that works. but it will not perform very well
but yeah, it's objects all the way down :-) 21:13
well, almost, anyway :-)
tobs I've been wondering about the underlying question here before: what is the general sentiment about hiding data inside objects? It seems that here either nobody or everybody gets to read an class' attributes. 21:14
a class' attribute*, singular 21:15
lizmat you could make a private attribute, and create an accessor with access checks... 21:16
irced lizmat: ok, i will consider that next. playing with sub.
lizmat class A { has $!foo; method foo($secret) { $secret eq "foobar" ?? $!foo !! Nil } }
irced lizmat: yeah i could go that route maybe with smart match against the type being the class that is calling it or a .isa perhaps... 21:18
lizmat not sure *why* you would do that, but yeah, those are options 21:19
irced lizmat: not sure why? let nested class be a class that has access to the outer classes private properties. that would be the answer to *why* no ? 21:21
21:21 andrzejku left
irced outer class's 21:22
lizmat feels to me that maybe role composition would be a better route ? 21:23
I mean, if you have 2 classes that need access to the same attributes, maybe those should be in a role ?
irced lizmat: i've considered it... let me see if i can explain why it does not suit my purpose.. 21:24
lizmat: maybe i can't explain it . so i am rethinking it ... 21:25
lizmat I don't mind being rubberducked :-)
irced lizmat: basically i have a map that both classes need access to (the outer class and the nested class)
lizmat: i don't want to create the map twice
lizmat why do you need two classes? 21:26
irced lizmat: if both classes have a role that provide the map, the map is created in two places in memory
lizmat perhaps the map should be its own class, and each class should have an attribute for the same map
21:27 andrzejku joined
lizmat and "handles" for the method it should handle ? 21:27
*methods
tobs m: class B { … }; class A { trusts B; has $!x }; class B { method f ($a) { $a!A::x++ } }; my $a = A.new(:20x); $b = B.new; dd $a; $b.f($a); dd $a
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3) { $a!A::x++ } }; my $a = A.new(:20x); 7⏏5$b = B.new; dd $a; $b.f($a); dd $a
irced lizmat: hmm. well, i still think the map will be created with every instance
lizmat docs.perl6.org/language/typesystem...it-handles
tobs m: class B { … }; class A { trusts B; has $!x }; class B { method f ($a) { $a!A::x++ } }; my $a = A.new(:20x); my $b = B.new; dd $a; $b.f($a); dd $a
camelia 5===SORRY!5=== Error while compiling <tmp>
No such private method '!x' for invocant of type 'A'
at <tmp>:1
------> 3has $!x }; class B { method f ($a) { $a!7⏏5A::x++ } }; my $a = A.new(:20x); my $b =
tobs hmmm
21:28 andrzejku left
tobs but I think I found the "friends" surrogate: trusts. 21:28
irced lizmat: i am looking at the link
tobs: oh?
tobs docs.perl6.org/routine/trusts
lizmat that's also an option, but again, that feels to me like bad design / a hack
irced tobs: okay looks like trusts will work so long as I have a private accessor(/mutator). let's see. 21:29
lizmat: i will come back to handles if needed
21:29 cpan-p6 left
lizmat sure, TIMTOWTDI 21:29
21:29 cpan-p6 joined, cpan-p6 left, cpan-p6 joined
irced lizmat: handles might be better but trusts looks more familiar atm 21:30
tobs: that works! thanks! short battle with the tight syntax but I overcame! 21:36
Geth doc: uzluisf++ created pull request #2937:
Proofread several documents
21:37 uzl left
irced the solution is a little kludgy as lizmat suggested. i needed to forward declare the class then trust then define the nested class. 21:37
tobs The "friend" thing was nagging on my mind. I knew I had seen that before in Perl 6 land :P
irced now i will consider handles
of course, trusts will be cleaner with non-nested paradigms 21:38
tobs I would personally not mind exposing attributes of my class as soon as another class has a reasonable need to access it. That's a... what now? Fourth option? :) 21:39
irced tobs: sacre bleu! 21:40
tobs: what i mean is that's object oriented recklessness 21:42
tobs: but to each their own 21:43
😃 21:45
21:45 Sgeo left
Xliff I heard mention of writing NativeCall bindings for game engine. If anyone is game, I am! ... pun intended! 21:46
I prolly will be writing COGL bindings, soon.
irced lizmat: trait handles is not cooperating at the moment, i'll come back to it again, thanks! 21:53
21:57 Sgeo joined
irced how can i ensure that a getter method returns a reference instead of a copy. apparently when I call a gettor to return a private variable object it is mutable..? 22:01
timotimo is your attribute marked "is rw"? if so, then assigning to what it returns re-assigns the thing in the attribute as well 22:03
irced scratch that last observation, i haven't thoroughly tested it. but anyway, what is the most memory efficient way of creating a query getter
timotimo what's a query getter?
irced a query is a getter that returns an immutable (reference) to the attribute. as opposed to rw, which is get and optionally set
timotimo ah 22:04
well, if you're accessing something that's innately mutable, you'd have to do a defensive copy
irced i might be stretching "query" traditionally a query is a method that does not change a value during its call 22:05
that is a query method will get and guarantee no change occurred to the attributes of the object internally during that call
but anyway, rw is obviously a reference and not a whole copy. how could i get an attribute without getting a whole copy like a pointer to it but a constant pointer 22:06
so i have method private-attribute is rw {!private-attribute} which means i can change it and such
implying it's a pointer 22:07
Xliff irced: I'm thinking you'd want "method private-attribute { $!private-attribute.clone }"
irced but i want to get the private-attribute like method private-attribut is r but not w {!private-attribute} where of course !private-attribute is defined via a has declaration in the class
Xliff: hey that looks neat lemme see 22:08
irced opens the docs.
Geth doc: 3315e00bc9 | (Luis F. Uceta)++ | 4 files
Proofread several documents

glossary.pod6, newline.pod6, quoting.pod6 and syntax.pod6
Changes include minor wording, text reflow, whitespace, unindenting
  =code-wrapped code samples, etc.
doc: 2fe2ce6b7f | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 4 files
Merge pull request #2937 from uzluisf/doc-proofreading-04

Proofread several documents
Xliff m: sub a (+@p) { .gist.say for @p }; a( [1, 'a'], [2, 'b'], [3, 'c'] ) 22:11
camelia [1 a]
[2 b]
[3 c]
Xliff m: sub a (*@p) { .gist.say for @p }; a( [1, 'a'], [2, 'b'], [3, 'c'] ) 22:12
camelia 1
a
2
b
3
c
irced hmm, don't think so. i will go it tobs style and say, if the property is accessible then it deserves to be completely accessible
and stick with rw
😃
Xliff irced: Good luck!
22:14 rindolf left
irced Xliff: thanks 22:14
Xliff m: sub a (*@p) { .gist.say for @p }; my $a = ( [1, 'a'], [2, 'b'], [3, 'c'] ); a(|$a);
camelia 1
a
2
b
3
c
Xliff m: sub a (*@p) { .gist.say for @p }; my $a = ( [1, 'a'], [2, 'b'], [3, 'c'] ); a($a);
camelia ([1 a] [2 b] [3 c])
Xliff "Abby said stop".contains( <said stop>.any ).say 22:19
evalable6 any(True, True)
22:26 pmurias left
irced timotimo: formally, "UML defines a query as an operation that gets a value from a class without changing the system state....Strictly, the idfference between query and modifiers is whether they change the observable state. The observable state is what can be perceived from the outside. An opration that updates a cache would alter the internal state but would have no effect that's observable from the 22:29
outside." -UML Distilled, Fowler # so i stretched stretched it
timotimo an rw accessor would also be a query method then :) 22:33
irced timotimo: so i guess a query is like a getter with a little guarantee that says anything that can be manipulated public won't look different after the call. 22:35
22:35 lizmat left
irced timotimo: yeah, i stretched stretched 22:35
irced might have pulled a muscle.
timotimo you stretched the definition?
22:35 dolmen left 22:36 jaldhar joined
jaldhar quick question: what is the perl6 equivalent of /gc and \G? 22:36
irced timotimo: yeah, i mean in OOP probably UML query is the definition most often referred to and Fowler is the big name in UML
22:38 nepugia left
irced 「/gc and \G」 the first looks like a regex perl5? modifier and what's \G ? 22:38
jaldhar irced: yeah from perl5. \G is the position of the last match. 22:39
ah in perl6 its m:g:c/ ... / apparently. So I just need to know the equivalent to /G 22:40
timotimo i think you may have to use lookbehind assertions 22:41
what does perl5 do if you have multiple \G in your regex?
jaldhar timotimo: I just have the one. I'm using it to match successive words in a while loop. 22:43
irced jaldhar: dunno if this applies, but the last match is assigned to 「$/」
jaldhar: which should apply in the case of looping 22:44
jaldhar: but in complex expressions not so sure, i'm a neophyte in that area
jaldhar: unless you just matched and wanted the match from before :-p 22:45
jaldhar: but in that case you can just put it in a loop state variable?
jaldhar: can you give an example?
jaldhar irced: thanks but I've gone a different way now. 22:47
irced jaldhar: ok, just realized too it's not a "position" instead a match
22:50 pamplemousse left 23:18 empee0 left 23:27 jaldhar left, jaldhar joined 23:35 jaldhar left, jaldhar joined 23:40 john_parr joined 23:52 jaldhar left, jaldhar joined 23:58 lucasb left