🦋 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.
00:00 rbt joined 00:07 reportable6 left 00:08 reportable6 joined 01:08 reportable6 left, statisfiable6 left, committable6 left, sourceable6 left, linkable6 left, benchable6 left, quotable6 left, bloatable6 left, nativecallable6 left, bisectable6 left, unicodable6 left, evalable6 left, releasable6 left, greppable6 left, notable6 left, shareable6 left, coverable6 left, evalable6 joined 01:09 reportable6 joined, coverable6 joined, shareable6 joined 01:10 bisectable6 joined, bloatable6 joined, benchable6 joined, nativecallable6 joined, committable6 joined, greppable6 joined, linkable6 joined 01:11 quotable6 joined, sourceable6 joined, notable6 joined, statisfiable6 joined, releasable6 joined, unicodable6 joined
tbrowder hi, i just started a new module repo on github: YahooFinance. it has no code yet, but the README descibes its intent. please add issues for features you might use. 01:49
sorry, the module name is "YahooFunds" 01:50
02:02 m_athias left, m_athias joined 02:06 rbt left, rbt joined 02:10 Sgeo left 02:15 Sgeo joined 02:19 frost joined
drakonis seems alright 02:45
02:48 jason joined
jason hello 02:48
anyone here ?
drakonis hi? 02:51
jason I'm here to learn about Raku 02:53
drakonis there's guides for that
jason I have a presentation to do about it next week
can you refer me to ?
drakonis raku.org/resources/ 02:54
start here
docs.raku.org/language.html then there's this, i guess?
jason thank you very much
I'm gonna try to start now
thanks <3 02:55
03:18 euandreh left 03:19 euandreh joined 03:30 Guest35 left 03:36 rbt left, rbt joined 03:46 rbt left, rbt joined 04:12 rbt left, rbt joined
Geth setup-raku/dependabot/npm_and_yarn/minimist-1.2.6: 34d11ff626 | dependabot[bot]++ (committed using GitHub Web editor) | package-lock.json
Bump minimist from 1.2.5 to 1.2.6

Bumps [minimist](github.com/substack/minimist) from 1.2.5 to 1.2.6.
  - [Release notes](github.com/substack/minimist/releases)
  - [Commits](github.com/substack/minimist/compa...5...1.2.6)
  ---
... (6 more lines)
04:14
setup-raku: dependabot[bot]++ created pull request #21:
Bump minimist from 1.2.5 to 1.2.6
04:17 rbt left, rbt joined 04:22 rbt left, rbt joined 04:33 rbt left
Geth setup-raku: 34d11ff626 | dependabot[bot]++ (committed using GitHub Web editor) | package-lock.json
Bump minimist from 1.2.5 to 1.2.6

  ---
Bumps [minimist](github.com/substack/minimist) from 1.2.5 to 1.2.6.
  - [Release notes](github.com/substack/minimist/releases)
  - [Commits](github.com/substack/minimist/compa...5...1.2.6)
  ---
... (6 more lines)
04:42
setup-raku: 5e67ccf1b8 | (Shoichi Kaji)++ (committed using GitHub Web editor) | package-lock.json
Merge pull request #21 from Raku/dependabot/npm_and_yarn/minimist-1.2.6

Bump minimist from 1.2.5 to 1.2.6
setup-raku/dependabot/npm_and_yarn/ansi-regex-3.0.1: d901934774 | dependabot[bot]++ (committed using GitHub Web editor) | package-lock.json
Bump ansi-regex from 3.0.0 to 3.0.1

