Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-19

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 llfourn joined #perl6
00:25 llfourn joined #perl6
00:29 MasterDuke joined #perl6
00:30 margeas joined #perl6
00:30 llfourn joined #perl6
00:35 ryn1x joined #perl6
00:36 tbrowder thnx
00:37 tbrowder when’s the next release gonna happen?
00:39 quotable6 joined #perl6
00:39 tangible6 joined #perl6
00:39 releasable6 joined #perl6
00:39 coverable6 joined #perl6
00:39 nativecallable6 joined #perl6
00:39 bloatable6 joined #perl6
00:39 committable6 joined #perl6
00:39 bisectable6 joined #perl6
00:39 unicodable6 joined #perl6
00:39 greppable6 joined #perl6
00:39 statisfiable6 joined #perl6
00:39 benchable6 joined #perl6
00:39 evalable6 joined #perl6
00:39 squashable6 joined #perl6
00:43 ilmari releasable6: status
00:43 releasable6 ilmari, Next release will happen when it's ready. No blockers. 213 out of 215 commits logged
00:43 releasable6 ilmari, Details: https://gist.github.com/d19d6b333e02aa40999ff37bfd7f6908
00:51 matiaslina joined #perl6
01:00 lizmat joined #perl6
01:04 AlexDaniel tbrowder, ilmari: everything looks good right now, so relatively soon!
01:06 AlexDaniel like in 24 hours maybe
01:35 evalable6 joined #perl6
01:47 aborazmeh joined #perl6
01:47 aborazmeh joined #perl6
01:52 kaare_ joined #perl6
02:05 MasterDuke_ joined #perl6
02:08 ivans joined #perl6
02:12 kyan joined #perl6
02:40 lizmat joined #perl6
02:54 matiaslina joined #perl6
02:55 ilbot3 joined #perl6
02:55 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:57 Exodist joined #perl6
02:57 tejr can i have a perl6 cloak? i wrote some perl6 once
02:57 tejr it was all
02:58 tejr "hello world"
02:58 tejr but with ..uh ... meta-operators. yeah
03:07 john51 joined #perl6
03:08 poohman joined #perl6
03:08 noganex_ joined #perl6
03:10 kaare_ joined #perl6
03:38 ZzZombo timotimo: does it mean if I use `open` directly, it should work with my encoding?
03:41 evalable6 joined #perl6
03:49 ufobat_ joined #perl6
04:24 Cabanoss- joined #perl6
04:31 ZzZombo In other news, Github search is bloody useless, just like Spies.
04:52 itaipu joined #perl6
05:18 mson joined #perl6
05:22 ZzZombo timotimo: https://gist.github.com/ZzZombo/e78cad56722eda7f9fe8f40b33ad6bb5 was updated, I attempted to figure out the decoder functions to implement, can you spot any mistakes. Test run showed empty (or invisible) output, no errors or warnings.
05:29 ivans_ joined #perl6
05:37 Khisanth joined #perl6
05:49 cdg joined #perl6
05:51 khw joined #perl6
05:57 mr-foobar joined #perl6
06:02 darutoko joined #perl6
06:02 Sgeo_ joined #perl6
06:02 Sgeo__ joined #perl6
06:07 ivans joined #perl6
06:14 ZzZombo Nevermind, I figured this out I think. Works as far as I can see.
06:21 ZzZombo Although I am not certain in my implementation, you should take a look anyway. I might overlook and/or misunderstand some things.
06:28 mr-foobar joined #perl6
06:46 rindolf joined #perl6
06:53 parv joined #perl6
07:05 Exodist joined #perl6
07:08 ufobat_ m: require IO::Foo::Bar
07:08 camelia rakudo-moar 85105077a: OUTPUT: «IO::Foo::Bar is a builtin type, not an external module␤  in block <unit> at <tmp> line 1␤␤»
07:09 ufobat_ i am wondering about the error message. It's not a builtin type.
07:20 Exodist joined #perl6
07:21 geekosaur seems like unfortunate conflation of namespacing
07:21 geekosaur I can see the point, kind of, but also think it's a bit of  bad idea to extend it beyond actual built-in types, because it means you can't expand their repertoire via the ecosystem
07:26 mr-foobar joined #perl6
07:36 wamba joined #perl6
07:42 llfourn joined #perl6
07:44 P6_ joined #perl6
07:44 ufobat_ geekosaur: what about using IO::Socket::Async::SSL while having it not installed :-(
07:46 geekosaur I ntoe that use doesn't have the same behavior.
07:46 geekosaur require is a bit of a special case
07:46 geekosaur and, well, the namespacing might actually be an issue because require is runtime, whereas use is compile time
07:47 ufobat_ m: use IO::Foo::Bar
07:47 camelia rakudo-moar 85105077a: OUTPUT: «===SORRY!===␤Could not find IO::Foo::Bar at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompU…»
07:48 ufobat_ I am using require because it depends on the user of the module wether he wants/has ssl installed or not
07:48 geekosaur (more precisely, because require is runtime, there is the potential for its parameter to be computed)
07:49 ufobat_ https://github.com/ufobat/HTTP-Server-Ogre/issues/2 - i was just confused by the error
07:54 ufobat_ i am going to create a perl6 ticket for this :-)
07:54 ZzZombo there should already be
07:55 ZzZombo I recall reporting this behavior a year or so ago, it was noted.
07:56 bartolin c
08:17 sena_kun joined #perl6
08:31 mson joined #perl6
08:32 ccakes joined #perl6
08:37 ZzZombo How can I overwrite contents of a `rw` `IO::Handle`?
08:39 ivans joined #perl6
08:41 ZzZombo `$*KERNEL` returns 'unknown' for anything but `name` on my Windows machine, is it normal?
08:42 philomath joined #perl6
08:43 ZzZombo And it died for CPU info accessors.
08:44 ivans joined #perl6
08:49 setty1 joined #perl6
08:56 mr-foobar joined #perl6
08:57 wamba joined #perl6
09:07 rindolf joined #perl6
09:17 ivans joined #perl6
09:22 mr-fooba_ joined #perl6
09:24 cdg joined #perl6
09:25 cdg_ joined #perl6
09:29 lizmat joined #perl6
09:32 konsolebox joined #perl6
09:44 cdg joined #perl6
09:51 kalkin- joined #perl6
09:51 domidumont joined #perl6
09:56 domidumont joined #perl6
10:22 moritz ZzZombo: you can .print or .say or .write tot he IO handle
10:23 ZzZombo ah, so I shouldn't use `spurt` for this.
10:24 isBEKaml joined #perl6
10:25 tyil spurt is to write to an actual path on your filesystem
10:25 tyil it basically opens the io handle and writes to it and closes it again for you
10:25 ZzZombo eh?
10:25 tyil if you have an open handle already, you can use the methods moritz gave you
10:26 ZzZombo m: say IO::Handle.^methods.grep: *.name eq 'spurt';
10:26 camelia rakudo-moar 85105077a: OUTPUT: «()␤»
10:26 ZzZombo m: say IO::Handle.^methods
10:26 camelia rakudo-moar 85105077a: OUTPUT: «(gist new FALLBACK)␤»
10:26 ZzZombo m: say IO::Handle.methods.grep: *.name eq 'spurt';
10:26 camelia rakudo-moar 85105077a: OUTPUT: «IO::Handle is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method FALLBACK at src/RESTRICTED.setting line 31␤  in block <unit> at <tmp> line 1␤␤»
10:27 ZzZombo well, the point is, IO::Handle also can spurt things
10:28 tyil heh, you're right, didn't know that
10:28 tyil multi method spurt(IO::Handle:D: Cool $data, :$close = False)
10:43 philomath joined #perl6
10:52 ivans joined #perl6
10:58 ufobat joined #perl6
11:21 eliasr joined #perl6
11:34 itaipu joined #perl6
11:38 mr-foobar joined #perl6
11:45 s0me0ne-unkn0wn joined #perl6
11:51 s0me0ne-unkn0wn joined #perl6
12:00 itaipu joined #perl6
12:01 Geth ¦ doc: bfa2947a73 | (Jan-Olof Hendig)++ | 2 files
12:01 Geth ¦ doc: Remove a couple of non working C<> tags from a =SUBTITLE
12:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bfa2947a73
12:16 robertle joined #perl6
12:16 Geth ¦ doc: 16dfa87caa | (Jan-Olof Hendig)++ | 2 files
12:16 Geth ¦ doc: Sundry formatting fixes
12:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/16dfa87caa
12:27 llfourn joined #perl6
12:41 phogg joined #perl6
12:41 phogg joined #perl6
12:42 wamba joined #perl6
12:49 cdg joined #perl6
12:50 Aaronepower joined #perl6
12:54 timotimo benchable6: releases my $n = 3_000; my $sum = 0; loop (my $i = 1; $i <= $n; $i++) { loop (my $j = 1; $j <= $i; $j++) { $sum += $i+$j; } }
12:54 benchable6 timotimo, starting to benchmark the 24 given commits
12:59 benchable6 joined #perl6
12:59 timotimo mhh
13:00 timotimo benchable6: 2017.01,2017.03,2017.05,2017.07,2017.09,2017.11 my $n = 3_000; my $sum = 0; loop (my $i = 1; $i <= $n; $i++) { loop (my $j = 1; $j <= $i; $j++) { $sum += $i+$j; } }
13:00 benchable6 timotimo, starting to benchmark the 6 given commits
13:02 benchable6 timotimo, benchmarked the given commits, now zooming in on performance differences
13:03 benchable6 timotimo, https://gist.github.com/6a62b68db0dbfa26c0d5adf135fdface
13:04 timotimo benchable6: 2017.09,2017.10 my $n = 3_000; my $sum = 0; loop (my $i = 1; $i <= $n; $i++) { loop (my $j = 1; $j <= $i; $j++) { $sum += $i+$j; } }
13:04 benchable6 timotimo, starting to benchmark the 2 given commits
13:04 benchable6 timotimo, benchmarked the given commits, now zooming in on performance differences
13:04 benchable6 timotimo, ¦2017.09: «3.6152» ¦2017.10: «3.5363»
13:10 Geth ¦ doc: 0c2a5aea09 | (Jan-Olof Hendig)++ | doc/Type/Proc/Async.pod6
13:10 Geth ¦ doc: Fixed formatting of code example and a few broken method links
13:10 synopsebot Link: https://doc.perl6.org/type/Proc/Async
13:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0c2a5aea09
13:28 ZzZombo how can I display an Instant with a precision down to milliseconds?
13:29 evalable6 joined #perl6
13:37 moritz m: say now
13:37 camelia rakudo-moar 85105077a: OUTPUT: «Instant:1511098685.135303␤»
13:37 moritz looks like milliseconds to me already
13:37 moritz even microseconds
13:37 moritz m: say now.^name
13:37 camelia rakudo-moar 85105077a: OUTPUT: «Instant␤»
13:38 ZzZombo eh, down to, but not more.
13:38 ZzZombo too verbose for my purposes
13:39 moritz m: say now.tai.fmt("%.3f")
13:39 camelia rakudo-moar 85105077a: OUTPUT: «1511098816.429␤»
13:39 ZzZombo `.tai`?
13:40 moritz https://en.wikipedia.org/wiki/International_Atomic_Time
13:41 ZzZombo m: say ($_,.tai) with now
13:41 camelia rakudo-moar 85105077a: OUTPUT: «(Instant:1511098902.795335 1511098902.795335)␤»
13:41 ZzZombo m: say now.tai.WHAT
13:41 camelia rakudo-moar 85105077a: OUTPUT: «(Rat)␤»
13:48 ZzZombo `.push(my $=Grammar::VDF::Section.new(:name<x>))` # Pod variable $=Section not yet implemented. Sorry.
13:48 ZzZombo What??
13:49 moritz $=Grammar is a POD variable
13:49 moritz syntax-wise
13:49 moritz what did you mean to write?
13:49 moritz my $ = Grammar::VDF::Section.new(:name<x>)
13:49 moritz ?
13:49 ZzZombo copy a new object to a anon var
13:49 moritz then you need whitespace around it
13:51 MasterDuke timotimo: those commits that benchable is pointing out don't seem right, either for your runs here or mine in #whateverable
14:00 kitsunenokenja joined #perl6
14:04 ZzZombo timotimo: please take a look at my gist when you have time. Thanks.
14:10 ZzZombo Also about this line `.push(my $ = Grammar::VDF::Section.new(:name<x>))`, why can it be so if I omit the assignment here, the object silently doesn't get pushed, and can't be later accessed, but first assigning it to a variable before pushing fixes it.
14:11 ZzZombo my `push` method is a simple `multi method push(::?CLASS:D: *@children --> ::?CLASS:D)` that greps valid elements and appends them to internal array.
14:18 Aaronepower joined #perl6
14:22 Geth ¦ doc: 446a58a949 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Telemetry.pod6
14:22 synopsebot Link: https://doc.perl6.org/type/Telemetry
14:22 Geth ¦ doc: Deconfuse “KBytes”
14:22 Geth ¦ doc:
14:22 Geth ¦ doc: See these:
14:22 Geth ¦ doc: * https://github.com/torvalds/linux/blob/c9b012e5f4a1d01dfa8abc6318211a67ba7d5db2/kernel/sys.c#L1731
14:22 Geth ¦ doc: * https://github.com/perl6/whateverable/issues/260#issuecomment-345504033
14:22 Geth ¦ doc:
14:22 Geth ¦ doc: “KBytes” is amiguous and arguably wrong. “KiB” is spot on.
14:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/446a58a949
14:23 buggable New CPAN upload: App-Cpan6-0.8.3.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/App-Cpan6-0.8.3.tar.gz
14:24 Geth ¦ whateverable: 54cc4bb763 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable.pm6
14:24 Geth ¦ whateverable: Correct max-rss value
14:24 Geth ¦ whateverable:
14:24 Geth ¦ whateverable: See https://github.com/perl6/doc/commit/446a58a949b623fd409010f22303dcfdd8cce872
14:24 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/54cc4bb763
14:25 Geth ¦ doc: 1d00cdd8ba | (Jan-Olof Hendig)++ | doc/Type/Supplier.pod6
14:25 synopsebot Link: https://doc.perl6.org/type/Supplier
14:25 Geth ¦ doc: Fix broken link
14:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1d00cdd8ba
14:27 Geth ¦ doc: a8ab80ba48 | (Jan-Olof Hendig)++ | doc/Type/Scalar.pod6
14:27 synopsebot Link: https://doc.perl6.org/type/Scalar
14:27 Geth ¦ doc: Fix formatting
14:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a8ab80ba48
14:48 evalable6 joined #perl6
14:59 mr-foobar joined #perl6
15:02 ZzZombo what does this do?
15:02 ZzZombo m: my @a=1,2,3;@a ,= 4; @a.say;
15:02 camelia rakudo-moar 85105077a: OUTPUT: «(\Array_58169936 = [Array_58169936 4])␤»
15:03 nhywyll joined #perl6
15:03 timotimo it creates an array that has itself as its first entry and a 4 after itself
15:03 timotimo the 1, 2, 3 gets replaced by the second assignment
15:03 timotimo m: my @a = 1, 2, 3; @a [R,]= 4; @a.say
15:03 camelia rakudo-moar 85105077a: OUTPUT: «Potential difficulties:␤    Useless use of [R,]= in sink context␤    at <tmp>:1␤    ------> 3my @a = 1, 2, 3; @a 7⏏5[R,]= 4; @a.say␤(\Array_71049168 = [4 Array_71049168])␤»
15:03 buggable New CPAN upload: App-Cpan6-0.11.0.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/App-Cpan6-0.11.0.tar.gz
15:04 timotimo ah, that bug again
15:23 moritz https://github.com/moritz/json/issues/33 zef seems to be try to parse a .gitignore file as JSON
15:23 moritz is that a known bug in zef?
15:24 ZzZombo can I `.append` a hash with overwriting existing values, instead of promoting them into arrays in appending them?
15:26 moritz if you want that, you can just assign them
15:26 moritz m: my %h = a => 1, b => 2; my %x = b => 3, c => 4; %h ,= %x; say %h.perl
15:26 camelia rakudo-moar 85105077a: OUTPUT: «{:a(1), :b(3), :c(4)}␤»
15:45 zakharyas joined #perl6
15:48 ufobat joined #perl6
15:50 zakharyas joined #perl6
15:52 isBEKaml joined #perl6
16:08 Geth ¦ doc: 9906829d4f | (Will "Coke" Coleda)++ | xt/words.pws
16:08 Geth ¦ doc: learn new word
16:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9906829d4f
16:08 Geth ¦ doc: 6ac188200d | (Will "Coke" Coleda)++ | xt/words.pws
16:08 Geth ¦ doc: learn new word
16:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6ac188200d
16:20 s0me0ne-unkn0wn p6: my $s = supply { emit "hi!" }; $s.tap( -> $v {}); say $s.wait;
16:20 camelia rakudo-moar 85105077a: OUTPUT: «hi!␤»
16:20 s0me0ne-unkn0wn Some inconsistency here
16:21 s0me0ne-unkn0wn According to docs, "method wait(Supply:D:) Waits until the supply is done (in which case it returns True) or quit (in which case it will throw the exception that was passed to quit)."
16:21 s0me0ne-unkn0wn Looks like it returns the whole payload tapped from supply instead of just True
16:22 evalable6 joined #perl6
16:24 s0me0ne-unkn0wn Indeed event the tapping itself is not required
16:24 s0me0ne-unkn0wn p6: my $s = supply { emit "hi!" }; say $s.wait;
16:24 camelia rakudo-moar 85105077a: OUTPUT: «hi!␤»
16:25 s0me0ne-unkn0wn The only question if I can rely on this behavior
16:26 comborico1611 joined #perl6
16:26 comborico1611 Good morning, Vietnam!
16:27 wamba joined #perl6
16:29 timotimo s0me0ne-unkn0wn: easiest way to find out is to see how it's tested in roast
16:31 astronavt joined #perl6
16:33 astronavt joined #perl6
16:35 domidumont joined #perl6
16:38 timotimo in none of the tests in S17-supply/wait.t the wait method is called in a context that'd give a value at all
16:38 timotimo my $s = supply { emit "hi!"; emit "goobdye!" }; say $s.wait;
16:38 timotimo m: my $s = supply { emit "hi!"; emit "goobdye!" }; say $s.wait;
16:38 camelia rakudo-moar 85105077a: OUTPUT: «goobdye!␤»
16:39 timotimo at least it only gives the very last value rather than saving up values
16:39 timotimo ah, yes, method wait is just "await self.Promise"
16:39 s0me0ne-unkn0wn Yes, looking at source too
16:40 timotimo and the .Promise behaviour is tested to give the last emitted value
16:40 timotimo maybe all that wants changing is to have method wait(--> True) { await self.Promise }
16:44 s0me0ne-unkn0wn I see, thank you. Going to use `wait` in boolean context then :)
16:45 timotimo i'd wait in sink context
16:46 Aaronepower joined #perl6
16:50 astronav_ joined #perl6
17:08 astronavt joined #perl6
17:22 ___luke___ joined #perl6
17:24 ___luke___ Hello, while golfing a perl 6 program, I ended up with $_??A!!B (where A and B are statements). $_ can be 0..5. Is there a shorter way to achieve the same functionality?
17:25 ___luke___ As $_ is the default argument to a lot of funtions, I think there's something shorter, but I'm not sure as to what exactly.
17:25 moritz well, you can call methods on $_ with a shortcut
17:25 moritz m: $_ = 42; .say
17:25 camelia rakudo-moar 85105077a: OUTPUT: «42␤»
17:25 moritz but I know nothing shorter than ?? !! for an if/else or ternary operator
17:26 ___luke___ Yeah, but A and B are strings. My code basically looks like say $_??"stringA"x$_!!"StringB"for ^6
17:28 mr-foobar joined #perl6
17:28 ___luke___ Also, how come I can't do "="x10, but instead have to insert a space between the x and the 1?
17:28 eroux joined #perl6
17:29 AlexDaniel ___luke___: use ⑩ instead of 10
17:29 AlexDaniel ___luke___: as for ?? !!, I don't know any shorter way to do it, unfortunately
17:30 ___luke___ Is ⑩ 1 byte or 2?
17:30 AlexDaniel well… it's one character :)
17:31 AlexDaniel the number of bytes will depend on the encoding…
17:31 ___luke___ Sadly, codegolf.stackexchange uses bytes ;-)
17:31 mson joined #perl6
17:31 AlexDaniel in what encoding?
17:31 AlexDaniel well, let's assume utf8
17:31 ___luke___ You can pick that yourself
17:31 AlexDaniel m: say ‘⑩’.encode
17:31 camelia rakudo-moar 85105077a: OUTPUT: «utf8:0x<e2 91 a9>␤»
17:31 AlexDaniel that's three
17:31 ___luke___ So it doesn't save anything...
17:33 AlexDaniel ___luke___: fwiw, for unicode-aware golfing there's https://code-golf.io/
17:33 ___luke___ Yeah, but the high scores of others slightly demotivate me ;)
17:33 ___luke___ I'll first practise some more
17:33 ___luke___ Thanks for the tip though
17:36 ___luke___ AlexDaniel: I wonder, does your solution still count if it's exactly the same as the solution of someone else?
17:37 AlexDaniel ___luke___: yes
17:37 AlexDaniel but solutions are not shown, so copy-pasting is unlikely
17:37 ___luke___ Hmm, that explains all the 19-byte quines
17:38 AlexDaniel well, yeah, unless we're talking about the quine task… it's rather obvious (or takes 1 minute of googling)
17:38 AlexDaniel fwiw here's my perl 6 solution, but it's not competitive
17:38 AlexDaniel huggable: quine
17:38 huggable AlexDaniel, BEGIN {use nqp;put nqp::getlexdyn(‘$/’)}
17:38 AlexDaniel m: BEGIN {use nqp;put nqp::getlexdyn(‘$/’)}
17:38 camelia rakudo-moar 85105077a: OUTPUT: «BEGIN {use nqp;put nqp::getlexdyn(‘$/’)}␤»
17:38 ___luke___ O.o
17:39 ___luke___ How does that even work?
17:39 AlexDaniel in fact, even rosettacode quine is shorter: https://rosettacode.org/wiki/Quine#Perl_6
17:40 AlexDaniel ___luke___: perl 6 is parsed with perl 6, sort of. So you can actually manage to get the source code that is being parsed
17:40 ___luke___ That feels like cheating ;)
17:40 ugexe m: say (“foo” x 0).Bool
17:40 camelia rakudo-moar 85105077a: OUTPUT: «False␤»
17:41 AlexDaniel just printing $/ will not give the whole source file I think
17:41 AlexDaniel m: say 42; BEGIN {use nqp;put nqp::getlexdyn(‘$/’)}
17:41 camelia rakudo-moar 85105077a: OUTPUT: «BEGIN {use nqp;put nqp::getlexdyn(‘$/’)}␤42␤»
17:41 ugexe No ??!! needed, just ||
17:41 AlexDaniel m: say 42; BEGIN {use nqp;put nqp::getlexdyn(‘$/’).orig}
17:41 camelia rakudo-moar 85105077a: OUTPUT: «say 42; BEGIN {use nqp;put nqp::getlexdyn(‘$/’).orig}␤42␤»
17:41 darkmorph joined #perl6
17:41 AlexDaniel but .orig will :)
17:42 AlexDaniel ___luke___: isn't cheating the whole point of code golf? :)
17:42 ___luke___ ugexe: fair enough. However, A is not the empty string when $_ is 0. I slightly simplified my code.
17:43 kitsunenokenja joined #perl6
17:43 ___luke___ Since I've started golfing, I golf by SE's rules. One of their quine rules is that you can't read your own source file
17:44 ___luke___ So I guess that has also become my "moral standpoint"
17:44 ___luke___ However, I think your solution looks really nice.
17:44 ___luke___ The long function name is a pity though
17:45 AlexDaniel yeah, and you also need BEGIN so that it is compile-time, otherwise it doesn't work
17:47 ___luke___ If you're interested, here's my current solution: https://codegolf.stackexchange.com/a/148419/63774. Maybe you see some golfing opportunities...
17:47 Aaronepower joined #perl6
17:48 AlexDaniel lol what a wonderful task
17:52 AlexDaniel ___luke___: doesn't look like you're saving anything by using ?? !!
17:52 AlexDaniel ___luke___: you can just use two “say“ statements with the same result
17:53 ___luke___ But then I need to add 2 bytes to my range to specify that I want to start at 1
17:54 AlexDaniel ooh didn't see that
17:57 AlexDaniel ___luke___: well, I'd write it like this: https://gist.github.com/AlexDaniel/aa9e295600eb66479afe81cfedbb3ae1
17:58 ___luke___ That's... different
17:58 mr-foobar joined #perl6
17:59 ___luke___ That saves 1 byte
17:59 ___luke___ Nice use of the unnamed variable thing
18:00 ___luke___ Still trying to get used to that, since it's not in any previous language I've learned
18:00 AlexDaniel ___luke___: the really nice thing about it is xx
18:00 AlexDaniel because in some cases you can use that instead of a for loop
18:01 AlexDaniel and it makes a difference sometimes
18:01 ___luke___ Yeah, though I don't really understand how that causes "say" to be executed 5 times...
18:01 AlexDaniel exactly!
18:03 astronavt joined #perl6
18:05 kitsunenokenja joined #perl6
18:09 ___luke___ I'll just accept that as a quirk of perl 6
18:10 AlexDaniel ___luke___: there's a way to save one more byte
18:10 ___luke___ Is there a way to tell without testing when it will work and when it won't work?
18:11 AlexDaniel ___luke___: https://gist.github.com/AlexDaniel/aa9e295600eb66479afe81cfedbb3ae1
18:11 AlexDaniel ___luke___: but if I'm not mistaken, the saving comes from x$--+5
18:11 AlexDaniel so you can do that in the previous solution as well
18:11 AlexDaniel ___luke___: as for your question, I don't really understand it
18:12 ___luke___ Thanks a lot for that as well!
18:12 AlexDaniel though the last solution probably has some trailing whitespace, maybe
18:13 ___luke___ Trailing whitespace doesn't matter
18:13 timotimo u: exclamation
18:13 unicodable6 timotimo, U+0021 EXCLAMATION MARK [Po] (!)
18:13 unicodable6 timotimo, U+00A1 INVERTED EXCLAMATION MARK [Po] (¡)
18:13 unicodable6 timotimo, 24 characters in total: https://gist.github.com/f691763288348d90bbb99588ee836583
18:13 ___luke___ But I just merged both your solutions
18:14 timotimo u: question
18:14 unicodable6 timotimo, U+003F QUESTION MARK [Po] (?)
18:14 unicodable6 timotimo, U+00BF INVERTED QUESTION MARK [Po] (¿)
18:14 unicodable6 timotimo, 28 characters in total: https://gist.github.com/c119dcc9fe2bc724f58926e06d44ec6d
18:14 timotimo m: say Bool.pick ⁇ 1 ‼ 2
18:14 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say Bool.pick7⏏5 ⁇ 1 ‼ 2␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier…»
18:14 timotimo bleh :)
18:15 ___luke___ AlexDaniel: Is it okay if I post it on codegolf.stackexchange (giving proper credit of course)?
18:15 AlexDaniel no problem, that's exactly why I share this kind of stuff
18:16 Aaronepower joined #perl6
18:16 AlexDaniel (with credit or not, I don't care)
18:17 AlexDaniel c: ed971df say Bool.pick ⁇ 1 ‼ 2
18:17 committable6 AlexDaniel, ¦ed971df: «2»
18:17 AlexDaniel timotimo: ↑
18:18 timotimo there was a version that allowed that?
18:19 AlexDaniel yeah
18:19 timotimo it regressed?
18:20 AlexDaniel no, removed deliberately https://rt.perl.org/Ticket/Display.html?id=131002#txn-1453776
18:20 ___luke___ Another golfing idea: maybe I can change the "(==========)" and "(----------)" by using the .gist of some lists...
18:20 timotimo m: say <=====>
18:20 camelia rakudo-moar 85105077a: OUTPUT: «=====␤»
18:20 timotimo m: say <=====>.gist
18:20 camelia rakudo-moar 85105077a: OUTPUT: «=====␤»
18:20 timotimo m: say <=====>.perl
18:20 camelia rakudo-moar 85105077a: OUTPUT: «"====="␤»
18:20 timotimo not a list, i see
18:21 astronavt joined #perl6
18:21 Geth ¦ doc: jstuder-gh++ created pull request #1681: Rewrite, remove inaccurate Range truncation info
18:21 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1681
18:21 timotimo m: say <===== =>[0]
18:21 camelia rakudo-moar 85105077a: OUTPUT: «=====␤»
18:21 timotimo m: say <===== =>[0].gist
18:21 camelia rakudo-moar 85105077a: OUTPUT: «=====␤»
18:21 timotimo er, yeah
18:21 timotimo m: say <=====>.List.gist
18:21 camelia rakudo-moar 85105077a: OUTPUT: «(=====)␤»
18:21 timotimo loooooooooong
18:22 ___luke___ m: say ("="x 10,)
18:22 camelia rakudo-moar 85105077a: OUTPUT: «(==========)␤»
18:22 ___luke___ That seems more golfy
18:25 timotimo m: say "="x10xx1
18:25 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say "="7⏏5x10xx1␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier…»
18:25 timotimo m: say "="x\10xx\1
18:25 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5===␤Confused␤at <tmp>:1␤------> 3say "="x\107⏏5xx\1␤Other potential difficulties:␤    To refer to a positional match capture, just use $0 (numbering starts at 0).␤    Parenthesize as \(...) if you intended a capture of…»
18:25 timotimo m: say "="x 10 xx 1
18:25 camelia rakudo-moar 85105077a: OUTPUT: «(==========)␤»
18:25 timotimo m: say 1Rxx "="x 10
18:25 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 17⏏5Rxx "="x 10␤»
18:25 timotimo m: say 1 Rxx "="x 10
18:25 camelia rakudo-moar 85105077a: OUTPUT: «==========␤»
18:25 ___luke___ m: say((<- = _>[$++]x(6,10,10)[$++],))xx 3
18:25 camelia rakudo-moar 85105077a: OUTPUT: «(------)␤(==========)␤(__________)␤»
18:25 timotimo wrong order, huh
18:26 timotimo that looks like you want the Z metaop
18:26 timotimo m: say((<- = _>Zx(6,10,10),))xx 3
18:26 camelia rakudo-moar 85105077a: OUTPUT: «(---)␤(---)␤(---)␤»
18:26 timotimo oops
18:27 timotimo m: say(<- = _> Zx (6,10,10))xx 3
18:27 camelia rakudo-moar 85105077a: OUTPUT: «(------ ========== __________)␤(------ ========== __________)␤(------ ========== __________)␤»
18:27 timotimo even worse!
18:27 timotimo oh, no, even better!
18:27 timotimo m: say(<- = _> Zx (6,10,10))
18:27 camelia rakudo-moar 85105077a: OUTPUT: «(------ ========== __________)␤»
18:27 timotimo m: .say for <- = _> Zx (6,10,10)
18:27 camelia rakudo-moar 85105077a: OUTPUT: «------␤==========␤__________␤»
18:27 timotimo m: gist.say for <- = _> Zx (6,10,10)
18:27 camelia rakudo-moar 85105077a: OUTPUT: «()␤()␤()␤»
18:27 timotimo m: .gist.say for <- = _> Zx (6,10,10)
18:27 camelia rakudo-moar 85105077a: OUTPUT: «------␤==========␤__________␤»
18:27 timotimo ah, not lists any more
18:28 timotimo m: .say for <- = _> Zx (6,10,10) Zxx 1
18:28 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Only identical operators may be list associative; since 'Zx' and 'Zxx' differ, they are non-associative and you need to clarify with parentheses␤at <tmp>:1␤------> 3.say for <- = _> Zx (6,10,10) Z…»
18:28 timotimo m: .say for (<- = _> Zx (6,10,10)) Zxx 1
18:28 camelia rakudo-moar 85105077a: OUTPUT: «(------)␤»
18:28 timotimo m: .say for (<- = _> Zx (6,10,10)) Xxx 1
18:28 camelia rakudo-moar 85105077a: OUTPUT: «(------)␤(==========)␤(__________)␤»
18:28 timotimo it's *barely* shorter
18:28 timotimo m: .say for (<- = _>Zx(6,10,10))Xxx1
18:28 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing expression for 'for' statement modifier␤at <tmp>:1␤------> 3.say for 7⏏5(<- = _>Zx(6,10,10))Xxx1␤»
18:28 ___luke___ Yeah, but then I need to fit it into the rest of the thing
18:28 timotimo m: .say for (<- = _>Zx(6,10,10)) Xxx 1
18:28 camelia rakudo-moar 85105077a: OUTPUT: «(------)␤(==========)␤(__________)␤»
18:28 timotimo yeah
18:29 ___luke___ m: .say for (<- = _>Zx(6,10,10).List)
18:29 camelia rakudo-moar 85105077a: OUTPUT: «------␤==========␤__________␤»
18:29 ___luke___ m: .say for ((<- = _>Zx(6,10,10)).List)
18:29 camelia rakudo-moar 85105077a: OUTPUT: «------␤==========␤__________␤»
18:30 timotimo it has to .List each in turn
18:30 timotimo so .List.say for example would do ti
18:30 ___luke___ Yeah
18:30 timotimo btw, do you know the reverse join trick?
18:30 ___luke___ Don't think so
18:30 timotimo m: say <( )>.join("hello, how are you")
18:30 camelia rakudo-moar 85105077a: OUTPUT: «(hello, how are you)␤»
18:30 timotimo it joins the "(" and ")" by putting the string in between
18:31 ___luke___ I briefly tried that in one of my previous attempts, but it didn't work
18:31 timotimo don't think it helps here, but it's probably a neat trick in general
18:31 AlexDaniel it is, and that's the first time I hear about it XD
18:33 AlexDaniel maybe because in most cases you'd probably do this anyway:
18:33 AlexDaniel m: put ‘(’,"hello, how are you",‘)’
18:33 camelia rakudo-moar 85105077a: OUTPUT: «(hello, how are you)␤»
18:33 isBEKaml joined #perl6
18:33 ___luke___ m: say <( )>.join("="x 10)
18:33 camelia rakudo-moar 85105077a: OUTPUT: «(==========)␤»
18:34 ___luke___ m: say "(","="x 10,")"
18:34 camelia rakudo-moar 85105077a: OUTPUT: «(==========)␤»
18:34 timotimo it's true
18:34 timotimo but i love how it puts the parens right next to each other
18:34 timotimo then again, there's
18:34 timotimo m: say (1234).fmt: "(%s)"
18:34 camelia rakudo-moar 85105077a: OUTPUT: «(1234)␤»
18:35 timotimo m: say (1234).fmt: "<%s>"
18:35 camelia rakudo-moar 85105077a: OUTPUT: «<1234>␤»
18:37 kitsunenokenja joined #perl6
18:40 ___luke___ m: say .fmt:"(%s)"for ("-"x 8,"="x 10, "_"x 10)
18:40 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say .fmt:7⏏5"(%s)"for ("-"x 8,"="x 10, "_"x 10)␤    expecting any of:␤        colon pair␤»
18:40 ___luke___ m: say .fmt: "(%s)"for ("-"x 8,"="x 10, "_"x 10)
18:40 camelia rakudo-moar 85105077a: OUTPUT: «(--------)␤(==========)␤(__________)␤»
18:40 timotimo i'm surprised you can put a postfix for after a method with colon form
18:40 ___luke___ Yeah
18:41 ___luke___ Won't complain though ;P
18:42 timotimo positively surprised
18:42 Aaronepower joined #perl6
19:20 kaare_ joined #perl6
19:20 eliasr joined #perl6
19:23 ___luke___ say .fmt: "(%s)"for <- = _>Zx(6,10,10)
19:23 evalable6 ___luke___, rakudo-moar 85105077a: OUTPUT: «(------)␤(==========)␤(__________)»
19:24 Geth ¦ ecosystem: drforr++ created pull request #380: Adding META entry for Format::Lisp
19:24 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/380
19:27 nhywyll joined #perl6
19:27 DrForr Travis run on the repo remotely as well, neato.
19:31 SylvieLorxu left #perl6
19:36 Geth ¦ ecosystem: 83f3a359dd | (Jeff Goff)++ | META.list
19:36 Geth ¦ ecosystem: Adding META entry for Format::Lisp
19:36 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/83f3a359dd
19:36 Geth ¦ ecosystem: 4e63a2b5dc | (Jeff Goff)++ (committed using GitHub Web editor) | META.list
19:36 Geth ¦ ecosystem: Merge pull request #380 from drforr/drforr-Format-Lisp
19:36 Geth ¦ ecosystem:
19:36 Geth ¦ ecosystem: Adding META entry for Format::Lisp
19:36 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/4e63a2b5dc
19:43 kaare_ joined #perl6
19:50 Geth ¦ book: 9481b4d518 | (Moritz Lenz)++ | 2 files
19:50 Geth ¦ book: Convert README to markdown
19:50 Geth ¦ book: review: https://github.com/perl6/book/commit/9481b4d518
19:53 Geth ¦ book: 7e76ade5b2 | (Moritz Lenz)++ | README.md
19:53 Geth ¦ book: README: add link to perl6book.com
19:53 Geth ¦ book: review: https://github.com/perl6/book/commit/7e76ade5b2
19:54 moritz I'm not reviving this zombie, just updating the README with pointers to modern resources
20:11 R0b0t1_ joined #perl6
20:27 s0me0ne-unkn0wn Okay, I'm probably too narrow-minded to realize that supply/wait concept.
20:27 s0me0ne-unkn0wn p6: my $s = supply { emit "1"; emit "2"; say "tapped"; }; $s.tap( -> $v { say $v }); $s.wait;
20:27 camelia rakudo-moar 85105077a: OUTPUT: «1␤2␤tapped␤tapped␤»
20:28 s0me0ne-unkn0wn That is, when we're wait()ing for our supply, we're tapping the supply once again, re-running all the code inside supply{} and re-emitting everyting.
20:28 mr-foobar joined #perl6
20:28 s0me0ne-unkn0wn But in the real world supply{} code is not just "emit 1", it can include sql queries to remote servers and even side-effects like emitting an output of /dev/random
20:28 s0me0ne-unkn0wn Do we really want to redo all the job just to make sure supply is done emitting?!
20:30 moritz m: my $s = supply { emit "1"; emit "2"; say "tapped"; }; $s.tap( -> $v { say $v });
20:30 camelia rakudo-moar 85105077a: OUTPUT: «1␤2␤tapped␤»
20:30 moritz m: my $s = supply { emit "1"; emit "2"; say "tapped"; done; }; $s.tap( -> $v { say $v }); $s.wait
20:30 camelia rakudo-moar 85105077a: OUTPUT: «1␤2␤tapped␤tapped␤»
20:31 * moritz kinda surprised
20:32 * s0me0ne-unkn0wn too
20:33 s0me0ne-unkn0wn method wait(Supply:D:) { await self.Promise }
20:33 s0me0ne-unkn0wn method Promise(Supply:D:) {
20:33 s0me0ne-unkn0wn my $p = Promise.new;
20:33 s0me0ne-unkn0wn my $v = $p.vow;
20:33 s0me0ne-unkn0wn my $final := Nil;
20:33 s0me0ne-unkn0wn my $t = self.tap:
20:33 s0me0ne-unkn0wn -> \val { $final := val },
20:33 s0me0ne-unkn0wn done => { $v.keep($final) },
20:33 s0me0ne-unkn0wn quit => -> \ex { $v.break(ex) };
20:33 s0me0ne-unkn0wn $p
20:33 s0me0ne-unkn0wn }
20:33 s0me0ne-unkn0wn The exact wait() code from 2017.10
20:37 ryn1x_ joined #perl6
20:40 Ven joined #perl6
20:43 s0me0ne-unkn0wn ufobat: pls pay attention to that wait() behavior
20:43 ufobat ?
20:44 s0me0ne-unkn0wn ufobat: HTTP::Server::Ogre::HTTP1Protocol is affected
20:44 s0me0ne-unkn0wn ^^^
20:45 s0me0ne-unkn0wn ufobat: supply{} returned to app() is tapped twice
20:48 ufobat the $body-supply.wait() thingy?
20:48 s0me0ne-unkn0wn Exactly
20:49 s0me0ne-unkn0wn Not sure how to work around it
20:49 s0me0ne-unkn0wn Probably Supply.grab()
20:49 ufobat why not done => { $conn.close() } in the call to .tap?
20:53 s0me0ne-unkn0wn Agree, much better
20:54 ufobat and quit => ... with the same code, just in case we're exiting somehow
20:54 ufobat does this double tap has any negative impact
20:54 ufobat i think the wait blocks somehow, right?
20:55 s0me0ne-unkn0wn Yes, look at a chatlog 20 messages up
20:55 moritz wait returns a promise
20:55 moritz and a promise in sink context blocks
20:56 s0me0ne-unkn0wn A promise result indeed, which is the last value emitted by supply()
20:56 s0me0ne-unkn0wn A promise result indeed, which is the last value emitted by supply{}
20:56 ufobat that's not so cool :-(
20:56 ufobat i am going to fix it now :)
20:58 s0me0ne-unkn0wn Thanks! Would be great. Very strange wait() behavior indeed.
21:00 MasterDuke joined #perl6
21:02 ufobat I am wondering where I did copy this code before..
21:02 ufobat s0me0ne-unkn0wn, pushed, but didn't increase the version, fyi
21:06 s0me0ne-unkn0wn Thank you!
21:08 ufobat welcome
21:09 tyil when trying to install App::Cpan6 with zef, it says its missing Template::Mustache, but that's in the "depends" block in the META6.json, is there any reason zef is not installing Template::Mustache?
21:13 s0me0ne-unkn0wn tyil: Mine installed Template::Mustache but tells me Terminal::Readsecret is missing
21:13 Ven joined #perl6
21:13 tyil hmm
21:14 tyil that one seems to be truly missing from the depends list, that's my mistake
21:16 tyil lets fix that first :>
21:17 ___luke___ joined #perl6
21:18 ___luke___ m: print "   .-@@-.\n   (======)\n  ";say ($_,)for <- = _>Zx(8,10,10);say(' 'x++$,'\/'x$--+5)xx 5
21:18 camelia rakudo-moar 85105077a: OUTPUT: «   .-@@-.␤   (======)␤  (--------)␤(==========)␤(__________)␤ \/\/\/\/\/␤  \/\/\/\/␤   \/\/\/␤    \/\/␤     \/␤»
21:19 ___luke___ Oh well, that looks like a nice ice cream with actual newlines
21:19 ___luke___ Anyways, that's 90 bytes, which ties it with the other approach
21:21 ___luke___ If anyone sees an opportunity for golfing, please let me know
21:22 tyil you can use say instead of print
21:22 tyil oh nvm, you want some spaces after the last newline
21:23 buggable New CPAN upload: App-Cpan6-0.11.1.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/App-Cpan6-0.11.1.tar.gz
21:24 ___luke___ Yep
21:24 ___luke___ Is there a function that mirrors a string?
21:25 moritz m: say 'abc'.flip
21:25 camelia rakudo-moar 85105077a: OUTPUT: «cba␤»
21:25 tyil mirror as in make the same, or reverse it?
21:25 ___luke___ Reverse it
21:25 ___luke___ .flip is what I need
21:25 moritz flip
21:25 moritz flip the dice!
21:25 moritz or... something like that :-)
21:26 ryn1x_ joined #perl6
21:28 mr-foobar joined #perl6
21:29 ___luke___ m: say for map:{$_~.flip}("   .-@","  (==="," (----","(=====","(_____");say(' 'x++$,'\/'x$--+5)xx 5
21:29 camelia rakudo-moar 85105077a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at <tmp>:1…»
21:29 ___luke___ m: .say for map:{$_~.flip}("   .-@","  (==="," (----","(=====","(_____");say(' 'x++$,'\/'x$--+5)xx 5
21:29 camelia rakudo-moar 85105077a: OUTPUT: «===SORRY!===␤Cannot find method 'has_compile_time_value' on object of type NQPMu␤»
21:29 ___luke___ ?
21:31 ___luke___ m: .say for map:{$_~.flip},("   .-@","  (==="," (----","(=====","(_____");say(' 'x++$,'\/'x$--+5)xx 5
21:31 camelia rakudo-moar 85105077a: OUTPUT: «===SORRY!===␤Cannot find method 'has_compile_time_value' on object of type NQPMu␤»
21:31 ___luke___ m: .say for (map:{$_~.flip},("   .-@","  (==="," (----","(=====","(_____"));say(' 'x++$,'\/'x$--+5)xx 5
21:31 camelia rakudo-moar 85105077a: OUTPUT: «===SORRY!===␤Cannot find method 'has_compile_time_value' on object of type NQPMu␤»
21:31 ___luke___ I have no idea what this error means...
21:34 mattp__ joined #perl6
21:35 Brumbazz joined #perl6
21:35 ___luke___ Either way, it's not going to work because this is already a few bytes too long, and .flip also doesn't reverse parentheses
21:36 s0me0ne-unkn0wn m: .say for (map {$_~.flip},("   .-@","  (==="," (----","(=====","(_____"));say(" "x++$,"\/"x$--+5)xx 5
21:36 camelia rakudo-moar 85105077a: OUTPUT: «   .-@@-.   ␤  (======(  ␤ (--------( ␤(==========(␤(__________(␤ /////␤  ////␤   ///␤    //␤     /␤»
21:36 Brumbazz Hi guys. I'm using AnyEvent-XMPP(perl5) in my perl6 project. So far I don't get any errors during compilation when I run my script, however after it print's some text is crashed with a "[2]    708 segmentation fault  perl6 xmpp_who_am_i.pl"
21:36 Brumbazz So my question is, how the hell do I debug that ? :/ Thanks in advance :>
21:37 Brumbazz It seems like the crash happens when I try to register a callback using AnyEvent's reg_cb() but I don't know how to do deeper debugging :/
21:39 tyil ===> Testing: LibraryMake:ver<1.0.0>:auth<github:retupmoca>
21:39 tyil ./test: error while loading shared libraries: libtommath.so.1: cannot open shared object file: No such file or directory
21:40 tyil # Failed test 'Binary runs!'
21:40 tyil this is bad, right?
21:43 cdg joined #perl6
21:48 tyil heh, I seem to have libtommath .42
21:48 tyil rakudobrew build moar 2017.10 didn't complain about it, tho
21:57 emers2n joined #perl6
22:04 mattp_ joined #perl6
22:06 Brumbazz gdb says: #0  0x00007ffff4916793 in p5_is_wrapped_p6_object (my_perl=0x34dc9d0, obj=0x38c8488) at p5helper.c:849
22:08 cdg joined #perl6
22:09 geekosaur ugh. I think you need to talk with nine
22:10 geekosaur (author of inline-p5 stuff)
22:10 Brumbazz geekosaur: ahh nice, thanks :>
22:11 geekosaur it does still occasionally throw these kinds of problems down in the guts of converting objects between p5 and p6, it's kinda nasty in there
22:11 Brumbazz I see :/
22:11 Brumbazz Does he usually come by IRC ?:>
22:11 MasterDuke joined #perl6
22:12 timotimo tyil: it should probably use the libtommath that moarvm was compiled with. that may be your system libtommath if you configured moarvm with --has-libtommath
22:12 geekosaur they are idling in here now, but apparently not around right now
22:13 Brumbazz geekosaur:  Alright, thanks :>
22:13 geekosaur there's lways leaving messages with the bot, if you're on opposite sides of the world timezone-wise or etc.
22:13 tyil timotimo: I updated libtommath to use 1.0 and rebuild moar, seems to work again :>
22:13 geekosaur .tell nine [19 21:36:17] <Brumbazz> Hi guys. I'm using AnyEvent-XMPP(perl5) in my perl6 project. So far I don't get any errors during compilation when I run my script, however after it print's some text is crashed with a "[2]    708 segmentation fault  perl6 xmpp_who_am_i.pl"
22:13 yoleaux geekosaur: I'll pass your message to nine.
22:13 Brumbazz geekosaur:  ahh smort, thanks :>
22:14 Brumbazz thanks yoleaux  :>
22:14 timotimo tyil: cool, but wouldn't moar install its libtommath to the system?
22:14 tyil I dont know, it seems something went wrong with it
22:15 tyil I'm not too sure on the details going on with rakudobrew build, sorry
22:15 timotimo might need a specific library path
22:16 BenGoldberg joined #perl6
22:20 ryn1x_ joined #perl6
22:20 mingdao joined #perl6
22:30 unicodable6 joined #perl6
22:32 astronavt joined #perl6
22:34 ugexe m: say $*VM.config<tomlib>
22:34 camelia rakudo-moar 85105077a: OUTPUT: «3rdparty/libtommath/libtommath.a␤»
22:36 s0me0ne-unkn0wn m: my $s = supply { emit False }; say $s.wait;
22:36 camelia rakudo-moar 85105077a: OUTPUT: «False␤»
22:36 s0me0ne-unkn0wn That Supply.wait() thing is COMPLETELY BROKEN
22:36 astronavt joined #perl6
22:42 timotimo jnthn: what is sigilles? :) :)
22:43 Cabanossi joined #perl6
22:44 jnthn A typo? :)
22:45 MasterDuke jnthn: this was caught from a segv in bisectables tests. see anything helpful? https://gist.github.com/MasterDuke17/659048126077244139df9320385edb6f
22:46 jnthn s0me0ne-unkn0wn: The example you just rn did exactly what is expected.
22:46 jnthn *an
22:46 jnthn *ran, even
22:47 jnthn MasterDuke: Not really, without any futher debug symbols
22:47 itaipu joined #perl6
22:48 MasterDuke will try to get them
23:02 Geth ¦ doc: 4757c99431 | (Jonathan Worthington)++ (committed using GitHub Web editor) | doc/Type/Supply.pod6
23:02 synopsebot Link: https://doc.perl6.org/type/Supply
23:02 Geth ¦ doc: Make Supply.wait and related docs more precise
23:02 Geth ¦ doc:
23:02 Geth ¦ doc: Make it very clear that these methods all perform a `.tap` and start a flow of values. For those who understand the `Supply` model well already, it will be clear that this is the only way it could work, but there is a tendency to assume that the C<wait>, in particular, somehow could relate to an earlier tapping. Also correct the `wait` return value documentation, and describe the error semantics of other methods.
23:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4757c99431
23:02 jnthn Hopefully that helps
23:03 jnthn Bah, thanks for not wrapping that to 72 columns, github. :/
23:03 Geth ¦ doc: f323788c26 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
23:03 Geth ¦ doc: add two more irc abbreviations
23:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f323788c26
23:03 synopsebot Link: https://doc.perl6.org/language/glossary
23:04 ryn1x_ joined #perl6
23:10 vike joined #perl6
23:15 timotimo ouch
23:17 s0me0ne-unkn0wn jnthn: Thanks a lot, it would make it much more clear. The behavior shown may be expected by core developer but not by someone who's just reading docs and sees different result :)
23:17 jnthn s0me0ne-unkn0wn: Yeah, once I looked at the docs I much better understood the confusion.
23:17 jnthn They were just plain wrong for .wait, unfortunately
23:18 s0me0ne-unkn0wn The question remains, why the heck Supply.wait() is needed at all if we cannot event collect values emitted by tapped supply{}. Is't list() and grab() enough?
23:19 cdg_ joined #perl6
23:19 jnthn Primarily, when all that's wanted is the side-effects, or when it's known that it's a one-value Supply
23:20 s0me0ne-unkn0wn Got it, thank you!
23:23 jnthn s0me0ne-unkn0wn: Thanks for the IO::Socket::Async::SSL patch, btw ;)
23:23 jnthn *:) even
23:25 s0me0ne-unkn0wn Welcome! Much more have to be done there and I don't really know if the original behavior of importing PKCS12 whould be re-implemented. Never seen it ever been used by anyone :)
23:27 timotimo :my $*GOAL := $<sym> eq '??' ?? '!!' !! '‼';
23:27 timotimo this amuses me
23:30 jnthn Help is very much welcome on that module; I'm far from the ideal person to be maintaining it in that I'm not particularly well versed in the area.
23:31 jnthn I just happened to have the nativecall and async background to make the thing work. :)
23:31 MasterDuke jnthn: is this any better: https://gist.github.com/MasterDuke17/0312dd2af1e3b2b498d91cfacc45343c ?
23:32 jnthn Oh, that's...interesting
23:33 jnthn Though unfortunately it could still be a fairly generic case of memory corruption
23:33 jnthn Do you have chance to run it in a MoarVM with #define MVM_GC_DEBUG 1
23:34 jnthn (Just tweaking the flag in src/gc/debug.h and make install should do it)
23:34 MasterDuke i'll try, but my previous attempt at rebuilding MoarVM inside rakudobrew didn't work very well
23:34 jnthn Make sure not to re-run the configure script :)
23:34 timotimo jnthn: is there any benefit to keeping a third worklist that just gives us the root object for every address we put into the regular worklist?
23:35 jnthn timotimo: For what purpose?
23:35 s0me0ne-unkn0wn I'm very new to Perl 6 so I need to master nativecalls better before proceeding with it... For example, I have no idea how to declare nativecall which returns openssl's STACK_OF(X509) by reference. Going to dig some docs :)
23:35 timotimo so, like, we could look up what was responsible for putting the link in?
23:35 timotimo in case of a crash; this would be compile-time-optional, of course
23:35 jnthn Oh
23:35 jnthn Well, in theory perhaps yes, but we already have a debug version of add_to_worklist
23:35 jnthn Which MVM_GC_DEBUG turns on
23:36 timotimo ok, but what i'm worrying about is the distance between adding something to the worklist and when it asplodes
23:36 jnthn And we can detect plenty of issues at that point
23:36 timotimo that's fair
23:36 tyil "..." yields no results on docs.perl6.org, what would be the recommended page to use instead for its use in methods ( `{ ... }` )
23:36 jnthn Like in this case, we could look at the sc index of the object being added in the debug version of add to worklist, for example
23:37 MasterDuke jnthn: i don't remember, does that create any extra output?
23:37 jnthn Though if it's a totally busted object header, then there's a good chance the existing checks (like for bogus thread ID) will catch it
23:37 jnthn MasterDuke: It panics
23:37 jnthn So in gdb you'd b MVM_panic
23:37 MasterDuke k
23:37 jnthn And then run it
23:37 jnthn Or in perl6-gdb-m, Ctrl+C, b MVM_panic, and continue :)
23:38 MasterDuke heh. i'm a couple layers deep in processes, but i'll see what i can do
23:38 timotimo i wonder about putting in redzones between header and body of objects and maybe in front of the header, too
23:38 timotimo either to mark them in valgrind or to check their contents every now and then for out-of-bounds writes
23:38 AlexDaniel jnthn: should I create a ticket for that? There's no useful way to reproduce it…
23:39 AlexDaniel I mean, we're seeing it fail every time here in whateverable tests, but that includes so much stuff…
23:42 jnthn AlexDaniel: On the one hand, a ticket to track a bug is good. On the other hand, a ticket that can't provide a way to reproduce the issue isn't liable to go far. :S
23:42 jnthn AlexDaniel: How hard is it to run the test suite?
23:42 jnthn Does it actually need to connect to IRC?
23:43 AlexDaniel jnthn: yes, it needs a local irc server + a few hundred rakudo builds…
23:43 jnthn Goodness
23:43 jnthn I think, given how stuck I am generally for time, there's very little chance of me reproducing that setup
23:43 AlexDaniel jnthn: oh, and then tens of modules…
23:43 MasterDuke hm. is there a way to set a breakpoint via a config file?
23:44 Rawriful joined #perl6
23:44 AlexDaniel it is kind of tracked here: https://github.com/perl6/whateverable/issues/24#issuecomment-345493646
23:44 jnthn Given an SSH account on a machine where that's set up, I might well be able to make progress
23:44 jnthn Well, of course provided there's debug tools on that machine
23:44 timotimo MasterDuke: the exprjit has something, but it's not necessarily what you're looking for
23:44 AlexDaniel that's easy to do
23:44 jnthn OK, then file the ticket and say who to contact for it :)
23:44 AlexDaniel jnthn: which key? https://github.com/jnthn.keys
23:45 jnthn ah, or that
23:45 jnthn lemme look
23:45 MasterDuke it happens in a spawned process and for some reason won't restart after it first segvs and then i `b MVM_panic`
23:45 jnthn lol, it doesn't tell me the names of those keys
23:45 Ulti mst: is this video under your control?
23:45 Ulti https://www.youtube.com/watch?v=ENvmfoIclU8
23:46 jnthn AlexDaniel: So, "whichever one has fingerprint b2:63:d0:dd:99:b2:28:34:3d:0a:ae:69:14:c7:3d:3f" :P
23:47 jnthn Otherwise, I can tell you tomorrow when I'm at the machine I spent most of my time working at :)
23:48 MasterDuke jnthn: fyi, /home/bisectable/git/whateverable/t/lib/Testable.pm6 line 45 was edited to execute perl6-gdb-m
23:48 AlexDaniel jnthn: I'll just add all of them. Big deal.
23:49 jnthn AlexDaniel: I was wondering whether to cull any, and then realized that they're all places I hack :)
23:49 jnthn And so I'm using the bunch :)
23:50 AlexDaniel jnthn: what about ssh bisectable@94.23.219.181
23:50 AlexDaniel success or not? Or you can't try now?
23:50 jnthn MasterDuke: If you can specify gdb args then you can pass -x foo where foo contains commands, iirc
23:51 jnthn AlexDaniel: Yes, that works
23:52 AlexDaniel jnthn: so you can run the tests with: perl6 t/bisectable.t
23:53 AlexDaniel and it takes time… but once it reaches “Did you mean …” tests it will crash
23:53 AlexDaniel the actual process that crashes is started from the file mentioned by MasterDuke
23:54 * jnthn is impressed that these bots have an apparently good size test suite, even if it needs quite a lot to run
23:55 jnthn p sc_idx
23:55 jnthn $1 = <optimized out>
23:55 jnthn well darn :)
23:56 jnthn sc = {sc_idx = 1484589880
23:57 jnthn ...well, yeah, that's on the large size...
23:59 jnthn m: say 148.base(2)
23:59 camelia rakudo-moar 85105077a: OUTPUT: «10010100␤»

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo