00:20 yewscion joined 00:25 yewscion left 00:51 Guest99 joined 00:53 Guest99 left 00:59 yewscion joined 01:04 yewscion left 01:17 yewscion joined 01:21 yewscion left 01:47 Manifest0 left 02:14 kylese left, hulk joined 02:45 skyesoss left 03:15 kst left, hulk left, kylese joined 03:17 kst joined 03:18 yewscion joined 03:23 yewscion left 03:28 skyesoss joined 04:19 yewscion joined 04:24 yewscion left 04:29 skyesoss left, skyesoss joined 04:32 skyesoss left 04:33 skyesoss joined 04:44 zayd is now known as Guest6873 05:58 skyesoss left 06:46 yewscion joined 06:53 yewscion left 07:21 yewscion joined 07:29 yewscion left 10:12 yewscion joined 10:16 yewscion left, sena_kun joined 10:30 xinming left 10:45 xinming joined 10:47 yewscion joined 10:52 yewscion left 11:12 yewscion joined 11:18 yewscion left
Geth ecosystem/main: ce82bb8925 | (Elizabeth Mattijsen)++ | META.list
Remove Dice::Roller

It lives in the Raku ecosystem now
11:26
ecosystem/main: ef39e21ed5 | (Elizabeth Mattijsen)++ | META.list
Remove Algorithm::Soundex

It lives on as a Raku Community module
11:38 Sgeo left 11:44 yewscion joined 11:48 yewscion left
Geth ecosystem/main: b0e9e08e26 | (Elizabeth Mattijsen)++ | META.list
Removed Text::UpsideDown

