🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
02:21 sjn left 07:16 guifa left
ab5tract Is it a bug to not be able to use `need` to bring in multi candidates from multiple modules? 08:33
m: module A { multi sub s() is export { "S!"; callsame(5) } }; module B { multi sub s(Int $i) is export { "$i!!!" } }; module C { need A; need B; sub f() is export { s() } }; import C; f
camelia ===SORRY!=== Error while compiling <tmp>
A symbol '&s' has already been exported
at <tmp>:1
08:36 finanalyst joined 08:37 dev2 joined
dev2 hi 08:39
I was wondering about the state of the operator precendece parser. What the current issues are, what features does it lack.
ab5tract I don't mean to say it is perfect, but I'm not aware of any glaring deficiencies 08:44
dev2 For one thing, I remember reading somewhere that user defined operators of a certain associativity silently didn't work or something. 08:49
Then there is the fact that, inside the ternary operator, putting a low precedece operator automatically leads to a syntax error. Maybe it's part of the spec and is unfixable but most users would assume that you can put an arbitrary expression inside. The current behavior doesn't buy you anything. 08:50
Then the parsing of the metaoperator seems highly dodgy. 08:51
Also, since the ternary operator behavior always result in a syntax error, fixing its behavior would result in zero breaking change. 08:53
ab5tract If any of these are missing from the current bug tracker, it would be great if you could add them 09:03
Anyway, I don't think there is a separate "thing" that is the operator precedence parser. There's just the parser. 09:04
I'd need to see an example of the ternary operator problem you mention 09:05
Also, I would be interested to hear what about metaoperators is dodgy
Other than the long-discussed issues with METAOP_NEGATE
dev2 I guess but that's not why I'm here. I almost finished a pretty neat standalone operator precedence parser that can handle a lot of things: prefix, postfix, infix, ternary, circumfix and postcircumfix and almost all the different assoicativities that Raku needs. So I was asking for specfic details so that I can finish it or extend it and give it to you, so that you can replace the old one by mine. 09:12
I hope your philsophing or whatever. The recursive descent parser is pretty different than the operator precedence one, but yeah they are tightly integreated and call each others. 09:15
for the ternary operator:
my $a = 10; say 1 ?? $a = 2 !! 3;
my $a = 10; say 1 ?? $a, 2 !! 3;
Concerning the metaoperators, again I hope your joking. The whole thing feels like a big hack. Look at how many boolean variables in relies on, lookahead, and even a freaking regex match inside the parser. And they are handled by the recursive descent parser. Theoretically, each metaoperator could be parsed by a specially dediacted operator precedence parser where the terms are the normal operators (+, -, etc..) and where the operators are the 09:23
metaoperators (prefix metaoperators, postfix metaoperators, circumfix metaoperators).
10:25 dev2 left
nine dev2: I'm quite sure the refusal to accept low precedence operators in a ternary is to provide a useful message when someone does this accidentally, like in my $foo = $bar ?? baz or die "not what I expected" 13:29
tellable6 nine, I'll pass your message to dev2
[Coke] back in an hour or so to finish the release - timo, if you have any fixups for the Changelog, now's the time! 13:35
13:37 guifa joined
[Coke] starting the moarvm release. 15:06
moarvm branch is telling me it has "new commits" in 3rdparty/mimalloc. I didn't change anything there, wtf. 15:21
"submodule update" 15:22
jdv: here's the failure I'm getting in moarvm on make release: 15:32
gist.github.com/coke/c24f7e6e4cc2e...bc09cb571e
Note that doing a release of 2025.040 *works* but then generates a tar file with the wrong name that I have to rename. 15:33
So I really wish we could explain why the release branches have that extra 0, because it appears to be incorrect.
This is, I believe, the root cause of the bad time stamps on the first run I did, because using 2025.040 as the release VERSION seems to work with either tar 15:34
jdv im unfortunately out and aboit 15:35
maybe send me you sh hist? ive never had that issue... 15:36
[Coke] Yup, I have workarounds, just writing it down and updating the release guide this time. We can figure out why you and I are having different experiences later.
jdv i can be online for real in an hpur or so. on dumbphone atm
[Coke] it's definitely the extra 0 on the branch name. 15:43
No worries, the release is fine
We do have to figure out at some point why it works when you use the extra 0 on the release. Looking at the code, it seems impossible. 15:44
moarvm release done (except for merging the moarvm.org PR) 16:13
I'm not going to update the Changelog given it was only 2 small nits. 16:45
Up to 'stresstest on master'
16:55 donaldh left
[Coke] SmokeMachine: you around? 16:59
SmokeMachine [Coke]: yes, but without access to a computer 17:00
[Coke] OK, no worries, doing a one off test on Red right now 17:14
SmokeMachine Oh! Great! Thanks! 17:16
17:16 dev2 joined
dev2 nine: I really don't think this is the case. The orginal? ternary operator from C works fine with low precedence operator in this position whereas Perl, Ruby, Raku, JavaScript and PHP all have this problem. I'm pretty sure that everyone fucked this up because the authors of those languages either didn't pay attention to this detail, or possibly that it's not trivial to implement it in YACC. Yacc doesn't have a %ternary directive after all, only 17:17
%infix which is what Perl's yacc grammar uses for '?' and ':'. The original C parser was a hybrid recursive descent and operator precedence parser and my guess is that the ternary was handled with the rec descent parser which called parse_expression() in the middle of the ternary.
tellable6 2025-04-19T13:29:19Z #raku-dev <nine> dev2: I'm quite sure the refusal to accept low precedence operators in a ternary is to provide a useful message when someone does this accidentally, like in my $foo = $bar ?? baz or die "not what I expected"
dev2 ty telltable6 bot 17:18
17:28 sjn joined
[Coke] Red installed no issues with rakudo head 17:29
jdv my guess is its just a diffferent interpretation of the relase guide 17:34
[Coke] Could be. 17:37
Have some verbiage changes we can run through before .05
jdv i think the last set of changes to the moarvm release guide made it more confusing 17:39
[Coke] So yes, let's review, because without my changes, it works even worse here. :) 17:41
jdv doing a partial mock moarvm release locally. i'll show you in a minute...
[Coke] perhaps today's revisions will help, who knows.
jdv gist.github.com/jdv/6908ee968f940c...7547435725 17:49
is that what you see for that portion?
SmokeMachine [Coke]: great! Thanks!
jdv I think you've focused on this extra zero thing a bit too hard and have confused it
[Coke] ... There were many branches with the extra 0, and you said you were using it. 17:50
Your example there is not. 17:51
So, yes, that would be why it's not working for me.
and my fixes today are "don't use the extra 0, it's broken"
jdv this change - github.com/MoarVM/MoarVM/commit/a0...47a1101888 - is technically wrong
its only the remote that has a trailing 0
and like i've said before i think its just to disambiguate with the tage 17:52
*tag
[Coke] OK. this clarification would have been great months ago. :)
jdv if its too confusing maybe we just use a different branch naming scheme
[Coke] You don't need it to disambiguate with the tag, you can be explicit in referring to "branch with this name" vs. "tag with this name"
jdv you're the one that updated the guide
japhb dev2: Other languages don't have ternary at the same precedence as C does, because C was wrong on this. The change was intentional, and not because every language from the 90s "fucked this up".
[Coke] Yes, after a conversation with you about it 17:53
Great, glad we're in agreement now, at least.
jdv i just followed hte guide and looked at how it was done before me:)
[Coke] OK. I'm stepping away from this convo and finishing the release. 17:54
17:54 [Coke] left
jdv except by default the "ref namespace" includes tags and branches - its just speculation on my part as to why it was done like that. 17:57
Geth nqp/main: d18068bf9b | (Will Coleda)++ | tools/templates/MOAR_REVISION
[release] Bump MoarVM revision to 2025.04
nqp/main: 447549dd76 | (Will Coleda)++ | VERSION
[release] Bump VERSION to 2025.04
rakudo/release-2025.04: 9d3bdad34e | (Will Coleda)++ | tools/templates/NQP_REVISION
[release] Bump NQP revision to 2025.04
17:57 [Coke] joined
rakudo/release-2025.04: 57778e4320 | (Will Coleda)++ | VERSION
[release] Bump VERSION to 2025.04
[Coke] remote: This repository moved. Please use the new location: 17:58
(seen in the ake file output)
jdv uh oh 17:59
[Coke] Akefile still has perl6 in it somewhere.
jdv did someone rename a master to a main again?
oh...
Geth rakudo: coke self-assigned Update old github 'perl6' reference. github.com/rakudo/rakudo/issues/5860
coke++ created pull request #5861: Release 2025.04
18:01
dev2 japhb: It doesn't matter at exact level the ternary operator is. In C as in other languages, the ternary operator has low precedence but is not the lowest precedence operator, so the precedence situation is equivalent. I believe that C parses the middle of the ternary the same way the inside of a parenthesized expression is parsed, and that the other languages treat '?' and ':' as infix operators. They bind the operands of the lower precedence 18:08
operator inside and at this point the parse tree is completely non-sensical and the parse always fails. That's the only explanation that makes sense.
Geth rakudo/main: 4 commits pushed by (Will Coleda)++ 18:44
lizmat [Coke]++ 18:59
Geth rakudo/coke/releng2: d4288c6ec4 | (Will Coleda)++ | docs/release_guide.pod
more notes
19:00
19:00 donaldh joined
Geth rakudo/coke/releng2: 8 commits pushed by (Will Coleda)++ 19:01
[Coke] afk for a bit 19:02
dev2 good night 19:20
19:20 dev2 left
Geth rakudo/main: 298fed53f2 | (Will Coleda)++ | tools/releasable/Akefile
Track github group rename

Fixes #5860
19:34
[Coke] jdv: do you care if tools/release-dates.raku does anything other than show the numbers for the next few releases? right now it tries to work for any year you give it (and gets it wrong) 20:26
timo sorry i was too late for the changelog fixup question 20:55
jdv i've only used it for the "current" release 21:02
i guess if its easier to just make that work, whatever
maybe it can be made working fancy at a later date
[Coke]: ^
nice on the release. nothing went wrong except the usual on the moarvm side of the house?
21:44 finanalyst left 22:00 rakkable left, rakkable joined