🦋 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:51 pecastro left, jmchael left 01:43 schlaftier left 01:44 schlaftier joined 01:57 Tirifto left 02:05 lucasb left 02:26 Kaiepi joined 02:41 Henri joined
Henri how do you check for null pointers returned from C native calls? 02:41
I know to pass a null pointer i can use the Pointer type object
But any value returned will smartmatch against this type object
But any value returned will smartmatch against this type object 02:42
03:10 BenGoldberg joined 03:15 BenGoldberg left 04:09 kini left 04:19 BenGoldberg joined 04:24 BenGoldberg left
Henri constant HTSLIB = %?RESOURCES<libhts>; 04:25
I'm trying to use something like this to load shared libraries...
However, I amg etting use of unitialized value %result{resources/libhts} of type Any in string context
I thought that constants were evaluated at compile time, so that this should be no issue with the native trait. 04:26
What went wrong?
04:28 BenGoldberg joined 04:33 BenGoldberg left
timotimo Henri: check for undefinedness with TheType:U for example 04:35
Henri timotimo: thanks for the help. 05:05
the second issue is the one that I'm having more trouble with...
timotimo that error message looks weird 05:14
is that really what it looks like?
are you pointing your -I at the folder that has the META6.json? that's what makes RESOURCES work 05:15
Henri yeah it's after I use zef install . 05:18
so it should compile my library correctly
timotimo ah, so it fails during the tests? 05:26
because when you use zef install you will have to `zef install --force .` after every change
Henri no yes that is what i am running 05:27
I am just loading the package in a repl
and testing it
i do not have tests :(
05:33 evalable6 left, linkable6 left 05:34 linkable6 joined
timotimo so where does this %result come from 05:35
05:35 evalable6 joined
timotimo sounds like you're accessing a hash's key that's not in there 05:36
Henri `constant HTSLIB = %?RESOURCES<libhts>;sub hts_open(Str is encoded('utf8'), Str is encoded('utf8')) is native(HTSLIB) is export returns SamFile { * }` 05:38
ahh, i am having trouble using new lines...
timotimo IRC doesn't allow newlines in messages
Henri then a call to `hts_open($bam, 'r')` triggers the error
well there you go
timotimo try outputting what HTSLIB is
Henri I should export it then correcT? 05:39
timotimo nah, just put the output on the next line to see what it is 05:40
and raku -I . -e 'use MyLibrary;' to cause it to run
Henri wait I don't have raku... only rakudo 05:41
timotimo no problem
but also, how old is your rakudo? :)
Henri This is Rakudo version 2019.11 built on MoarVM version 2019.11 05:42
implementing perl 6.d.
timotimo about a whole year, oh well
Henri Honestly I don't know enough about modules... 05:43
I should really read up on them
I'm trying to build a little lib for Bio stuff that uses the c library htslib 05:44
It's been more difficult than I imagined, especially considering I just started with Raku
timotimo native libraries are always extra fun 05:45
would also be interesting to know what exactly your libhts is, the .so file from the library? 05:46
Henri yeah
i figured it would be easier to distribute with the compiled shared object files instead of building it from source 05:47
Then I would really have to learn how Raku works...
timotimo there's a modulethat makes it a little bit easier, but it's still painful 05:48
is libhts not available in package managers usually?
Henri No it is.
But I changed some source files to export a symbol 05:49
timotimo OK
Henri It was easier than copying the struct's definition exactly
I wanted to use an opaque pointer type
And so I needed an extra function
At least for now, it's not too much of a concern. 05:50
I want this for personal use
I am getting that %?RESOURCES is nil 05:51
timotimo %?RESOURCES itself or what you get out at the libhts key? 05:52
Henri RESOURCES itself
timotimo what does the resources section in your meta json file look like? 05:53
Henri "resources" : [ "libraries/hts" ],
I know it correctly detects it by appending lib- and -.so 05:54
timotimo maybe %*RESOURCES is the right one? 05:55
hm, no
but you may very well have to put "libraries/" in front when taking it out of resources 05:56
Henri Still, %?RESOURCES should not be null
timotimo but if the entire resources thing is missing, you may be loading the module through some way that doesn't have the files associated properly
Henri Yes that is what I think. 05:57
Surely zef install should do it
05:58 parabolize left
Henri That worked. 05:59
Thank you
Still though, if I run it without zef install --force . 06:00
I can't get META6.json properly associated
In clojure I could run a repl *with* my library
Is there anything like that?
timotimo it should just work if you point -I at the folder with the META6.json in it 06:01
Henri :)
now I'm getting somewhere
thank you for the help
timotimo cool
no prob
Henri I can now use `rakudo -I . -e "use Bio::IO::Sam"` 06:02
timotimo just in time, too, because i'm leaving :)
Henri or run it through a repl
and then install with zef
thank you
you've helped me before btw too
timotimo my pleasure
Henri :D 06:04
06:11 rindolf joined
xinming How do we debug dead-lock in async programs? 06:17
I wrote a small script, It halts after running a while, I think it's beause there is a dead lock, But no clue on how to troubleshoot them 06:18
06:38 Altai-man joined 06:55 brtastic joined 07:10 kent\n left, aeruder left, aeruder joined 07:11 kent\n joined 07:12 Doc_Holliwood joined 07:57 sena_kun joined 07:59 Altai-man left 08:17 Henri left 08:19 domidumont joined 08:43 domidumont left 08:45 sjm_uk joined 09:05 kini joined 09:09 domidumont joined 09:24 domidumont left
moritz add some strategic print statements to find out what is being executed 09:31
run, observe it lock up, add more debug statements to find out more precisely where it hangs
09:35 Doc_Holliwood left 09:41 schlaftier left 09:42 schlaftier joined 09:48 kini left 09:50 warriors left 10:04 hobbified joined 10:09 hobbified left 10:13 sjm_uk left 10:27 Deknos joined 10:43 Sgeo left 11:10 Doc_Holliwood joined 11:15 sjm_uk joined 11:56 Altai-man joined 11:59 sena_kun left 12:03 jmchael joined 12:12 jcallen left 12:13 jcallen joined 12:14 pel left, pel joined 12:15 kini joined 12:19 Summertime left 12:20 Summertime joined 12:21 sjm_uk left 12:28 Doc_Holliwood left 12:36 pmurias joined
pmurias hi 12:36
grondilu pmurias: hi, weren't you the guy working on the js port of rakudo ? 12:43
pmurias yes 12:46
haven't done anything with it in a few months 12:47
got a new job at google also we super hard goverment covid paranoia over the summer at got hit hard by the silly restrictions 12:49
with forests being locked down ;)
grondilu ok 12:50
I was wondering if you had any interest in WebAssembly. 12:51
I asked you about it long time ago but I thought maybe things have changed since then.
12:52 pecastro joined
pmurias grondilu: I think it's potentially a good way to get rakudo-moar running inside browsers for a try it out repl etc. 12:54
timotimo xinming: you can attach GDB to it, go through all the threads and see which are waiting on a lock, and get the tracebacks with MVM_dump_backtrace(tc) 12:55
pmurias grondilu: I still don't have any interest in working on it myself 12:56
grondilu noted, thanks. 12:57
hopefully eventually the gnu compiler toolchain will make it possible to target webassembly without any effort on the developper part. 12:58
pmurias it seems like something that will be very doable at some point 12:59
with this point very likely being now
perl5 is already running on webassembly
grondilu oh is it ? I didn't know. 13:00
timotimo xinming: the tc object also has the number of locks a given thread is holding 13:01
pmurias hmm what seems to be a good way to work on nqp-truffle from a lockdown work laptop? 13:12
rent a box and ssh to it? any good suggestions for what to rent? 13:13
grondilu has no idea what nqp-truffle is 13:17
MasterDuke pmurias: does the lockdown extend to not being able to run docker images? 13:20
tyil MasterDuke: I think thats fine, so long as the containers are seperated by 1.5mb of memory 13:21
MasterDuke and excited to see you working on truffle again. i've been distracted by moarvm projects, but truffle is always on the back if my mind
grondilu pmurias: I'm curious. Can't you work on that laptop ? If not don't you have ssh access to an other machine ? 13:28
I mean if what you need is an access to a linux box I can give you access to mine. I've always wanted to be sysadmin. 13:31
13:51 Deknos left 14:33 Doc_Holliwood joined 14:36 domidumont joined 15:07 dmc00 left, dmc00 joined 15:12 Doc_Holliwood left 15:23 dmc00 left, dmc00 joined 15:43 parabolize joined 15:53 dogbert17 left 15:57 sena_kun joined 15:58 Altai-man left 16:11 Doc_Holliwood joined 16:23 dogbert17 joined
Geth doc: uzluisf++ created pull request #3751:
Add clarification about private methods
16:40 cpan-raku left 16:41 cpan-raku joined, cpan-raku left, cpan-raku joined 17:30 xelxebar left 17:31 xelxebar joined 17:37 wamba joined
pmurias grondilu: I can't even store any code on my work laptop, I use it just as an ssh terminal 17:45
grondilu: I would be grateful for access :) 17:49
17:59 b2gills left, b2gills joined 18:07 Kaiepi left
pmurias grondilu: I ssh into box in the cloud at work but not I'm not sure if I should be using it for none work stuff 18:15
grondilu: nqp-truffle is a port of NQP to GraalVM (a VM to run a bunch of different languages on a JVM efficently) 18:16
18:19 ggoebel joined 18:20 brtastic left 18:21 pmurias left 18:25 ggoebel left
Geth doc: e7cd967b2b | JustThisGuyAZ++ (committed by Juan Julián Merelo Guervós) | doc/Type/IO/Path.pod6
Update Path.pod6

