IRC channel logs

2024-06-17.log

back to list of logs

<cow_2001>i have a piece of Tcl code lying about in pstk.scm as a string and i want to take it out and put it in a dedicated Tcl file. how do i find the location of this kind of non-scm file assets within to my package, then?
<flatwhatson>haugh: for sharing code between guile and racket, it's probably a matter of porting to a common dialect. that could mean something like a racket language for guile, assuming most interesting racket libs aren't built on r6rs
<flatwhatson>i guess IPC (sharing sexps, calling eval between implementations) is an option, but it's far from an ideal runtime environment
<flatwhatson>maybe the chez port of racket has made things slightly easier for porting to guile, as guile and chez are more similar than guile and racket
<haugh>IPC starts to become less insane as I move close to distributed architecture. Was not aware of the chez port, thanks
<flatwhatson>they've basically adopted chez as the underlying runtime for the whole thing
<flatwhatson>though this did involve a fork of chez, i think those changes got merged back into mainline chez recently
<flatwhatson>cow_2001: you could hunt for things at runtime along %load-path and friends, or use the traditional approach of determining the path at configure time and embedding it into your package
<flatwhatson>ie. using a config.scm.in template with a @PATH_TO_MY_THING@, eg. https://git.dthompson.us/chickadee/tree/chickadee/config.scm.in
<cow_2001>oh boy. autotools template!
<cow_2001>that'll be a new one for me
<cow_2001>flatwhatson: thank you!
<flatwhatson>happy to help and sorry to send another soul down this path
<flatwhatson>but i'm afraid the great old ones must be appeased with fresh sacrifices
<cow_2001>hmm the quote block didn't show up as written :\
<cow_2001> https://codeberg.org/kakafarm/guile-pstk/src/branch/master/TODO.org
<flatwhatson>codeberg's markdown renderer is a bit disappointing
<sneek>Yey! dsmith is back!
<cow_2001>there's guild, but i've never figured out how to work it into a workflow :|
<cow_2001>i understand that it deals with all the build template stuff
<flatwhatson>guild hall? i've used it, but didn't find it preferable to doing a minimal autotools setup
<cow_2001>"what i cannot create, i do not understand"
<flatwhatson><3
<lechner>Hi, what kind of trouble could this message indicate, please? uncaught exception: Wrong type to apply: (#(ribcage () () ()) #(ribcage #(handle) #((top)) #("l-1dff1b83541ce327-510")) #(ribcage (fork-user-child feed-string pam-retrieve-string pam-store-string free malloc get-token get-username) ((top) (top) (top) (top) (top) (top) (top) (top)) (((hygiene guile-user) . #<syntax fork-user-child>) ((hygiene guile-user) . #<syntax
<lechner>feed-string>) ((hygiene guile-user) . #<syntax pam-retrieve-string>) ((hygiene guile-user) . #<syntax pam-store-string>) ((hygiene guile-user) . #<syntax free>) ((hygiene guile-user) . #<syntax malloc>) ((hygiene guile-user) . #<syntax get-token>) ((hygiene guile-user) . #<syntax get-username>))))
<rlb>Offhand, looks like you might accidentally be doing something like (#(1 2 3) "foo") instead of (some-function "foo")...
<lechner>it is intermittent
<lechner>Hi, is it safe to do a fork/quit/waitpid while inside Guile from C via the Tortoise interface?
<lechner>Actually, i think it's my calls to malloc and free that cause my issues. Is it safe to use them directly?
<flatwhatson>lechner: in general, no, direct use of malloc and free is not seen as "safe". what are you trying to do? you can get a chunk of memory in guile by making a bytevector, and send that over FFI with bytevector->pointer
<flatwhatson>this technique is demonstrated in the manual (same section as before): https://www.gnu.org/software/guile/manual/html_node/More-Foreign-Functions.html
<bjoli>jpoiret: thank you for adding spawn. THANK YOU. I didn't know it was added more than a year ago.
<jpoiret>bjoli: no problem! took me a long time to get it right :)
<bjoli>it is so nice to have somewhere to point people who want to run external processes.
<lechner>flatwhatson / i wrote a PAM module that uses Guile. It works great but I have trouble storing data in libpam with this routine. https://man7.org/linux/man-pages/man3/pam_set_data.3.html Something gets confused toward the end of the program, potentially during cleanup
<lechner>flatwhatson / i'm not sure I can use bytevectors the way you describe, because the host application is in control, calls libpam.so, which then calls libguile.so. The program travels in and out of Guile several times
<dsmith>sneek, botsnack
<sneek>:)
<apteryx>hi! may I ask for some committers' attention regarding submissions such as #71300, #71303 and #71304 which should be straightforward to review (to get the ball rolling :-)) ?