»ö« 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:03 mcmillhj joined 00:04 p6bannerbot sets mode: +v mcmillhj
mornfall timotimo: i put the throttle back and the .&await in the whenever $test_supp ... it works, but it's like summoning unicorns to me at this point 00:07
timotimo haha
i think the whole thing wants to be structured differently
what prevents you from looping over the tests and having the react block be run once for each test?
mornfall well, a lot of this was built on the assumption that react is asynchronous :p 00:08
(which is what the documentation says)
timotimo oh, it's async, it just doesn't introduce multithreading by itself
it's more for handling asyncness than for introducing it
mornfall it's a queue, there's nothing async about it?
timotimo you can react to however many sources of asynchronous events you're interested in 00:09
mornfall yes, but they come one at a time... i fail to see the difference between while ( $queue.pop ) { switch on $_ } and react? (where $queue is pieced together from the supplies) 00:10
i don't think you would call a while loop asynchronous 00:11
timotimo the while loop blocks :P 00:12
mornfall anyway, did not help either... it works if the test is blocked on a 'sleep' but not when it is blocked on the TCP connection *sigh*
00:12 mcmillhj left
mornfall the react blocks too? 00:12
timotimo i mean, react also blocks, because it's literally a supply block that has a "block until the supply finishes" bit attached
i've now got too much different pieces in my head to properly suggest how to work with what you have there 00:13
also, node.js is called asynchronous, and they didn't even have something like start blocks until recently :D
00:23 Actualeyes left
timotimo a big part of the benefit to supply/react is the handling of subscriptions, too; you can be sure that you're not leaking taps you're forgetting to close 00:24
and you can even recursively put whenevers inside whenevers and it's no biggie 00:25
00:27 sena_kun left 00:31 w_richard_w joined 00:32 p6bannerbot sets mode: +v w_richard_w
Skarsnik SmokeMachine, I was just focusing on create/insert/update ^^ 00:36
no fancy stuff ^^
00:39 Cabanossi left 00:40 Cabanossi joined 00:41 p6bannerbot sets mode: +v Cabanossi
vrurg m: my $l = Lock.new; my %h; for 1..10 { my $p = start { sleep rand; $l.protect: { say "-- ", $p.WHERE; say %h.elems; %h{$p.WHERE}:delete; say %h.elems } }; say "+", $p.WHERE; %h{$p.WHERE} = $p; }; await %h.values; note %h.elems 00:45
camelia +140078729439348
9
+140078729481484
+140078729487060
+140078729492636
+140078729498212
+140078729503788
+140078729509364
+140078729514940
+140078729520516
+140078729526092
-- 140078729492636
10
9
-- 140078682340704
9
9…
timotimo e: my $l = Lock.new; my %h; for 1..10 { my $p = start { sleep rand; $l.protect: { say "-- ", $p.WHERE; say %h.elems; %h{$p.WHERE}:delete; say %h.elems } }; say "+", 00:46
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/uT0CK3r5TY
Missing…
vrurg m: my $l = Lock.new; my %h; for 1..10 { my $p = start { sleep rand; $l.protect: { print "|"; say %h.elems; %h{$p.WHERE}:delete; say %h.elems } }; %h{$p.WHERE} = $p; }; await %h.values; note %h.elems
evalable6 timotimo, Full output: gist.github.com/17b64b7326fb5c058d...a2ed963dea
camelia |9
10
9
|9
9
|9
9
|9
9
|9
9
|9
9
|9
9
|9
9
|9
9
|9
9
timotimo oops
e: my $l = Lock.new; my %h; for 1..10 { my $p = start { sleep rand; $l.protect: { say "-- ", $p.WHERE; say %h.elems; %h{$p.WHERE}:delete; say %h.elems } }; say "+", $p.WHERE; %h{$p.WHERE} = $p; }; await %h.values; note %h.elems
evalable6 +140348910752540
8
+140348910794676
+140348910800252
+140348910805828
+140348910811404
+14…
timotimo, Full output: gist.github.com/2665d4213a73ea7905...6bdb88f6b9
vrurg Any idea what's wrong here? (I've shortened the output)
Why :delete doesn't change .elems? BTW, the keys are still in the hash even though :exists returns False for the deleted one. 00:47
timotimo oh?
my eyes are glazing over trying to figure out the structure of the code 00:48
my concentration ability is kind of screwed
vrurg start {} a thread, store resulting promise in a hash. When thread finishes it deletes its promise from the hash. 00:49
00:50 Skarsnik left
mornfall timotimo: i gave up and stuck an 'exit(1)' into the timeout handler 00:50
that works
timotimo ah, you're using WHERE
mornfall i made a pass at doing the whole thing without react and using raw promises
but i found about half a dozen new ways to deadlock the whole thing 00:51
timotimo vrurg: the WHERE changes as the object is moved by the GC
vrurg timotimo: I'd use thread ID, but it's only available to the thread itself.
timotimo you'll want WHICH instead, if that's OK
m: my $p = start { say "hi" }; say $p.WHICH
camelia hi
Promise|57305280
vrurg My headache.. Of course WHICH... Thanks! 00:52
timotimo :)
00:58 graphene left
mornfall also FFS, something is making temporary file names based on rand() 00:58
i call srand, to get reproducible randomness for the tests 00:59
timotimo oh, heh.
mornfall and after killing the program a few times, it says "failed to create a temporary file after 10 tries" seriously
timotimo i hope they're retrying until they find an available name?
oof
greppable6: "after 10 tries"
greppable6 timotimo, Found nothing!
timotimo greppable6: after.*10.*tries
mornfall Unable to open temporary file after 10 attempts 01:00
01:00 graphene joined
mornfall sorry not literal enough 01:00
timotimo greppable6: after.*10.*attempts
greppable6 timotimo, Found nothing!
timotimo greppable6: "after 10 attempts"
greppable6 timotimo, Found nothing!
mornfall greppable6: after.*attempts
greppable6 mornfall, 2 lines, 2 modules: gist.github.com/f04d713b25f8c5bcc0...90dd4181c3
timotimo that was my next idea
ah, heh
01:00 p6bannerbot sets mode: +v graphene
timotimo sadly there's no way to srand and "un-srand" 01:01
holyghost can someone tell me if the tests of Mathx::Chaos work ?
mornfall but using srand for temporary files is just plain stupid?
rand() whatever
it's super predictable
timotimo ah, you mean it should be using a different RNG altogether?
mornfall it should be using libc mkstemp :p
timotimo is that available everywhere? 01:02
mornfall it's POSIX.1
timotimo so you're saying it's not on windows? ;)
mornfall not good enough for perl5 which runs on AIX from 1990
timotimo m: say now.substr(*-3) 01:05
camelia 473
timotimo maybe this should be put in there? :P
add one more character for each retry
ah, the template has to have * in it 01:06
mornfall greppable6: IllegalMediaType 01:10
greppable6 mornfall, 2 lines, 1 module: gist.github.com/6f3bfa2d6d70f885bf...5a90b163f0
timotimo so it can't just be made longer
01:17 lizmat left 01:29 w_richard_w left 01:30 lizmat joined, p6bannerbot sets mode: +v lizmat
Kaiepi shit, a feature i spent all day working on ended up becoming a breaking change 02:07
it would've made it possible to write code like hastebin.com/rolozevaci.php , but at the cost of only being able to call .tap on a SocketListenerTappable once 02:11
buggable New CPAN upload: Font-FreeType-0.1.2.tar.gz by WARRINGD modules.perl6.org/dist/Font::FreeTy...n:WARRINGD 02:13
02:36 lucasb left 02:39 molaf left
SmokeMachine rakudo 2018-11 is breaking Red... :( 02:50
my tests were passing on 2018-10...
is there a way to bisect it? 02:52
02:52 molaf joined 02:53 p6bannerbot sets mode: +v molaf
SmokeMachine my rw attribute isn't working anymore... 02:57
timotimo SmokeMachine: using proxies? 02:59
SmokeMachine yes
timotimo with "return"?
SmokeMachine timotimo: no... 03:00
timotimo: github.com/FCO/Red/blob/master/lib...le.pm6#L46
timotimo oh, you're literally storing the proxy in an attribute? 03:01
SmokeMachine yes 03:02
timotimo do you make the attributes "is rw", too?
the accessors, basically
SmokeMachine so I can use `$!bla = 42` use the Proxy
timotimo: yes
timotimo huh
i'm kind of thinking that $!bla = 42 turns into a bindattr rather than an assign, but what do i know :) 03:03
SmokeMachine timotimo: here's the problem: github.com/FCO/Red/blob/master/t/02-tdd.t#L44
timotimo sorry, i gotta go have a sleep 03:08
what i can say is that i've never seen a proxy be put into an attribute
i've only ever seen it be used with an accessor
and you may have to go that route, though a ticket for discussion could be valuable 03:09
good luck! 03:10
SmokeMachine www.irccloud.com/pastebin/A3G1oaKQ/ 03:11
timotimo yeah, something on the way must be deconting 03:12
SmokeMachine timotimo: thanks...
timotimo: I got that idea from Attr::Moish
github.com/rakudo/rakudo/issues/2521 03:21
03:22 avalenn left 03:23 avalenn joined, ryn1x_ joined 03:24 p6bannerbot sets mode: +v avalenn, p6bannerbot sets mode: +v ryn1x_
SmokeMachine m: class C { has $.a is rw }; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 03:25
camelia FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
True
STORE
SmokeMachine class C { has $.a is rw; method set { $!a = 13 } }; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42; $c.set
evalable6 FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
FETCH
True
STORE
STORE
FETCH
03:30 ufobat_ joined, p6bannerbot sets mode: +v ufobat_ 03:33 ufobat left
SmokeMachine I think I found it! 03:53
m: class C { has $!a = 42 }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; say $c.a; $c.a = 42
camelia 42
Cannot modify an immutable Int (42)
in block <unit> at <tmp> line 1
SmokeMachine bisectable6: class C {has $!a = 42}; C.^add_multi_method: "a", method () is rw {self.^attributes.head.get_value: self}; C.^compose; C.new.a = 13 03:57
bisectable6 SmokeMachine, Bisecting by output (old=2015.12 new=9f5cc8d) because on both starting points the exit code is 1
SmokeMachine, bisect log: gist.github.com/8d10748e0b409f4a3f...ced6e9365c
SmokeMachine, (2016-09-19) github.com/rakudo/rakudo/commit/96...8c22e356eb
SmokeMachine bisectable6: help 03:58
bisectable6 SmokeMachine, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable
SmokeMachine bisectable6: old=2018.10 new=HEAD class C {has $!a = 42}; C.^add_multi_method: "a", method () is rw {self.^attributes.head.get_value: self}; C.^compose; C.new.a = 13
bisectable6 SmokeMachine, On both starting points (old=2018.10 new=9f5cc8d) the exit code is 1 and the output is identical as well
SmokeMachine, Output on both points: «Cannot modify an immutable Int (42)␤ in block <unit> at /tmp/axK7keTAmE line 1␤␤»
SmokeMachine bisectable6: old=2018.10 new=HEAD class C { has $!a }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:03
bisectable6 SmokeMachine, Bisecting by exit code (old=2018.10 new=9f5cc8d). Old exit code: 0
SmokeMachine, bisect log: gist.github.com/0cd69289660823a5ea...58e4add93a
SmokeMachine, (2018-11-19) github.com/rakudo/rakudo/commit/7d...6110c43506
SmokeMachine class C { has $!a }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:08
use 6.c; class C { has $!a }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42
use v6.c; class C { has $!a }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:09
m: use v6.c; class C { has $!a }; C.^add_multi_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:17
camelia FETCH
Cannot modify an immutable Bool (True)
in block <unit> at <tmp> line 1

FETCH
FETCH
True
FETCH
04:21 Cabanoss- joined 04:22 p6bannerbot sets mode: +v Cabanoss- 04:24 Cabanossi left
SmokeMachine m: use v6.c; class C { has $!a }; C.^add_multi_method: "a", method () { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:25
camelia FETCH
Cannot modify an immutable Bool (True)
in block <unit> at <tmp> line 1

FETCH
FETCH
True
FETCH
SmokeMachine m: use v6.c; class C { has $!a }; C.^add_method: "a", method () is rw { self.^attributes.head.get_value: self }; C.^compose; my $c = C.new; $c.^attributes.head.set_value: $c, Proxy.new: FETCH => method { say "FETCH" }, STORE => method (|) { say "STORE" }; say $c.a; $c.a = 42 04:26
camelia FETCH
Cannot modify an immutable Bool (True)
in block <unit> at <tmp> line 1

FETCH
FETCH
True
FETCH
04:27 ryn1x_ left 04:50 ryn1x_ joined 04:51 p6bannerbot sets mode: +v ryn1x_ 05:01 sauvin joined, p6bannerbot sets mode: +v sauvin
holyghost I've put the start of my UNIX perl6 code online, a WAVE file parsing system (for now) at github.com/theholyghost2/Soundn-Tina 05:09
Since we have a linux, unix, bsd and windows version of rakudo I might as well program something for unix/bsd :-) 05:13
and I forgot macos X, mach 10 unix 05:14
s/unix/posix 05:17
05:26 ryn1x_ left 05:58 curan joined, p6bannerbot sets mode: +v curan 05:59 cgfbee joined, p6bannerbot sets mode: +v cgfbee 06:06 ryn1x_ joined 06:07 p6bannerbot sets mode: +v ryn1x_ 06:13 robertle left 06:26 ryn1x_ left 06:42 Kaiepi left 06:43 ryn1x_ joined 06:44 p6bannerbot sets mode: +v ryn1x_ 06:45 jmerelo joined 06:46 p6bannerbot sets mode: +v jmerelo, Kaiepi joined
holyghost hi jmerelo, I've put Soundn-Tina on github, it's not ready for release but includes a WAV file parser and a pattern classification for channels/samples 06:46
06:47 p6bannerbot sets mode: +v Kaiepi
jmerelo holyghost: OK 06:47
holyghost HTH 06:48
HAND 06:49
jmerelo: you mentioned putting inside a perl6 modules e.g. Mathx-Stat a general pod file, what should be the name for that file ? 06:57
a general Mathx-Stat.pm6 I mean more or less
in the top directory 06:59
jmerelo holyghost: I don't think I said that. What I said is that the convention is, for every X::Y module, to have a lib/X/Y.pm6 base class that also includes general documentation for that module. 07:00
holyghost that's what I needed to know, thx 07:01
07:03 domidumont joined, p6bannerbot sets mode: +v domidumont
holyghost jmerelo: I have an advent on "a sample of statistics" on the 11th, would you like to review it for me next week ? I have bad english 07:06
just so I know
jmerelo the 11th is already covered. And I really have a lot of work scheduling, editing and making sure everything is published, not to mention known, to review something 07:07
07:07 rindolf joined
jmerelo holyghost: you can publish it yourself in dev.to or blogs.perl.com whenever you want, that would be great. 07:07
07:08 p6bannerbot sets mode: +v rindolf
holyghost ok, I updated the schedule file, and I'm still in for the 11th 07:08
jmerelo holyghost: which schedule file? 07:10
holyghost perl6/mu on github 07:11
jmerelo holyghost: that one was deleted and moved elsewhere.
holyghost ok
jmerelo github.com/perl6/mu/blob/master/mi...8/schedule
holyghost Zoffix asked me to write something
jmerelo But tbrowder took good care of moving what was already there. 07:12
You are not anyway in the list of people who did a commit in that repo: github.com/perl6/mu/commits/master
holyghost I did commit 07:13
jmerelo If you did the commit, then you didn't do the push and/or the pull request.
holyghost anyway, if you like I'll write something first instead of committing and so on
I didn't do a PR, I just updated the schedule file 07:14
jmerelo holyghost: you know that if you do that, nobody else but you is going to know that, right? Unless you commit + push + do a pull request.
holyghost yes 07:15
jmerelo holyghost: also, as I said before, all slots are taken already. We are taking some reserve articles, just in case someone fails, but it's not sure they are going to be published.
holyghost well, I'll help Zoffix out with a Mathx-Stat advent 07:16
now I can take my time for it, I mean I'll write something first then schedule
I have to code for pm also, I need docs 07:17
to write
07:18 lizmat left
jmerelo good 07:20
holyghost I know meta writing isn't as fun as coding, I would like to help out
I'll see what I can do 07:21
07:21 rindolf left
andrzejku do you know something id duckduck.go is trying to use Perl6? 07:21
jmerelo meta writing _is_ coding.
andrzejku or it is just too slow
jmerelo andrzejku: say that again? 07:22
andrzejku duckduck.go a search engine
and they are using Perl
so my question is if they mind to use Perl6 in the future? 07:23
holyghost ok, time for a beer, I'll work further later on 07:25
07:25 ryn1x_ left
jmerelo andrzejku: I don't think it's that simple to migrate a big piece of code to another language. And Perl 6 is simply a different language. 07:26
holyghost: it's not time for a beer, even if you're Belgian.
holyghost I'm in night mode now, I just drink something after my work, but you're right 07:27
jmerelo I usually have a cup of green tee before going to bed, but then I'm an old geezer who's typing now covered by a blanket, just up from bed. 07:28
(I mean green tea) 07:29
holyghost ok
07:30 lizmat joined, p6bannerbot sets mode: +v lizmat
jmerelo Hi, lizmat . How are you? 07:31
holyghost hi lizmat
07:33 rindolf joined 07:34 p6bannerbot sets mode: +v rindolf
holyghost .seen Zoffix 07:45
yoleaux I saw Zoffix 30 Nov 2018 23:37Z in #perl6: <Zoffix> huggable: AlexDaniel
07:47 benjikun left
Geth doc: f4d4c28589 | finanalyst++ | doc/Language/pod.pod6
formating codes in pod
07:50
synopsebot_ Link: doc.perl6.org/language/pod
doc: cbd16fe1e5 | finanalyst++ | doc/Language/pod.pod6
minor rewording
doc: 46262ea6dc | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
Merge pull request #2496 from finanalyst/master

formating codes in pod
07:51 coet left 07:55 irdr left 07:58 dct left 08:05 coet joined, p6bannerbot sets mode: +v coet 08:10 haukex joined 08:11 p6bannerbot sets mode: +v haukex 08:20 robertle joined 08:21 p6bannerbot sets mode: +v robertle 08:36 rabbitisle joined, p6bannerbot sets mode: +v rabbitisle
Geth doc/master: 4 commits pushed by (JJ Merelo)++ 08:41
08:44 haukex left 08:46 w_richard_w joined 08:47 p6bannerbot sets mode: +v w_richard_w 08:51 kensanata joined, p6bannerbot sets mode: +v kensanata 08:55 rgrau left 09:01 rgrau joined, p6bannerbot sets mode: +v rgrau 09:03 w_richard_w left 09:21 sena_kun joined, p6bannerbot sets mode: +v sena_kun 09:25 donaldh left 09:33 holyghost left
tbrowder holyghost: the advent schedule for 2019 is up: repo perl6/advent/archives/perl6advent-2019/schedule 09:41
Geth doc: finanalyst++ created pull request #2497:
add disambiguate to makefile and set to False
09:53
09:57 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy 10:06 lucasb joined, p6bannerbot sets mode: +v lucasb 10:10 kurahaupo_ left, kurahaupo joined 10:11 p6bannerbot sets mode: +v kurahaupo 10:12 holyghost joined 10:13 p6bannerbot sets mode: +v holyghost
Geth doc: b15b471d17 | finanalyst++ | Makefile
add disambiguate to makefile and set to False
10:19
doc: a50c30b293 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | Makefile
Merge pull request #2497 from finanalyst/master

add disambiguate to makefile and set to False
lucasb moritz: Hello. Can you or other administrator of @perl6org retweet me about AoC? Thanks. twitter.com/lucasbuchala/status/10...3062380551 10:23
10:23 holyghost left, holyghost joined, rabbitisle left 10:24 p6bannerbot sets mode: +v holyghost
tyil it seems that zef fails testing without providing a reason when `prove` is not available 10:25
jmerelo tyil: it's got several fallback choices, if I remember correctly... 10:31
tyil hmm, I was trying out building rakudo-star in an alpine container (mostly for playing around), and `make install` failed when trying to install zef
no error, just told me testing failed 10:32
jmerelo You have to install Test::Harness: hub.docker.com/r/jjmerelo/alpine-perl6/
tyil I installed perl-utils in alpine to solve it 10:33
jmerelo tyil: check out that Dockerfile. It installs cpanm and then Test::Harness hub.docker.com/r/jjmerelo/alpine-p...ockerfile/ 10:34
tyil yeah, I'm checking it 10:35
jmerelo tyil: check out how zef is installed. Took me a good while to get that right (including trips to SO)
tyil the make install step of R*'s install instructions installs zef
I also knew how to install zef manually, which helped in my debugging of this particular issue 10:36
I just wanted to note it, as this could be someting that's easy to fix (simply tell the user they're missing a dep required for testing)
jmerelo tyil: give it a try as a zef issue. 10:37
ufobat_ does the p6doc tool contain all the information that is also on docs.perl6.org?
10:37 tobs` joined
tyil jmerelo: I'm going to let this attempt run, if this fixes it I can also point to potential fixes in the issue 10:37
jmerelo ufobat_: it should. Why? 10:38
10:38 p6bannerbot sets mode: +v tobs`
ufobat_ i was offline and i had p6doc installed, i was unable to find all those information, docs.perl6.org/language.html 10:38
jmerelo ufobat_: that thing might not be... That's just for the website. 10:39
If perl6/doc is installed, you can do make run to have your very own website.
ufobat_ woud it be possible to include those documentations in the tool? 10:40
i used to use perldoc a lot
oh is "p6doc Str" also broken on your system?
===FATAL: Table 4 has a mixture of visible and invisible column-separator types.
jmerelo ufobat_: 10:41
ufobat_: let's say it's got some issues: github.com/perl6/doc/issues?utf8=%...open+p6doc
ufobat_: please add that one. p6doc has not been touched for so long, it could as well be called abandoned. I guess we'll have to do something about that... 10:42
ufobat_ what do you think: revive it or replace it? 10:43
jmerelo ufobat_: probably replace it. 10:44
ufobat_ where is content located that is displayed on the website on the "language.html" site? 10:46
ah found it :)
jmerelo ufobat_: it's generated on the fly by gen-pod-source.p6 10:47
ufobat_ but the resouces are those: github.com/perl6/doc/tree/master/doc/Language right? 10:49
10:50 zakharyas joined
ufobat_ i think ill read the issues when i've time regrading p6docs 10:50
it buggers me a lot that i need be online or use a webbrowser to read the documentation 10:51
10:51 p6bannerbot sets mode: +v zakharyas
ufobat_ anyway, different question: does anyone has an idea regrarding stackoverflow.com/questions/536380...l6-modules 10:51
Would it be a stupid idea to write a ResourceExtractor that reads the keys of $?RESOURCES and creates a temporary directory and recreates the hirachical structure of all resources in this directory?
in $?RESOURCES the resources are "flattend down" but bailador or cro or other apps might need to have the data structure as is 10:52
jmerelo ufobat_: well, as said above, you can just fire it up locally using make run, if you have perl and mojolicious installed (which you probably do) 10:53
ufobat_: it would be a great idea. But that would be a patch for zef, right? 10:54
ufobat_ and a checkedc out doc repository which i don't have, i am happy to know it, but thats just a work around for the p6doc :-(
jmerelo ufobat_: ah, OK, of course. There's all doc in a single HTML file. Maybe we could release it so that people can have it handy. Along with a PDF version, maybe. Or epub 10:55
ufobat_ jmerelo, it happens to me quite often, because i am not super fluent in perl6 that i need to find "how to do *" and thats covered in the Tutorial section 10:56
holyghost jmerelo : maybe a ps
jmerelo ufobat_: the thing is, if I understand ugexe's and zef's intent well, which I probably don't, the CompUnits are geared towards perl6 resources, and are not too keen in other kind of resources. 10:57
ufobat_ everyhing else than invoke a binary hat opens up a pager where i can search and look around quickly is considdered as a work around, imho
including a single html, pdf, epub
i like my console, but thats just my preference
jmerelo ufobat_: but is that a _good_ workaround or a _bad_ workaround?
ufobat_ when i've read the issues i might find time to contribue to help it :)
holyghost AFAIK .ps is a zipped .pdf 10:58
10:58 dogbert2_ joined
ufobat_ jmerelo, for me personally? 10:58
jmerelo ufobat_: for the time being, just raise the issue in the site so that we remember that.
ufobat_: right. I mean, would that be acceptable? fixing p6doc might take a long time. As in, forever.
ufobat_ hah :D yeah :) 10:59
jmerelo holyghost: it's rather the other way round, but fair enough.
holyghost I know
10:59 p6bannerbot sets mode: +v dogbert2_
jmerelo ufobat_: please then write a ticket there and we'll see what we can do. 10:59
ufobat_ jmerelo, good in a way that i could read it, bad because instead of starting a tool and pushing a few buttons i need to start a server, switch to my browser, type or copy paste the url, move the mouse around
i woudn't enjoy it .) but it helps me a lot
jmerelo ufobat_: you can start w3c in a console... :-) But anyway, just tell us all that in a perl6/doc issue and we'll, as usual, see what we can do. 11:00
ufobat_ aye :-)
will read them first but i will open something :)
ahhh regarding my $?RESOURCES 11:01
i dont know if that is a zef patch, because if it is not specced that resources need to keep the directory structure zef is not doing it wrong
jmerelo ufobat_: right. 11:02
ufobat_ if just zef is preserving the structure and all other tools that might be do the same don't do it it means that a module App::whatever would only work if you install it with zef
if it is not specced, I'd say a module providing that would be better 11:03
jmerelo ufobat_: from my experience with zef, they have got a very clear mind about what it should and should not do. So a different post-zef module might be the thing.
ufobat_ ugexe is zef author isnt ne? he replyed to the Stackoverflow question
jmerelo As a matter of fact, I keep wanting that kind of thing. For instance, I want to use META6.json to specify things like the URL you should take things from, or to use it simply as a cpanfile for installing stuff. 11:04
ufobat_: right.
ufobat_ i have the feeling that writing a resources extractor module is a workaround too, but i dont know the correct solution
jmerelo ufobat_: go ahead with that, then. 11:06
11:06 domidumont left
jmerelo ufobat_: the underlying problem remains. zef is written to be used for modules, not for apps. 11:08
ufobat_: did you check out sparrowdo? It's supposed to deal with deployment stuff. 11:09
ufobat_ the origin of this issue is sparky (github.com/Bailador/Bailador/issues/309) 11:10
jmerelo ufobat_: so it's gone all the way round... 11:11
ufobat_ :D 11:12
my current project is a "paperless office" application, that takes scanned pdfs, run OCR on it, lable the documents and store them and use ElasticSearch on it
jmerelo ufobat_: cool. Personal or business? 11:13
ufobat_ the elastic search part is inspired by Corion/MaxMaischein
personal, my wife is a elementary teach and has tons of papers in her office
s/teach/teacher/ 11:14
jmerelo that's cool :-) Good luck.
ufobat_ and projects like paperless github.com/danielquinn/paperless are to focused on documents that are time series based or have a sender 11:15
i've got a little perl6 applicatin with Inversion of Control so i easily can reuse my compents for the CLI and i want to have a little webapp for my wife
jmerelo I really think we should have some deployment application that can solve your problem, on top of zef or besides zef or whatever. I am not sure on where to raise the issue, maybe in the ecosystem maybe somewhere else.
ufobat_ so i want to do the same, pack folders into a cro-based App::* module 11:16
jmerelo The problem is wherever I have tried to find new uses for zef and suggested it as an issue, I hit a wall. I wanted to use META6.json for installing dependencies. No. I wanted to use zef as an external library to do some stuff, but most functionality of zef is in sub MAIN and thus not exported, and it's not going to change. That would be a no. 11:17
ufobat_: so I'm not optimistic you can hack zef, or suggest a new functionality, or extend it to do that via PR. Having another tool that calls zef _from the command line_ might be the only solution. 11:18
maybe you can check things like App::mi6 for doing that kind of thing.
ufobat_ what i wanted to do is my $temp-dir = File::Temp.create-new-dir(); for %?RESOURCES.kv -> $path, $io { $tmp-dir.add($path).spurt($io.slurp) } 11:20
more or less
so in a bailador applicationi in stead of doing view('path/to/something') you can do $resource-exporter.get-path-to('path/to/something') 11:21
ah view($resource-exporter.get-path-to('path/to/something'))
sena_kun m: sub f($a = 'Default') { say $a }; my $might-be-defined; f(|($might-be-defined.map({ .defined ?? $_.foo.bar !! Any }).first // ()));
camelia Default
sena_kun is there a way to reduce this ugly pattern to something pretty?
the idea is a primitive "null issue", as in: sometimes value can be here and I want to pass it after some methods applied, sometimes it isn't present, so I skip it. 11:22
jmerelo sena_kun: you are talking about subroutine state? 11:23
moritz lucasb: done. Next time, just mention @perl6org in your tweet, and I'll see the mention and retweet
sena_kun about arguments passing, I think.
jmerelo sena_kun: then I don't think I follow you.
ufobat_ i think it is because f() does have a default parameters, and you want to do f( $might-be-defined.foo.bar ) if $might-be-defined is defined 11:25
if not you want to ensure that f() is called with no parameter so default comes into place? right?
sena_kun yeah
I don't want to do plain if $foo.defined { foo($foo.bar.baz) } else { foo() };
so was wondering is there a something neat for that. 11:26
inb4: just stick with this readable code you dummy!
m: sub f($a = \'Default\') { say $a }; my $might-be-defined; f(|({ .foo.bar with $_ }($might-be-defined))); 11:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3.foo.bar with $_ }($might-be-defined)));7⏏5<EOL>
expecting …
ufobat_ sub f($s = "default") { say $s }; my $foo; f( | (( .Str with $foo) // ()) )'
sena_kun m: sub f($a = 'Default') { say $a }; my $might-be-defined; f(|({ .foo.bar with $_ }($might-be-defined)));
camelia Default
ufobat_ ha same idea
sena_kun :)
also `// ()` can be omitted too.
ufobat_ yeah 11:32
but thats pretty enough, isn't it?
11:32 lichtkind left
lucasb moritz: thanks! 11:32
ufobat_ i need to remember the |( ... ) thingy :)
sena_kun yours is shorter too! thanks, ufobat_! 11:33
I guess that looks better, because I have a bit more complex call, so wanted to reduce some time to grasp it.
ufobat_ great :9
11:34 |oLa| joined, |oLa| left
tyil jmerelo: seems to build on Alpine now with this Dockerfile: p.tyil.nl/tp46 11:36
jmerelo tyil: great! 11:37
Geth doc: 72edc48d1f | (JJ Merelo)++ | .travis.yml
Eliminates ruby from the build

It's just eight seconds, but it's not really needed. This goes towards solving #2498.
tyil 115MB, compared to the regular rakudo-star image of 351MB 11:38
jmerelo tyil: that's better. Mine is 267 MBs, a bit bigger. But there's some more stuff in there. Maybe I could reduce it... 11:39
tyil mine's plain rakudo-star (with its deps), no added modules 11:40
11:41 g3 joined 11:42 p6bannerbot sets mode: +v g3 11:44 lichtkind joined 11:45 p6bannerbot sets mode: +v lichtkind 11:47 g3 left, g3 joined, tepper.freenode.net sets mode: +v g3, p6bannerbot sets mode: +v g3
Geth doc: e55c92aaca | (JJ Merelo)++ | util/travis-test.sh
Eliminates writing disambiguation files from test.

This goes towards helping #2498, but also is a test that we could proceed with #2499.
11:53
12:13 irdr joined, p6bannerbot sets mode: +v irdr 12:34 jmerelo left 13:00 domidumont joined, p6bannerbot sets mode: +v domidumont 13:03 robertle left 13:05 robertle joined 13:06 p6bannerbot sets mode: +v robertle 13:14 zakharyas left
lucasb set operations uses ===/WHICH comparison? how to make it use the my own defined eqv for arbitrary objects? 13:14
13:15 rindolf left
lucasb hmm, I guess I should overload infix:<===> then ? 13:16
SmokeMachine lucasb: you can write a custom WHICH 13:22
lucasb I'm doing: method WHICH() { ValueObjAt.new("YourClass|$!foo|$!bar") } 13:24
not working 13:25
13:26 kurahaupo left 13:27 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo
lucasb m: class A { has $.x; method WHICH { ValueObjAt.new("A|$!x") } }; say A.new(x=>10) (-) A.new(x=>10) 13:30
camelia set()
lucasb ^^ works! bug is in my code :)
masak occasionally, the bug is not in Rakudo :P 13:31
SmokeMachine talking about rakudo's bug... had anyone seen this? github.com/rakudo/rakudo/issues/2521 13:33
13:33 rindolf joined 13:34 p6bannerbot sets mode: +v rindolf
masak "Actual Behavior" -- "It's not working" /me facepalms 13:46
this puts it into contrast with all those bug reports where the actual behavior is *it working* 13:47
13:52 zakharyas joined, p6bannerbot sets mode: +v zakharyas 13:56 robertle left
SmokeMachine masak: :( 13:56
masak: like this one? :P github.com/rakudo/rakudo/issues/2113 13:58
14:00 kurahaupo left 14:01 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo 14:04 robertle joined 14:05 p6bannerbot sets mode: +v robertle 14:08 yqt joined 14:09 p6bannerbot sets mode: +v yqt
masak SmokeMachine: I'm somehow more OK with skipping the "Expected behavior"/"Actual behavior" format altogether, intentially... 14:14
...compared to *using* it but then just saying "it doesn't work"
the format is there in the first place because people don't get passt "it doesn't work" when they try to describe their issue 14:15
SmokeMachine masak: that makes sense... 14:16
masak past*
the "Steps to Reproduce" in that report are fine, if you look past that they're a copy-pasted session instead of actual steps 14:18
14:20 ChoHag left 14:21 ChoHag joined 14:22 p6bannerbot sets mode: +v ChoHag
masak oh, I see we have a template, and the order there is "The Problem", "Expected Behavior", "Actual Behavior", "Steps to Reproduce" 14:24
may I suggest we change it to "Steps to Reproduce", "Expected Behavior", "Actual Behavior", and (optionally) "The Problem"? 14:25
tbrowder is there an easy way to invert a simple hash of keys with single values per key? 14:26
masak my reasoning is: you perform the steps, they're the *first thing* you do. then you compare the actual behavior against the actual one.
oh, so in fact it should be steps->actual->expected :)
14:28 g3 left
sena_kun tbrowder, antipairs method? 14:29
tbrowder i can create a new hash but i think i've seen a one-shot p6 solution (can't find in docs searching on invert) 14:30
sena_kun m: my %h = one => 1, two => 2; say %h.antipairs;
camelia (2 => two 1 => one)
tbrowder i saw the antipairs method but got hung up with other text: mutable...
sena_kun hmm, it isn't mutable. 14:31
m: my %h = one => 1, two => 2; say %h.antipairs; say %h;
camelia (1 => one 2 => two)
{one => 1, two => 2}
sena_kun if you want to apply it, just
my %h = one => 1, two => 2; %h .= antipairs; say %h; 14:32
evalable6 {1 => one, 2 => two}
tbrowder so i could do with yr ex: my $newval = %h.antipairs<some orig value>?
14:33 vrurg left
SmokeMachine m: say {:1a, :2b}.invert 14:33
camelia (2 => b 1 => a)
tbrowder sena_kun: thanks!
SmokeMachine tbrowder: ^^
tbrowder SmokeMachine: wow! cool, but i think the antipairs is the trick i need for my current prog, thanks! 14:35
SmokeMachine m: my %a = one => 1, two => 2; say %a; %a .= invert; say %a 14:37
camelia {one => 1, two => 2}
{1 => one, 2 => two}
14:39 vrurg joined
tbrowder ok, that looks more like it, much more intuitive but my original hash is constant, so i may not be able to use the .= method 14:40
14:40 p6bannerbot sets mode: +v vrurg
SmokeMachine why antipairs is faster than invert? 14:41
my %a = one => 1, two => 2; %a .= antipairs for ^1_000_000; say now - BEGIN now 14:42
evalable6 3.26479145
SmokeMachine my %a = one => 1, two => 2; %a .= invert for ^1_000_000; say now - BEGIN now
evalable6 6.04357082
14:46 enkidu joined, p6bannerbot sets mode: +v enkidu
enkidu Hi there, I've come for a WordPress ID for the advent calendar 14:48
I've also got the post up on gist.github.com/duffee/9947a49b344...74df7af4a2
the last slot left was this sunday, so if I can get this sorted tomorrow, it leaves the weekend for putting up the tree 14:49
15:05 lizmat left
tobs` masak: I've filed a few issues recently and also felt like the steps are in the wrong order for my brain. I ended up repeating myself 15:06
15:09 lichtkind left 15:11 curan left 15:17 donaldh joined 15:18 p6bannerbot sets mode: +v donaldh 15:29 kurahaupo left, kurahaupo joined 15:30 lizmat joined, p6bannerbot sets mode: +v lizmat, p6bannerbot sets mode: +v kurahaupo 15:35 robertle left 15:37 robertle joined 15:38 p6bannerbot sets mode: +v robertle
AlexDaniel Any help with blockers will be highly appreciated: github.com/rakudo/rakudo/issues?q=...2%9A%A0%22 15:39
15:39 abraxxa1 left 15:42 Actualeyes joined 15:43 kurahaupo left, p6bannerbot sets mode: +v Actualeyes, kurahaupo joined 15:44 p6bannerbot sets mode: +v kurahaupo 15:45 kurahaupo left 15:46 kurahaupo joined 15:47 p6bannerbot sets mode: +v kurahaupo 15:55 yqt left 16:18 robertle left 16:19 xinming joined 16:20 p6bannerbot sets mode: +v xinming 16:22 xinming_ left
[Coke] doc/Language/pod.pod6 now has a bunch of failing tests for xt/examples-compilation.t 16:23
16:24 Possum left 16:26 scimon joined, Possum joined, p6bannerbot sets mode: +v scimon, Geth left 16:27 p6bannerbot sets mode: +v Possum 16:31 domidumont1 joined 16:32 p6bannerbot sets mode: +v domidumont1
mornfall um... how do i rethrow an exception? 16:33
.throw sort of works but also destroys the backtrace
16:34 domidumont left
SmokeMachine m: die; CATCH { .rethrow } 16:35
camelia Died
in block <unit> at <tmp> line 1
16:35 kensanata left
mornfall well yes, the die and the catch are on the same line :p 16:37
AlexDaniel m: die; ␤␤␤␤␤␤␤␤; CATCH { .rethrow } 16:39
camelia Died
in block <unit> at <tmp> line 1
AlexDaniel m: die; ␤␤␤␤␤␤␤␤; CATCH { .throw }
camelia Died
in block <unit> at <tmp> line 9
SmokeMachine m: sub bla { die } ; CATCH { .rethrow }; bla 16:41
camelia Died
in sub bla at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine mornfall: have you seen? "Died␤ in sub bla"
mornfall sorry i'm an idiot, i didn't notice .throw vs .rethrow 16:42
SmokeMachine :)
16:46 zakharyas left, kurahaupo_ joined, p6bannerbot sets mode: +v kurahaupo_ 16:49 kurahaupo_ left, kurahaupo left, kurahaupo_ joined 16:50 p6bannerbot sets mode: +v kurahaupo_, enkidu left 16:51 kurahaupo_ left 16:52 domidumont1 left 16:56 kurahaupo joined 16:57 p6bannerbot sets mode: +v kurahaupo
mornfall can i ask smartmatch (or something else) about presence of a method? 16:58
lucasb you can with ^can 16:59
16:59 sjoshi joined
sena_kun also ^lookup 17:00
17:00 p6bannerbot sets mode: +v sjoshi
sena_kun m: Int.^lookup('Range').defined.say; Int.^lookup('Renge-chon').defined.say; 17:00
camelia True
False
17:01 John9 joined, John9 left
mornfall m: 0.1 ~~ ^can( 'cos' ) 17:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
can used at line 1. Did you mean 'tan', 'cas'?
mornfall m: 0.1 ~~ .^can( 'cos' )
camelia ( no output )
17:02 nemo left
mornfall m: say( 0.1 ~~ .^can( 'cos' ) ) 17:02
camelia False
lucasb sorry, it's better to use ^lookup, like sena_kun shown 17:03
mornfall m: say( 0.1 ~~ .^lookup( 'cos' ) )
camelia 0.9950041652780258
lucasb drop the "~~"
mornfall but i need this for a 'when' doesn't that implicitly ~~?
apparently not... interesting 17:04
sena_kun m: when *.^lookup('Range') { 'hehe'.say } given Int;
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3when *.^lookup('Range') { 'hehe'.say }7⏏5 given Int;
sena_kun m: given Int { when *.^lookup('Range') { 'hehe'.say } }
camelia hehe
sena_kun m: given Int { when *.^lookup('Renge') { 'hehe'.say } }
camelia ( no output )
17:08 [Sno] left 17:09 [Sno] joined, hami joined, p6bannerbot sets mode: +v hami 17:10 p6bannerbot sets mode: +v [Sno] 17:16 kurahaupo left 17:18 kurahaupo joined, ExtraCrispy left, ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy, p6bannerbot sets mode: +v kurahaupo
lucasb m: class C { has $.x }; multi sub infix:<cmp>(C:D \a, C:D \b) { a.x cmp b.x }; say (C.new(x=>1), C.new(x=>-2)).sort 17:22
camelia (C.new(x => 1) C.new(x => -2))
lucasb can I make them sort? 17:23
SmokeMachine m: class C { has $.x }; say (C.new(x=>1), C.new(x=>-2)).sort: *.x 17:24
camelia (C.new(x => -2) C.new(x => 1))
lucasb .sort wasn't supposed to pick the specific infix:<cmp> multi?
17:26 Khisanth left
b2gills I think that `sort` only knows about `cmp` lexically. Perhaps it could be changed to look at `CALLERS::` for the `cmp` operator 17:27
17:28 scimon left
gfldex m: class C { has $.x }; multi sub infix:<cmp>(C:D \a, C:D \b) { a.x cmp b.x }; say (C.new(x=>1), C.new(x=>-2)).sort(&infix:<cmp>) 17:34
camelia (C.new(x => -2) C.new(x => 1))
SmokeMachine m: class C { has $.x }; multi infix:<cmp>(C:D \a, C:D \b) { say "AQUI"; a.x cmp b.x }; say (C.new(x=>1), C.new(x=>-2)).sort 17:35
camelia (C.new(x => 1) C.new(x => -2))
SmokeMachine m: class C { has $.x }; &[cmp].wrap: sub (\a, \b) { do if a ~~ C:D and b ~~ C:D { a.x cmp b.x } else { nextsame } }; say (C.new(x=>1), C.new(x=>-2)).sort 17:36
camelia (C.new(x => -2) C.new(x => 1))
SmokeMachine lucasb: ^^
17:39 Khisanth joined 17:40 p6bannerbot sets mode: +v Khisanth, ryn1x_ joined 17:41 p6bannerbot sets mode: +v ryn1x_ 17:44 coet left
lucasb thanks SmokeMachine, b2gills, gfldex 17:45
docs gave me the impression it would just work :) docs.perl6.org/routine/sort 17:46
17:47 hami left
SmokeMachine b2gills: yes, maybe use CALLERS::'s cmp would be better... 17:52
I think or its a but or its LTA... 17:53
17:55 Elronnd joined 17:56 p6bannerbot sets mode: +v Elronnd
Elronnd How can I read one line from stdin? I tried get(), but that just froze up my terminal (powershell) 17:56
timotimo if it's in the REPL, that'll probably interfere
SmokeMachine m: say get() 17:57
camelia »Wann treffen wir drei wieder zusamm?«
Elronnd humm
SmokeMachine m: say get
camelia »Wann treffen wir drei wieder zusamm?«
timotimo oh no, 6pad is hanging, i can't easily get my code out of the page because the only options i have are "kill page" and "wait" ... 17:58
Elronnd now I'm confused
timotimo Elronnd: the bot has an input file attached to it
Elronnd when I put get() by itself in a file (or surrounded by 'say' statements), it works fine
but, I have this code 0x0.st/sDoS.txt and it just prints forever without waiting for input 17:59
sena_kun Elronnd, you need to break `loop` if you want to use it. 18:00
Elronnd, and you can remove it completely, `for @lines -> {}` block will work nicely here. 18:01
Elronnd but I want to run this loop an infinite number of times
besides, when I take it out of the loop{}, the problem persists 18:02
SmokeMachine Elronnd: are you trying to implement prompt?
sena_kun well, the thing is that `@lines` value never changes, so it iterates over the same data again and again.
b2gills The input is already exhausted before the `get()`
SmokeMachine m: say prompt "bla"
camelia bla»Wann treffen wir drei wieder zusamm?«
AlexDaniel b2gills: why? 18:03
b2gills: @*ARGS[0].IO is probably a file, right?
b2gills get() pulls from $*ARGFILES
Elronnd with prompt it works, but I don't understand why 18:04
AlexDaniel: @*ARGS[0].IO is a textfile, yes
what is $*ARGFILES?
AlexDaniel Elronnd: by the way, `$_.split(' ')` can be written as just `.words`, I think
18:04 yqt joined, jmerelo joined
Elronnd AlexDaniel: thanks 18:04
[Coke] they are, I think, slightly different. 18:05
b2gills Actually `.words` is better because it removes the potentially empty leading and trailing strings
18:05 p6bannerbot sets mode: +v yqt, p6bannerbot sets mode: +v jmerelo
b2gills m: ' a b c '.split(' ').perl.say 18:05
camelia ("", "", "", "a", "", "", "b", "", "c", "", "", "").Seq
b2gills m: ' a b c '.words.perl.say
camelia ("a", "b", "c").Seq
b2gills m: ' a b c '.split(/\s+/).perl.say 18:06
camelia ("", "a", "b", "c", "").Seq
b2gills $*ARGFILES is a handle that reads the files in @*ARGS
Elronnd but -- I still don't understand, why did prompt work but get didn't? 18:07
b2gills prompt reads from $*IN not $*ARGFILES. You probably want $*IN.get().
Elronnd ah, yeah, that works 18:08
is there a way to do search and replace that's not in-place? So I can do it on an immutable Str and get back a new immutable Str? 18:13
timotimo .subst does that, and S/// does it, too
18:15 robertle joined, p6bannerbot sets mode: +v robertle
Elronnd thanks! 18:15
18:23 yqt left, sauvin left
TreyHarris Anyone have a tutorial or really good example for using grammars effectively? I feel like I've got it for constructing "abstracted regexen", so to speak, and for determining existence/extracting unstructured bags of stuff, but I don't feel confident with using it in either an action-oriented way as I've seen examples do, or in constructing complex data structures from a language 18:40
timotimo well, there's that book moritz wrote :) 18:41
18:43 tobs` left
TreyHarris timotimo: Oh dear... I think I have it in a box from when it arrived and we had guests coming and it got stuffed in the back of a closet, and had forgotten it even existed. 18:45
I should probably read it :-)
timotimo ha
TreyHarris Nope, even worse--I bought the ebook but never followed the link. I think it was a crush week and then I got sick and then the email had scrolled away and I forgot about it 18:46
Well, time to go read :-) 18:47
18:51 ryn1x_ left
moritz people recommend my book \o/ 18:52
18:53 ryn1x_ joined, p6bannerbot sets mode: +v ryn1x_ 18:55 ambs joined 18:56 p6bannerbot sets mode: +v ambs
mornfall if i do $timeout = { sleep 1; $server.kill }; and later $timeout.break; will that DWIM? 18:56
moritz did you forget an async there? 18:58
or start
or whatever it's called these days :-)
mornfall m: $x = start { sleep 1; say "foo"; }; $x.break; $x.await
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$x = start { sleep 1; say "foo"; }; $x.b
mornfall m: my $x = start { sleep 1; say "foo"; }; $x.break; $x.await
camelia Access denied to keep/break this Promise; already vowed
in block <unit> at <tmp> line 1
mornfall nope, !DWIM
how are variables in a start block evaluated? or rather, when are they captured? 19:02
can i ask for a variable to be captured when the 'start' block is created?
maybe 19:03
timotimo it's just a cluser that works like any other closure, i think 19:06
mornfall so it captures by reference, not by name? 19:10
19:11 pecastro joined
mornfall anyway i made a my $ref = $thing; and captured $ref, just in case :p 19:11
19:11 p6bannerbot sets mode: +v pecastro
mornfall (where $thing will get assigned other stuff before the start is finished) 19:12
timotimo yeah, if you change the same variable later on it'll reflect the changes in the closure
SmokeMachine m: react { whenever Promise.in: 1 { say "foo" }; whenever Promise.in: 0.5 { say "timed out"; done } }
camelia timed out
SmokeMachine m: react { whenever Promise.in: 1 { say "foo"; done }; whenever Promise.in: 5 { say "timed out"; done } } 19:13
camelia foo
SmokeMachine m: react { whenever Promise.in: 1 { say "foo"; done }; whenever Promise.in: .5 { say "timed out"; done } } 19:14
camelia timed out
19:17 sjoshi left 19:26 ryn1x_ left
SmokeMachine Is anyone working on make perl6 run on aws lambda? aws.amazon.com/pt/blogs/aws/new-fo...omponents/ 19:31
docs.aws.amazon.com/pt_br/lambda/l...ustom.html 19:38
19:54 coet joined, p6bannerbot sets mode: +v coet
mornfall how do i print to stderr? it's surprisingly hard to find 19:56
19:56 hankache joined 19:57 p6bannerbot sets mode: +v hankache
sena_kun .note 19:57
evalable6 (Any)
sena_kun or `note 'Boo'`
hankache hello #perl6
sena_kun `warn` when you want to notify that something _really_ bad happens, but don't want to throw an exception. but `note` is fine. 19:58
mornfall, ^
hankache, o/
m: $*ERR.say("Can't work, need hugs!") # that's an option too, I think 19:59
camelia Can't work, need hugs!
lucasb which reminds that "dd" outputs to stderr, instead of stdout 20:04
I wanted to use the triplet (put, say, dd) to test the methods (.Str, .gist, .perl), but they go to different outputs :) 20:05
mornfall yeah i thought it was for 'data dump' but perhaps it's for 'debug dump' :p 20:06
SmokeMachine m: given 42 { .put; .say; .dd } #another difference... 20:11
camelia 42
No such method 'dd' for invocant of type 'Int'
in block <unit> at <tmp> line 1

