🦋 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.
Geth Template6/main: 05d981016d | (Polgár Márton)++ | 5 files
0.11.2
09:24
lizmat notable6: weekly 12:06
notable6 lizmat, No notes for “weekly”
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/03/07/2023-10-toronto/ 12:17
vrurg lizmat++! 14:25
nine What on earth does this mean?::?CLASS:_ 18:22
What on earth does this mean? ::?CLASS:_ 18:23
github.com/rakudo/rakudo/blob/main...-ok.t#L104 18:24
Nemokosch that's a type smiley, no?
:_, as opposed to 😄 and :U and maybe there is also :T 18:25
sjn ETOOMUCHMAGIC
Nemokosch maybe that's the one that says "all are fine" explicitly? 18:26
sjn Code like that should be banned. www.laws-of-software.com//laws/kernighan/ applies 18:27
(Kernighan's Law) 18:28
Nemokosch some Kernighan wisdom aged notoriously badly 18:29
like mocking Pascal for array size in the type 18:30
lizmat nine: same as Int:_ aka Int
nine Why do we even have that if it's just the same? 18:31
japhb nine: (wild guesses) Override of concreteness rule in more constrained base type? Being explicit (and syntax-parallel) when mixing various type smilies heavily? 19:07
(To be clear, that first one was "reasons it might have been in the spec in the first place" as opposed to "way I expect it to work now") 19:08
gfldex Would it be possible to set $_ inside blocks inside a HEREDOC to that very HEREDOC? 19:41
Nemokosch bisectable6: constant Str @test = <alpha beta gamma>; 20:11
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
tellable6 2023-02-27T14:23:36Z #raku <Voldenet> Nemokosch: basically, firefox has this theme switching feature (also other browsers) that didn't even require js 20:12
2023-02-28T02:05:51Z #raku <guifa_> Nemokosch: I feel like siberia-man may have confused Raku with Ruby
2023-02-28T17:53:43Z #raku <tonyo> nemokosch: ah, yes, it wasn't as explicit as the pm6 -> rakumod extension change
2023-03-02T17:48:24Z #raku <tonyo> nemokosch: are you 2colours?
2023-03-05T13:32:30Z #raku <Voldenet> Nemokosch: you could consider using ppm/pbm/pgm if you just needed bitmap
2023-03-06T16:31:57Z #raku <dakkar> Nemokosch: I believe so
bisectable6 Nemokosch, ¦6c (67 commits): «4===SORRY!4=== Error while compiling /tmp/p2Fm5cTQmq␤Missing initializer on constant declaration␤at /tmp/p2Fm5cTQmq:1␤------> 3constant Str8⏏4 @test = <alpha beta gamma>;␤ «exit code = 1»»
Nemokosch, Nothing to bisect!
Nemokosch Is there no issue for this message?
Voldenet hmm 20:13
m: constant @test = <alpha beta gamma>;
camelia ( no output )
Nemokosch oh hm github.com/rakudo/rakudo/issues/1503 20:14
still, to be honest. This error message is terrible
Voldenet it is less than useful 20:15
m: my Int constant $foo .= new: 42; dd $foo 20:16
camelia 42
Voldenet m: my Int constant @foo .= new: (42); dd $foo 20:17
camelia ===SORRY!=== Error while compiling <tmp>
Parameterization of constants is forbidden
at <tmp>:1
------> my Int constant @foo .= new: (42)⏏; dd $foo
[Coke] (42) is better witten as (42,), no? 20:24
Nemokosch (42) is not a List at all 20:25
so it might even be an understatement that "it's better written as", more like one will do "the right thing" while the other won't 20:26
[Coke] Sure, was trying to be polite. 20:27
Nemokosch of course but please make sure to get the point across. The compiler won't be polite, it will just misinterpret it big time. 20:28
(assuming that the right interpretation is the List version)
Voldenet doesn't make a difference in the context 20:36
Nemokosch what doesn't? 20:38
Voldenet (42) vs (42,) 20:38
m: my Int @foo .= new: (42); dd @foo
camelia Array[Int @foo = Array[Int].new(42)
Voldenet m: my Int @foo .= new: (42,); dd @foo
camelia Array[Int @foo = Array[Int].new(42)
Nemokosch well, what is the content? 20:42
context* 20:43
Voldenet that line: > m: my Int constant @foo .= new: (42); dd $foo
Nemokosch oh 20:44
oof
Voldenet perhaps it is a good habit to keep it as (42,) even when not necessary 20:45
Nemokosch by the way, sadly the RakuAST regex building doesn't work with v2023.02
NemokoschKiwi [Coke]: anyway, sorry, I didn't notice that there was a context in the first place. I thought you just said it as a generic paradigm. 20:51
tellable6 NemokoschKiwi, I'll pass your message to [Coke]
lizmat m: my Int constant $foo = 0e0 22:50
camelia ===SORRY!=== Error while compiling <tmp>
Type check failed in constant declaration of $foo; expected Int but got Num (0e0)
at <tmp>:1
------> my Int constant $foo = 0e0⏏<EOL>
lizmat what's wrong with that error message?
m: say Q|my Int constant $foo = "bar"|.AST(:run) # looks like the RakuAST version needs some work still 22:51
camelia bar
Nemokosch the problem is constant Int $foo, not my Int constant $foo 22:53
lizmat gotcha 22:54
still, I wonder whether that wouldn't need to be: "Int constant $foo = 42", as the scope prefix is optional 22:55
m: my Int constant $foo = 42
camelia ( no output )
lizmat m: our Int constant $foo = 42 22:56
camelia ( no output )
Nemokosch well it's definitely a possibility to "sell differently" the constant keyword, not as something essentially like my 22:59