debona|r has quit [Read error: 104 (Connection reset by peer)]
yauz_ has quit [Read error: 104 (Connection reset by peer)]
FredCods_ has joined #ocaml
cjohnson has joined #ocaml
FredCods has quit [Read error: 110 (Connection timed out)]
iholsman has joined #ocaml
<iholsman>
I'm trying to find some ocaml source which uses a mysql database to do things (so I can learn by seeing how others do it) is there some kind of page which documents some open source apps which a powered by ocaml?
mhalcrow has joined #ocaml
<mhalcrow>
ocaml n00b here w/ a question about linking against ocaml-sqlite...
<mhalcrow>
Getting /usr/lib/ocaml/3.07/sqlite/libsqlite.a(sqlite_stubs.o)(.text+0x134): In function `raise_sqlite_error':
<mhalcrow>
home/jgoerzen/tree/debian/+packages/ocaml-sqlite/ocaml-sqlite-0.3.5.arch.4/sqlite_stubs.c:170: undefined reference to `sqlite_freemem'
<mhalcrow>
Apparently, the linker can't figure out where to find my local sqlite libraries.
<mhalcrow>
-cclib -lsqlite doesn't help
<mhalcrow>
Even though libsqlite's in /usr/lib
larsr has quit [Read error: 54 (Connection reset by peer)]
<mhalcrow>
nm on /usr/lib/ocaml/3.07/sqlite/libsqlite.a shows these symbols are undefined there
<mhalcrow>
nm on /usr/lib/libsqlite.a shows them in the text section
<iholsman>
mhalcrow: does a -L <directory> help?
<mhalcrow>
Tried that.
<iholsman>
have you tried diong a strace?
<iholsman>
that will at least tell you if it is a problem finding your lib, or a problem inside your lib?
<mhalcrow>
The library is stock Debian
<mhalcrow>
strace doesn't seem to help
<mhalcrow>
Can I get ocamlopt to give me the ld command it's issuing?
<mhalcrow>
If I include just -I +sqlite sqlite.cmx, it complains about not finding sqlite.o. If I give sqlite.cmxa, I get the linker errors as before.
cjohnson has quit [Remote closed the connection]
<mhalcrow>
I just copied /usr/lib/ocaml/3.07/sqlite/ into my project directory and referenced libsqlite.a directly from there, and now it works. Blah...
<mhalcrow>
Thanks for your help
mhalcrow has quit ["BitchX: shaken, not stirred"]
iholsman has left #ocaml []
larsr has joined #ocaml
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 60 (Operation timed out)]
larsr has left #ocaml []
kinners has joined #ocaml
larsr has joined #ocaml
larsr has left #ocaml []
GreyLensman has quit ["outta here like a thundering herd of turtles."]
larsr has joined #ocaml
async has quit ["leaving"]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
ne1 has quit ["To understand recursion, you must first understand recursion."]
kinners has quit [Read error: 110 (Connection timed out)]
ionOSu has joined #ocaml
<mflux>
hm, how do I write something to the effect of (non-working) class a = object method get_b : (unit -> b) = failwith "foo" end and class b = object method get_a : (unit -> a) = failwith "bar" end;; ?
larsr has quit []
<mflux>
hm, I suppose I could first create a class that b inherits, and declare that before a
<_fab>
mflux: i think it works with "class a = object .... end and b = object ... end"
<mflux>
yes, thanks, it works ;)
smimou has joined #ocaml
Snark has joined #ocaml
Herrchen_ is now known as Herrchen
gazoul has joined #ocaml
gazoul is now known as mijdrol
<mflux>
..and another problem: how do I rewrite 'a to be an explicit type in this? class a = object (self) method foo : 'a = self end;;
<mflux>
that code naturally works, but I wan't 'a that to actually fail with an exception, yet return the same type
<mflux>
or actually not the same type, but another type, but the solution on writing that mystifies me ;)
ofranja has joined #ocaml
<slashvar[lri]>
Yop
vezenchio has joined #ocaml
<mattam>
mflux: just raise an exception, it has type 'a
<mflux>
yes, but
<mflux>
I actually want to write class a = object (self) method foo = failwith "cannot" end and b = object (self) inherit a method foo = self method bar = Printf.printf "Bar!\n" end;;
<mflux>
and eventually let b = ((new bar) :> foo)#bar would retrieve the bar-object
<mflux>
hm, #foo that is
<mflux>
so I could write (..#bar)#foo
Lemmih_ has joined #ocaml
Lemmih has quit [Read error: 110 (Connection timed out)]
<mflux>
so I believe I need to spell out the return type for ocaml in the parent class
<mattam>
yes, you have to use a class type, like:
<mattam>
class type foobar = object method bar : unit method foo : foobar end
pattern has quit [Read error: 104 (Connection reset by peer)]
pattern has joined #ocaml
<mattam>
then class b : foobar = object(self) method foo = (self :> foobar) method bar = Printf.printf "Bar!\n" end;;
Lemmih_ is now known as Lemmih
ita has joined #ocaml
<ita>
hi all
<ita>
i finally managed to mix my c code with ocaml