»ö« 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:05 mcmillhj joined 00:06 p6bannerbot sets mode: +v mcmillhj 00:10 mcmillhj left
geekosaur wonders at what pont this becomes "so if what works better for everyone else doesn't work for you, you may have to wait until someone comes up with a version of the docs that works for you" 00:20
timotimo i do have to agree that some examples are pretty bad :) 00:21
geekosaur neverteless. he's repatedly asserted tat perldocis the only corect way to doit 00:22
timotimo i didn't interpret it as "perldoc is the only correct way" 00:23
just that perldoc is more useful because it's less "academically" written i suppose?
00:29 graphene left 00:30 graphene joined
[Coke] one note about the perldoc stuff; I don't liek the thought of adding the p5 style func THING, OTHERTHING because I really don't see how that improves over the literal signature. 00:31
00:31 p6bannerbot sets mode: +v graphene
[Coke] which I argued with dha about back in the day, I think. I absolutely agree that having a page on "how the docs work" would be a great thing, though, explaining common signature elements, among other things. 00:32
00:36 mcmillhj joined 00:37 p6bannerbot sets mode: +v mcmillhj 00:41 mcmillhj left 00:43 pdurbin joined 00:44 p6bannerbot sets mode: +v pdurbin 00:49 rindolf left 00:51 mcmillhj joined 00:52 p6bannerbot sets mode: +v mcmillhj 00:55 perlBird joined, p6bannerbot sets mode: +v perlBird 00:56 mcmillhj left 01:07 Kaiepi left 01:09 Ven` joined 01:10 p6bannerbot sets mode: +v Ven`, mcmillhj joined 01:11 p6bannerbot sets mode: +v mcmillhj 01:13 Ven` left 01:14 mcmillhj left 01:26 molaf left 01:31 chenyf_ joined 01:32 p6bannerbot sets mode: +v chenyf_ 01:33 lichtkind left 01:39 molaf joined 01:40 p6bannerbot sets mode: +v molaf 01:42 mcmillhj joined 01:43 p6bannerbot sets mode: +v mcmillhj 01:44 ZzZombo left 01:48 mcmillhj left 01:57 mcmillhj joined 01:58 p6bannerbot sets mode: +v mcmillhj 02:01 mcmillhj left
Xliff Is ::?METHOD the proper way to get the name of the current method? 02:14
Looks like &?ROUTINE.name works 02:18
02:27 mcmillhj joined 02:28 p6bannerbot sets mode: +v mcmillhj 02:29 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 02:32 mcmillhj left 02:59 cog joined 03:00 p6bannerbot sets mode: +v cog 03:03 cognominal-p6 left 03:06 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 03:10 mcmillhj left 03:11 kerframil left 03:23 Herby_ left 03:25 Ven` joined, p6bannerbot sets mode: +v Ven` 03:26 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 03:29 Ven` left 03:31 mcmillhj left 03:51 butterflavia joined, p6bannerbot sets mode: +v butterflavia, butterflavia left 03:59 mcmillhj joined 04:00 p6bannerbot sets mode: +v mcmillhj 04:03 mcmillhj left 04:35 molaf left 04:48 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 04:52 mcmillhj left 04:59 mcmillhj joined 05:00 p6bannerbot sets mode: +v mcmillhj 05:04 mcmillhj left, |oLa| joined, p6bannerbot sets mode: +v |oLa| 05:15 mcmillhj joined, zxcvz left 05:16 p6bannerbot sets mode: +v mcmillhj 05:20 robertle left, mcmillhj left 05:45 sauvin joined, p6bannerbot sets mode: +v sauvin 05:46 mcmillhj joined 05:47 p6bannerbot sets mode: +v mcmillhj 05:51 mcmillhj left, kensanata joined, p6bannerbot sets mode: +v kensanata 06:04 imcsk8 joined 06:05 p6bannerbot sets mode: +v imcsk8 06:07 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 06:11 mcmillhj left 06:23 robertle joined 06:24 p6bannerbot sets mode: +v robertle 06:29 domidumont joined 06:30 p6bannerbot sets mode: +v domidumont 06:38 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 06:40 perlBird left 06:42 mcmillhj left 06:57 mcmillhj joined 06:58 p6bannerbot sets mode: +v mcmillhj 06:59 rindolf joined 07:00 p6bannerbot sets mode: +v rindolf 07:02 mcmillhj left 07:29 mcmillhj joined 07:30 p6bannerbot sets mode: +v mcmillhj 07:34 mcmillhj left, scimon joined 07:35 p6bannerbot sets mode: +v scimon 07:36 lizmat joined, p6bannerbot sets mode: +v lizmat 07:57 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 08:01 mcmillhj left, psychoslave joined 08:02 p6bannerbot sets mode: +v psychoslave 08:07 Ven` joined 08:08 p6bannerbot sets mode: +v Ven` 08:15 zakharyas joined, p6bannerbot sets mode: +v zakharyas 08:23 dakkar joined 08:24 mcmillhj joined, p6bannerbot sets mode: +v dakkar, p6bannerbot sets mode: +v mcmillhj 08:28 mcmillhj left 08:29 psychoslave left
Geth doc: d9a3ec23d8 | (Elizabeth Mattijsen)++ | doc/Language/pragmas.pod6
Document use isms / use isms <C++>
08:34
synopsebot Link: doc.perl6.org/language/pragmas
08:38 dakkar_ joined 08:39 p6bannerbot sets mode: +v dakkar_, mcmillhj joined 08:40 p6bannerbot sets mode: +v mcmillhj, jdrab joined 08:41 p6bannerbot sets mode: +v jdrab, dakkar left 08:43 mcmillhj left 08:53 dakkar_ left 08:54 dakkar joined 08:55 p6bannerbot sets mode: +v dakkar 08:58 psychoslave joined 08:59 p6bannerbot sets mode: +v psychoslave 09:01 mcmillhj joined 09:02 p6bannerbot sets mode: +v mcmillhj 09:03 ufobat joined, p6bannerbot sets mode: +v ufobat 09:06 mcmillhj left, psychoslave left 09:13 mcmillhj joined 09:14 p6bannerbot sets mode: +v mcmillhj 09:16 psychoslave joined 09:17 p6bannerbot sets mode: +v psychoslave, mcmillhj left 09:42 mcmillhj joined 09:43 p6bannerbot sets mode: +v mcmillhj 09:47 mcmillhj left 10:02 mcmillhj joined 10:03 p6bannerbot sets mode: +v mcmillhj 10:04 pmurias joined, ZzZombo left, p6bannerbot sets mode: +v pmurias 10:07 mcmillhj left 10:12 domidumont left 10:33 mcmillhj joined 10:34 p6bannerbot sets mode: +v mcmillhj
Geth doc: df4f027a6b | (JJ Merelo)++ | 2 files
Eliminates uneeded asides in the explanation of contains.

