🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:09
stoned75 left
00:29
WagsWoprld joined
00:36
NODE left
00:40
NODE joined
00:55
melezhik left
01:01
xinming left,
xinming joined
01:09
konvertex left
01:33
molaf left
|
|||
tigerpaws | newbie question: are there any tools to reformat a module? and to list all the contents (classes, methods, subs) of a module? | 01:36 | |
01:39
Sgeo joined
01:42
xinming left,
dotdotdot left,
xinming joined
01:45
dotdotdot joined
01:46
molaf joined
01:49
aborazmeh joined,
aborazmeh left,
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,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
02:59
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
03:44
brtastic joined
03:49
aborazmeh left
03:54
xinming left
03:55
xinming joined
04:26
Redfoxmoon left,
Redfoxmoon joined
04:45
brtastic left
05:05
aborazmeh joined,
aborazmeh left,
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
|
|||
rba | melezhik: Please ping me regarding Blin machine access. | 06:36 | |
tellable6 | 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,
xinming left
07:09
xinming joined
07:10
jmerelo joined,
suman joined
07:11
telex left
07:12
telex joined
|
|||
suman | Is there a way to access how much memory variable is taking in raku? | 07:14 | |
Something like size(@list) | |||
cpan-raku | New module released to CPAN! Shelve6 (0.2) by 03ROBERTLE | 07:25 | |
07:26
abraxxa joined
07:31
abraxxa left
07:32
abraxxa joined
|
|||
MasterDuke | suman: i think the only way is by doing a heapsnapshot profile | 07:34 | |
suman | MasterDuke Does it show the size of the variable or object? You suggest to run MoarVM profiler? | 07:38 | |
MasterDuke | i haven't used it all that much, you'd need to ask timotimo, nine, or jnthn for expert help | 07:39 | |
but yes, `raku --profile=somefilename.mvmheap -e 'say "hi"'` | 07:40 | ||
but it has it's own viewing/analyzing program, it doesn't create a web page | 07:41 | ||
p6-app-moarvm-heapanalyzer | 07:42 | ||
07:49
dakkar joined
07:50
pecastro joined
08:06
sena_kun joined
|
|||
suman | my @list = [10, 10, 31, 28, 46, | 08:08 | |
say @list | |||
It gives list of lists. Can I combine into a single list? | 08:09 | ||
m: 'my @list = [10, 10, 31, 28, 46, | 08:10 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at <tmp>:1 ------> 3'my @list = [10, 10, 31, 28, 46,7⏏5<EOL> expecting any of:… |
||
08:10
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
suman | 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 | |
camelia | WARNINGS for <tmp>: 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) |
||
MasterDuke | 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 | |
camelia | [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… | ||
suman | MasterDuke Still two lists side by side,can I combine into just a single list | 08:17 | |
08:18
sarna joined
|
|||
MasterDuke | 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 | |
camelia | (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 … | ||
suman | MasterDuke Thank you | ||
MasterDuke | np | 08:21 | |
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,
cgfbee left
08:46
dotdotdot left
08:48
dotdotdot joined
08:51
konvertex joined
|
|||
SmokeMachine | m: [,] | 08:53 | |
camelia | Potential difficulties: Useless use of [,] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[,] |
||
SmokeMachine | m: say [,] | ||
camelia | () | ||
SmokeMachine | m: say [[,],] | ||
camelia | [()] | ||
SmokeMachine | m: say [[[,],],] # why is it wrong? | 08:54 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in bracketed infix; couldn't find final ']' (corresponding starter was at line 1) at <tmp>:1 ------> 3say [[[,]7⏏5,],] # why is it wrong? |
||
09:13
cgfbee joined
09:18
Prince213 joined
09:19
Prince213 left
|
|||
timotimo | It is interpreting the whole thing as one operator | 09:26 | |
sarna | if I have a sub that takes one argument with the @ sigil, what is $_ bound to in the sub body? | 09:31 | |
oh, seems like it doesn't get bound to anything, no matter the arguments | 09:33 | ||
moritz | m: $_ = 'abc'; sub f(@a) { say $_ }; f([1, 2]) | ||
camelia | (Any) | ||
09:55
sour joined
|
|||
konvertex | 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:22 | |
lizmat | can't tell without a gist | 10:25 | |
10:26
sena_kun joined
|
|||
konvertex | Just looking at github.com/drujensen/fib/blob/master/fib.p6 | 10:28 | |
10:28
Altai-man_ left
|
|||
konvertex | But reduce it to fib(40), otherwise it takes forever. :) | 10:28 | |
This is on 2020.05.1. | 10:29 | ||
lizmat | well, if you profile for N = 30, you will see that it actually calls fib() 2692537 times | 10:36 | |
konvertex | 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:37 | |
lizmat | and for n=35 this has gone up to 29860703 aka, more than 10x more | 10:38 | |
so, that's what you get with a naive algorithm ? | 10:39 | ||
sarna | lizmat: I think they're running it again with the same argument | 10:41 | |
konvertex | 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
|
|||
lizmat | sarna: yes, there is no caching of any kind in that algorithm | 10:41 | |
.oO( those who do not cache are doomed to calculate it again and again and again) |
10:42 | ||
konvertex | But raku seems to cache the profiling data somewhere, eh? | ||
10:43
Kaeipi joined,
Kaiepi left
|
|||
jnthn | 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
|
|||
konvertex | Just to be clear, I'm doing this, no file editing in between: | 10:46 | |
~/testing/raku$ timev raku fib.raku | |||
102334155 | |||
339.78 s, 92228 kb | |||
~/testing/raku$ timev raku fib.raku | |||
102334155 | |||
39.28 s, 91688 kb | |||
jnthn | Is it random if it manages to optimize it or not? | 10:47 | |
konvertex | 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
|
|||
jnthn | Please can you make an issue for it? I'd like to try and repro it at some point. | 10:49 | |
10:51
[Sno] joined
11:30
Prince213 joined
|
|||
SmokeMachine | timotimo: and is that a bug? | 11:34 | |
11:36
rir joined
|
|||
timotimo | if there is no "use" statement, it's unlikely to be caching | 11:37 | |
that kilobytes number is the total amount of memory used? | |||
i mean maximum rss | |||
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? | |||
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:40 | ||
Prince213 | Hi, can I export something when a tag is *not* given? | 11:44 | |
lizmat | Prince213: providing your own EXPORT sub would allow you to do that | ||
docs.raku.org/language/modules#ind...sub_EXPORT | 11:45 | ||
11:46
patrickb joined
|
|||
Prince213 | Ok, I'll try that | 11:47 | |
timotimo | konvertex: got a bit of time to work with me? | ||
rir | From raku.org: (Object orientation) declarator class class Classes are declared using the class keyword, typically followed by a name. | ||
What other than a name is allowed? | 11:48 | ||
timotimo | :: | ||
rir | Are there the class-is-finalized and reopening-class phrasings? | 11:51 | |
timotimo | there is "augment class foo" | ||
rir | Yes. And can that be disallowed? | ||
timotimo | you are only allowed to use "augment" if you "use MONKEY-TYPING" | 11:52 | |
11:53
Prince213 left
|
|||
jnthn | One can also deny such changes through meta-programming, I guess. | 11:53 | |
11:53
Prince213 joined
|
|||
sarna | or setting a linter rule, right? | 11:53 | |
jnthn | Alternatively, write a role instead of a class, since roles are immutable. :) | ||
11:53
Prince213 left
|
|||
timotimo | you can also get around needing "use MONKEY-TYPING" using the meta programming | 11:54 | |
12:00
Prince213 joined
|
|||
rir | Thanks timo, jonathan. I go to RTM. | 12:01 | |
Oh, and sarna, thanks. Yours was just not in the direction I was thinking--so especially worthwhile. | 12:03 | ||
sarna | you're welcome :) | ||
konvertex: I can't reproduce this on 2020.05.1, with `time raku fib.raku` | 12:04 | ||
timotimo | oh | ||
konvertex: do you have a RAKU_LIB or PERL6_LIB in your environment? | |||
MasterDuke | doesn't repro here either | 12:05 | |
12:06
Prince213 left
|
|||
MasterDuke | timotimo: but yeah, that's likely the culprit | 12:07 | |
timotimo | not sure what exactly would make it faster the second time | 12:08 | |
12:11
dakkar left,
dakkar joined
|
|||
sarna | Make Your Raku Scripts Faster With This One Weird Trick | 12:15 | |
konvertex | 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. | ||
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 | ||
timotimo | OK, --stagestats would also give us a specific output if something were doing that | ||
konvertex | Maybe it will fix itself. Maybe some weird swap issue, hm? Uptime is 312 days. | ||
Back in a sec. | 12:17 | ||
12:17
konvertex left
12:26
Altai-man_ joined,
Prince213 joined,
Prince213 left
12:28
sena_kun left
12:29
girafe left
12:31
girafe joined,
cognominal left
12:33
cognominal joined
12:37
jmerelo left,
melezhik joined
12:38
cognominal left
12:52
cognominal joined
12:57
pilne joined
|
|||
melezhik | 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 | |
tellable6 | 2020-05-18T06:36:58Z #raku <rba> melezhik: Please ping me regarding Blin machine access. | ||
melezhik | so let decide where do we start from that | 13:01 | |
raku-bridge | <tmtvl> Does the old HOP-style memoization not work in Raku? | 13:02 | |
<tmtvl> 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); | |||
lizmat | and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/05/18/2020-...-upgraded/ | 13:03 | |
MasterDuke | 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 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: fib used at line 1 |
||
13:06
sour left,
AndroUser joined
|
|||
raku-bridge | <tmtvl> 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 gist.github.com/tmtvl/e9d1d78885fc...3dfd0e518b | 13:07 | |
13:11
karupanerura joined
13:14
konvertex joined
|
|||
konvertex | 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:15 | |
MasterDuke | 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:16 | |
13:20
xinming left
13:21
xinming joined
|
|||
sarna | wouldn't it be simpler for camelia to accept `<something> m:`? | 13:24 | |
raku-bridge | <tmtvl> 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,
jjatria joined
14:11
jjatria left
|
|||
sarna | 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 | |
camelia | [1 2 [3 4 5]] | ||
jnthn | [1,2,|@list] | 14:15 | |
tadzik | m: my @list = 3, 4, 5; say [1, 2, @list] | 14:16 | |
camelia | [1 2 [3 4 5]] | ||
tadzik | hrm | ||
14:20
brtastic joined
|
|||
sarna | 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
|
|||
sarna | ((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 | |
evalable6 | foo: 1 2 3, bar: 4, baz: 5 | ||
sarna | oh my, I forgot m: and it worked anyway! love these bots | ||
14:36
suman joined
|
|||
suman | m: my $rev_comp = ("ATTCGGCATTGCA" ~~ tr/ATCG/TAGC/).flip; say $rev_comp; | 14:36 | |
camelia | Cannot modify an immutable Str (ATTCGGCATTGCA) in block <unit> at <tmp> line 1 |
||
suman | I did not get this error message | 14:37 | |
14:44
sarna left
|
|||
suman | m: ("ATTCGGCATTGCA" ~~ tr/ATCG/TAGC/).flip.say | 14:47 | |
camelia | Cannot modify an immutable Str (ATTCGGCATTGCA) in block <unit> at <tmp> line 1 |
||
[Coke] | m: my $s = "ATTCGGCATTGCA"; ($s ~~ tr/ATCG/TAGC/).flip.say | 14:51 | |
camelia | TGCAATGCCGAAT | ||
[Coke] | m: "ATTCGGCATTGCA".trans('ATCG' => 'TAGC').flip.say | 14:53 | |
camelia | TGCAATGCCGAAT | ||
15:15
jmerelo joined
15:19
molaf joined
|
|||
skids | Hrm. | 15:30 | |
m: "ATTCGGCATTGCA" ~~ TR/ATCG/tagc/.say; | |||
camelia | taagccgtaacgt | ||
skids | m: my $r = ~"ATTCGGCATTGCA" ~~ TR/ATCG/tagc/; $r.say; | 15:31 | |
camelia | False | ||
skids | m: my $r = "ATTCGGCATTGCA" ~~ TR/ATCG/tagc/; $r.say; | ||
camelia | False | ||
[Coke] | you're setting r to the result of the smartmatch, not the string. | ||
skids | m: m: "ATTCGGCATTGCA" ~~ (my $r = TR/ATCG/tagc/); $r.say; | 15:33 | |
camelia | taagccgtaacgt | ||
skids | Wow that just looks backwards but OK. | 15:34 | |
15:43
kensanata left
|
|||
skids | m: my $rev_comp = (TR/ATCG/TAGC/ with "ATTCGGCATTGCA").flip; say $rev_comp # The more idiomatic way. | 15:45 | |
camelia | TGCAATGCCGAAT | ||
15:46
suman left
|
|||
skids | m: my $rev_comp = TR/ATCG/TAGC/.flip with "ATTCGGCATTGCA"; say $rev_comp # or maybe this depending on how your brain functions | 15:47 | |
camelia | TGCAATGCCGAAT | ||
15:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
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,
poohman joined
|
|||
poohman | hello all, | 16:19 | |
m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b {if $b eq "" say "empty"} | 16:21 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Er… | ||
poohman, Full output: gist.github.com/17fc15e7a4ede2ba5b...d5b8d1b049 | |||
poohman | m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b {if $b eq "" {say "empty"}} | ||
evalable6 | empty empty empty empty empty empty empty empty |
||
poohman | in the above example is $b eq "" the idiomatic way? | 16:22 | |
16:22
xinming left
|
|||
poohman | or do we have a cleaner way to check | 16:22 | |
? | |||
timotimo | that's fine | 16:23 | |
m: say ";;;;;;;;".split(";", :skip-empty) | |||
camelia | () | ||
timotimo | if you want that | ||
poohman | timotimo - im trying to checking if a csv from excel has an empty row | 16:24 | |
so its a check basically | |||
[Coke] | m:my $a =";;;;;;;";my @a=split(";",$a); for @a ->$b { say "empty" unless $b } | ||
evalable6 | empty empty empty empty empty empty empty empty |
||
timotimo | what if the cell in excel had a ; in it? | ||
[Coke] | You should be using the CSV module for any CSV stuff. | 16:25 | |
too many edge cases. | |||
poohman | timotimo - mine wont - but I get the point | ||
16:26
Altai-man_ joined
|
|||
poohman | let me look at the csv module then | 16:26 | |
16:26
aborazmeh left
|
|||
[Coke] | if you have an array and want to know if any of the elements has a value, you could: | 16:26 | |
m: my @a = "","","","",""; say "empty" unless @a.first(* ne "") | 16:27 | ||
camelia | empty | ||
[Coke] | m: my @a = "","","3","",""; say "empty" unless @a.first(* ne "") | ||
camelia | ( no output ) | ||
16:28
sena_kun left
|
|||
[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 | |
poohman | cool | ||
dakkar | m: my @a = "","","3","",""; say "empty" if all(|@a) eq '' | ||
camelia | ( no output ) | ||
timotimo | i find using "any" more idiomatic | ||
m: say so "1,2,,3,4".split("").any eq "" | 16:29 | ||
camelia | True | ||
timotimo | m: say so "1,2,0,3,4".split("").any eq "" | ||
camelia | True | ||
dakkar | `unless any() ne` is too many negations for my brain 😜 | ||
timotimo | er, oops? | ||
haha | |||
m: say so "1,2,,3,4".split(",").any eq "" | |||
camelia | True | ||
timotimo | m: say so "1,2,0,3,4".split(",").any eq "" | ||
camelia | False | ||
poohman | cool - but ill have a look at the csv module now | 16:31 | |
thanks all | |||
[Coke] | timotimo: any speed issues with using Junctions (esp on big arrays?) | ||
timotimo: also, is "any" smart enough to stop checking when it finds one? | |||
timotimo | 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) | |||
camelia | 21 | ||
timotimo | m: say so (1, 2 ... *).any(* > 20) | ||
camelia | Too many positionals passed; expected 1 argument but got 2 in block <unit> at <tmp> line 1 |
||
timotimo | er, yes | ||
m: say so (1, 2 ... *).any() > 20 | |||
OK, don't any, then | |||
camelia | (timeout) | 16:33 | |
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
|
|||
suman | stackoverflow.com/questions/618757...ne-in-raku | 17:49 | |
17:57
lucasb joined
18:00
ragekagemage joined
18:03
molaf left
|
|||
timotimo | m: .say for "florble".comb(3) | 18:04 | |
camelia | flo rbl e |
||
timotimo | i would assume you're getting a newline that's at the end of the input file | 18:05 | |
lizmat | spurt "out.txt", "test.txt".IO.comb(3).join("\n") # my solution | ||
timotimo | since comb gives you three characters rather than "three letters" | ||
lizmat | 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
|
|||
poohman | my $aoh = csv(in => $fh, headers => { $^h.lc ~ $i++ }); | 19:02 | |
this is from the Text::CSV module documentation | |||
what is this $^h? | |||
19:02
molaf joined
|
|||
lizmat | docs.raku.org/language/variables#i...LEX_ACCENT | 19:04 | |
poohman ^^ | 19:05 | ||
poohman | thanks liz ill have a look | ||
tigerpaws | 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 | |||
------> TF_Status is repr('CPointer') is export⏏ { | |||
I tried everything from 'class TF_Status {...} to 'class TF_Status is repr('CPointer') is export {...}' and still get hhe same error | 19:15 | ||
I need forward references for all these structs (in NativeCall) because they refer to each other all the time | 19:16 | ||
lizmat | tigerpaws: that's a known issue: you must set the REPR in the stub | ||
and *not* set it in the final declaration | 19:17 | ||
tigerpaws | Ah. NOT set it in the final declaration. Got it. What about the 'is export' ? | ||
lizmat | m: class A is repr("VMArray") { ... }; class A { }; dd A.REPR | 19:18 | |
camelia | "VMArray" | ||
lizmat | tigerpaws: you mean exporting a class ? | ||
you don't have to do anything for that, as classes are by default "our" and will thus export by default | 19:19 | ||
tigerpaws | yes. At least that's what GPTrixie produced for the api I am converting. Maybe GPTrixie doesn't need to do that? | ||
lizmat | I wouldn't know | 19:20 | |
19:20
stoned75 left
|
|||
tigerpaws | OK Thanks lizmat.. My next error says Undeclared name: | 19:22 | |
PointerStr used at line 179 | |||
on an attribute in a class: ... Pointer[PointerStr], ... | |||
lizmat | I have no idea, I don't think PointerStr is in core | 19:24 | |
tigerpaws | 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
|
|||
Geth | ¦ problem-solving: lizmat assigned to jnthn Issue Only allow IO::Path.open to create an IO::Handle github.com/Raku/problem-solving/issues/196 | 19:31 | |
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
|
|||
tigerpaws | 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:09 | |
And raku complains there's no acceptable method for TF_Function. It shouldn't be trying to call TF_Function, should it? | 20:10 | ||
===SORRY!=== Error while compiling /home/mike/projects/raku-tensorflow/lib/Tensorflow/Native.pm6 | 20:11 | ||
An exception occurred while parameterizing Pointer | |||
at /home/mike/projects/raku-tensorflow/lib/Tensorflow/Native.pm6:527 | |||
Exception details: | |||
Cannot resolve caller ACCEPTS(Bool:U: Tensorflow::Native::TF_Function); none of these signatures match: | |||
(Bool:D: Mu \topic, *%_) | |||
(Bool:U: \topic, *%_) | |||
in method parameterize at /usr/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 80 | |||
20:11
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
tigerpaws | method TF_GraphGetFunctions(TF_Graph $g # Typedef<TF_Graph>->«TF_Graph»* | 20:12 | |
,Pointer[TF_Function] $funcs # Typedef<TF_Function>->«TF_Function»** | |||
,int32 $max_func # int | |||
,TF_Status $status # Typedef<TF_Status>->«TF_Status»* | |||
) 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
|
|||
[Coke] | for big pastes, please use a service like gist.github.com | 20:29 | |
tigerpaws | OK, I guess this means that Pointer will not accept TF_Function. No need fir further help. | ||
[Coke] | (nice thing about that is you can include all the source if you need to) | ||
ok | |||
tigerpaws | @Coke, sorry, it started out smaller, and then grew. Thanks. | 20:30 | |
Geth | ¦ problem-solving: lizmat assigned to jnthn Issue Writing BOMs for *all* utf16 encodings github.com/Raku/problem-solving/issues/197 | 20:42 | |
20:54
Doc_Holliwood joined
|
|||
Doc_Holliwood | m: sub f { my $x = Nil; $x }; say f | 20:54 | |
camelia | (Any) | ||
Doc_Holliwood | wtf? | ||
skids | docs.raku.org/type/Nil | 20:58 | |
21:04
flyingtiger left
|
|||
[Coke] | m: Nil.sort.flip.reverse # should this complain about Str or just keep returning Nil? | 21:04 | |
camelia | Use of Nil in string context in block <unit> at <tmp> line 1 |
||
21:07
aborazmeh joined,
aborazmeh left,
aborazmeh joined
21:16
Itaipu left
21:17
Itaipu joined
|
|||
skids | .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:18 | |
melezhik | rba I pinged you ... | 21:19 | |
21:19
stoned75 left
|
|||
rba | melezhik: pong | 21:21 | |
melezhik | ))) | ||
skids | (well OK even more roundabout... Seq.Str is documented via List.Str to Stringify the elements of the (Nil,) sequence that .sort generates.) | 21:22 | |
ragekagemage | 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:30 | |
21:42
aborazmeh left
|
|||
El_Che | ragekagemage: in case you don't get an answer here, have a look at #raku-dev as well | 21:50 | |
21:56
raku-bridge2 joined,
raku-bridge2 left,
raku-bridge2 joined,
raku-bridge left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
21:57
raku-bridge2 is now known as raku-bridge
|
|||
jnthn | ragekagemage: Does it core dump because of memory (executable) permissions needing different handling to other platforms? If so, you might want to look at github.com/MoarVM/MoarVM/blob/mast...six/mmap.c and its usage at github.com/MoarVM/MoarVM/blob/mast...ile.c#L167 | 21:57 | |
I'm assuming that it follows POSIX calling conventions, but if not, there can be bother there too. | 21:58 | ||
22:00
tigerpaws left,
tigerpaws joined
22:06
Kaiepi left,
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,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
22:36
chloekek left
22:38
Sgeo joined
22:52
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
melezhik | tyil[m], I saw this - github.com/rakudo/rakudo/blob/mast...elines.yml ... Interesting ... I've done a lot of stuff like this at my current @job | 22:52 | |
what is the reason of moving entire rakudo cicd towards Azure Devops? | 22:53 | ||
22:55
pochi joined,
brtastic left
23:18
zacts left
23:20
rir left
23:21
pecastro left
|