Sir_Diddymus has quit [Read error: 110 (Connection timed out)]
<DRMacIver>
Are the ocaml-mysql libraries any good?
<DRMacIver>
</horribly woolly question>
<flux__>
no idea
<flux__>
but from what I've seen about mysql interfaces, I doubt it's not very easy to screw up ;)
<flux__>
hmm, that was needlessly complicated
<flux__>
"I think they are very easy to make right"
finelemo1 has quit [Read error: 110 (Connection timed out)]
finelemon has joined #ocaml
mikeX has quit [Remote closed the connection]
jer has quit [Read error: 113 (No route to host)]
ski has quit [Success]
ski has joined #ocaml
pango is now known as pangoafk
jer has joined #ocaml
pangoafk is now known as pango
jcreigh has joined #ocaml
EsotericMoniker has joined #ocaml
mikeX has joined #ocaml
<EsotericMoniker>
would it be possible for an OCaml app to link against a C++ library when creating a binary, perhaps by using a SWIG wrapper?
gim_ has joined #ocaml
love-pingoo has joined #ocaml
jcreigh_ has joined #ocaml
<EsotericMoniker>
specifically what I need to do is have OCaml process some files, run some transformations and then pass the output of that into a C++ lib via various methods (all while calling a few config methods also)
shawn has quit ["This computer has gone to sleep"]
piggybox has joined #ocaml
<flux__>
well, I can't see why it couldn't be done
<flux__>
C++ programs aren't all that different from C-programs
<flux__>
the only issue I can think of is the symbol mangling which can be overcome with extern "C"
<love-pingoo>
I'm sure binding C++ is OK.. although I never did it by myself
<EsotericMoniker>
I was thinking I would need SWIG to overcome the mangling issues
<love-pingoo>
the mangling issue arises with dynamic linking
<love-pingoo>
I'm not sure it happens here
<EsotericMoniker>
I'm not very familiar with OCaml, I'm evaluating it for this project so forgive my ignorance
<love-pingoo>
I'd try to do as if it was C, and trust gcc on that
<love-pingoo>
EsotericMoniker: unfortunately the crazy binder I know is away for a week
<EsotericMoniker>
can you compile OCaml to a binary and link it against C++ during compile time?
<love-pingoo>
I don't know much about C bindings
<EsotericMoniker>
ok
<love-pingoo>
EsotericMoniker: yes you can
<love-pingoo>
the easiest is to call the C(++) functions from the Caml code
<love-pingoo>
by first wrapping them in C functions taking ocaml values as parameters
<EsotericMoniker>
is that because OCaml goes to C/C++ first and gets compiled via something like GCC?
<flux__>
it doesn't, actually
<flux__>
but it is linked with gcc
<flux__>
(on linux atleast)
<EsotericMoniker>
so it can use gcc at that point to resolve all the mangling, etc.?
<jer>
linked wiht gcc? why wouldn't it just be linked with the system linker instead?
<love-pingoo>
EsotericMoniker: do you have complex datastructures on the C++ side ? multithreaded application ?
<love-pingoo>
if not, the binding shouldn't be too hard
<EsotericMoniker>
it is a pretty complex library
<love-pingoo>
another try: do you need to export the complex data structures from C++ to OCaml ? (and vice versa)
jcreigh has quit [Connection timed out]
jcreigh_ is now known as jcreigh
<EsotericMoniker>
I wouldn't actually need to read anything from C++ in OCaml
<EsotericMoniker>
I think it would be almost 100% one way OCaml calling C++ methods
<EsotericMoniker>
the basic idea is for OCaml to do a lot of tricky parsing and lexing of a source file that then gets dumped out into a specialized format that then gets fed to the LLVM library to do native JIT compilation
<love-pingoo>
calling C++ methods with simple parameters like int,string,floats should be easy
<EsotericMoniker>
ok
<flux__>
well.. make that functions
<flux__>
if they are methods of objects, you will want to have a function that calls the method
<EsotericMoniker>
right
<EsotericMoniker>
for the CFFI
<EsotericMoniker>
how is OCaml's support for Windows?
<love-pingoo>
I don't know. Real people use it, so it shouldn't be so bad.
<love-pingoo>
There might be issues with threads, the Unix module, and maybe the bindings: does it use gcc and ld just as with linux ?
<EsotericMoniker>
well you can create Windows binaries using Cygwin and gcc
<flux__>
I think there are two alternatives: either the cygwin route, or the mingw32 route, that is, native?
szloto has quit [Read error: 104 (Connection reset by peer)]
<EsotericMoniker>
so that may be the way to get stuff running
<EsotericMoniker>
yeah both of those would get you native stuff
<flux__>
yes, but with cygwin you will need to pass the big cygwin libraries along with the program?
<flux__>
also I believe cygwin is gpl, no?
<EsotericMoniker>
there is a flag that will let you be cygwin dll free
<love-pingoo>
doesn't the SML have a match construct ? it is only merged to the fun construct ?
* love-pingoo
is reading awkward code that would look better with a match
<flux__>
I don't know, but it would sound strange to me