00:21 jjido left 01:08 wayland joined, wayland76 left 01:37 hulk joined, kylese left 01:51 hvxgr left 02:15 hulk left, kylese joined 02:30 nine left 02:35 nine joined 03:06 sibl joined
xinming multi MAIN ($x where 'a' = 'a') { $x.say; }; multi MAIN ($x where 'b' = 'b') { $x.say; } 04:50
evalable6 a
xinming with this example, Is there shorter way to remove not duplicate the $x where 'a' = 'a' part? 04:51
I mean the $x where 'a' = 'a', remove the duplicated 'a' here. 04:52
vlad__ if 1 { say $x }; 04:56
or just say $x
xinming vlad__: I mean the signature part
vlad__ no clue
but someone will wake up who does have a clue
hang about 04:57
vlad__ suddenly notices he's in #raku and not #perl 04:59
05:01 sibl left 05:21 sibl joined 05:35 hurufu joined 05:37 hurufu left 05:38 hurufu joined
sibl is it still briged with Discord ? 05:44
tellable6 2026-07-20T03:51:02Z #raku <wayland76> sibl That has been mentioned as a problem.
06:02 sibl left, sibl joined 06:35 hwj joined 06:44 sibl left, sibl joined
wayland m: multi MAIN ($x where 'a') { $x.say; }; multi MAIN ($x where 'b' ) { $x.say; } 06:55
camelia Usage:
<tmp> <x>
<tmp> <x>
wayland xinming: Interesting! I'm not sure I understand what you're trying to achieve though. If we knew that, we might be able to help better. 06:57
07:06 Sgeo left 07:26 kylese left 07:31 kylese joined 07:59 dakkar joined 08:57 wayland left 09:28 eseyman left 10:06 sergot joined 10:12 sibl left 10:25 hurufu left, hurufu joined 10:32 sp1983 joined
sp1983 news.ycombinator.com/item?id=49004510 10:32
10:35 sp1983 left 10:58 manu_ joined, manu_ is now known as eseyman 12:40 hurufu left 13:06 sftp left 13:29 hurufu joined
ab5tract Where clauses should fail loudly when you are using assign instead of equality 14:09
Though actually I’ve enjoyed using assignment in clever ways with where clauses. So maybe a worry is enough, as those are straightforward to suppress 14:10
timo i think that's not an assignment but the default value 14:23
14:33 acidsys left
Voldenet m: multi MAIN ($x where "a"|"b" = "a") { $x.say; }; # xinming 14:34
camelia a
Voldenet if you mean that you want "a" to be the default and also constraint, then you can't avoid duplication I think 14:35
m: constant a = "a"; multi MAIN ($x where a = a) { $x.say; }; # maybe this 14:36
camelia a
Voldenet it doesn't entirely remove the duplication, but you can change the value in one spot 14:38
ugexe a subset would read better 14:42
timo where clauses on optional parameters have this problem of having to supply a default that matches the where clause :(
Voldenet yeah, subset would definitely read better otherwise it's confusing syntax 14:52
usage generated is quite useless anyway 14:54
14:55 acidsys joined 14:59 Aedil left
Voldenet otoh subset can be named and may show up in some usage contexts, e.g. `multi sub MAIN(SomeSubset :$x)` will show the subset name, and adding `#= ` comment will throw in default value 15:01
I wonder if usage could use some description for the subset instead of the type, in the case above it's always SomeSubset 15:05
15:05 Aedil joined 15:10 human-blip left 15:12 human-blip joined 15:34 hwj left 15:35 hwj joined
timo we can set a .WHY on the subset type can't we? that'd be sensible to output in the generated help / usage 16:02
16:31 dakkar left 16:46 Geth joined
Voldenet possibly, I think currently it's always ^name: github.com/rakudo/rakudo/blob/main...kumod#L318 16:53
ugexe that does seem to couple generated help output to .WHY in a way that wouldn't always make sense. for example the way i might describe a subset for a generated help may not be the same as i'd otherwise write to describe 'why'. describing the constraint in english feels more akin to describing 'what' 17:01
timo time to introduce .HUH 17:02
ugexe although being able to do like `#| A string with 'a'` inside of the main signature itself on the parameter might be fine
timo doing that doesn't already have an effect? 17:04
Voldenet this is what I do and while it kind of works, it requires some typing 17:05
ugexe yeah i guess it does work 17:06
Voldenet especially if you repeat have a parameter inside multiple MAINs 17:08
s/have/;
I had this idea to support proto MAIN to make this slightly easier
ugexe i tried to prototype a shared reusable signature thing that could flatten into another signature definition ala my $shared-sigs = |(...); MAIN(||$my-shared-sigs) { ... } but i gave up after hitting some compile time vs runtime impedance 17:12
[Coke] Users: how do you use install/use rakudo? How often do you upgrade? (if you commit to any of moarvm/nqp/rakudo, your vote doesn't count for these purposes :) 17:28
Voldenet m: my constant XY = :(Int $x, Str $y); BEGIN say XY # probably something like this
camelia (Int $x, Str $y)
===SORRY!===
QAST::Block with cuid 1 has not appeared
Voldenet in fact signature can't become constant too
timo [Coke]: builds georg who sits in a datacenter and builds every single commit, usually multiple times in a row, is an outlier adn shouldn't have been counted 17:30
[Coke] c: abcd 3.say 17:31
committable6 [Coke], ¦abcd: Ā«Cannot find this revision (did you mean ā€œv6.cā€?)Ā»
[Coke] c: 3.say
committable6 [Coke], I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Committable
[Coke] c: 467694501 3.say
committable6 [Coke], ¦4676945: «3␤»
[Coke] ^^ georg
timo yup, that and our CI 17:33
Voldenet on the VMs where I use rakudo I only update when I need a new feature or bugfix 17:35
I'm pretty sure that's how it goes for anything
[Coke] I ask with the thought of reducing our release schedule from monthly. 17:36
to 4 to 6 times a year, or ad hoc, or..
Voldenet the model of monthly releasing is not that popular, iirc java, golang and node release versions every 6 months 17:44
there are things like .net that update monthly, but there's been exceptions to this rule as well 17:45
so some patch releases were skipped
coleman who is georg 18:21
timo Spiders Georg
en.wikipedia.org/wiki/Spiders_Georg actually has a wikipedia article! 18:22
coleman okay I was very online in 2013 but this one missed me 18:23
timo it's a delightful little joke
19:08 elcaro left 19:27 hurufu left 20:10 hwj left
SmokeMachine [Coke]: Could you tell me if any of these work for you? fco.github.io/Raku-Playground/webk...-test.html 20:12
[Coke] SmokeMachine: b-d all render 20:22
a does not (this on DDG on mac)
in chrome a-e all work.
firefox a-e work. 20:23
oh, wait. one sec.
yup. what I said
SmokeMachine [Coke]: thanks! 20:29
20:29 jjido joined
SmokeMachine [Coke]: Can you see if it's working now? fco.github.io/Raku-Playground 20:41
[Coke] /win 12 20:42
verified jdv will eventually come back, but that's a few months out. 21:12
ww 21:13
SmokeMachine [Coke]: please, let me know how it goes when you have time to test it... 21:16
[Coke] that URL works the same as before on #6 21:54
the rock tile is colored by no rock.
(on DDG) 21:55
and it shows up if I find just the right viewing angle
22:07 Sgeo joined 22:34 jjido left 23:01 human-blip left 23:05 wayland76 joined
wayland76 Just a heads-up that one of my next projects (ie. something I'm probably going to release in the next month or two) is an addon called CommandObject that takes a different approach to self-documenting MAIN functions. 23:10
.tell [Coke]: As a user, I'm currently using rakubrew because my current projects require RakuAST and I need the bleeding edge. When I move past that stage (hopefully after the 6.e release, though possibly after macros, depending on where things go), my preferred options would be a) OS package, and b) as a secondary option, a docker container that has raku in it (would be handy for installing different versions of Raku without needing rakubrew). 23:15
tellable6 wayland76, I'll pass your message to [Coke]
wayland76 .tell [Coke]: And, while I tend to only update every, say, 1-3 months, I'm currently on latest, because there was a serious bug that was blocking me. Given the current rate of development (RakuAST fixes) I'd encourage us to stick to monthly releases until at least 6.e. 23:21
tellable6 wayland76, I'll pass your message to [Coke]