🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
atroxaper What if I need version higher then 1.5 but not 2. I thought that 1.5+ is what I need, but... 08:17
m: v2.0.0 ~~ v1.5+
camelia ( no output )
atroxaper m: say v2.0.0 ~~ v1.5+ 08:18
camelia True
atroxaper As I see in version.t, such logic was not provided at all. 08:46
lizmat atroxaper: I think :api was more foreseen for these types of situations? 10:01
tellable6 lizmat, I'll pass your message to atroxaper
lizmat clickbaits rakudoweekly.blog/2021/12/20/2021-...ransiting/ 10:07
Anton Antonov @lizmat I find your update of `Acme::Text::UnsideDown` instructive. (The CLI part.) 10:08
lizmat nice :-) 10:09
I was thinking of adding 🙃 , but am unsure of what the counterpart should be
I guess 🙂 10:12
Anton Antonov @lizmat Right! I was thinking about non-English / non-Latin characters too. 10:15
@lizmat BTW, I am intensively working on the "Raku for Data Wrangling" article. There are just lots of little things to clear-up. (E.g. program and completely understand...) 10:17
lizmat do you intend that as an Advent blog post ?
Anton Antonov Yes. I will put a draft in GitHub within 2 hours. 10:19
As far as I know I missed the deadline for FOSDEM22
moritz_ wasn't that extended to 2021-12-31?
lizmat indeed, extended to 31-12! 10:20
Anton Antonov <@171354420292878346>tz_ and @lizmat Great then! 10:21
CIAvash m: say v2.0.0 ~~ v1.5 ..^ v2 10:28
camelia False
moon-child hmm, now I am thinking 10:29
there should be range junctions
CIAvash atroxaper: maybe `v2.0.0 ~~ v1.5 ..^ v2` 10:30
tellable6 CIAvash, I'll pass your message to atroxaper
moon-child hmm, no, that wouldn't work 10:31
junctions need to be discrete for dispatch 10:32
:/
lizmat Anton Antonov: PRs accepted :-) 10:34
ugexe v1.* 11:08
Yeah guess that isn’t quite it either
I’d just treat it like two expressions 11:11
atroxaper lizmat: yes. I've already figured that out. I prepare a post about versioning at all and in Raku in particular. 11:35
tellable6 2021-12-21T10:01:12Z #raku <lizmat> atroxaper: I think :api was more foreseen for these types of situations?
2021-12-21T10:30:33Z #raku <CIAvash> atroxaper: maybe `v2.0.0 ~~ v1.5 ..^ v2`
atroxaper tellable6: I think I cannot write Module:ver<1.5 .. ^2> ^^ 11:41
tellable6 atroxaper, I haven't seen I around, did you mean I`?
atroxaper CIAvash: I think I cannot write Module:ver<1.5 .. ^2> ^^
lizmat atroxaper: indeed, one cannot atm, but I don't see why that syntax couldn't be supported in a use statement 11:42
I assume you'd still want the highest version number in that range, right ?
atroxaper lizmat: yes. 11:43
lizmat that *should* be doable, I guess... :-)
atroxaper lizmat: In languages without API option in versioning the first digit is an api version, you know that. Usecase: I 'know' that some functionality is appears in version 1.5. But I want to be safe and do not use v2 automatically. 11:46
lizmat understood 11:47
xinming releasable6: status 12:26
releasable6 xinming, Next release will happen when it's ready. 3 blockers. 0 out of 188 commits logged (⚠ 18 warnings)
xinming, Details: gist.github.com/8cfbcaab16868cffa1...9a3e4f4cea
xinming Waiting for the xmas release. :-)
lizmat jdv is still on it afaik :-) 12:27
Geth ecosystem: abeff82834 | (Elizabeth Mattijsen)++ | META.list
Slang::Roman now lives in the zef ecosystem

  raku.land/zef:raku-community-modul...ang::Roman