This, please, closes #2303.
Also some reflow and adds some examples to the basic Cool version of `contains`.
10:34
10:38 mcmillhj left 10:42 pmurias_ joined 10:43 p6bannerbot sets mode: +v pmurias_ 10:45 pmurias left 11:01 robertle left 11:04 zakharyas left 11:05 zakharyas joined 11:06 p6bannerbot sets mode: +v zakharyas 11:08 Ven` left 11:11 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 11:12 mcmillhj joined 11:13 p6bannerbot sets mode: +v mcmillhj 11:17 mcmillhj left 11:22 lizmat left 11:23 lizmat joined 11:24 kensanata left, p6bannerbot sets mode: +v lizmat, Ven` joined 11:25 p6bannerbot sets mode: +v Ven` 11:33 chenyf_ left 11:34 leont joined 11:35 p6bannerbot sets mode: +v leont 11:36 psychoslave left 11:39 zakharyas left
ZzZombo I've been watching the "no isms" commits today, and while they are on the right track, I don't agree with those silly restrictions where valid AND harmless syntax is forbidden out of fear that somebody somewhere manages to shoot himself or something. 11:41
The `new Foo` thing specifically is so stupid, I don't even. I'd actually expect there to be a `sub` version of the `new` method to do `Foo.new`, in line in all others sub versions of methods. 11:43
timotimo i disagree. "new" is only a convention in perl6 11:46
ZzZombo But then again, restricting that lies in line with forcing a specific way of working with class (composition over inheritance, private-public only access levels, etc), in contrary with the supposed freedom of choosing your way of things, i. e. typed vs untyped variables. 11:48
Disagree with what? `new Foo` is a valid syntax? 11:49
It may be just a convention, but doesn't justify forbidding it as a whole.
timotimo you can already write "new Foo:" 11:50
no need for a sub
and this syntax works with every method, rather than just with "new"
11:54 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj
pmurias_ timotimo: why do we need a hard ban on new Foo instead of just having a custom error message if a &new sub is not is scop 11:55
* scope
11:56 pmurias_ is now known as pmurias, psychoslave joined 11:57 p6bannerbot sets mode: +v psychoslave 11:58 mcmillhj left
lizmat pmurias: the answer to that question is hidden in the mist of time 11:59
El_Che so poetic? 12:02
"new Foo" was hard to parse correctly I thought 12:03
12:07 mcmillhj joined 12:08 p6bannerbot sets mode: +v mcmillhj
pmurias I can imagine just banning a "new Foo" without checking if it might work was easier 12:10
12:12 mcmillhj left 12:15 Kaiepi joined 12:16 chenyf_ joined, Zoffix joined, p6bannerbot sets mode: +v Zoffix, p6bannerbot sets mode: +v Kaiepi 12:17 p6bannerbot sets mode: +v chenyf_
Zoffix ZzZombo: there's a ticket you can comment on regarding these silly restrictions: github.com/rakudo/rakudo/issues/1356 12:18
12:19 Zoffix left 12:26 mcmillhj joined 12:27 sena_kun joined, p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v sena_kun
Geth ecosystem: pheix++ created pull request #410:
Add Router::Right to ecosystem
12:28
12:28 mcmillhj left
timotimo pmurias: i'd prefer just a custom error, too. 12:30
12:34 cog left
Geth ecosystem: 5b2c9bb62b | (Konstantin Narkhov)++ | META.list
Add Router::Right to ecosystem

See gitlab.com/pheix/router-right-perl6
  🦋🦋🦋
12:39
ecosystem: a246560228 | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #410 from pheix/master

Add Router::Right to ecosystem
El_Che Zoffix: interesting discussion about the errors 12:41
12:46 cog joined, p6bannerbot sets mode: +v cog 12:47 pmurias left 12:49 mcmillhj joined, mcmillhj left 12:54 mcmillhj joined, mcmillhj left 12:59 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 13:00 zakharyas joined 13:01 p6bannerbot sets mode: +v zakharyas 13:02 cog left 13:03 domidumont joined, cog joined, p6bannerbot sets mode: +v domidumont, p6bannerbot sets mode: +v cog 13:05 zakharyas left, zakharyas joined 13:06 p6bannerbot sets mode: +v zakharyas 13:08 leont left 13:11 cog left 13:14 domidumont left 13:16 yqt joined 13:17 p6bannerbot sets mode: +v yqt 13:21 mahafyi joined, p6bannerbot sets mode: +v mahafyi 13:23 robertle joined 13:24 p6bannerbot sets mode: +v robertle
AlexDaniel well, I specifically made that ticket to cover a very narrow scope (variables only) 13:30
but people want to discuss the whole thing so much :)
13:31 mscha joined, p6bannerbot sets mode: +v mscha
AlexDaniel also, many 5to6 and 4to6 error messages for variables are now gone 13:31
since May
mscha m: for ^3 { for ^3 { once { say 'foo' } } }
camelia foo
foo
foo
AlexDaniel mscha: that's correct 13:32
mscha “A block prefix with once will be executed exactly once, even if placed inside a loop or a recursive routine.”
AlexDaniel huh… now that's wrong
I mean, the description
mscha: a proper-er description is here: docs.perl6.org/language/traps#Usin...once_block
mscha I figured. Either the doc or the functionality must be wrong. ;-) 13:33
AlexDaniel and then the doc goes to say “This works per "clone" of the containing code object, so:” 13:34
mscha But in my example there aren't any clones of code objects, no? 13:36
AlexDaniel but are there any “clones” :P 13:37
IMO `once` is pretty confusing, and having no clear description in the docs is not cool 13:38
that traps section is actually alright, but too long 13:39
lizmat "once" has changed its name already a few times
FWIW, I believe it follows the same logic as state variables wrt scoping 13:40
AlexDaniel yes
lizmat: what were its names?
lizmat as it internally uses a state variable to keep state :-)
I guess a bisect on "once 42" should tell you when it changed 13:41
AlexDaniel bisect: old=2014.01 once say 42 13:42
bisectable6 AlexDaniel, On both starting points (old=2014.01 new=5a9105a) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: «42␤»
AlexDaniel lizmat: 2014.01 is the first rakudo on moar, unfortunately :)
pretty sure there's a ticket somewhere asking to add parrot builds to whateverable 13:43
but IIRC even 2014.01 is not buildable with the latest perl5… and the only reason I have those is because at the time the server had a slightly older version 13:45
mscha m: sub foo { once say 'a'; for ^3 { once say 'b' }; once say 'c'; }; foo for ^3; # confusing 13:46
camelia a
b
c
b
b
scimon So a while ago (just before LPW 2017) I wrote a script that would spider through a directory and look in each file within it for matching strings. (Recursively grepping). At the time it was slower than just running find and egrep. Ran it today in my company dojo where we were discussing Channels and Supplies and it's now faster on my laptop than the find / grep method. 13:48
I should probably blog that.
AlexDaniel BLOG IT!!!
:)
scimon: are you sure that it's correct though? 13:49
because I'm really surprised
mscha: so b is once per sub and a/b are once per mainline I guess? 13:51
a/c** 13:52
timotimo "once" has the same semantics as "state", i believe
so when a block gets a closure taken, it'll get its own state, and when the closure gets invoked multiple times it'll have the same state
so when you enter foo, the inner loop gets its closure taken and executed three times 13:53
and when the mainline is entered, the "once say 'a'" gets its closure taken
so that gets executed once in total
scimon So the script fires up 5 promises one does spidering passing IO objects into a channel.
timotimo scimon: it may not be easy, but can you find out if it's actually giving the same results and performing about the same work? 13:54
scimon So I've got a folder with 100 subfolders. Each has 100 files. Each has 500 lines each is a 100 character random string. 13:55
AlexDaniel also, ssd or hdd? First run or not?
scimon ssd 13:56
Not first run/
I have a script called lof which has this in it "find . -type f -exec egrep "$1" {} /dev/null \;"
timotimo why wouldn't you use the recursive flag for egrep? 13:57
oh, $1?
scimon On my box that's taking 8 seconds. real0m7.366s, user0m4.287s, sys0m2.497s
timotimo so it'd search for the file name inside the file?
scimon So I can do lof 1234567890
timotimo ah, no, $1 is what you pass to lof
scimon (Turns out 1 of my random strings has that in it)
The perl6 version times : real0m2.486s, user0m7.252s, sys0m0.370s 13:58
13:58 mscha left
timotimo 4 cores? 13:59
AlexDaniel so 3x as fast…
scimon 4 cores and 4 promises doing the grepping.
1 promise spiders through the folder and feeds into a channel then closes it and stops.
I was a bit shocked when it worked out faster. 14:00
AlexDaniel well… I still don't believe it :D
timotimo it doesn't have to exec processes over and over
scimon (It was a bit slower when I was demoing it but I was doing a hangout stream) 14:01
timotimo you can see that the egrep version has 2.5 seconds of system time
i.e. time spent doing system calls and such
AlexDaniel then, what about using xargs to batch files?
and maybe parallelize as well
timotimo so the execing and folder reading and all that is taking as long as the perl6 version takes in total (when on 4 cores) 14:02
scimon These' might be cool and if people can tell me how. lof is something I made ages ago and use a lot because I know it.
14:04 zakharyas left
scimon Ok so using grep -drecurse gives these times : real0m2.183s, user0m0.591s, sys0m0.292s 14:04
14:04 zakharyas joined
timotimo that's not that much faster than perl6, though of course it only uses one core 14:04
scimon Still that's not a bad comparison.
14:05 p6bannerbot sets mode: +v zakharyas
timotimo but grep can use regex and you're probably using .contains? ;) 14:05
scimon I am. Oh boy am I.
But I think it's still pretty good. And the code to write it is pretty simple. 14:06
AlexDaniel scimon: find . -type f -print0 | xargs -0 -n5 echo
14:06 yqt left, aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh
AlexDaniel scimon: something like that. It echo's 5 files per run 14:06
scimon: and then also add -P4 14:07
14:07 p6bannerbot sets mode: +v aborazmeh
AlexDaniel so that it does at least 4 processes at a time 14:07
perhaps you can increase it to 5 to improve the result a bit more
scimon Yeah. That's faster.
real0m0.807s user0m0.970s sys0m0.409s 14:08
AlexDaniel ok that makes more sense
so now in parallel?
timotimo huh, how come the user + sys isn't that much more than real?
scimon I have no idea. I'm just writing numbers. 14:09
Anyway. I'm pretty sure it's a lot faster than this time last year :)
timotimo :)
AlexDaniel by the way I love xargs
timotimo gnu parallel is also nice 14:10
AlexDaniel the name doesn't sound like it can solve problems like this, but it works so well
scimon Also it's a good framework for more extendable stuff.
14:13 mcmillhj left 14:19 kerframil joined, p6bannerbot sets mode: +v kerframil 14:24 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 14:26 aborazmeh left 14:28 itaipu joined 14:29 mcmillhj left, p6bannerbot sets mode: +v itaipu 14:35 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 14:38 avar left, avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar 14:39 p6bannerbot sets mode: +v avar 14:40 mcmillhj left 14:42 mcmillhj joined 14:43 p6bannerbot sets mode: +v mcmillhj 14:45 cog joined 14:46 p6bannerbot sets mode: +v cog 15:03 zakharyas left 15:09 lizmat left 15:15 zakharyas joined, p6bannerbot sets mode: +v zakharyas 15:21 robertle left 15:30 psychoslave left, leont joined 15:31 p6bannerbot sets mode: +v leont 15:32 Ven` left 15:34 mcmillhj left 15:46 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 15:49 ofperfection joined, p6bannerbot sets mode: +v ofperfection
ofperfection Hey guys, I have a question on regexs that I wasn't able to find in the docs, which typically implies that I'm doing something completely wrong 15:50
15:50 mcmillhj left
ofperfection specifically, I'm wondering if you can implement a range in a regex pattern 15:50
i.e.: my $regex-name = /{1..@arr.elems}/ 15:51
timotimo what exactly do you want the range to match?
m: my $rex = /^ <{ 9..30 }> $/; say "5" ~~ $rex; say "19" ~~ $rex; 15:52
camelia Nil
「19」
ofperfection I have a simple to do list application
timotimo interpolating an array (or positional things in general, which ranges also are) will act like a longest-token-matching alternation (single vertical bar, |) of the individual array elements 15:53
15:53 mcmillhj joined
ofperfection I'm going to google the things you just said 15:53
15:53 p6bannerbot sets mode: +v mcmillhj 15:54 scimon left, ribasushi joined 15:55 p6bannerbot sets mode: +v ribasushi
ofperfection pastebin.com/546ABFb7 15:55
basically as written
I'm just trying to match the '1' in the "1 modify" string
I realize I'm not doing the regexs correctly 15:56
I think what you said answers it
I appreciate the help
timotimo no problem :) 15:57
sena_kun ofperfection, I think what you want can be done without regexes. You want to 1)in this exact case("1 modify") just split the string by space(s); 2)get first piece and convert it to integer. But regexes can help you validate input that user gives you. 15:58
so it's like
m:say "1 modify" ~~ /\d+ ' ' \w+/ 15:59
evalable6 「1 modify」
sena_kun m: say "bad input modify" ~~ /\d+ ' ' \w+/
camelia Nil
sena_kun and then
m: say "1 modify".split(' ').first.Int
camelia 1
sena_kun m: say "1 modify".split(' ')[0].Int # if you want
camelia 1
timotimo i tend to recommend .words over .split(" ") 16:00
sena_kun timotimo++
that's nice too.
also, maybe...
m: say "1 modify" ~~ /\d+ ' ' ['modify'|'add']/ 16:01
camelia 「1 modify」
ofperfection My aim was to validate the item number selection with the dynamic regex range, which I could also do after by checking the respective .Int that you recommended I suppose
I really appreciate you guys helping me out 16:02
I'm bouncing around between a couple perl6 books
and I'm not always able to find examples of what I'm doing wrong exactly
timotimo no problem :) 16:03
El_Che ofperfection: considere #perl6 an enhanced REPL 16:04
16:11 vike1 left 16:14 molaf joined 16:15 p6bannerbot sets mode: +v molaf 16:16 ggoebel_ left 16:23 vike1 joined 16:24 p6bannerbot sets mode: +v vike1 16:31 ggoebel_ joined 16:32 p6bannerbot sets mode: +v ggoebel_ 16:39 ofperfection left, ofperfection[m] joined, p6bannerbot sets mode: +v ofperfection[m] 16:45 domidumont joined 16:46 p6bannerbot sets mode: +v domidumont 16:47 robertle joined 16:48 p6bannerbot sets mode: +v robertle, dakkar left 16:49 kerframil left 16:52 chenyf_ left 17:05 Celelibi joined, kerframil joined, p6bannerbot sets mode: +v kerframil, p6bannerbot sets mode: +v Celelibi 17:07 roguelazer joined, robertle left, robertle joined, p6bannerbot sets mode: +v roguelazer 17:08 p6bannerbot sets mode: +v robertle 17:20 regreg left, regreg joined, regreg left 17:25 graphene left 17:27 graphene joined 17:28 p6bannerbot sets mode: +v graphene 17:29 rfold joined, graphene left, p6bannerbot sets mode: +v rfold 17:31 graphene joined 17:32 p6bannerbot sets mode: +v graphene 17:33 jroth left
Geth doc: 5f6c115baa | (JJ Merelo)++ | doc/Type/Lock.pod6
Adds to the explanation of lock/unlock

