🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Xliff m: my $a = my regex { / (a) b? / }; say "ab" ~~ $a() 00:00
camelia 5===SORRY!5===
Unrecognized regex metacharacter / (must be quoted to match literally)
at <tmp>:1
------> 3my $a = my regex {7⏏5 / (a) b? / }; say "ab" ~~ $a()
Unrecognized regex metacharacter (must be quoted to match literally)
a…
Xliff m: my $a = regex { (a) b? }; say "ab" ~~ $a()
camelia Too few positionals passed; expected 1 argument but got 0
in regex at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my $a = regex { (a) b? }; say "ab" ~~ $a
camelia 「ab」
0 => 「a」
AlexDaniel pel: re LLVM, there isn't a very good reason. Yes, LLVM is *the* way for making high-performance languages, but it is also not that easy. For example, Julia would've sucked without Revise and sysimages. Yes, it runs really fast, but you really have to wait before it starts running any fresh code path :P 02:31
moon-child yeah llvm JIT is basically useless unless you layer an interpreter over it (which hinders inlining). There's a reason firefox/chrome don't use it 02:32
AlexDaniel moon-child: I wouldn't say useless, otherwise languages wouldn't've used it. Try any real script with a bunch of data as an input and it really shows that it is not useless. But that webpage taking a few seconds to load the first time? Yeah, it's a weird dev experience, and not in a good way :) 02:38
pel Thank you for your answers. It makes it clearer. 03:12
sjaveed hello again friends 03:42
sjaveed had a quick question about pod - are there official ways to document methods? Things like params and output? I figure the typing system can take care of that but wanted to see if there was a way to document them further 03:43
jmerelo releasable6: status 06:47
releasable6 jmerelo, Next release in ≈4 days and ≈12 hours. 3 blockers. Changelog for this release was not started yet
jmerelo, Details: gist.github.com/cd9614e1dc1d27d54c...22d5a1cab9
jmerelo We are going to apply for Outreachy again. In this case, the grant money is pre-allocated, only we need to prepare a project atractive enough for someone to choose it 07:41
We have a mailing list for all Raku & Perl outreach efforts, please dm me with your email to participate.
El_Che once for both languages? A little weird 09:50
Geth doc: 53732f4d0c | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Array.pod6
Tweak Array.splice description

  - reduce repetition
  - add a missing self mention
  - remove an extraneous 'just'
