🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth whateverable: 25ffa5953d | (Aleks-Daniel Jakimenko-Aleksejev)++ | xt/bisectable.t
Bump bisectable test timeouts

Just to make them more reliable in weird conditions.
00:47
whateverable: 187d36aef3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Make Bisectable even more awesome

Previously it was assumed that the user knows that there was in fact a change in behavior before triggering the bot. It made sense because there was a separate bot (Committable) that allowed to get that information. However, this expectation doesn't match reality and how actual users are using the bot. ... (17 more lines)
Geth whateverable: f528c0dda4 | (Aleks-Daniel Jakimenko-Aleksejev)++ | META6.json
Bump version
00:54
JJMerelo sourceable6: infix:<∘> 07:46
sourceable6 JJMerelo, github.com/rakudo/rakudo/blob/f11d...s.pm6#L464
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say composed 2; say "{composed.arity} {composed.count} {composed.of}" 07:51
camelia g
Too few positionals passed; expected 1 argument but got 0
in sub g at <tmp> line 1
in block <unit> at <tmp> line 1

f
2
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say composed 2; say "{&composed.arity} {&composed.count} {&composed.of}"
camelia g
Use of uninitialized value of type Mu in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
f
2
1 1
in block <unit> at <tmp> line 1
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say composed 2; 07:52
camelia g
f
2
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say &composed.arity; 07:53
camelia 1
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say &composed.count;
camelia 1
JJMerelo m: sub f($p){ say 'f'; $p / 2 }; sub g($p){ say 'g'; $p * 2 }; my &composed = &f ∘ &g; say &composed.of;
camelia (Mu)
Geth doc: fc814838b4 | (JJ Merelo)++ | doc/Language/operators.pod6
Adds index, closes #3479
08:24
doc: c021f16939 | (JJ Merelo)++ | doc/Language/operators.pod6
Describes composition operator, refs #2632
doc: 189e4a5669 | (JJ Merelo)++ | doc/Language/operators.pod6
Split to avoid redeclaration
linkable6 Link: docs.raku.org/language/operators
linkable6 DOC#3479 [closed]: github.com/Raku/doc/issues/3479 [docs] Function composition is not indexed in its ASCII form
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
Geth problem-solving: b0601e0a8a | (JJ Merelo)++ | solutions/ecosystem-versioning.md
Solution for issue #72
08:51
problem-solving: a13560b211 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | solutions/ecosystem-versioning.md
Merge pull request #202 from JJ/master

Solution for issue #72: spin off module publishing tutorial in the documentation. No one has spoken against, or actually seem to care, so I guess I could as well merge it.
JJMerelo If no one objects, I'm going to start and adopt late Jeff Goff's distribution, including them in the community distros organization. 09:35
I'll start with Grammar::Common, of some other if you think it's more urgent.
rindolf JJMerelo: sounds good - thanks 09:38
lizmat JJMerelo++ 09:43
lizmat clickbaits rakudoweekly.blog/2020/06/15/2020-...proaching/
JJMerelo raku-dev 10:51
Geth problem-solving/revert-202-master: c6710b85f1 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | solutions/ecosystem-versioning.md
Revert "Solution for issue #72: spin off module publishing tutorial in the documentation."
11:18
problem-solving: AlexDaniel++ created pull request #205:
Revert "Solution for issue #72: spin off module publishing tutorial in the documentation."
problem-solving: c6710b85f1 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | solutions/ecosystem-versioning.md
Revert "Solution for issue #72: spin off module publishing tutorial in the documentation."
problem-solving: f616d5fd48 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | solutions/ecosystem-versioning.md
Merge pull request #205 from Raku/revert-202-master

