00:04 ds7832 joined 00:06 swaggboi joined, melezhik_ joined 00:08 melezhik_ left 00:29 Aedil left 00:33 swaggboi left 00:37 ds7832 left 00:39 melezhik_ joined 00:41 melezhik_ left 01:05 swaggboi joined 01:07 melezhik_ joined 01:10 melezhik_ left 01:48 melezhik_ joined 01:50 melezhik_ left
_ccubed What do folks use for creating and editing Raku programs? I'm an old Emacs user and I found the roku mode on GitHub, but none of the ways the site cited to get it worked for me on Emacs v27.1. I've been tried to use Vscode, the raku mode there is very nice, but I can't find out how to tell CoPilot to get out of the way. I would perhaps eventually use CoPilot but at the start it's very distracting. 01:56
tried -> trying 01:57
I was lured into using WSL on my relatively new machine and now I regret it, but it seems like way to big a project right now to start over. 02:00
antononcube I like Emacs and I tried to use it for development with R and Raku. Those modes are too basic. 02:03
I am more or less forced to use VS Code (VSCodium) -- I think the VS Code Raku plugins are very decent. Copilot is not a problem for me. (Meaning, I do not see it.) 02:05
In VS Code I use Raku 97% of the time in Raku notebooks.
02:09 melezhik_ joined 02:11 melezhik_ left 02:13 arkiuat left 02:14 arkiuat joined 02:33 hulk joined, kylese left 02:43 Aedil joined, arkiuat left 02:46 arkiuat joined 03:10 melezhik_ joined 03:12 melezhik_ left 03:15 hulk left, kylese joined 04:11 melezhik_ joined 04:13 melezhik_ left 04:50 melezhik_ joined 04:59 melezhik_ left, melezhik_ joined 05:05 melezhik_ left 05:06 melezhik_ joined 05:17 melezhik_ left, melezhik_ joined 05:29 melezhik_ left, melezhik_ joined 05:35 melezhik_ left, melezhik_ joined 05:41 melezhik_ left, melezhik_ joined 05:47 melezhik_ left 06:08 melezhik_ joined 06:13 melezhik_ left, melezhik_ joined 06:15 evalable6 left 06:18 melezhik_ left, melezhik_ joined 06:19 arkiuat left 06:20 itaipu left 06:26 melezhik_ left 06:29 arkiuat joined 06:36 itaipu joined 06:40 arkiuat left 06:56 abraxxa joined, Pixi left 07:00 arkiuat joined, abraxxa left 07:01 abraxxa joined, Pixi joined 07:05 arkiuat left 07:17 arkiuat joined 07:23 arkiuat left 07:27 kylese left 07:36 arkiuat joined 07:40 arkiuat left 07:41 melezhik_ joined 07:47 melezhik_ left, melezhik_ joined 07:52 arkiuat joined 07:56 melezhik_ left, melezhik_ joined, arkiuat left 08:01 kylese joined 08:15 arkiuat joined
librasteve @_ccubed I switch between just rawdogging vi (folding yes, code hilite no, Grammar::Tracer, repl debug) and the full IntelliJ plus Raku Interactive Plugin (RIP) available in the marketplace. I am a student of Anton and I am ramping my use of the Raku Jupyter::Chatbook that works very well in IntelliJ also. I find ChatGPT pretty good for raku (and very nice in a chatbook where would can weave multiple AI threads and backtrack), 08:16
but I do not use AI autocomplete such as Copilot. The only drawback is to stay a little behind the bleeding edge until the plugin is updated when there is a new release (recently found the IntelliJ Spec & Math Symbols which is very nice).
Also the RIP has a nice Grammar Inspector.
08:20 arkiuat left
ab5tract Is RIP in the marketplace? :O 08:20
I've been meaning to deal with submitting it, but then they went and announced that the next version of IntelliJ will revive its goal of allowing third party builds of custom IntelliJ standalones 08:22
complete with hosted CI/CD pipelines for generating them. Details have been scarce so far, but it is pretty exciting 08:23
librasteve oh - sorry - not on the marketplace yet - need to download and install locally from github.com/ab5tract/raku-intellij-plugin - my bad 08:24
08:30 melezhik_ left, melezhik_ joined 08:35 melezhik_ left, melezhik_ joined 08:36 Sgeo left 08:44 wayland joined 08:49 arkiuat joined 08:54 arkiuat left 09:01 arkiuat joined 09:07 arkiuat left 09:10 melezhik_ left, melezhik_ joined 09:33 melezhik_ left 09:35 wayland76 joined, melezhik_ joined, wayland left 09:36 arkiuat joined 09:38 melezhik_ left 09:41 arkiuat left 09:42 melezhik_ joined 09:52 melezhik_ left 10:01 arkiuat joined 10:05 ds7832 joined 10:09 arkiuat left 10:18 melezhik_ joined 10:30 melezhik_ left 10:36 arkiuat joined 10:41 arkiuat left 11:02 arkiuat joined 11:07 arkiuat left 11:11 ds7832 left 11:19 ds7832 joined 11:25 arkiuat joined 11:32 arkiuat left 11:52 arkiuat joined 11:54 ds7832 left 11:57 arkiuat left 12:11 arkiuat joined 12:16 arkiuat left
SmokeMachine m: my $book = class Book { has $.author }.new: :author<bla>; given $book -> $b (:$author) { say $author } 12:19
camelia bla
SmokeMachine aruniecrisps: why not using given itself for doing that? šŸ‘† 12:20
12:28 melezhik_ joined 12:30 melezhik_ left 12:36 arkiuat joined 12:41 arkiuat left 12:56 arkiuat joined 12:58 Guest5764 joined 13:00 arkiuat left 13:15 melezhik_ joined 13:16 arkiuat joined 13:22 melezhik_ left 13:44 melezhik joined 13:48 simcop2387 left
[Coke] .seen 13:49
tellable6 [Coke], I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
[Coke] .seen slavenskoj 13:50
tellable6 [Coke], I haven't seen slavenskoj around
13:54 arkiuat left 14:04 arkiuat joined 14:16 human-blip left 14:17 human-blip joined 14:23 arkiuat left
antononcube I can contact slavenskoj using other messengers... 14:33
14:34 arkiuat joined 14:39 arkiuat left
[Coke] I opened a bug on his module, and would proffer a suggestion to maybe use lizmat's L10N approach for the languages they have in that org 14:45
14:46 arkiuat joined
antononcube I think he "quit" Raku. I will tell him about the bug. 14:49
15:04 melezhik_ joined 15:09 melezhik_ left 15:13 arkiuat left 15:20 melezhik_ joined 15:24 melezhik_ left 15:25 melezhik_ joined 15:40 arkiuat joined 16:03 melezhik_ left, melezhik_ joined 16:10 melezhik_ left, melezhik_ joined
aruniecrisps @SmokeMachine the problem is given doesn't do any form of pattern matching 16:14
ab5tract aruniecrisps: does resembling also work with where clauses? 16:22
so that I could have a Stephen King specific match, for example
16:25 human-blip left
aruniecrisps @ab5tract right now it's just leveraging the signature matching capabilities of pointy blocks 16:25
or that's the idea of it
16:27 human-blip joined
however there is a catch with regards to signature matching, which is that iirc where clauses don't work in smartmatches, so I'm not sure whether it'll actually work because underneath the hood I'm basically planning on generating something like when $_ ~~ $<pointy-block>.signature { $<pointy-block>($_) } 16:28
ab5tract what I meant is, does this work: given $b { resembling -> Book $ (:$author where 'King, Stephen') { say "IT" }; resembling -> Book $ (:$author) { ... }; }; 16:29
aruniecrisps I wanted to ask @lizmat about worked, specifically whether the corresponding action for the otherwise clause is generated as a RakuAST or whether it’s just executing at runtime: raku.land/zef:elcaro/Slang::Otherwise 16:31
16:32 melezhik_ left
about out Slang::Otherwise worked * 16:32
lizmat aruniecrisps not sure I understand the question? 16:33
aruniecrisps @lizmat here’s the file for reference, I’ll ask the question after this message cause I don’t know how it’ll display on irc: github.com/0racle/raku-Slang-Other...se.rakumod 16:35
lizmat so what is the question?
librasteve @aruniecrisps resembling looks very interesting (although I do not understand the distinction between resembling -> Book $ (:$author) {} fwiw I tried writing something like when Book -> (:$author) {} and that showed me (I think) why resembling is needed
is it you idea to mix resembling and when and default clauses willy nilly? 16:36
SmokeMachine I remember playing with something related to pattern matching… I’m searching for it… 16:37
ab5tract There is a cool pattern matching library out there, I can’t recall its name right now 16:38
SmokeMachine is the cool library this one?raku.land/zef:CIAvash/PatternMatching 16:39
aruniecrisps @lizmat So in Otherwise::Actions in the method statement-control:sym<for>, there’s an if statement which doesn’t seem to generate a RakuAST, but if you look at Otherwise::Actions::Legacy you see a QAST being generated. My question is, is the method in Otherwise::Actions generating a AST under the hood similar to ::Legacy or is it just running the if statement at run time?
@librasteve that is basically the idea, when doesn’t work with pointy block restructuring because it uses smart matching 16:41
SmokeMachine it does look cool
aruniecrisps Pointy block destructuring*
The other idea I had is basically to create a slang that changes the behavior of smart matching against a signature to automatically generate the destructured variables in the block 16:42
lizmat all of the code of Slang::Otherwise is run at compile time 16:43
librasteve why not just call it when?, so you can have eg ``` 16:45
aruniecrisps I could do that
librasteve my Book $b = Book.new(author => 'Vickram'); given $b { when Magazine {...} when -> Book $ (:$author) {...} default {...} } 16:46
the distinction being the -> pointy syntax in that position 16:47
aruniecrisps @lizmat thanks! I have one follow question: do you have an idea where the replace-otherwise method is coming from? 16:48
@librasteve I'm on my phone soiol get back to you after work 16:49
lizmat That's a RakuAST::Block method 16:50
no, a RakuAST::Statement::For method 16:51
16:54 abraxxa left
timo github.com/timo/json_fast/pull/96 i would love a few users to throw some invalid json at this branch of JSON::Fast and see if the error messages that now show a bit of context work correctly, that would be great 17:01
aruniecrisps @_ccubed I'm currently using neovim right now, I don't use vscode these days because I'm not a big fan of the integrated AI stuff 17:05
That being said I find the support neovim support for Raku a bit outdated and so I have thought about making a tree sitter grammar for raku, I have a repo up as well
ab5tract distbot seems to have dropped everything from librasteve++'s "eg ``" 17:06
aruniecrisps: that would be incredible 17:07
aruniecrisps @lizmat thanks! Where can i go have a look at the RakuAST methods? I'll do a deep dive into it 17:08
ab5tract rakudo.git:src/Raku/ast
lizmat also github.com/rakudo/rakudo/blob/main.../README.md
17:09 librasteve_ joined
ab5tract I haven't revisited that readme in a while.. maybe it will be worth my while to read it with fresh eyes 17:09
librasteve ab5tract - nope that's me changing my mind about what to type and forgetting to adjust the earlier words 🤯 17:11
ab5tract ah, I see, the eg arrived in your next message 17:12
aruniecrisps: this library handles where clauses raku.land/zef:CIAvash/PatternMatching
librasteve I think a Raku tree sitter/LSP would be cool ... my hope is that this would be usable everwhere (such as IntelliJ) but I am not holding my breath!
ab5tract JetBrains is throwing in their hat and providing an LSP plugin 17:13
the other option could have been to embed the entire intellij parser into an LSP 17:14
librasteve maybe the Rainbow Grammar would help? 17:16
aruniecrisps @ab5tract here's the repo, if you wanna have a look and contribute that would be great! github.com/arunvickram/tree-sitter-raku
@librasteve @ab5tract I'm not smart enough to make a language server, let alone for Raku haha 17:17
That may be above my pay grade
Although I started trying to make one in rust based off tower-lsp github.com/arunvickram/RakuMariner
ab5tract oh right, treesitter is "just" 17:20
for syntax highlight, right? 17:21
aruniecrisps Yep, you get syntax highlighting, but it's a bit more intelligent than just static syntax highlighting 17:24
@librasteve is there a way to use Hilite just as a JS library that's not part of Air? I'm making a documentation site using Astro and I wanted to see if I could just use the syntax highlighting 17:31
17:34 human-blip left 17:36 human-blip joined
SmokeMachine m: sub a { say CALLERS::.keys }; $_ = 42; a 17:41
camelia (GLOBALish $/ $=pod &a $?LANGUAGE-REVISION ::?PACKAGE $_ $Ā¢ $=finish $! $?PACKAGE EXPORT !UNIT_MARKER)
SmokeMachine m: use v6.*; sub a { say CALLERS::.keys }; $_ = 42; a
camelia ($/ $*ERR $*OUT $*OMIT-SOURCE %*ENV $*EXCEPTION $*EXIT $*PID $*AWAITER $*CWD $*STACK-ID $*IN $*RAT-OVERFLOW $*SCHEDULER $! $Ā¢ %*COMPILING $*SPEC @*comp_line_directives &*chdir)
SmokeMachine what have changed here? I can't get $_ anymore? 17:42
use v6.d; sub a { say CALLER::.keys }; $_ = 42; a 17:44
m: use v6.d; sub a { say CALLER::.keys }; $_ = 42; a
camelia (::?PACKAGE $! $=pod EXPORT GLOBALish !UNIT_MARKER $=finish &a $?PACKAGE $_ $?LANGUAGE-REVISION $/ $Ā¢)
SmokeMachine m: use v6.*; sub a { say CALLER::.keys }; $_ = 42; a
camelia ($Ā¢ $! $/)
17:52 melezhik_ joined
librasteve Voldenet: fyi I have adjusted the font size (same as regular text) and font-family (monospace) in Hilite::Simple to try and address your issue ... please keep an eye out in next week's edition and check it is now OK... 17:59
@aruniecrisps ... Hilite (and Rainbow, which it uses) are written in Raku, not sure what you mean?
ab5tract SmokeMachine: lots of changes to the Psuedo 18:00
PsuedoStash internals, and it looks like that fell through the cracks 18:01
SmokeMachine is there a way to get CALLER::<$_> now?
ab5tract m: q| use v6.*; sub a { say CALLER::.keys }; $_ = 41; a |.AST.EVAL
camelia ===SORRY!===
Cannot up language revision 2 to 3 in an EVAL
ab5tract m: use v6.*; q| sub a { say CALLER::.keys }; $_ = 41; a |.AST.EVAL 18:02
camelia ()
ab5tract :(
SmokeMachine: it's definitely a bug
SmokeMachine :( 18:03
ab5tract if you'd like to poke at it, the code is in src/core.e/PsuedoStash.rakumod
SmokeMachine Yes, I was looking at it... but I won't pretend I understood it... but I'll try to take another look later... 18:11
18:12 melezhik_ left
SmokeMachine I suppose here is where it should change, right? github.com/rakudo/rakudo/blob/main...akumod#L76 18:13
or the $ctx... yeah... I'll need to take some time reading that... 18:14
my english is terrible and my translator did not help... what thunks mean on the context of nqp::ctxcallerskipthunks? 18:19
18:22 arkiuat left 18:23 melezhik_ joined
ab5tract thunking is when an expresion is turned into a block with an implicit invocant 18:24
subset Acceptable of Bool where True # True will be thunked to { $_ ~~ True } 18:25
lizmat Having special syntax handling causing it to not immediately be executed (like a Callable) but without having an independent scope. 18:26
ab5tract lizmat++ ; better said
lizmat copy pasted from raku.land/zef:lizmat/Raku::Elements#thunky 18:27
18:28 melezhik_ left
ab5tract SmokeMachine: this is definitely part of the "problem" -- github.com/users/ab5tract/projects...udo%7C5910 18:32
sorry, R#5910
linkable6 R#5910 [closed]: github.com/rakudo/rakudo/issues/5910 [6.e] `$CALLER::foo` allows access to caller's `my $foo` in 6.e
ab5tract I guess it's over-constrained. Probably it needs to include the topic variable, at least 18:33
though, without knowing your use case, there is always the chance that this is actually a DiWiDT 18:34
lizmat you mean, allowing CALLER::<$_> ?
ab5tract lizmat: yeah, that's what SmokeMachine was asking about
wouldn't $_ be considered an "our" scoped var?
lizmat no 18:35
ab5tract ok
lizmat from an optimization point of view, each scope has its own $_ 18:36
lexical
m: dd { say "foo" }
camelia -> ;; $_? is raw = OUTER::<$_> { #`(Block|4170659133424) ... }
lizmat note the "$_? is raw = OUTER::<$_>" in that signature
ab5tract so no, SmokeMachine, you may not access CALLER::<$_> 18:38
solution: use a named variable with an our scope
hope that's possible to do, but also curious to know why it won't work if it isn't possible 18:39
18:40 melezhik_ joined, arkiuat joined
ab5tract thanks lizmat, I had momentarily forgotten that they are created as part of signatures 18:40
lizmat eh, no, not as part of the signature: as part of the lexical scope
m: sub a() { dd MY::<$_>:exists }; a 18:41
camelia Bool::True
SmokeMachine I was trying to do something like this: usercontent.irccloud-cdn.com/file/.../image.png 18:42
maybe it should be an macro... 18:43
lizmat for the 2025.10 release, I needed to fix some CPAN5 modules
this was the diff I applied:
- !! CALLER::CALLER::<::?PACKAGE>.^name ~ '::' ~ $name
+ !! callframe(2).my<::?PACKAGE>.^name ~ '::' ~ $name
perhaps that hack could work ? 18:44
aruniecrisps @librasteve nvm I think I figured it out 18:54
librasteve =b 18:57
19:11 arkiuat left
ab5tract lizmat: I thought they were automatically installed in the scope, but then you have an example with a signature 19:27
*gave 19:28
lizmat sorry for that confusion
m: sub foo($a) { dd MY::<$a>:exists }; foo 19:29
camelia ===SORRY!=== Error while compiling <tmp>
Calling foo() will never work with declared signature ($a)
at <tmp>:1
------> sub foo($a) { dd MY::<$a>:exists }; <HERE>foo
lizmat m: sub foo($a) { dd MY::<$a>:exists }; foo 42
camelia Bool::True
lizmat so specifying a variable in a Routine signature, will also *add* it to the lexpad 19:30
m: sub foo($a) { dd MY::<$_>:exists }; foo 42
camelia Bool::True
lizmat but $_ will also be there, always
m: sub foo($a) { dd MY::<$/>:exists }; foo 42
camelia Bool::True
lizmat as $/ will be and $!
m: sub foo($a) { dd MY::<$!>:exists }; foo 42
camelia Bool::True
19:31 arkiuat joined
lizmat in RakuAST, see RakuAST::VarDeclaration::Implicit::Special 19:34
19:36 arkiuat left 19:59 melezhik_ left 20:04 arkiuat joined 20:09 arkiuat left 20:29 melezhik_ joined 20:33 melezhik_ left 20:38 arkiuat joined 20:42 arkiuat left 21:12 arkiuat joined 21:17 arkiuat left
[Coke] any english folks here who can tell me how disgusting it is that I've added sugar free peach drink flavor to my earl gray? 21:41
21:45 arkiuat joined 21:49 arkiuat left
jdv i can tell you that as an american 21:50
[Coke] it tastes good, like a fruity caffeinated tea 21:52
just wait until I get the orange flavor shipped!
22:07 wayland76 left 22:13 arkiuat joined 22:18 arkiuat left 22:27 Aedil left 22:31 arkiuat joined 22:40 habere-et-disper joined 22:41 arkiuat left 22:47 arkiuat joined 22:52 arkiuat left 22:54 melezhik left 23:10 arkiuat joined 23:15 arkiuat left 23:18 arkiuat joined 23:19 Sgeo joined 23:22 habere-et-disper left 23:23 sftp_ joined 23:24 arkiuat left, sftp left, sftp_ is now known as sftp, sftp left, sftp joined 23:30 arkiuat joined
jubilatious1_98524 @SmokeMachine "thunk" is what (I've seen people refer to) the * character's name/role in Raku. "Thunking" is the process. 23:32
m: put "CAT".map({$_.lc})
m: put "CAT".map( *.lc ); 23:33
(apologies for the poor grammar... ). 23:36
Voldenet too bad * can't be put inside sub args that way 23:46
m: put "CAT".map(lc(*)); 23:47
camelia No such method 'lc' for invocant of type 'Whatever'
in block <unit> at <tmp> line 1
Voldenet m: put "CAT".map({ lc($_) }); # but lc exists
camelia cat
Voldenet Ofc, you can simply pass &lc or do the following (although blocks aren't exactly free): 23:50
m: put "CAT".map(x.assuming());
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
x used at line 1
Voldenet m: put "CAT".map(&lc.assuming());
camelia cat
lizmat why not .map(*.lc) ? 23:56