🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:12 [Coke]_ is now known as [Coke] 00:19 [Coke]_ joined 00:21 [Coke] left 08:31 sena_kun joined
ab5tract okay, so diving deeper into the splice thingy... 11:53
m: use nqp; [$[<a b c>]].iterator.push-until-lazy(my $a = nqp::create(IterationBuffer)); dd $a 11:54
camelia Mu $a = ($["a", "b", "c"],).IterationBuffer
ab5tract m: use nqp; ($[<a b c>]).iterator.push-until-lazy(my $a = nqp::create(IterationBuffer)); dd $a
camelia Mu $a = ("a", "b", "c").IterationBuffer
Geth rakudo/main: adff147ea4 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp
Streamline Metamodel::ParametricRoleGroupHOW (Part 1/N)

  - remove private methods: an nqp::atpos on an out of range element
   produces an nqp::null, so we don't need to wrap that, in some
   case they were even double wrapped.
  - add helper sub for typecheck
  - add "api" method for consistency, this was apparently NYI
ab5tract I guess the above is just the single-arg rule in play? 11:57
lizmat m: dd [$[<a b c>]] 11:58
camelia [["a", "b", "c"],]
lizmat m: dd ($[<a b c>])
camelia $["a", "b", "c"]
lizmat hmmm 11:59
ab5tract m: my $i = [$[<a b c>]].iterator; dd $i.pull-one
camelia $["a", "b", "c"]
ab5tract m: my $i = ($[<a b c>]).iterator; dd $i.pull-one
camelia "a"
ab5tract which on the one hand makes total sense. on the other hand, it feels weird 🙃 12:00
lizmat m: dd my $i = ($[<a b c>]).iterator.^name 12:01
camelia Mu $i = "Rakudo::Iterator::ReifiedArrayIterator"
lizmat m: dd my $i = [$[<a b c>]].iterator.^name 12:02
camelia Mu $i = "Rakudo::Iterator::ReifiedArrayIterator"
ab5tract m: dd my $i = ($[<a b c>],).iterator; dd $i.pull-one 12:04
camelia Mu $i = Rakudo::Iterator::ReifiedListIterator.new
$["a", "b", "c"]
ab5tract which, again, makes sense.. 12:05
but none of that makes the splice behavior feel right :/ 12:09
nine Array itemizes its elements 13:08
ab5tract The reason this is being discussed is because splice doesn't allow $@a to be treated as an item 13:18
which feels less than nice 13:19
using the type system, is there any way to distinguish between `$[1,2]` and `[1,2]` 14:54
?
or beyond the type system, for that matter 14:59
releasable6 Next release in ≈4 days and ≈3 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 15:00
nine m: say [] ~~ Scalar 15:28
camelia False
tellable6 2024-03-24T14:27:29Z #raku <Xliff> nine Could use a bit of your time. I'm having trouble with NativeCall crashes. #5534 could use your attention and also, what's the best way from converting a Str to a gpointer and NOT having it freed by C?
nine m: say $[] ~~ Scalar
camelia False
nine m: say [].VAR ~~ Scalar 15:29
camelia False
nine m: say $[].VAR ~~ Scalar
camelia True
nine ab5tract: ^^^
ab5tract ah, perfect, thanks! 15:57
unfortunately... 16:41
m: multi sub f($a where *.VAR ~~ Scalar) { say "scalar"; dd $a }; multi sub f(@a) { dd @a }; f $[1,2]
camelia [1, 2]
ab5tract likewise with additional constraint: 16:42
m: multi sub f(Array:D $a where *.VAR ~~ Scalar) { say "scalar"; dd $a }; multi sub f(@a) { dd @a }; f $[1,2]
camelia [1, 2]
ab5tract and, for logical though unfortunate reasons, scalar-hood does not survive assignment to an array container 16:44
(or binding)
so I don't see how it would be possible to make `@a.splice(*, *, $[1,2])` DWIM based on the current implementation (or perhaps ever) 16:45
Geth rakudo/main: bafa92a601 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp
Streamline Metamodel::ParametricRoleGroupHOW (Part 2/2)

  - move parameterizer code to the actual parameterizer, instead of
   another "private" method
  - make adding a possibility threadsafe
  - simplify candidate selection logic and abstract error handling
   into a helper method
17:35
ab5tract m: multi sub f($a where *.can("elems") == 2) { say "scalar" }; multi sub f(@a) { say "array" }; f(my $a = [1,2]) 21:45
camelia array
ab5tract usually I expect multi's to match according to order of defined-ness... 21:46
regardless, it just feels out of sorts to me that there is no way for a signature to make a distinction between `$[]` and `[]` 21:49
patrickb lizmat: Wrt fixing the Azure integration on Raku/nqp: I still don't see the buttons I'd like to push (I'm missing settings for integrations). is there any GitHub access level > admin? 22:22
22:28 [Coke]_ is now known as [Coke]
[Coke] patrickb: under settings/integrations/github apps, I see azure pipelines; where does that break for you? 22:30
I see you have "Maintain" privs on raku/nqp, not admin 22:31
lizmat it's Admin now
[Coke] cool.
lizmat++ patrickb++ 22:32
22:56 sena_kun left