🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
SqrtNegInf Regarding the .$ construction: Looking at the QAST output for the code, it seems like an anonymous state variable is generated from the topic variable. They necessarily remain in lock-step through the loop. 00:06
Not-half-bad as an obscfucation technique...
Geth Raku-Steering-Council/main: b16f124c26 | (Geoffrey Broadwell)++ | minutes/20220122.md
Add RSC meeting minutes for 2022-01-22
00:10
SmokeMachine m: say .$ given 42 00:12
camelia 42
SmokeMachine m: say .$++ for 1,1,1,1 00:13
camelia Cannot resolve caller postfix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool:D $a is rw)
SmokeMachine m: say .$++ for ($=1) xx 5 00:14
camelia Cannot resolve caller postfix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool:D $a is rw)
SmokeMachine m: my @a = 1 xx 5; say .$++ for @a 00:15
camelia Cannot resolve caller postfix:<++>(Int:D); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw --> Int:D)

The following do not match for other reasons:
(Bool:D $a is rw)
SmokeMachine m: say .$.VAR given 42 00:16
camelia ===SORRY!=== Error while compiling <tmp>
Variable $.VAR used where no 'self' is available
at <tmp>:1
------> say .$.VAR⏏ given 42
expecting any of:
dotty method or postfix
SmokeMachine m: say .VAR given 42.$ 00:17
camelia 42
Summer xx but as a metaoperator?, `(1..6).roll xx[max] 6 #6d6` or `("a".."z") xx[X~] 5` generating permutations 00:47
I get that it doesn't really match with the original intent of xx to be instantly reduced, but 00:48
ngl every time I use xx I instantly reduce it 👀
leont That's not really a metaoperator, is it 01:38
jaguart Anyone know why Raku is not on stackshare.io? I submitted it - but the submission failed because the slug is reserved. :( 02:21
Summer its a metaoperator if it can wrap another operator, e.g. X~, X metaoperatorings around the ~ operator 02:53
X~ ~= X[~], need brackets since some operators are letters too 02:54
(and that would be, xx[X[~]] for duplicate, crossproduct, concat) 02:55
Nemokosch I don't get the reasoning behind that hypothetical xx metaoperator 09:36
jaguart: what is "slug"? 🤔 09:37
[Coke] slug: "a part of a URL which identifies a particular page on a website in a form readable by users." ... though I never heard that before looking it up just now 14:55
guessing derived from the earlier "a line of type in Linotype printing.
(RSC minutes) "We are normal people" ? 14:58
El_Che (are you all superheroes?) 14:59
[Coke] I'm not arguing against that statement, just wondering why it's in the minutes. :) 15:01
El_Che If I would be an alien from outer space I would say "we are normal people" all the time 15:04
3rd rock from the Sun plot :)
japhb [Coke]: Because any time there's a committee or council or whatever and the general public doesn't have the opportunity to talk to them and determine they are normal people, they instead assume shadowy cabal. 15:12
Which I suppose given world history is probably not a horrible assumption.
El_Che: Yeah, I probably should have found a better way to write that than "WE ARE TOTALLY NORMAL, BELIEVE US" which comes out a little like "We come in peace! (kill, kill!)" 15:13
Further proof for the "normal people" statement: I suck at this. ;-) 15:14
[Coke] Yah, that might have been edited too much and therefore lost clarity 15:19
Thanks for the explainer. 15:22
El_Che Some of you I've known IRL for years (and probably all online for years) 15:29
maybe it just means that the infiltration plots works with sleeping agents :) 15:30
guifa is still waiting for an in-person conference so he can meet everyone IRL 15:44
Looks like maaaybe finally P&R Houston but I know a lot of people won't be going in person for that 15:45
El_Che just too early 15:46
guifa Yeah. It's just unfortunate for me that I started getting to the point of presenting at a conference right as the pandemic hit. 15:49
tonyo . 18:35
leont We don't have Buf/Blob literals, right? 19:13
lizmat nope 19:15
leont NYI? Or deliberate? 19:16
lizmat afaik there is no syntax for it ? 19:17
leont qb/abcd/ would seem like the obvious option there
lizmat I assume that would be a blob ?
with an escape for / I assume ? 19:18
leont Right now I either have to do 'abcd'.encode('ascii'), or Blob.new(65, 66, 67, 68). Neither is ergonomic.
lizmat q:b:ascii then ?
q:b:ascii/abcd/ then?
assuming the default would be utf8 encoding ? 19:19
guifa leont: you could probably do sub qb is pure ($s) { $s.encode('ascii') }, and then the compiler could even do some of it for you 19:20
leont I'm not entirely sure what the default encoding should be, but it should be one of those two for sure 19:22
lizmat we do utf8 everywhere by default, so I guess....
leont Fair
lizmat and if you're just using ASCII characters, that shouldn't matter anyway 19:23
leont Yeah, in the cases I've encountered so far the distinction wouldn't have mattered
guifa leont: lemme see if I can resurrect the slang I had finally got working for binex. It could probably be reworked fairly quickly to give you a nice way of entering in blob literals (including doing q:b/…/) or maybe 0x(…) for hex, 0a(…) for ascii, 0b(…) for binary, etc) 19:26
guifa has been playing with RakuAST the past 24 hours and is so excited for the future of so many modules
lizmat yeah, it's pretty cool, eh?
guifa I think I need to write a RakuAST::Prettifier soon though :-) 19:27
lizmat yeah, I'm sorta torn on that
on the one hand, it should be easy to simplify a lot of constructs 19:28
otoh, it would be yet another language to learn, document and maintain
leont wants a RegexBuilder when RakuAST lands. I've needed that in at least two modules already.
lizmat I think you already can do that in RakuAST, I seem to recall 19:29
to an extent, anyway
guifa lizmat I think of it only really as a way for quick visualization of what's going on 19:32
(or did you mean for a binary quoting construct?)
lizmat no, I meant the RegexBuilder idea 19:33
in any case, if anybody would like to tackle .assuming in RakuAST :-) 19:37
gfldex I'm looking forward to assume fastness. :) 19:41
guifa That would really just involve pulling out an element or two from the parameter list and adding a new lexical that's bound to the args in .assume(…), yeah?
guifa is probably missing a LOT of complexity there
lizmat basically, yeah :-)
problem is that parsing the core should be far enough so that you can interact with stuff that was parsed by the default parser
at the moment, you can't do that yet very well, because the bootstrap is only half-way so to speak 19:42
guifa ah
lizmat so you don't have a RakuAST to work on, to start peeking and poking on :-)
guifa I suppose in the meantime you could do a QOD pointy block that just recalls the original, reordering/inserting arguments as necessary. But the stack trace would be off if it errored 19:44
I think the other thing that's really cool about RakuAST is I'm seeing a lot of potentially to actually REALLY make Raku a polyglot 19:46
Imagine being able to do sub-fortran { print *, "Hello, World!" } 19:49
gfldex Do you intend to grow heads faster then out enemies can swing a sword? 19:51
guifa I mean… 
gfldex It's one head per glot, isn't it? 19:52
Anything else would be a mouthfull!
guifa . o O ( neckful? )
I don't actually know how well fortan code could be done, given that it'd involve GOTOs and that doesn't quite align so well with how Raku compiles (although I think the synopses intended that there be a goto) 19:58
leont I don't think fortran is the useful kind of polyglotery, it's DSLs that are
guifa leont: agreed. I just think it's one of those "look what can be done" things. My work is primarily going to be towards a the binary regex 20:00
gfldex There is plenty of Fortran code out there, that was written for slowputers. If we provide the companies that are affected with a nice escape hatch, we might be able to win a few hearts. 20:02
guifa My understanding is that people still write Fortran, particularly in the science community where speed is king 20:03
(partly because history/tradition, partly because Intel and friends have extremely hyper optimized fortran compilers available ) 20:04
gfldex There is plenty of business software with reporting in 7-bit ASCII. I'm confident we can handle that. 20:13
leont Yeah, but that's more NativeCall territory than polyglotting territory 20:32
melezhik Hi raku folks! 21:38
if someone does Azure automation - here is some Raku/Bash plugins for that - www.sparrowhub.io/search?q=azure 22:06
gfldex lolibloggedalittle: gfldex.wordpress.com/2022/01/25/fu...-hypering/ 22:18
Voldenet Eh, .assuming has weird performance implications, but it stops being so surprising when you know how it's just packing stuff into large string and then EVALs it 22:40
guifa how does one make a call to a postcircumfix in RakuAST? 23:32
Xliff That's a good question. Can't find an example in the tests? 23:49
Are you talking custom operator? 23:50