»ö« 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:02 |oLa| joined 00:05 leont left
ugexe github.com/ugexe/Perl6-App--OpenAP...6Validator someone should do all the rest of the work and host the service on p6c 00:10
petstore.swagger.io/?url=https://r...enapi.json 00:13
00:16 Sgeo_ joined 00:19 Sgeo__ left 00:30 farcas82 joined 00:36 |oLa| left 00:38 khisanth_ left 00:58 khisanth_ joined 00:59 Xliff left 01:00 tyil left
MasterDuke .seen donaldh 01:04
yoleaux I saw donaldh 4 Dec 2018 23:38Z in #perl6: <donaldh> oh
01:33 |oLa| joined 01:34 mtg joined 01:52 tyilanmenyn joined 02:02 Kaiepi left 02:06 |oLa| left 02:10 farcas82 is now known as farcas82regreg 02:16 tyilanmenyn is now known as tyil 02:18 mtg left 02:39 squashable6 left 02:42 squashable6 joined
cpan-p6 New module released to CPAN! FindBin::libs (0.1.0) by 03LEMBARK 02:55
03:03 |oLa| joined 03:09 epony joined 03:10 epony left 03:11 epony joined 03:20 Kaiepi joined 03:37 |oLa| left 04:03 Cabanossi left 04:07 Cabanossi joined
cpan-p6 New module released to CPAN! FindBin::libs (0.1.1) by 03LEMBARK 04:11
04:14 Sgeo_ left, Sgeo_ joined 04:30 aindilis joined 04:33 aborazmeh left 04:34 |oLa| joined 04:37 reach_satori left, reach_satori joined 05:08 giraffe left, |oLa| left 05:09 giraffe joined 05:41 squashable6 left 05:47 squashable6 joined, ChanServ sets mode: +v squashable6 05:51 nadim_ joined, squashable6 left 05:55 squashable6 joined 06:04 |oLa| joined 06:18 zakharyas joined 06:37 zakharyas left 06:38 |oLa| left 06:39 jmerelo joined
jmerelo squashable6: status 06:44
yoleaux 8 Jun 2019 09:58Z <Kaiepi> jmerelo: since i made a bunch of issues on undocumented supply and lock::async methods i could look into what they actually do and see if i can write up some docs for them
squashable6 jmerelo, Next SQUASHathon in 25 days and ≈21 hours (2019-07-06 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo .tell Kaiepi please do 06:45
yoleaux jmerelo: I'll pass your message to Kaiepi.
jmerelo releasable6: status 06:46
releasable6 jmerelo, Next release in ≈11 days and ≈12 hours. 1 blocker. 140 out of 582 commits logged (⚠ 2 warnings)
jmerelo, Details: gist.github.com/af9a99bc116d10b77c...553f237b05
cpan-p6 New module released to CPAN! Archive::Libarchive (0.0.11) by 03FRITH 06:59
06:59 adu left 07:35 |oLa| joined 08:14 ravenousmoose joined 08:29 rindolf joined 08:40 domidumont joined 08:43 Deep_Thought joined 08:53 domidumont left 08:58 Deep_Thought left, Deep_Thought joined 08:59 Deep_Thought left, Deep_Thought joined 09:01 leah2 left 09:09 Deep_Thought left, Deep_Thought joined 09:10 ravenousmoose left 09:12 Deep_Thought left, Deep_Thought joined, Deep_Thought left 09:16 leah2 joined
lizmat hmmm... wrt to "from-json": is there a reason why we are currently returning mutable arrays and hashes instead of immutable lists and maps ? 09:22
timotimo not to my knowledge 09:25
jmerelo lizmat: good point. 09:26
lizmat it breaks JSON::Fast tests :-(
jmerelo lizmat: because they will be expecting mutable data structures. 09:27
lizmat so I wonder how wide spread this assumption is
timotimo well, they'll be is-eqv a Hash or Array probably
lizmat the first I found was doing my @a := from-json, easily fixed by s/:=/=/ 09:28
09:28 Xliff joined
jmerelo I'd like to talk for a bit, if you will, about the next squashathon 09:29
timotimo how performant is assigning a List into an Array?
Xliff m: my (@a, @b) = do gather for <a b c> Z <d e f> -> ($x, $y) { take $x; take $y }; @a.say; @b.say
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in block <unit> at <tmp> line 1
lizmat timotimo: I think we squeezed as much out of that as we can
timotimo OK 09:30
Xliff m: my (@a, @b) = do gather for <a b c> Z <d e f> -> ($x, $y) { take $x; }; @a.say; @b.say
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in block <unit> at <tmp> line 1
lizmat I mean, I can easily fix my from-json code to make hashes and arrays
but it feels wrong :-)
cpan-p6 New module released to CPAN! Gnome::GObject (0.13.6) by 03MARTIMM 09:32
09:45 leont joined
jmerelo Re: next squashathon. It does not have a topic yet. 09:46
And github.com/perl6/modules.perl6.org has 29 issues. They have been mostly ignored 09:47
It's not received much love lately.
09:48 rindolf left
jmerelo And it's an essential part of the infrastructure. 09:48
lizmat jmerelo: sounds like a plan for the next squashathon 09:49
jmerelo lizmat: OK. If no one else suggests an alternate plan, I'll just set it to that. 09:50
lizmat jmerelo: also keep in mind github.com/perl6/problem-solving/issues/26 09:51
jmerelo lizmat: I'll try to see what can be done about that. If I got it correctly, we need to generate some kind of index that it's compatible with MetaCPAN? 09:53
lizmat perhaps... that is one of the questions 09:54
jmerelo lizmat: I'll bear it in mind. If what you mean is to eventually merge modules.perl6.org into MetaCPAN, I'd be all for it. But for the time being, it's got to be maintained. 09:55
09:55 ravenousmoose joined
lizmat it indeed needs to be maintained... and whether a merge with MetaCPAN is an option, is still to be seen 09:56
jmerelo lizmat: OK. It will not hurt to kind of keep that in the back of the mind, to make migration easier. 09:57
lizmat right
jmerelo lizmat: in general, the problem with that repo, and with most repos under the perl6/ and perl6-community-modules/ orga is that unless someone feels keenly about them, they are abandoned. 09:58
lizmat indeed.. so very true :-(
jmerelo lizmat: I don't know if that should go to the problem solving repo or wherever, but devoting a squashathon from time to time feels like crapshooting 09:59
lizmat maybe a toolchain summit would be more appropriate :-)
jmerelo lizmat: I'm all for that... 10:00
timotimo is reminded to rebuild modules.perl6.org's database
jmerelo timotimo: I already did that today. I have set up a cron job for doing it daily. 10:05
timotimo oh, cool 10:08
well, it's running now so i probably shouldn't kill it
jmerelo .tell AlexDaniel congrats on your Master's defense :-) 10:26
yoleaux jmerelo: I'll pass your message to AlexDaniel.
nadim_ intresting! an instanciated Grammar is a Match. I am wondering what you use to dump grammars. the obvious answer would be a text editor and look at the source but I wonder how the Grammar is kept internally. 10:30
Yes, I came tothe pointwhere I want to dump grammars, and more specifically filter them, how do you do that?
jmerelo nadim_: would there be anything shorter than the grammar itself? 10:32
nadim_ jmerelo: that's what I meant with openingit in a text editor
but I'd like to manipulate it as an object 10:33
timotimo nadim_: how do you dump a class?
that's the same thing :)
like, the regexes, rules, and tokens of a grammar are methods
m: say Grammar.^lookup("ws"); 10:34
camelia ws
timotimo m: say Grammar.^lookup("ws").perl
camelia Died with X::Method::NotFound
in block <unit> at <tmp> line 1
timotimo m: say Grammar.^lookup("ws").WHAT
camelia Cannot look up attributes in a NQPRoutine type object
in any name at gen/moar/stage2/NQPCORE.setting line 386
in any gist at gen/moar/stage2/NQPCORE.setting line 392
in block <unit> at <tmp> line 1
timotimo that's fair i guess
m: grammar T { regex test { <[abc]>+ } }; say T.^lookup("test") 10:35
camelia regex test { <[abc]>+ }
nadim_ Cannot find method 'name': no method cache and no .^find_method 10:36
so I can't dump it as a class 10:37
timotimo that could be the extremely-low-level methods in there
custom matching stuff implemented directly in nqp code
nadim_ I need to readmore about Grammars in P6 I think, and maybe play a bit with them first 10:40
but it would be could to be able to dump them nicely
timotimo every match object is also an instance of the grammar class it belongs to 10:42
so it'll be difficult to figure out if somebody wants to dump a result or an "instance of the grammar"
so the user would have to give that hint i guess 10:43
nadim_ hmm, so far instances are dumped as Match, what I want to dump is a Grammar:U 10:45
Kaiepi m: my Lock::Async $l .= new; await $l.protect-or-queue-on-recursion({ sleep 5; await $l.protect-or-queue-on-recursion({ say 1 }); }) 10:46
yoleaux 06:45Z <jmerelo> Kaiepi: please do
Kaiepi working on it now jmerelo 10:47
nadim_ a related question, sayI have my regx a=/<another_regexp_calling_other_regexps>/; I can't use "a" directly, ddt a; I don't even get an object to dump, P6 fails before tehcall to ddt
Kaiepi m: my Lock::Async $l .= new; await $l.protect-or-queue-on-recursion({ await $l.protect-or-queue-on-recursion({ sleep 5; say 1 }); })
m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ await $l.protect-or-queue-on-recursion({ sleep 5; say 1 }); }) 10:48
m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ await $l.protect-or-queue-on-recursion({ say 1 }); })
m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ sleep 5; say 1; }); await $l.protect-or-queue-on-recursion({ say 2; }); 10:49
this is used... somehow.
10:50 camelia left
Kaiepi m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ sleep 5; say 1; }); $l.protect-or-queue-on-recursion({ say 2; }); 10:50
evalable6 1
2
Kaiepi there we go 10:51
m: my Lock::Async $l .= new; $l.protect({ sleep 5; say 1; }); $l.protect({ say 2; });
evalable6 1
2
Kaiepi m: my Lock::Async $l .= new; $l.protect({ sleep 5; $l.protect({ say 1; }); });
evalable6 (signal SIGHUP) «timed out after 10 seconds» 10:52
Kaiepi m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ sleep 5; $l.protect-or-queue-on-recursion({ say 1; }); })
evalable6
Kaiepi m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ await $l.protect-or-queue-on-recursion({ say 1; }); })
evalable6 (signal SIGHUP) «timed out after 10 seconds» 10:53
Kaiepi m: my Lock::Async $l .= new; $l.protect-or-queue-on-recursion({ $l.protect-or-queue-on-recursion({ say 1; }); })
evalable6
timotimo nadim_: regexes are subs, you have to call it &a
Kaiepi m: my Lock::Async $l .= new; await $l.protect-or-queue-on-recursion({ $l.protect-or-queue-on-recursion({ say 1; }); })
evalable6 (exit code 1) 1
Must specify a defined Awaitable to await (got an undefined Nil)
in block <unit> at /tmp/lXpzFK6jCy line 1
timotimo Kaiepi: protect does an await for you, i'd expect protect-or-queue-on-recursion would also await for you 10:54
Kaiepi protect-or-queue-on-recursion has a case where it may return a Promise 10:55
the comments aren't quite clear on when that's supposed to happen though
for when the lock is locked and it wants to return Promise: # Lock is already held on the stack, so we're recursing. Queue 10:56
for when the lock is locked and it doesn't: # Lock is held but by something else. Await it's availability. 10:57
what is "something else"?
timotimo a different piece of code?
like, the thing that holds the lock isn't on the same call stack
nadim_ timotimo: it works better with &regex but I see that I do a .perl in ddt (yes I am lazy), it will be interesting to see how .perl does the dump
Kaiepi oh
timotimo which i guess corresponds to tasks as they are queued on the threadpoolscheduler and such 10:58
nadim_: i'm not sure what the exact question is
github.com/rakudo/rakudo/blob/mast...x.pm6#L119 10:59
nadim_ timotimo: given a regexp that calls regexps that call regexps, I'd like to dump a structure of that. Not sure it is possible if they are represented as subs
timotimo there is something that can take you a quarter of the way there, which is to inspect the NFAs, but that's only for the "declarative prefix" parts of alternations, not for anything else 11:00
Kaiepi timotimo, looks like it's based on the caller chain
timotimo Kaiepi: that makes sense; it'd probably look for the continuation root point to identify what the actual task is 11:01
nadim_ hmm, writting a grammar to parse the source of regexps to find which sub elements a regexp uses sound tedious, any other way?
timotimo: lol, you answer my questions before I ask them.
timotimo it's a "halting problem" issue :P
nadim_ Any good intro to Perl 6 grammars somewhere, not a reference manual but something to have fun reading? 11:03
timotimo moritz' book is good
nadim_ I'll order it then 11:04
something short in the meantime, you named andrew's video a few week ago I believe 11:05
no, that was in your blog entry
timotimo well, that's a very specific grammar usage example 11:16
and i guess it doesn't go much into grammar's inner workings
Kaiepi m: my Int $i = 0; my Lock::Async $lock .= new; await $lock.protect-or-queue-on-recursion({ cas $int, { .succ }; $lock.protect-or-queue-on-recursion({ cas $int, { .succ } }); }); say $i 11:19
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/LaFBIvuMD9
Variabl…
Kaiepi, Full output: gist.github.com/41ddfb218090efa042...d6633c65be
Kaiepi m: my Int $i = 0; my Lock::Async $lock .= new; await $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i
evalable6 (exit code 1) Must specify a defined Awaitable to await (got an undefined Nil)
in block <unit> at /tmp/DjapNvmCfT line 1
Kaiepi m: my Int $i = 0; my Lock::Async $lock .= new; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i
evalable6 1 11:20
Kaiepi m: my Int $i = 0; my Lock::Async $lock .= new; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; await $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i
evalable6 (signal SIGHUP) «timed out after 10 seconds»
timotimo seems like an odd api to only sometimes return a promise and otherwise nil
but the method is also not even documented, i wonder if it's spectested? 11:21
Kaiepi m: my Int $i = 0; my Lock::Async $lock .= new; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; LEAVE await $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i
evalable6 (signal SIGHUP) «timed out after 10 seconds»
timotimo it's not mentioned anywhere in t/spec/
so you're officially on your own :P
Kaiepi nope
fun
m: my Int $i = 0; my Lock::Async $lock .= new; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; $*AWAITER.await: $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i 11:22
timotimo it's probably not something you actually need?
evalable6 (signal SIGHUP) «timed out after 10 seconds»
Kaiepi i would've used it in my telnet library if i knew it existed because of a deadlock related to calling protect twice in the same caller chain
11:23 sena_kun joined
Kaiepi but it turned out i didn't need the locks in the first place 11:23
timotimo i thought Lock::Async is what you want if you don't want recursion to immediately go through a protect call
so using Lock instead of Lock::Async might be the right thing there? 11:24
Kaiepi i honestly don't remember what the code looked like at all so idk
i *think* i tried Lock and had the same issue but i'm not positive 11:25
11:41 jmerelo left 11:46 SCHAPiE left
ugexe Lock.protect is reentrant 11:46
Kaiepi m: my Lock::Async $lock .= new; my Int $i = 0; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; $lock.with-lock-hidden-from-recursion-check({ cas $i, { .succ } }); }); say $i 11:47
evalable6 2
Kaiepi ok i think i understand how these undocumented methods work now
11:48 SCHAPiE joined
ugexe ...why use cas inside a critical section? 11:49
that’s already locked 11:50
Would you not just assign directly to $i ?
Kaiepi shrug 11:52
m: my Lock::Async $lock .= new; my Int $i = 0; $lock.protect-or-queue-on-recursion({ cas $i, { .succ }; $lock.protect-or-queue-on-recursion({ cas $i, { .succ } }); }); say $i 11:53
evalable6 1
11:54 dyske left
nadim_ Is there any *existing* command line too that given a grammar (in the tools language of choice) and a text would generate a json of the grammar match and set the exit code in case of failure? 11:55
11:55 dyske joined 11:59 oodani left, oodani joined 12:02 Xliff_ joined 12:03 _Xliff_ joined 12:06 Xliff left, Xliff_ left 12:08 MilkmanDan left, MilkmanDan joined 12:27 aborazmeh joined, aborazmeh left, aborazmeh joined
Kaiepi ok after documenting wtf Lock::Async.protect-or-queue-on-recursion and Lock::Async.with-lock-hidden-from-recursion-check do i understand a lot better how supplies manage to work at all 12:34
mainly because supplies are the only thing that use them 12:35
12:36 _Xliff_ left 12:48 adu joined 12:51 rindolf joined 12:55 ChoppedBacon_ joined 12:56 ChoppedBacon left, ChoppedBacon_ is now known as ChoppedBacon
Geth doc: Kaiepi++ created pull request #2842:
Document missing Lock::Async methods
12:56
12:58 dmaestro joined 12:59 squashable6 left
dmaestro design.perl6.com is not serving any pages - have the spec documents been moved anywhere temporarily (or otherwise), and can someone point me to them? 13:00
ugexe you can still view them in their repository: github.com/perl6/specs 13:02
13:05 squashable6 joined 13:09 veesh left, kaare__ left 13:11 veesh joined
Kaiepi is anyone willing to document Lock::ConditionVariable? i know nothing about how condition variables work 13:12
13:24 aborazmeh left 13:48 veesh left 13:54 veesh joined 13:55 andry joined 13:56 andry left 13:57 Kaiepi left, dyske left, dyske joined 14:07 Kaiepi joined 14:47 adu left
lizmat weekly: perl6.eu/fc-matrix.html 14:47
notable6 lizmat, Noted!
14:54 cpan-p6 left 15:00 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 15:14 Xliff joined
Xliff \o 15:14
How can I force the generated USAGE to show up? 15:15
ugexe say $*USAGE 15:17
Xliff ugexe++ 15:19
Is there a way to emit a carriage return in comments starting with '#='? 15:22
m: my @a = 'a'..'g'; sub sayLetter { $^a.say }; @a.batch(4)»&sayLetter 15:32
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ssdD7yZEtw
Malform…
Xliff, Full output: gist.github.com/88c798fdf31a6dbba8...b5a0680e11
Xliff ^^ What am I doing wrong, there?
m: my @a = 'a'..'g'; sub sayLetter { $^a.say }; @a.batch(4)».sayLetter() 15:33
evalable6 (exit code 1) No such method 'sayLetter' for invocant of type 'Str'
in block <unit> at /tmp/jxKa9by_9p line 1
Xliff m: my @a = 'a'..'g'; sub sayLetter { $^a.say }; @a.batch(4)».&sayLetter()
evalable6 a
b
c
d
e
f
g
Xliff m: my @a = 'a'..'g'; sub sayLetter { $^a.say }; @a.batch(2)».&sayLetter()
evalable6 a
b
c
d
e
f
g
Xliff Nevermind! ;)
15:37 adu joined
Xliff m: my @a = 'a'..'g'; sub sayLetter ($a) { $a.say }; @a.batch(2)».&sayLetter() 15:43
evalable6 a
b
c
d
e
f
g
16:28 domidumont joined 16:30 Maylay left 16:31 silug_ left
Geth doc: c557b5f1d2 | (Ben Davies)++ | doc/Type/Lock/Async.pod6
Document missing Lock::Async methods

