🦋 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. |
|||
[Coke] | what does Mu.sink do? (it's defined to do nothing, but does it somehow do something?) | 02:38 | |
Operator was added to rakudo and to S02-types/WHICH.t, but is not otherwise tested in t/spec. Does this make it part of the spec, or is this an accidental inclusion that should be reverted. | 02:50 | ||
m: Operator.new | |||
camelia | Cannot make a Operator object using .new in block <unit> at <tmp> line 1 |
||
[Coke] | I ask because there's a raku/doc ticket about it. | 02:51 | |
m: new Proc::Async::Pipe | 02:57 | ||
camelia | ===SORRY!=== Error while compiling <tmp> Unsupported use of C++ constructor syntax. In Raku please use: method call syntax. at <tmp>:1 ------> new Proc::Async::Pipe⏏<EOL> |
||
[Coke] | m: Proc::Async::Pipe.new | ||
camelia | Too few positionals passed; expected 5 arguments but got 1 in block <unit> at <tmp> line 1 |
||
[Coke] | ^^ this isn't in roast. is it an internal detail? | 02:58 | |
releasable6__ | Next release in ≈6 days and ≈15 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft | 03:00 | |
[Coke] | any PRs to roast should trigger a check for documentation on that feature. | ||
finally closed a doc ticket opened by niner in 11/2019 | 03:20 | ||
07:21
finanalyst joined
08:33
sena_kun joined
|
|||
lizmat | [Coke]: Operator is a bit in limbo at the momen | 08:54 | |
it is used in RakuAST, my plan was to use it in the legacy grammar as well, but ran into issues | 08:55 | ||
it should become a full-fledged citizen in 6.e, but might still have some changes until thenb | |||
so I'd rather treat it as an implementation detail until then, like the rest of RakuAST | |||
08:58
sena_kun left
|
|||
finanalyst | lizmat: I found .join.naive-word-wrapper in RakuDoc::To::Text, but cant find where naive-word-wrapper is documented. | 09:21 | |
lizmat | it's an implementation detail | ||
github.com/rakudo/rakudo/blob/main...3588-L3595 | 09:22 | ||
m: sub a(uint $a) { dd $a }; a -1 # meh, a buglet | 10:25 | ||
camelia | -1 | ||
lizmat | m: my uint $a = -1; say $a | ||
camelia | 18446744073709551615 | ||
lizmat | m: Q|sub a(uint $a) { dd $a }; a -1|.AST.EVAL | 10:26 | |
camelia | 18446744073709551615 | ||
lizmat | ah... but fixed in RakuAST *phew* :-) | 10:27 | |
ab5tract: ^^ maybe a test *nudge* *nudge* :-) | |||
ab5tract | :) | 10:53 | |
11:39
MasterDuke left
|
|||
ab5tract | lizmat: any thoughts on R#5576 | 12:22 | |
linkable6 | R#5576 [open]: github.com/rakudo/rakudo/pull/5576 Give META_REDUCE_RIGHT behavior for 1-arg case | ||
ab5tract | I’m not sure that one-arg == no-op ever made sense, but if we want it for left we should do it for right | 12:24 | |
lizmat | actually no, apart from your thought "should we even be doing this" | ||
perhaps nine has more ideas | |||
ab5tract | am I misremembering or did we once have a version of camelia / evalable that could process a gist from github? | 13:21 | |
committable6: HEAD gist.githubusercontent.com/ab5trac...r2000.raku | 13:23 | ||
committable6 | ab5tract, Successfully fetched the code from the provided URL | ||
ab5tract, ¦HEAD(a26b756): «:contoto("Any"):slot(Any):type("Any")assign requires a concrete object (got a Any type object instead) in block <unit> at /tmp/YrFu5B6BIh line 10 «exit code = 1»» | |||
ab5tract | evalable6: gist.githubusercontent.com/ab5trac...r2000.raku | 13:24 | |
evalable6 | ab5tract, Successfully fetched the code from the provided URL | ||
(exit code 1) :contoto("Str") :slot("b") :type("Str") Cannot assign to an immutable value in block <unit> at /tmp/3qYdNTQxmo line 10 |
|||
ab5tract | so... we use `op.count` to determine when to do the reduction: github.com/rakudo/rakudo/blob/a26b...kumod#L190 | 13:27 | |
however, that feels unforunately inadequate in light of multi-ness :( | 13:28 | ||
lizmat | it could well be improved if @args where an IterationBuffer and |$args.List | 13:30 | |
ab5tract | hmm | 13:32 | |
would that adress "when" to call the provided op? or do we need to adjust user expectations that it always call the longest-arg candidate(s)? | 13:35 | ||
lizmat | sorry, I was just talking about performance... :-) | 13:36 | |
ab5tract | :) | ||
well from my first pass at R#2000, fixing the issue of maintaining containerization involves removing binds and adding a `return`... | 13:37 | ||
linkable6 | R#2000 [open]: github.com/rakudo/rakudo/issues/2000 [data types][metaop] `reduce` needlessly deconts | ||
ab5tract | gist.github.com/ab5tract/7b6eda846...econt-diff | 13:38 | |
so not a net-win on the performance side :/ | 13:39 | ||
but that does fix the second example provided in the issue | |||
maybe this slower path could be restricted to only cases where the first argument is in a container to begin with? | 13:43 | ||
lizmat | possibly... I must admit I'm a bit distracted atm | 13:44 | |
ab5tract | no worries :) | 13:45 | |
thanks for the heads up! | |||
[Coke] | added github.com/Raku/doc/issues/4475 for Operator and others. | 15:30 | |
Would like to make sure that we have a good 6.e experience with the docs when 6.e goes live. | |||
lizmat | [Coke]++ | 15:43 | |
[Coke] | There's no specific timeframe on that, yes? Just "when RakuAST lands" atm? | 15:50 | |
no pressure, just planning. | |||
lizmat | Indeed, "when RakuAST lands" | ||
jdv | will there be a party? | 16:37 | |
lizmat | that would be very nice indeed :-) | 16:38 | |
ab5tract | m: use nqp; my %h; my $p := %h<a>; dd :$p, :desc(nqp::getattr($p.VAR, Scalar, q|$!descriptor|).^name) | 17:58 | |
camelia | :desc("VMNull") :p(Any) |
||
lizmat | m: use nqp; dd nqp::null | 17:59 | |
camelia | Mu | ||
lizmat | m: use nqp; dd CMNull | ||
camelia | ===SORRY!=== Error while compiling <tmp> Undeclared name: CMNull used at line 1 |
||
lizmat | m: use nqp; dd VMNull | ||
camelia | ===SORRY!=== Error while compiling <tmp> Undeclared name: VMNull used at line 1 |
||
ab5tract | According to: github.com/rakudo/rakudo/blob/a26b...akumod#L29 | ||
IIUC I should be seeing `ContainerDescriptor::BindHashKey` | 18:00 | ||
or.. hmm.. `$p` itself is the `ContainerDescriptor::BindHashKey` | 18:07 | ||
huh, this is weird: | 18:08 | ||
m: use nqp; my %h; my $p := %h<a>; dd :$p, :desc(nqp::getattr($p.VAR, Scalar, q|$!descriptor|).^name), :next($p ~~ ContainerDescriptor::BindHashKey) | |||
camelia | Bool::False | ||
ab5tract | (dd fails quite curiously) | ||
lizmat | m: my $a; use nqp; dd nqp::getattr($a.VAR, Scalar, /$!descriptor) | 18:10 | |
camelia | ===SORRY!=== Error while compiling <tmp> Variable $!descriptor used where no 'self' is available at <tmp>:1 ------> p::getattr($a.VAR, Scalar, /$!descriptor⏏) |
||
lizmat | m: my $a; use nqp; dd nqp::getattr($a.VAR, Scalar, q/$!descriptor) | 18:11 | |
camelia | ===SORRY!=== Error while compiling <tmp> Couldn't find terminator / (corresponding / was at line 1) at <tmp>:1 ------> :getattr($a.VAR, Scalar, q/$!descriptor)⏏<EOL> expecting any of: / |
||
lizmat | m: my $a; use nqp; dd nqp::getattr($a.VAR, Scalar, q/$!descriptor/) | ||
camelia | Mu | ||
lizmat | m: my $a; use nqp; say nqp::getattr($a.VAR, Scalar, q/$!descriptor/).raku | ||
camelia | No such method 'raku' for invocant of type 'VMNull'. Found 'raku' on type 'Mu' in block <unit> at <tmp> line 1 |
||
lizmat | m: my $a; use nqp; say nqp::getattr($a.VAR, Scalar, q/$!descriptor/).^name | 18:12 | |
camelia | VMNull | ||
lizmat | ab5tract: ^^ golfed | ||
m: use nqp; say nqp::getattr((my $).VAR, Scalar, q/$!descriptor/).^name | |||
camelia | VMNull | ||
ab5tract | ah, I wasn't initially raising any issues regarding dd | 18:13 | |
it only produced surprising results when I added a smartmatch on `ContainerDescriptor::BindHashKey` | 18:14 | ||
nine | m: say [∈] "a" | 18:58 | |
camelia | True | ||
nine | obviously | ||
ab5tract | :) | 18:59 | |
I think I might even have seen a report or at least a conversation about this recently | |||
seems like a reasonable place to use a Failure to me | 19:01 | ||
nine | m: say [∈] set(), set(set()), set(set(set())) | 19:02 | |
camelia | True | ||
nine | m: say [∈] set(), set(set()) | ||
camelia | True | ||
nine | m: say [∈] set() | 19:03 | |
camelia | True | ||
nine | Actually that does make some sense | ||
m: say [∈] | |||
camelia | True | ||
ab5tract | m: sub infix:<gg>($a, $b --> Set) { set($a, $b) }; dd [gg] "a" | 19:04 | |
camelia | "a" | ||
ab5tract | does that make sense though? | ||
I think this one is probably a pretty tight corner, I respect that there was some thought that went into treating it this way in the design | 19:05 | ||
m: say [∈] Mu | 19:06 | ||
camelia | True | ||
nine | I have my answer fully typed up but I'm still reluctant to send it. | 19:13 | |
ab5tract | no rush | 19:17 | |
nine | I don't think this is something where just more time helps. It needs concrete real-life use cases | 19:18 | |
See, that's exactly why I tend to stay out of language design discussions. It's sooo easy to have a gut reaction (in this case I have actually typed two answers in opposite directions, both claiming that they are "clearly" right) and so hard to make an actually informed, far looking decision. | 19:20 | ||
ab5tract | indeed :/ | 19:27 | |
it would be interesting to read both of those, FWIW :) | |||
nine | Well I posted the second one | ||
ab5tract | do you reckon it deserves a problem solving thread? | 19:33 | |
lizmat wonders where nine posted | 19:36 | ||
ab5tract | R#1705 | 19:41 | |
linkable6 | R#1705 [open]: github.com/rakudo/rakudo/issues/1705 [metaop] META_REDUCE_RIGHT doesn't check for 1-arg case like META_REDUCE_LEFT | ||
lizmat | thanks :-) | 19:43 | |
ab5tract | m: use nqp; my %h; my $p := %h<a> = Any; dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 5; dd %h | 19:54 | |
camelia | "ContainerDescriptor::Untyped" {:a(5)} |
||
ab5tract | just when I think I'm starting to understand :) | 19:55 | |
lizmat | m: mh %h; my $p := %h<a>; say $p; say %h<a>; $p = 42; say %h<a> # ab5tract do you grok this? | 19:59 | |
camelia | ===SORRY!=== Error while compiling <tmp> Variable '%h' is not declared. Perhaps you forgot a 'sub' if this was intended to be part of a signature? at <tmp>:1 ------> mh ⏏%h; my $p := %h<a>; say $p; say %h<a>; $ |
||
lizmat | m: my %h; my $p := %h<a>; say $p; say %h<a>; $p = 42; say %h<a> # ab5tract do you grok this? | ||
camelia | (Any) (Any) 42 |
||
ab5tract | that part makes sense. | 20:00 | |
how it's being done with a `ContainerDescriptor::Untyped` is the part that confuses me | |||
m: use nqp; my %h; my $p := %h<a>; dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 5; dd %h | |||
camelia | "ContainerDescriptor::BindHashKey" {:a(5)} |
||
ab5tract | ^^ this I grok | 20:01 | |
lizmat | ok, by assigning Any to the container, it changes its descriptor to whatever it was indicated to be | ||
ab5tract | but then how does it know to still bind into the hash? | ||
lizmat | it bound it to the hash on assignment | 20:02 | |
after that, the knowledge is no longer needed, so discarded | |||
see role ContainerDescriptor::Whence | 20:03 | ||
ab5tract | but there is no ContainerDescriptor::Whence involved in the second example... this is what I'm confused about | 20:07 | |
m: use nqp; my %h; my $p := (%h<a> = Any); dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 5; dd %h | |||
camelia | "ContainerDescriptor::Untyped" {:a(5)} |
||
lizmat | there you are binding the result of the assignment, which already switched the descriptors | 20:09 | |
afk& | 20:11 | ||
ab5tract | I understand that part... it's what is causing me to as the question: how does the next assignment "know" that is bound into the hash? | ||
anyway, enjoy your afk :) | 20:12 | ||
lizmat | that's because %h<a> returns a container that has ContainerDescriptor::Whence descriptor | ||
really afk& | 20:13 | ||
ab5tract | cheers | ||
20:15
finanalyst left
21:46
sena_kun joined
|
|||
ab5tract | so the issue I've been poking at in R#2000 boils down to this: | 21:54 | |
linkable6 | R#2000 [open]: github.com/rakudo/rakudo/issues/2000 [data types][metaop] `reduce` needlessly deconts | ||
ab5tract | m: use nqp; my %h; sub s(%h) { return %h<a> }; my $p := s(%h); dd nqp::getattr($p, Scalar, q|$!descriptor|).^name | ||
camelia | "VMNull" | ||
ab5tract | m: use nqp; my %h; sub s(%h) { return %h<a> }; my $p := s(%h); dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 42 | 21:55 | |
camelia | "VMNull" Cannot assign to a readonly variable or a value in block <unit> at <tmp> line 1 |
||
ab5tract | Should have checked that earlier, would have saved me some trouble | 21:56 | |
m: use nqp; my %h; sub s(%h) { %h<a> }; my $p := s(%h); dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 42 | 22:06 | ||
camelia | Cannot look up attributes in a Any type object. Did you forget a '.new'? in block <unit> at <tmp> line 1 |
||
ab5tract | (in case anyone was wondering) | ||
m: use nqp; my %h; sub s(%h) { my $ = %h<a> }; my $p := s(%h); dd nqp::getattr($p, Scalar, q|$!descriptor|).^name; $p = 42 | 22:07 | ||
camelia | Cannot look up attributes in a Any type object. Did you forget a '.new'? in block <unit> at <tmp> line 1 |
||
ab5tract | I've tried just about every other combination (my $ :=, return-rw, and more combinations thereof and thereabove) but I don't see a reason to flood the channel with them. | 22:16 | |
Is it expected for container descriptors to get dropped from the return value of a callable? | 22:17 | ||
lizmat | yes | 22:19 | |
by default, return values are deconted on return, unless the Callable has "is raw" or "is rw" on it | 22:20 | ||
In fact, that's how postcircumfix <> works :-) | |||
m: my $a = 42; use nqp; say nqp::iscont($a); say nqp::iscont($a<>) | 22:21 | ||
camelia | 1 0 |
||
lizmat | ab5tract ^^ | ||
ab5tract | thanks :) | 22:23 | |
still a fair bit for me to comprehend wrt containers and their descriptors | |||
lizmat | it's a bit of a rite of passage indeed | ||
ab5tract | at the risk of taking too much of your time, what's the difference between `is raw` and `is rw` in this case? | 22:25 | |
I assume something that is already `rw` will remain so via `is raw` | 22:26 | ||
lizmat | Actually, on return values I don't think there's a difference | 22:35 | |
at least not functionally | |||
anyways, time for some shuteye | 22:37 | ||
afk again& | |||
releasable6__ | Next release in ≈5 days and ≈19 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft | 23:00 | |
23:00
sena_kun left
|