02:09:15 Any reason why this doesn;t work? 02:09:18 openacs-4=> select acs_permission__grant_permsission ( 02:09:18 openacs-4(> 2480, 02:09:18 openacs-4(> acs__magic_object_id('the_public'), 02:09:18 openacs-4(> 'general_comments_create' 02:09:18 openacs-4(> ); 02:09:34 I am getting one of these: ERROR: Function 'acs_permission__grant_permsissi(int4, int4, unknown)' does not exist 02:09:34 Unable to identify a function that satisfies the given argument types 02:09:34 You may need to add explicit typecasts 02:09:34 openacs-4=> 02:10:04 Why is 'general_comments_create' type unknown? 02:10:20 The function def is (int,int,varchar) 02:10:49 docwolf has joined #openacs 02:11:07 try casting 'general_comments_create'::varchar 02:11:14 upon passing 02:11:55 thanks! 02:12:37 Ok that doesn't work either. Hmmmm 02:12:37 Thank me when you get it working :) 02:12:41 See? 02:12:52 Rightm but that means the function doesn;t exist. 02:13:07 I wonder why. That one HAS to be there I got it all installed. 02:13:12 does acs__magic_object_id('the_public') return an int? 02:13:50 yes. I tried -1 also in place of that for fun. 02:15:00 Aha mine is truncated to acs__permision_grant_permissi 02:15:11 openacs-4=# select proname, pronargs, proargtypes from pg_proc where proname like 'acs_permission%'; 02:15:11 proname | pronargs | proargtypes 02:15:11 ---------------------------------+----------+------------- 02:15:11 acs_permission__grant_permissio | 3 | 23 23 1043 02:15:11 acs_permission__permission_p | 3 | 23 23 1043 02:15:11 acs_permission__revoke_permissi | 3 | 23 23 1043 02:15:13 acs_permissions_lock_tr | 0 | 02:15:21 the function is acs__permission__grant_permissio 02:15:35 Doesn't matter. PG will truncate for you when you call it. 02:15:59 yeah but its truncating it differently than the function name. 02:16:08 No it isn't 02:16:14 hmmmm 02:16:33 argh! I spelled it wrong like 20 times. 02:16:39 thnaks! 02:16:46 did it work? 02:17:24 yes. 02:17:41 but it doesn;t work in my pl/pgsql function. 02:26:11 anyone knows how to use ON DELETE CASCADE? 02:26:35 sorry, no. 02:32:30 docwolf has quit 02:57:57 anything wrong with this? 02:58:01 -- Copy permissions from the parent: 02:58:01 for v_permission_row in 02:58:01 select grantee_id,privilege from acs_permissions 02:58:01 where object_id = p_parent_id 02:58:01 loop 02:58:01 perform acs_permission__grant_permission( 02:58:03 v_folder_id, -- object_id 02:58:06 v_permission_row.grantee_id, -- grantee_id 02:58:08 v_permission_row.privilege -- privilege 02:58:10 ); 02:58:12 end loop; 02:58:14 oops 03:00:47 Is v_permission_row declared as a RECORD? 03:02:24 its defined as acs_permissionsOWTYPE 03:02:35 hey my  disapperad 03:02:38 argh! 03:02:43 % 03:02:58 well the % and R fell off rowtype 03:24:20 rbm: practical postgresql has a pretty good chapter on pl/pgsql. 03:24:57 well time for me to go 03:25:00 davb has quit 04:03:55 hazmat has joined #openacs 04:33:26 hazmat has quit 05:32:34 hazmat has joined #openacs 05:48:16 ns_soap in is cvs at sf nssoap.sf.net 05:48:28 s/in is / is in 06:26:55 rafa has left #openacs 08:17:33 jerryasher has joined #openacs 08:17:39 jerryasher has quit 08:43:46 jerryasher has joined #openacs 08:44:34 Where's the place to swap aD rumors? 08:57:40 Or are they so yesterday's news that no one cares anymore? 09:15:45 jerryasher has quit 09:45:35 rzolf has joined #openacs 10:28:44 rzolf has quit 10:36:39 ola has joined #openacs 10:54:25 ola has quit 11:03:28 ola has joined #openacs 11:32:18 ola has quit 12:16:04 Spork has quit 13:09:24 davb has joined #openacs 13:31:38 markd2 has joined #openacs 13:37:40 markd2 has quit 13:40:09 markd2 has joined #openacs 14:13:10 vinod has joined #openacs 14:13:18 Hi vinod, markd2 14:13:25 happy birthday markd2 !!!!!!!!!!! 14:13:31 hey dave! 14:22:53 :-) 14:23:15 I'm still 6 years younger than my main social group up here 14:23:18 but I'm catching up! 14:24:09 heh 14:26:02 that's my trick, too - age is relative, so always hang out with old people :-) 14:27:16 that's why you like hanging around with me, right? 14:27:54 hey.... no... not at all... you're older than me?? I had *no* idea 14:28:00 * vinod has innocent look on face 14:28:36 :-) 14:29:56 vinod: what do you use for a FOR IN LOOP in pl/pgsql ROWTYPE or RECORD? I always have a problem when I use ROWTYPE. 14:30:16 heh 14:30:20 PERFORMER 14:30:57 davb: use ROWTYPE if the row that you're getting is exactly like the row in the db, otherwise use RECORD 14:31:16 * vinod can't think of a way to use PERFORM here 14:31:32 What do you mean by EXACTLY. Does it have to contain all the same columns? 14:31:38 yep, i think so 14:31:47 OK, so if a couple a missing, use RECORD? 14:32:09 yep 14:32:32 OK. I don't think PL/SQL works like that. 14:33:07 no, i think you're right. i remember banging my head against that a while back 14:33:28 ola has joined #openacs 14:33:33 vinod is correct (of course) 14:33:57 hi all! 14:34:10 Right, but I think it works in Oracle with ROWTYPE. All the original code uses that. Does oracle have RECORD? 14:34:17 hey ola! 14:34:35 hi ola 14:34:51 That should be in the Postgresql docs somewhere. 14:36:18 YEAH! I got a different error message. 14:36:41 b 14:38:33 c 14:38:45 c++ 14:39:37 * markd2 loves C and C++ 14:39:50 they make me feel more manly when I get something working 14:40:08 Real men program in assembly 14:40:25 real men cat > app-name and enter the bytes 14:40:44 hehe 14:41:02 now thats fun. 14:41:05 markd2 should start an internet-university teaching real-man tricks 14:41:14 He-Man tricks 14:41:17 i'd enroll 14:41:20 :-) 14:41:23 * markd2 shouts "by the power of Numbskull!" 14:41:30 Masters of the Universe! 14:41:51 did you ever watch Thundercats? 14:42:08 Ok. How do you guys roll your server error logs? 14:42:14 i think by accident - i was a He-Man fan 14:42:20 ah 14:42:23 I found some outtakes 14:42:25 http://www.claws-and-paws.com/thundercats/index.shtml#outtakes 14:42:29 davb: i use logrotate 14:43:11 seriously, how do I add code to the openacs.org tree? 14:43:15 yeah its a debian package 14:43:31 cvs add , cvs commit 14:43:48 I checked out acs-core as "olah", now what? 14:44:19 markd2: these outtakes are great 14:44:36 shall I log in to their server? 14:44:40 Nope. 14:45:03 Well, actually depends on how your CVS is setup. My CVS environment is setup to use OpenACS.org as the server 14:45:05 etc... 14:45:12 So I don't have to login. 14:45:25 ok. I copied my package to /packages 14:45:29 when you do add or commit it should ask for your password. 14:45:37 davb: mine is too 14:45:42 ok 14:45:59 ola: you'll have to check out the mp3 package from openacs first 14:46:12 vinod: I did that. 14:46:16 right, then replace it with your new files. 14:46:19 oh, ok 14:46:45 ola: did someone create the package under the new name? 14:46:45 Spork has joined #openacs 14:46:50 vinod: NO I didn't, sorry.. 14:46:53 in the CVS tree? 14:46:55 Hey all 14:47:02 hey Spork 14:47:06 heh Spork 14:47:16 s/heh/hey 14:47:24 Hola ola, privet vinod 14:47:26 hey logrotate is already installed. 14:47:30 hi spork 14:47:33 * Spork needs some greeting that rhymes with vinod 14:47:36 hey dave 14:48:01 davb: isn't debian great? 14:48:04 GEM has joined #openacs 14:48:13 Hi GEM! 14:48:13 GEM! 14:48:13 spork: just call him; Mr PERFORM. 14:48:18 hola 14:48:39 Hey davb and vinod! How's life? 14:49:25 * Spork sporks GEM for not saying hi to spork 14:49:27 Just finishing up static-pages. 14:49:57 Hiya Psychephylax 14:50:06 Hey mark 14:50:21 * Spork sticks a "Hello $1!" on his forehead 14:50:26 davb: when I've replaced it with the new files, should I remove the CVS dirs? 14:50:31 sorry, Spork! Hi to you, too! 14:50:43 hi chump! long time no see! 14:50:49 * Spork points to the sign on his head 14:51:17 GEM: life is good. how bout with you? 14:51:17 Label GEM not found. 14:51:18 no. just do a cvs add for any new files (XQL etc...) and then cvs commit 14:51:27 it will update the tree. 14:51:51 if your other directory has a CVS directory in it, don't copy that over. 14:52:27 Not too bad, thanks, Vinod. my mortgage has been sold again. I forget if I've talked in this channel since I got married, though...that is good stuff 14:52:27 davb: ok. thanks. I'll try. 14:52:54 congrats GEM! 14:55:27 I must leave. see y'all later 14:55:34 ola has quit 14:55:58 yes we are. it's just a very long driveway 14:57:37 anyone use VNC here? 15:02:16 nope 15:07:11 talli has joined #openacs 15:07:20 Hi talli 15:07:29 hey guys 15:08:11 is markd here? 15:08:38 he was 15:08:46 yep! 15:08:53 * Spork pokes markd with his extra pointy 'ork 15:08:54 * markd2 is lurking 15:08:59 or a lurking horror. not sure which 15:09:18 i'm here too, talli 15:10:59 watch out for the library. I didn't think it was snowing that hard yet 15:15:50 vinod, did i ask for you? 15:15:55 go back to your sewing 15:16:06 that little sew-and-sew 15:16:24 markd, this is a very dangerous question, but... 15:16:48 how hard would it be to port the OpenACS to sybase given the query dispatcher? how different is it from oracle and PG? 15:16:51 * markd2 hears the scary music in the background 15:17:05 hmmm 15:17:11 I won't be easy I bet 15:17:21 oracle and sybase have pretty radically different concepts over locks and transactions 15:18:02 ok. 15:18:04 * vinod goes back to his sewing 15:18:11 is that a showstopper? 15:18:46 it'll mean some work and some tuning 15:18:59 ok, thanks 15:19:00 go to a book store, find Thomas Kyte's "Oracle one-on-one" book by Wrox press 15:19:02 another q... 15:19:09 read the chapter that talks about transactions 15:19:14 it compares oracle and sybase 15:19:20 ok, cool. thanks 15:19:29 do you know if AOLserver runs on AIX? 15:19:39 AOL never did a port 15:19:48 there ma ybe someone out thre that's done it 15:19:56 get the source and look for AIX 15:20:04 ok 15:20:04 if there aren't any, then nobody ported and submitted the diffs 15:20:13 would it be hard? 15:20:50 i'm talking to a guy who apparently has an NT and AIX setup 15:21:18 the ideal situation is probably get some little server running Linux, AOLserver and the OPenACS code that connects to AIX 15:21:49 but i would like to advise him one way or the other 15:23:10 maybe i'll just tell him to use ACS Java which will solve all of his problems 15:23:16 that runs anywhere! 15:23:47 I'd a imagine an AIX port would be hard 15:24:01 ok, cool 15:24:01 thanks 15:54:12 argh, the referential integrity weirdness in postgresql gets me again. 16:12:34 how can I get EMACS to re-read the error log? 16:13:24 without closing and ropening a buffer. 16:26:05 ola has joined #openacs 16:27:47 you can re-open it 16:27:50 and M-x revert-file 16:27:52 I open a shell in emacs and do a tail -f 16:27:52 no need to re-load it :-) 16:28:01 vinod has quit 16:28:04 talli has quit 16:28:04 rbm has quit 16:28:04 Spork has quit 16:29:46 thanks markd2 16:31:39 oops. if you drop/create a function thats called by other functions you have to drop/create them all in postgresql 16:31:54 bummer 16:32:17 when it creates the function it references the OID of the other functions in there. 16:32:46 it just gets tricky when you do it 3 or 4 levels deep. 16:32:57 thats why I end up dropdb/createdb alot. 16:35:05 it's sometimes enough to do /i "path-to-drop-script" in psql 16:35:45 my drop script is broken. I have to fix it. Has to do with dropping columns 16:39:49 markd2 has quit 16:40:24 ack. my content_item__new hacked function need to be rehacked. 16:51:28 rbm has joined #openacs 16:51:28 Spork has joined #openacs 16:57:46 davb: if it makes you feel better create or replace function (retaining oid) is coming 16:58:35 COOL! 17:24:06 * rbm moos 17:24:14 mooo 17:27:36 doh! I think I'll just stop breathing...: 17:27:39 **** Access denied: Insufficient Karma (olah|openacs-4/packages/mp3jukebox) 17:27:40 cvs server: Pre-commit check failed 17:30:12 what does puts do again? 17:30:18 arg 17:30:21 * Spork pauses 17:31:37 never mind 17:31:46 I have my big book of TCL/TK goodies with me today 17:32:09 I do want to know how to append to something 17:35:01 tcl is such an easy language, easy to forget that is:) 17:35:30 lol 17:37:46 it also doesn't like my formatting 17:37:52 * Spork curses out the white spaces 17:38:32 how would I group something so it expands but doesn't care about whitespaces? 17:40:56 read Tcl for web nerds. 17:41:09 Again. It explains pretty well how to get the brackets in the right place. 17:42:18 ola that's not your fault. 17:42:21 Email DonB 17:42:32 He is the Karma distributor. 17:42:47 heh 17:42:48 Spork append is append. 17:42:57 lappend adds another item to a list. 17:43:06 append varname "stuff" 17:45:10 davb: mp3jukebox has been renamed mp3-jukebox, so DonB told me I only have commit rights on that. 17:45:43 aha. 17:46:48 but when I do: "cvs co mp3-jukebox" I'm getting this: 17:46:56 cvs server: cannot find module `mp3-jukebox' - ignored 17:46:58 cvs [checkout aborted]: cannot expand modules 17:47:03 heh 17:47:05 what fun. 17:47:07 but... 17:47:15 ola: I can check the server for you, hang on, let me ssh in there 17:47:33 rbm: great! 17:47:37 its not in the SDM repository. 17:47:42 yeah, rbm is handy to have around. 17:47:51 :) 17:48:09 I still see it as mp3jukebox 17:48:24 when I do: cvs add mp3-jukebox it gives me this: 17:48:26 cvs [add aborted]: there is a version in mp3-jukebox already 17:48:45 Hmmm. Who renamed this to mp3-jukebox? 17:49:48 DonB told me I only have commit rights on mp3-jukebox so I'd have to rename... 17:50:17 Yeah, I see you only have rights to mp3-jukebox, but there's no mp3-jukebox dir created. 17:50:24 I think you have to create it. 17:50:42 create a mp3-jukebox dir, than copy all the files you have in, and commit them. 17:51:05 I could do it for you, but then it'd take the fun out of your hands :) 17:52:16 I did, cd /web/openacs4/packages followed by "cvs add mp3-jukebox", with that directory existing!! 17:52:31 didn't work... 17:53:55 I *was* able to "cvs add" other files under mp3jukebox, though. 17:53:56 hmm 17:54:08 Why was it renamed anyways? 17:54:21 but then I did a check-out first 17:54:26 all-the-names-are-going-to-be-the-same-format 17:54:32 Oh, I see 17:54:36 :) 17:54:42 :-) 17:54:42 Let me add this darn thing 17:55:14 sure. may be the best thing to do... 17:57:03 rbm: you will only add an empty dir, right? 17:57:48 yeah 18:02:47 ola, try now 18:03:00 I have to eat now. brb 18:03:16 rbm: thank you! 18:05:56 markd2 has joined #openacs 18:14:02 rbm: insufficient Karma again. 18:18:26 I am getting a Cannot pass more than 16 arguments to a function error. No mention of where this function call is though... 18:23:01 jerryasher has joined #openacs 18:23:16 hi jerry 18:23:23 Hi Dave! 18:23:40 I heard a rumor that aD was closing down various offices. Anyone know more about this? 18:23:49 (Anyone care about aD anymore?) 18:27:53 hi jerry. 18:28:05 daveb: do you have verbose on? 18:28:12 I suspect so. 18:28:15 * davb checks 18:29:10 yeah, they are all on. I think its in a function, but the function. It shows the SQL for calling the function which is NOT over 16 18:29:12 brb 18:29:24 abbaJ has joined #openacs 18:29:32 davb has quit 18:31:57 jerry: of course we care about aD, just not their license. 18:33:04 Ah, well it's just not clear anymore that anyone would care about aD. 18:33:18 Aside from gossip that is, they appear increasingly irrelevant. 18:33:24 * markd2 doesn't care 18:35:03 if you do return without any arguments it doesn't do anything right? 18:35:33 it just halts. 18:35:54 hmm 18:35:58 ok 18:36:01 I don't get this then 18:36:10 ok 18:36:29 in Tcl? return returns an empty string from the proc 18:36:30 I need to retrieve an error 18:36:51 in scotty tcl there's a %E that has the error 18:37:09 I e-mailed Vlad (the person who wrote the nssnmp module) and he said he catches them directly 18:37:27 He sent me a sniplet of code (as if he thinks I know exactly what it does): 18:37:36 Usually i catch errors directly: 18:37:36 if [catch { 18:37:36 ns_snmp walk $fd [ns_mib oid ifTable] var { 18:37:36 set oid [lindex $var 0] 18:37:36 ... 18:37:37 } 18:37:39 } errmsg] { 18:37:41 ns_log Error SNMP: $errmsg 18:37:43 return -1 18:37:45 } 18:37:57 it looks like his program exits with a -1 code 18:38:04 I need mine to keep running 18:38:22 so I did errmsg] { 18:38:23 } 18:38:27 * rbm returns 18:38:36 but it's returning the session id 18:38:56 ola: insufficient karma? 18:39:19 please insert 25 dogma to continue 18:39:21 ola: are you sure it's a copy of CVS checked out via SSH and your olah user? 18:39:21 rbm: yessir. 18:40:39 yes to both questions? 18:41:13 rbm: I think so. I have: export CVS_RSH=ssh andexport CVSROOT=olah@openacs.org:/cvsroot 18:41:57 rbm: do I need :ext:olah@openacs.org:/cvsroot 18:42:03 ? 18:43:12 no. But did you checkout that way? Some people were trying to commit stuff on their anonimously-checked out cvs copies 18:44:00 oh, wait! maybe I need to check-out the empty "mp3-jukebox" ? 18:44:31 Well, you need to update your cvs 18:44:38 cvs update -PAd is what I do. 18:45:24 ok. lemme try... 18:51:37 davb has joined #openacs 18:53:24 rbm: I'm in /web/openacs4/packages when I issue: "cvs commit". after I add a message the commit is rejected. 18:54:46 try from inside mp3-jukebox 18:54:50 have you updated? 18:55:06 yes 18:55:26 ola: Could you 'cvs add' the files okay? 18:55:34 sure. 18:56:37 davb: I tried that too 18:58:28 You can add, but not commit??!?! 18:58:30 That is weird 18:58:43 ok. here's what I did now: 18:58:45 [ola@infogettable packages]$ cvs co mp3-jukebox 18:58:45 olah@openacs.org's password: 18:58:45 cvs server: cannot find module `mp3-jukebox' - ignored 18:58:45 cvs [checkout aborted]: cannot expand modules 18:58:49 [GlobalNotice] Services are down. They'll be up in a moment. Usual splitting, sorry. 18:59:13 no, no, no 18:59:30 :-) 18:59:32 You don't have to checkout the new module. 18:59:43 The "module" is just a directory inside openacs-4. 18:59:48 openacs-4 is the cvs module. 19:00:26 davb has quit 19:00:26 hazmat has quit 19:00:26 ola has quit 19:00:46 ola has joined #openacs 19:00:46 hazmat has joined #openacs 19:00:46 davb has joined #openacs 19:00:51 I could commit just fine. I think you're doing something wrong with your cvs commands. 19:02:04 ok. roberto, did you commit "my" dir or just "cvs add" it? 19:02:04 ola: you still there? 19:02:48 I just added and committed, (and just removed) a file inside mp3-jukebox. So the dir is fine. 19:03:09 ok 19:03:17 hmm 19:03:39 did the mp3-jukebox dir appeared under your packages dir when you updated it? 19:03:45 does it have a CVS dir under it? 19:03:52 s/appeared/appear/ 19:04:12 lemme check 19:07:33 yes! there's a file, foo in there :-) 19:08:04 and a CVS dir! 19:08:23 and your files are in there? 19:08:59 and there's a pot of gold too! 19:08:59 no, I renamed the old dir first 19:09:05 heh 19:09:18 then put your files in there (new one) and cvs add them 19:10:10 markd2: if there were a pot of gold in there I'd give it all to Roberto :-) 19:10:33 vinod has joined #openacs 19:10:40 hi vinod! 19:10:50 Vinodinator 19:11:19 * rbm is forced to learn oriental patience as he installed Win2K in a P133 19:11:39 ola: the gold would be very welcome :-) 19:11:54 ola (and anyone): I take e-Gold and PayPal :) 19:12:01 hey ola! 19:12:11 hey all - makin copies... 19:13:21 of what? 19:14:14 uhhh... nothin... just responding to markd2's comment (Saturday Night Live Reference) 19:15:24 haha. like shagster? 19:15:51 the shagster. shagorama 19:16:04 I remenber that show. Rob Schneider or what was his name? 19:16:31 yeah, that's it - wow, i didn't know that SNL had polluted other continents as well 19:17:03 I Loved Dieters dance party! 19:17:42 haha - Mike Myers is hilarious 19:17:49 Tonight on Sprockts, we Dahnse 19:17:56 hahaha 19:20:29 hey markd2 - what happens in 45 days? 19:21:14 no more job 19:21:33 nobody can see the countdown I have on the whiteboard here 19:21:46 like I had in my office at AOL 19:22:11 cool - shackles come off in 45 days! 19:22:16 yep 19:22:33 and I'll be haaaapy when that happens 19:22:39 markd2 unleashed! 19:23:07 markd2 for unleashed dummies in 24 hours! 19:23:47 can i get an autographed copy? 19:23:54 (if there is more than one copy, that is) 19:23:57 heh 19:24:01 I'll get the clone bank right on it 19:36:37 whats wrong with this? 19:36:38 32 v_folder_id := content_item__new( 19:36:38 33 new__folder_id, 19:36:38 34 new__name, 19:36:38 35 new__parent_id, 19:36:38 36 null, 19:36:40 37 new__creation_date, 19:36:42 38 new__creation_user, 19:36:44 39 new__context_id, 19:36:46 40 new__creation_ip, 19:36:48 41 'f', 19:36:50 42 'text/plain', 19:36:52 43 null, 19:36:54 44 'text', 19:36:56 45 new__security_inherit_p, 19:36:58 46 'CR_FILES', 19:37:00 47 'content_folder', 19:37:02 48 'content_folder'); 19:37:04 postgresql says it has more than 16 params 19:38:31 of by one in PG? 19:38:34 er, off? 19:40:07 I think I am losing my mind. 19:42:09 if you make a simple dummy function and give it 16 parameters, can you call it? 19:43:14 I think so. There are quite a few functions in the content-repository that have 16. 19:45:41 is this a new version of content_item that you're creating? 19:46:44 Well I am just customizing the one I already created for security_inherit_p. 19:47:01 Mine has 14, I added item_type and item_subtype 19:47:09 s/has/had 19:47:11 not its 16 19:47:24 s/not/now 19:47:42 anyway creating a function that takes 16 parameters and calling it works. 19:47:47 So I screwed up somewhere. 19:48:20 weird, weird stuff - what is the exact error msg that pg spits out? 19:49:19 [17/Oct/2001:15:58:01][943.38917][-conn11-] Notice: Querying ' 19:49:19 select static_page__get_root_folder('2457');' 19:49:19 [17/Oct/2001:15:58:01][943.38917][-conn11-] Error: Ns_PgExec: result status: 7 \ 19:49:19 message: ERROR: Cannot pass more than 16 arguments to a function 19:49:52 That calls static_page__folder_new which calls content_folder__new which calls content_item__new 19:50:00 which calls acs_object__new 19:51:38 tcl supports threads? 19:52:12 in AOLserver 19:52:17 oy 19:52:29 I know nothing about threads 19:54:30 the tcl in aolserver is thread-safe 19:54:40 and there's an API for making your own threads as wel 19:54:48 well, Vlad replied 19:54:55 davb: and the function you posted above is from content_folder__new, right? 19:54:58 He said to use threads 19:55:11 vinod, yes. 19:55:17 ns_snmp doesn't support async request, if you need multiple reqiuests to be sent 19:55:18 you can use threads like i do in our monitoring package. 19:55:18 set threads [list] 19:55:18 foreach host $hosts { 19:55:18 lappend threads [ns_thread begin "nms::poll::group $host"] 19:55:18 } 19:55:34 I have no clue about nms::poll...bit 19:56:12 that is just a call to a procedure you don;t have. substitute whatever proc you want to call. 19:56:42 I wouldn't have this sort of problem with MySQL! :) 19:57:00 davb: this is just a stab in the dark, but do you need to double quote your literals ('')? 19:57:15 They are, psql takes em out. 19:57:23 got it 19:58:33 dave, you talkin' to me about a procedure call? 19:58:39 I can't prove that function is the culprit though, because postgresql doesn't tell me which function is causing the problem. 19:58:43 spork, yeah 20:01:42 well, I finally comitted "mp3-jukebox". wow. 20:01:46 davb: yeah, that's annoying - i guess i'd start putting RAISE NOTICE's all over the place to try to pin down where it's failing 20:01:58 ola: congrats! 20:02:00 vinod: thanks! 20:02:10 vinod: thanks. 20:02:11 woo hoo! 20:02:14 heh 20:02:14 vinod: now I remember that was my plan before we had to logoff 20:02:26 now comes 'the testing' 20:02:49 haha - see you're not losing your mind, you just misplaced it when you logged off ;-) 20:03:47 so. on to webmail...:-) 20:03:58 just kidding. 20:04:21 rbm: we all heard him volunteer 20:04:26 i heard it 20:04:34 nooo! 20:05:28 davb: the other thing i might try is running that select sp_get_root_folder call(9457) directly in psql and see what happens... (maybe in a transaction, so you can roll it back if need be) 20:05:56 aha. 20:06:28 heh, it works 20:06:44 Must be something else. weird. 20:07:13 jerryasher has quit 20:08:18 static_page__get_root_folder 20:08:18 ------------------------------ 20:08:18 2458 20:08:18 (1 row) 20:08:51 OK, weird. 20:08:55 Now it works fine. 20:09:03 from the web page also. 20:09:25 and the folder part works too, which was the original brokenness. 20:09:33 good job :-) 20:09:43 yeah, but I don't know what I fixed. 20:09:57 or know if its in the .sql files so I can reload it. 20:11:45 ok 20:13:30 * AaronSw heads off 20:14:57 * AaronSw returns 20:15:20 wb AaronSw - how was your time away? 20:16:21 [GlobalSpam] We're going to try and restart services. There'll be a few splits... nothing to worry about 20:16:27 Pretty good thanks... had to reboot my TiVo 20:16:33 oops. 20:16:37 Ahh, now it's back online again 20:16:38 I broke the CR 20:16:54 TiVo! - lucky dog :-) 20:17:00 davb: where? 20:17:16 Yeah, I just installed the Ethernet card and webserver, so I'm having fun 20:17:36 probably content-folder or content-item.sql 20:17:49 davb: in CVS? or locally 20:17:50 It just says Acs-content-repository not installed Error: 20:17:54 just mine. 20:18:53 davb: yeah, the installer doesn't transmit errors well. you'll have to go into psql, run the drop script and then run the create script for a better error description 20:19:29 AaronSw: you're running a webserver on your Tivo? 20:19:32 Yep. 20:19:40 publically accessible? 20:20:00 so we can see what AaronSw is watching right now? :-) 20:20:04 Well, now it is since my little brother wants to access it from school. 20:20:11 But I'm worried about giving the address out. 20:20:14 anyone got a good AOLServer threads primer/reference? 20:20:35 I'll be attacked by a mass deluge of Buffy-watchers and it'll crash. 20:21:14 AaronSw: haha. i'm totally jealous now, seeing as i have 5 channels (6 if you include the security cam channel) 20:21:33 Haha. I heard that MIT's TV station was run off a tivo 20:21:41 lol 20:23:36 hazmat has quit 20:23:36 ola has quit 20:23:36 davb has quit 20:23:58 ola has joined #openacs 20:23:58 hazmat has joined #openacs 20:23:58 davb has joined #openacs 20:23:59 my call room at MIT has a TV that gets FOX and then about 20 annoying public access stations in various languages (fortunately, i'm usually too busy to watch it) 20:25:04 anyone got a good AOLServer threads primer/reference? 20:25:08 Is there a fast way to stick -- in front of a selection in emacs? 20:25:49 Spork: not sure if this is any help: http://aolserver.com/plweb-cgi/fastweb?state_id=1003350385&view=aolserver_docs_view&numhitsfound=164&query=thread&&docid=501&docdb=aolserver_tcldev_db&dbname=aolserver_admin_db&dbname=aolserver_tcl83_db&dbname=aolserver_tcl76_db&dbname=aolserver_cdev_db&dbname=aolserver_tcldev_db&dbname=aolserver_misc_db&operator=OR&TemplateName=predoc.tmpl&setCookie=1 20:26:00 or http://aolserver.com/docs/tcldev/tapi-139.htm#82563 20:26:07 yeah, or that :-) 20:26:24 Its easier to do www.aolserver.com/docs than to serach 20:26:28 you get nice URLs 20:26:47 i saw that 20:27:24 I gotta figure out how to use it 20:28:15 what should I look up in the index for :: 20:28:26 that is a namespace. 20:28:37 I suspect you don't need that. 20:29:17 ok, this is what I need to do: 20:29:17 davb: go to the beginning of the section that you want to comment. do M-x query-replace-regexp^--yyyyy (hit q when you want to stop commenting) 20:29:37 cool 20:29:40 in tcl of course 20:29:52 i have a mac address of a cable modem 20:30:07 I have about 400 routers 20:30:32 I need to send a request to each router asking it if it has that mac address of the cable modem 20:30:52 now, 399 of those routers (technically - there can be a special case) 20:31:10 will return "I don't have that modem" and 1 of them will say "Yep, got one here" 20:31:28 ouch 20:31:38 now, ns_snmp does not have async way of polling them all 20:31:48 which is what this script I'm porting does 20:31:59 vinod: can I do that in reverse? 20:32:04 so, Vlad suggested I use threads 20:32:22 but I have never done thread programming 20:32:36 aha. 20:32:56 I don't think you want to create 400 threads. 20:33:00 so those 30 lines of the API for ns_thread does nothing 20:33:10 You need a proc that does them a few at a time, when one returns reuse it. 20:33:11 Why is that? 20:33:36 davb: hmmm... don't think that there is a query-replace-regexp-backwards 20:33:38 well, in any case, what I want in the end is a list of routers that have the modem 20:33:43 heh 20:33:46 Right. 20:33:59 davb: oh, do you mean removing the comments? 20:34:02 because a technicians modem can change routers often 20:34:15 ok 20:34:41 Any insight on how to do this threads business? 20:35:33 ns thread { wahatever proc you need to run} 20:35:44 then you have to do ns thread wait somewhere to get the results 20:36:05 hmmm 20:36:31 or soemthing like that. 20:36:41 anyway good luck. Time for me to go. 20:36:44 davb has quit 20:38:25 * Spork attempts to write his first tcl proc 20:42:15 how bad is a thread 20:47:14 * AaronSw heads off 20:47:29 * Spork heads on 20:47:30 :) 20:50:11 * AaronSw returns 20:51:02 * Spork backspaces 20:51:46 Heh. 20:53:36 arg 20:53:48 I'm not smart enough to backwards engineer 20:55:09 jerryasher has joined #openacs 20:55:44 ok 20:55:52 can someone tell me what this does: 20:55:54 { 20:55:54 global cmts_ip 20:55:54 if {"%E" == "noError"} { 20:55:54 set cmts_ip %A 20:55:54 } 20:55:54 %S destroy 20:56:06 } 20:56:19 is global cmts_ip a global variable declaration? 20:57:15 vinod has quit 21:06:16 markd2 has quit 21:06:59 Hey spork, where is that snippet from? 21:07:29 Yes, global cmts_ip is a global variable declaration, but I have no idea what the %S destroy 21:07:40 is supposed to do. Is this tcl? tk? perl? 21:08:09 ummm 21:08:09 hehe 21:08:22 $S destroy kills an SNMP session 21:08:29 it's from scotty 21:09:03 So is this within a page, or within a tcl proc? 21:10:15 it's within a tcl page 21:10:23 it's a tcl script 21:11:07 I don't know what surrounds this block, but if this block is executed, than 21:11:44 well 21:11:45 If and only if, %E is noError, than the global variable cmts_ip is set in the tcl interp for that page, 21:12:01 and no matter what the snmp session is killed. 21:12:01 yeah 21:12:07 moo moo 21:12:11 oom oom 21:12:22 you keep saying moo moo? What does that mean? 21:12:37 It's what he likes to wear when nobody is around :) 21:12:46 what's up? 21:13:12 I tried doing what that sniplet does like this: 21:13:14 proc ubr_poll {ubr_ip modem_dec} { 21:13:14 set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3] 21:13:14 Anyway, any filters or other pieces of code on that page can access the cmts_ip variable. 21:13:14 global cmts_ip 21:13:14 if [catch { 21:13:15 jerryasher: 'moo' is is how one announces himself in undernet :) 21:13:16 ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec] 21:13:18 } errmsg] { 21:13:20 } 21:13:22 if $errmsg = "" 21:13:24 set cmts_ip [ns_snmp config $session -address] 21:13:46 }/me points out to Roberto that "bleeeeaat" is the new way 21:14:28 Interesting. In the 60s I grew up a block away from an undernet then. 21:14:35 Jerry, this is what my problem is (aside from not knowing threads) 21:14:48 We have 267 routers 21:14:49 They had great tours and free chocolate milk. (But lots of flies.) 21:15:05 I have to find out on which one of those the modem resides on 21:15:19 It can't be a serial process because it would take too long 21:15:26 I was recommended threads 21:16:06 So I'm trying to write a procedure that will check a ubr (router) for the modem and store the ubr ip address if it finds it 21:16:18 otherwise I just want to kill the thread and move on 21:16:47 how the heck can you hear sounds in space? 21:16:52 this film, 2010 totally sucks compared to 2001! 21:17:11 hey ola 21:17:20 hey 21:18:00 ola: inside a space station, with air circulating :) 21:18:40 well I don't know enough of what you are trying to do, but yes, the proc will set the global var cmts_ip to *something* 21:19:10 rbm: the commit went successfully! 21:20:12 (thanks to you!) 21:20:33 yes but will it do it only when errmsg is empty? 21:21:09 I don't think so. I assumed your typing was slightly inaccurate, but the if $errmsg ... looked wrong. 21:21:35 Safely, it should be more like if {$errmsg == ""} { set cmts_ip ... } 21:21:46 hmm 21:22:18 ok 21:22:23 what about the one above that 21:22:37 I'm not very familiar with the catch methodology 21:22:59 Anyway, just to follow up, that undernet was in the middle of the San Fernando Valley, about 1 mile from 21:23:06 where the Saturn V Rockets were made. 21:23:27 The catch doesn't look as though it has enough [s. Maybe it has one too many ]. 21:23:48 ola: good! 21:24:00 yeah it did have one too many ] 21:24:09 I hate the Tcl catch. 21:24:18 It's not very catchy :) 21:24:24 There were bleeeaats too. They were at an ag college about 1/2 mile away. 21:24:42 I hate Tcl. The catch isn't bad. But the whole think reeks of LISP wannabe. 21:24:59 lol 21:25:18 well, here's my new and improved proc: 21:25:29 (now with 50% more comments) 21:25:31 proc ubr_poll {ubr_ip modem_dec} { 21:25:31 set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3] 21:25:31 global cmts_ip 21:25:32 if [catch { [ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec] } errmsg] { 21:25:34 #do nothing 21:25:40 if {$errmsg = ""} { 21:25:44 } 21:26:03 eeep 21:26:09 lol 21:26:14 it stole a } 21:26:22 * Spork yells at his irc client 21:26:29 heh 21:26:44 proc ubr_poll {ubr_ip modem_dec} { 21:27:00 set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3] 21:27:06 21:27:18 global cmts_ip 21:27:26 if [catch { [ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec] } errmsg] { 21:27:38 } 21:27:40 21:27:54 if {$errmsg = ""} { 21:28:00 set cmts_ip [ns_snmp config $session -address] 21:28:05 } 21:28:20 now, I gotta figure out how to make that into a thread 21:28:30 I would think that would basically work. However... 21:28:55 Since this is a proc, you might, within the if block of the catch, which is executed 21:28:58 * Spork dislikes all "however" "but" and "also" 21:29:00 when there is an error, 21:29:14 just "return" 21:29:21 if {[catch ...]} {return} 21:29:31 then you don't need the other if. 21:29:38 instead of the #do nothing 21:29:50 Also, I think you'll have problems with global and threads. 21:30:00 how's that 21:30:02 I would recommend using nsv_sets instead. 21:30:24 it depends on you are trying to be global with. With another thread? I don't think that will work. 21:30:44 no 21:30:46 I *believe* that each thread will get it's own tcl interp. However, they may not. Also, they might. But.... 21:30:47 not thread 21:31:10 I need to find out which ubr replied to the "let's find modem" thing 21:31:21 and store its ip addr 21:31:32 "Who" needs to find out? Which thread are they in? 21:31:50 I think if I don't declare the global the var will be gone after the thread is destroyed 21:31:53 Anyway, I often find that nsv_sets work as well as global and are much more thread friendly. 21:32:13 Who is the script execution later on 21:32:16 Yes, but after the thread is destroyed I would bet the global is gone too. 21:32:23 ah 21:32:28 so you recommend nsv_sets 21:32:59 yeah. I have an old sample of using nsv_sets for threads laying around here somewhere. hold on 21:33:03 I'll see if I can find it. 21:33:17 cool 21:34:11 you seem to know threads...how big of an impact is this: Opening about 300~400 threads at once 21:35:00 I don't know about that, but it would seem to be INCREDIBLY HORRIBLY BAD. But I might be mistaken. 21:35:20 well 21:35:36 As an alternative, that I haven't looked into, you might try nsd's conds or events. 21:35:53 well 21:35:57 the script I am porting 21:35:59 Or writing a C module that can use select() or poll() or other signals to do what you want. 21:36:06 takes about 3-5 seconds to execute 21:36:25 3-5 seconds for 400 ubrs? 21:36:32 267 21:36:38 287 rather 21:36:42 that's with threads or linear scan or? 21:36:49 because it's using asynchronous communications 21:37:01 it fires off a query to each router 21:37:18 then waits and checks to see if the return of the query is an error or not 21:37:35 if it's not an error, it takes the ip and stores it in that cmts_ip variable 21:38:12 what I'm thinking is that a foreach ubr_in_ubrlist would actually not be firing 287 threads instantly 21:38:21 because the loop takes some time 21:38:52 So maybe it will launch 15-20 before the first one is done so it probably will only run that many threads at once 21:39:00 the thread won't take long at all 21:39:06 On linux? 21:39:12 on SunOs 21:39:41 Yeah, I dunno. I would hesitate. I think threads are smallish in general, but not that smallish. 21:39:50 Also they stick around quite a while. 21:39:55 hmmm 21:39:56 You can experiment with a simple test. 21:40:14 create the 300 threads however you want and see what happens to your machine. 21:40:17 wassat? 21:40:23 heh 21:40:24 ok 21:40:36 First I have to figure out how to make a thread :) 21:40:38 Myself, I think I might try to restructure the problem. 21:40:39 optimize it later 21:40:46 begin $script 21:40:52 I'm sorry: 21:41:00 ns_thread begin $script (if I recall) 21:41:02 ns_thread begin ubr_poll 21:41:44 I would probably create a C routine, one that maybe runs in its own thread, that does this, using async i/o 21:42:14 and a select statement or poll or what have you, that maintains an array of ubrs and what state they are in 21:42:35 and when asked (via some tcl command), returns a list of failing ubrs. So called under ubrs. 21:42:37 well, see, I don't know C 21:42:46 well 21:42:47 I do 21:42:58 but not well enough to just write a C routine thing 21:43:00 Ah, this is such a wonderful opportunity for you then! 21:43:11 oh yes, I am sure my boss will love it 21:43:32 Alternatively I can just run the tcl script we have now and parse it using regexps 21:44:20 how often do you need this information to be updated? 21:44:50 very often 21:44:58 it's a tech support tool 21:45:10 it's used to look up the info about a customer's modem 21:45:35 What if you had 5 threads, or ten threads, each assigned 50 or 30 ubrs, 21:45:46 each periodically making an snmp call to each. 21:46:03 and all threads updating some nsv array 21:46:06 with the state 21:46:07 of 21:46:10 each ubr 21:46:22 because there's about 500,000 modems 21:46:30 so the threads never exit. 21:46:35 Oh, I thought there were 300 or so. 21:46:39 no 21:46:44 there's 300 or so routers 21:46:58 but there's about 500,000/300 modems attached to each 21:47:52 this problem is the key to my script 21:48:18 being able to find out which ubr the modem is on under 10-15 seconds 21:48:49 brb...going to find out how long something takes from my boss 21:53:16 hmm 21:53:59 they use a global in the aolserver docs too 21:56:07 That's a PLS URL allright 21:56:19 good night people. 21:56:27 ola has quit 21:57:26 Well maybe the global will work. The doc does suggest there is a problem if you wish to create many threads. 21:58:21 they make 10 21:58:49 10 << 300! 21:59:18 lol 22:00:34 Well I apologize but I have to go fix my car window. It's been down and broken all summer, 22:00:52 but now it's starting to get cool and my kids are complaining about the early morning trip to school 22:01:08 Seems the wind is too cool and makes them wake up too soon. 22:01:49 (um, I'm not sure how this is accepted here on openacs irc, but I am an independent consultant, and 22:01:50 lol 22:02:01 would be happy to code up a c module to address your needs....) 22:02:15 interesting proposition 22:02:18 gotta go right now though. 22:02:21 bye. 22:02:22 wait 22:02:24 here 22:02:27 nickb@cv.net 22:02:32 got that. 22:02:33 or nblyumbe@ic.sunysb.edu 22:02:43 top - work 22:02:46 bottom - home 22:02:52 heh 22:03:03 * Spork knows not to say real address or bills start coming 22:03:05 :-D 22:03:19 i'm on almost all the time 22:04:00 bye. 22:04:03 bye bye 22:04:04 jerryasher has quit 22:04:05 :) 22:05:55 Spork is singing NSync now? 22:07:28 no 22:07:35 why would I> 22:14:50 "bye bye bye" 22:16:01 har har har 22:16:16 so you think Jerry wants money for his module? 22:16:28 * rbm shrugs 22:17:05 i'm poor lol 22:17:40 don't say that 22:18:53 I am! 22:19:03 I have like 400$ to my name 22:19:55 so? 22:20:51 so that's not exactly a multimillionare 22:23:43 Poverty is much worse than that 22:24:11 hazmat has quit 22:31:18 aha 22:31:29 it should take ~1 second per thread to run 22:40:08 go home time 22:40:12 see ya all later 22:44:11 davb has joined #OpenACS 22:44:56 davb has quit 23:32:54 jerryasher has joined #openacs 23:54:39 davb has joined #OpenACS