42
SmokeMachine m: given 42 { .put; .say; .&dd }
camelia 42
42
42
SmokeMachine lucasb: ^^ 20:12
20:12 jmerelo left 20:14 hankache left 20:15 dct joined, p6bannerbot sets mode: +v dct
Elronnd where can I learn in-depth about perl6? I read perl6intro.com, but I think some thing aren't there, e.g. I've seen lambdas declared with \x rather than $x and idk what that does 20:21
lucasb SmokeMachine: yeah, I think 'dd' is a tool, not part of the spec (maybe?) 20:23
SmokeMachine lucasb: its rakudo only...
lucasb: thats not part of perl6...
lucasb Elronnd: have you seen docs.perl6.org/ ? :) 20:24
Elronnd lucasb: ah! I have not
thanks
lucasb I know we may have settle the {docs → doc}.perl6.org thing, but... Can I open an issue to get a formal rejection on it? Or will I be annoying everybody? 20:31
sena_kun hmm, `doc -> docs` you mean? 20:32
lucasb well, the "->" points the direction of changes that I wish :) 20:33
sena_kun ah
well, google knows 92 100 of `doc`, but 202 000 of `docs`.
lucasb sena_kun: I know you didn't like the idea. sorry 20:34
sena_kun that's not so fair to search an url, I think, but still.
lucasb, no problem. it's not a political decision or something when one "has"(not really) stand to death for an opinion. if there will be reasons for a change, I will be all ok with it. 20:35
lucasb, I think you can open a ticket for sure, at least to probably ask questions like "why was it redirected in the first place", maybe gather some reasons. 20:36
lucasb sena_kun: ok then, thanks for the agreement :) 20:37
20:40 Sgeo_ left
sena_kun also, I think there are some more complex issues to resolve with our docs. e.g. rewritting it using Perl 6 and with that given, resolve a number of scary *old* code cases, weird workarounds on workarounds nobody really understands, etc. though I have to admit that docs really became a lot nicer over time, which makes me thankful to all people who worked on it. :) 20:41
lucasb yeah, the docs are getting awesome, for sure! I thank everybody improving it too. 20:43
20:45 Sgeo joined 20:46 p6bannerbot sets mode: +v Sgeo
lucasb about opinions, it's just that recently I'm feeling the preference of going through the process to get a formal written acceptance/rejection decision, instead of just suggesting things in the channel. 20:51
20:52 molaf left
lucasb I know things like these have low priority and can increase noise in the docs issue queue, but I don't see people wasting time with it 20:52
It's just a simple yes/no decision 20:53
And I obviously have no problem when (most of the time) my suggestions are rejected :D 20:55
sena_kun well, as a community-driven project, there are no real "head of stuff" or "CTO" positions to set things like that once and forever, I think. people do things they see as nice. when there is an arguable thing, then... well, an argue _can_ be long-standing, but most of such questions can be "soled" just by comparing pros and cons and settling with some option based on this. 20:58
s/soled/solved/
21:04 molaf joined 21:05 p6bannerbot sets mode: +v molaf 21:08 kensanata joined, p6bannerbot sets mode: +v kensanata
mornfall what is the canonic noop? 21:13
sena_kun where do you need it? 21:15
21:16 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias lucasb: re formal rejection I don't there is a procedure for that 21:16
lucasb: what would the benefits be? 21:19
timotimo m: do { } 21:20
camelia ( no output )
timotimo that probably comes close?
lucasb pmurias: procedure? I meant opening an issue with a suggestion and waiting to see it get closed with either a positive or negative response 21:24
pmurias: benefits of {docs → doc} ? 21:25
well, I think this issue falls in the territory of personal preferences really 21:26
doesn't know how to explain this better than "gut feeling" ?
how to measure this? maybe thumbs up/downs in the reactions to the issue. but *not* meaning that this kind of reaction would counts as votes, no 21:27
[Coke] gut feeling is not very convincing to me. 21:28
but maybe someone will have a solid reason to add to the ticket.
lucasb I don't have a detailed proposal for "docs → doc", so should I refrain from formally suggesting it? 21:29
I know this most certainly indicates the outcome :) 21:30
"maybe someone will have a solid reason" <-- I think that's how I feel. I don't have the words to argue, but wish someone out there has it. I propose things to the collective... and let it decide. :) 21:32
[Coke] if you don't have a reason, I would not personally be convinced it's worth the effort to change.
(I'm not saying don't open the ticket, just pre-commenting) 21:37
lucasb understood. and I appreciate your comments [Coke]++ and sena_kun++ :)
doc/Language/operators.pod6 # summons the bot? 21:39
doc: doc/Language/control.pod6 21:41
hmm, synopsebot is missing 21:42
Elronnd [6~[6~/g 21:46
21:46 zacts joined, p6bannerbot sets mode: +v zacts 21:51 Peter_R left, kensanata left 22:04 zacts left 22:05 sena_kun left 22:19 kensanata joined, p6bannerbot sets mode: +v kensanata
pmurias lucasb: we don't really have a procedure for deciding minor preference by collective, you could maybe create a poll somewhere? 22:33
lucasb pmurias: thanks. I think the poll has already informally happened here in the channel. And besides, it's complicated to use the result of a poll for anything, since this project is not in the design-by-comitte style 22:50
*committee
AlexDaniel timotimo: missing bots again? 23:08
timotimo busy busy writing the advent post
got only less than an hour left :o 23:09
AlexDaniel lucasb: the process is actually quite simple, you create a ticket or PR, people write comments and 👍 or 👎 it, usually the decision is relatively clear 23:10
like there's no official procedure, but that's how it worked for many things very well
23:10 rindolf left, kensanata left
lucasb AlexDaniel: that's how I always assumed. I just wanted to investigate the general feeling about the issue here on the chat :) 23:12
timotimo who else wants to proofread my work-in-progress advent calendar post? 23:14
Elronnd I kind of don't understand why array coerced to int returns the array's length
that seems a bit nonsensical
lucasb Elronnd: were you expecting an error or some other behavior? 23:15
Elronnd either an error, or to be able to do array maths without hyper operators 23:16
it seems like an error-prone way to make getting the length slightly simpler
lucasb with "my @a = 1,2,3; @a * 2", you wanted [2,4,6] as result? 23:18
well, when I see an array in numeric context, to me, it's a clear message that you want a scalar numeric value as result... and the only obvious value would have to be the size/length of the array, I think :) 23:19
Elronnd it's a non-obvious result, and I don't see the problem with making that an error? 23:20
lucasb I think this is heritage from Perl 5 23:21
23:22 donaldh left 23:23 ExtraCrispy left 23:24 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
AlexDaniel m: my int8 @a = 42, 50, 60; my $x = 0; say @a[$x-1] 23:32
camelia 60
AlexDaniel timotimo: ↑ :O
what the
timotimo m: my int8 @a = 1, 2, 3; say @a[0 - 1]
camelia 3
timotimo what the what now? 23:33
m: my int8 @a; say @a[0 - 1]
camelia MVMArray: Index out of bounds
in block <unit> at <tmp> line 1
timotimo this is the one i tested, right
well, that seems wrong.
AlexDaniel 6c: my int8 @a = 42, 50, 60; my $x = 0; say @a[$x-1]
committable6 AlexDaniel, ¦6c (35 commits): «60␤»
AlexDaniel timotimo: so it turns into python once you go native xD 23:34
timotimo: will you submit a bug report? I wanna read :)
timotimo i have to write more stuff 23:35
AlexDaniel timotimo: what's the right behavior in that case? 23:37
github.com/rakudo/rakudo/issues/2525 23:38
tbrowder .tell zoffix your Acme::Advent::Highlighter has a bug—issue filed 23:42
yoleaux tbrowder: I'll pass your message to zoffix.
AlexDaniel .tell Zoffix I hope you're alright! I miss you ♥ 23:44
yoleaux AlexDaniel: I'll pass your message to Zoffix.
23:47 MasterDuke joined, pecastro left 23:48 p6bannerbot sets mode: +v MasterDuke
MasterDuke timotimo: I can proofread, but not until a bit later tonight 23:48
timotimo it has to go up on the wordpress blog in like 10 minutes :) 23:49
23:51 MasterDuke left
tbrowder well, you can always update it (if you can get the bloody thing to work ;-) 23:53
my update is in wp’s autosave somwhere in the wayback machine! 23:54
timotimo i'll have to make it work very quickly now :D 23:55
23:55 MasterDuke joined 23:56 p6bannerbot sets mode: +v MasterDuke
MasterDuke timotimo: ha. I might have a couple min now, but can’t make any big promises 23:56
pmurias SmokeMachine: todo.p6 should work with the newest parcel-plugin-nqp release (it does work on my machine when I test it) 23:58
SmokeMachine: sorry for taking so long to make a sane release 23:59