This documents Lock::Async.protect-or-queue-on-recursion and Lock::Async.with-lock-hidden-from-recursion-check.
Fixes #2785
16:34
synopsebot Link: doc.perl6.org/type/Lock::Async
doc: d17da25331 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Lock/Async.pod6
Merge pull request #2842 from Kaiepi/lock-async

Document missing Lock::Async methods Thanks!
16:35 Maylay joined
sena_kun Kaiepi++ 16:36
16:36 silug joined
Xliff '»' does guarantee starting on a new processor, does it? 16:38
16:38 veesh left
Xliff Is there any way I can force the issue? 16:38
16:39 jmerelo joined 16:40 veesh joined 17:05 goon_ joined
ugexe no it doesn't guarentee that at all 17:06
17:08 veesh left
mst what's an idiomatic way to do 'optional whitespace' in a grammar? 17:09
say to be able to parse (<expr>, <expr> , <expr>)
jmerelo mst: <ws>* or more likely <.ws>* without capturing 17:11
mst given something like token list { '(' <expr> + % ',' ')' } 17:13
can I (<expr><.ws>?) + % ',' ?
MasterDuke mst: i think someone asked a similar question a couple days ago and jnthn or moritz had a good example
mst sorry. I'm not really sure where to read up on this
17:13 ravenousmoose left, veesh joined
jmerelo Something like this? stackoverflow.com/questions/565070...l6-grammar 17:13
ugexe token Trailer { [[<.OWS> <field-name>]*] *%% ',' } 17:14
OWS = optional white space
Geth doc: Kaiepi++ created pull request #2843:
Document Kernel.free-memory and Kernel.total-memory
17:15
mst ugexe: ooooh
ugexe OWS is whatever the http equiv of <ws> is though, not some built-in token 17:16
mst so .. '(' [<expr><.ws>?]+ % ',' ')' ?
also, uh, *%% ? where do I read about that
sorry. re-read half of moritz' book and now having a good flail 17:17
ugexe its been awhile since i wrote that, but i believe it allows trailing commas, which http spec allows
where % only allows the thing between items, and %% allows the after each item 17:18
mst ah, presumably %% is its own op there and the * is actually part of the preceding pattern?
ugexe yeah, its a quantifier on the preceding pattern
mst so it's morally ([[<.OWS> <field-name>]*] *) %% ','
ugexe possibly redundant. hell if i know anymore :) 17:19
mst heh
leont jmerelo: AFAIK <ws> also zero-matches, so <ws>* would not DWIM
Geth doc: 278a1800bb | (JJ Merelo)++ | doc/Type/Backtrace.pod6
Adds nice to Backtrace refs #2809
doc: 307a1863c7 | (JJ Merelo)++ | doc/Type/Backtrace.pod6
Moves example to right place, refs #2809
synopsebot Link: doc.perl6.org/type/Backtrace
doc: 560bfa0e2a | (JJ Merelo)++ | doc/Type/Backtrace.pod6
Adds last method, closes #2809
jmerelo leont: does it?
Xliff ugexe: This reads better as -- token Trailer { [[<.OWS> <field-name>]*]* %% ',' }
<token><quantifier> %% <delimeter>
MUST have a quantifier 17:20
tobs m: say "42, 23 , 10" ~~ /(\d+)* % [ <.ws> ',' <.ws> ]/ # jmerelo
evalable6 「42, 23 , 10」
0 => 「42」
0 => 「23」
0 => 「10」
tobs m: say "42, 23 , 10" ~~ /(\d+)* % [ <.ws> ',' <.ws>* ]/ # jmerelo
evalable6 (signal SIGHUP) «timed out after 10 seconds»
jmerelo leont, tobs: right, zero or more whitespace characters. Thanks!
mst I'm now confused where you get required ws and where you get optional
ugexe token OWS { [<.SP> || <.HTAB>]* } 17:22
token RWS { [<.SP> || <.HTAB>]+ }
mst that part I get, it's ... 'rule' makes a space implicitly <.rws> ?
ugexe github.com/ugexe/Perl6-Grammar--HT...FC7230.pm6 is where im pulling this from
ah
im not sure i've ever used rule 17:23
mst it appears to be 'token, but with :sigspace on'
I'll keep playing 17:24
Geth doc: 755b28b730 | (Ben Davies)++ | doc/Type/Kernel.pod6
Document Kernel.free-memory and Kernel.total-memory
17:33
doc: 61af23c728 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Kernel.pod6
Merge pull request #2843 from Kaiepi/kernel

