gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
<mrvn> containing what? A list of all possible plain types?
<mrvn> that will be rather short
<ousado> no
<ousado> think of it as values in memory, and if you restart the program, they're still there
<ousado> similar to what "object-databases" for python/jvm-languages etc. do
<pippijn> ohow about Marshal?
<mrvn> So what you want is an universal container. Write one.
<mrvn> Marshal itself isn't typesafe
<ousado> yes, I'm writing it
<pippijn> or something like libsexp
<ousado> or rather a program that writes specific ones
<pippijn> or deriving
<ousado> instead of universal
thomasga has quit [Quit: Leaving.]
<ousado> nice intro :)
<ousado> "The world's stuck on XML for hierarchal data storage, but this is madness."
<pippijn> oh I meant sexplib or deriving
<pippijn> ocaml sexplib
<ousado> pippijn: in general I'd agree, but that's not quite it. I was hoping for something closer to what I'm doing
<pippijn> deriving dump?
<ousado> interesting
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
snarkyboojum has joined #ocaml
snarkyboojum has quit [Quit: ...]
snarkyboojum has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
emmanuelux has quit [Remote host closed the connection]
Transformer has joined #ocaml
Tobu has joined #ocaml
Transformer has left #ocaml []
flux has quit [Ping timeout: 272 seconds]
flux has joined #ocaml
smerz has quit [Read error: Connection reset by peer]
NihilistDandy has joined #ocaml
<Ptival> mrvn: in Haskell, when: data Foo bar baz = ..., Foo a la sorte (kind) * -> * -> *
<Ptival> s/a la sorte/has kind/
<Ptival> not sure it answers your question though
NihilistDandy has quit []
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
skchrko has joined #ocaml
william3 has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
zouk has joined #ocaml
<william3> hello! I would like to use a cross compiler suite on ubuntu/debian that would be able to cross compile
<william3> ocaml programs for windows. So far, I have found mingw-cross-env, a project that has compilation
<william3> commands and patchs for hundreds of packages, which works well, but does not have ocaml packages
<william3> There is also mingw-ocaml, a debian package that provides
<william3> a caml cross compiler targeting windows. Both are built on mingw-w64, but they are not compatible : paths are
<william3> different, and one uses static builds, the other dynamic ones. My question is : how to make an ocaml
<william3> cross compiler?
<william3> I am trying to reuse the compile commands from mingw-ocaml, but not easy, and I am getting errors...
<william3> of course, I would like to cross-compile ocaml programs that use C libraries, such as gtk
<adrien> you can't get the mingw-w64 stuff in the linux distribution?
<william3> yes, but mingw-ocaml (the mingw-w64 stuff in the distribution) has paths and static vs dynamic (and maybe other things)
<william3> not compatible with crossed compiled packages from mingw-cross-env.
<adrien> mingw-cross-env is distributed how? debian/ubuntu packages, or something external to the package management?
<william3> mingw-cross-env does not depend on any distribution
<adrien> does it have prebuilt-binaries?
ggherdov has joined #ocaml
<william3> yes, mingw-cross-env may have prebuilt binaries
<adrien> mingw-cross-env needs to be as autistic as possible in order to work independently of the distribution
<adrien> that makes it uncooperative
<adrien> I don't think you'll find an easy way to reconciliate both
<adrien> and there are differences between mingw.org and mingw-w64
<adrien> (and as an example of what can happen: GCC 4.7 broke C++ ABI)
<william3> I have modified mingw-cross-env to use mingw-w64 instead of mingw.org. What does that mean : gcc 4.7 broke c++ abi?
<adrien> C++ compiled with GCC < 4.7 does not with with C++ compiled with GCC >= 4.7
<adrien> there are "subtle" incompatibilities to take into account
xlq has joined #ocaml
<william3> what would you advise then, in order to build ocaml windows binaries using lablgtk?
<adrien> what you can _try_ is
<adrien> - mingw-w64 toolchain
<adrien> - mingw-ocaml from debian
<adrien> (the two should match of course)
<adrien> - steal binaries from mingw-cross-env but do not install it
<adrien> binaries and headers
<adrien> (no guarantee; you can get weird crashes in weird places)
<william3> if mingw-w64 and mingw-ocaml use 'dynamic' dlls, and mingw-cross-env static compiled packages, is there a problem?
<adrien> how do you know that mingw-cross-env doesn't use DLL files?
<william3> euh, actually all compile instructions use something like "--static"
<adrien> ...
<adrien> if they only provide static libraries, they're doing it wrong
<adrien> check by yourself: the .dll files are under bin/ for windows
<adrien> (gtk+ cannot run with static binaries)
<adrien> s/run/work/
hcarty has quit [Ping timeout: 252 seconds]
xlq has quit [Ping timeout: 260 seconds]
xlq has joined #ocaml
<adrien> woot
<adrien> I found how to easily time module initialization :-)
<adrien> (ld has a --wrap=symbol option to ... wrap a symbol)
hcarty has joined #ocaml
hcarty has quit [Ping timeout: 252 seconds]
william3 has left #ocaml []
snearch has joined #ocaml
hcarty has joined #ocaml
zouk has quit [Quit: Ex-Chat]
eikke has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
* adrien wants Array.find :P
<adrien> but I'm actually better-served by Array.map =)
Zedrikov has joined #ocaml
Tobu has joined #ocaml
albacker has joined #ocaml
albacker has quit [Quit: Leaving]
Zedrikov has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
my_nick_was_take has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
my_nick_was_take has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
my_nick_was_take has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
my_nick_was_take has quit [Client Quit]
Zedrikov has joined #ocaml
Zedrikov has quit [Remote host closed the connection]
Zedrikov has joined #ocaml
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
Qrntz has quit [Quit: leaving]
Qrntz has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
zorun has quit [Quit: reboot incoming…]
zorun has joined #ocaml
eikke has joined #ocaml
Tobu has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
Tobu has joined #ocaml
alinrus has quit [Quit: Lost terminal]
Zedrikov has quit [Quit: Bye all, see you next time!]
<adrien> of course, my approach isn't working
<adrien> I was wrapping the module entry points in C functions
<adrien> but the entry points are ocaml code, with all their requirements
<mrvn> adrien: let init_did_run_at = Unix.time ()
<adrien> mrvn: I wanted to time the initialization of something like Pervasives
<adrien> but maybe I can "simply" turn my C function into an ocaml-callable one
<mrvn> 4.3BSD, POSIX.1-2001.
<mrvn> ups
Tobu has quit [Read error: Connection reset by peer]
eikke has quit [Ping timeout: 276 seconds]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
ggherdov has quit [Read error: Connection reset by peer]
ggherdov has joined #ocaml
JuzorBNC is now known as Juzor
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
eikke has joined #ocaml
Tobu has joined #ocaml
<adrien> fixed :P
<adrien> (almost)
<adrien> it works even though I'm corrupting some memory
<xlq> Valgrind time :)
<adrien> yeah, exactly
<adrien> valgrind, the tool that makes things so slow that using it is almost masochism
<adrien> and it didn't see the corruption =/
<xlq> You're not supposed to run your program under valgrind all the time, only to find bugs ;)
Juzor is now known as JuzorBNC
<xlq> Not sure how I can get a meaningful error message (at least a line/column number) from ocamlyacc when it throws Parsing.Parse_error.
zorun has quit [Read error: Connection reset by peer]
zorun has joined #ocaml
albacker has quit [Ping timeout: 264 seconds]
cyphase has quit [Ping timeout: 246 seconds]
cyphase has joined #ocaml
skchrko has quit [Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120314111819]]
<adrien> if someone feels like looking at my issue, it's there: http://notk.org/~adrien/link.ml
<adrien> basically, ld makes it possible to wrap some symbol into others
<adrien> the C code is in the first two functions
<adrien> and if in the first chunk of code, I comment out the "indent += 2;" and "indent -= 2;", then it works (i.e. doesn't crash)
<adrien> otherwise, I get segfault in oldify_local_roots
<adrien> I've tried making the C functions ocaml-callable but that hasn't changed anything
<adrien> I'm not giving a full testcase (yet) because I'm leaving soon and it only segfaults after something like a hundred modules (I think that linking against lablgtk should be enough to trigger the issue)
cdidd has quit [Ping timeout: 276 seconds]
skchrko has joined #ocaml
<xlq> A function in List overflowed the stack. The backtrace is truncated, so how can I find out what called the function in List?
<mrvn> printf
<xlq> :(
Tobu has quit [Ping timeout: 260 seconds]
<flux> doesn't mean your code has a bug
<flux> you could just make use of a tail-recursive variant of the function you're using
Tobu has joined #ocaml
<mrvn> I find usualy the problem is finding where the call is that overflows.
<xlq> It's definitely a bug (I'm not testing with nearly enough data to warrant an overflow). I do need to find out what's calling the list function.
<xlq> Perhaps I created a looped list somehow.
<mrvn> any Obj.magic?
<_habnabit> xlq, .byte or .native?
<xlq> _habnabit: I don't mind.
<xlq> But I've been using native.
<xlq> mrvn: No.
<_habnabit> xlq, .native tends to inline more aggressively
<_habnabit> xlq, whenever I want a better traceback, I rerun it with the .byte version
<mrvn> xlq: then how would a list end up looped?
<xlq> mrvn: let rec x = () :: x
<xlq> But yeah, without that specific syntax (which is obvious to find), you can't get a looped list.
<mrvn> xlq: well, that kind is quite hard to do accidentally.
<xlq> Yeah. OK so it's not that ;)
<xlq> Thanks, I still don't get the whole stack but I can see the closure that List is calling.
<_habnabit> xlq, this is why our build system compiles and installs both the .byte and .native versions
<xlq> Aargh, I got caught out with the semicolon-after-if problem *again* :(
<xlq> if x then a; b; c
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
Submarine has quit [Read error: Connection reset by peer]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
Zedrikov has joined #ocaml
iago has joined #ocaml
ggherdov has quit [Remote host closed the connection]
ggherdov has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
alxbl has quit [Ping timeout: 245 seconds]
ggherdov has quit [Ping timeout: 250 seconds]
ggherdov has joined #ocaml
eikke has quit [Ping timeout: 250 seconds]
ggherdov has quit [Remote host closed the connection]
ggherdov has joined #ocaml
ggherdov has quit [Remote host closed the connection]
ggherdov has joined #ocaml
Submarine has quit [Remote host closed the connection]
ggherdov has quit [Ping timeout: 246 seconds]
ggherdov has joined #ocaml
emmanuelux has joined #ocaml
skchrko has quit [Ping timeout: 246 seconds]
skchrko has joined #ocaml
eikke has joined #ocaml
JuzorBNC is now known as Juzor
Juzor is now known as JuzorBNC
fraggle_ has quit [Read error: Connection reset by peer]
ggherdov has left #ocaml []
skchrko has quit [Quit: ChatZilla 0.9.88.2 [Firefox 11.0/20120314111819]]
avsm has joined #ocaml
xlq has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
Zedrikov has quit [Quit: Bye all, see you next time!]
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
iago has quit [Quit: Leaving]
fraggle__ has joined #ocaml
fraggle__ has quit [Read error: Connection reset by peer]
albacker has quit [Ping timeout: 246 seconds]
NihilistDandy has joined #ocaml
albacker has joined #ocaml
NihilistDandy has quit []
albacker has quit [Ping timeout: 246 seconds]
eikke has quit [Ping timeout: 250 seconds]