Bumps [ansi-regex](github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
  - [Release notes](github.com/chalk/ansi-regex/releases)
  - [Commits](github.com/chalk/ansi-regex/compar......v3.0.1)
  ---
... (6 more lines)
setup-raku: dependabot[bot]++ created pull request #22:
Bump ansi-regex from 3.0.0 to 3.0.1
04:46 xinming left 04:48 xinming joined 04:59 lichtkind_ joined
Geth setup-raku: d901934774 | dependabot[bot]++ (committed using GitHub Web editor) | package-lock.json
Bump ansi-regex from 3.0.0 to 3.0.1

Bumps [ansi-regex](github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
  - [Release notes](github.com/chalk/ansi-regex/releases)
  - [Commits](github.com/chalk/ansi-regex/compar......v3.0.1)
  ---
... (6 more lines)
05:01
setup-raku: a8b636c9f2 | (Shoichi Kaji)++ (committed using GitHub Web editor) | package-lock.json
Merge pull request #22 from Raku/dependabot/npm_and_yarn/ansi-regex-3.0.1

Bump ansi-regex from 3.0.0 to 3.0.1
05:16 Util left, Util joined 05:34 zacts joined, zacts left 05:48 rbt joined 06:00 Sgeo left 06:07 reportable6 left 06:10 reportable6 joined 06:43 mexen joined 06:54 moon-child left, moon-child joined 07:13 dakkar joined 07:40 jason left 08:40 notable6 left, greppable6 left, sourceable6 left, bloatable6 left, committable6 left, coverable6 left, shareable6 left, unicodable6 left, benchable6 left, evalable6 left, reportable6 left, nativecallable6 left, quotable6 left, releasable6 left, statisfiable6 left, linkable6 left, bisectable6 left, notable6 joined, unicodable6 joined 08:41 benchable6 joined, committable6 joined, linkable6 joined, bloatable6 joined 08:42 quotable6 joined, shareable6 joined, bisectable6 joined, releasable6 joined, greppable6 joined, statisfiable6 joined, reportable6 joined 08:43 coverable6 joined, nativecallable6 joined, _________ left, sourceable6 joined, rbt left 08:44 evalable6 joined 08:54 rbt joined 09:19 sena_kun left 09:20 sena_kun joined 09:35 Manifest0 left 09:40 frost left 09:41 Manifest0 joined 09:42 fluca1978 left 09:45 frost joined
patrickb o/ 09:56
m: my $a = "AsDf"; $a .= lc.uc; say $a;
camelia asdf
patrickb I'm WATed by the `=` in `.=` having higher precedence than `.`. I.e. `$a .= foo.bar` is not equivalent to `$a = $a.foo.bar`. 09:58
I found no test for this in roast.
Is there consensus that this is intended bahavior? (Then I'm inclined to add a respective test to roast.) Or could this classify as a bug? 10:00
lizmat m: my $a = "AsDf"; say $a .= lc.uc; say $a;
camelia ASDF
asdf
lizmat perhaps moritz has an idea about the thoughts behind this 10:01
10:01 sena_kun left
lizmat patrickb: I seem to recall there's an (old) issue for this already though 10:01
patrickb If I understand the current behavior correctly, it's equivalent to `($a = $a.lc).uc` 10:02
10:02 fitchett joined, sena_kun joined 10:14 rbt left, rbt joined
gfldex patrickb: how would you this to behave? gist.github.com/gfldex/fa28c25db4b...8deb7215ae 10:21
Nemokosch this is the same with more whitespace... 10:23
gfldex aye
But it looks different to me. Rakudo doesn't care how it looks ofc.
lizmat actually, there is a semantic difference
patrickb gfldex: From my feeling I'd still expect it to behave the same as `$a = $a.lc.uc`. 10:24
My feelings are OK with being wrong. :-)
lizmat m: no worries; say ^10.elems
camelia ^1
lizmat m: no worries; say ^10. elems
camelia ===SORRY!=== Error while compiling <tmp>
Decimal point must be followed by digit
at <tmp>:1
------> no worries; say ^10.⏏ elems
lizmat m: no worries; say ^10 .elems
camelia 10
Nemokosch you could do this with any operator lmao 10:25
my $blah = 1
+ 2;
lizmat but the whitespace .method has a lowed precedence than the no-whitespace.method
10:25 wingfold joined
lizmat *lower 10:25
patrickb m: my $a = 0; $a += 1 + 1; $a 10:26
camelia WARNINGS for <tmp>:
Useless use of $a in sink context (line 1)
patrickb m: my $a = 0; $a += 1 + 1; say $a
camelia 2
patrickb m: my $a = 0; ($a += 1) + 1; say $a
camelia WARNINGS for <tmp>:
1
Useless use of "+" in expression "($a += 1) + 1" in sink context (line 1)
patrickb m: my $a = 0; so ($a += 1) + 1; say $a 10:27
camelia WARNINGS for <tmp>:
1
Useless use of "so " in expression "so ($a += 1) +" in sink context (line 1)
patrickb m: my $a = 0; say ($a += 1) + 1; say $a
camelia 2
1
Nemokosch this is a serious enough inconsistency (I hope)
although I thought the same at least 3 times so far and I failed to even get it acknowledged that the behavior is undesirable... 10:29
patrickb Neither searching for "precedence" nor "assignment" surfaced any related bugs in rakudo/rakudo and Raku/old-issue-tracker.
Should I rakudobug?
gfldex Please do. It it is desired, it's an ENODOC (maybe in the traps section). 10:30
Nemokosch the thing is, it often feels like the traps section is a result of someone being in love with some bad decision from 8 years ago... 10:32
anyway, good luck to @patrickb 10:33
10:36 zacts joined
Voldenet m: my $a = "AsDf"; $a .= uc.say; 10:43
camelia ASDF
Voldenet I wonder if someone uses this syntax
Nemokosch both precedences would give the same result 10:44
Voldenet actually, $a could be True or 'ASDF'
10:44 Altai-man joined
Voldenet m: my $a = "asdf"; $a .= subst('a', 'b') .= subst('d', 'e'); say $a 10:47
camelia bsef
Voldenet m: my $a = 0; $a += 1 += 1; say $a 10:49
camelia Cannot modify an immutable Int (1)
in block <unit> at <tmp> line 1
Nemokosch I don't know then why I remembered that say does return the string
patrickb Rakudobuged: github.com/rakudo/rakudo/issues/4863 10:50
Nemokosch anyway, if you wish the lower precedence, you could still use `andthen`
Voldenet in non-golf code I generally try to avoid syntax that is not obvious 10:51
Nemokosch I almost never wish `andthen` to have lower precedence than the assignment but that makes sense at least
"obvious" depends on what you know though
like I'd say it's obvious what (@a, @b) = (@b, @a) should do 10:52
and it does something devilish instead
Voldenet In this case obvious is the one that is in wide use 10:53
Nemokosch it would be obvious - if it worked
the reason to avoid it isn't that it's "not obvious" but that it does something you'd never want
then I don't really see the point 10:56
Voldenet Okay, I must agree, the syntax `$a .= something.say` is terribly obscure
and I doubt anyone sane would try using it
It's obvious what `my Something $a .= new.with-a.with-b(2)` can be expected to do 10:57
Nemokosch I for one would expect it to be `$a = ($a.something.say)` 10:58
and if it works, I would even assume it to be because of the return value of say
which would be apparently a wrong assumption
patrickb Different topic: I have an environment where this fails `zef install "Inline::Perl5:ver<0.59>:auth<cpan:NINE>"` but this succeeds `zef install "Inline::Perl5:ver<0.59>:auth<github:niner>"`. And in a second environment of mine the opposite is true. 10:59
Which of the two is correct? (Inline::Perl5 is currently provided on CPAN, but lists github:niner in it's META6.json) 11:00
Voldenet the one that works 11:07
gfldex patrickb: we don't really have a spec for META6.json. So it doesn't make sense but is not wrong. 11:08
11:09 rbt left
Voldenet btw, 11:14
cpan1.json doesn't seem to have `Inline::Perl5:ver<0.59>:auth<cpan:NINE>`
patrickb Voldenet: Both work and fail depending on which rakudo environment I use. 11:16
Voldenet Hmm, which cpan mirror is used by `zef update`? 11:20
11:25 rbt joined
lizmat Voldenet: that's in zef's configuration 11:26
generally ~/.config/zef/config.json 11:27
11:35 rbt left, rbt joined
Voldenet So I see that in raw.githubusercontent.com/ugexe/Pe...cpan1.json it's pretty rare for cpan authors to use `auth<cpan:…>` 11:36
`auth` doesn't seem to contain anything useful at all 11:46
lizmat well... I guess it *is* now really time for me to write that blog post about the future of the Raku ecosystems 11:52
11:58 zacts left 12:06 frost left 12:08 reportable6 left 12:10 reportable6 joined
El_Che ecosystems 12:29
mmm :)
13:10 evalable6 left, linkable6 left 13:12 frost joined, linkable6 joined 13:13 evalable6 joined 13:20 rbt left 13:21 rbt joined 13:26 rbt left, rbt joined 13:28 zacts joined 13:31 Guest35 joined 13:35 jjido joined 13:45 melezhik joined, dogbert17 left
melezhik . 13:45
13:51 melezhik left
[Coke] bash: .: filename argument required 13:57
14:02 frost left, dogbert17 joined 14:03 Sgeo joined 14:04 melezhik joined 14:06 melezhik left 14:31 rbt left 14:55 dogbert11 joined 14:57 dogbert17 left 15:00 guifa left 15:06 guifa joined 15:11 _________ joined 15:28 MasterDuke left 15:41 rbt joined 15:51 rbt left 15:52 fitchett left 16:03 dakkar left
[Coke] wonder if we support boingboing.net/2022/04/13/the-myst...rpose.html 16:05
m: say "\c[RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW]" # of course we do 16:06
camelia
[Coke] weekly boingboing.net/2022/04/13/the-myst...rpose.html with a note that of course we support even this weirdo character.
weekly: boingboing.net/2022/04/13/the-myst...rpose.html with a note that of course we support even this weirdo character. 16:07
notable6 [Coke], Noted! (weekly)
16:09 zacts left 16:12 rbt joined 16:22 jjido left 16:37 rbt left 16:40 jjido joined 16:41 Xliff joined
japhb That was weird and interesting, thanks [Coke] 16:42
Xliff Is it possible to do regex recursion without a grammar?
Util Xliff: This says yes: docs.raku.org/language/regexes#Rec...ve_Regexes 16:47
El_Che but your eyes say no? 16:48
also: the hips don't lie
japhb m: my regex foo { '(' ~ ')' [ <~~> | a+ ] }; say '(((aaa)))' ~~ /<foo>/
camelia 「(((aaa)))」
foo => 「(((aaa)))」
japhb Interesting, the recursion doesn't become extra match levels 16:49
Xliff Util++ 16:57
16:58 jjido left, razetime joined 17:00 jjido joined 17:07 djerius left 17:09 djerius joined 17:12 razetime left 17:13 mexen left 17:18 Altai-man left
guifa m: my regex foo { '(' ~ ')' [ $<b>=<~~> | a+ ] }; say '(((aaa)))' ~~ /<foo>/ 17:30
camelia 「(((aaa)))」
foo => 「(((aaa)))」
b => 「((aaa))」
b => 「(aaa)」
guifa m: my regex foo { '(' ~ ')' [ $<foo>=<~~> | a+ ] }; say '(((aaa)))' ~~ /<foo>/
camelia 「(((aaa)))」
foo => 「(((aaa)))」
foo => 「((aaa))」
foo => 「(aaa)」
guifa japhb: ^^ I mean, easily enough solved :-) 17:31
17:51 dogbert17 joined 17:53 dogbert11 left
japhb guifa: Oh sure, I just was a bit surprised it does not form a capture layer by *default*. 18:02
18:06 discord-raku-bot left, discord-raku-bot joined 18:08 reportable6 left 18:11 reportable6 joined 18:13 rbt joined 18:17 wingfold left 18:21 sena_kun left 18:23 sena_kun joined 18:24 sena_kun left 18:26 sena_kun joined 18:27 dogbert11 joined 18:28 dogbert17 left 18:39 ugexe joined
ugexe hello! does anyone work in a production environment where it is not considered bad form to commit to master? 18:39
i'm curious if the places i've worked have been particularly strict, or if thats a normal thing 18:40
jast seems pretty normal to me 18:44
at my work place, all changes go through code review
ugexe right, that is what i would expect 18:45
jast we do merge PRs directly to master after review, but that's not the normal case, it's really only for emergency fixes after a release
most PRs go to development or hotfix (which we release about once per week)
in any case the master branch is marked as "protected" so only the owner can push directly to it. I have production access everywhere but I'd still need a review to get something onto master. 18:46
ugexe what do you do with broken commits that are fixed in later commits? do you merge the broken commits into master or do they generally get squashed away before that? 18:47
lizmat jast: how many people do reviews ?
jast so many questions at once :) 18:48
18:48 MasterDuke joined
jast we don't have a super formalized process really 18:48
pretty much all developers do reviews on a regular basis, how many reviews we do on a single PR depends on its complexity (or the potential fallout) 18:49
reviews will tend to go to the person most familiar with that part of the code base (PR's author excluded)
as for how fixes are handled... to start off with, when a PR gets merged, most of the time it will be squashed, except for really complex changes. I'm not entirely on board with this approach but I don't mind it *that* much, and it definitely beats merging a mess of commits made with poor hygiene 18:50
if a problem is caught before that happens, it'll just end up squashed together 18:51
otherwise it depends on how far along the release and QA gauntlet we are
ugexe thanks for the explanation, that pretty much aligns with my experiences as well fwiw 18:52
jast if we haven't frozen the development branch yet, a simple follow-up PR to development. if we *have* frozen development (which we do by merging it over to hotfix) and we have a consensus that the change is not too risky, a PR for hotfix is made.
18:53 rbt left, rbt joined
lizmat jast: "pretty much all developers do reviews" how many ? 18:53
japhb ugexe: I've worked at at least one place where the PR-equivalent had to be squashed to merge, because you weren't allowed to have any commits on the mainline that would fail CI or otherwise result in broken builds. 18:54
SmokeMachine m: say (my $a = “aBcD”) .= lc .= uc; say $a 18:56
camelia ABCD
ABCD
ugexe how many might not be relevant when the PRs are handled by the "the person most familiar with that part of the code base" handles it
jast lizmat: counting the people who don't do full time dev work, 10 right now (plus reviews for translations and such which happen independently of code reviews but use the same review process) 18:57
lizmat so maybe 5 FTE?
jast 7... with an almost even split between frontend and backend 18:58
hm, I must have miscounted when I said 10
12 actually
12 actually 18:59
lizmat I wish we had 7 FTE working on Rakudo 19:00
ugexe I've put it out there I am willing to review all CUR related PRs
jast unfortunately my work has no overlap whatsoever with Rakudo 19:01
nor my private stuff tbh, I don't really have anything planned where Rakudo would be a good fit, which is really sad 19:02
or, shall we say, Raku
19:03 rbt left
lizmat ugexe: invitation accepted 19:05
ugexe thanks!
lizmat I assume you meant anything in CompUnit::xxx namespaces, right ? 19:06
ugexe Yes, or Distribution
lizmat ack
19:15 dogbert17 joined 19:18 dogbert11 left 19:23 ajr joined 19:32 dogbert17 left 19:37 n1to joined 19:47 jjido left 19:51 dogbert17 joined 20:05 dogbert11 joined, dogbert17 left 20:16 dogbert11 left 20:24 dogbert11 joined 20:27 dogbert17 joined, dogbert11 left, ajr left 20:47 sena_kun left 20:48 sena_kun joined 20:56 dogbert11 joined, dogbert17 left, londoed joined 20:59 jjido joined 21:19 ajr joined 21:24 Xliff left 21:25 ajr left 21:26 lichtkind__ joined 21:29 rbt joined, lichtkind_ left 21:34 rbt left, rbt joined 21:41 melezhik joined
melezhik hi SmokeMachine! SparkyCI for Red+PgSQL fails - sparrowhub.io:2222/report/119 21:41
I guess because of this - `Type check failed in binding to parameter '$!port'; expected Int but got Str ("5432")` 21:42
which is obvious as port is passed as a part of env variable - `RED_DATABASE=Pg host=localhost port=5432 user=testuser password=testpass dbname=redtest` 21:43
I am building for my branch - github.com/melezhik/Red/blob/maste...rkyci.yaml 21:45
you can pickup `.sparkyci.yaml` from there and test from your repo
you just need to login into SparkyCI and push "sync repos" button and then add Red to your repos 21:46
and not to forget to add `.sparkyci.yaml` to the root of your GH repo before
21:47 yodabyte0 joined, djerius left 21:49 djerius joined
spacekookie Oh I just realised that Raku doesn't have a json parser in its stdlib :( I was gonna write a small CI script in it but I don't really want to have to install stuff via zef in CI 21:49
I guess maybe I could pick a different format that's easier to hack a gramar together for 21:50
21:53 melezhik left 21:54 ajr joined
japhb spacekookie: A JSON parser grammar is really easy in Raku; see github.com/moritz/json/blob/master...Grammar.pm 21:55
There *is* a JSON parser in the core, but it's considered "Rakudo internal". You can reach it, if you need to, but mostly it exists for internal use. It's a fork of JSON::Fast, IIRC. 21:56
Gripping hand though is I'm not sure how you're going to avoid doing zef installs in CI -- nearly every module you test will have dependencies that need to be installed first anyway. 21:57
spacekookie hmmm 21:58
21:58 ajr left 22:00 Manifest0 left 22:02 simcop2387 left, ajr joined, perlbot left, n1to left 22:04 Manifest0 joined
spacekookie that gramar is making the emacs syntax highlighter very sad lol 22:06
moon-child perhaps rakudo star should be revived 22:08
22:10 simcop2387 joined 22:11 perlbot joined 22:15 jjido left 22:30 Manifest0 left 22:55 guifa left 22:59 rbt left, rbt joined 23:05 rbt left, rbt joined 23:10 rbt left, rbt joined 23:20 lichtkind__ left 23:27 yodabyte0 left