It is effectively replaced by Acme::Text::UpsideDown
11:59
grondilu m: say class { has %.h; multi method new($x = Any) {...}; }.new: h => %(foo => "bar") # not sure why custom new method is executed here 12:07
camelia Stub code executed
in method new at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu m: say class { has %.h; multi method new($x = Any) { "why am I exectuded?" }; }.new: h => %(foo => "bar") 12:09
camelia why am I exectuded?
lizmat m: m: say class { has %.h; multi method new($x) { "why am I exectuded?" }; }.new: h => %(foo => "bar") 12:10
camelia <anon|1>.new(h => {:foo("bar")})
lizmat m: m: say class { has %.h; multi method new() { "why am I exectuded?" }; }.new: h => %(foo => "bar")
camelia why am I exectuded?
grondilu but there is a named argument, why would the version with none be called? 12:11
lizmat because optional named arguments are *not* part of dispatch decisoins
*decisions
grondilu you mean optional positional arguments?
lizmat m: m: say class { has %.h; multi method new() { "why am I exectuded?" }; }.new) 12:12
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> d new() { "why am I exectuded?" }; }.new<HERE>)
lizmat m: m: say class { has %.h; multi method new() { "why am I exectuded?" }; }.new
camelia why am I exectuded?
lizmat so the optional named argument doesn't enter into the decision
by making it a multi, you're adding it to the existing candidates 12:13
grondilu fine. I'm not sure how to do what I want to do now. I'll figure something I guess 12:14
lizmat add a proto
grondilu I can't add a proto to new, can I? 12:15
lizmat m: m: say class { has %.h; multi method new(Mu:) { "why am I exectuded?" }; }.new
camelia Ambiguous call to 'new(<anon|1>: )'; these signatures all match:
(Mu $:: *%attrinit) from SETTING::src/core.c/Mu.rakumod line 139
(Mu $:: *%_) from <tmp> line 1
in block <unit> at <tmp> line 1
lizmat ok, there's your answer
m: dd $_ for class { has %.h; multi method new() { "why am I exectuded?" }; }.^find_method("new").candidates
camelia multi method new (Mu $:: *%attrinit) { #`(Method|6475715608480) ... }
multi method new (Mu $:: $, *@, *%_) { #`(Method|6475715608616) ... }
multi method new (<anon|1> $:: *%_) { #`(Method|6475715339600) ... }
lizmat the other candidates have Mu: as the invocant marker 12:16
your additional :new" has Any: as the invocant marker, which is narrower
re your question about proto: "new' is not different from any other method, nothing magical about it 12:17
so yes, you *can* add a proto method new(|) {*}
to shadow the .new provided by Mu
grondilu m: say class { has %.h; proto method new(|) {*}; multi method new($x = Any) { "why am I exectuded?" }; }.new: h => %(foo => "bar") 12:18
camelia why am I exectuded?
grondilu I don't get why adding a proto would help
lizmat well, what are you trying to achieve then?
the execution is legit, as methods always have an implicit *%_ in their signature 12:19
and in this case, that eats the named "h" argument
grondilu oh
lizmat and since the positional is optional, it can bind the argument capture to the signature, so dispatch will work 12:20
grondilu let me tell you what I want to do : it's for my Chess module.
I want a Chess::Position class that accepts a FEN as argument for the constructor 12:21
FEN is a Str, basically
lizmat yes, I recently read a blog post about that :-)
grondilu but I want the constructor to be able to be called with a default FEN (the start position).
lizmat right 12:22
SmokeMachine m: say class { has %.h; multi method new($x = Any, *%_ where *.elems = 0) { "why am I exectuded?" }; }.new: h => %(foo => "bar")
camelia ===SORRY!=== Error while compiling <tmp>
Cannot put default on slurpy parameter %_
at <tmp>:1
------> thod new($x = Any, *%_ where *.elems = 0<HERE>) { "why am I exectuded?" }; }.new: h =>
expecting any of:
constraint
grondilu yet I also want to access the default constructors, the ones with named arguments.
SmokeMachine :(
lizmat m: method new($foo) { self.bless(:$foo) } 12:23
camelia Potential difficulties:
Useless declaration of a has-scoped method in mainline (did you mean 'my method new'?)
at <tmp>:1
------> method<HERE> new($foo) { self.bless(:$foo) }
lizmat would that work for you?
the named arg handling of Mu.new is basically a frontend for a call to .bless
grondilu I guess I should review bless 12:24
lizmat method new($foo) { self.bless(:$foo, |%_) } # better, also passes any named args
Geth ecosystem/main: 602ab05f92 | (Elizabeth Mattijsen)++ | META.list
Remove App::jsonv

It is broken, doesn't produce much functionality, should probably be an installable script with e.g. JSON::Fast
12:25
grondilu `self.bless: |%_` should work
lizmat well, that's basically what the default .new does 12:26
grondilu so maybe instead I could use nextsame or something?
12:27 MyNetAz left
grondilu m: say class { has %.h; proto method new(|) {*}; multi method new($x = Any) { nextsame }; }.new: h => %(foo => "bar") 12:27
camelia <anon|1>.new(h => {:foo("bar")})
lizmat let me get the question right
grondilu m: say class { has %.h; proto method new(|) {*}; multi method new($x = Any) { say "calling custom new"; nextsame }; }.new: h => %(foo => "bar")
camelia calling custom new
<anon|1>.new(h => {:foo("bar")})
grondilu m: say class { has %.h; multi method new($x = Any) { say "calling custom new"; nextsame }; }.new: h => %(foo => "bar")
camelia calling custom new
<anon|1>.new(h => {:foo("bar")})
grondilu ^that seems like what I need 12:28
lizmat you want to be able to call Chess.new with an optional positional argument that maps to one of the attributes in the class
is that correct?
grondilu no 12:30
the optional argument has nothing to do with any attributes of the class
it's just a parameter used for construction
lizmat what does it have to do then?
grondilu it will be used to set the attributes
lizmat aah.... 12:31
then I'd say:
grondilu (so I guess it has a little bit to do, just not directly)
El_Che jdv: thx for the mail! 12:32
lizmat method new($foo?) { %_<foo> = $_ with $foo; self.bless(|%_) }
12:34 yewscion joined
grondilu something like that, but can I write `nextsame` instead of `self.bless(|%)`? 12:35
Geth ecosystem/main: f91be59c8a | (Elizabeth Mattijsen)++ | META.list
Removed Slang::AltTernary

It was intended as an experiment not to be used in production code and has bitrotted since then
12:36
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method (Str $fen?) { nextsame } }; say Position.new: pieces => %(e1 => Piece.new) 12:37
camelia ===SORRY!=== Error while compiling <tmp>
An anonymous method may not take a multi declarator
at <tmp>:1
------> ; multi method (Str $fen?) { nextsame } <HERE>}; say Position.new: pieces => %(e1 => P
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; say Position.new: pieces => %(e1 => Piece.new) 12:38
camelia Type check failed in binding to parameter 'key'; expected square but got Str ("e1")
in method new at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu ^Why was the square turned into a string?
m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd %(e1 => Piece.new) 12:39
camelia {:e1(Piece.new)}
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd %(e1 => Piece.new).keys.pick.WHAT
camelia Str
12:39 yewscion left
grondilu oh I see 12:39
m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd (my %{square} = e1 => Piece.new).keys.pick.WHAT 12:40
camelia Type check failed in binding to parameter 'key'; expected square but got Str ("e1")
in block <unit> at <tmp> line 1
El_Che (building new Linux packages atm)
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd (e1 => Piece.new).key.WHAT 12:41
camelia Str
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd (Pair.new: e1, Piece.new).key.WHAT
camelia square
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; dd (my %{square} = Pair.new: e1, Piece.new).keys.pick.WHAT
camelia square
12:42 MyNetAz joined
Geth ecosystem/main: c667dbe774 | (Elizabeth Mattijsen)++ | META.list
Remove Bio::ViennaNGS

It was a prototype without documentation or tests
12:42
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method (Str $fen?) { nextsame } }; say Position.new: pieces => my %{square} = e1, Piece.new
camelia ===SORRY!=== Error while compiling <tmp>
An anonymous method may not take a multi declarator
at <tmp>:1
------> ; multi method (Str $fen?) { nextsame } <HERE>}; say Position.new: pieces => my %{squa
grondilu m: enum square ('a'..'h' X~ 1..8); class Piece {}; class Position { has Piece %.pieces{square}; multi method new(Str $fen?) { nextsame } }; say Position.new: pieces => my %{square} = e1, Piece.new
camelia Position.new(pieces => (my Piece %{square} = square::e1 => Piece.new))
grondilu got it
lizmat I think the nextsame is the equivalent of "self.bless(|%_)" but with two levels of indirection less 12:44
in this case, I mean :-)
grondilu is there a better way to create an anonymous typed hash? 12:46
anyway I forgot to check something 12:49
m: say class { has %.h; proto method new(|) {*}; multi method new($x = Any) { say "calling custom new"; nextsame }; }.new: h => %(foo => "bar") 12:50
camelia calling custom new
<anon|1>.new(h => {:foo("bar")})
grondilu nevermind 12:51
El_Che fun, fedora 41 changes dnf (old options changed) and pkg group names 12:57
grondilu El_Che: I've switched to silverblue lately, it's rather nice. 13:05
El_Che grondilu: interesting. What kind of pkg management does it use (in the case we need to provide packages)? 13:06
rpm-ostree I see on the page
13:06 yewscion joined
El_Che so just regular fedora rpms really? docs.fedoraproject.org/en-US/fedor...positories 13:08
grondilu rpm-ostree mainly, along with flatpak and toolbox's dnf 13:09
I like how it's reassuring that it's unlikely I will clutter my system 13:10
El_Che so there is nothing we need to do to support it? (uploading fedora 40,41,rawhide atm)
grondilu nothing, as the usual dnf system is always available at least through dnf 13:11
as for rpm-ostree, I don't know.
nothing, as the usual dnf system is always available at least through *toolbox*
13:11 yewscion left
grondilu I see rakudo listed in `rpm-ostree search rakudo` anyway 13:12
El_Che yes, that's the version packaged by the OS
I release the latest raku, so depending on your use case you can use one or the other 13:13
grondilu I like bleeding edge software so I install rakudo from toolbox 13:14
El_Che great if they care of updates that fast!
grondilu weirdly enough I could still run it outside of toolbox afterwards. I don't get how that is possible tbh
El_Che bind mounting magic?
grondilu no idea 13:15
El_Che: to be clear I meant I install rakudo from the github source, which I compile inside toolbox 13:19
El_Che ah, ok. I thought they always had the latest rakudo, being a rolling release
13:29 yewscion joined
El_Che all pkgs uploaded except ubuntu devel as cloud smith need to add the repo 13:33
13:34 yewscion left
Geth ecosystem/main: c7dca12e5b | (Elizabeth Mattijsen)++ | META.list
Removed WebService::Slack::Webhook

