🦋 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.
Nemokosch I realized why .= is such a tough case, by the way 00:02
it is not really just another shortcut assignment operator, even though it looks like one 00:04
it mostly has method call semantics
the docs don't imply it's a methodoperator but it definitely behaves like . operators
the . part dominates the = part
for example, .= acting on the topic operator cannot be explained from the shortcut assignment nature, only from the method call nature 00:05
and the precedence is also like that
00:06 irc_user joined 00:07 reportable6 left 00:09 reportable6 joined 00:23 [Coke]_ joined, [Coke] left 00:34 [Coke] joined 00:35 [Coke]_ left 01:02 jetchisel joined 01:10 Colere left 01:11 Colere joined 01:13 Furor joined 01:16 Colere left 02:15 irc_user left 02:16 irc_user joined 02:19 cbk joined
guifa .= is a method operator. It's the method op . with the metaop = The catch is just that (right now) that IIRC it needs to be special cased in the compiler 02:34
02:38 MasterDuke joined 02:56 frost joined 02:57 [Coke]_ joined 02:58 cbk left 02:59 cbk joined, [Coke] left, cbk left 03:23 bigdata joined 03:35 epony left 03:38 epony joined 03:39 [Coke]_ left 03:41 [Coke] joined 03:49 [Coke]_ joined 03:51 [Coke] left 04:00 Heptite left 04:16 frost left 04:55 discord-raku-bot left, discord-raku-bot joined 05:35 irc_user left 06:04 bigdata left 06:07 reportable6 left 06:08 reportable6 joined 06:13 [Coke]_ left 06:15 abraxxa joined 06:16 [Coke] joined 06:21 abraxxa left, abraxxa joined 06:53 [Coke] left 06:56 [Coke] joined 07:00 Sgeo left 07:04 [Coke]_ joined 07:06 [Coke] left 07:47 lichtkind joined 07:48 dakkar joined 08:03 sena_kun joined
Nemokosch so yeah... here it seems like yet another X= operator docs.raku.org/routine/.= 08:41
Here it's noted as a methodop docs.raku.org/language/operators#methodop_.= 08:47
08:48 ProperN[out] joined, ProperNoun left
Voldenet It's a problem, because method calls don't need () 08:53
m: sub infix:<.&>($t, &call) { call($t) }; sub x { "x$^a" }; my $p = "hi"; $p .&= &x ; say $p 08:54
camelia xhi
Voldenet (the .&= operator doesn't exist)
and the &x looks like an ugly syntax thanks to that
tonyo m: sub x($self is rw) { $self = 42; }; my $r = 21; $r.&x; dd $r 08:59
camelia Int $r = 42
Voldenet the .& is the source of my endless sadness, btw 09:00
m: sub x($self is rw) { $self = 42; }; my $r = 21; $r .& x; dd $r
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix call (only basic method calls that exclusively use a dot can be detached)
at <tmp>:1
------> s rw) { $self = 42; }; my $r = 21; $r .⏏& x; dd $r
Voldenet m: sub x($self is rw) { $self = 42; }; my $r = 21; $r .&x; dd $r
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix call (only basic method calls that exclusively use a dot can be detached)
at <tmp>:1
------> s rw) { $self = 42; }; my $r = 21; $r .⏏&x; dd $r
Voldenet since it doesn't work like a normal operator, it doesn't like any whitespace 09:01
tonyo m: sub x($self is rw) { $self = 42; }; my $r = 21; $r\ .&x; dd $r 09:02
camelia Int $r = 42
Voldenet m: sub x($self is rw) { $self = 42; }; my $r = 21; $r\ .&\ x; dd $r 09:03
camelia ===SORRY!=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> { $self = 42; }; my $r = 21; $r\ .&\ x⏏; dd $r
expecting any of:
tonyo m: class XXX { method hi() { "hi".say; } }; my $x = XXX.new; $x. hi; # didn't realize this didn't need un-whitespaced
camelia hi
tonyo that does seem a bit inconsistent
Voldenet it gets especially hairy when your method calls are obnoxiously long
because of nested lambdas and so on 09:04
I'm betting that rakuast will be able to rewrite those easily
09:05 smol-hors joined
tonyo you could just hop on the tuxic slang and make that work ^ 09:13
lizmat hmmm... the tuxic slang is hairy enough as it is... :-)
tonyo m: sub x($self is rw) { $self = 42; }; my $r = 21; $r.: x; dd $r 09:14
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> s rw) { $self = 42; }; my $r = 21; $r.:⏏ x; dd $r
lizmat tonyo: I seem to be missing context on " looks like no extra processing is done on $thisname in that method - i'm basically just trying to inject some data into the `use` statement as a shortcut"
tonyo i'm messing around with the do_pramga_or_load_module 09:15
lizmat aah... ok
wow, that's been a while :-)
tonyo eight years for most of it 09:16
lizmat Looks like it is only there to handle -M command line argument ? 09:19
in what looks like a bad hack to me now, really :-)
09:21 frost joined
Nemokosch I got disturbed and didn't follow 09:24
Oh yeah, what I wanted to say is...
I don't know what the implications (of .= being a methodop) are on the user's end, but I think it's a source of confusion that it's advertised as [something=] kind of operator when it's in fact rather a [.something] kind of operator 09:26
lizmat fwiw, it took Juerd a long time to convince TimToady for that feature :-) 09:27
Nemokosch its current precedence and syntactic position makes it seem more like a "mutating method call" than "infix dot applied in an assignment shortcut" 09:28
09:28 [Coke]_ left
I hope I'm making sense 09:30
09:30 [Coke] joined
tonyo lizmat: it's used in the `<use>` grammar as well 09:32
lizmat yeah, but without the additional $thisname argument
is what I meant to say :-)
tonyo ah 09:33
Voldenet I totally get the point about mutating method call, but in fact it _can_ be mutating without that extra bit 09:40
Nemokosch yes yes, sure thing 09:45
it's just that the dot is the fixed part of this "operator cluster", not the =
it could be .! or something
Voldenet the thing I don't fancy about immutability is that methods `$obj.do-mutation` and `$obj .= with-mutation` can't be marked mutable/immutable anyhow 09:46
Nemokosch because it's not really like $a = $a.method 09:47
well the latter does mutate, no matter what
the former also could, that we don't know 09:48
09:49 guifa left
Voldenet imo the `$a .= b` should be equivalent to `$a = $a.b` 09:50
Nemokosch What about `$a .= b.c`? 09:54
Voldenet `$a = $a.b.c`
09:54 frost left
Voldenet imo it gets a lot easier to reason about when it works like that 09:55
The only exception I could see is the ()-form call, so `$a .= &b(1, *, 3)` would become `$a = b(1, $a, 3)` but honestly I'm not sure if that's practical 09:57
especially that there'd be multiple ways to achieve that without fancy syntax 10:00
Nemokosch Then yeah no, doesn't work that way 10:01
Voldenet sure it doesn't 10:02
Nemokosch But also, last time tonyo pointed out that .= method can work on the topic variable 10:03
That capability also comes from the dot, against the nature of a regular infix 10:04
Voldenet wait what 10:05
m: $_ = 42; .= msb; .say 10:06
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix .= instead.
at <tmp>:1
------> $_ = 42; .=⏏ msb; .say
Voldenet m: $_ = 42; .=msb; .say
camelia 5
Voldenet …huh
10:07 [Coke] left
Voldenet cool and spooky 10:07
Nemokosch I know right? 😄 I mean I kinda like this, in isolation, but would expect it to fail if .= is a shortcut assignment
10:09 [Coke] joined
El_Che hi 10:10
tellable6 2022-09-15T15:05:15Z #raku <melezhik> El_Che I have freed up memory on VM, the link should be accessible now - sparrowhub.io:4000/report/rakudo-build/5367
2022-09-15T21:00:45Z #raku <melezhik> El_Che the should work - sparky.sparrowhub.io/report/rakudo-build/5367
2022-09-16T14:28:55Z #raku <melezhik> El_Che I will think about it, there is another build for fedora os - sparky.sparrowhub.io/report/rakudo-build/5410
2022-09-16T17:44:38Z #raku <melezhik> El_Che I enabled color output for sparky builds - sparky.sparrowhub.io/report/rakudo-build/5449
El_Che lizmat: ping
lizmat pong
El_Che just checking
it's like people pingen google.com in a test
lizmat hehe 10:11
El_Che (but with caring on how you are doing :) )
moritz you could at least print round trip time and package loss, El_Che :D
lizmat :-)
El_Che she's almost local in my case :)
lizmat yeah, only 120km or so :-)
moritz it's been far too long that I've been local there... :-) 10:12
10:12 razetime joined
lizmat moritz: indeed 10:12
Nemokosch Moritz also showed up, hello, just in time for my joke 10:14
Voldenet Nemokosch: Though no lvalue seems like a special case of `.=` (that turns the first operand into $_), similar to how `- 42` can be special case of `0 - 42`
tellable6 Voldenet, I'll pass your message to Nemokosch
Nemokosch I have the feeling that the Raku grammar is complex... however
The Raku grammar of the Raku grammar, is probably even more complex
Voldenet it's not that complex, it's only one file… :D 10:15
moritz that's not quite true
it inherits from the NQP grammar (or mixes in some roles? or so) 10:16
10:18 [Coke]_ joined 10:20 [Coke] left
Voldenet jokes aside, it's most sane that there's a difference between `.= a .= b and .= a.b` but I'm not sure if that's useful in practice 10:20
10:27 frost joined
Voldenet especially when most things don't mix mutable/immutable apis 10:35
Nemokosch Let me alter your statement 10:47
"It's most sane that there's a difference between `+= a += b` and `+= a + b`
How do we feel about this? 10:48
Voldenet `+ b` has no mutable side effects
that's why it's nonsense
but `.=a.b` can make sense when .b is side-effect and .a creates a copy 10:50
m: my $a = [1, 2, 3]; my $b = $a; $b.=clone.pop.say; ($a, $b).say 10:52
camelia 3
([1 2 3] [1 2])
Nemokosch + b could also have mutable side-effects though, it's a mere convention that it doesn't 10:54
Voldenet Right, it _has_ side-effects
can set cpu flags 10:55
lizmat Nemokosch: by that notion, *anything* in Raku can have side effects, even just accessing a variable's value if it has a Proxy in which the FETCH does a counter increment 10:57
tellable6 lizmat, I'll pass your message to Nemokosch
lizmat so the remark that + b can have side-effects, is really kicking in an open door 10:58
10:58 frost left
Nemokosch Yes, and I wanted to draw attention to something else anyway. I don't think - partially because of what you are pointing out - that the mutating/non-mutating approach is good here 11:02
I wanted to point out that chaining "shortcut assignments" is conceptually bizarre 11:03
Raku sometimes throws warnings about things that work but "you probably don't want". Now, I think `x op= y op= z` is a candidate for that 11:04
Regardless whether op tends to mutate or not 11:05
Kaiepi chaining of =, albeit niche, can be useful with custom containers 11:07
i've depended on it once 11:08
just adding more operations on top narrows that further
Nemokosch I think for these discussions, we badly need to decide on certain presumptions. Like here: do we consider .= "the always-mutating dot" - or do we consider it "the short-hand assignment with dot as the infix"? 11:10
Kaiepi it's an assignment of the return value of a method call, down to the grammar level
lizmat m: my $a := 42; $a .= Str 11:11
camelia Cannot modify an immutable Int (42)
in block <unit> at <tmp> line 1
lizmat clearly it is an assignment
Nemokosch If it is an assignment, I think it should behave just like +=. With that precedence and failing in prefix position 11:14
lizmat m: $_ := 42; .= Str
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix .= instead.
at <tmp>:1
------> $_ := 42; .=⏏ Str
lizmat m: $_ = 42; .= Str 11:15
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix .= instead.
at <tmp>:1
------> $_ = 42; .=⏏ Str
lizmat seems to me it does ?
Voldenet m: $_ = 42; .=Str 11:17
camelia ( no output )
Voldenet don't even ask why
Nemokosch Oh right, it was whitespace-sensitivr 11:18
lizmat m: $_ = 42; .=Str; dd $_ # duh :-)
camelia Str $_ = "42"
Voldenet this feature works when doing data traversal: my $name = $current.=sender.=as-person.name; 11:19
it definitely looks weird though
Nemokosch Again, I don't mind that it does something, but I suppose your average op= wouldn't work in prefix position 😛 11:20
Voldenet m: class Fun { has $.s = (); method FALLBACK($v) { self.new: s => (|$!s, $v) }; method presents { say "I am {self} now" }; method Str { $!s.join(" ") }}; my Fun $a .= new; $a.=ministry.=of.=silly.=apis.presents; 11:22
camelia I am ministry of silly apis now
lizmat m: $_ = 42; say .++; .say 11:25
camelia 42
lizmat still, I think TimToady thought it would be too magic if += 42 in a prefix position would apply to $_ 11:26
now, anything starting with a . in a prefix position is more natural, as that is widely used 11:27
Nemokosch yes, I think that's "defendable" or how to put it 11:34
I can take the argument that operators starting with the dot have this widely used "magic behavior" 11:35
11:36 Furor is now known as Colere, lichtkind_ joined 11:38 Kaipei joined 11:39 tellable6 left, tib left 11:40 squashable6 left, rypervenche left 11:41 goblin left 11:42 tellable6 joined 11:43 linkable6 left, committable6 left, bloatable6 left, notable6 left, sourceable6 left, committable6 joined, statisfiable6 left, ecocode left 11:44 notable6 joined, ecocode joined, releasable6 left 11:46 [Coke]_ left, lichtkind left, reportable6 left, Tirifto left, unicodable6 left, nativecallable6 left, quotable6 left, greppable6 left, bisectable6 left, cnx left, Kaiepi left, perlmaros left, shareable6 left 11:48 rypervenche joined 11:49 notable6 left, ecocode left 11:50 ecocode joined 11:51 razetime left, ProperN[out] left 11:52 discord-raku-bot left, MasterDuke left, swaggboi left, japhb left, bdju left, avar left, djerius left, hexology left, peder left, bartolin_ left, tinita left, GreaseMonkey left, sftp left, mykhal left, BinGOs left, Grrrr left, camelia left, skaji left, leont left, gordonfish left, KotH left, nicole left, thowe_ left, zostay left, aqua2 left, Altreus left, rjbs left, kawaii_ left, charsbar left, leedo_ left, jcallen left, Ekho left, Maylay left, TieUpYourCamel left, human_blip left, Zero_Dogg left, mtj left, kjp left, coleman left, samcv left, kybr left, a3r0 left, gfldex left, jmcgnh left, tailgate left, leah2 left, goblin joined 11:53 Maylay joined 11:54 perlmaros_ joined, tib_ joined, razetime joined, ProperN[out] joined, discord-raku-bot joined, MasterDuke joined, TieUpYourCamel joined, human_blip joined, Zero_Dogg joined, swaggboi joined, japhb joined, bdju joined, avar joined, mtj joined, djerius joined, kjp joined, coleman joined, Ekho joined, jcallen joined, leedo_ joined, charsbar joined, kawaii_ joined, rjbs joined, Altreus joined, aqua2 joined, zostay joined, thowe_ joined, nicole joined, KotH joined, gordonfish joined, skaji joined, leont joined, camelia joined, BinGOs joined, mykhal joined, sftp joined, Grrrr joined, GreaseMonkey joined, tinita joined, bartolin_ joined, peder joined, hexology joined, samcv joined, kybr joined, leah2 joined, tailgate joined, jmcgnh joined, gfldex joined, a3r0 joined, jmcgnh left, rypervenche left, linkable6_ joined, [Coke]_ joined, reportable6 joined, Tirifto joined, unicodable6 joined, nativecallable6 joined, quotable6 joined, greppable6 joined, bisectable6 joined, cnx joined, rypervenche joined 11:55 perlmaros_ left, tib_ left, razetime left, ProperN[out] left, discord-raku-bot left, MasterDuke left, swaggboi left, japhb left, bdju left, avar left, djerius left 11:58 tadzik left, CIAvash left, crystalfrost[m] left, AlexDaniel left 11:59 MitarashiDango[m left, Matthew|m left 12:00 perlmaros joined, tib joined, razetime joined, ProperN[out] joined, discord-raku-bot joined, MasterDuke joined, swaggboi joined, japhb joined, bdju joined, avar joined, djerius joined 12:03 jmcgnh joined 12:07 reportable6 left 12:10 reportable6 joined 12:14 Matthew|m joined, tadzik joined 12:15 MitarashiDango[m joined 12:18 AlexDaniel joined, CIAvash joined 12:23 crystalfrost[m] joined
tonyo lizmat: re(irclogs.raku.org/raku/2022-09-15.html#21:49) - do you recall what module it was? or, if you're around, can we do that right now and i can watch the log? 12:35
lizmat irclogs.raku.org/raku/2022-08-27.html#10:25 12:37
also: irclogs.raku.org/raku/2022-08-26.html#22:38 12:38
the module was rak, version 0.0.14
raku.land/zef:lizmat/rak does not list version 0.14
12:41 shareable6 joined, releasable6 joined 12:42 statisfiable6 joined, squashable6 joined 12:44 [Coke]_ left 12:46 [Coke] joined, notable6 joined
lizmat tonyo: is that what you wanted to know ? 12:50
12:51 bloatable6 joined, sourceable6 joined
tonyo yea 12:52
are you able to send it up right now? i don't keep logs that far back
lizmat uploaded rak 0.0.14 just now 13:01
tonyo tak
looks like it indexed 13:02
lizmat but it did not index then :-(
tonyo booo, hopefully i am a little more attentive next time it's refusing to index 13:03
lizmat fwiw, I also didn't get mail that the index failed 13:04
it just said it was going to be indexed after the upload, and then didn't (silently)
tonyo ahh, i'm not seeing a log file was even created for it - wonder if aws was having some problems 13:06
jjatria FWIW, it was the same for me: my latest attempt for HTTP::Tiny didn't index
tonyo jjatria: you want to give it a shot now while i'm in there looking at logs? 13:07
jjatria Let's see
Ok, it said it would index shortly 13:11
I didn't keep the old tarball around, so I minted a new one
tonyo i don't see it even getting to aws .. hmm 13:14
jjatria Is there a debug option I can set to send you more detailed output, maybe? 13:15
13:18 razetime left
tonyo 0.2.4 ? 13:18
there's a flag to keep the .tar.gz around 13:19
i think i do actually see it, and it did get stored, just not indexed - may be a bug 360.zef.pm/H/TT/HTTP_TINY/e147a2a973fb5eb925b776c00b3eb3b1dd8f1597.tar.gz 13:20
lizmat clickbaits rakudoweekly.blog/2022/09/19/2022-...ther-wave/ 13:21
13:27 razetime joined 13:28 vrurg left 13:29 vrurg joined
jjatria I've been making my own tarballs, and then using `fez upload --file` to push them 13:29
tonyo gotcha, i think i've figured out where the bug might be
jjatria tonyo: yeah, 0.2.4 was the latest one 13:30
tonyo and it's a non-obvious one of how to trigger
jjatria So the one for 0.2.3 might also be lying around somewhere in there... 🤔
lizmat tonyo: so does it depend on the content, or is there some internal issue / race condition ? 13:31
just OOC :-)
tonyo there shouldn't be a race, i think S3 is failing to update the index file and there's no retry built in 13:32
it serializes changes through a queue so the processor adds a message to the queue to add/remove (that way if you remove a dist it will actually wait to remove it until after it's been added to the index, if that makes sense) 13:33
in this case i don't know what the error is but it updated the `/H/TT/HTTP_TINY/index.json` but failed on `/index.json`
lizmat TIL you can remove a dist 13:37
tonyo only within 1 day of its upload
lizmat wow, 736 dists for yours truly :-) 13:38
1 failure on those is still pretty good :)
tonyo curl -s 360.zef.pm |jq -s '.[] | group_by(.auth) | map({auth: .[0].auth, agg: map(1) | add})' 13:41
i'm only getting 626 :) - hopefully i can fix this one and we won't see this error 13:42
Nemokosch what is the difference between a bare sub and an `only` sub? 13:53
lizmat only sub is explicit 14:00
sub a() { }
is 'our only sub a() { }'
if it is in the mainline 14:01
of a compunit
Nemokosch hmm... so you can always get away without writing `sub`, except lambdas? 14:05
moritz I think `sub a` is `my only sub a` 14:06
not our
Nemokosch my only sub... sounds much sadder 14:07
moritz or romantic, it's my only one, after all! 14:09
Nemokosch Oh okay... but then sub has a BDSM undertone, no? 🤣 14:11
14:12 melezhik joined
melezhik o/ 14:12
tellable6 2022-09-17T16:57:27Z #raku <jdv> melezhik i tried a few ways and no joy
melezhik .tell El_Che I have integrated raku-zef-deps and sparkyci - please see this build - ci.sparrowhub.io/report/1178 , deps report 14:13
tellable6 melezhik, I'll pass your message to El_Che
melezhik deps tab 14:14
lizmat moritz: you're right, I had a Perlism in my head :- 14:15
m: sub a() { dd }; dd OUR::<&a>
camelia Any element{'&a'} = Any
lizmat m: our sub a() { dd }; dd OUR::<&a>
camelia Sub a = sub a { #`(Sub|3966133159264) ... }
lizmat m: sub a() { dd }; dd MY::<&a>
camelia Sub a = sub a { #`(Sub|5552587949408) ... }
Nemokosch so typing `only` instead of `sub` for a named function is mostly about stylistics, 14:18
so typing `only` instead of `sub` for a named function is mostly about stylistics?
Rog I thought it enforced no other candidates
Nemokosch I mean, if that's the default for subs anyway
and you can apparently drop `sub` if you type out `only`
melezhik .tell El_Che - raw.githubusercontent.com/melezhik...4%20AM.png 14:19
tellable6 melezhik, I'll pass your message to El_Che
Nemokosch > only sub you () {"Can make all the world seem right"}; 14:20
okay, this IS romantic 😄
melezhik ups probably should have told to [Coke] ))
.tell [Coke] - twitter.com/melezhik2/status/15722...9029980165 sparkyci and App::Zef-Deps integration 14:22
tellable6 melezhik, I'll pass your message to [Coke]
14:23 Heptite joined 14:24 jaguart joined
melezhik main. with-zef-deps: true in .sparkyci.yaml enables App::Zef-Deps report 14:24
14:25 Sgeo joined
tonyo just uploaded a new version of the processor that should give me some better insight ( jjatria ) 14:28
14:29 razetime left 14:30 razetime joined 14:32 xinming joined 14:34 Some-body_ joined 14:37 DarthGandalf left, Some-body_ is now known as DarthGandalf 14:51 melezhik left
jjatria tonyo Shall I try to upload again? 14:53
14:56 japhb left
tonyo yes please 14:57
lizmat m: my %a = :42a, :666b; my %b = :314c; %a ,= %b; dd %a # me just fell in love with the ,= idiom on 2 hashes 14:58
camelia Hash %a = {:a(42), :b(666), :c(314)}
jjatria Steady as she goes~ 14:59
I got the same success message as before
vrurg lizmat: live and learn, truly.
15:07 japhb joined 15:18 razetime left 15:25 razetime joined
[Coke] .tell melezhik ooh, nifty 15:29
tellable6 [Coke], I'll pass your message to melezhik
15:30 sena_kun left
jjatria tonyo: Yeah, that didn't get indexed either it seems 15:44
15:52 sena_kun joined 15:54 Papercombo joined
tonyo hmmm 15:54
it looks like it's not even processing your tar
you mind sending me the tar you've built? 15:55
jjatria Sure. Email?
15:59 abraxxa left 16:12 Guest80 joined 16:13 Guest80 left 16:14 [Coke] left
tonyo yea 16:15
16:15 lesihctej joined
tonyo pmd 16:15
16:16 [Coke] joined, jetchisel left 16:21 bigdata joined 16:22 Papercombo left 16:28 Papercombo joined 16:36 [Coke]_ joined 16:37 [Coke] left 16:39 tokomak joined 16:41 dakkar left 16:43 Papercombo left, bigdata_ joined, bigdata left, bigdata_ is now known as bigdata 16:48 [Coke] joined 16:49 [Coke]_ left 17:10 sena_kun left 17:21 sena_kun joined 17:35 razetime left 17:36 archenoth left 17:37 archenoth joined 18:07 reportable6 left 18:09 reportable6 joined 18:59 tokomak left 19:12 [Coke] left 19:15 [Coke] joined 19:30 jaguart left 19:32 Papercombo joined 19:33 sena_kun left 19:43 Papercombo left 19:50 MoC joined 19:51 [Coke] left 19:54 [Coke] joined
tonyo jjatria: bug should be fixed 20:02
if you upload again, it should index this time 20:03
lizmat tonyo++ 20:04
20:04 [Coke] left
tonyo turns out that gzip in particular was taking longer than the lambda timeout 20:04
20:07 [Coke] joined
tonyo anyone familiar with QAST around? i would've thought that in a slang returning the QAST::Op(:bind, QAST::Var, <some val>) was the way to register a symbol in the scope 20:07
lizmat github.com/Raku/nqp/blob/master/do...t.markdown ? 20:08
tonyo i'm doing what the example says but getting that var doesn't exist in scope at runtime 20:16
20:17 sena_kun joined 20:21 deoac joined
vrurg tonyo: You need QAST::Var for that. 20:35
tonyo: What you do is actually `nqp::bind(sym, $val)` where `sym` is not declared yet. 20:36
tonyo gist.github.com/tonyo-tatari/ae8d8...6abd5d19e0
this is what's in the actions right now and method fact is definitely being called 20:37
the double up was me experimenting
vrurg Frankly, I don't remember what is the meaning of 'lexicalref', but just 'lexical' must work. 20:38
tonyo i get `Variable '$x' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?` with `lexical` and `lexicalref`
vrurg Could it depend on now the AST you make is used after? 20:41
now -> how
BTW, you can actually declare the symbol where you use it and reduce the number of ops. Just a note. 20:44
tonyo what do you mean? the Action isn't being applied in a way where nqp::bind can affect the scope it's used in the script 21:04
err, oh, you mean the first Var in there is unnecessary 21:08
21:11 jjido joined 21:22 bigdata left 21:31 deoac left 21:39 Colere left
vrurg tonyo: sorry, I'm not always around. Yes, the note was about the redundant Var. But that's minor. More important is what block the Var gets installed into? This could be the reason for the error. 21:40
21:40 Colere joined
tonyo part of the error was i wasn't making that stmt in the right spot, that's corrected but i still get the var not found thing. currently looking at $*W.install_lexical_symbol 21:41
vrurg Have you tried get rid of the redundant Var? There is a little chance it can help. But otherwise I suspect there is a bigger problem. 21:42
21:48 lichtkind_ left
tonyo yea 21:52
just updated the gist 21:53
21:55 Heptite left 22:05 MoC left 22:19 sena_kun left 22:20 Heptite joined 22:25 [Coke]_ joined 22:26 [Coke] left
vrurg find_single_symbol must be wrapped into WVal. But you can use just QAST::WVal.new(:value(Any)) because you have it already in Raku. 22:35
tonyo like this? $*W.install_lexical_symbol($*W.cur_lexpad(), '$test', QAST::WVal.new(:value(Any))); 22:41
fails with: This type (Scalar) does not support positional operations
vrurg That's because they're not designed for use in Raku, but in NQP. The first arguments gets containerized. 22:46
tonyo ah
vrurg But you must not need it anyway. 22:47
tonyo what's the right way to make the symbol known at compile time so it can be known that there is a symbol with that name in the current scope?
vrurg You mean there is code ran at compile time which needs to access the symbol? 22:48
tbrowder last week i updated module V 22:50
vrurg tonyo: actually, you can try $*W.install_lexical_symbol(nqp::decont($*W.cur_lexpad()), '$test', Any). 22:52
tbrowder module Calendar which now has some limited functions, the most useful of which is the same output as the *nix program 'cal' BUT with a choice of one of 13 languages... 22:53
vrurg is afk for a while 22:54
tonyo: before I'm gone for another hour, what you probably need is the symbol to be installed at node 0 of $*W.cur_lexpad. It is a block node where 0 element is for declarations, and 1 is for the actual code. 23:04
23:05 [Coke] joined 23:07 [Coke]_ left 23:18 [Coke]_ joined 23:19 [Coke] left
jjatria tonyo: Thanks! I've re-uploaded, let's see what happens 23:25
tonyo Looks like no joy 23:39
23:42 habere-et-disper joined