IRC channel logs
2023-12-29.log
back to list of logs
<sneek>Welcome back euouae, you have 3 messages! <sneek>euouae, tsmish says: I've tracked down why test doesn't run correctly. The reason is guix has broken load paths which prioritize system directories over the repo directory. To solve this add "(add-to-load-path source)" to etc/system-tests.scm:78 (right after (define source ...))" <sneek>euouae, tsmish says: or alternatively add "-L$(top_srcdir)" as an argument to guix build at Makefile:7039 (check-system definition) <sneek>euouae, tsmish says: running "make scripts/guix" before running the test would have also worked, albeit for a different reason. <euouae>So I've figured out one way to mix C and guile is this: <euouae>use guile wrappers over a C library and load the guile library inside guile <euouae>So now I'm exploring the other way: To embed Guile inside a C program <euouae>instead of the scm_shell() call, I'd like to run Guile code that also has my-negate (from C) available <euouae>I imagine this would be used e.g. with users of the C program able to "script" it by modifying Guile source files <euouae>e.g. Guile plugins loaded on-the-fly <euouae>ah maybe with scm_primitive_load <euouae>so now my question is, how to deal with C++ programs and libraries? Is there some way? <euouae>I suppose I just have to create my own C wrapper <freakingpenguin>Hey all! Does guile have a code formatter/linter tool? I'm thinking something like rubocop or python-black, for cleaning up unused imports and whatnot. <euouae>As for a linter, aside from cleaning imports, I can't think of many uses for it. Python makes use of linters via type hints doesn't it? <euouae>and AFAIK the imports issue cannot be answered perfectly because it would be equivalent to the halting problem as the symbol can change at any point dynamically. Right? <freakingpenguin>euouae: Thanks! Yeah, Emacs handles indentation very well. My default indentation fix is C-x h TAB. I've only used Guile for a few months so it's not always clear to me when I'm following best practices (or when said practices exist) <freakingpenguin>I can see why a traditional linter wouldn't be very helpful. Not like there's, say, ambiguous order of operations. <mwette>In (unreleased) guile repo code is option to emit unused-modules, if I read the it right. <mwette>There also seems to be unused-toplevel warning.