Clarify what "it" was referring to in "resolve" docs.
linkable6 Link: docs.raku.org/type/IO::Path
18:46 mowcat joined 18:50 Tirifto joined
grondilu how is it possible that you can't store any code on your laptop ? Is it a chromebook or something ? 18:53
moritz it's possible to allow-list applications that are allowed to store files, and other crazy stuff 19:03
Geth doc: 14bf9b7cfe | (JJ Merelo)++ | META6.json
Eliminates unneeded dependency, closes #3750
linkable6 DOC#3750 [closed]: github.com/Raku/doc/issues/3750 [docs] cannot install through zef due to missing GTK::Simple dependency
grondilu oh I had missed the part when he said it's a "work" laptop. So I see obviously he's severly contrained with what he can do.
19:22 b2gills left, b2gills joined 19:39 Sgeo joined 19:56 Altai-man joined 19:59 wamba left, sena_kun left 20:18 pmurias joined
pmurias grondilu: we are not allowed to store company code on laptops 20:19
20:28 sxmx joined
pmurias and have a whitelist of stuff we are allowed to run 20:29
20:29 pmurias left 20:30 rir joined 20:45 brtastic joined 20:51 ChoppedBacon left 20:53 ChoppedBacon joined
raydiak I originally wrote App::Pray on a 10-year-old 13-inch laptop with no hard drive, keyboard with 2 broken keys, and touchpad not working so had to use external mouse. just booted off a flash drive, developed over ssh, and loaded the output image from my server in a browser 20:53
a bit spartan maybe, but it's also an elegantly simple, highly reliable, low-distraction way to get some focused work done 20:59
honestly, all the awesome raku people up here in this little tmux split was the biggest distraction :) 21:01
21:04 vike joined 21:20 aborazmeh joined, aborazmeh left, aborazmeh joined 21:32 tejr left 21:33 tejr joined 21:45 imcsk8 left 21:46 imcsk8 joined
timotimo why doesn't irc have a "distraction-free mode" 21:53
perryprog Isn't that /quit? 21:56
22:11 Altai-man left 22:42 vike left 22:57 mowcat left 23:10 vike joined 23:26 vike left 23:27 aborazmeh left 23:29 Doc_Holliwood left 23:56 brtastic left