IRC channel logs
2023-05-15.log
back to list of logs
<RhodiumToad>hmm. is there any way to have the code for modules (mylib foo) and (mylib bar) be in different subdirs, other than adding two separate entries to the load path? <flatwhatson>i don't think so. load-path is needed to map modules to files, how would it find files not on the load-path? <RhodiumToad>i.e. (mylib foo) and (mylib bar) might be separate projects <RhodiumToad>right now, (mylib foo) looks for mylib/foo.scm on the load path, and (mylib bar) looks for mylib/bar.scm <RhodiumToad>if (mylib foo) could look for mylib/foo/_module.scm or something like that as well, then the foo and bar modules could live in different subdirs without needing multiple load-path entries <flatwhatson>if they're separate repositories (regardless of nesting), what's wrong with multiple load-path entries? <flatwhatson>i don't see how mylib/foo/_module.scm would help resolve (mylib bar)? <flatwhatson>but it seems you're suggesting some change to how guile loads modules vs. how it actually works <flatwhatson>you could have a top-level module which modifies load-path before loading its subtree dependencies, if you only want users to configure a single load-path entry <flatwhatson>(maybe that's what you're getting at with _modules.scm?) <RhodiumToad>module (foo) is its own project, with ./foo.scm and also ./foo/fred.scm ./foo/jim.scm etc. <RhodiumToad>it needs to reference (mylib bar) and (mylib baz) which are two separate small projects, that I want to incorporate using git subtree <RhodiumToad>using ./mylib/ doesn't work because then mylib/bar.scm and mylib/baz.scm are in the same subtree <iyzsong>make another directory 'foo' and symlink files into it will work? <flatwhatson>anything other than adding them properly to load-path will be messy <flatwhatson>this is what pre-inst-env or similar "environment setup" scripts are for <flatwhatson>(and yes that's arguably messy too, but at least it's conventional) <flatwhatson>presumably if your module is *installed*, it should look for its deps normally on load-path (because they'll be installed too) <flatwhatson>so you just want a more convenient way to load those deps from your dev tree during development, and that's what env setup tools are for <flatwhatson>i normally use direnv with a simple .envrc that sets GUILE_LOAD_PATH appropriately <RhodiumToad>hmm. is there a good way to input a symbol whose name is "foo:" (without the quotes) while postfix keywords are enabled? <sneek>I've been serving for 24 days <sneek>This system has been up 6 weeks, 2 days, 1 hour, 30 minutes <dsmith>Just need to add both dirs to the guile load path