»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:00 Brilpikk3wyn left 00:02 nepugia left 00:09 aborazmeh joined, aborazmeh left, aborazmeh joined 00:30 MilkmanDan left 00:32 MilkmanDan joined
lucs Asking any of you folks using Template::Mojo: do you use the extension '.ep6' for your template files? (mimicking the suggested '.ep' extension for Perl 5's Mojo::Template -- why '.ep', I dunno, eh) 00:44
timotimo emazing 00:45
Type check failed in binding to parameter '$blob'; expected Blob but got Failure (&CORE::infix:<orelse>...) 00:49
o_O
00:53 goon_ joined 01:18 aborazmeh left 01:21 noisegul_ joined 01:25 noisegul left 01:55 aborazmeh joined, aborazmeh left, aborazmeh joined 02:07 smash left 02:23 [Coke] joined
[Coke] FYI: news.perlfoundation.org/2019/07/gra...votes.html 02:23
02:23 [Coke] left 02:30 reach_satori_ joined, Cabanossi left 02:32 satori__ left 02:37 jaldhar joined 02:43 Cabanossi joined 02:58 aborazmeh left 03:18 kaare__ joined, kaare_ left 04:04 Brilpikk3wyn joined 04:05 Brilpikk3wyn left 04:26 aborazmeh joined, aborazmeh left, aborazmeh joined 04:56 aborazmeh left 05:33 jmerelo joined
jmerelo releasable6: status 05:33
releasable6 jmerelo, Next release will happen when it's ready. R6 is down. At least 1 blocker. 286 out of 667 commits logged (⚠ 1 warnings)
jmerelo, Details: gist.github.com/da29dbdb9ffd04d81f...f614a74433
05:50 nadim joined 05:51 sauvin joined 06:08 mniip left 06:09 mniip joined
Geth doc: 28e627ddee | (JJ Merelo)++ | doc/Language/typesystem.pod6
Fixes formatting problems
06:17
synopsebot Link: doc.perl6.org/language/typesystem
06:26 nadim left
jmerelo OK, survey is over with 202 answers. 06:37
The PDF has been hanged in a "release" github.com/perl6/p6survey/releases.../v2019.06. There's a link to the result spreadsheet here github.com/perl6/p6survey 06:44
I'll process it a bit more and post results; also comparison to last year.
06:52 nadim joined, mowcat joined 07:02 antoniog1miz joined, noisegul_ is now known as noisegul 07:03 patrickb joined 07:07 sno left
woolfy jmerelo++ 07:15
antoniog1miz jmerelo: first link is broken 07:16
woolfy antoniog1miz : it's working fine for me... 07:21
(maybe your browser takes the . at the end as part of the url) 07:22
07:22 domidumont joined, kensanata joined
antoniog1miz woolfy: oh you're right. Thanks :) 07:26
07:32 mowcat left
jmerelo woolfy: that's correct. Thanks, woolfy 07:36
07:38 dakkar joined
antoniog1miz what do you think #XXX comment means? 07:40
mst anything from "need to remember to look at this bit again" to "oh gods the spiders the spiders the spiders are coming for me" 07:41
depending on the author
antoniog1miz oh haahahah
mst I usually do '# XXX some context goes here cos I'll forget'
antoniog1miz I think the first one fits
ty :)
07:59 domidumont left 08:01 dominix joined
dominix hi everyone, I would like to know if there is debian aware dev here-around 08:02
the goal is to have information on the question I ask to myself "is there a perl6 team in debian" 08:03
like there is a perl5 team the manage modules packages across distributions 08:04
08:10 Manifest0 left 08:16 domidumont joined 08:18 reach_satori_ left 08:19 Manifest0 joined 08:24 irced joined
irced yo when I pipe and slurp $*IN i lose the ability to interact i.e. prompt does not wait for input, what gives? (e.g. cat output.txt | my-interactive.pl6) 08:25
patrickb dominix: You did the current debian packages, right?
I think currently there are the heroes who took the task upon them to create and publish the debian packages, but there is no official group that I know of. 08:26
dominix ok
patrickb Robert Lemmen and Dominique Dumont (is that you?) are the two people I know of that did things with debian packaging. 08:27
08:27 guifa left
dominix so the perl6 packages are handled by the perl team whichever it is 5 or 6 08:27
08:28 ravenousmoose joined
antoniog1miz how can I set the path to a default file in a module? I mean: 08:28
dominix I know dominique dumont from the french perlmongueur but that not me
antoniog1miz I have a module that needs a file, and sometimes that files is not passed so the default is taken
patrickb dominix: I guess by whoever picks up the torch and does the work.
domidumont: Maybe you know more details. ^ 08:29
antoniog1miz that default file is located at resources dir, and the code using it is at lib dir
irced so no one else has experienced this? 08:30
08:32 eponym joined, eponym left 08:33 domidumont left
tadzik irced: I guess slurp() maybe closes $*IN at the end? 08:36
hard to say what your my-interactive.pl6 does :)
irced tadzik: that's a thought. it calls prompt after slurping $*IN. 08:37
08:37 sena_kun joined
irced any other way to effectively slurp piped input? 08:41
tadzik well, the question is "slurp until when"? 08:45
if you need $*IN later then the answer is clearly not "until the end"
08:46 domidumont joined
irced ok. I can reframe the question to any ideas on how to capture piped input and then make the script interactive. e.g. piping to more does this. 08:46
tadzik ha 08:48
irced ok bad exampe 08:49
tadzik I think more's interactivity comes from ncurses or equivalent, not from stdin
irced i suspect anyway that piped input eventually terminates with EOF 08:51
but this I would need to investigate
after all, the shell can know when it has finished piping 08:52
and it could inform the receiving program some way
unless of course the shell leaves the pipe open, but i do not imagine that is the default
i am using BASH
08:58 Manifest0 left
irced $*IN.so says False before reading True after. 08:59
that is before slurping
$*IN.eof.so
09:00 jasonc joined
irced now the question is as you referred to is it closed 09:01
$*IN.opened.so shows False before reading and True after reading. docs say that when a standard filehandle (native descriptor 2 or lower) once closed cannot be reopened 09:03
anyway, it hasn't been closed, i have confirmed it. and also the pipe ends with an eof.
09:04 rindolf joined, Manifest0 joined
irced but good thinking anyway tadzik 09:04
09:05 reach_satori_ joined
irced on the side, i also tried getting input after looping on its lines instead of slurping, in case slurp was affecting the filehandle, and the result was the same. 09:05
timotimo irced: you should be able to open /dev/pty or /dev/tty or something and use that for input
irced scratches his chin.
timotimo: thanks I will look at that next! 09:06
timotimo there's this tool "vipe" that slurps its input then gives you a vim with the data and when you exit it spits the data out on stdout; i believe it opens stderr as a tty, i.e. "this is supposed to be an output file descriptor, but in practice it's usually bound to the tty, which is input/output, so fingers crossed!"
tadzik hehe, good digging :) 09:07
irced but first I am wondering if it is because it may have opened in binary mode... 09:08
timotimo jmerelo: i'm not entirely sure we should just openly display everybody's answers like that? like, the exact form data? at least making the order of answers not the same for every question?
tadzik maybe it's possible to convince perl6 to not close the input after it sees the EOF 09:09
and kind of establish a protocol where there could be multiple EOFs
irced tadzik: it shows it is and remains open after slurping.
tadzik oh, hm
then it should be quite readable imo
perhaps perl6 just soft-closes it when it sees an EOF for the first time 09:10
as in, refuses to keep readingj
09:11 dominix left
antoniog1miz any help is highly appreciated => stackoverflow.com/questions/568490...e-a-module 09:13
irced timotimo: your suggestion is working. thanks!
timotimo jmerelo: like, i don't think it said anywhere that the answers you give would be visible to the public like that? 09:16
09:17 kensanata left
irced my $io = '/dev/tty'.IO.open; # then $prompt.getc or i guess whatever your fancy 09:17
err, $io.getc but you get the picture. 09:18
timotimo yeah
09:19 irced left, domidumont left
antoniog1miz patrickb: thanks for your help! 09:39
patrickb yw 09:41
09:45 zakharyas joined 09:50 Manifest0 left 09:51 kensanata joined 09:56 Manifest0 joined 10:12 Manifest0 left 10:18 Manifest0 joined 10:26 ravenousmoose left 10:29 nepugia joined 10:35 antoniog2miz joined
antoniog2miz I need to pick up a name for the module responsible of taking a Perl6::Documentable::Registry and generate the HTML site 10:35
suggestions?
Registry::To::HTML? 10:36
(for those who don't know what a Perl6::Documentable::Registry is, is the object that process all pod files in the documentation and generate indexes, etc)
10:38 antoniog1miz left
Geth doc: 5c8e873b6c | (JJ Merelo)++ | doc/Type/Match.pod6
Merges the two definitions of make

This closes #2878. It's been there for a long time, about time we caught this bug...
10:39
synopsebot Link: doc.perl6.org/type/Match
jmerelo timotimo: It was kinda implicit. If you want me to edit something, I can do it. 10:41
timotimo: in general, the results of the survey are published for anyone to see, in the same way we did last year.
10:52 Manifest0 left 10:57 Manifest0 joined 11:00 antoniog2miz left
sena_kun jmerelo++ 11:06
11:12 Manifest0 left 11:15 abraxxa1 joined, abraxxa left 11:16 ravenousmoose joined
jmerelo sena_kun: thanks! 11:17
11:18 Manifest0 joined, jmerelo left 11:28 Manifest0 left 11:32 dolmen joined 11:36 Manifest0 joined 11:37 nepugia left 11:45 Manifest0 left 11:46 domidumont joined 11:50 Manifest0 joined 11:53 AlexDaniel left 12:01 ravenousmoose left 12:04 dolmen left, dolmen joined 12:05 AlexDaniel joined
Geth doc: pmqs++ created pull request #2879:
minor typo & grammar changes
12:05
12:06 domidumont1 joined 12:09 domidumont left
Geth doc: 6ee90baf0b | (Paul Marquess)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
minor typo & grammar changes
12:18
doc: c8b064eaa2 | (Paul Marquess)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #2879 from pmqs/patch-2

minor typo & grammar changes
synopsebot Link: doc.perl6.org/language/modules
12:19 mowcat joined 12:23 ravenousmoose joined
tobs Which package should my module's exceptions go into? X::MyModule or MyModule::X? I seem to recall this came up recently. Is there a best practice? 12:32
kawaii tobs: X::YourModule 12:33
12:35 albertferrico joined 12:36 albertferrico left
tobs kawaii: thanks, I have to admit I was anticipating the other answer :D 12:36
Summertime in a smartmatchy area, (e.g. `when X {}`), is there any practical difference between m// and rx//? other than m// allowing matching-related adverbs? 12:37
moritz no 12:42
12:50 ravenousmoose left
AlexDaniel kawaii: why? 12:53
tobs: I'd recommend MyModule::X 12:54
kawaii AlexDaniel: it's just how I've always seen it elsewherw 12:55
AlexDaniel greppable6: X::
sena_kun we use X::Cro, not Cro::X 12:56
greppable6 AlexDaniel, 6813 lines, 366 modules: gist.github.com/2dbfd9cf73a5345150...9e2a4d4f8b
AlexDaniel greppable6: class.*X::
greppable6 AlexDaniel, 1263 lines, 209 modules: gist.github.com/17c59c0990a818515b...ba193249ff 12:57
12:57 domidumont1 left
AlexDaniel tobs: or maybe X::YourModule, seems to be more popular 12:57
AlexDaniel files a problem-solving ticket
12:58 kensanata left
AlexDaniel greppable6: class\s*X:: 12:59
greppable6 AlexDaniel, 1045 lines, 180 modules: gist.github.com/e2cf3062222c4c2bb2...3d2a423370 13:00
13:00 domidumont joined
AlexDaniel greppable6: class.*::X:: 13:00
greppable6 AlexDaniel, 108 lines, 19 modules: gist.github.com/ff64469296d20d54e7...a1ea39605c
13:04 dolmen left
Geth ¦ problem-solving: AlexDaniel self-assigned X::MyModule::Foo or MyModule::X::Foo ? github.com/perl6/problem-solving/issues/57 13:04
13:05 ravenousmoose joined 13:08 natrys joined 13:24 Manifest0 left 13:29 Manifest0 joined 13:34 Black_Ribbon left 13:37 dogbert17 joined
Summertime for $someproc.out.lines { s/find/replace/; .say; } # fails, since $_ is immutable 13:48
what would be the practical way of "preparsing" each line (while still getting to use topical after)? 13:49
oh nevermind, <-> I'm guessing, just found it 13:50
jnthn for $someproc.out.lines -> $_ is copy { }
Though I'd probably just do `.subst('find', 'replace').say` in the loop body :) 13:51
Summertime need the subst before a bunch of when statements, so having it for each would be a bit much
AlexDaniel Summertime: also S/find/replace/ 13:52
doesn't change the $_ but you can do `say S/find/replace/`
Summertime more accurate for the usecase: for $someproc.out.lines { s/find/replace/; when A {}; when B {}; ... } 13:53
or completely accurate: running tail, and then removing timestamps from server logs before working out what to do for each log line
13:55 nadim left
AlexDaniel .tell jmerelo what's github.com/perl6/perl6-type 13:57
yoleaux AlexDaniel: I'll pass your message to jmerelo.
AlexDaniel moritz: any news regarding github.com/perl6/coding-contest-2019 ? 13:58
.tell jmerelo also what's github.com/perl6/paper 13:59
yoleaux AlexDaniel: I'll pass your message to jmerelo.
AlexDaniel timotimo: what's the status of github.com/perl6/cpandatesters.perl6.org ? last update dec 2015… 14:01
14:01 dolmen joined
AlexDaniel domidumont, robertle, El_Che, nine: do any of you use github.com/perl6/os-build ? 14:02
.tell robertle colabti.org/irclogger/irclogger_lo...07-02#l273
yoleaux AlexDaniel: I'll pass your message to robertle.
14:02 MasterDuke left
El_Che releasable6: status 14:03
releasable6 El_Che, Next release will happen when it's ready. R6 is down. At least 1 blocker. 286 out of 667 commits logged (⚠ 1 warnings)
El_Che, Details: gist.github.com/b1f1cf8bb03744001f...a60ac36e2d
14:05 ravenousmoose left
AlexDaniel github.com/perl6/rakudo.de what's that :) 14:05
14:05 MilkmanDan left 14:06 jasonc left, nadim joined 14:07 zakharyas left, mowcat left 14:08 MilkmanDan joined, antoniog1miz joined 14:10 jaldhar left 14:11 jaldhar joined 14:15 natrys left 14:19 natrys joined
El_Che AlexDaniel: the german version of the rakudo compiler. Word is it's very efficient 14:19
14:20 abraxxa1 left
moritz AlexDaniel: the only news is that I don't seem to find enough time, motivation and contributors to pull it off :( 14:21
Geth doc: 5181c55263 | Coke++ | 2 files
whitespace
14:28
tobs AlexDaniel: also thanks. X::* was more popular in my mind as well. MyModule::X avoids that split in the modules provided by a distribution. Everything is below that one package.
AlexDaniel tobs: that sounds very appealing to me :) 14:29
14:34 Manifest0 left, nadim left 14:39 Manifest0 joined 14:41 pmurias joined 14:43 Manifest0 left 14:48 jmerelo joined
jmerelo squashable6: status 14:48
yoleaux 13:57Z <AlexDaniel> jmerelo: what's github.com/perl6/perl6-type
13:59Z <AlexDaniel> jmerelo: also what's github.com/perl6/paper
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 2 days and ≈13 hours (2019-07-06 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo .tell AlexDaniel the first is what eventually became Perl6::Typegraph, recently released. Can be deleted 14:49
yoleaux jmerelo: I'll pass your message to AlexDaniel.
jmerelo .tell AlexDaniel the second is a repo to write a paper on Perl 6 architecture. Maybe we should leave that one for the time being. 14:50
yoleaux jmerelo: I'll pass your message to AlexDaniel.
14:51 Manifest0 joined
AlexDaniel . 14:52
yoleaux 14:49Z <jmerelo> AlexDaniel: the first is what eventually became Perl6::Typegraph, recently released. Can be deleted
14:50Z <jmerelo> AlexDaniel: the second is a repo to write a paper on Perl 6 architecture. Maybe we should leave that one for the time being.
AlexDaniel jmerelo: delete it yourself, please :)
14:53 domidumont left 14:54 nadim joined
jmerelo AlexDaniel: transferred it to me. You never know... 14:57
AlexDaniel jmerelo: 👍
jmerelo: maybe do the same for the paper repo :)
15:00 rindolf left
jmerelo AlexDaniel: OK 15:01
15:03 rindolf joined 15:06 reach_satori_ left 15:09 Manifest0 left 15:14 Manifest0 joined 15:18 pmurias left
Xliff jnthn: Do you have any idea when you will be able to look into github.com/jnthn/p6-io-socket-asyn...issues/44? 15:25
15:28 dolmen left, molaf joined 15:33 Manifest0 left
AlexDaniel any way I can put an arbitrary string into a match object from within a regex? 15:36
15:38 Manifest0 joined 15:39 patrickb left 15:42 abraxxa joined 15:47 Manifest0 left
jnthn Xliff: Towards the end of this week at the earliest. 15:47
15:47 antoniog1miz left
jmerelo AlexDaniel: what do you mean exactly? Something like using "make"? You probably can... You can insert any kind of code into a regex 15:49
AlexDaniel m: ‘xyz’ ~~ /{$/<foo> = ‘bar’}/; say $/
camelia Cannot modify an immutable Str (Nil)
in block <unit> at <tmp> line 1
AlexDaniel jmerelo: something like this ↑ 15:50
jmerelo m: say "foobar" ~~ /foo { make "bar }/; say $/.perl
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> 3bar" ~~ /foo { make "bar }/; say $/.perl7⏏5<EOL>
expecting …
jmerelo m: say "foobar" ~~ /foo { make "bar" }/; say $/.perl
camelia 「foo」
Match.new(hash => Map.new(()), list => (), pos => 3, from => 0, made => "bar", orig => "foobar")
jmerelo AlexDaniel: something like ^^^^
AlexDaniel how do I access it though
jnthn .made 15:51
jmerelo AlexDaniel: $/.made
AlexDaniel riight
thanks
jmerelo AlexDaniel: sure :-) 15:52
15:52 Manifest0 joined
AlexDaniel m: || False || say 50 16:00
camelia ( no output )
AlexDaniel I guess it does something else :)
jnthn Calls the prefix operator 16:02
Xliff jnthn: Thanks! 16:07
16:11 mowcat joined 16:17 Manifest0 left 16:24 Manifest0 joined, kiwi_95 joined 16:26 dolmen joined, zakharyas joined 16:28 MasterDuke joined 16:29 zakharyas1 joined 16:30 zakharyas2 joined 16:31 zakharyas left 16:33 zakharyas1 left 16:39 zakharyas2 left 16:43 abraxxa left 16:44 freackout joined
freackout hi guys i know there are good ide's for perl6 like comma, atom and vscose, but is there a regex checker specifically for perl6 and not perl 5 16:46
vs code
sena_kun freackout, regex checker as in sites like regexr.com/ and the like or a tool that does linting? 16:47
freackout like regexr or similar but perl6 has slightly diff syntax thus how do i know its being checked is 6 not 5 16:48
i notice comma perl6 ide has great linting (ie shows hints ect, is that lining) 16:49
sena_kun freackout, I haven't heard about such thing, but it is a matter of writing a nice UI app and hosting it, I guess. Though it'll mainly be web boilerplate. If you are interested in writing it... :) 16:50
freackout would love too.. but probably take me too long as it'll come out when i'm in next life 16:51
should that make sence as they are slightly different 16:52
16:53 domidumont joined
freackout guess i would have to try something even if its just highlight black n white hey..as a starter 16:54
sena_kun I think it can be started with a simple matcher, you just grab a regex and text, apply it and align the results nicely. though you must be very careful when it comes to sandbox restrictuion, as Perl 6 regexes can execute arbitrary code 16:55
freackout one more question do i need to register on this channel as i cant see too meny convo's
AlexDaniel freackout: it's just quiet right now :) 16:57
sena_kun freackout, you don't need to when it comes to irc channels. you can register your accaunt on the irc server itself, but even this is not really necessary. by not seeing too much you mean that the people are not chatting constantly like in more modern IM?
16:57 dakkar left
freackout yup,,got ya...once a old timer on yahoo chat before they changed it to pirate boat,, lost all linux chat rooms, used to be able to \cat :- all answers like copy past files ect was great before they changed it..havent really irc since years ago...old days where better 17:00
17:02 kiwi_95 left 17:04 domidumont left
Xliff frackout: I have written something like that but it depends on code that's not yet released. 17:05
github.com/Xliff/p6-VisualGrammar
freackout Xliff thanks for the link will check it out..(been on phone xx) 17:09
will also try to get gist of code and maybe add to the commits (something to do hey Thanks). 17:12
17:15 noisegul left 17:17 Manifest0 left
Xliff Sure thing! I would love it if it could act as both a grammar and a basic regex explorer. 17:17
17:18 dolmen left 17:21 domidumont joined
freackout seems just a case of putting the pair together and add the syntax.. cant see why this has not been implemented in like last 2 years at least... i know its new maybe larry's gang have something coming out somewhere...;) 17:21
17:23 Manifest0 joined 17:24 dolmen joined, dolmen left, sno joined
Xliff I think I know how to do it, it's just that for regexes, you don't have much of a way to figure out internal error conditions. jnthn came up with a nice tracer for grammars. 17:34
17:34 freackout left 17:45 molaf left 17:47 nepugia joined
caa51h :3 17:47
oops sorry
17:52 jaldhar left 17:56 Xliff left 17:57 domidumont left 17:59 molaf joined
Geth whateverable: 0a2861682e | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Make Notable not create new topics on the fly

