🦋 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:00 bloatable6 joined, releasable6 joined, quotable6 joined, reportable6 joined, reportable6 left, linkable6 joined, committable6 joined, notable6 joined 00:01 reportable6 joined 01:18 explorer left 03:45 statisfiable6 left, reportable6 left, committable6 left, releasable6 left, notable6 left, quotable6 left, squashable6 left, nativecallable6 left, tellable6 left, sourceable6 left, bisectable6 left, shareable6 left, coverable6 left, unicodable6 left, greppable6 left, bloatable6 left, linkable6 left, benchable6 left, evalable6 left, nativecallable6 joined 03:46 statisfiable6 joined, evalable6 joined, releasable6 joined, benchable6 joined, notable6 joined, shareable6 joined, squashable6 joined, linkable6 joined, sourceable6 joined 03:47 unicodable6 joined, bloatable6 joined, greppable6 joined, tellable6 joined, coverable6 joined, committable6 joined, bisectable6 joined 03:48 reportable6 joined, quotable6 joined
Geth ¦ rakudo: MasterDuke17 assigned to niner Issue Error with signed/unsigned natives when printing a buf64 that contains 2**64-1 github.com/rakudo/rakudo/issues/5348 04:11
06:00 reportable6 left 06:03 reportable6 joined 07:03 shareable6 left, coverable6 left, tellable6 left, releasable6 left, linkable6 left, quotable6 left, notable6 left, unicodable6 left, benchable6 left, evalable6 left, bloatable6 left, squashable6 left, reportable6 left, committable6 left, statisfiable6 left, nativecallable6 left, greppable6 left, sourceable6 left, bisectable6 left, coverable6 joined, shareable6 joined, tellable6 joined, linkable6 joined, notable6 joined 07:04 nativecallable6 joined, unicodable6 joined, evalable6 joined 07:05 reportable6 joined, squashable6 joined, quotable6 joined, committable6 joined, statisfiable6 joined, releasable6 joined 07:06 benchable6 joined, bloatable6 joined, greppable6 joined, sourceable6 joined, bisectable6 joined 07:42 sena_kun joined 08:01 nebuchadnezzar joined
lizmat m: use nqp; my uint @a = -1; my int $b = nqp::atpos_u(@a,0); say $b # this is fine 08:10
camelia -1
lizmat m: use nqp; my uint @a = -1; my int $b = nqp::if(1,nqp::atpos_u(@a,0)); say $b # this is not :-(
camelia Cannot unbox 64 bit wide bigint into native integer
in block <unit> at <tmp> line 1
Geth rakudo/main: 4347320283 | (Elizabeth Mattijsen)++ | src/core.c/Buf.pm6
Fix issue with uint64 Bufs and -1

Apparently there's some kind of coercion going on when there's not a direct assignment from a uint to an int. This coercion is throwing the error.
Fix this by making it direct assignments: for the represention in a gist, it doesn't matter whether the value was originally signed or unsigned.
Fixes #5348
08:28
roast: 0529a785e9 | (Elizabeth Mattijsen)++ | S03-operators/buf.t
Add test for #5348
08:44
10:57 SmokeMachine_ joined 11:05 SmokeMachine left, SmokeMachine_ is now known as SmokeMachine
Geth rakudo/main: c4b68d7f10 | (Elizabeth Mattijsen)++ | src/core.c/Exception.pm6
Allow "sorrows" to be specified as "sorries"

Apparently, in RakuAST the term "sorries" is used rather than
  "sorrows". This makes interfacing easier.
11:41
rakudo/main: 2caaf9f4d7 | (Elizabeth Mattijsen)++ | src/Raku/ast/resolver.rakumod
RakuAST: some more resolver streamlining

  - less need to unwrap lists, use HLL methods such as .elems, .AT-POS, .Bool
  - don't use return if it isn't needed
  - some internal docs additions
12:00 reportable6 left 12:01 reportable6 joined 12:20 jgaz left 12:21 jgaz joined
Geth rakudo/main: f604c78834 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: some streamlining

  - kebab-case comp_unit tokens / methods
  - reduce number of dynamic var lookups
