🦋 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.
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
drakonis seems alright 02:45
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
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
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
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
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
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
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
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
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'
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
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
lizmat Voldenet: that's in zef's configuration 11:26
generally ~/.config/zef/config.json 11:27
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
El_Che ecosystems 12:29
mmm :)
melezhik . 13:45
[Coke] bash: .: filename argument required 13:57
[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)
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
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
japhb guifa: Oh sure, I just was a bit surprised it does not form a capture layer by *default*. 18:02
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
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.
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
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
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
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
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
spacekookie that gramar is making the emacs syntax highlighter very sad lol 22:06
moon-child perhaps rakudo star should be revived 22:08