🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
xinming !paste 06:29
xinming linkable6: pastebin.com/33maUDJi <--- With this example script, When I provide the small arg which is like 1000, it works pretty fine. But when I specify larger number, which is like 4000, It'll report `Cannot call method 'fully-reified' on a null object` 06:32
oops
lizmat: pastebin.com/33maUDJi <--- With this example script, When I provide the small arg which is like 1000, it works pretty fine. But when I specify larger number, which is like 4000, It'll report `Cannot call method 'fully-reified' on a null object`
I think there is a small bug where sync is out of sync, I don't know if it's a bug, as IIRC, the auto-vivification doesn't work within hyper. 06:34
BTW, this code is just for illustration about the bug, Not what I really do, this is the early version, now, I don't use List in the result. 06:35
japhb: I don't need it yet, What I was thinking is, if we can have some json-like format which also supports capture, then the json-rpc will be more "neat" 06:36
moon-child xinming: sounds like an mvm bug 06:45
japhb xinming: Ah, understood. I'm currently reading up on the current CBOR extensions to figure out whether there's an existing construct to reuse for Capture, or if I should spec a new one. 08:17
sena_kun releasable6, status 11:54
releasable6 sena_kun, Next release in ≈10 days and ≈7 hours. There are no known blockers. Changelog for this release was not started yet
sena_kun, Details: gist.github.com/a165046135da78dba5...4f9b4e74ff
zacts hi, must I know C to contribute to core raku? 16:50
(just curious) 16:51
lizmat_ zacts: depends how core you wanna go 16:52
a large part of Raku is written in Raku, with some nqp sprinkled in 16:53
see src/core.*/* files in the distribution
zacts cool
like if I wanted to change synatx would I need to know C?
or is C mainly needed for optimization and other core tasks?
I would probably be most interested in extending the language itself 16:54
lizmat_ depends on what syntax you want to change: some modules in the ecosystem change syntax with Raku code only
zacts ok
lizmat_ m: sub postfix:<!>(\a) { "the answer" }; say 42!
camelia the answer
lizmat_ ^^ syntax changing :-) 16:55
zacts cool
Altreus fly-by lizmat 16:57
codesections I thought there was some way to interpolate *into* pod6, but all I'm seeing in the docs is using pod6 values in Raku. Did I just imagine that there's a way to do something like 17:00
=begin pod
This is $*PROGRAM-NAME
=end pod 17:01
Util xinming: trying pastebin.com/33maUDJi , I can reproduce your `fully-reified on a null object` error on Mac with Rakudo v2020.10 . 17:02
On FreeBSD with Rakudo v2021.04, I get no error, even with a change from 4000 to 8000. Can you reproduce on v2021.04 or newer?
gfldex codesections: if there is anything, then in design.raku.org/S26.html 17:04
xinming Util: I'm using the newest 2021.08 17:09
not master branch though
Util: BTW, it's random, It may happen, if you lower the 4000 to 1000, it'll work pretty fine
Util: BTW, it's random, It may happen, if you lower the 4000 to 1000, it'll work pretty fine 17:10
with the List grow large, the chances will be higher
I use gentoo BTW
Util xinming: About the randomness, yes, when I can make it crash, it is from running it 10-20 times in a row. 17:11
xinming so the hyper may lose sync in some cases
Util codesections: Closest things I see are design.raku.org/S26.html#Placement_links , design.raku.org/S26.html#Alias_placements , and design.raku.org/S26.html#Aliases , but I don't see any of those having made it into production. 17:13
xinming Util: in your test, you get harder to trigger the bug, Could you please try to compile a large project in the background, and load up all cpus, then try the script again?
Util xinming: will do 17:14
xinming I test this within a qemu-vm, with 4000, and host is busy doing something, It's high likely the load will cause the bug appear often 17:15
codesections thanks, Util, that's what I'm concluding too. I *guess* there's the nuclear option of just EVALing $=pod, but that would have its own set of issues! 17:16
gfldex codesections: POD is part of the AST. RakuAST might become helpful. 17:23
neither hello how would you write an `all` function that applies a predicate to each values of an Iterable and has a short-circuiting behaviour? Returns True if all are True under predicate, False otherwise. 17:32
my attempt with de morgan is
m: my &oll = { not $^vals.grep(!*.&^pred) }; say oll(* < 177, 8..1_500_000)
camelia False
codesections are you wanting to avoid the builtin all? 17:33
neither But that doesn't short-circuit does it?
constructs the entire junction no matter what, if I understand correctly 17:34
# ($_ < 177 for 8..1_500_000).all 17:35
^this takes time
codesections Well, (if I have it right) it has semantics that would *allow* for short circuiting – or at least returning when one parallel branch is false. But that's NYI anyway, so I take your point
neither (I meant with so at the end `($_ < 177 for 8..1_500_000).all.so`) 17:36
In boolean context right?
Like `grep` does
Util m: sub oll ( &pred, $iter ) { not defined $iter.first(*.&pred.not) }; say oll(* < 177, 8..1_500_000); 17:40
camelia False
Util neither: ^^^
I expect `say ?((8..1_500_000).all < 177)` will short-circuit someday. (but not today) 17:51
codesections agreed. This is a little longer, but I might be tempted to go with 17:52
m: sub oll(&pred, @vals) { for @vals { return False if !pred($_)}; True}; say oll * < 177, 8..1_500_000 17:53
camelia False
Util Oh! Perhaps even better:
m: sub oll ( &pred, $iter ) { not defined $iter.race.first(*.&pred.not) }; say oll(* < 177, 8..1_500_000);
camelia False
codesections in 6.e.PREVIEW, there might be a nice way to do it with &last returning a value: github.com/rakudo/rakudo/pull/4415 17:57
neither Util: Thank you. With `first`, what if a value in the iterable itself wasn't DEFINITE? 17:59
e.g.:
m: sub oll ( &pred, $iter ) { not defined $iter.first(*.&pred.not) }; say oll(*.defined, [5, Int, 12]);
camelia True
neither should we go with :k adverb or something?
(by the way, why is `&defined ~~ Callable` is False?) 18:00
m: say &defined ~~ Callable
camelia True
neither Oh it's True?
I tried with 2020.05.1 and it gives False.. 18:02
neither m: $*RAKU.compiler.say 18:04
camelia rakudo (2021.08.22.gb.451.f.89.b.6)
[Coke] 2020.05 is pretty old. 18:21
tellable6 2021-09-07T18:59:32Z #raku <tbrowder> [Coke] i think yr relevant chgs are fixed in my doc PR, but pls ck it when you get a chance
ugexe ximming: i also reproduced your error but also got this to pop up once 18:38
raku(2746,0x70000b6bf000) malloc: Double free of object 0x7fdf72168010
raku(2746,0x70000b6bf000) malloc: *** set a breakpoint in malloc_error_break to debug
Geth doc: 076ce1dbbf | (Silvio Mayolo)++ | doc/Language/rb-nutshell.pod6
Corrected Ruby nutshell typo
18:48
doc: fcd90780a2 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/rb-nutshell.pod6
Merge pull request #3956 from Mercerenies/master

Corrected Ruby nutshell typo
xinming ugexe: yea, I use that error because that error is more easy to produce. 19:06
easier to produce, the `double free` error sometimes will let the program exit silently. 19:07
So, this bug is reproducable, and I think will be a bug hard to debug. :-)
Hope we can have this bug fixed in next stable release. 19:08
[Coke] . ask tbrowder didn't see the PR when I just checked, can you ping me the link if you still need me to review it? if it was related to xtest failures, just ship it and we'll fix it in post. 19:24
.ask tbrowder didn't see the PR when I just checked, can you ping me the link if you still need me to review it? if it was related to xtest failures, just ship it and we'll fix it in post.
tellable6 [Coke], I'll pass your message to tbrowder
tbrowder [Coke] new PR was #3955 merged and closed 22:16
tellable6 2021-09-08T19:24:50Z #raku <[Coke]> tbrowder didn't see the PR when I just checked, can you ping me the link if you still need me to review it? if it was related to xtest failures, just ship it and we'll fix it in post.
tbrowder .tell [Coke] new doc PR is #3955, merged and closed, i think it is fine 22:17
tellable6 tbrowder, I'll pass your message to [Coke]