as it lives on as a Raku Community module now
13:43
ecosystem/main: b77c38438c | (Elizabeth Mattijsen)++ | META.list
Remove Fortran::Grammar

It lives on as a Raku Community module, and has been for a while already
13:45
ecosystem/main: fca28ec6d0 | (Elizabeth Mattijsen)++ | META.list
Removed App::Miroku

It has not seen any updates for 7 years, and its functionality has basically been superseded by App::Mi6
13:48
ecosystem/main: 77b7f3a330 | (Elizabeth Mattijsen)++ | META.list
Removed Pekyll

It has not seen any updates in 9 years, and its functionality is basically provided by several other modules, e.g. Cro
13:51
El_Che Ok, all packages uploaded 14:03
14:14 yewscion joined 14:20 yewscion left 14:27 Manifest0 joined 14:46 yewscion joined 14:51 yewscion left 15:36 yewscion joined 15:42 yewscion left
tbrowder hi, does fork of comma have an IRC channel? 16:00
antononcube Hm... I think no, it doesn't. But might be a good idea to have one. 16:06
This reminds me -- I have Comma-plugin bug to report. (Or a feature, not sure.) 16:07
BTW, that bug came from perusing "Math::Matrix". 16:08
16:09 yewscion joined
@lizmat My Raku Advent post "Chebyshev polynomials and Fitting Workflows" has a finished MVP. (You should be able to see the draft.) 16:14
16:15 yewscion left 16:16 yewscion joined
This time I used an LLM copy-editor. I am sort of happy with the results, but I might want to change some of the statements that were changed to sound like marketing blurbs. 16:18
16:21 yewscion left 17:00 pk joined 17:01 eseyman left 17:08 manu_ joined
Geth advent/main: 8446bb86aa | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2024/authors.md
Schedule 16, 20
17:39
lizmat antononcube tweaked some of the code examples and scheduled it for the 20th 18:00
Geth ecosystem/main: 23d7b226ef | (Elizabeth Mattijsen)++ | META.list
Removed Brazilian::FederalDocuments

It lives on as a Raku Community module
18:02
18:15 MyNetAz left
Geth ecosystem/main: f34702d9a7 | (Elizabeth Mattijsen)++ | META.list
Removed vCard::Parser

It has been moved to Raku Community modules
18:26
ecosystem/main: 2fe199bcde | (Elizabeth Mattijsen)++ | META.list
Removed Math::Matrix

It has been moved to Raku Community modules
18:30 MyNetAz joined
Geth ecosystem/main: 42d0ff05ee | (Elizabeth Mattijsen)++ | META.list
Removed Dictionary::Create

Has been abandoned for 7+ years after an initial day of commits, has not tests and does not appear to provide any actually useful functionality in this state
18:35
18:41 manu_ is now known as eseyman
ky i am misunderstanding something deep 18:58
m: my @foo = [<. . .>.Array, <. @ .>.Array]; my @bar = @foo.clone; @foo[0;0] = '@'; say @bar
camelia [[@ . .] [. @ .]]
lizmat .clone is not a deep clone ?
ky why does @bar change when i @foo[0;0] = '@' ?
copying an array should be easy. what am i missing? 19:01
19:02 yewscion joined
ky it's as if i copy the array, but it is actually an array of containers; change any of the containers and the changes seem to propagate . 19:03
19:06 yewscion left 19:08 yewscion joined, abraxxa-home joined 19:12 abraxxa-home left 19:13 yewscion left, abraxxa-home joined
antononcube @grondilu How easy is to use you package "Chess" to plot chessboards of any dimensions? Say, any square chessboards ones. 19:21
Does you FEN and PGN parsers work with specs for any chessboard size? I am not sure for PGN, but FEN can consistenly generalized to work with any square size chessboard. 19:23
For example, I like to play 5x5 chess, because develops and finishes quickly. 19:24
cdn.discordapp.com/attachments/633...d4667&
19:35 yewscion joined 19:40 yewscion left 19:42 yewscion joined 19:47 yewscion left 19:48 Sgeo joined
Geth ecosystem/main: 782cac4870 | (Elizabeth Mattijsen)++ | META.list
Removed Data::StaticTable

It now lives on as a Raku Community module
20:03
advent/main: a7156c99c3 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2024/authors.md
Removing slots 16, 17, 23: expected authors are unresponsive
20:29
antononcube 😱
lizmat yeah, not nice 20:30
who knows why though, so we shouldn't judge
antononcube @lizmat I can do/write "Using RakuChatbook as my REPL" but after Dec 20. 20:31
lizmat it's just that I would like to know if someone can't make it
23rd?
I'd say, sleep a night over it :-) 20:32
I will :-) 20:33
antononcube Ok.
I was really interested to see "Using RakuChatbook as my REPL" by massa. 20:41
Meaning, anyone else than me using / talking about Raku chatbooks.
20:52 yewscion joined 20:57 yewscion left 21:26 zetaaaa joined 21:51 abraxxa-home left 22:48 Manifest0 left
librasteve i’m still on track for 21/12 … but that needs a couple of days to prep … let me know if you need me to chuck one in on santas megastructures 22:51
22:51 sena_kun left 22:55 Manifest0 joined
the_real_pk I want to start learning Raku and I am a user of neovim, vscode and jetbrains. I want to be able to use raku in neovim though. @bscan has created a VSCode, but I can't find a way to add raku support in neovim. Is this the right place to ask for help, or I should ask somewhere else? Another question is about the rakudo repl on WSL (linux), I get a nice icon in case there is an error, but on windows only <HERE>. Is 23:40
there a way to fix this for windows? Thanks a lot in advance.
cdn.discordapp.com/attachments/633...bbc35&
bscan The extension is a language server, so it works in neovim as well. Provides syntax checking, outline view, goto definition, and some docs. It's definitely limited in functionality relative to other language servers though, and would benefit from additional contributors. 23:51
antononcube Can neovim run Jupyter notebooks? 23:59