AOLserver Chat Logs

2006/12/09

IRC [17:02] *** tekbasse_ joined the chat.
IRC [17:02] *** tekbasse parted the chat.
IRC [18:55] *** nodie parted the chat.
IRC [19:29] *** partymola joined the chat.
IRC [19:29] <partymola> hi
IRC [19:48] <partymola> i want to register some routes using ns_register_proc ... what file should i put calls to ns_register_proc at?
IRC [19:51] <Dossy> In a file in your server's tcl directory.
IRC [19:51] <Dossy> The server-specific one, not the server-wide one.
IRC [19:51] <Dossy> Unless you want all servers (if you have more than one defined) to execute the code.
IRC [19:51] <Dossy> p/grow 1
IRC [19:52] <Dossy> You can easily get the location of your server's private Tcl library using [ns_library private]
IRC [19:58] <partymola> okey
IRC [19:58] <partymola> thanks a lot
IRC [19:58] <partymola> i am gonna try it :)
IRC [20:00] <partymola> should i restart the server after doing those changes, Dossy ?
IRC [20:03] <partymola> i did already >.>
IRC [20:07] <partymola> Dossy: i will explain you...
IRC [20:08] <partymola> server will receive petitions like /prefix-page1
IRC [20:08] <partymola> /prefix-page2
IRC [20:08] <partymola> and so on
IRC [20:08] <partymola> so i have redirected /prefix-* to a function
IRC [20:08] <partymola> but from that function, i can't do ns_adp_puts ...
IRC [20:08] <partymola> so how can i render the separate pages?
IRC [20:09] <partymola> sorry, but i am still a novice with aolserver :)
IRC [20:20] <Dossy> you actually probably want ns_register_adp
IRC [20:20] <Dossy> It's good that you're trying!
IRC [20:20] <partymola> probably
IRC [20:20] <partymola> i won't retreat :)
IRC [20:20] <partymola> okie, i'll take a look
IRC [20:21] <Dossy> ... /prefix-*, huh?
IRC [20:21] <partymola> i'm trying to convert a static webpage, into a dynamic one using aolserver, and i want to retain all old routes
IRC [20:21] <Dossy> Aha.
IRC [20:21] <partymola> don't worry, Dossy , i am so bad explaining myself in english... ;)
IRC [20:21] <Dossy> What's your native language?
IRC [20:22] <Dossy> Your English isn't that bad.
IRC [20:22] <partymola> spanish
IRC [20:22] <Dossy> Ah. Your English is probably better than my Spanish. :)
IRC [20:22] <partymola> maybe :)
IRC [20:22] <Dossy> I can understand some Spanish, but can't speak it well.
IRC [20:23] <partymola> it's a matter of practise... almost the same with my english... it's kinda weird :)
IRC [20:24] <Dossy> Try: ns_register_adp GET /prefix-* /path/to/file.adp
IRC [20:24] <Dossy> where file.adp is the ADP page you want executed for that URL pattern.
IRC [20:25] <partymola> that's what i've done... but what's the base prefix for the route to adp file?
IRC [20:25] <partymola> from pages/ ?
IRC [20:26] <Dossy> I think it's absolute path.
IRC [20:26] <Dossy> Maybe relative from pages.
IRC [20:26] <Dossy> let me look at the source :)
IRC [20:27] <partymola> it's not relative to tcl file into modules/tcl/ nor relative to pages/
IRC [20:27] <partymola> absolute path OMG
IRC [20:27] <partymola> ok, it works now :D
IRC [20:28] <partymola> Dossy: hands up! no need to look for!
IRC [20:29] <partymola> now i feel like i have to execute a command that gives me absolute path to "page" directory... :)
IRC [20:29] <Dossy> Sure.
IRC [20:29] <Dossy> [ns_info pageroot]
IRC [20:29] <Dossy> :)
IRC [20:30] <Dossy> So, are you learning Tcl at the same time or do you already know Tcl and are just starting AOLserver?
IRC [20:30] <partymola> both at the same time
IRC [20:30] <Dossy> That's great! :)
IRC [20:30] <partymola> it's funnier that way \o/
IRC [20:30] <Dossy> Haha. But, I'm guessing you have web and programming experience already?
IRC [20:31] <partymola> kinda :)
IRC [20:31] <Dossy> FYI, if you ever have questions, you can email me at dossy@panoptic.com if I'm not here.
IRC [20:31] <partymola> i am currently studying computer engineering
IRC [20:31] <partymola> oh, nice, i'll take note :)
IRC [20:31] <partymola> Thank you very much
IRC [20:31] <Dossy> I think you'll do fine--if you're already checking out AOLserver, that says a lot about your ability to learn new things. :-)
IRC [20:32] <Dossy> Most people just go straight to Apache/PHP and don't learn very much along the way.
IRC [20:32] <partymola> have you ever seen nodie around here?
IRC [20:32] <Dossy> Yes.
IRC [20:32] <partymola> we both own a business :)
IRC [20:32] <Dossy> Is that you?
IRC [20:32] <partymola> we're partners, and we're developing some apps
IRC [20:32] <Dossy> Ahh.
IRC [20:32] <Dossy> Good luck with that. Let me know if you need help.
IRC [20:32] <partymola> of course
IRC [20:32] <partymola> :)
IRC [20:33] <partymola> so... where are you from?
IRC [20:33] <Dossy> New Jersey, USA. :)
IRC [20:34] <partymola> New England, i see
IRC [20:34] <Dossy> yup, northeast
IRC [20:35] <partymola> it must be cold there :P
IRC [20:56] <Dossy> yeah, the other night it was 18F (about -7.7C)
IRC [20:56] <Dossy> but, for the rest of the week, it's supposed to be 40-50F
IRC [20:56] <Dossy> quite warm :)
IRC [20:56] <partymola> and i am complaining cuz we're here at 11C ...
IRC [21:05] <Dossy> hee :)
IRC [21:05] <Dossy> So, did the ns_register_adp do the trick for you?
IRC [21:20] <partymola> YES
IRC [21:21] <partymola> and pretty well :)
IRC [21:22] <Dossy> Great!
IRC [21:22] <partymola> now, user visits: http://localhost/prefix-asdf3-asfd.html or http://localhost/prefix-asdf3-asfd , and in both cases adp file calls my template system with parameter "asdf3-asdf
IRC [21:22] <partymola> which is what i wanted
IRC [21:22] <partymola> to simulate files on harddisk, but stored on a database :D
IRC [21:23] <partymola> i'll have my job finished soon \o/
IRC [21:24] <partymola> probably in 45 minutes... at 4.00 am XD
IRC [21:24] <Dossy> yay!
IRC [21:25] <Dossy> what database are you using?
IRC [21:26] <partymola> postgresql
IRC [21:27] <Dossy> Cool.
IRC [21:27] <Dossy> So, using nspostgres?
IRC [21:28] <partymola> yep
IRC [21:30] <partymola> it was a little tricky to install
IRC [21:30] <partymola> but it works perfect
IRC [21:31] <partymola> dang! never toast bread and program at the same time ... toasts are burned XD
IRC [21:31] <partymola> burnt*
IRC [21:41] <Dossy> aww :)
IRC [21:41] <Dossy> your toaster needs a better timer.
IRC [21:41] <partymola> it has not!
IRC [22:34] <partymola> oooop!
IRC [22:34] <partymola> houston, i've a problem >_>
IRC [22:40] <partymola> bah, solved