[00:09] *** stoned75 left [00:29] *** WagsWoprld joined [00:36] *** NODE left [00:40] *** NODE joined [00:55] *** melezhik left [01:01] *** xinming left [01:01] *** xinming joined [01:09] *** konvertex left [01:33] *** molaf left [01:36] newbie question: are there any tools to reformat a module? and to list all the contents (classes, methods, subs) of a module? [01:39] *** Sgeo joined [01:42] *** xinming left [01:42] *** dotdotdot left [01:42] *** xinming joined [01:45] *** dotdotdot joined [01:46] *** molaf joined [01:49] *** aborazmeh joined [01:49] *** aborazmeh left [01:49] *** aborazmeh joined [01:55] *** Redfoxmoon left [01:58] *** Redfoxmoon joined [02:22] *** WagsWoprld left [02:23] *** gdonald left [02:29] *** gdonald joined [02:43] *** dotdotdot left [02:53] *** dotdotdot joined [02:55] *** aborazmeh left [02:58] *** poohman left [02:58] *** aborazmeh joined [02:58] *** aborazmeh left [02:58] *** aborazmeh joined [02:59] *** cpan-raku left [02:59] *** cpan-raku joined [02:59] *** cpan-raku left [02:59] *** cpan-raku joined [03:44] *** brtastic joined [03:49] *** aborazmeh left [03:54] *** xinming left [03:55] *** xinming joined [04:26] *** Redfoxmoon left [04:26] *** Redfoxmoon joined [04:45] *** brtastic left [05:05] *** aborazmeh joined [05:05] *** aborazmeh left [05:05] *** aborazmeh joined [05:08] *** molaf left [05:14] *** Sgeo left [05:42] *** brtastic joined [05:47] *** aborazmeh left [06:02] *** stoned75 joined [06:04] *** rir joined [06:19] *** sjm_uk joined [06:21] *** stoned75 left [06:23] *** stoned75 joined [06:24] *** rindolf joined [06:36] melezhik: Please ping me regarding Blin machine access. [06:36] rba, I'll pass your message to melezhik [06:40] *** rir left [06:42] *** domidumont joined [07:01] *** xinming left [07:02] *** xinming joined [07:08] *** pilne left [07:08] *** xinming left [07:09] *** xinming joined [07:10] *** jmerelo joined [07:10] *** suman joined [07:11] *** telex left [07:12] *** telex joined [07:14] Is there a way to access how much memory variable is taking in raku? [07:14] Something like size(@list) [07:25] New module released to CPAN! Shelve6 (0.2) by 03ROBERTLE [07:26] *** abraxxa joined [07:31] *** abraxxa left [07:32] *** abraxxa joined [07:34] suman: i think the only way is by doing a heapsnapshot profile [07:38] MasterDuke Does it show the size of the variable or object? You suggest to run MoarVM profiler? [07:39] i haven't used it all that much, you'd need to ask timotimo, nine, or jnthn for expert help [07:40] but yes, `raku --profile=somefilename.mvmheap -e 'say "hi"'` [07:41] but it has it's own viewing/analyzing program, it doesn't create a web page [07:42] p6-app-moarvm-heapanalyzer [07:49] *** dakkar joined [07:50] *** pecastro joined [08:06] *** sena_kun joined [08:08] my @list = [10, 10, 31, 28, 46, [08:08] say @list [08:09] It gives list of lists. Can I combine into a single list? [08:10] m: 'my @list = [10, 10, 31, 28, 46, [08:10] rakudo-moar cb69cfcee: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)␤at :1␤------> 3'my @list = [10, 10, 31, 28, 46,7⏏5␤ expecting any of:…» [08:10] *** cpan-raku left [08:10] *** cpan-raku joined [08:10] *** cpan-raku left [08:10] *** cpan-raku joined [08:13] m: 'my @list = [10, 10, 31, 28, 46, 22, 27, 28, 42, 31, 8, 27, 45, 34, 6, 23], [1..100];say @list' [08:13] rakudo-moar cb69cfcee: OUTPUT: «WARNINGS for :␤Useless use of constant string "my @list = [10, 10, 31, 28, 46, 22, 27, 28, 42, 31, 8, 27, 45, 34, 6, 23], [1..100];say @list" in sink context (line 1)␤» [08:14] m: my @list = [10, 10, 31, 28, 46, 22, 27, 28, 42, 31, 8, 27, 45, 34, 6, 23], [1..100]; say |@list [08:14] rakudo-moar cb69cfcee: OUTPUT: «[10 10 31 28 46 22 27 28 42 31 8 27 45 34 6 23][1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71…» [08:17] MasterDuke Still two lists side by side,can I combine into just a single list [08:18] *** sarna joined [08:20] m: my @list = [10, 10, 31, 28, 46, 22, 27, 28, 42, 31, 8, 27, 45, 34, 6, 23], [1..100]; say flat gather .take for @list [08:20] rakudo-moar cb69cfcee: OUTPUT: «(10 10 31 28 46 22 27 28 42 31 8 27 45 34 6 23 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 …» [08:20] MasterDuke Thank you [08:21] np [08:23] *** suman left [08:24] *** sour joined [08:26] *** Altai-man_ joined [08:28] *** sena_kun left [08:29] *** kst left [08:31] *** sour left [08:31] *** cgfbee left [08:46] *** dotdotdot left [08:48] *** dotdotdot joined [08:51] *** konvertex joined [08:53] m: [,] [08:53] rakudo-moar cb69cfcee: OUTPUT: «Potential difficulties:␤ Useless use of [,] in sink context␤ at :1␤ ------> 37⏏5[,]␤» [08:53] m: say [,] [08:53] rakudo-moar cb69cfcee: OUTPUT: «()␤» [08:53] m: say [[,],] [08:53] rakudo-moar cb69cfcee: OUTPUT: «[()]␤» [08:54] m: say [[[,],],] # why is it wrong? [08:54] rakudo-moar cb69cfcee: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unable to parse expression in bracketed infix; couldn't find final ']' (corresponding starter was at line 1)␤at :1␤------> 3say [[[,]7⏏5,],] # why is it wrong?␤» [09:13] *** cgfbee joined [09:18] *** Prince213 joined [09:19] *** Prince213 left [09:26] It is interpreting the whole thing as one operator [09:31] if I have a sub that takes one argument with the @ sigil, what is $_ bound to in the sub body? [09:33] oh, seems like it doesn't get bound to anything, no matter the arguments [09:33] m: $_ = 'abc'; sub f(@a) { say $_ }; f([1, 2]) [09:33] rakudo-moar cb69cfcee: OUTPUT: «(Any)␤» [09:55] *** sour joined [10:22] Given a naive recursive fib script, running it twice yields these timing results: from 340s on the first run, down to 39s on the second. Why aren't the optimizations kicking in on the first run? Is this some form of PGO that's only available after a successful run? What's happening here? [10:25] can't tell without a gist [10:26] *** sena_kun joined [10:28] Just looking at https://github.com/drujensen/fib/blob/master/fib.p6 [10:28] *** Altai-man_ left [10:28] But reduce it to fib(40), otherwise it takes forever. :) [10:29] This is on 2020.05.1. [10:36] well, if you profile for N = 30, you will see that it actually calls fib() 2692537 times [10:37] And replacing `Int $n` with `int $n --> int` slows down the first run by a factor of 3, but the second run is then 30 times faster on my end. [10:38] and for n=35 this has gone up to 29860703 aka, more than 10x more [10:39] so, that's what you get with a naive algorithm ? [10:41] lizmat: I think they're running it again with the same argument [10:41] Yes, I'm not expecting c perf numbers here, just wondering why two runs, with the same inputs, result in significantly different timings. [10:41] *** ufobat_ left [10:41] sarna: yes, there is no caching of any kind in that algorithm [10:42] .oO( those who do not cache are doomed to calculate it again and again and again) [10:42] But raku seems to cache the profiling data somewhere, eh? [10:43] *** Kaeipi joined [10:43] *** Kaiepi left [10:44] No, the profiling data is based on what's observed run to run [10:44] (If you mean the profiling data used for runtime optimization, that is) [10:46] *** mowcat joined [10:46] Just to be clear, I'm doing this, no file editing in between: [10:46] ~/testing/raku$ timev raku fib.raku [10:46] 102334155 [10:46] 339.78 s, 92228 kb [10:46] ~/testing/raku$ timev raku fib.raku [10:46] 102334155 [10:46] 39.28 s, 91688 kb [10:47] Is it random if it manages to optimize it or not? [10:48] Long runtime only happens with a new file, once. [10:48] So I assumed that there's some cache data floating around somewhere. [10:49] *** [Sno] left [10:49] Please can you make an issue for it? I'd like to try and repro it at some point. [10:51] *** [Sno] joined [11:30] *** Prince213 joined [11:34] timotimo: and is that a bug? [11:36] *** rir joined [11:37] if there is no "use" statement, it's unlikely to be caching [11:37] that kilobytes number is the total amount of memory used? [11:37] i mean maximum rss [11:38] hm, i guess fibonacci doesn't have deep recursion, just very wide [11:38] can you run it with "time" to see if it's user or system time? [11:40] also it's not likely the cause, but --stagestats can tell us if it's for some reason taking a long time to compile or really just running [11:44] Hi, can I export something when a tag is *not* given? [11:44] Prince213: providing your own EXPORT sub would allow you to do that [11:45] https://docs.raku.org/language/modules#index-entry-sub_EXPORT [11:46] *** patrickb joined [11:47] Ok, I'll try that [11:47] konvertex: got a bit of time to work with me? [11:47] From raku.org: (Object orientation) declarator class class Classes are declared using the class keyword, typically followed by a name. [11:48] What other than a name is allowed? [11:48] :: [11:51] Are there the class-is-finalized and reopening-class phrasings? [11:51] there is "augment class foo" [11:51] Yes. And can that be disallowed? [11:52] you are only allowed to use "augment" if you "use MONKEY-TYPING" [11:53] *** Prince213 left [11:53] One can also deny such changes through meta-programming, I guess. [11:53] *** Prince213 joined [11:53] or setting a linter rule, right? [11:53] Alternatively, write a role instead of a class, since roles are immutable. :) [11:53] *** Prince213 left [11:54] you can also get around needing "use MONKEY-TYPING" using the meta programming [12:00] *** Prince213 joined [12:01] Thanks timo, jonathan. I go to RTM. [12:03] Oh, and sarna, thanks. Yours was just not in the direction I was thinking--so especially worthwhile. [12:03] you're welcome :) [12:04] konvertex: I can't reproduce this on 2020.05.1, with `time raku fib.raku` [12:04] oh [12:04] konvertex: do you have a RAKU_LIB or PERL6_LIB in your environment? [12:05] doesn't repro here either [12:06] *** Prince213 left [12:07] timotimo: but yeah, that's likely the culprit [12:08] not sure what exactly would make it faster the second time [12:11] *** dakkar left [12:11] *** dakkar joined [12:15] Make Your Raku Scripts Faster With This One Weird Trick [12:15] Sorry for the delay, everyone. Upgrading my fedora machines atm, all EOL. Will try to reproduce it in the new environment after a quick reboot. [12:16] timotimo: yes, max rss kb. timev is just an alias: timev='/usr/bin/time -f "%e s, %M kb"'. Elapsed real time. And no, no such env vars on my end. [12:16] OK, --stagestats would also give us a specific output if something were doing that [12:16] Maybe it will fix itself. Maybe some weird swap issue, hm? Uptime is 312 days. [12:17] Back in a sec. [12:17] *** konvertex left [12:26] *** Altai-man_ joined [12:26] *** Prince213 joined [12:26] *** Prince213 left [12:28] *** sena_kun left [12:29] *** girafe left [12:31] *** girafe joined [12:31] *** cognominal left [12:33] *** cognominal joined [12:37] *** jmerelo left [12:37] *** melezhik joined [12:38] *** cognominal left [12:52] *** cognominal joined [12:57] *** pilne joined [13:00] AlexDaniel` rba I've made an in experiment running rakudist on aws. minimal configuration require at least 2 t2.small instances 2 GB , 2 CPU each [13:00] 2020-05-18T06:36:58Z #raku melezhik: Please ping me regarding Blin machine access. [13:01] so let decide where do we start from that [13:02] Does the old HOP-style memoization not work in Raku? [13:02] m: {my @fib; sub fib ($n) { return $_ with @fib[$n]; return @fib[$n] = $n if $n < 2; return @fib[$n] = fib($n - 1) + fib($n - 2);};}; say fib(35); [13:03] and another Rakudo Weekly News hits the Net: https://rakudoweekly.blog/2020/05/18/2020-20-continuously-upgraded/ [13:03] m: {my @fib; sub fib ($n) { return $_ with @fib[$n]; return @fib[$n] = $n if $n < 2; return @fib[$n] = fib($n - 1) + fib($n - 2);};}; say fib(35); # don't think you can invoke camelia over the bridge [13:03] rakudo-moar cb69cfcee: OUTPUT: «5===SORRY!5=== Error while compiling ␤Undeclared routine:␤ fib used at line 1␤␤» [13:06] *** sour left [13:06] *** AndroUser joined [13:07] Yep, that's what I get on 2020.02 as well... the right way to solve it is to just use Memoize, the dumb way to solve it would be something like https://gist.github.com/tmtvl/e9d1d78885fc702298b76d3dfd0e518b [13:11] *** karupanerura joined [13:14] *** konvertex joined [13:15] Well, well, that took longer than expected. Good news: can't reproduce the 10x slowdown on the first run any longer. Sorry for the noise, everybody! [13:16] i wonder if it's possible for the bridge bots to catch 'm:' messages and say them literally to the channel, not prefixed by user? [13:20] *** xinming left [13:21] *** xinming joined [13:24] wouldn't it be simpler for camelia to accept ` m:`? [13:24] I should just not be lazy and hop on ERC. I have Emacs open 24/7 anyway. [13:26] *** kensanata joined [13:35] *** cognominal left [13:36] *** brtastic left [13:37] *** cognominal joined [13:57] *** skids joined [14:09] *** jjatria left [14:09] *** jjatria joined [14:11] *** jjatria left [14:14] m: my @list = [3,4,5]; say [1,2,@list] # I'd like it to be [1,2,3,4,5] - how would I do that? [14:14] rakudo-moar 44b270196: OUTPUT: «[1 2 [3 4 5]]␤» [14:15] [1,2,|@list] [14:16] m: my @list = 3, 4, 5; say [1, 2, @list] [14:16] rakudo-moar 44b270196: OUTPUT: «[1 2 [3 4 5]]␤» [14:16] hrm [14:20] *** brtastic joined [14:20] ah, that's the thing :D I forgot which operator it was, and it wasn't in the docs under "flattening" [14:20] thanks jnthn :)) [14:27] *** sena_kun joined [14:28] *** Altai-man_ left [14:35] ((my $foo, my @bar), my @baz) = [[1,2,3],4,5]; say "foo: $foo, bar: {@bar}, baz: {@baz}" # why doesn't this dwim? [14:35] sarna, rakudo-moar 44b270196: OUTPUT: «foo: 1 2 3, bar: 4, baz: 5␤» [14:35] oh my, I forgot m: and it worked anyway! love these bots [14:36] *** suman joined [14:36] m: my $rev_comp = ("ATTCGGCATTGCA" ~~ tr/ATCG/TAGC/).flip; say $rev_comp; [14:36] rakudo-moar 44b270196: OUTPUT: «Cannot modify an immutable Str (ATTCGGCATTGCA)␤ in block at line 1␤␤» [14:37] I did not get this error message [14:44] *** sarna left [14:47] m: ("ATTCGGCATTGCA" ~~ tr/ATCG/TAGC/).flip.say [14:47] rakudo-moar 44b270196: OUTPUT: «Cannot modify an immutable Str (ATTCGGCATTGCA)␤ in block at line 1␤␤» [14:51] <[Coke]> m: my $s = "ATTCGGCATTGCA"; ($s ~~ tr/ATCG/TAGC/).flip.say [14:51] rakudo-moar 44b270196: OUTPUT: «TGCAATGCCGAAT␤» [14:53] <[Coke]> m: "ATTCGGCATTGCA".trans('ATCG' => 'TAGC').flip.say [14:53] rakudo-moar 44b270196: OUTPUT: «TGCAATGCCGAAT␤» [15:15] *** jmerelo joined [15:19] *** molaf joined [15:30] Hrm. [15:30] m: "ATTCGGCATTGCA" ~~ TR/ATCG/tagc/.say; [15:30] rakudo-moar 44b270196: OUTPUT: «taagccgtaacgt␤» [15:31] m: my $r = ~"ATTCGGCATTGCA" ~~ TR/ATCG/tagc/; $r.say; [15:31] rakudo-moar 44b270196: OUTPUT: «False␤» [15:31] m: my $r = "ATTCGGCATTGCA" ~~ TR/ATCG/tagc/; $r.say; [15:31] rakudo-moar 44b270196: OUTPUT: «False␤» [15:31] <[Coke]> you're setting r to the result of the smartmatch, not the string. [15:33] m: m: "ATTCGGCATTGCA" ~~ (my $r = TR/ATCG/tagc/); $r.say; [15:33] rakudo-moar 44b270196: OUTPUT: «taagccgtaacgt␤» [15:34] Wow that just looks backwards but OK. [15:43] *** kensanata left [15:45] m: my $rev_comp = (TR/ATCG/TAGC/ with "ATTCGGCATTGCA").flip; say $rev_comp # The more idiomatic way. [15:45] rakudo-moar 44b270196: OUTPUT: «TGCAATGCCGAAT␤» [15:46] *** suman left [15:47] m: my $rev_comp = TR/ATCG/TAGC/.flip with "ATTCGGCATTGCA"; say $rev_comp # or maybe this depending on how your brain functions [15:47] rakudo-moar 44b270196: OUTPUT: «TGCAATGCCGAAT␤» [15:48] *** aborazmeh joined [15:48] *** aborazmeh left [15:48] *** aborazmeh joined [15:48] *** molaf left [15:57] *** xinming left [15:58] *** xinming joined [16:07] *** patrickb left [16:11] *** Tirifto joined [16:15] *** xinming left [16:16] *** xinming joined [16:19] *** xinming_ joined [16:19] *** poohman joined [16:19] hello all, [16:21] m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b {if $b eq "" say "empty"} [16:21] poohman, rakudo-moar 44b270196: OUTPUT: «(exit code 1) 04===SORRY!04=== Er…» [16:21] poohman, Full output: https://gist.github.com/17fc15e7a4ede2ba5b5ad5d5b8d1b049 [16:21] m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b {if $b eq "" {say "empty"}} [16:21] poohman, rakudo-moar 44b270196: OUTPUT: «empty␤empty␤empty␤empty␤empty␤empty␤empty␤empty␤» [16:22] in the above example is $b eq "" the idiomatic way? [16:22] *** xinming left [16:22] or do we have a cleaner way to check [16:22] ? [16:23] that's fine [16:23] m: say ";;;;;;;;".split(";", :skip-empty) [16:23] rakudo-moar 44b270196: OUTPUT: «()␤» [16:23] if you want that [16:24] timotimo - im trying to checking if a csv from excel has an empty row [16:24] so its a check basically [16:24] <[Coke]> m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b { say "empty" unless $b } [16:24] [Coke], rakudo-moar 44b270196: OUTPUT: «empty␤empty␤empty␤empty␤empty␤empty␤empty␤empty␤» [16:24] what if the cell in excel had a ; in it? [16:25] <[Coke]> You should be using the CSV module for any CSV stuff. [16:25] <[Coke]> too many edge cases. [16:25] timotimo - mine wont - but I get the point [16:26] *** Altai-man_ joined [16:26] let me look at the csv module then [16:26] *** aborazmeh left [16:26] <[Coke]> if you have an array and want to know if any of the elements has a value, you could: [16:27] <[Coke]> m: my @a = "","","","",""; say "empty" unless @a.first(* ne "") [16:27] rakudo-moar 44b270196: OUTPUT: «empty␤» [16:27] <[Coke]> m: my @a = "","","3","",""; say "empty" unless @a.first(* ne "") [16:27] rakudo-moar 44b270196: ( no output ) [16:28] *** sena_kun left [16:28] <[Coke]> saves you an explicit iteration loop, will stop as soon as it finds any value (don't have to keep checking if the first cell has a value) [16:28] cool [16:28] m: my @a = "","","3","",""; say "empty" if all(|@a) eq '' [16:28] rakudo-moar 44b270196: ( no output ) [16:28] i find using "any" more idiomatic [16:29] m: say so "1,2,,3,4".split("").any eq "" [16:29] rakudo-moar 44b270196: OUTPUT: «True␤» [16:29] m: say so "1,2,0,3,4".split("").any eq "" [16:29] rakudo-moar 44b270196: OUTPUT: «True␤» [16:29] `unless any() ne` is too many negations for my brain 😜 [16:29] er, oops? [16:29] haha [16:29] m: say so "1,2,,3,4".split(",").any eq "" [16:29] rakudo-moar 44b270196: OUTPUT: «True␤» [16:29] m: say so "1,2,0,3,4".split(",").any eq "" [16:29] rakudo-moar 44b270196: OUTPUT: «False␤» [16:31] cool - but ill have a look at the csv module now [16:31] thanks all [16:31] <[Coke]> timotimo: any speed issues with using Junctions (esp on big arrays?) [16:31] <[Coke]> timotimo: also, is "any" smart enough to stop checking when it finds one? [16:32] it will be, but it could be that before that happens something else already greedily evaluated the list [16:32] m: say (1, 2 ... *).first(* > 20) [16:32] rakudo-moar 44b270196: OUTPUT: «21␤» [16:32] m: say so (1, 2 ... *).any(* > 20) [16:32] rakudo-moar 44b270196: OUTPUT: «Too many positionals passed; expected 1 argument but got 2␤ in block at line 1␤␤» [16:32] er, yes [16:32] m: say so (1, 2 ... *).any() > 20 [16:32] OK, don't any, then [16:33] rakudo-moar 44b270196: OUTPUT: «(timeout)» [16:34] *** dakkar left [17:16] *** suman joined [17:32] *** jjatria joined [17:34] *** chloekek joined [17:35] *** zacts joined [17:38] *** molaf joined [17:40] *** domidumont left [17:49] https://stackoverflow.com/questions/61875715/split-string-to-fixed-length-chunks-and-write-in-separate-line-in-raku [17:57] *** lucasb joined [18:00] *** ragekagemage joined [18:03] *** molaf left [18:04] m: .say for "florble".comb(3) [18:04] rakudo-moar 44b270196: OUTPUT: «flo␤rbl␤e␤» [18:05] i would assume you're getting a newline that's at the end of the input file [18:05] spurt "out.txt", "test.txt".IO.comb(3).join("\n") # my solution [18:05] since comb gives you three characters rather than "three letters" [18:05] pretty much like an ascii deal to me [18:10] *** jmerelo left [18:14] *** Kaeipi left [18:17] *** Kaiepi joined [18:20] *** xinming_ left [18:22] *** xinming_ joined [18:24] *** Tirifto left [18:26] *** sena_kun joined [18:28] *** Altai-man_ left [19:02] my $aoh = csv(in => $fh, headers => { $^h.lc ~ $i++ }); [19:02] this is from the Text::CSV module documentation [19:02] what is this $^h? [19:02] *** molaf joined [19:04] https://docs.raku.org/language/variables#index-entry-$$CIRCUMFLEX_ACCENT [19:05] poohman ^^ [19:05] thanks liz ill have a look [19:14] Hi. I have a problem with forward declarations: annot change REPR of Tensorflow::Native::TF_Status now (must be set at initial declaration) [19:14] at /home/mike/projects/raku-tensorflow/lib/Tensorflow/Native.pm6:110 [19:14] ------> TF_Status is repr('CPointer') is export⏏ { [19:15] I tried everything from 'class TF_Status {...} to 'class TF_Status is repr('CPointer') is export {...}' and still get hhe same error [19:16] I need forward references for all these structs (in NativeCall) because they refer to each other all the time [19:16] tigerpaws: that's a known issue: you must set the REPR in the stub [19:17] and *not* set it in the final declaration [19:17] Ah. NOT set it in the final declaration. Got it. What about the 'is export' ? [19:18] m: class A is repr("VMArray") { ... }; class A { }; dd A.REPR [19:18] rakudo-moar 95f7d34e8: OUTPUT: «"VMArray"␤» [19:18] tigerpaws: you mean exporting a class ? [19:19] you don't have to do anything for that, as classes are by default "our" and will thus export by default [19:19] yes. At least that's what GPTrixie produced for the api I am converting. Maybe GPTrixie doesn't need to do that? [19:20] I wouldn't know [19:20] *** stoned75 left [19:22] OK Thanks lizmat.. My next error says Undeclared name: [19:22] PointerStr used at line 179 [19:22] on an attribute in a class: ... Pointer[PointerStr], ... [19:24] I have no idea, I don't think PointerStr is in core [19:24] OK. Maybe it was at one time. In any case, I don't see what difference it makes... [19:26] *** abraxxa left [19:27] *** abraxxa joined [19:31] ¦ problem-solving: lizmat assigned to jnthn Issue Only allow IO::Path.open to create an IO::Handle https://github.com/Raku/problem-solving/issues/196 [19:43] *** rindolf left [19:46] *** Itaipu left [19:53] *** Itaipu joined [19:55] *** stoned75 joined [19:56] *** molaf left [19:58] *** sjm_uk left [20:02] *** molaf joined [20:04] *** xinming_ left [20:06] *** xinming_ joined [20:07] *** flyingtiger joined [20:09] Another problem with my NativeCall stuff: In the NativeCall docs it says Pointer[MyCStruct] is is pointer to a a user defined type. But I have Pointer[TF_Function] where TF_Function is a class defined CPointer. [20:10] And raku complains there's no acceptable method for TF_Function. It shouldn't be trying to call TF_Function, should it? [20:11] ===SORRY!=== Error while compiling /home/mike/projects/raku-tensorflow/lib/Tensorflow/Native.pm6 [20:11] An exception occurred while parameterizing Pointer [20:11] at /home/mike/projects/raku-tensorflow/lib/Tensorflow/Native.pm6:527 [20:11] Exception details: [20:11] Cannot resolve caller ACCEPTS(Bool:U: Tensorflow::Native::TF_Function); none of these signatures match: [20:11] (Bool:D: Mu \topic, *%_) [20:11] (Bool:U: \topic, *%_) [20:11] in method parameterize at /usr/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 80 [20:11] *** aborazmeh joined [20:11] *** aborazmeh left [20:11] *** aborazmeh joined [20:12] method TF_GraphGetFunctions(TF_Graph $g # Typedef->«TF_Graph»* [20:12] ,Pointer[TF_Function] $funcs # Typedef->«TF_Function»** [20:12] ,int32 $max_func # int [20:12] ,TF_Status $status # Typedef->«TF_Status»* [20:12] ) is native(LIB) returns int32 is export { * } [20:19] *** suman left [20:21] *** Black_Ribbon joined [20:22] *** xinming_ left [20:23] *** xinming_ joined [20:24] *** aborazmeh left [20:26] *** Altai-man_ joined [20:28] *** sena_kun left [20:29] <[Coke]> for big pastes, please use a service like gist.github.com [20:29] OK, I guess this means that Pointer will not accept TF_Function. No need fir further help. [20:29] <[Coke]> (nice thing about that is you can include all the source if you need to) [20:29] <[Coke]> ok [20:30] @Coke, sorry, it started out smaller, and then grew. Thanks. [20:42] ¦ problem-solving: lizmat assigned to jnthn Issue Writing BOMs for *all* utf16 encodings https://github.com/Raku/problem-solving/issues/197 [20:54] *** Doc_Holliwood joined [20:54] m: sub f { my $x = Nil; $x }; say f [20:54] rakudo-moar 95f7d34e8: OUTPUT: «(Any)␤» [20:54] wtf? [20:58] https://docs.raku.org/type/Nil [21:04] *** flyingtiger left [21:04] <[Coke]> m: Nil.sort.flip.reverse # should this complain about Str or just keep returning Nil? [21:04] rakudo-moar 95f7d34e8: OUTPUT: «Use of Nil in string context␤ in block at line 1␤» [21:07] *** aborazmeh joined [21:07] *** aborazmeh left [21:07] *** aborazmeh joined [21:16] *** Itaipu left [21:17] *** Itaipu joined [21:18] .flip "Coerces the invocant (or in sub form, its argument) to Str" so thereby calls Nil.Str so it's documented to fail, in a roundabout way. [21:19] rba I pinged you ... [21:19] *** stoned75 left [21:21] melezhik: pong [21:21] ))) [21:22] (well OK even more roundabout... Seq.Str is documented via List.Str to Stringify the elements of the (Nil,) sequence that .sort generates.) [21:30] Anyone around that can help me poke around in the guts of moarvm and nqp? I'm trying to get moarvm to work correctly on openbsd without using the --no-jit flag, currently nqp core dumps as soon as it tries to use a jit enabled moarvm. [21:42] *** aborazmeh left [21:50] ragekagemage: in case you don't get an answer here, have a look at #raku-dev as well [21:56] *** raku-bridge2 joined [21:56] *** raku-bridge2 left [21:56] *** raku-bridge2 joined [21:56] *** raku-bridge left [21:56] *** aborazmeh joined [21:56] *** aborazmeh left [21:56] *** aborazmeh joined [21:57] *** raku-bridge2 is now known as raku-bridge [21:57] ragekagemage: Does it core dump because of memory (executable) permissions needing different handling to other platforms? If so, you might want to look at https://github.com/MoarVM/MoarVM/blob/master/src/platform/posix/mmap.c and its usage at https://github.com/MoarVM/MoarVM/blob/master/src/jit/compile.c#L167 [21:58] I'm assuming that it follows POSIX calling conventions, but if not, there can be bother there too. [22:00] *** tigerpaws left [22:00] *** tigerpaws joined [22:06] *** Kaiepi left [22:06] *** Kaiepi joined [22:11] *** sauvin left [22:15] *** sauvin joined [22:25] *** Altai-man_ left [22:27] *** aborazmeh left [22:30] *** AndroUser left [22:34] *** cpan-raku left [22:34] *** cpan-raku joined [22:34] *** cpan-raku left [22:34] *** cpan-raku joined [22:36] *** chloekek left [22:38] *** Sgeo joined [22:52] *** aborazmeh joined [22:52] *** aborazmeh left [22:52] *** aborazmeh joined [22:52] tyil[m], I saw this - https://github.com/rakudo/rakudo/blob/master/azure-pipelines.yml ... Interesting ... I've done a lot of stuff like this at my current @job [22:53] what is the reason of moving entire rakudo cicd towards Azure Devops? [22:55] *** pochi joined [22:55] *** brtastic left [23:18] *** zacts left [23:20] *** rir left [23:21] *** pecastro left