Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:08 ryn1x joined #perl6
00:22 Zoffix joined #perl6
00:23 pecastro joined #perl6
00:35 ryn1x joined #perl6
00:41 khw joined #perl6
01:04 aborazmeh joined #perl6
01:04 aborazmeh joined #perl6
01:16 astj joined #perl6
01:31 bitrauser_ joined #perl6
01:34 darkmorph joined #perl6
01:55 ilbot3 joined #perl6
01:55 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:57 Herby__ joined #perl6
02:17 astj joined #perl6
02:18 R0b0t1_ joined #perl6
02:18 araraloren joined #perl6
02:24 noganex_ joined #perl6
02:46 greppable6 joined #perl6
02:46 evalable6 joined #perl6
02:46 quotable6 joined #perl6
02:46 nativecallable6 joined #perl6
02:46 benchable6 joined #perl6
02:46 releasable6 joined #perl6
02:46 unicodable6 joined #perl6
02:46 coverable6 joined #perl6
02:46 bloatable6 joined #perl6
02:46 committable6 joined #perl6
02:46 bisectable6 joined #perl6
02:46 squashable6 joined #perl6
02:46 statisfiable6 joined #perl6
02:49 Herby_ if I have a cloned library that I'm making adjustments to, how do I use my local install of the module instead of the 'zef installed' module?
02:49 Herby_ if that makes sense
02:54 pecastro joined #perl6
02:57 Herby_ bueller?
03:02 b2gills perhaps `use lib '.'` or `-I=.`
03:02 sacomo Herby_, you can use `use lib 'path/to/your/local/lib'`
03:07 Herby_ sacomo: thanks, that seemed to work
03:08 Herby_ b2gills: thanks too
03:11 sacomo np
03:14 evalable6 joined #perl6
03:18 pecastro joined #perl6
03:40 Cabanossi joined #perl6
03:44 ggoebel joined #perl6
03:58 astj joined #perl6
04:07 bloatable6 joined #perl6
04:14 raiph joined #perl6
04:18 Herby__ ls
04:18 Herby__ ls -l
04:19 Herby__ whoops, ignore
04:20 committable6 joined #perl6
04:25 Cabanossi joined #perl6
04:59 astj joined #perl6
05:13 bitrauser joined #perl6
05:26 Cabanossi joined #perl6
05:38 pecastro joined #perl6
05:56 Cabanossi joined #perl6
06:01 astj joined #perl6
06:03 espadrine joined #perl6
06:06 ccakes joined #perl6
06:09 tejas joined #perl6
06:11 darutoko joined #perl6
06:26 tejas joined #perl6
06:26 Cabanossi joined #perl6
06:28 pecastro joined #perl6
06:30 aborazmeh joined #perl6
06:30 aborazmeh joined #perl6
06:40 piojo_ joined #perl6
06:42 ryn1x joined #perl6
06:58 chakli joined #perl6
07:18 evalable6 joined #perl6
07:20 ryn1x joined #perl6
07:21 domidumont joined #perl6
07:29 domidumont joined #perl6
07:42 wamba joined #perl6
07:46 nadim joined #perl6
07:49 PotatoGim joined #perl6
07:52 ryn1x joined #perl6
07:53 thunktone joined #perl6
08:00 astj joined #perl6
08:07 smls joined #perl6
08:08 smls m: for (1..6).race(:batch<1>) { sleep rand; .say }
08:08 camelia rakudo-moar d10d69774: OUTPUT: «1␤2␤3␤4␤5␤6␤»
08:08 smls Is hyper/race still meant to be used the same way, after jnthn's rewrite?
08:08 smls I can't seem to get it to parallelize.
08:11 sena_kun joined #perl6
08:13 smls m: for (1..6).race(:batch<1>) { sleep 1/$_; .say }
08:13 camelia rakudo-moar d10d69774: OUTPUT: «1␤2␤3␤4␤5␤6␤»
08:20 thunktone joined #perl6
08:25 titsuki bisect: class A { has $!arg; has &!code; multi method F(Str :$!arg) { "str".say; }; multi method F(:&!code) { "code".say; } }; A.new.F(:arg(-> { Nil }))
08:25 bisectable6 titsuki, On both starting points (old=2015.12 new=d10d697) the exit code is 0 and the output is identical as well
08:25 bisectable6 titsuki, Output on both points: «code»
08:25 titsuki bisect: class A { has $!arg; has &!code; multi method F(Str:D :$!arg) { "str".say; }; multi method F(:&!code) { "code".say; } }; A.new.F(:arg(-> { Nil }))
08:26 rindolf joined #perl6
08:27 titsuki bisect: class A { has $!arg; has &!code; multi method F(Str:D :$!arg) { "str".say; }; multi method F(:&!code) { "code".say; } }; A.new.F(:arg(-> { Nil }))
08:27 bisectable6 titsuki, On both starting points (old=2015.12 new=d10d697) the exit code is 0 and the output is identical as well
08:27 bisectable6 titsuki, Output on both points: «code»
08:30 titsuki bisect: class A { has $!arg; has &!code; multi method F(Str :$!arg) { $!arg.say; }; multi method F(:&!code) { "code".say; } }; A.new.F(:code(-> { Nil }))
08:30 bisectable6 titsuki, On both starting points (old=2015.12 new=d10d697) the exit code is 0 and the output is identical as well
08:30 bisectable6 titsuki, Output on both points: «(Str)»
08:30 titsuki bisect: class A { has $!arg; has &!code; multi method F(Str:D :$!arg) { $!arg.say; }; multi method F(:&!code) { "code".say; } }; A.new.F(:code(-> { Nil }))
08:30 bisectable6 titsuki, On both starting points (old=2015.12 new=d10d697) the exit code is 0 and the output is identical as well
08:30 bisectable6 titsuki, Output on both points: «code»
08:44 |oLa| joined #perl6
08:46 evalable6 joined #perl6
09:04 AlexDaniel` smls: no
09:04 AlexDaniel` I think it should be like this
09:04 AlexDaniel` m: race for (1..6).race(:batch<1>) { sleep rand; .say }
09:04 camelia rakudo-moar d10d69774: OUTPUT: «3␤2␤4␤5␤1␤6␤»
09:05 AlexDaniel` titsuki: the output seems to be stable across all releases since 2015.12
09:05 AlexDaniel` titsuki: if it's different on your setup, what rakudo version do you have?
09:06 smls AlexDaniel`: Interesting.
09:07 titsuki AlexDaniel: thanks for your advice, my output is same as bisectable's one.
09:08 AlexDaniel` Herby_: I have never seen a coding style guide for perl 6
09:08 AlexDaniel` Herby_: well, maybe one, but I really can't recommend it :)
09:09 ryn1x joined #perl6
09:09 smls Well, there's https://github.com/moritz/perl6-wtop/blob/master/practices.pod
09:09 AlexDaniel` yeah and a corresponding issue https://github.com/moritz/perl6-wtop/issues/2
09:10 AlexDaniel` Herby_: oh. Not a style guide, but perhaps very useful to people who are looking for a style guide: https://docs.perl6.org/language/traps
09:12 leah2 joined #perl6
09:12 smls AlexDaniel`: Dunno, I think they're right about using junctions only locally to prevent action-at-a-distance.
09:13 AlexDaniel` smls: example?
09:16 smls AlexDaniel`: Well, junctions will cause functions/methods calls to be executed multiple times instead of just once. If the code in question didn't expect to get a junction, this break expectations.
09:16 smls *can break
09:18 AlexDaniel` hm
09:21 AlexDaniel` smls: I guess you are right
09:26 Cabanossi joined #perl6
09:27 oter joined #perl6
09:29 Jo__ joined #perl6
10:00 Rawriful joined #perl6
10:02 astj joined #perl6
10:20 llfourn joined #perl6
10:27 nadim joined #perl6
10:36 wamba joined #perl6
10:46 ryn1x joined #perl6
11:03 astj joined #perl6
11:09 greppable6 joined #perl6
11:14 xinming joined #perl6
11:15 committable6 joined #perl6
11:16 Aaronepower joined #perl6
11:17 eliasr joined #perl6
11:34 Aaronepower joined #perl6
11:39 Aaronepower joined #perl6
11:40 atroxaper joined #perl6
11:41 atroxaper o/ #perl6
11:43 Zoffix \\o
11:48 Aaronepower joined #perl6
11:49 atroxaper I try to find a way to do "my $supply = Supply.interval(2); $supply.tap({ something; });", but with delay instead of interval. I mean I want to wait 2 seconds only after 'something' was done. For now I invented "sub foo() { something; Promise.in(2).then({ foo() }); }". What do you think?
11:52 AlexDaniel` atroxaper: maybe you need throttle https://docs.perl6.org/routine/throttle
11:54 Aaronepower joined #perl6
11:55 Zoffix atroxaper: I'd just use your sub. Promise.in(2) is for exactly this sort of thing
11:55 Cabanossi joined #perl6
11:56 atroxaper AlexDaniel`: throttle with 1 limit and sleep 2 seconds directly in callable. Maybe...
11:57 atroxaper Zoffix: yeah. I think so. I prefer Promise.in instead of sleep.
11:58 atroxaper Thank you, #perl6 :)
11:58 itaylor57 joined #perl6
11:58 Aaronepower joined #perl6
12:01 margeas joined #perl6
12:03 Aaronepower joined #perl6
12:04 astj joined #perl6
12:08 ryn1x joined #perl6
12:12 piojo_ joined #perl6
12:34 Aaronepower joined #perl6
12:35 astj joined #perl6
12:41 MasterDuke joined #perl6
12:45 ryn1x joined #perl6
12:48 chakli joined #perl6
12:51 chakli joined #perl6
13:11 Cabanossi joined #perl6
13:14 chakli_ joined #perl6
13:14 mr-foobar joined #perl6
13:17 chakli joined #perl6
13:22 chakli_ joined #perl6
13:24 itaylor57 joined #perl6
13:38 astj joined #perl6
13:59 khw joined #perl6
14:08 aborazmeh joined #perl6
14:08 aborazmeh joined #perl6
14:11 Cabanossi joined #perl6
14:18 Aaronepower joined #perl6
14:20 ryn1x joined #perl6
14:35 andrzejku joined #perl6
14:41 Cabanossi joined #perl6
14:42 Cabanossi joined #perl6
14:44 rgrau joined #perl6
14:44 mempko joined #perl6
14:45 astj joined #perl6
14:47 ChoHag joined #perl6
14:47 Aaronepower joined #perl6
15:03 oter joined #perl6
15:05 ryn1x joined #perl6
15:10 cdg joined #perl6
15:12 Herby_ AlexDaniel`: thanks for the link
15:15 darkmorph joined #perl6
15:29 piojo_ joined #perl6
15:32 setty1 joined #perl6
15:49 raschipi joined #perl6
16:03 astj joined #perl6
16:03 buggable joined #perl6
16:05 ryn1x joined #perl6
16:07 ChoHag joined #perl6
16:13 ChoHag joined #perl6
16:22 pilne joined #perl6
16:34 pecastro joined #perl6
16:39 markldevine joined #perl6
16:40 markldevine left #perl6
16:41 Cabanossi joined #perl6
16:49 knight__ joined #perl6
16:51 Grauwolf joined #perl6
16:51 ChoHag joined #perl6
16:57 thowe joined #perl6
17:05 pecastro joined #perl6
17:06 astj joined #perl6
17:11 Cabanossi joined #perl6
17:28 zakharyas joined #perl6
17:30 mr-foobar joined #perl6
17:34 thunktone joined #perl6
17:45 piojo_ joined #perl6
17:47 pecastro joined #perl6
17:55 ryn1x joined #perl6
18:04 thunktone joined #perl6
18:07 astj joined #perl6
18:19 Aaronepower joined #perl6
18:21 ryn1x joined #perl6
18:28 astj joined #perl6
18:31 mr-foobar joined #perl6
18:33 mst ilmari: obSproing ... I found one with sound! https://twitter.com/sneakerhax/status/921538107056406528
18:39 andrzejku joined #perl6
18:40 Cabanossi joined #perl6
18:57 mr-foobar joined #perl6
18:57 zakharyas joined #perl6
19:05 ryn1x joined #perl6
19:12 greppable6 joined #perl6
19:12 committable6 joined #perl6
19:14 rindolf Hi all! what is the equivalent of p5's [@$array_ref, 500] in p6? I cannot find it here - https://docs.perl6.org/language/5to6-nutshell
19:15 timotimo what does that do?
19:17 geekosaur looks like it makes a new arrayref with the contents of the old and something appended?
19:17 geekosaur that's kinda p5-think, possibly it should be redesigned for real array objects
19:17 geekosaur (yes, I know that could end up being a big job)
19:17 rindolf geekosaur: i am using an array var
19:18 geekosaur I think you can just say [|@arr, 500] (remember that you don't have arrayrefs as such in p6)
19:18 timotimo m: my @foo = 1, 2, 3, 4; my @otherfoo = |@foo, 500; say @otherfoo.perl
19:18 camelia rakudo-moar 6ad06fad9: OUTPUT: «[1, 2, 3, 4, 500]␤»
19:18 timotimo m: my @foo = 1, 2, 3, 4; my @otherfoo = @foo, 500; say @otherfoo.perl
19:18 camelia rakudo-moar 6ad06fad9: OUTPUT: «[[1, 2, 3, 4], 500]␤»
19:18 timotimo ^- only the outermost iterable gets iterated when assigning to an array like this
19:19 timotimo so by using | on the @foo you cause its innards to get iterated over in place of the array object itself
19:19 rindolf timotimo: ah\
19:19 rindolf timotimo: thanks
19:34 Ven joined #perl6
19:37 mienaikage joined #perl6
19:40 TEttinger joined #perl6
19:42 ChoHag joined #perl6
19:42 notostraca joined #perl6
19:42 cdg joined #perl6
19:48 MadHatter42 joined #perl6
19:48 MadHatter42 hey
19:49 MadHatter42 does anyone knows of any good ORM in perl 6 that support mongo ?
19:54 bartolin joined #perl6
19:55 andrzejku joined #perl6
19:57 zakharyas joined #perl6
19:59 raschipi MadHatter42: Even if you can't find one in Perl6, you can use Perl5 and Python ones.
20:02 MadHatter42 raschipi: i wasnt able to find a functional replacement for the laravel's eloquent thats why i asked here
20:02 mst I'm confused as to why you'd expect an object/relational mapper to make sense with a non-relational datastore
20:02 mst then again I'm also confused as to why anybody would use mongo in the first place
20:03 MadHatter42 mst: ever actually used mongo ?
20:03 mst yes.
20:03 MadHatter42 or have you just heard from your friends
20:03 MadHatter42 then why do you ask
20:04 MadHatter42 mongo is very powerful
20:04 mst it's just about usable for data that fits in RAM that you don't mind losing
20:04 MadHatter42 i strongly disagree
20:04 chsanch joined #perl6
20:05 MadHatter42 and regarding the first question its for management and conevenience
20:05 mst but otherwise it seems to mostly be a lot like mysql around 4.0 - easy to get started with and then you pay in operational costs later
20:05 MadHatter42 same as "why would you use an ORM in the first place"
20:05 Kyo91_ joined #perl6
20:06 mst I can't honestly think of a use case at this point where it would be superior to postgres w/jsonb for the unstructured parts
20:07 MadHatter42 mst: i could also use bash files in a directory for what it matters but if you're making such points i assume you barely scratched the surface of mongo
20:08 MadHatter42 i agree though that postgres is very powerful
20:08 mst "I assume you haven't done your research" is not an argument.
20:09 MadHatter42 would be more fare from you to say that "no, we dont have a ORM for perl6"
20:09 MadHatter42 or "yes there is one, named XXX "
20:09 MadHatter42 rather than getting philosofical about why one would use mongo in general
20:10 okl joined #perl6
20:10 Geth ¦ perl6-examples: ae4c62e84d | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
20:10 Geth ¦ perl6-examples: Add solution to Euler #612.
20:10 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/ae4c62e84d
20:10 MadHatter42 *fair
20:12 mst had somebody come along with a better/more concrete example I'd've let that conversation take over
20:12 AlexDaniel joined #perl6
20:12 tadzik joined #perl6
20:12 CIAvash[m] joined #perl6
20:12 mack[m] joined #perl6
20:12 tyil[m] joined #perl6
20:12 unclechu joined #perl6
20:12 M-Illandan joined #perl6
20:12 wamba[m] joined #perl6
20:12 wictory[m] joined #perl6
20:12 Matthew[m] joined #perl6
20:12 ilmari[m] joined #perl6
20:12 Garland_g[m] joined #perl6
20:12 xui_nya[m] joined #perl6
20:13 MadHatter42 mst: that kinda makes sense, at least is better than the "switch to python" answer that someone mentioned
20:13 mst I would expect that you could use Inline::Perl5 to use the official MongoDB perl5 client
20:14 raschipi I didn't say you should switch to Python, just that you can make use of their modules in Pelr6
20:14 mst same principle as my comment then
20:15 MadHatter42 i'm just exited about perl6 and i have a microservice to write that i wanted to implemented in perl6 ( that i can also use perl5 directly )
20:15 geekosaur basically we're too new to have much of an ecosystem, but we can use existing ecosystems as a workaround
20:15 geekosaur so you can bind to and use perl 5, python, and a few other ecosystems' modules from perl 6
20:16 Zoffix eco: couch
20:16 buggable Zoffix, Nothing found
20:16 geekosaur or use NativeCall to bind directly to C APIs
20:16 Zoffix eco: mongo
20:16 buggable Zoffix, Found 2 results: MongoDB, BSON. See https://modules.perl6.org/s/mongo
20:17 Zoffix I guess "driver" is not an ORM.
20:17 chsanch Hi, I'm using the permutations routine, but I was wondering is there any way to get permutations by a given length?, i.e: permutations('ABCD', 2) to get: AB AC AD ...
20:18 pmurias joined #perl6
20:18 moritz aren't those selections?
20:19 Zoffix m: say <a b c d>.combinations: 2
20:19 camelia rakudo-moar 6ad06fad9: OUTPUT: «((a b) (a c) (a d) (b c) (b d) (c d))␤»
20:19 Zoffix left #perl6
20:22 astj joined #perl6
20:27 k_89 joined #perl6
20:34 rindolf Zoffix++
20:38 chsanch I see, combinations is what I need. Thanks!
20:47 pecastro joined #perl6
20:47 ryn1x joined #perl6
21:05 rgrau joined #perl6
21:15 Geth ¦ doc: shlomif++ created pull request #1617: Document the proper way to concat arrays.
21:15 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1617
21:17 Geth ¦ doc: 5a09dedd7a | (Shlomi Fish)++ (committed by Zoffix Znet) | doc/Language/5to6-nutshell.pod6
21:17 synopsebot Link: https://doc.perl6.org/language/5to6-nutshell
21:17 Geth ¦ doc: Document the proper way to concat arrays. (#1617)
21:17 Geth ¦ doc:
21:17 Geth ¦ doc: In 5to6 - it was not properly documented. Also spell "," as the comma.
21:17 Geth ¦ doc:
21:17 Geth ¦ doc: This got me tripped when working on perl6-examples.
21:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5a09dedd7a
21:21 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2017/10/22/there-is-more-then-one-way-a-the-same-time/
21:23 niceperl joined #perl6
21:24 ryn1x joined #perl6
21:24 rindolf gfldex: shouldn't the title read "than" and "at"?
21:25 gfldex rindolf: well spotted
21:52 lizmat joined #perl6
21:52 COMBORICO joined #perl6
21:54 Kyo91_ joined #perl6
22:23 astj joined #perl6
22:31 ryn1x joined #perl6
22:35 Resol joined #perl6
22:40 cdg joined #perl6
22:41 Cabanossi joined #perl6
22:44 darkmorph joined #perl6
22:54 timotimo gfldex: exectuion typo'd
22:56 gfldex timotimo: fixed
22:56 timotimo and i wonder if "botteling up" should be "bottleing up" instead, but that also looks wrong
22:57 timotimo "andprocess" wants to be split
22:57 timotimo and i think the line break after "since we don't got a react" is an accident?
22:58 teatime ("bottling", no?)
22:58 timotimo that looks a bit less wrong
22:58 timotimo and also it's probably "foot guns" rather than "food guns"
22:58 notostraca bottling
22:59 notostraca beer bottling and distribution plant
22:59 gfldex timotimo: all fixed. Please remind me to wake up before writing posts. :->
22:59 timotimo hah, it's no problem at all :)
23:01 astj joined #perl6
23:01 timotimo this is more of a nitpick really: maybe "in place of a proper value" instead of "instread"? (actually, instread is also a typo)
23:02 timotimo good post in total
23:02 gfldex "in place" would be correcter if it would be more german
23:03 timotimo ah, my bias is showing :)
23:03 gfldex it feels like I'm missing something
23:04 timotimo i personally wouldn't have shown off Thread.new at all
23:05 timotimo pointing out that you're free to shove a custom class into $*SCHEDULER is too advanced for an introductory text
23:05 timotimo and supplies are more about handling already-existing concurrency than adding more; the emitting thread pays for the work that the supply block does
23:06 gfldex We can have as much advanced on Rosettacode as we like, as long as it's brief.
23:06 gfldex that's a good point. I will work on that part.
23:07 gfldex Do Junctions autothread already?
23:07 timotimo nope
23:08 timotimo i don't have a good idea for restructuring the code example to show it, but react is the less general form of supply, which is an extremely useful tool to process/combine streams
23:10 timotimo i mean, you can just emit .Str if try .open.slurp.contains('Rosetta') and have a react block whenever result-supply { say "found rosetta in {.Str}" }b
23:10 timotimo but that seems artificial
23:24 _xs joined #perl6
23:24 COMBORICO joined #perl6
23:26 darkmorph joined #perl6
23:26 Kyo91_ joined #perl6
23:31 ryn1x joined #perl6
23:36 b2gills joined #perl6
23:37 thundergnat joined #perl6
23:39 thundergnat gfldex: regarding your blog post - that where added -> that were added, custructs -> constructs, methods forms -> method forms, build-in -> built-in, we don’t got -> we haven’t got|we don’t have
23:40 thundergnat Other than that, cool, glad someone is looking at updating older examples.
23:41 Cabanossi joined #perl6
23:56 ryn1x joined #perl6
23:57 Alikzus_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo