🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:20 Manifest0 left
guifa okay stupid question, setting a type constraint on a named argument? 00:37
:%foo is Bar bombs
is it Positional constraint or bust there?
where will bomb with Constraint type check failed in binding to parameter '%foo'; expected anonymous constraint to be met but got Hash (${}) if the arg isn't passed 00:40
00:44 jpn joined 00:50 jpn left 00:53 haxxelotto joined
ab5tract m: sub s(Int :%h) { dd %h }; s :h(my Int %h = z => 1) 01:03
camelia Int %h = (my Int % = :z(1))
ab5tract m: sub s(Int :%h) { dd %h }; s() 01:05
camelia (my Int %)
ab5tract guifa: ^^ I hope this works for what you need 01:06
guifa ab5tract that types the values, I'm talking about typing the container itself :) 01:07
(e.g. enforcing Set vs Hash vs Map vs other Positional containers) 01:08
ab5tract Ah, now I see what you mean :) 01:09
Is the associative container a must have? 01:11
guifa one second while I put on my dunce hat for having called it Positional twice
it's been a long day lol
but I mean I can get around it, it just would be nice for typifying my code. Alternative is using NotAHash :$foo of course 01:12
ab5tract m: multi sub s(Hash :$h) { dd <hash>, $h }; multi sub s(Set :$h) { dd <set>,$h.raku}; s :h(%(z => 1)); s :h(set <a b c>); 01:17
camelia "hash"
${:z(1)}
"set"
"Set.new(\"b\",\"a\",\"c\")"
ab5tract I need to adjust my phone to not use “smart quotes”, in case you were wondering why I wrote <hash> and <set> 01:19
I think it is probably worth writing a bug report about it
guifa I mean, smart quotes are valid in Raku 01:22
ab5tract Well camelia was dying for some reason. But to be clear, I meant a bug report about your use case 01:25
I think it’s fallout from non-scalar type constraints being a bit wobbly to work with 01:27
m: Q| sub s(:%h is Set) { dd %h }; s :h(my %h = set <a b c >) |.AST.EVAL
camelia ===SORRY!===
Can't use unknown trait 'is' -> 'unknown subtype' in a parameter declaration.
guifa yeah I thought traits were in general allowed, so I'm not going crazy 01:28
ab5tract I was hoping for the old “fixed in RakuAST” but unfortunately not
guifa bisect: Q| sub s(:%h is Set) { dd %h }; s :h(my %h = set <a b c >) |.AST.EVAL
bisectable6 guifa, Will bisect the whole range automagically because no endpoints were provided, hang tight
guifa, Output on all releases: gist.github.com/696a7b13f026fbc1fe...a3394f40a2 01:29
guifa, Bisecting by output (old=2022.12 new=2023.02) because on both starting points the exit code is 1
guifa, bisect log: gist.github.com/ac9c89295d13ddebeb...d5e2784a3d
guifa, (2023-01-02) github.com/rakudo/rakudo/commit/2d...556c6a886e
guifa, Bisecting by output (old=2016.09 new=2016.10) because on both starting points the exit code is 1
guifa, bisect log: gist.github.com/2bccc18aef30000c25...807879dc04
guifa, Output on all releases and bisected commits: gist.github.com/a55563464db2d55d85...78465bd21b
guifa lol I guess that's actually not a very helpful thing to try to bisect 01:30
the whole AST thing and all
ab5tract Can confirm you are not going crazy 01:31
m: my %h is Set = set <a b c>; dd %h
camelia Set.new("a","b","c")
ab5tract Looks like we need to stabilize the parameter ‘is’ trait options with the constructor ones 01:33
Can you file a bug report for this? 01:34
It’s already way past my bedtime :)
guifa yeah no problem. It's getting close to mine too. I'm an old man these days
ab5tract Cheers! I hope you rest well when you get there. 01:35
guifa m: sub s(%h is Set) { ; } 01:41
camelia ===SORRY!=== Error while compiling <tmp>
Can't use unknown trait 'is' -> 'unknown subtype' in a parameter declaration.
at <tmp>:1
expecting any of:
rw
readonly
copy
required
raw
guifa bisect: sub s(%h is Set) { ; } 01:43
bisectable6 guifa, Will bisect the whole range automagically because no endpoints were provided, hang tight
guifa, Output on all releases: gist.github.com/deb7ec23fa68b4ff48...6acccf3305
guifa, Bisecting by output (old=2018.12 new=2019.03.1) because on both starting points the exit code is 1
guifa, bisect log: gist.github.com/57ae95a4566a4e7907...d4acd1f2f1 01:44
guifa, Output on all releases and bisected commits: gist.github.com/cd5f7ef5dd0826cbd8...d896ad8c28
01:45 jpn joined 01:50 jpn left 02:09 hulk joined 02:10 kylese left 02:29 teatime joined 02:46 jpn joined 02:52 jpn left 03:15 haxxelotto left, hulk left, ACfromTX joined, kylese joined
Voldenet m: sub x(*%y) { say %y }; my %h = :A("B") :C("D"); x(:A("B") :C("D")); say %h 03:20
camelia {A => B, C => D}
{A => B}
Voldenet hm, that :C("D") gets gobbled up without any error or a warning 03:21
03:47 jpn joined 03:52 jpn left 03:57 guifa left 04:09 guifa joined 04:13 guifa left 04:42 jpn joined 04:47 jpn left 05:06 teatwo joined 05:08 tea3po joined, teatime left 05:11 teatwo left 05:14 teatwo joined 05:18 tea3po left 05:36 jpn joined 05:41 jpn left 06:32 jpn joined 06:37 jpn left 06:59 Sgeo left 07:03 jpn joined 07:07 jpn left 08:30 xinming left 08:32 xinming joined 08:38 ptc joined 08:46 sena_kun joined 08:53 dakkar joined 09:05 Manifest0 joined 09:21 haxxelotto joined 09:39 hudo joined 09:40 hudo left 09:41 hudo__ left 09:52 jpn joined 09:58 bdju left 10:00 bdju joined
antononcube raku.land seems stale. 10:17
Actually 360.zef.pm seems un-updated too. At least, I do not see my submissions with fez from yesterday. 10:20
lizmat tonyo ^^ 10:27
ugexe ^^ 10:32
lizmat clickbaits rakudoweekly.blog/2024/03/25/2024-...ing-again/ 11:08
11:15 jpn left 11:33 haxxelotto_ joined, haxxelotto left 11:56 jpn joined 12:07 hudo joined 12:32 vlad joined 12:44 jpn left 13:11 jpn joined
ab5tract Voldenet: it is gobbled by the implicit *%_ of infix:<=> 13:13
not sure if there is a clean way to emit a worry about that or not.. 13:14
13:18 vlad left 13:47 haxxelotto_ left 13:48 haxxelotto_ joined
antononcube rakuforprediction.wordpress.com/20...th-llming/ 14:13
14:19 jpn left 14:22 jpn joined 14:44 vlad joined 14:49 vlad left 15:50 jpn left 15:54 jpn joined
tonyo antoncube: what's the dist name? i'll take a look 15:57
(also, i'm writing integration tests right now for the new ecosystem backend - should get better messaging/alerts from it) 15:58
antononcube @tonyo "Data::Importers" 16:02
There submitted the version 0.1.2 16:03
tonyo okay will take a look shortly
antononcube 👍 16:10
16:25 haxxelotto_ left 16:26 haxxelotto_ joined 16:41 ptc left 16:53 haxxelotto_ left 16:54 haxxelotto_ joined 16:55 xinming left 16:56 xinming joined 17:03 jpn left 17:33 xinming left, xinming joined 17:44 dakkar left 18:00 vlad joined 18:14 vlad left, perryprog_ is now known as perryprog
tonyo skaji_: for mi6 i'm going to be upgrading the upload interface and it'll become a direct upload rather than the key exchange we do now. you can see the new method in the API here. this endpoint isn't live but i plan on only running dual services for about a month. hoping to deploy this change early next week so the current setup will continue to work for about a month afterward 18:16
github.com/tony-o/raku-fez/blob/ma...kumod#L298
18:21 vlad joined 18:29 avuserow left 18:30 avuserow joined 18:36 Xliff joined
Xliff ... and JSON-GLib was released until the world via CPAN. 18:36
tellable6 2024-03-26T12:14:00Z #raku-dev <nine> Xliff: you could just try to .decode those strings instead of using nativecast
tbrowder hi, i'm getting intermittent failures witj App::Mi6 but not zef test. App::Mi6 uses TAP::Harness and I wonder if that might be the problem 18:38
Xliff .tell nine What do you mean? Would you mind providing an example in #5534? Thanks. 18:41
tellable6 Xliff, I'll pass your message to nine
Xliff I wonder if I should release Pango, GDK and GtkPlus..... 18:42
Oh, that would also mean releasing ATK
Slow and steady...
tbrowder hm, maybe i forgot....in a regex, is this valid syntax: <[,;|]> 18:49
18:50 vlad left
lizmat m: say "," ~~ / <[,;|]> / 18:50
camelia 「,」
lizmat looks like :-)
18:50 vlad joined
tonyo looking for volunteers to help keep fez up to date, currently getting inundated by it + all of the other things i have going on 18:58
please pm if interested
lizmat what are the prereqs for maintennance ? 18:59
or are we just talking the client side, tonyo ?
antononcube @tonyo Can an LLM persona handle it? 19:02
tonyo client side 19:26
LLM? means in this context?
lizmat I think antononcube was jesting (well, I hope) 19:28
antononcube Yes! @lizmat is correct! 19:29
lizmat tonyo: are there issues that need to be handled? 19:30
roguerakudev Is there any news on a "version 2" of NativeCall? I'm still hankering to be able to pass C structs by value :^) 19:42
tonyo yea there are a number of them on the repo github.com/tony-o/raku-fez
20:20 ptc joined 20:26 rypervenche joined
Xliff I'm still getting this when attempting to build rakudo using rakubrew: 'make: *** No rule to make target '/home/cbwood/.rakubrew/versions/moar-blead/nqp/nqp-m', needed by 'NQPP5QRegex.moarvm'. Stop. 20:37
"
This only triggers for "rakubrew build moar-blead"
This will persist even through a "rakubrew nuke moar-blead" so help would be nice! 20:38
ugexe since it works for you when using a different user maybe its worth checking whatever env vars get used by the generated make file on your current user and on another user 20:41
otherwise not sure how else it'd not work for one user on your system, but not a new user on the same system 20:42
Xliff Which environment variables would that be? 20:43
ugexe maybe diffing the generated makefile would be useful too
i dunno, you'd have to look at the makefile
Xliff Any idea what I would be looking for?
ugexe nope
Xliff This was just working last week!
And it's only moar-blead that's failing. If I use the hash option, or use "rakubrew build moar", then everything is fine. 20:44
ugexe moar-blead doesn't respect nqp/moarvm bumps, im not sure if using the hash option does or not 20:45
at least i think moar-blead just grabs HEAD on all three repos
whereas giving a commit id of rakudo to build would respect moarvm/nqp bumps
Xliff Actually, moar-blead uses "--gen-moar=main --gen-nqp=main' 20:52
Is there a way to manually handle the bumps?
ugexe i think --gen-moar-=main --gen-nqp=main is taking HEAD 20:54
but --gen-moar=HEAD --gen-nqp=HEAD is what i use when invoking Configure.pl manually 20:55
Xliff This is the actual command... 20:56
/usr/bin/perl Configure.pl --backends=moar --gen-moar=main --gen-nqp=main --make-install --gen-moar --force-rebuild --moar-option="--debug" --git-cache-dir="/home/cbwood/.rakubrew/git_reference"
ugexe++ 20:57
Switching "main" with "HEAD" did the trick.
ugexe hmm, i wonder if that means bumping moar/nqp in rakudo would fix rakubrew build moar-blead for you
Xliff Oh shizzle....
Maybe not. I Had moar-blead symlinked. 20:58
cd ..
And no. Replacing "main" with "HEAD" gives same error. 20:59
aruniecrisps @SmokeMachine I'll look at your code soon 21:02
SmokeMachine \o/ 21:03
21:05 vlad left 21:31 guifa joined 21:34 haxxelotto_ left
Voldenet ab5tract: I'm not sure if it's implicit *%_, with comma it works as expected 21:40
m: sub x(*%y) { say %y }; my %h = :A("B"), :C("D"); x(:A("B"), :C("D")); say %h
camelia {A => B, C => D}
{A => B, C => D}
Voldenet but maybe I'm simply not aware of difference between syntax with , and without, is it described somewhere? 21:41
ab5tract The behavior in the absence of the comma is why I suspect *%_. If we weren’t dealing with pairs, the lack of a comma would be a syntax error. 21:44
m: class C { method ASSIGN-KEY($k, %v) { dd %v } }; C.new<k> = :a :b; 21:53
camelia :a
ab5tract As for docs, I’m not sure where the best place to look would be.. for this it might actually be the source 21:54
tbrowder ok, found the error, mi6 is fine 21:58
ab5tract m: class C { method ASSIGN-KEY($k, %v) { dd %v } }; C.new<k> = :a :b; dd C.can(‘ASSIGN-KEY’).first.signature 22:02
camelia :a
:(C: $k, %v, *%_)
ab5tract Not sure how to access that “secret” %_ .. it doesn’t have any contents when dumped from within the method body 22:03
22:13 Sgeo joined
ab5tract Hmm.. the plot thickens.. 22:14
m: class C { multi method ASSIGN-KEY($k, %v, :$b!) { dd $b }; multi method ASSIGN-KEY($k, %v) { dd %v } }; C.new<k> = :a, :b;
camelia Type C does not support associative indexing.
in block <unit> at <tmp> line 1
ab5tract It doesn’t like the comma there 22:15
m: class C { multi method ASSIGN-KEY($k, %v, :$b!) { dd $b }; multi method ASSIGN-KEY($k, %v) { dd %v } }; C.new<k> = :a :b;
camelia :a
ab5tract It ignores the named parameter there..
22:18 haxxelotto_ joined
ab5tract I think it’s maybe worth digging deeper into this 22:24
m: class C { multi method ASSIGN-KEY($k, %v, :$b!) { dd $b } }; my %z = :x, :y; C.new<k> = %z :b;
camelia ===SORRY!=== Error while compiling <tmp>
You can't adverb %z
at <tmp>:1
------> $b } }; my %z = :x, :y; C.new<k> = %z :b⏏;
expecting any of:
pair value
ab5tract m: class C { multi method ASSIGN-KEY($k, %v, :$b!) { dd $b } }; my %z = :x, :y; C.new<k> = %z, :b; 22:25
camelia Type C does not support associative indexing.
in block <unit> at <tmp> line 1
ab5tract m: class C { method ASSIGN-KEY($k, %v, :$b!) { dd $b } }; my %z = :x, :y; C.new<k> = %z, :b;
camelia Type check failed in binding to parameter '%v'; expected Associative but got List (({:x(Bool::True), :y...)
in method ASSIGN-KEY at <tmp> line 1
in block <unit> at <tmp> line 1
ab5tract And then finally: 22:26
m: class C { method ASSIGN-KEY($k, %v, :$b!) { dd $b } }; my %z = :x, :y; C.new<k> = $%z :b; 22:27
camelia Required named parameter 'b' not passed
in method ASSIGN-KEY at <tmp> line 1
in block <unit> at <tmp> line 1
22:36 gabiruh left 22:42 gabiruh joined 22:47 gabiruh left 22:59 gabiruh joined 23:09 gabiruh left 23:14 gabiruh joined 23:21 jaguart left 23:30 ptc left 23:40 sena_kun left
guifa hmmm 23:54
m: sub foo ($x) { ENTER say "entered"; LEAVE say "left"; for ^$x { FIRST say "first"; LAST say "last"; return if $_ == 0; }}; foo 42
camelia entered
first
left
guifa seems something is missing there