09:58
linkable6 Link: docs.raku.org/type/Array
lizmat clickbaits rakudoweekly.blog/2020/09/14/2020-...ally-raku/ 10:06
Skarsnik hm, how can I could capture arguments in a sub that are like (0xF50050, 4), (0xF50054, 2), Buf.new(<1 2 3 4>), Buf.new(<5 6>)); I want the n list then the Buf in a separate variable 10:12
tbrowder .tell sjaveed no official way except using pod declarator blocks to describe as you wish. currently the default handling upon extraction is to collapse all such blocks into a single normalized string, but a future fix will retain the original author formatting and consequently provide use of conventional pod within the declarator blocks. 11:05
tellable6 tbrowder, I'll pass your message to sjaveed
tbrowder i've ignored 'sake' (no 'ake') up to now but i do see its utility. i do tend to use Make for various housekeeping tasks so i should be able to move toward ake. anyone care to talk about their ake use cases? 11:18
stoned75 hi 11:35
stoned75 I'm baffled by Array.shape's implementation. would someone be able to give me some hints to understand it ? :-) 11:36
arf. thanks for being my rubber duck. I understand it now :) 11:38
lizmat tbrowder: I understand it's used primarily by people who to Rakudo releases 11:41
*do
tbrowder lizmat: thnx 11:43
[Coke] waves.
moritz particles 11:55
lizmat observes duality 11:57
tbrowder how's the voting?
is there a tally of eligible voters? 12:00
[Coke] no. there's a list of repos, not voters. 12:15
Someone wants to turn that into a list of github IDs, great.
38 ballots reporting (Average votes per ballot: 4.6)
finanalyst HI. Would Raku be considered a case INsensitive language? My thought is No because BEGIN and begin are different 12:29
dakkar you are correct 12:31
m: my $a=1; my $A=2; say $a; say $A; # finanalyst 12:32
camelia 1
2
moritz but the error messages do try go give you a hint when you get the case wrong 12:37
m: my $a = 1; say $A
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$A' is not declared. Did you mean '$a'?
at <tmp>:1
------> 3my $a = 1; say 7⏏5$A
finanalyst thanx everyone. Its for a highlightjs syntax highlighting project I'm working on. 13:01
[Coke] (ballots) and I notice after generating the last run that I am getting someone's github ID with extra spaces because they didn't fill out the form. 13:49
Geth Raku-Steering-Council/main: 051a25d2f4 | Coke++ | scripts/tally.raku
improve github ID capture
13:50
codesections I find this kind of interesting: 13:56
codesections m: my %h; say %h<deeply><nested><key><series> 13:57
camelia (Any)
codesections In many languages, that would throw an error
guifa Correct
But not in Raku :-)
codesections (Indeed, JavaScript just added an operator (`.?`) to provide Raku's behavior) 13:58
tadzik Raku has that one too, but for something else :) 13:58
guifa Eh, it’s a bit different
tadzik it's more or less the same in JS since it doesn't have much of a distinction between an object and a dictionary 13:59
guifa Raku autovivifies along the way
tadzik (syntactically and historically)
but yeah, the fun part is the fact that these actually get created on the way
m: my %h; %h<deeply><nested><key><series>++; say %h 14:00
camelia {deeply => {nested => {key => {series => 1}}}}
codesections guifa: I take it that was an intentional design decision? Was it discussed in a Synopsis or some other design document?
guifa And so %h<deeply><nested><key> is an empty array, who of course returns (Any) when accessing an unknown element
codesections ohhhh 14:00
codesections I didn't realize that. Interesting 14:00
guifa codesections: it’s how perl before it worked, but it’s mainly to allow exactly what tadzik showed
so I can do simply
guifa my %deep-data 14:00
guifa for ^@a X ^@b X ^@c X ^@d -> $a, $b, $c, $d { %deep-data{$a}{$b}{$c}{$d} } 14:01
guifa In most languages, you’d need ensure that each outer element was already defined which gets you ugly boiler plate code 14:02
codesections Thanks for the 'autovivification' keyword -- I'd come across that concept, but I hadn't made the connection here. But now that I do, I see design.raku.org/S09.html#Autovivification 14:03
guifa What’s nice is custom classes can take part in it as well!
tadzik tbf elegant solutions exist, as in Rust's insert_or or whatever it's called on maps
doesn't help much with deep nesting though
tadzik doc.rust-lang.org/std/collections/...thod.entry 14:04
codesections tadzik: well, for a given value of "elegant", I suppose :D The equivalent of `my %h; %h<deeply><nested><key><series>++; say %h` would be: 14:13
let mut h = HashMap::new();
*h.entry("deeply").or_insert(HashMap::new()).entry("nested").or_insert(HashMap::new())
.entry("key").or_insert(HashMap::new()).entry("series").or_insert(0) += 1;
println!("{:?}", h)
tadzik indeed :) 14:14
something of the sort, yeah
knowing rust community though, someone probably built a crazy macro for this or something
codesections Maybe :) Though, in some fairness to Rust, that pattern isn't nearly as useful when you don't typically have hashes with values of different types 14:16
(I know there are ways to do so in Rust, but it's not nearly as common)
tadzik right
guifa What’s nice in raku’s strategy is by default accessing a value that doesn’t exist doesn’t error, it just produces a type object, so the nested behavior is internally consistent and inuitive, even if the internals of autovivifying is a bit complex
For a while I even had an typeA that autovivified its elements to typeB that autovivified to a typeC, and so on 14:17
[Coke] 39 ballots reporting (Average votes per ballot: 4.6) # and no patch required this time. :) 16:52
[Coke] 40 18:01
[Coke] 5 days or so left to vote 18:23
rypervenche I'm writing my first tests for a module and getting used to the Test module. Is it redundant to add a use-ok for the module itself since you wouldn't be able to install it anyways? 22:16
Grinnz you mean Test::More? 22:19
hopefully not Test, but i don't think that even has use_ok 22:20
wait... this isn't #perl :P
rypervenche I mean Test. It has use-ok.
lol
Grinnz testing your own module can be loaded may or may not be useful. just loading it is usually sufficient test for users since it will abort the test if it fails, i tend to only do it as a marked test (as use-ok does) for projects where i want to be able to quickly check that all modules load 22:22