Revert "Solution for issue #72: spin off module publishing tutorial in the documentation."
rbt Does anybody have opinions on DBIish connection pooling? github.com/raku-community-modules/...h/pull/171 14:08
abraxxa whatfor is it good?
rbt Eliminating Connect/disconnect cycles for short queries, such as web hits. The connection gets held in the background by DBIish, gets scrubbed, and is reused. 14:09
Encrypted DB connections take a long time to stand-up. 14:10
short sessions (in place of short queries)
[Coke] I don't have any timings or anything, but re-using open connections ++
abraxxa can no SQL RDBMS execute multiple queries over a single connection? 14:16
rbt I don't know if none can; but Pg and MySQL do not allow interleaving on a single connection. 14:17
Otherwise multithreading would have been much easier to make safe :)
abraxxa I've never had the problem of a database connection getting teared down 14:24
long running apps like web apps just open the connection on startup (not first request) and keep it open 14:25
lizmat abraxxa: that may have repercussions on the db server end, having many, many connections open is also a burden 14:35
lizmat rbt: ideally, a connection pool would be a role :-) 14:35
rbt I hadn't considered that. 14:38
I'm also not certain how that would work. 14:44
gunnar raku: $*COLLATION 14:46
evalable6
gunnar say $*COLLATION 14:47
evalable6 collation-level => 85, Country => International, Language => None, primary => 1, secondary => 1, tertiary => 1, quaternary => 1
gunnar <a e å ä ö o è>.sort 14:48
<a e å ä ö o è>.sort.say
evalable6 (a e o ä å è ö)
rbt lizmat: Right now they do DBIish.connect('Drv', %con-parms) to get a connection. What would a pool as a role look like? Or do you mean DBIish does DBIish::Pool? 14:50
lizmat a role that would override "connect", and return a db from a pool matching the parameters, and run the original connect if none found 14:54
rbt lizmat: I see. That gets tricky as some connection parameters might be in environment variables like PGHOST or separate configuration files like PGSERVICE which could change between calls to connect(). 14:56
lizmat: They'd rarely change though. Perhaps documentation is sufficient for that issue.
lizmat perhaps some parameterization with ENV keys that should be part of the cache identifier ? 14:57
lizmat DBIish but Pool[PGSERVICE,PGHOST] 14:57
lizmat and perhaps wrap that in client roles: role PGPool does Pool[PGSERVICE,PGHOST] 14:59
rbt lizmat: connect would also need a flag to indicate it is a pooled connection like DBIish.connect('Pg', %parms, :pool). Don't want unused connections to hang around unexpectedly after they're disposed(). 15:02
Thanks for the help. 15:03
lizmat yeah, that is exactly why additional named parameters in methods are ignored by default :-)
melezhik .tell JJMerelo my thoughts on github.com/Raku/ecosystem/issues/505 depending what use case we want to implement it'l take different approach and method 15:23
tellable6 melezhik, I'll pass your message to JJMerelo
JJMerelo melezhik got it, thanks! 15:24
melezhik if we only want to install ext dependencies during `zef install` the solution needs to be as lightweight as possible or we end up yet another CM tool
which is probably we all want to ... 15:25
in opposite to smoke tests / CI task we are free no to limit ourselves by user requirements because in that case we are not aiming to satisfy end user 15:26
rather then testing _some_ modules
I mean for me it boils down to 2 approaches - "industry level" solution/CM tool VS lightweight zef based solution 15:27
in very rough estmation
estimation
JJMerelo It would be nice to have something in between... 15:33
melezhik well, my principal view it does not worth it, we either do full CI ( which is closer to my view - RakuDist/Sparrow ) or we trying to only solve end user task 15:34
this is why I'd like to hear user stories, description of how we see it from practical point of view, so far the discussion touches some bits, but still quite vague in terms of what do we really WANT 15:35
abraxxa lizmat: sorry, meetings all day long. I'm usually running 3-5 processes, so this is the amount of database connections 15:41
lizmat abraxxa: no pb, I was just remembering at former work where if all web processes would just keep their db handle, they would crash the db servers 15:42
abraxxa rbt: a pool holds multiple connections, when I call connect and that's documented to return a connection I'd prefer to keep it that way. A pool should be implemented separately, maybe even another dist 15:43
lizmat situation there was that each request potentially needed about 10 db handles
but many requests of those, only needed upto three
abraxxa because of parallelization?
lizmat no, because it was so large that a. no single db server was able to keep the db's 15:44
and b. many replicants were needed
abraxxa sounds like wrong product chosen 15:46
lizmat what can I say: if you're growing 200% for 8 years in a row, you don't have a lot of opportunity to re-design your architecture 15:47
abraxxa rbt: I wouldn't call the pools constructor 'connect'
rbt abraxxa: This is what I have at the moment 15:49
my $pool = DBIish.pool('Pg', max-connections => 10, |%conn);
my $dbh = $pool.connect()
It works perfectly well as a separate module from DBIish if that's desired.
abraxxa rbt: haven't finished reading the whole PR and was a bit confused by the naming in the README 15:50
rbt It's not quite transparent that way though where Lizmat's role design probably would be.
abraxxa I'd prefer not to add DBIish::Pool usage in DBIish 15:51
method pool doesn't add anything over ::Pool.new
the exception refactor is nice though 15:52
rbt The main reason I leaned into DBIish is connection reset is database specific. For example in Pg you send DISCARD ALL, in MySQL you send the username/password again. Keeping that knowledge in the driver would be helpful and allows 3rd party drivers to use pooling without needing to modify DBIish::Pool. 15:54
abraxxa see my PR comment 15:56
rbt abraxxa: Thanks. What is an "interface role" in raku? Are there any examples of that? 15:57
abraxxa I only know the term from Java where it just defines the methods a class has to implement 15:58
in Moose::Role terms that would be a requires definition
I'm pretty sure Raku can do better and even define the input and output types 15:59
but I don't think that's necessary
when a pool hands out one of its underlying connections via one method you can then access all the methods the connection object (dbh) has
so if the connection api changes, pool doesn't care
rbt Okay, thanks. 16:02
abraxxa what's about get-connection as a method name for the pool? 16:08
abraxxa also depends if you want to manually execute specific queries on specific connections or just pass a statement to the pool and not care which one it uses 16:09
oddp Apart from exit, is there another way to terminate hyper/race iteration? 16:10
jnthn oddp: What is doing the terminating? 16:11
rbt abraxxa: Sounds good. 16:12
oddp Basically iterating as such (1..*).race(batch => 1000).map: { ... } and want to terminate after the first match. 16:13
jnthn Hm, does `last` not work?
oddp Phasers aren't supported, it seems.
jnthn But you can also tack .first or .head on the end after the `map`
oddp Ah, no, last isn't exiting. 16:14
jnthn It won't terminate the batches that are currently in progress
But it will not schedule any more
Which is usually good enough
Effectively, the thread that consumes the results is also the one that produces batches, sends them to workers, and waits for them to come back 16:16
So the .first will terminate the iteration, and it won't produce any futher batches
SmokeMachine would something like this work? 16:20
m: say (1..*).race(batch => 1000).map({ $_ %% 2 ?? $_ !! Empty }).head
camelia 2
SmokeMachine jnthn: just said that, sorry... 16:21
oddp Alright, first in conjunction with Empty did the trick. Thanks to both of you! 16:28
SmokeMachine oddp: first? something like this? 16:34
m: say (1..*).race(batch => 1000).first: * %% 2
camelia 2
JJMerelo releasable6: status 16:40
releasable6 JJMerelo, Next release in ≈4 days and ≈2 hours. 1 blocker. 143 out of 290 commits logged (⚠ 4 warnings)
JJMerelo, Details: gist.github.com/f8e38291ddc8ae8809...b70546e938
oddp SmokeMachine: That works but is slower than race-less iteration. 16:43
rypervenche If I want to run an array of strings through a grammar, is the best way to simply run a loop on the array and parse each string separately and then push the result into a new array? 17:13
jnthn Well, probably neater with map, but yes 17:14
rypervenche Ahhh, a map. I'll see if I can get that to work. Thanks. I was trying to figure out an efficient way to do this. I always forget about maps. 17:19
rypervenche Hmmm, how would I turn this into a map? Obviously the @files doesn't work there, but I'm not sure how to order everything since it's inside the parse method: gist.github.com/rypervenche/36b55f...ac8b8dd756 17:26
jnthn rypervenche: my @var = @files.map: { BackupDate.parse($_, :$actions).made }; 17:48
rypervenche Ooooooh. Thanks so much.
jnthn If you do it this way, then you don't need to keep all the parse trees in memory, just the final result strings.
(I'm referring to calling the .made in this map also)
rypervenche Ahh, I did that because in case the parse failed, I wanted to know about it. Although perhaps a type constraint would fix that. 17:49
jnthn Ah, true :) 18:04
rypervenche Yeah, looks like the type constraint didn't do it. I'll have to keep it as separate lines. Unless there's some way to do it that I don't know about. 18:08
melezhik I am going to create a toolset written on Sparrow to manage Azure DevOps objects - repo.westus.cloudapp.azure.com/hub/search?q=ado 19:36
so far it's just a few plugins, but there could be more soon
basically for CRUD operations for various Ado objects - git repos, pipelines, variable groups, so on 19:37
if someone in Raku community into Azure DevOps stuff, please give me a shout ;-)) 19:38
El_Che some old devops veterans like me that surviced the first Microsoft war are somewhat suspicious of Azure :) 20:20
melezhik El_Che I know. But Azure DevOps is not bad, at least from devops prospective, and this is what I am paid for 20:21
El_Che melezhik: are thinking of something generic like Terraform or is it a tool with a defined task?
melezhik AzureDevops is not about Azure infrastructure. This is basically SDLC services (CI/CD/SCM) under AzureDevops umbrella 20:22
El_Che we have a MIcrosoft devops install at work
melezhik sometime it confuse people because of strong association with Azure cloud 20:23
anyway, I am creating toolset for devops deal with daily tasks
El_Che in short: managers uses it to move tickts around and feel agile. Devs and admins use gitea/jenkins
I don't know if it the same tool
melezhik create repositories, branches, Azure Devops pipelines, group variables, bla-bla-bla
El_Che MS loves renaming stuff
melezhik whatever is possible from Rest API - docs.microsoft.com/en-us/rest/api/...s-rest-5.1 20:24
yeah, they do
it's former VSTS
El_Che melezhik: your tool will make it interesting for unix people
melezhik and been renamed lately
El_Che TFS
melezhik yeah ... 20:25
melezhik I have written a tons of code for my current project which ends in two weeks, mostly in mixture of Sparrow and Powershell 20:25
now having this expertise I am just rewriting stuff for pure Linux way 20:26
El_Che it sounds like fun
melezhik all the plugins would require Raku (Sparrow itself), curl and Bash ( and primitive Perl5 usage )
melezhik Sparrow is fun ))) 20:27
El_Che it looks like you're between ansible and terraform?
melezhik it's dirt and cheap I'd say if you look at my code, but it works and it could be run as cli or as Raku API
it's alternative to ansible in way of atomation
terraform is tool to manage infra in cloud agnostic way (networks, VMs, whatever ) 20:28
it's different
but yes Azure has API to manage cloud resources too, so one day I'd bring some Sparrow plugins for that too 20:29
for example when I worked with AWS (abit) - I had created at the end these set of plugins for AWS - repo.westus.cloudapp.azure.com/hub/search?q=aws 20:30
some of them might now work, as I still need to upgrade them to Sparrow6 ( rewritten on Raku )
but it'd give you an idea of Sparrow approach
whenever I see useful script I create a Sparrow plugin for it ))) 20:31
so the last link is alternative to terrafrom ( in a very rough level ) for aws 20:32
El_Che you're very productive :)
melezhik sometimes it feels like "addiction" - create plugins, the problem is - not many (only me?) use those plugins, but at least it helps me at my $job 20:33
though normally devops don't understand when I tell them that I make automation using Raku and Sparrow 20:34
it's like a murky world for them
El_Che there is a lot of frameworks out there. Adding a new one is a serious investment 20:36
melezhik yeah, you're right 20:43
El_Che and it's a slippery slope. I wanted to use puppet but ended writing ruby code for puppet to work around its limitations 20:53
melezhik yes, it is. you end up extending ansible by python even faster, just because programming in ansible yaml dsl is nightmare 20:54
melezhik basically Sparrow takes this approach - it's just a glue to manage scripts written on many languages through either cli API or Raku API 20:56
El_Che got to go, I just wanted to say to keep being optimistic. I felt the tone in the last ticket we both participated was somewhat edhy
melezhik yeah, I will. That is ok and thank you for encouragement ... Yeah I also need to take sometimes things easy ... ;-))) 20:57
El_Che s/edhy/edgy/ 21:00
bbl
melezhik yeah, I got that, thanks! 21:01
rypervenche Does anyone know how I might be able to get these two arrays to properly merge into an array of hashes? gist.github.com/rypervenche/ccd536...ed6ede8e1a 23:28
Or should I be perhaps doing this in a different way? 23:35
MasterDuke rypervenche: try `Z=>` instead of just `Z` 23:41
rypervenche Ooooh, I didn't know you could do that. :O
MasterDuke yeah, it's a meta-op, you can compose it with other ops (like you can with X)
and R 23:42
rypervenche Ahh, adding it to the Z doesn't do the right thing. Adding it to both Xs does what I need, but I still have the same problem with the Z part. 23:45
I'm guessing my problem is the $() bit? Last element seen: $(:before("hostname_2020-04-02_20:07:04"), :after("hostname_2020-04-02T20:07:04-05:00")) 23:46
thundergnat rypervenche: my @dir-pairs = ((('before' xx *) Z=> @before) Z, (('after' xx *) Z=> @after)); #maybe? 23:47
forest of parenthesis though.