Resolves #344. Also a little bit of refactoring.
18:00
18:14 noisegul joined 18:16 nadim left 18:18 noisegul left 18:23 Maylay joined 18:26 sauvin left
Geth ecosystem: kjkuan++ created pull request #463:
Update META6.json
18:26
18:27 robertle joined 18:36 nadim joined 18:39 jmerelo left
MasterDuke bunch of commentary here about math operators and creating new ones and such. might be an appropriate perl6 comment to be made. news.ycombinator.com/item?id=20325638 18:41
18:49 Cabanossi left 18:50 Manifest0 left 18:57 Manifest0 joined 19:01 Cabanossi joined 19:06 dolmen joined 19:07 MilkmanDan left 19:09 MilkmanDan joined
xinming_ in documentation about hyper/race, It says we can't use the same var inside the loop, What about the hash inside the loop? 19:12
something like my %h; my @a = hyper for 1..10 { %h{$_} = some_computation(); } <--- Will this be safe to use hyper or race? 19:13
AlexDaniel xinming_: no 19:17
moritz a hash is also a variable 19:18
AlexDaniel m: my %h; my @a = hyper for (1..1000000) { %h{$_} = rand }; say %h.elems
camelia (signal SEGV)
AlexDaniel demonstration :)
19:19 Kaiepi left
AlexDaniel very easy to fix though 19:20
m: my %h; my $h-lock = Lock.new; my @a = hyper for 1..100000 { my $x = rand; $h-lock.protect: { %h{$_} = $x } }; say %h.elems
camelia 100000
AlexDaniel m: my %h; my $h-lock = Lock.new; my @a = hyper for 1..1000000 { my $x = rand; $h-lock.protect: { %h{$_} = $x } }; say %h.elems
camelia 1000000 19:21
MasterDuke huh, i thought that had been made to just not work instead of causing a segfault 19:26
19:27 adu left 19:28 Manifest0 left, kensanata joined 19:33 Manifest0 joined 19:38 Cabanossi left 19:41 Cabanossi joined
xinming_ moritz: Yea, I understand that, What it actualy confuse me is, Why should we have the limitation for hash too, 19:45
moritz xinming_: why not?
19:45 pmurias joined
xinming_ hmm, we can use Lock to get rid of this. 19:45
Then, instead of SEGV, in the future, will it be an Exception for attempt to use var in hyper/race block? 19:46
19:51 dolmen left, molaf left 19:53 Manifest0 left 19:55 Cabanossi left 19:59 Manifest0 joined 20:00 adu joined 20:04 kaare__ left, kaare__ joined, dolmen joined 20:05 Cabanossi joined, adu left 20:06 mowcat left, adu joined 20:09 dolmen left 20:13 pecastro joined 20:19 Manifest0 left 20:21 Kaiepi joined 20:24 Manifest0 joined 20:25 dolmen joined 20:34 Black_Ribbon joined, sono__ joined 20:35 Manifest0 left 20:37 molaf joined 20:39 robertle left 20:41 Manifest0 joined
sena_kun xinming_, I think you may be interesting in 6guts.wordpress.com/2014/04/17/rac...ess-leads/ 20:45
20:45 sono__ left 20:55 pmurias left 20:56 pmurias joined, kensanata left 21:06 Manifest0 left 21:09 Kaiepi left 21:10 Manifest0 joined 21:11 Kaiepi joined 21:13 patrickb joined 21:15 dolmen left 21:16 dolmen joined 21:21 maettu left, MilkmanDan left 21:22 MilkmanDan joined
AlexDaniel MasterDuke: I don't remember that 21:35
21:36 dolmen left 21:46 Manifest0 left 21:51 Manifest0 joined
ugexe xinming_ you could use fixed size array 21:53
m: my @b[1000]; my @a = hyper for (^1000) { @b[$_] = $_ => rand }; my %h = @b.hash; say %h.elems
camelia 1000
ugexe that should be thread safe
timotimo adding new keys is dangerous in hashes, adding stuff to an array is dangerous 21:54
those can cause segfaults in parallel code
ugexe adding stuff to a variable size array is dangerous 21:55
timotimo yes, by adding stuff i mean make it grow 21:56
21:56 reach_satori_ joined 22:04 Manifest0 left 22:08 MasterDuke left 22:09 Manifest0 joined 22:11 |oLa| left
xinming_ ugexe: Ok, Thanks. Actually, Then, what will be the correct behavior instead of segv when user uses something like that? 22:12
I just saw that 'There should be no read or write access to the same data structure inside the loop.' <--- Why is read also dangerous? 22:13
22:13 Manifest0 left 22:14 tune joined
xinming_ I think, Maybe it's because when we try to read the same var at the same time, and cocerce of value happened 22:15
timotimo well, we used to have autovivifying attribute slots in objects 22:16
so doing that from two threads in pparallel could be dangerous
but in general reading from a datastructure should be safe in threaded code; just not necessarily always 22:17
22:18 patrickb left
xinming_ timotimo: Yea, I just read that post, and understand why we need to be careful to use hyper/race 22:20
22:20 Manifest0 joined
xinming_ timotimo: But do you think that the segfault return would be wrong for the integerpreter? 22:21
timotimo ideally pure perl6 code will never segfault
xinming_ At least, We should have have some info to tell user about and exit gracefully.
timotimo there is a way for us to not segfault when concurrently doing stuff with arrays and hashes
it's just a little extra work, and it'll still cause data loss when you do it wrong 22:22
xinming_ Ok, THanks, then, I understand.
timotimo figuring out it happens requires making every single hash/array access slower :( 22:23
xinming_ timotimo: So, as far as I can understand, hyper for xxx { .is-prime; } <--- here, we call .is-prime is ok, since they are operating on $object in xxx in parallel.
timotimo right 22:24
hyper takes care of pulling all data from xxx out in one thread and splitting it up into batches
those batches then land on the different threads to be done in parallel
xinming_ So, in this case, We should also need to avoid that $object to access the shared data, right?
22:24 vike left
xinming_ I think my thought is right. 22:25
then, We'll need lock.
timotimo: If that'll make access array/hash slow, Let's segfault. :-)
and ask people to read the doc to know they are doing wrong.
timotimo they can use memory safety checking stuff like asan or valgrind 22:26
22:32 Manifest0 left, Kaiepi left, Kaiepi joined 22:34 nadim left 22:36 Manifest0 joined 22:43 rindolf left 22:48 vike joined, natrys left 23:06 pmurias left
xinming_ Is there a module where we can use so hashes can have relations with dbm file kind of thing. 23:09
23:09 pecastro left
xinming_ something like NDBM_File in perl5. 23:10
is there a already sollution in perl6 for this?
23:14 sena_kun left
AlexDaniel xinming_: maybe Red? 23:23
23:29 Manifest0 left 23:34 Manifest0 joined 23:41 Manifest0 left 23:45 nepugia left 23:46 Manifest0 joined 23:53 Manifest0 left 23:59 Manifest0 joined