12:32
MasterDuke  i don't know why github.com/rakudo/rakudo/issues/4314 is marked as a blocker, and i think github.com/rakudo/rakudo/issues/4593 can be closed 12:35
lizmat MasterDuke: unmarked and closed 12:37
atroxaper lizmat: one more thing about range in :ver<>. We will need something appropriate in META6->depends then. 14:17
[Coke] raku-advent.blog/2021/12/21/day-21...ing-along/ - code formatting looks a little odd. 14:56
ugexe versions are already ranges 15:26
1.* is a range. 1.5+ is a range 15:27
which is to say syntax like v1 ~~ vX .. vZ wouldnt really work
we have api, perhaps we should just use that 15:28
you have your api range, and your version range 15:29
Foo:api<1>:ver<0.5+>
version literals also complicate things 15:32
m: say v1.1..^1
camelia v1.1..^1
ugexe so im not sure trying to cram semver semantics into our existing version semantics has been given sufficient forethought 15:33
to be clear im not against it, just pointing out the problems 15:39
atroxaper ugexe: I was just surprised that 2.0~~1.5+ is true. Not all authors observe cleanliness in versioning. I would like to be able to depend on such projects more flexibly. If I could write something like 2.0!~~1.5? is true, it would be great. 17:03
In any case, there is a need to tell people how, in what cases and why to use versions in the projects. I plan to write an article about it.
Python and Java, for example, have closed project environment (venv and jar). Raku has a shared place for all libraries. And in our case, the attention to versioning (both on the part of the authors and on the part of the users) should be high. I think.
ugexe you just need to check api and version separately
$dist.meta<api> ~~ 1.* && $dist.meta<ver> ~~ 0.5+ 17:04
that relies on the author versioning their stuff in the idiomatic raku way, but that would be the case regardless of what versioning semantics were used 17:05
atroxaper ugexe: I completely agree with the last sentence. 17:08
atroxaper ugexe: I didn't find in the documentation some simple recipe for "do this, but don't do that." For example, it was a finding for me (although obvious) that writing a version in META6 depends section is not enough - you also need to write a version in use. In addition, I still cannot understand what usage can be found for specifying the version and authorship over a specific class in the code (class A: version<1> {... }) - because the use op 17:14
erates with the concept of compunit, but not package.
ugexe then again the synopsis said that 6.2.3+ should match 6.2.* 17:15
well you could set your in-code version/authorship with the data from the meta6.json 17:16
atroxaper verstion.t disagree :)
ugexe sure, the synopsis were written like 20 years ago and aren't the spec 17:17
atroxaper yes.
ugexe class Foo:ver($?DISTRIBUTION.meta<ver>) { } 17:19
evalable6 Use of Nil in string context
atroxaper ugexe: but for what I would need to set in-code (not in use statement) version/authorship at all?
ugexe i dunno, you tell me 17:20
atroxaper WOW! Cool! I didn't know about $?DISTRIBUTION.meta<ver>.
ugexe yep, and you can `use Module::In::My::Dist:ver($?DISTRIBUTION.meta<ver>);` as well
atroxaper localhost:3000/language/typesystem#...I_version. I can set version for class. But... I don't know why. And nobody do not know. Until I started to deal with versioning through experiments, this possibility confused me. 17:22
ugexe i dont think its really used by anything 17:23
atroxaper bad link docs.raku.org/language/typesystem#...I_version.
ugexe i'd probably just mention that at all 17:25
not mention^
atroxaper ugexe: yes! And it confused me. For example, I think "the smart guy FCO write this. For what?!' github.com/FCO/Red/blob/master/lib/Red.pm6#L25
'Should I write that too?...' 17:26
kybr do we have argmin? or the like? 20:08
lizmat kybrL what does argmin do? 20:18
kybr: what does argmin do?
kybr m: sub argmin(@list) { my $min-i = -1; my $min = Inf; for @list.kv -> \k, \v { if v < $min { $min = v; $min-i = k; } } $min-i, $min } 20:27
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> v < $min { $min = v; $min-i = k; } }⏏ $min-i, $min }
kybr darn. sorry. return the index of the element with the lowest value
a common function in MATLAB-y environments. R, numpy, etc. 20:28
lizmat kybr: is that the first lowest value, or all lowest values?
kybr hmmm. first will do, but i could see a argument for all. 20:29
gfldex kybr: We hardly ever work with indexes, because they can be a little brittle. You can get the smallest element with `[min] @list`.
kybr i thought there might be a more rakuvian way to do it
gfldex: thanks. yes. i love the [x] op. I found `[Z] $list` to do a sort of matrix transpose the other day 20:30
[Coke] m: sug argmin(@list) { @list.pairs.sort(*.value)[0].key}; argmin(<5 6 3 1 0 2 4>).say 20:38
camelia ===SORRY!=== Error while compiling <tmp>
Variable '@list' is not declared. Did you mean any of these: '&list',
'&last', '&gist', 'List'?
at <tmp>:1
------> sug argmin(⏏@list) { @list.pairs.sort(*.value)[0].ke
[Coke] m: sub argmin(@list) { @list.pairs.sort(*.value)[0].key}; argmin(<5 6 3 1 0 2 4>).say
camelia 4
[Coke] that gets all the key/value combos as pairs, sorts them by value, and then gets the position of the first sorted pair. 20:39
(assuming you do need index) 20:40
SmokeMachine .tell atroxaper maybe FCO is not that smart… :) but Red has :ver there because it’s updated by Mi6 and I could be wrong but I think that broke mi6 release when I removed that… 21:06
tellable6 SmokeMachine, I'll pass your message to atroxaper
melezhik I gave been playing with Sparky JobAPI. It turns out that Sparky async jobs work really well with Raku embedded async features - github.com/melezhik/sparky#job-api 21:14
tellable6 2021-12-17T15:34:23Z #raku <tbrowder> melezhik thanks
melezhik some examples are here
I am not sure if this is possible in any existing CICD system - for examplescontrolled recursive builds  :] 21:15
technically it give an extreme freedom to write CICD pipelines and workflows of any complexity ... and all Raku async none blocking fashion 21:16
plus Sparky itself runs jobs (builds) asynchronously - in a sense - as parallel jobs - processes 21:17
while high level scenario would wait till jobs are finished using supply/tap/Curlie HTTP
Skarsnik m: grammar A {...}; grammar B is A {token TOP {piko}}; grammar A {token foo {foo}} 21:48
Skarsnik m: grammar A {...}; grammar B is A {token TOP {piko}}; grammar A {token foo {foo}} 21:48
camelia ===SORRY!=== Error while compiling <tmp>
'B' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed)
at <tmp>:1
Skarsnik I guess that only work for class? 21:49
ugexe m: class A {...}; class B is A { }; class A { } 21:51
camelia ===SORRY!=== Error while compiling <tmp>
'B' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed)
at <tmp>:1
Skarsnik (A is generated for me, I would rather have it at the end of the file ^^)
I am not sure I could put A in its own file since it inherit another grammar from the same file as B 21:57
[Coke] is boosted. 22:12
lizmat hopes to get one on the 25th 22:15
MasterDuke got boosted on thursday right into bed for most of the day friday 22:22
Skarsnik part 3 of my dumb thing x) blogs.perl.org/users/sylvain_coline...day-3.html 22:25
[Coke] heh. it's only been an hour or so. I expect I'll feel like crap tomorrow (I'm off work until Jan)
Skarsnik nice ^^ 22:27
I wish I did not have to work until January. 22:29
thowe my booster pretty much killed the next day for me, too 22:46
[Coke] I had a lot of vacation time that I had to squeeze in or lose it, and our company gives everyone the week between xmas & nye off! 22:48
thowe nice 22:51
lizmat booster for x-mas is a bit of a mixed blessing, I guess. :)
lizmat yeah, and that would also be on my birthday :-) 22:52
fortunately, I celebrate my birthday always in summer :-)
thowe No kidding! I'll raise my Saturday morning coffee mug in your honor. 22:53
lizmat thank you :-)
tbrowder and i, too!
[Coke] best of luck all around. 22:54
tbrowder as a new year’s eve baby i empathize
Skarsnik I have another shot the 24, I hope that will not ruin the we x) 22:55
thowe Merry Boosterx! May spike proteins bless us, everyone! 22:56
lizmat meanwhile, search results on logs.liz.nl now have highlighting of the needle(s) in the messages :-) 22:58
e.g. logs.liz.nl/search.html?query=f.o&...annel=raku 22:59
and with that /me calls it a day
MasterDuke nice. lizmat++ 23:03
thowe I don't understand the difference between say and put and at this point I'm too afraid to ask. 23:06
lizmat say is: print foo.gist ~ "\n" 23:07
put is: print foo.Str ~ "\n"
thowe oh, gist vs Str