Copying verbatim @jnthn words. Closes #1626.
17:49
synopsebot Link: doc.perl6.org/type/Lock
17:52 leont left 17:57 zakharyas left
Geth doc: 64a0082ec7 | (Will "Coke" Coleda)++ | doc/Type/Lock.pod6
remove extraneous comma
17:58
synopsebot Link: doc.perl6.org/type/Lock
17:59 sotona joined, p6bannerbot sets mode: +v sotona 18:00 lizmat joined 18:01 p6bannerbot sets mode: +v lizmat 18:13 Celelibi left
lizmat weekly: opensource.com/article/18/9/signatures-perl-6 18:17
notable6 lizmat, Noted!
18:22 Celelibi joined, p6bannerbot sets mode: +v Celelibi 18:28 sauvin left 18:46 pecastro joined, graphene left 18:47 p6bannerbot sets mode: +v pecastro 18:48 graphene joined 18:49 p6bannerbot sets mode: +v graphene 18:50 Kaiepi left 18:51 Khisanth left
robertle I got some weird stuff with a concurrent I/O benchmark: it sometimes works, sometimes moarvm segfaults, sometimes I get unhandled exceptions from within rakudo core code (threadpoolscheduler,lock,atomicops). not sure whether to report against moar, rakudo, or both, or neither 18:53
timotimo are you sure you're using objects safely? 18:54
i.e. not causing hashes or arrays to resize from one thread while another is trying to use it
robertle no, not sure. let me look at it again
AlexDaniel robertle: sorry, what's the situation with 2018.08 in debian? You're skipping it completely because of github.com/MoarVM/MoarVM/issues/951 or is there something else going on? 18:57
18:57 marcusramberg joined, hitchcock.freenode.net sets mode: +v marcusramberg, p6bannerbot sets mode: +v marcusramberg
robertle AlexDaniel: I was mostly thinking about 951, yes. but then again that bug isn't going to solve itself, so perhaps giving a spin in the debian porter box might shed some extra light on it 18:58
but I am also totally short on time :)
AlexDaniel that's what I was hoping for, yes :)
robertle do we have anything on that bug yet?
timotimo: I do not think that I resize anything from different threads, but I guess that could easily be overlooked. I don't have much shared state between these threads though... 19:00
AlexDaniel it was fine on 2018.06 and it's not ok on 2018.08, and according to the ticket you can get good/bad state by just trying to build rakudo 19:01
so that makes it bisectable, but very often that's not very helpful
robertle timotimo: I also get the same behavior if I do RAKUDO_MAX_THREADS=1, which takes most of the code out of the running-concurrently game (I think)
AlexDaniel robertle: can we see your code? 19:02
robertle AlexDaniel: also bisecting rakudo builds on armhf is a tedious game :)
19:02 domidumont left
timotimo can i get the code? :) 19:03
robertle AlexDaniel: sure! it's not very nice though. backtraces and so on in gist.github.com/robertlemmen/5691c...85f463c986 code is at github.com/robertlemmen/p6bench/bl...03-backend
19:03 chenyf_ joined
AlexDaniel robertle: why is it? I understand it can be slow, but if you can build rakudo once then surely you can do it 9 extra times, no? 19:04
robertle AlexDaniel: totally! it's just less fun to do than on say s390x :)
19:04 Khisanth joined, p6bannerbot sets mode: +v chenyf_
timotimo so much code :S 19:04
19:05 p6bannerbot sets mode: +v Khisanth
robertle hey it's pretty much most of http client and server impl... 19:05
AlexDaniel that's not much, especially given that it uses almost no modules 19:06
timotimo OK, OK :)
robertle the aim is to have it not use any modules 19:07
timotimo using IO::Socket::Async will give you at least the event loop thread, but also the thread pool scheduler to handle tasks
check RAKUDO_SCHEDULER_DEBUG=yes or something like that
19:08 chenyf_ left
robertle right, I get the problem even with RAKUDO_MAX_THREADS=1 so I was guessing it would not be between "my" main threads. I/O thread vs mine could happen of course, but I guess the libuv thread never modifies any structures I can see/use? 19:09
there is also a section with explicit threads towards the bottom (the clients), but they have even less shared state 19:10
timotimo it still uses worker threads to handle stuff from the libuv event loop thread 19:11
i see your Client is using tap instead of act
robertle I thought these worker trheads would be what is limited by RAKUDO_MAX_THREADS, am I wrong there? 19:12
timotimo i believe it'll add more if it detects that things are deadlocked
as i said, RAKUDO_SCHEDULER_DEBUG
that ought to give clarity
robertle not much: first run I get "Created initial general worker thread" then one "Added a general worker thread", then my segfault 19:16
second run I get two "Added a general worker thread" and then the unhandled rakudo core exception
timotimo OK
robertle when I run with that and RAKUDO_MAX_THREADS I never get the "added", but still the bug 19:17
timotimo gdb is telling me it's creating craptonnes of threads actually
robertle I believe these are not the worker threads, but the ones towards the bottom of teh code, created by Thread.start explicitly
timotimo oh, obviously 19:18
you're right
robertle but I do not see where they share anything
I want to replace them with tasks on the thread pool as well at some point 19:19
timotimo i'm still distracted doing tpf grant work, so not looking closely enough to help terribly much
robertle tpf grant for the win! 19:20
timotimo :) 19:21
robertle but if I convince myself that I am not sharing structures between my threads, what would be the next thing to look at? 19:24
AlexDaniel maybe you can try golfing it 19:32
robertle I was worried you would say that...
19:34 zakharyas joined, p6bannerbot sets mode: +v zakharyas
masak .oO( don't worry - be golfy ) 19:41
AlexDaniel robertle: it doesn't have to be problematic, perhaps try replacing some parts with static input 19:42
or, if it's client/server, maybe separating these into two files?
timotimo that's not a bad idea at all 19:43
then the crash is contained to one or the otheŕ
19:43 molaf left
robertle that is a fab idea, I can easily separate them by client/server 19:45
AlexDaniel timotimo: a pessimist in me says that it will stop segfaulting 19:46
timotimo ehhh 19:48
19:56 lex_ joined 19:57 p6bannerbot sets mode: +v lex_
lex_ I am not sure why the *% ',' captures the number with decemal between. I think this is the look back issue and I think i need some kind of word bound. I tried them and they failed. say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+]*% ',' / ; 19:58
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+]*% ',' / ; 20:00
camelia (「4,294,967,295」 「」 「00」 「」 「4,294,967」 「」 「123」 「」 「334」 「」 「523」 「」 「」 「」 「」 「」)
20:00 sena_kun left
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+]+% ',' / ; 20:00
camelia (「4,294,967,295」 「00」 「4,294,967」 「123」 「334」 「523」)
AlexDaniel lex_: is this expected output? ↑ If not, what would be the right one? 20:01
lex_ My expected output is 4,294,967,295 and 4,294,967. 20:02
20:03 Kaiepi joined
TimToady maybe you want +% instead 20:04
20:04 p6bannerbot sets mode: +v Kaiepi
TimToady wait, that won't work either 20:04
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+]+% "," )> ["."\d+]? / ;
camelia (「4,294,967,295」 「4,294,967」 「123」 「523」)
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+] % "," )> ["."\d+]? / ;
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing quantifier on the left argument of %
at <tmp>:1
------> 0367 123.334.523 :: " ~~ m:global/ [\d+] %7⏏5 "," )> ["."\d+]? / ;
TimToady m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+] ** 2..* % "," )> ["."\d+]? / ;
camelia (「4,294,967,295」 「4,294,967」)
TimToady to require at least one comma, if that's the intent
lex_ TimToady : This 2..* means at least two numbers one on each side of a comma such as 4,2. 20:16
20:19 lex__ joined, lex__ is now known as lindylex, p6bannerbot sets mode: +v lindylex
lindylex TimToady this I tried this and it seems to work. say "4,294,967,295.00 4,294,967 123.334.523 4,2 :: " ~~ m:global/ [\d+] ** 2..* % "," / ; 20:21
20:21 lex_ left
lindylex TimTaody : why this part )> ["."\d+]? 20:21
AlexDaniel lindylex: oh that was mine, ignore it 20:22
lindylex Thanks AlexDaniel 20:23
AlexDaniel although, now I see that it is in TimToady's solution as well, hmm
m: say "4,294,967,295.00 4,294,967 123.334.523 :: " ~~ m:global/ [\d+] ** 2..* % "," / 20:24
camelia (「4,294,967,295」 「4,294,967」)
AlexDaniel I guess you don't need it, yeah
20:25 sotona left
lindylex AlexDaniel : correct this works say "Letters here 4,294,967,295.00 4,294,967 123.334.523 4,2 Words around :: " ~~ m:global/ [\d+] ** 2..* % "," / ; 20:27
vrurg Does anybody know if DBIish Oracle driver is thread-safe? 20:28
AlexDaniel lindylex: does it have to be a regex?
lindylex I am noticing that lots of Perl6 book and online resources are giving bad information on regex. This is infuriating.
timotimo vrurg: i don't think any of the DBIish drivers are thread safe
it's probably the exact same as the C library underneath
i'd expect you'll have to have multiple handles so you'll only use each from at most one thread 20:29
lindylex AlexDaniel : I am attempting to gain proficiency in regex. This is why I am studying the topic.
vrurg timotimo: I saw DBI::Async in the modules. It claims to support postgress only though.
AlexDaniel m: "4,294,967,295.00 4,294,967 123.334.523 :: ".words
camelia ( no output )
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: ".words
camelia (4,294,967,295.00 4,294,967 123.334.523 ::)
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: ".words.grep(/[\d+]+ % ','/)
camelia (4,294,967,295.00 4,294,967 123.334.523)
timotimo there's also a PG-only module
eco: PostgreSQL
buggable timotimo, Found 2 results: DB::Pg, Pg::Notify. See modules.perl6.org/s/PostgreSQL
vrurg timotimo: Actually, this is what I'm doing. New dbh/sth per thread. It SIGSEGVs somewhere in Oracle instant client libs. 20:30
AlexDaniel m: say "4,294,967,295.00 4,294,967 123.334.523 :: ".words.map({/^[\d+]+ % ','/ ?? ~$/ !! Empty})
camelia (4,294,967,295 4,294,967 123)
lindylex AlexDaniel : this is what I get as output >> (「4,294,967,295」 「4,294,967」 「4,2」)
timotimo perhaps you're writing something like %handles<$*THREAD.id> and not realizing that won't interpolate and you're sharing one handle for all threads
vrurg The biggest mistery to me is that it dies later, when all thread workers are done and I create a new dbh in the main thread. And – now, it's clearly new .connect per Thread.start 20:32
timotimo oh, you're actually using Thread, interesting
vrurg Yep. A Channel and a receiver per thread which actually does INSERT. Just playing with what I can get out of asynchonosity. 20:34
timotimo: Ok, thanks a lot! It's not something critical for my task. Just exploring. 20:35
20:37 sotona joined 20:38 p6bannerbot sets mode: +v sotona 20:41 zakharyas left 20:43 sotona left
lindylex My output should be aa instead I get aa and b. say "aab :: " ~~ m:global/ a+ || \w+ / ; 20:48
20:50 Kaypie joined
timotimo the global adverb means it'll continue trying to match after it got "aa" 20:51
then b matches against \w+
lindylex Thanks I get it now.
20:51 p6bannerbot sets mode: +v Kaypie
timotimo NP 20:51
20:54 graphene left 20:56 graphene joined, p6bannerbot sets mode: +v graphene 21:05 kerframil left 21:14 mcmillhj left 21:16 sotona joined, p6bannerbot sets mode: +v sotona 21:20 sotona left 21:21 spycrab0 joined, p6bannerbot sets mode: +v spycrab0 21:24 lindylex left
Kaypie why does this throw "Cannot find method 'compile_time_value' on object of type QAST::Op" when i try to load the module? pastebin.com/4apUQrhs 21:29
timotimo whoops! that's a good find 21:31
lizmat Kaypie: didn't you mean "uri => ..." instead of "uri -> ... " ?
timotimo i think normally we have to first .has_compile_time_value or nqp::can to check first
maybe some new code in the optimizer isn't careful enough
Kaypie ohh lol 21:32
lizmat or it is simply an LTA error ?
timotimo turn off the optimizer and see if it still crashes, i'd say
--optimize=0 or --optimize=off
(they are different)
lizmat hello 21:33
AlexDaniel hm, so zef will automatically install all scripts from bin/, right?
lizmat "uri -> string" feels wrong to me
AlexDaniel any way to prevent that? (besides renaming the directory)
21:47 rfold left 21:52 sotona joined 21:53 p6bannerbot sets mode: +v sotona 21:54 itaipu left 22:03 hamhu3 joined 22:04 p6bannerbot sets mode: +v hamhu3
Kaypie uri -> string was the issue 22:12
thanks
22:12 Kaypie left
Kaiepi why did i have the same server open twice 22:12
22:25 sotona left 22:31 mahafyi left 22:41 sno left 22:42 mcmillhj joined 22:43 p6bannerbot sets mode: +v mcmillhj, graphene left 22:44 sno joined 22:45 graphene joined, p6bannerbot sets mode: +v sno, p6bannerbot sets mode: +v graphene 22:47 mcmillhj left 22:49 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 22:53 sno left 22:54 mcmillhj left 22:58 sno joined, p6bannerbot sets mode: +v sno 23:07 sotona joined 23:08 p6bannerbot sets mode: +v sotona 23:09 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 23:11 rindolf left 23:12 sotona left 23:13 Voldenet left, mcmillhj left 23:15 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet 23:16 p6bannerbot sets mode: +v Voldenet 23:24 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 23:31 pecastro left, spycrab0 left 23:43 mcmillhj joined 23:44 p6bannerbot sets mode: +v mcmillhj 23:47 mcmillhj left