IRC channel logs
2024-10-02.log
back to list of logs
<cpli>mwette: how fast is `assq-ref`, and would it be advantageous to maybe generate perfect hashmaps instead? <eikcaz>I'm writing some guile to interact with a REST API, but their server likes to give strings in strings, so "foo" is sent as "\"foo\"". I want to do something like (read (open-input-string "\"foo\"")), but it seems dangerous to read possibly malicious data. <eikcaz>cpli: how big are your association lists? (order of magnitude) <cpli>eikcaz maximally 100 entries <cpli>hmm.. this might be ill-guided, but since i'm writing a renderer.. i'm anxious about that sort overhead *every frame* <eikcaz>oh, that does sound intensive. Still, changing your code from association lists to hashmaps after the fact should be pretty easy (probably could be done with a couple find-replace's) <mwette>cpli: are you talking about chasing struct tags using cdata? <mwette>If so, you might look at ctype-sel and make-cdata-getter. <wehlutyk>Hello all! I'm mostly a Guix user, starting to use Guile (aside from the guix config.scm files) <wehlutyk>and got stuck in getting access in guile to a library I just installed <wehlutyk>compiled and installed fine using its "guix.scm" <wehlutyk>but which I can't get my guile shell to access <wehlutyk>I tried "(add-to-load-path "/gnu/store/...-guile-wlroots.../lib/guile/3.0/site/ccache/") <wehlutyk>which still doesn't let me use guile-wlroots as a lib: "(use-modules (wlroots))" or "(use-modules (wlroots types))" fail <wehlutyk>Could there be something wrong with the depth in the lib folder? <wehlutyk>any help or advice or pointer is very welcome! <dthompson>that load path is for source but you're adding a path to bytecode <dthompson>there's both load-path and load-compiled-path <wehlutyk>there's an "(add-to... )" for load-compiled-path? I'll look for that <wehlutyk>got it, thanks -- instead of reading "Load Paths" in the docs, it was the previous section about "Loading Scheme Code from File" <wehlutyk>dthompson: thanks for haunt! (happily using it for my homepage) <dthompson>wehlutyk: glad you figured out your load path issue! <jlicht>is there anything I can do to keep geiser from compiling my scm files? I already have GUILE_AUTO_COMPILE set to 0, but both `geiser-compile-current-buffer` and `geiser-load-current-buffer` lead to guile generating .go files in $HOME/.cache/guile <graywolf>Hello, I am curious, should -Ocross-module-inlining be enabled by default? <graywolf>Does it make it kinda easy to violate LGPL? <graywolf>My code is AGPL, so I *think* I am safe, but is it even possible to write non-(L)GPL programs in guile? <graywolf>Hm, how does it work? When I use some core Guile macro (under LGPL), and it is used in my module (non-GPL) and compile the .go that containes the result (and with module inlining possibly even LGPL procedure code), does that still comply with LGPL terms? <Arsen>no - you need to distribute the sources <Arsen>(which is nigh-necessary anyway, IIRC .go objects aren't stable across releases) <graywolf>And those sources in addition need to be under LGPL compatible license no? <graywolf>Maybe I need to re-read LGPL. I thought that when you are combining sources (as oposed to just linking), my code need to be license compatible with LGPL. And, in case of inlining and macros, I thought sources are being combined... <Arsen>emphasis mine - but I meant to also emphasize d0 <Arsen>(IANAL ofc, but I am decently sure this is the case) <graywolf>Oh, so "source available" would suffice to satisfy the requirements. <Arsen>even enough sources to just recompile an interface library or something <Arsen>but I think in this case no such thing exists (it is scripting after all) <wehlutyk>Hello again! Out of curiosity, has anyone here been trying out guile-wlroots? <wehlutyk>I'm attempting to get example uses running <wehlutyk>but it fails in something I can't understand <mwette>Oh, wlroots would be a fun ffi-helper project to try. <wehlutyk>from what I understand it simplifies developing a new ffi, not diagnosing an existing one that hasn't relied on it right? <mwette>Are you using the emturner one (I just saw)? If so, is it well implemented? I just took a cursory look, but didn't seem all there. <mwette>And right, it will not help with your current issue. <mwette>I've seen the error before. Are you trying to pass a lambda where a pointer (from procedure->pointer) is expected? <mwette>In the update to ffi-helper to use cdata, I put in a lot to work to deal with function types and callbacks. <wehlutyk>I'm not using any I think :-p , I'm very new to guile, and for the moment just trying to get the guile-wlroots example to run <wehlutyk>(I thought the emturner was another contributor to ffi-helper)