Conversation with #inferno at Tue Dec 14 11:41:50 2010 on powerman-asdf@irc.freenode.net (irc) (11:48:17) Gegemon left the room (quit: Quit: Leaving.). (12:10:59) Gegemon [~ynv@mx1.airis.ru] entered the room. (12:19:14) mjl-: hmm, what was the tk tool to look into dis modules? (12:19:40) mjl-: i can't find it with lookman, or SEE ALSO sections in other man pages... (12:25:06) mjl-: ah, wm/rt (12:25:22) mjl-: documented in wm-misc(1)... (12:27:38) mjl-: powerman-asdf: i think i like /opt so far (12:28:24) mjl-: i'm not very fond of having source there too, but it sure makes life easier, with wm/deb looking at the path of the .b used during compilation (12:29:48) mjl-: i'm even less fond of including .dis files in my hg repo's. but i can leave those out, compiling should be easy enough. (12:38:52) mjl-: another consideration for me is that i'ld like to keep it easy to integrate an hg repo into inferno-os or inferno-npe (12:38:57) mjl-: the fewer changes required, the better (12:39:10) mjl-: i just tried this: (12:39:35) mjl-: modify $ROOT/mkfiles/mkdis to make it understand a mk variable "INCLUDES" (12:39:42) mjl-: like so: (12:39:57) mjl-: LIMBOFLAGS=-I$MODDIR ${INCLUDES:%=-I%} (12:40:24) mjl-: than in the mkconfig of the project, i add an INCLUDES line: (12:40:25) mjl-: INCLUDES=$ROOT/opt/mjl/buildtest/module (12:42:36) mjl-: so if you INCLUDE all the /opt-projects that you need (for libraries), in the .b code you can just do: include "somelib.m"; without a full path. in case of conflicting module names, you can of course still use: include "mjl/buildtest/module/somelib.m"; (just add /opt to the INCLUDES) (12:56:22) mjl-: bummer, i forgot about mk dependencies... mk needs the full path of the modules, so INCLUDES and LIMBOFLAGS is not good enough... (13:00:11) Guest14561 [~algol@188.24.60.14] entered the room. (13:02:53) fddfoo [~algol@unaffiliated/fdd] entered the room. (13:04:41) Guest14561 left the room (quit: Read error: Connection reset by peer). (13:35:42) mjl-: powerman-asdf: could you have a look at the files and README in this: www.ueber.net/who/mjl/tmp/nbuildtest.tgz (13:36:18) mjl-: it has a few small modifications to the mkfile's, i'm wondering if that makes sense. or whether it can be done simpler. (13:36:32) mjl-: and whether it might solve or cause problems with how you're doing things. (13:36:49) mjl-: lunchtime now (14:16:56) Fish left the room (quit: Quit: So Long, and Thanks for All the Fish). (14:27:55) Fish [~Fish@coss6.exosec.net] entered the room. (15:34:39) Fish left the room (quit: Quit: So Long, and Thanks for All the Fish). (15:38:01) Fish [~Fish@coss6.exosec.net] entered the room. (16:16:25) mjl-: ah, just noticed this page: (16:16:26) mjl-: http://code.google.com/p/inferno-os/wiki/InfernoAndLimboPlans (16:16:34) mjl-: updated by charles on dec 07 (16:23:18) mjl-: hmm (16:23:28) mjl-: am i allowed to do this: (a, b) = (b, a); ? (16:36:51) fddfoo is now known as fdd (16:45:13) Gegemon left the room (quit: Quit: Leaving.). (17:26:23) mjl-: powerman-asdf: i've fixed that find(1) typo, thanks (17:26:31) mjl-: btw, are you (anyone else) "fluent" in fs(1)? (17:26:42) mjl-: i didn't really know it existed (17:46:15) robot12 left the room. (18:10:47) powerman: mjl-: morning :) (18:11:48) powerman: simple things first: (a,b)=(b,a) is always was possible, and I didn't see how InfernoAndLimboPlans can affect this (18:15:50) powerman: yeah, I knew about fs(1), but didn't find it useful so I'm not "fluent" with it. probably that's issue more with me than with fs(1) - because usual Linux command line environment is still much more comfortable for me than emu's sh environment, and vim it ease to use than acme. (18:17:27) mjl-: hej (18:17:29) powerman: now, about nbuildtest… (18:17:43) mjl-: the (a,b)=(b,a) was not meant to be related to the InfernoAndLimboPlans remark :) (18:20:04) powerman: one broken thing is 'mk' executed in host OS (18:20:25) powerman: powerman@home ~/inferno/opt/mjl/nbuildtest $ mk (18:20:25) powerman: (cd appl; mk ROOT=/usr/inferno all) (18:20:25) powerman: (cd cmd; mk ROOT=/usr/inferno all) (18:20:25) powerman: mk: don't know how to make '/usr/inferno/opt/mjl/nbuildtest/module/buildmod.m' (18:21:09) powerman: that's why I used relative paths in opt modules/apps (18:21:49) anth_ [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (18:23:17) anth left the room (quit: *.net *.split). (18:23:18) anth_ is now known as anth (18:23:52) mjl-: hmm, it does seem to work for me (18:24:42) mjl-: dis$ pwd (18:24:42) mjl-: /usr/mjl/inf.npe/opt/mjl/nbuildtest (18:24:42) mjl-: dis$ mk (18:24:42) mjl-: (cd appl; mk all) (18:24:42) mjl-: (cd cmd; mk all) (18:24:44) mjl-: limbo -I/usr/mjl/inf.npe/module -I/usr/mjl/inf.npe/opt -gw nbuildtest.b (18:24:47) mjl-: nbuildtest.b:25: warning: local bm not referenced (18:25:13) powerman: yep. that's because you put files in $ROOT/opt/ (18:25:15) mjl-: oh, i suppose your $HOME/inferno isn't the target dir (18:25:21) mjl-: yeah, ok (18:26:24) mjl-: i've had that problem before btw. i "solved" it by making a module/mkfile to install the .m file, and require the user to run "mk install" instead of just "mk". then with "module" as first target in the projects mkfile, the .m file exists when the .b's are compile.d.. (18:26:39) powerman: My config is install inferno to /usr/inferno by root, as system-wide software, and then allow non-root users to develop anything they want. So, these users have to keep their opt/ in their $HOME, and bind it to /opt inside emu (18:28:02) powerman: so, $HOME/inferno/opt is both source and target dir in this config, because non-root users doesn't have right to write in /usr/inferno/opt (18:33:32) mjl-: ok, i understand. that indeed works more often. (18:38:34) powerman: about optuse and bind for apps. that was already discussed, and AFAIR consensus was to allow user decide what and where to bind from /opt. thing is, in general case this "feature" can be implemented in much ease way as general script which looks for every dir in /opt/vendor/some/ like "dis/*" (excluding "dis/lib/"), "man/*/", "lib/*", etc. and bind them all (18:39:33) powerman: so, for app developer it's enough to create these dirs and put app.dis to dis/, no needs to provide custom "bind" file or optuse script (18:41:24) mjl-: i don't like binding whole hiearchies on /. i want only the minimum required. (18:41:48) mjl-: but true, a fixed set of binds is not really required (18:42:01) mjl-: a script for doing all the binds magically would be needed of course (18:46:08) powerman: but thing is, sometimes such app in opt/ will be designed to replace default app in /dis/, so it has to be bind -b, instead of bind -a. sometimes this will introduce some incompatibilities, so such binding shouldn't be system-wide and must be done only after FORKNS before running some other apps. moreover, everything is nice while we talking about simple apps which just provide dis/app.dis and man/1/app. but for complex things, which will include also a lot of files _and_dirs_ in directories like /lib or /acme or /services - we may need complex bind rules and finally end with huge amount of binds (18:47:35) powerman: I don't think someone already have final general solution for all possible cases. And don't sure we need it at all - most apps are trivial. (18:49:49) powerman: Because of all these possible corner cases I don't think general script which will auto-bind _all_ apps it find in /opt is good idea - because some apps may need custom binds. But general script which take single param - app name - and find that app and bind it's dis/ and man/*/ - sounds much more reasonable. (18:50:11) eno_ left the room (quit: Disconnected by services). (18:50:38) vpm left the room (quit: Quit: ++). (18:50:40) powerman: This will be simple, flexible and enough for most cases. (18:50:50) vpm [~vpm@reverse-94.fdn.fr] entered the room. (18:54:29) powerman: also, I didn't use man pages inside emu - it's much ease for me to use host os browser to view inferno man pages located on website. this mean I didn't need to bind man/*/ when "installing" some /opt app, only I need is bind dis/. that in turn mean, instead of that general "opt app install" script, I use this line in "namespace" file: (18:54:29) powerman: bind -a /opt/powerman/retrymount/dis /dis (18:56:34) powerman: and I'm not sure it's good idea to replace even two such lines (another one for man/*/) per each app in "namespace" file with executing some script in "profile" file (19:00:56) powerman: keeping in mind recommendation to use only absolute (starting with /opt/) or relative (to current app's dir inside /opt) paths in all /opt modules/apps to another /opt modules/apps and their resource dirs (like lib/ or services/), all opt modules/apps must work find without requiring from user to make some binds (19:01:49) powerman: so, in this way user will bind only things he want/need to make life easier for him, everything is optional (19:06:51) powerman: btw. one more issue related to paths when compiling in host os: (19:10:51) powerman: imagine you've many large enough projects. each of them may use different opt modules. it looks like good idea to separate these projects and their deps from each other. especially because different projects may require different versions of same opt modules. (19:11:09) anth left the room (quit: Read error: Connection reset by peer). (19:11:45) powerman: in this case, it easier to create "opt/" subdir in each project's dir, and keep all opt modules/apps needed by that project in that private opt/ subdir (19:12:27) powerman: in this case, project's .b files can use: (19:12:27) powerman: include "opt/powerman/logger/module/logger.m"; (19:14:22) powerman: and this will allow to run "limbo project.b" both in host os and inside emu (19:16:03) powerman: I'm afraid I've to finish this monologue and back to work. :) (19:18:20) anth [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (19:50:37) bvalek2 left the room (quit: Quit: Page closed). (19:50:41) KillerX [~anant@nat/mozilla/x-lvhqtnmxowggtirn] entered the room. (19:53:46) KillerX left the room (quit: Client Quit). (19:53:46) anth left the room (quit: Read error: Connection reset by peer). (19:54:27) anth [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (20:47:52) bvalek2 [5985141d@gateway/web/freenode/ip.89.133.20.29] entered the room. (21:19:08) KillerX [~anant@nat/mozilla/x-jggatctxbiuaoppq] entered the room. (21:49:47) KillerX left the room (quit: Quit: KillerX). (21:53:27) KillerX [~anant@nat/mozilla/x-cbysidyamedqaris] entered the room. (22:23:31) bvalek2 left the room (quit: Quit: Page closed). (22:37:02) Fish- [~Fish@9fans.fr] entered the room. (23:37:21) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.