12:27
MasterDuke m: my $bufb = buf64.new(3, 1, 18446744073709551615); $bufb[2] = $bufb[2] + 1; 13:40
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
MasterDuke m: my uint64 $bufb = 18446744073709551615; $bufb++; say $bufb 13:41
camelia 0
MasterDuke m: my uint64 $bufb = 18446744073709551615; $bufb = $bufb + 1; say $bufb
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
MasterDuke m: my uint64 $bufb = 18446744073709551615; $bufb += 1; say $bufb 13:42
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
MasterDuke should ^^^ all fail? all succeed? or is current behavior correct? 13:44
lizmat I think the current behaviour is correct 13:48
hmmm 13:49
the problem with $bufb = $bufb + 1 13:50
is that "$bufb + 1" gets HLLized to an Int\ 13:51
m: my uint $a = 18446744073709551616
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
lizmat that's basically the error 13:52
m: my int $a = 18446744073709551616
camelia Cannot unbox 65 bit wide bigint into native integer
in block <unit> at <tmp> line 1
13:53 linkable6 left 13:55 linkable6 joined
MasterDuke m: srand 0; my int64 $bufb = 2**63-1; $bufb += (4..10).pick; say $bufb 14:00
camelia Cannot unbox 64 bit wide bigint into native integer
in block <unit> at <tmp> line 1
MasterDuke m: srand 0; my int64 $bufb = 2**63-1; $bufb++ for ^(($bufb + (4..10).pick) - $bufb); say $bufb 14:01
camelia -9223372036854775802
MasterDuke same behavior for uint64s if you use 2**64-1 instead of 2**63-1
dunno. seems like people might want to wrap without having to do it via incrementing 14:02
m: srand 0; my int64 $bufb = 2**63-1; my int64 $add = (4..10).pick; $bufb += $add; say $bufb 14:04
camelia -9223372036854775802
MasterDuke you have to know to create the intermediate values explicitly typed as natives
lizmat it's a waterbed alright :-) 14:09
15:28 linkable6 left, evalable6 left, linkable6 joined, evalable6 joined
Geth rakudo/main: 703363eb18 | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp
RakuAST: refactor / streamlin Actions prologue

  - give subs / variables more meaningful names
  - add documentation
  - move logic of RakuAST class lookup to "Nodify" sub
  - change all self.r method lookups to just call Nodify
  - make the "r" method a common method, proxy for Nodify
15:44
lizmat unexpectedly: 937 (+6) 15:45
[Coke] any pointers on how to get all the pod nodes inside a document? I am trying do $file.IO.slurp.AST.visit-children({$_.^name.say}) and only getting a Doc::Block 16:13
lizmat [Coke]: gist ? 16:14
[Coke] oh, you still need to manually recurse. ah 16:15
how to get the children without visit-children? that needs a callable 16:17
lizmat with visit-children you do 16:18
fwiw, .map and .grep work on RakuAST nodes
so you should technically be able to do:
[Coke] recursively or only current children? 16:19
lizmat for $ast { ... }
recursively
[Coke] is there a way to get the info NOT recursively? 16:20
for $ast {} doesn't recurse 16:21
lizmat yeah, I just saw that, I wonder why
it should :-( 16:22
16:22 NemokoschKiwi joined
[Coke] ok. guess I will avoid this project for a bit then 16:23
lizmat ah, I misread your question
[Coke] :( 16:24
lizmat m: .say for Q|=foo blah|.AST.rakudoc # [Coke]
camelia RakuAST::Doc::Block.new(
type => "foo",
abbreviated => True,
paragraphs => (
"blah",
)
)
lizmat the .rakudoc will give you all of the RakuAST::Doc objects 16:25
[Coke] ah, wish I had that 30m ago, thank you 16:27
lizmat sorry... 16:30
I think I documented that though?
[Coke] we have your blog posts and type docs, not a howto. 16:31
so, probably you did, yes! 16:32
lizmat there's also lib/Rakudoc/To/Text.rakumod in the distribution
if you want to see some actual usage 16:33
16:33 ab5tract joined
[Coke] afk 16:34
[Tux] Rakudo v2023.06-227-gf604c7883 (v6.d) on MoarVM 2023.06-4-g75fe055c2
csv-ip5xs0.785 - 0.892
csv-ip5xs-205.165 - 5.729
csv-parser3.986 - 4.856
csv-test-xs-200.398 - 0.401
test6.463 - 7.070
test-t1.405 - 1.828
test-t --race0.831 - 1.053
test-t-2021.110 - 21.451
test-t-20 --race6.268 - 6.562
16:58
Geth rakudo/main: 86557c946a | (Elizabeth Mattijsen)++ | 2 files
RakuAST: more Actions streamlining

  - more comments
  - extract next-id logic to a sub, rather than a class method
  - rename comp-unit-stage0 to more descriptive comp-unit-prologue
17:15
17:25 ab5tract left 18:00 reportable6 left 18:02 reportable6 joined 18:33 ab5tract joined 19:02 finanalyst joined 19:29 ab5tract left 19:52 NemokoschKiwi left 20:08 notna joined 20:10 notna left 21:07 finanalyst left 22:33 linkable6 left, evalable6 left, coverable6 left, committable6 left, unicodable6 left, benchable6 left, greppable6 left, statisfiable6 left, quotable6 left, squashable6 left, reportable6 left, releasable6 left, tellable6 left, notable6 left, nativecallable6 left, greppable6 joined 22:34 notable6 joined, committable6 joined, tellable6 joined, coverable6 joined, unicodable6 joined, squashable6 joined 22:35 linkable6 joined, quotable6 joined, releasable6 joined, benchable6 joined, statisfiable6 joined, evalable6 joined 22:36 reportable6 joined, nativecallable6 joined 22:43 nebuchadnezzar left 22:59 sena_kun left 23:59 evalable6 left, linkable6 left