🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
SmokeMachine lizmat: ProblemSolver is not a new module, but a very old one that I just have fixed a few lines on its readme and haven’t released any new version… :( 01:57
MasterDuke guifa__: just watched your TPRC videos, nice stuff 03:33
knarkhov Tyil's git repo is back, all modules are available now! I've connected him via matrix. He is upgrading home servers, so I was a reason of temporary down. 07:07
Xliff \o 13:42
Xliff m: my @a = <1 2 3 4 5 6 7>; @a.rotate(-1); say "A: { @a.gist }" 13:43
camelia A: [1 2 3 4 5 6 7]
Xliff m: my @a = <1 2 3 4 5 6 7>; @a .= rotate(-1); say "A: { @a.gist }"
camelia A: [7 1 2 3 4 5 6]
Xliff m: enum <SUN MON TUE WED THR FRI SAY>; my @a = <1 2 3 4 5 6 7>; @a .= rotate(-1 + SUN.Int); say "A: { @a.gist }" 13:44
camelia A: [7 1 2 3 4 5 6]
Xliff m: enum <SUN MON TUE WED THR FRI SAY>; my @a = <1 2 3 4 5 6 7>; @a .= rotate(-1 + WED.Int); say "A: { @a.gist }"
camelia A: [3 4 5 6 7 1 2]
Xliff Cannot resolve caller print(Str:D: BOOTStr); none of these signatures matches: 14:20
What is the fix for this? Did nqp::hllize go away?
lizmat m: use nqp; dd nqp::hllize(42) 14:21
camelia 42
lizmat you'd need "use nqp"
tonyo , 14:48
lizmat clickbaits rakudoweekly.blog/2023/07/24/2023-30-morevids/ 15:45
[Coke] haven't heard "PascalCase" before having spent so much time in perl communities, but have heard it 2-3 times at work this week. 16:06
lizmat PascalCase === CamelCase ? 16:07
[Coke] apparently. 16:10
though the last reference did offer CC as an alternative "if you prefer" 16:11
lizmat well, Pascal *was* earlier
[Coke] regarding the json::unmarshall error - can we get the updated releases so we can install again? (or are they already in flight?) 16:15
tonyo isn't camelCase different from PascalCase ? 16:24
dakkar DromeDaryCase
(or the other one, I always confuse them)
snonux never heard of PascalCase, until now. 16:42
librasteve PascalCase /== camelCase 17:06
leont Yeah what tonyo said 17:31
lizmat so what's the difference 17:33
?
ugexe camels have a hump in the middle 17:38
theHump, not TheJHump
lizmat ah, gotcha 17:39
El_Che Exelvision (eg EXL-100) also had a butterfly logo: en.wikipedia.org/wiki/EXL_100#/med...ouleur.jpg 18:41
nemokosch so there is even a reasoning for it (camelCase, that is) 18:44
but yeah, PascalCase is different, it is widely used for C# for example 18:45
C# itself being Delphi for Java developers with C++ sugar
tonyo loved delphi back when 18:46
nemokosch there is a reason to think Anders Hejlsberg did know something, after all 18:47
Turbo Pascal, Delphi, C# and Typescript
xinming_ termbin.com/881n 18:59
This time, I found above code works as expected.
but first @array misses a pair. 19:00
Is this considered a bug?
nemokosch there is something funny about chaining pairs, I think nine also complained about the parsing 19:03
m: :a<A>:b<B> andthen .say 19:04
Raku eval a => A
nemokosch m: (:a<A>:b<B>) andthen .say 19:05
Raku eval (a => A b => B)
nemokosch the natural intelligence is sometimes wrong about the comment summaries 19:14
"it's a keeper" applies to Perl, "big or new stuff" would be Raku 😼 19:15
xinming_ nemokosch, Could you please give the idea about why these 2 are different? 19:31
nemokosch if only I knew... well, I can try to analyze what the parser and the core are doing 19:33
the way I understand it, :a<A> :b<B> is a pair (:a<A>) with an adverb "hacked" to it (:b<B>) 19:40
okay, found the parsing rule for the parens in the old grammar 19:43
well, it's a whole lot of code, I don't necessary want to understand it but long story short, this "adverb on pair" is basically special-cased in the parser if it happens to be in parens 19:46
github.com/rakudo/rakudo/blob/bef9....nqp#L6952
xinming_ nemokosch, So the test I posted, It parsed the pair without comma as adverb on the pair 19:50
nemokosch yeah, or at least adverb on something that just drops it. Adverbs have a quite low precedence regarding where they attach, I wouldn't know by heart 19:51
xinming_ m: my @a = :a :b; @a.raku.say; 19:52
camelia [:a]
nemokosch what I'm doing is raku --target=parse -e 'some expression', by the way, dont be afraid to try it
xinming_ So, adverb form, will only work right within function calls.
nemokosch well, if the function can handle them as named arguments, at least 19:54
xinming_ in this case, The adverb doesn't attach to the previous :pair. 19:55
So I think it's a inconsistent then
nemokosch I'd say if niner openly criticizes something in the design, it's probably bad enough 😄 19:56
xinming_ m: (1..10).pick xx 5 20:09
camelia ( no output )
xinming_ m: ((1..10).pick xx 5).raku.say;
camelia (6, 7, 1, 8, 1).Seq
xinming_ Is there a way to create a random list from existing list? 20:10
m: ((1..10).pick(5)).raku.say; 20:11
camelia (7, 10, 6, 9, 1).Seq
xinming_ hmm, Ignore me. :-)
nemokosch m: ((1..10).pick xx 5).raku.say; 20:19
Raku eval (8, 6, 6, 2, 4).Seq
nemokosch why does this kind of seem to work?
I mean, apparently the left handside is evaluated again and again 20:20