Document Kernel.free-memory and Kernel.total-memory
synopsebot Link: doc.perl6.org/type/Kernel
Xliff ugexe: How do you force a task to run on a different proc? 17:34
MasterDuke start
jmerelo Xliff: different from what?
Xliff Because when I use '»' I use batch. No matter what I set the batch size to, the code is still runs at the same speed.
jmerelo: I want to parallelize some code.
MasterDuke well, i'm not sure it's possible to force a difference physical processor, but start puts it on a new thread
Xliff: >> is allowed by the spec to parallelize if/when it wants, but rakudo currently doesn't ever do it 17:35
jmerelo MasterDuke: right. If there are threads available, of course. If there are no physical threads left, it might just run wherever it can 17:36
Xliff: you might try and use hyper/race. You'll notice some speedup only with big sizes, though.
ugexe start doesnt always start a new thread
Xliff So should I use .batch or not? 17:37
ugexe .batch?
Xliff @hrefs.batch($batch)».&processClass();
jmerelo Xliff: you mean hyper/race? You might give it a try, and see what it buys you.
Xliff Where $batch is the number of jobs I want to run in parallel. 17:38
Or should I just do....
@hrefs».&processClass();
ugexe you might want to look at the docs for hyper/race
jmerelo Xliff: again, give it a try. As MasterDuke said above, autothreading is not implemented yet
ugexe autothreading is not automatically starting threads 17:39
jmerelo Xliff: hyper/race use 4 threads by default. You might use different batch/processor size, but again you'll need to experiment to get it right.
Xliff OK. Will give it a try.
So would that convert to...
@hrefs.race(degree => $threads).&processClass(); 17:40
ugexe it sounds like you want batch => 1, degree => $threads
Xliff OK. Trying.
jmerelo Xliff: you need to use map or grep in the middle, and processClass within it
Xliff Oh.... fiddlestix. jmerelo++ 17:41
SEGV'd 17:43
I think Inline::Perl5 is giving race() some indigestion. 17:44
Setting threads to anything but 1 will SEGV
ugexe sounds like your code isn't thread safe 17:45
Xliff Probably not, but my guess is it might have something to do with Inline::Perl5
Backtrace incoming...
paste.fedoraproject.org/paste/IR4J...mw-N3jfPpw 17:46
I use Inline::Perl5 for Mojo::DOM
Nothing I am doing should be thread unsafe.
ugexe you are sure Mojo::DOM is thread safe? 17:47
Xliff No. I am not. ;)
ugexe i sure as hell dont think or care about thread safety when writing perl 5
so you can't say Nothing you are doing is thread unsafe 17:48
Xliff Nothing on google.
mst I would imagine you'd need a perl5 VM per thread for that to work?
Xliff ugexe: OK, fine. Split hairs. :)
Fair enough. One thread it is.
17:51 clarkema joined
clarkema evenign 17:52
moritz hi there 18:00
18:09 hythm joined 18:16 antoniogamiz joined
hythm Lets say I want to add (append, pop, shift, unshift) methods to IO::Path, so I can run ('/tmp/delme'.IO.pop; # /tmp), Do I need to use `augment`? although docs discourage using augment. Also I don't want to create a separate class for it may be "Path::Util" for instance, I'd prefer If I would be able to call these methods directly on IO 18:19
ugexe then use augment 18:21
hythm ok
ugexe what you are doing would be discouraged in general, nothing specific to augment
hythm ah I see
clarkema I've just uploaded my first module to CPAN. I can see it in my homedir on PAUSE... do I need to do anything else from there to have it 'zef install'able?
ugexe for instance -- what if some code/library expects an exception to be thrown if .pop is called on it? it is not aware of your change of behavior 18:22
18:22 dogbert11 joined
hythm right, so I think it's better to create anseparate class for it 18:23
18:23 vrurg left
ugexe yes, or use a mixin role on IO::Path 18:23
18:23 vrurg joined, pyrimidi_ joined
tobs clarkema++: no, just wait a bit 18:23
18:23 dogbert17 left, pyrimidine left
ugexe role PathThing { method pop { ... } }; my $foo = "foo".IO but PathThing; 18:23
hythm makes sense, abnd sounds a better idea 18:24
clarkema tobs: great, thanks
tobs but I can't quantify "a bit"
moritz hythm: the other option is to use multi subs instead of methods
multi sub pop(IO::Path:D $p) { ... } 18:25
and then call pop($thing.IO)
clarkema tobs: I can't stand the suspense! 18:26
jmerelo clarkema: did you upload it to the Perl6 directory?
clarkema jmerelo: yes
jmerelo clarkema: it will take a while to show up here and in Twitter. And ugexe's bots scan every two hours, so it will take a while more to appear in zef search
clarkema: modules.perl6.org should kick in at midnight, so tomorrow should be there too. 18:27
clarkema jmerelo: ok, i'll let it percolate for a while 18:29
cpan-p6 New module released to CPAN! Pod::To::Man (0.1.0) by 03CLARKEMA
clarkema ah, speak of the devil
18:29 kurahaupo left
clarkema ah, speak of the devil 18:29
hythm thanks ugexe and moritz for the suggestions, I like the multi sub pop(IO::Path:D $p) { ... } , will use that.
tobs m: multi sub tail (Str:D $_) { .comb.tail }; say "hallo".&tail; # hythm: additionally there is .& to make sub calls look like method calls. 18:35
evalable6 o
hythm tobs: noted. 18:36
18:49 Actualeyes left, domidumont left 18:56 natrys joined 19:08 AlexDaniel joined
AlexDaniel . 19:08
yoleaux 10:26Z <jmerelo> AlexDaniel: congrats on your Master's defense :-)
AlexDaniel thank you :)
Xliff \o/ 19:09
jmerelo AlexDaniel: will you be publishing it? Did you get any trouble from the Jury?
AlexDaniel everyone is so supportive, I hope you all don't hate for not doing enough perl6 wörk for the last few months
Xliff M. S. AlexDaniel
AlexDaniel don't hate me*
Xliff LOL
Don't worry. I am making up for you.
jmerelo AlexDaniel: I've missed you re-opening doc issues I had closed alright 19:10
:-)
AlexDaniel jmerelo: no, I did get some trouble from libreoffice though
Xliff bitbucket.org/perl_amazon_ec2/p6-a...n-aws-ec2/
AlexDaniel jmerelo: one slide showed up with broken images, and it crashed at least 2 times during the presentation
jmerelo AlexDaniel: it's private. Anyway, why not LaTeX? 19:11
AlexDaniel jmerelo: how do you include a video in a latex presentation? I don't know
jmerelo AlexDaniel: ah. Reveal.js then.
AlexDaniel shrugs
jmerelo AlexDaniel: yep, what's done is done.
AlexDaniel libreoffice doesn't like videos too, that's why it was crashing…
but it was alright! I handled it well, I think 19:12
jmerelo Congrats!
Will you be continuing in academia or off to industry? 19:13
19:13 cjkinni joined
AlexDaniel I'll continue… doing military or alternative service, because in this country I have no other choice 19:14
unless a miracle happens, which I highly doubt
jmerelo: as for publishing, no related paper will be published, but you'll find a pdf of the thesis itself here: github.com/RGVID-EU/RoboRG-Docs/releases 19:15
19:15 ravenousmoose joined
jmerelo Good luck with that. 19:15
AlexDaniel: you should definitely try and publish, even if it's in ArXiV only. 19:16
jmerelo goes AFK to dinner... 19:18
AlexDaniel jmerelo: personally I don't think academia is for me… not anymore. I don't see a point. People write a paper, submit it, and then drop that topic on the floor and move to the next paper. Oh and no sources published, of course
19:19 jmerelo left
AlexDaniel maybe in other fields this makes sense 19:19
Xliff AlexDaniel: I still haven't forgotten your graph for GtkPlus. I've just been soo busy. 19:20
AlexDaniel I don't think I want to fight that by going against the lfow…
Xliff github.com/Xliff
AlexDaniel flow*
so I'll just do something else, probably, but we will se in a year
Xliff Working on the Amazon AWS Query API, now.
AlexDaniel see* gah :)
Xliff: what gtk graph? I don't remember…
Xliff: compilation time across revisions? Or something? 19:21
Xliff Horizontal. Perl 6 version vs total compile time
AlexDaniel mmmm that'd be interesting
Xliff Yeah. Noticed a real serious slow-down with the later compilers.
Went from 2300 seconds to compile to like 4000 on the VM. 19:22
sena_kun AlexDaniel, very sad to know you are likely to spend a year of life doing something LTA. I hope you will be able to think of something to make this time more interesting for yourself. :) Of course, nobody hates you(I hope), there is _a lot_ of your work contributed and it is valued, so be more proud of yourself. :) 19:24
AlexDaniel sena_kun: I'll know in a week if it's going to be alternative service or not 19:25
sena_kun: and if so, I'll just have a 1 year job with minimum wage
sena_kun AlexDaniel, I'll hope for this option.
it is just so damn inefficient from various points of view when people don't do something they are clearly better at. :/ 19:28
19:35 |Sno| left 19:36 sena_kun left 19:37 [Sno] joined 19:39 sena_kun joined
clarkema is it possible to provide a default for a named argument in a sub's arglist, or do you just have to do ||= later on in the body? 19:50
ugexe m: sub foo(:$var = "default") { $var }; say foo()' 19:57
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/hH338Z_fL9
Two ter…
ugexe, Full output: gist.github.com/625ba9bce4dffd61d0...7cb4e577f4
ugexe m: sub foo(:$var = "default") { $var }; say foo() 19:58
evalable6 default
clarkema thanks
20:03 sena_kun left 20:04 Sgeo__ joined 20:07 Sgeo_ left 20:09 antoniogamiz left 20:13 veesh left
Geth doc/p6doc-support-different-formats: 7796e0ff6e | (Mike Clarke)++ | bin/p6doc
Teach p6doc to handle --format
20:17
clarkema hmm, that was supposted to be to my own remote 20:18
oh wel
mst it's a branch so ... meh? :) 20:20
20:23 veesh joined
Geth doc: clarkema++ created pull request #2844:
Teach p6doc to handle --format
20:23
clarkema yeah, I was only going to PR it from there anyway, so it doesn't matter 20:24
20:36 dolmen joined 20:37 dolmen left, dolmen joined, farcas82regreg left 20:38 ravenousmoose left
nadim_ evening, wha are you using for file extension for scripts and modules. I am still using pl and pm and wonder what the consensus is 20:50
20:53 natrys left 20:59 hythm left
ugexe use .pm6 for modules 21:02
leont Some do .pm others do .pm6. I think the latter is winning
ugexe and use .p6 or .pl6 for scripts
leont More recently people have started doing .t6 for tests
ugexe if we can get to *only* allow .pm6 then we can have distributions that contain perl 5 and 6 modules side by side
nadim_ thanks for the answers, I'll align to those. 21:12
21:17 dolmen left 21:23 squashable6 left 21:24 squashable6 joined
Geth doc: lukasvalle++ created pull request #2845:
Adapt documentaion for pairup
21:29
doc: 9c1d2058fc | lukasvalle++ | doc/Type/Any.pod6
Adapt documentaion for github.com/rakudo/rakudo/commit/d7...e64f48fc44 (Consistify :U.pairup with :D one by returning a Seq )
21:33
doc: 263f435847 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Type/Any.pod6
Merge pull request #2845 from lukasvalle/master

Adapt documentation for pairup
synopsebot Link: doc.perl6.org/type/Any
21:44 Cabanossi left 21:50 sena_kun joined 21:56 Cabanossi joined 22:02 Altai-man_ joined 22:03 sena_kun left 22:06 Voldenet left 22:10 Voldenet joined, Voldenet left, Voldenet joined
leont Personally, I wouldn't use any extension for scripts, and I see no reason why anyone else would want to do so 22:12
ugexe the only reason i can think of, now that you mention it, is to give windows people some help 22:15
22:20 Altai-man_ left 22:25 molaf joined 22:28 rindolf left 22:52 molaf left 23:03 Sgeo_ joined 23:07 Sgeo__ left 23:21 aborazmeh joined, aborazmeh left, aborazmeh joined 23:22 mowcat joined, clarkema left 23:23 Test joined 23:24 Test is now known as Guest79246 23:32 |Sno| joined 23:36 [Sno] left