🦋 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: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku
Set by lizmat on 1 May 2021.
AlexDaniel OK, one spammer ignored 🎉 00:35
AlexDaniel :) second spammer 00:47
AlexDaniel I won't monitor it any longer 00:47
have a good one, everybody!
DarthGandalf well, that spammer reminded me that I forgot to join #raku there when copying the channels over. So, success, I guess? 01:01
AlexDaniel DarthGandalf: are the channels already registered there? 01:03
DarthGandalf: I haven't moved myself yet, how does it work?
DarthGandalf some of them are. #raku isn't registered yet
AlexDaniel how many users on #raku? 01:04
DarthGandalf 47 so far 01:05
AlexDaniel :O
that's actually a lot
DarthGandalf you should be able to send an email to libera staff to register the project
to reserve #raku, cloaks, etc 01:06
AlexDaniel I don't think I can do that…
DarthGandalf I don't know who in raku is who :) maybe not you then 01:07
It needs to be someone related to the project, who can confirm that 01:08
libera.chat/chanreg 01:09
AlexDaniel I do have a founder flag on #raku channels but I don't think that really helps in this case
it's more of an accident because I registered the channels during the perl6→raku transition
but maybe I can be of service in this particular transition too…
DarthGandalf maybe 01:10
japhb I believe someone is already working on this (tyil?) for #raku and #raku-dev. 01:10
japhb I'm doing the same for #mugs. 01:10
AlexDaniel > The registration should be either done by or have received the official blessing of someone who is able to speak for the project
AlexDaniel I got the bot done in time :) it's getting pretty bad, new messages every few other minutes 01:11
lizmat: ↑ what's the progress on that? 01:14
japhb [Coke], jjatria, raydiak, moon-child: #mugs and #raku-gamedev exist over here on libera.chat too -- mentioning because y'all were in those channels on Freenode, but not on libera.chat yet (even though you appear to be in this channel). 01:16
frost-lab m: my int $a = 10; say $a++ 02:05
camelia 10
frost-lab m: my int $a = 10; say ++$a
camelia 11
frost-lab Is raku has JIT for the arm64 arch? 03:13
rindolf frost-lab: hi 03:46
frost-lab: the jot doesnt help a lot on x86-64 either 03:47
AlexDaniel rindolf: oof 03:55
rindolf AlexDaniel: "oof"? it's the truth from my experience. your kilometrage may vary. but i may wish to remove #raku frm my autojoin 04:00
AlexDaniel rindolf: you're not wrong, but saying it out loud like that is a bit cruel :D 04:01
rindolf AlexDaniel: i try to err on honesty than on tact: shlomifishswiki.branchable.com/Enco..._offended/ ; www.youtube.com/watch?v=QUQsqBqxoR4 04:04
AlexDaniel rindolf: yeah, it's nice. But still oof. 🤗 04:08
rindolf AlexDaniel: well, consider it a challenge to improve. anyway, i removed #raku from my autojoin so i shall troll you good people less \o/ 04:13
AlexDaniel rindolf: but but… 04:13
rindolf: it's not like I'm here… 04:14
rindolf: just got back to figure out the spam situation…
rindolf: don't leave because of me, otherwise people will spank me even more for showing up 04:15
rindolf AlexDaniel: it's not because of yyou - i just feel i'm not interested enuf in raku 04:18
dpk There was a large anti-LiberaChat spam attack on Freenode last night. Since the response from the remaining Freenode staff was apparently to make no comment, I'm out of here sooner than expected. See you on the other side! 07:14
tyil lizmat: 1134 # ChanServ (ChanServ@services.libera.chat): #raku is now registered to tyil, on behalf of the Raku project. 09:34
that covers step one
lizmat tyil++
tyil lizmat: I'll grant op access to all RSC members, and jnthn once he comes over 09:35
lizmat tyil++ again :-)
tyil (this will require a nickserv account for all RSC members) 09:37
tyil japhb: the #raku namespace is registered on Libera now 09:49
AlexDaniel: ^ 09:50
tyil I'm not sure if we should have an official OK from the entire (or at least a majority) of the RSC before moving to update our bots and documentation to Libera 09:51
lizmat m: say "hello" 10:05
camelia hello
lizmat 🦋 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 still being worked out 10:10
El_Che tyil: the topic there includes "official" 10:26
tyil El_Che: ?
oh
I've sent a mail to the other RSC members asking for their input 10:27
El_Che "🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org)" 10:27
tyil it's the same /topic as here, no?
El_Che (it makes sense, it looks like the momentum is strong :) ) 10:28
tyil I can update the topic as needed, but I find having the same topic on both to be OK for now 10:28
(other RSC members who have a nickserv account on Libera will be given the same power, so I won't remain a SPOF for long on there I hope) 10:29
El_Che I don't think there are objections ou handling the migration 10:34
y
tyil \o/ 10:35
lizmat yeah. my bot is no longer logging here, but now in Libera 10:40
canbenshanlo another noob question, hoping that the spammers have calmed down: what's the rational behind supporting .map (and the like) as both subs and methods, but .head, for example, can only be used as a method? I know that there's the option to turn any sub into a method via $foo.&sub, but what about the other way around? is there a way to make this work? say head @foo.first(...)? 10:46
MasterDuke canbenshanlo: i'm far less than 100% certain here, but i suspect some of those choices (when made a while ago) were based on what Perl 5 did 10:49
lizmat canbenshanlo: well, in your example, it wouldn't make much sense, as first only returns one thing anyway 10:51
and as the original author of .head / .tail I just really think it would make sense to have them as subs as well 10:52
frost m:say [+] (1,2, * + * ... *)[10] 10:53
lizmat to answer your question, you can turn a method into a sub: 10:54
m: my constant &head = Any.^find_method("head"); say head <a b c>
camelia a
lizmat m: my constant &head = Any.^find_method("tal"); say tail <a b c> 10:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in constant declaration of &head; expected Callable but got Mu (Mu)
at <tmp>:1
------> 3constant &head = Any.^find_method("tal")7⏏5; say tail <a b c>
lizmat m: my constant &tail = Any.^find_method("tail"); say tail <a b c>
canbenshanlo doesn't make sense? well, .first could return a list, and i only care about the first element within it, for example.
camelia c
lizmat canbenshanlo: point taken :-) 10:55
canbenshanlo interesting, so it's at least possible to go with an alias. thanks for that, liz! 10:56
lizmat it would probably be implemented in core like that anyway 10:57
alternately:
m: sub head(\a) { a.head }; head <a b c>
camelia ( no output )
lizmat m: sub head(\a) { a.head }; say head <a b c> 10:58
camelia a
lizmat that would make it a runtime lookup
canbenshanlo Good to know, thanks! 11:01
El_Che is there a reason to not offer all the methods as subs and vice versa?
canbenshanlo Both nim and d are interesting in this regard. stdlib funcs are mostly free-standing and can be called just like methods via UFCS. Shame that this approach isn't all that popular in other langs 11:02
lizmat canbenshanlo: you know that you can call a sub as a method in Raku, right ? 11:02
canbenshanlo yeah, wrote that above 11:03
lizmat ah, yes... ETOOMANYCHATTABS 11:04
m: say [+] (1,2, * + * ... *)[10]
camelia 144
lizmat frost: needs a space after the "m:" 11:05
frost m: say [+] (1,2, * + * ... *)[1000] 11:12
camelia 113796925398360272257523782552224175572745930353730513145086634176691092536145985470146129334641866902783673042322088625863396052888690096969577173696370562180400527049497109023054114771394568040040412172632376
frost lizmat Thx
codesections spends way too long trying to decode the acronym ETOOMANYCHATTABS before realizing it's an ERR_CODE 12:23
lizmat hehe 12:33
AlexDaniel alright, let me know if anything is wrong 13:35
AlexDaniel` canbenshanlo: the spammers have not calmed down, it's just that they're not able to say anything because of the bot 13:37
those who miss the spam can get +o :) then you'll see all of it
canbenshanlo better not ;) 13:38
whatnext hello all:)  is anyone familiar with this error when using Red: `Type check failed in assignment to $!right; expected Red::AST but got Slip (Empty) 14:29
  in method new at /opt/rakudo-pkg/share/perl6/site/sources/E32D428566231F82FC5B1EAF0FDBB830F45FB159 (Red::AST::Infix) line 25` ? I found this: `github.com/FCO/Red/issues/449` - but in my case I am trying to select from a table where pk is not an fk. Anyone have any idea any other ways it can happen? I am doing a simple `^all` lookup
OrngeRain Ip4 is superior. 14:36
whatnext no ideas I guess :) 15:02
OrngeRain long paths are a security measure or a hazard, possible sign of tunnel.  trjoantrojan horse 15:05
lizmat OrngeRain: that long path just indicates that Red::AST::Infix is an installed module 15:09
El_Che maybe we need to move sooner than thought: www.devever.net/~hl/freenode_abuse 15:15
sienet_ja_LSD[m] I can't join from element without the bridge 15:27
OrngeRain haha, not my\yours vv.  harddrive,solidstate drive, mine. not yours...also,SCSI,...disk... 15:58
simcop2387 looks like you guys have finally moved over, any desire for me to bring perlbot into here like it was on freenode? 17:04
Altreus_ would be nice to maintain consistency 17:46
also how do I get it to stop disconnecting me and then renaming me :P
brass Is the raku channel going to be leaving freenode? I've seen a lot of communities leaving and spam everywhere for the last week or so 17:47
simcop2387 Wait for the ddos, hugging or whatever it is to stop :) 17:53
simcop2387 I'll get it here when I'm done with errands. Stuck waiting on someone to get back from lunch to switch some payment stuff 17:54
AlexDaniel` brass: we're dealing with the spam just fine 17:58
AlexDaniel` but yes the bots have already moved 17:59
so you should too
brass Ah okay 18:07
guifa where is the 'HAS' declarator described in NativeCall? I tied looking in rakudo/lib/NativeCall but couldn't find anything that looked like it 18:13
moritz docs.raku.org/language/nativecall#...s_with_HAS 18:22
simcop2387 reval: 1 18:29
rkeval: 1
perlbot simcop2387: WARNINGS for /tmp/ilAVKQO0Wj:␤Useless use of constant integer 1 in sink context (line 1)␤
simcop2387 ah there it goes
simcop2387 doesn't look like i ever namespaced the factoids for #raku, would you guys want your own set of them for the channel? (i.e. it won't have any of our icky perl5 responses) 18:31
dcx Is there a document that describes how rakudo/nqp/moarvm fit together? I can't quote wrap my hear around how it works 18:55
dcx s/quote/quite/ s/hear/head/ 18:56
moritz moarvm is a virtual machine designed for dynamic languages
moritz NQP stands for "Not Quite Perl", which is a simplified version of raku. It serves as a bootstrapping stage, implemented the grammar engine etc. 18:57
rakudo is the main raku compiler, some of it is written in NQP, some in raku itself (bootstrapping is fun!) 18:58
dcx Does nqp sit between rakudo and moarvm translating or does it stop being useful once the VM is running?
Whats nqp written in then 😵 18:59
moritz nqp is written in nqp :D 19:00
moritz there's a compiled copy of nqp compiled to bytecode committed to the repo 19:01
moritz re sitting between, there are some NQP libraries involved while rakudo is compiling raku 19:02
dcx Oh wild 19:03
dcx So why do you use a byte-compiled nqp instead of byte-compiled raku? Size? 19:04
A cleaner starting point?
dcx Easier to port? 19:06
dcx Oh I'd imagine then you'd only need to write an nqp interpreter in order to bootstrap bytecode onto a new VM? 19:06
moritz size and performance, mostly. And yes, easier to port 19:12
if you have a new backend for NQP, you can cross-compile from an existing backend
moritz in fact, even the "main" moarvm backend was cross-compiled from the then-prevalent parrot backend :D 19:13
dcx Awesome :D 19:17
moritz (dead parrot joke intentionally skipped here :D) 19:17
dcx Haha 19:18
So if I understand correctly... Moarvm loads the pre-byte-compiled nqp, which then loads rakudo which is mostly written in nqp, which then directly compiles raku to moarvm bytecode? 19:19
moritz "directly" in that there is no NQP step in between 19:21
but it's source code -> parse tree -> QAST -> MAST (backend specific low-level tree format) -> byte code 19:22
and the QAST -> MAST and MAST -> byte code steps are written in NQP
dcx The code that outputs byte code in contained in the rakudo repo right? 19:24
Not the nqp repo?
I'd love to see someone write a blog post on how this works, it's so fascinating :D 19:25
moritz now, the QAST -> MAST and MAST -> moarvm byte code steps are part of the NQP repo 19:47
raydiak have we considered a bot which bridges freenode and libera raku channels, just as a stop-gap until the libera matrix bridge and whatever else we've been waiting on is available? 20:15
corwin we have a similar setup for Fosshost; discord goes to both IRC nets but we don't bridge IRC to IRC 20:16
dcx I suspect a changing the topic to something telling people you've moved to libera is enough, no?
raydiak I know a bridge to a bridge is kinda rickety and laggy, but it lets everyone move here now and still chat w/matrix users and whatever else we've bridged to 20:17
raydiak afaik the main hold-up has been that there is no matrix bridge for libera yet, and we do have active matrix participants 20:18
Geth doc: f3e8c71482 | (Bruce Gray)++ | doc/Type/Any.pod6
Add complete example of a callable sort routine #3883
21:17
doc: 532db0b91d | (Bruce Gray)++ | doc/Type/Any.pod6
Change argument from snake_case to kebab-case, to match its parameter.
doc: f7d418b214 | (Bruce Gray)++ (committed using GitHub Web editor) | doc/Type/Any.pod6
Merge pull request #3885 from Util/sort_with_named_sub

Add complete example of a callable sort routine #3883