»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:05 pecastro left 00:08 ryn1x joined 00:12 ryn1x left 00:22 Zoffix joined 00:23 pecastro joined 00:35 ryn1x joined 00:41 khw joined 00:46 Rawriful left 00:50 margeas left 01:04 aborazmeh joined, aborazmeh left, aborazmeh joined 01:16 astj joined 01:20 wamba left 01:21 astj left 01:28 aborazmeh left 01:31 bitrauser_ joined 01:34 darkmorph joined, bitrauser left 01:40 darkmorph left 01:45 ilbot3 left 01:52 raschipi joined 01:55 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:57 Herby__ joined 02:15 R0b0t1_ left 02:17 astj joined 02:18 R0b0t1_ joined, araraloren joined 02:22 astj left 02:24 noganex_ joined 02:26 noganex left 02:46 nativecallable6 left, unicodable6 left, benchable6 left, squashable6 left, releasable6 left, greppable6 left, statisfiable6 left, bloatable6 left, evalable6 left, coverable6 left, committable6 left, quotable6 left, bisectable6 left, greppable6 joined, evalable6 joined, quotable6 joined, nativecallable6 joined, benchable6 joined, releasable6 joined, unicodable6 joined, coverable6 joined, bloatable6 joined, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v releasable6, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v bloatable6, committable6 joined, bisectable6 joined, squashable6 joined, ChanServ sets mode: +v squashable6, statisfiable6 joined 02:47 pecastro left
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
if that makes sense
02:52 COMBORICO left 02:54 pecastro joined
Herby_ bueller? 02:57
b2gills perhaps `use lib '.'` or `-I=.` 03:02
sacomo Herby_, you can use `use lib 'path/to/your/local/lib'`
Herby_ sacomo: thanks, that seemed to work 03:07
b2gills: thanks too 03:08
sacomo np 03:11
03:14 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 03:16 pecastro left 03:18 pecastro joined 03:32 ggoebel left 03:39 Cabanossi left 03:40 Cabanossi joined 03:44 ggoebel joined 03:58 astj joined 04:00 khw left 04:03 astj left 04:07 bloatable6 left, bloatable6 joined, ChanServ sets mode: +v bloatable6 04:14 raiph joined 04:15 raiph left
Herby__ ls 04:18
ls -l
whoops, ignore 04:19
04:20 committable6 left, committable6 joined, ChanServ sets mode: +v committable6 04:23 Cabanossi left 04:25 Cabanossi joined 04:45 raschipi left 04:59 astj joined 05:04 astj left 05:13 bitrauser joined 05:14 bitrauser_ left 05:15 pecastro left 05:24 Cabanossi left 05:26 Cabanossi joined 05:32 Herby__ left 05:38 pecastro joined 05:47 pilne left 05:55 Cabanossi left 05:56 Cabanossi joined 06:01 astj joined 06:03 espadrine joined 06:05 astj left 06:06 ccakes left, ryn1x left, ccakes joined 06:09 tejas joined 06:11 darutoko joined 06:19 tejas left 06:20 pecastro left 06:24 Cabanossi left 06:26 tejas joined, Cabanossi joined 06:28 pecastro joined 06:30 aborazmeh joined, aborazmeh left, aborazmeh joined 06:32 llfourn left 06:36 tejas is now known as chakli 06:40 piojo_ joined 06:42 ryn1x joined 06:46 ryn1x left 06:52 piojo_ left 06:56 chakli left 06:58 chakli joined 07:18 evalable6 left, evalable6 joined 07:20 ryn1x joined 07:21 domidumont joined 07:28 domidumont left 07:29 domidumont joined 07:31 chakli left 07:42 wamba joined 07:46 nadim joined, PotatoGim left 07:49 PotatoGim joined 07:51 ryn1x left 07:52 ryn1x joined 07:53 thunktone joined 07:56 ryn1x left 08:00 astj joined 08:05 astj left 08:07 smls joined
smls m: for (1..6).race(:batch<1>) { sleep rand; .say } 08:08
camelia 1
2
3
4
5
6
smls Is hyper/race still meant to be used the same way, after jnthn's rewrite?
I can't seem to get it to parallelize.
08:10 araraloren left 08:11 sena_kun joined
smls m: for (1..6).race(:batch<1>) { sleep 1/$_; .say } 08:13
camelia 1
2
3
4
5
6
08:13 thunktone left 08:20 thunktone joined
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
titsuki, Output on both points: «code»
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
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
titsuki, Output on both points: «code»
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
titsuki, Output on both points: «(Str)»
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 }))
bisectable6 titsuki, On both starting points (old=2015.12 new=d10d697) the exit code is 0 and the output is identical as well
titsuki, Output on both points: «code»
08:44 |oLa| joined 08:46 evalable6 left, evalable6 joined 08:50 thunktone left 08:57 leah2 left
AlexDaniel` smls: no 09:04
I think it should be like this
m: race for (1..6).race(:batch<1>) { sleep rand; .say }
camelia 3
2
4
5
1
6
AlexDaniel` titsuki: the output seems to be stable across all releases since 2015.12 09:05
titsuki: if it's different on your setup, what rakudo version do you have?
smls AlexDaniel`: Interesting. 09:06
titsuki AlexDaniel: thanks for your advice, my output is same as bisectable's one. 09:07
09:08 nadim left
AlexDaniel` Herby_: I have never seen a coding style guide for perl 6 09:08
Herby_: well, maybe one, but I really can't recommend it :)
09:09 ryn1x joined
smls Well, there's github.com/moritz/perl6-wtop/blob/...ctices.pod 09:09
AlexDaniel` yeah and a corresponding issue github.com/moritz/perl6-wtop/issues/2
Herby_: oh. Not a style guide, but perhaps very useful to people who are looking for a style guide: docs.perl6.org/language/traps 09:10
09:12 leah2 joined
smls AlexDaniel`: Dunno, I think they're right about using junctions only locally to prevent action-at-a-distance. 09:12
AlexDaniel` smls: example? 09:13
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
*can break
AlexDaniel` hm 09:18
smls: I guess you are right 09:21
09:25 Cabanossi left 09:26 Cabanossi joined 09:27 oter joined 09:29 Jo__ joined 09:30 TEttinger left, Jo__ left 09:41 ryn1x left 09:59 oter left 10:00 Rawriful joined 10:02 astj joined 10:06 astj left 10:07 espadrine left 10:10 wamba left 10:20 llfourn joined 10:27 nadim joined 10:36 wamba joined 10:38 itaylor57 left 10:46 ryn1x joined 10:52 xinming left 10:55 aborazmeh left 10:57 Aaronepower left 10:58 zakame left 11:03 astj joined 11:07 astj left 11:09 greppable6 left, greppable6 joined 11:14 xinming joined 11:15 committable6 left, committable6 joined 11:16 Aaronepower joined 11:17 eliasr joined 11:19 Aaronepower left 11:21 ryn1x left 11:34 Aaronepower joined 11:38 Aaronepower left 11:39 Aaronepower joined 11:40 atroxaper joined, ChoHag left
atroxaper o/ #perl6 11:41
Zoffix \\o 11:43
11:48 Aaronepower left, Aaronepower joined
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:49
11:52 Aaronepower left
AlexDaniel` atroxaper: maybe you need throttle docs.perl6.org/routine/throttle 11:52
11:54 Aaronepower joined
Zoffix atroxaper: I'd just use your sub. Promise.in(2) is for exactly this sort of thing 11:55
11:55 Cabanossi left, Cabanossi joined
atroxaper AlexDaniel`: throttle with 1 limit and sleep 2 seconds directly in callable. Maybe... 11:56
Zoffix: yeah. I think so. I prefer Promise.in instead of sleep. 11:57
11:58 Aaronepower left
atroxaper Thank you, #perl6 :) 11:58
11:58 itaylor57 joined, Aaronepower joined 12:01 margeas joined 12:02 Aaronepower left 12:03 Aaronepower joined 12:04 astj joined 12:06 smls left 12:08 ryn1x joined 12:09 astj left 12:12 piojo_ joined, ryn1x left 12:16 atroxaper left 12:34 Aaronepower left, Aaronepower joined 12:35 astj joined 12:41 MasterDuke joined, astj left 12:45 ryn1x joined 12:48 chakli joined 12:51 chakli left, chakli joined 13:08 Cabanossi left 13:11 Cabanossi joined 13:14 chakli_ joined, itaylor57 left, mr-foobar joined 13:16 chakli left, chakli_ is now known as chakli 13:17 chakli left, chakli joined 13:18 ryn1x left 13:22 chakli_ joined 13:24 chakli left, itaylor57 joined 13:27 chakli_ left 13:38 astj joined 13:42 astj left 13:59 khw joined 14:05 Aaronepower left 14:08 aborazmeh joined, aborazmeh left, aborazmeh joined 14:09 Cabanossi left 14:11 Cabanossi joined 14:17 aborazmeh left 14:18 Aaronepower joined 14:20 ryn1x joined, Aaronepower left 14:35 andrzejku joined 14:40 Cabanossi left 14:41 Cabanossi joined 14:42 Cabanossi left, Cabanossi joined 14:44 rgrau joined, mempko joined 14:45 astj joined 14:47 ChoHag joined, Aaronepower joined 14:49 astj left 14:51 Aaronepower left 14:53 ryn1x left 14:59 mempko left 15:02 ChoHag left 15:03 oter joined 15:05 ryn1x joined 15:10 cdg joined
Herby_ AlexDaniel`: thanks for the link 15:12
15:15 darkmorph joined 15:29 piojo_ left, piojo_ joined 15:32 setty1 joined 15:44 ryn1x left 15:49 raschipi joined 16:03 buggable left, astj joined, buggable joined, ChanServ sets mode: +v buggable 16:05 ryn1x joined 16:07 ChoHag joined 16:09 astj left 16:12 ChoHag left 16:13 ChoHag joined 16:22 pecastro left, pilne joined 16:23 sena_kun left 16:29 ChoHag left 16:32 Grauwolf left 16:34 pecastro joined 16:39 markldevine joined, Cabanossi left 16:40 markldevine left 16:41 Cabanossi joined 16:48 rgrau left 16:49 knight__ joined 16:51 Grauwolf joined, ChoHag joined 16:57 thowe joined 16:58 pecastro left 17:05 pecastro joined 17:06 astj joined 17:08 knight__ left 17:10 Cabanossi left, ryn1x left, astj left 17:11 Cabanossi joined 17:24 pecastro left 17:25 mr-foobar left 17:28 zakharyas joined 17:30 mr-foobar joined 17:32 oter left 17:34 thunktone joined 17:37 darkmorph left 17:44 piojo_ left 17:45 piojo_ joined 17:47 pecastro joined 17:52 zakharyas left 17:55 ryn1x joined 17:59 ryn1x left 18:02 thunktone left 18:04 thunktone joined 18:05 andrzejku left 18:07 astj joined 18:12 astj left, piojo_ left 18:19 Aaronepower joined 18:21 ryn1x joined 18:26 mr-foobar left 18:28 astj joined 18:31 mr-foobar joined 18:32 astj left
mst ilmari: obSproing ... I found one with sound! twitter.com/sneakerhax/status/9215...7056406528 18:33
18:38 Cabanossi left, ryn1x left 18:39 andrzejku joined 18:40 Cabanossi joined 18:41 darutoko left 18:47 xui_nya[m] left, Garland_g[m] left 18:48 ChoHag left 18:51 mienaikage left, Matthew[m] left, CIAvash[m] left, cdg left, mack[m] left, wamba[m] left, ilmari[m] left, tyil[m] left 18:52 unclechu left, AlexDaniel left 18:53 wictory[m] left, M-Illandan left, tadzik left 18:54 committable6 left, greppable6 left, mr-foobar left 18:55 domidumont left 18:57 mr-foobar joined, zakharyas joined 19:05 ryn1x joined 19:12 greppable6 joined, ChanServ sets mode: +v greppable6, committable6 joined
rindolf Hi all! what is the equivalent of p5's [@$array_ref, 500] in p6? I cannot find it here - docs.perl6.org/language/5to6-nutshell 19:14
timotimo what does that do? 19:15
geekosaur looks like it makes a new arrayref with the contents of the old and something appended? 19:17
that's kinda p5-think, possibly it should be redesigned for real array objects
(yes, I know that could end up being a big job)
rindolf geekosaur: i am using an array var
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
camelia [1, 2, 3, 4, 500]
timotimo m: my @foo = 1, 2, 3, 4; my @otherfoo = @foo, 500; say @otherfoo.perl
camelia [[1, 2, 3, 4], 500]
timotimo ^- only the outermost iterable gets iterated when assigning to an array like this
19:18 maettu left
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\
timotimo: thanks
19:32 andrzejku left 19:34 Ven joined, Ven is now known as Guest28087 19:37 mienaikage joined 19:40 TEttinger joined 19:42 ChoHag joined, notostraca joined, cdg joined, ryn1x left 19:45 TEttinger left 19:47 cdg left 19:48 MadHatter42 joined
MadHatter42 hey 19:48
19:48 bartolin left
MadHatter42 does anyone knows of any good ORM in perl 6 that support mongo ? 19:49
19:54 bartolin joined 19:55 zakharyas left, andrzejku joined 19:57 zakharyas joined
raschipi MadHatter42: Even if you can't find one in Perl6, you can use Perl5 and Python ones. 19:59
20:00 patrickz_ left
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
then again I'm also confused as to why anybody would use mongo in the first place
MadHatter42 mst: ever actually used mongo ? 20:03
mst yes.
MadHatter42 or have you just heard from your friends
then why do you ask
mongo is very powerful 20:04
mst it's just about usable for data that fits in RAM that you don't mind losing
MadHatter42 i strongly disagree
20:04 chsanch joined
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
MadHatter42 same as "why would you use an ORM in the first place"
20:05 Kyo91_ joined
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:06
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:07
i agree though that postgres is very powerful 20:08
mst "I assume you haven't done your research" is not an argument.
MadHatter42 would be more fare from you to say that "no, we dont have a ORM for perl6" 20:09
or "yes there is one, named XXX "
20:09 Kyo91_ left
MadHatter42 rather than getting philosofical about why one would use mongo in general 20:09
20:10 okl joined
Geth perl6-examples: ae4c62e84d | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
Add solution to Euler #612.
20:10
MadHatter42 *fair
mst had somebody come along with a better/more concrete example I'd've let that conversation take over 20:12
20:12 AlexDaniel joined, CIAvash[m] joined, tadzik joined, mack[m] joined, tyil[m] joined, unclechu joined, M-Illandan joined, ilmari[m] joined, wamba[m] joined, wictory[m] joined, Matthew[m] joined, Garland_g[m] joined, xui_nya[m] joined
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
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
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
so you can bind to and use perl 5, python, and a few other ecosystems' modules from perl 6
Zoffix eco: couch 20:16
buggable Zoffix, Nothing found
geekosaur or use NativeCall to bind directly to C APIs
Zoffix eco: mongo
buggable Zoffix, Found 2 results: MongoDB, BSON. See modules.perl6.org/s/mongo
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
moritz aren't those selections? 20:18
Zoffix m: say <a b c d>.combinations: 2 20:19
camelia ((a b) (a c) (a d) (b c) (b d) (c d))
20:19 Zoffix left 20:21 andrzejku left 20:22 astj joined 20:26 astj left 20:27 k_89 joined 20:29 pecastro left, k_89 left
rindolf Zoffix++ 20:34
chsanch I see, combinations is what I need. Thanks! 20:38
20:39 okl left 20:46 zakharyas left 20:47 pecastro joined, ryn1x joined 20:50 chsanch left 20:59 setty1 left 21:05 rgrau joined 21:09 pmurias left
Geth doc: shlomif++ created pull request #1617:
Document the proper way to concat arrays.
21:15
doc: 5a09dedd7a | (Shlomi Fish)++ (committed by Zoffix Znet) | doc/Language/5to6-nutshell.pod6
Document the proper way to concat arrays. (#1617)

In 5to6 - it was not properly documented. Also spell "," as the comma.
This got me tripped when working on perl6-examples.
21:17
synopsebot Link: doc.perl6.org/language/5to6-nutshell
21:21 ryn1x left
gfldex lolibloggedalittle: gfldex.wordpress.com/2017/10/22/th...same-time/ 21:21
21:23 niceperl joined 21:24 ryn1x joined
rindolf gfldex: shouldn't the title read "than" and "at"? 21:24
gfldex rindolf: well spotted 21:25
21:28 thowe left 21:29 ryn1x left 21:38 MadHatter42 left 21:40 lizmat left 21:46 rindolf left 21:52 lizmat joined, COMBORICO joined, thunktone left 21:54 Kyo91_ joined 21:58 Guest28087 left, Kyo91_ left 22:11 wamba left 22:23 astj joined 22:28 astj left 22:29 niceperl left 22:31 ryn1x joined 22:35 Resol joined 22:39 Cabanossi left 22:40 cdg joined 22:41 Cabanossi joined 22:44 darkmorph joined
timotimo gfldex: exectuion typo'd 22:54
gfldex timotimo: fixed 22:56
timotimo and i wonder if "botteling up" should be "bottleing up" instead, but that also looks wrong
"andprocess" wants to be split 22:57
and i think the line break after "since we don't got a react" is an accident?
teatime ("bottling", no?) 22:58
timotimo that looks a bit less wrong
22:58 b2gills left
timotimo and also it's probably "foot guns" rather than "food guns" 22:58
notostraca bottling
beer bottling and distribution plant 22:59
gfldex timotimo: all fixed. Please remind me to wake up before writing posts. :->
timotimo hah, it's no problem at all :)
23:00 darkmorph left 23:01 astj joined
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:01
good post in total 23:02
gfldex "in place" would be correcter if it would be more german
timotimo ah, my bias is showing :) 23:03
gfldex it feels like I'm missing something
timotimo i personally wouldn't have shown off Thread.new at all 23:04
23:04 ryn1x left
timotimo pointing out that you're free to shove a custom class into $*SCHEDULER is too advanced for an introductory text 23:05
23:05 astj left
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:05
gfldex We can have as much advanced on Rosettacode as we like, as long as it's brief. 23:06
that's a good point. I will work on that part.
Do Junctions autothread already? 23:07
timotimo nope
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:08
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
but that seems artificial
23:21 raschipi left 23:24 COMBORICO left, _xs joined, COMBORICO joined 23:26 darkmorph joined, Kyo91_ joined 23:28 _xs left 23:30 Kyo91_ left 23:31 ryn1x joined 23:35 Rawriful left 23:36 ryn1x left, b2gills joined 23:37 thundergnat joined 23:38 Cabanossi left
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:39
Other than that, cool, glad someone is looking at updating older examples. 23:40
23:41 Cabanossi joined 23:52 Alikzus_ left 23:56 ryn1x joined 23:57 Alikzus_ joined