IRC channel logs
2024-06-16.log
back to list of logs
<RavenJoad>janneke: We could. Or I could just contribute some clarification and examples to the manual, now that I know what I am doing. <lechner>Hi, how may I call 'malloc' and 'free' from Guile, please? I tried foreign-library-function with "libc" and "malloc" but get: In procedure dlopen: file "libc.so", message "/gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libc.so: invalid ELF header" <flatwhatson>lechner: you don't need to dlopen libc, it's already loaded <flatwhatson>> If library argument is omitted, it defaults to #f. If library is false, the resulting foreign library gives access to all symbols available for dynamic linking in the main binary. <flatwhatson>memcpy is from libc, but because it's already loaded #f is passed as the lib <kjartanoli>I'm working with a FFI function that requires FILE* arguments. Is it possible to pass a file port to such a function, or extract the underlying FILE* from the port? <lechner>flatwhatson / okay, i tried "" instead of #f. Thanks! <lechner>Hi, I'm seeing "madvise failed" after using 'malloc' and 'free' in Guile code called from Greetd via the "Tortoise" C interface. Is that a message Guile might issue, or should I look at Greetd? Thanks! <haugh>I tell you hwat, I'd really like to use some of these racket libs in guile. Obviously it's never been easier to steal code, but I wonder if anyone's tried to do this at scale. Theoretically it's quite feasible to run racket as a service, trading sexps over a port. Does anyone have thoughts on this? Tried to do anything comparable? <haugh>dthompson, thank you for linking Sussman's 2011 Strange Loop talk in your optimization post. It's full of mythic quotes. <haugh>"Suppose for every little memory module I had a big processor associated with it. Don't worry about it! That'll happen, because there's no other way to make the future happen."