<Dybbuk>
I copied it straight out of the Ocamlodbc examples.
<Dybbuk>
Maybe I'm forgetting to link with something?
<smkl>
your main has bad type
<Dybbuk>
Oh...damn.
<Dybbuk>
How do I change the type?
<smkl>
write it correctly
<Dybbuk>
Oh, got it. :)
<Dybbuk>
I did forget a ()
<Dybbuk>
Thanks.
<Dybbuk>
Sorry about the dumb questions. This is merely my second day on the ocaml wagon.
<Dybbuk>
Is there an ocaml pretty printer, like prin1 in Lisp?
<smkl>
what does prin1 do?
<Dybbuk>
It will print out internal representations of Lisp expressions.
<Dybbuk>
So for example, if you (defun foo (x) (+ x 1)), prin1 will print that out. :)
<Dybbuk>
Or some variety of prin1 will do it.
<Dybbuk>
I can never keep them all straight.
<Dybbuk>
there's print, prin1, princ, and so on.
<smkl>
nope
<Dybbuk>
Oh, drat.
<Dybbuk>
Well, I got the odbc stuff working...so it seems like my biggest hurdle is the fact that there's no mod_caml or mod_ocaml type thing for Apache.
<Dybbuk>
But you can link ocaml into plain old C libraries, right?
<smkl>
you need to do some interfacing for that
<Dybbuk>
Yeah, that's what I was afraid of. Looking at the way mod_perl is written, it includes FFI wrappers for much of the Apache API.
<Dybbuk>
It's a big project.
<Dybbuk>
It would probably be simpler to write a threaded web server in Ocaml and just use Apache's mod_proxy.
<Dybbuk>
What I'd really like is some glue between Perl and XS.
<Dybbuk>
Er, Perl and Ocaml.
<smkl>
somebody said that mod_* wouldn't be useful for compiled languages
<Dybbuk>
Well, they're wrong.
<Dybbuk>
It's very useful for compiled languages.
<Dybbuk>
Consider the case where you have a web server taking 100 hits per second, each of those hits needing to pull data from an RDBMS.
<Dybbuk>
Usually the connection and authentication to the RDBMS takes longer than a hundred queries, so it's wiser to reuse one or two connections than to call a new DBH connection with every hit.
<Dybbuk>
Not only that, but there's considerable overhead forking CGI programs.
<Dybbuk>
Anyhow, using mod_proxy would work.
<Dybbuk>
A Perl->Ocaml glue would work even better. That would make me happpppy.
<Dybbuk>
And I think I see how to do it.
<Dybbuk>
There's an Inline::Python module for Perl that uses the Python/C interface to do what I want.