[04:02:26] [connected at Mon May 16 04:02:26 2005] [04:02:26] <> *** Looking up your hostname... [04:02:26] <> *** Checking ident [04:02:26] <> *** Found your hostname [04:02:57] <> *** No identd (auth) response [04:02:57] <> *** Your host is niven.freenode.net[niven.freenode.osuosl.org/6667], running version dancer-ircd-1.0.35 [04:02:57] [I have joined #peak] [04:02:57] ** niven.freenode.net set the topic to http://dirtsimple.org/2005/04/generic-functions-reloaded.html [05:30:05] ** debugger has joined us [05:31:18] morning [06:06:15] ** apoirier has joined us [06:06:16] ** erikrose has left IRC (Read error: 104 (Connection reset by peer)) [06:07:08] ** erikrose has joined us [12:14:24] ** hazmat has left IRC ("This computer has gone to sleep") [12:34:42] ** hazmat has joined us [12:40:15] ** apoirier has left IRC ("Using KVIrc 3.0.1") [13:00:50] ** sprout has joined us [14:58:04] Boy, stay away from MS SQL Server. [14:59:00] Among its many other obnoxious attributes, it provides you no way to "peak ahead" at what the next value of a sequence will be. [14:59:22] Of course, it doesn't /have/ sequences, either--just IDENTITY columns. [15:14:56] you can't insert a tuple in the database to get its id? [15:15:14] Ah, but I have to have the id /before/ I insert anything. :-) [15:15:42] you could do a nasty hack *G* [15:15:48] anyways, did you solve that? :D [15:15:50] I'm hacking around on Ulrich Eck's old SQLEntityDM code, and he assumed you could look ahead, get the id, and then insert it. [15:16:34] Well, I've already got a big ol' legacy DB (else I wouldn't be using SQL Server anyway), so I can't go back and make everything use some kind of homegrown sequences. [15:16:53] I'll probably have to fix it in the Python code. [15:17:10] I'm thinking of breaking the "fieldSpec" array (the array of columns, basically) in half: [15:17:38] one array of fields it should pull out of the DB and a second array that it should push in. [15:17:54] They'd almost always be 99% overlapping. [15:18:28] I'd do something so you wouldn't have to RepeatYourself for 99% of the columns. [15:18:34] Any better ideas, off the top of your head? [15:19:40] Pathologically, I suppose I could INSERT a tuple, get the ID, and then UPDATE everything but the ID. What a mess. [15:19:57] That's more trouble than just doing it right. [15:22:26] Maybe there's a better way to go about this... [15:23:16] erikrose: oh, sorry, but I don't known peak internals :( [15:24:07] No PEAKy knowledge necessary--just DB stuff. [15:25:18] I must say, it's nice to get a reply in here for a change. :-) [15:27:11] like you said, you have to insert a tuple to get its id, now, how columns you have to insert depends on the ones that can't have NULLs :| [15:27:55] why you need the id beforehand? [15:28:30] I /think/ only because Ulrich's code assumes it. I'm still waffling, but I think changing that assumption is the way to go. [15:30:09] you could simulate sequences with a table? *hack alert* [15:30:37] Like I said, I'd have to remake my whole DB, which I'm not interested in. [15:31:13] oh, so no escape from inserting a dummy tuple first hehe [15:31:18] This is an extreme retrofit onto a bunch of hoary VBScript and stored procedure code which doubtless make millions of undocumented assumptions. :-) [15:31:36] VB? omg! [15:31:53] Not even full VB: VB*Script*! [15:31:56] * debugger runs sprays itself with holly water [15:31:58] Run in terror. [15:32:27] Amazingly, it does play pretty nicely with Python; props to the PyWin32 team and maybe even MS's Windows Scripting Host. [15:32:42] Otherwise I'd still be stuck in VBScript. [15:33:00] you could use javascript *G* [15:33:08] I wonder if I'm the first to use PEAK in an ASP context. ;-) [15:33:37] I've been that route; class-based OOP is a lot of work in JS, and I don't [yet?] grok prototype-based OOP. [15:34:45] yeah, just go asp.net ;) [15:35:27] its seems python will play a nice game in future avalon thing. it will be used as a script lang for the gui. [15:37:50] IronPython looks yummy, though I'm not normally an MS person. [15:38:10] CPython's runtime is surprisingly decrepit, actually. [15:38:17] The CLR blows it away, performance-wise. [16:07:28] lets see if the mono guys can match it :) [16:08:04] I'm watching Parrot, too. [16:58:56] Good night! [16:58:57] ** erikrose has left IRC () [17:54:15] anyone here familiar with p.running.process and processtemplate? [20:15:57] ** hazmat_ has joined us [20:24:35] ** hazmat has left IRC (Read error: 110 (Connection timed out)) [21:29:51] ** sprout has left IRC ("Snak 5.0 IRC For Mac - http://www.snak.com") [21:43:38] ** hazmat_ has left IRC ("This computer has gone to sleep") [21:50:34] ** hazmat_ has joined us [21:53:55] ** hazmat_ has left IRC (Client Quit) [22:00:10] ** sprout has joined us [22:02:16] ** sprout has left IRC (Client Quit) [22:02:44] ** hazmat_ has joined us [22:12:47] ** hazmat_ has left IRC (Read error: 145 (Connection timed out)) [22:19:12] ** debugger has left IRC () [22:29:22] ** hazmat_ has joined us [23:37:00] ** hazmat_ has left IRC ("This computer has gone to sleep") [23:45:48] ** hazmat_ has joined us [23:53:55] ** hazmat_ has left IRC ("This computer has gone to sleep")