__DL__ changed the topic of #ocaml to: OCaml 3.09.0 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
kmagdsick is now known as kmag|away
exa has quit [Remote closed the connection]
vezenchio has quit ["\\o hutari ga kitto deaeru you na mahou wo kakete - ryoute wo sotto kasanete hora! hohoemu kara - hontou no kimoti kidukanai h"]
mfurr has joined #ocaml
Raziel has joined #ocaml
_fab has quit [Remote closed the connection]
mercurylala has quit [Read error: 104 (Connection reset by peer)]
mercurylala has joined #ocaml
Nutssh has joined #ocaml
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
mercurylala has quit [Read error: 104 (Connection reset by peer)]
mercurylala has joined #ocaml
khaladan has joined #ocaml
kryptt has joined #ocaml
kryptt has left #ocaml []
khaladan has quit []
ronnocol_ has joined #ocaml
<ronnocol_> I'm very new to ocaml and am trying to write a quick 2 line script (that uses an ext. library) and having a problem. Is anyone around?
<ronnocol_> I'm trying to write a utility program that goes w/ MLDonkey (and thus use the Unix32) library included
<ronnocol_> All I want to do is call Unix32.create_key () and print it out
<mfurr> what problem are you having?
<ronnocol_> Script is 3 lines
<ronnocol_> open Unix32;;
<ronnocol_> let key = (Unix32.create_key ());;
<ronnocol_> Printf.printf "Key: %s\n" key
<ronnocol_> Error:
<ronnocol_> newmonkey mldonkey-2.6.7 # ocamlc -c ./src/utils/lib/unix32.o tools/donkeyKey.ml
<ronnocol_> File "tools/donkeyKey.ml", line 1, characters 0-11:
<ronnocol_> Unbound module Unix32
<mfurr> try ocamlc -c ./src/utils/lib/unix32.cmo tools/donkeyKey.ml
<mfurr> OCaml object files have the extension .cmo
<mfurr> (for bytecode)
<ronnocol_> only options are .cmi, .cmx, .ml, .mli, and .o for unix32
<mfurr> then, its not compiled for byte-code, only native code....
<mfurr> try
<mfurr> ocamlopt -c ./src/utils/lib/unix32.cmx tools/donkeyKey.ml
<ronnocol_> hrm... same thing
<mfurr> perhaps ocamlopt -c -I src/utils/lib/ unix32.cmx tools/donkeyKey.ml?
<ronnocol_> That gave me a tools/donkeyKey.o
<ronnocol_> and no errors
<mfurr> and should also give you a ...cmx?
<ronnocol_> yes.. also a cmx
<ronnocol_> and cmi
<ronnocol_> What do I need to do to create a static binary out of that now?
<mfurr> so, since you supplied the '-c', the compiler produced those object files and not an executable
<mfurr> you can either do ocamlopt -o foo tools/donkeyKey.cmx
<mfurr> or just drop the -c from the original command and supply a '-o cmdname'
<ronnocol_> hrm... now I'm missing several implmentations from unix32.cmx
<ronnocol_> do I just need to add those .cmx's to the cmd line too?
<mfurr> that will work, but unix32 is probably bundled together into an archive. Is there a .cmxa file lying around anywhere (not necessary called unix32)?
<ronnocol_> no
<mfurr> then just add the other cmx files
<ronnocol_> ok... will do
<ronnocol_> thanks
<mfurr> possibly adding their paths with additional -I 's if needed
<mfurr> np
<ronnocol_> if there is a .cmxa do i just add that to the cmd line?
<ronnocol_> for some of the implementations
<mfurr> So, a .cmxa is a archive of several .cmx's (like .a for .o files). It will probably contain all the ones you need, unless they come from a different library
<ronnocol_> ah. ok
mfurr has quit ["Client exiting"]
<ronnocol_> argh he left
<ronnocol_> now there are two .a files that gcc wants...
kryptt has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
vodka-goo has joined #ocaml
Amorphous has joined #ocaml
kryptt has left #ocaml []
ramkrsna has joined #ocaml
ronnocol_ has quit ["leaving"]
mlh_ has quit [Client Quit]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
ramkrsna has quit [Read error: 113 (No route to host)]
vodka-goo has quit []
Raziel has quit ["Yo soy goma. Tú eres cola."]
ppsmimou has joined #ocaml
Nutssh has quit ["Client exiting"]
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
Snark_Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
Snark_Boojum is now known as Snark
rossberg has joined #ocaml
Skal has joined #ocaml
tato has joined #ocaml
Raziel has joined #ocaml
ski__ has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
collatin has joined #ocaml
_fab has joined #ocaml
collatin has quit ["Leaving"]
Raziel has quit [Remote closed the connection]
Raziel has joined #ocaml
exa has joined #ocaml
ski__ has quit [Read error: 110 (Connection timed out)]
z|away has joined #ocaml
kubano_ has quit [Read error: 110 (Connection timed out)]
<z|away> In what form are type constants stored internally? (int? any url about this?) In "type x = Z | A" will "Z < A" always be true?
* Smerdyakov screams.
<Smerdyakov> Why would you want to use a fact like that?!
<z|away> Maybe I don't. That's why I ask...
<Smerdyakov> You would only be able to take advantage of representation knowledge while outside of the type system; for instance, in C code accessed via the FFI.
<Smerdyakov> Is that what you're doing?
<mellum> Smerdyakov: no,
<mellum> "<" works for that in Ocaml
<Smerdyakov> AAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!1
<z|away> Well you say it is a 'fact'.
<z|away> So why not exploit it in ocaml..
<Smerdyakov> z|away, fact in the sense of something with well-defined truth that may hold or may not. :)
<z|away> Well, I need it to hold..
* Smerdyakov cries.
kubano has joined #ocaml
<z|away> Any hard info/docs on this?
__DL__ has joined #ocaml
<z|away> I guess not.
<Smerdyakov> I would imagine that there would be no reason for the OCaml developers to so constrain their future optimization opportunities.
<z|away> Then why allow it in the first place..
<z|away> This isn't C. Ocaml is supposed to take care of me.. :)
<haelix> well, maybe this exists so you two values are comparable
<haelix> It helps, when you have to put them in a container
Raziel has quit ["Yo soy goma. Tú eres cola."]
<haelix> (in C++, you like to have a well-defined < just for the sake of using them as key in a map)
<z|away> But if the results of the comparison aren't predictable..
<haelix> they are
<haelix> ---
<haelix> they needn't
<haelix> they just need to be coherent
<haelix> (a<b) == (a<b), always
<haelix> whatever a and b you choose
<haelix> (along with (a<b && a<c) implies a<c)
<haelix> and a<b && b<a implies a==b
<z|away> If you're happy with that. Seems awkward to me. *shrug*
<haelix> to be honest, I'd be happier if it were as you wished it should be
<haelix> but this is not totally pointless
<haelix> (though I would scream as loud as Smerdyakov if ever "Z < A"
kmag|away is now known as kmagdsick
tato has quit ["Leaving"]
<z|away> Ok. how can I investigate sizeof() things? sizeof(bool) = ? sizeof(bool option)? sizeof(array of 10000 bools) = ? (are they packed?)
<ulfdoz> You want C, I think. I know no higher level language, which is suitable for this.
<mellum> Well, I think there's a module for that around somewhere.
<mellum> And bools are not packed. 10000 bools will take 40004 or 80008 bytes, depending on the architecture.
<z|away> In general, how is 'option' represented? (bool and bool option both use 1 word?)
<KrispyKringle> OK, silly problem, but I've got tested "match" statements and I'm not sure how to indicate the end of the inner match.
<KrispyKringle> Anyone able to help me?
<KrispyKringle> oh, nevermind.
<KrispyKringle> Looks like parens do the trick. :)
<haelix> z|away: I'd be happy to be allowed to shoot myself in the foot, but would screamif it happened
Bigb[a]ng is now known as Bigbang
ppsmimou has quit ["Leaving"]
pango has quit ["Leaving"]
rq has joined #ocaml
pango has joined #ocaml
smimou has joined #ocaml
mercurylala has quit [Read error: 110 (Connection timed out)]
ski_ has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit ["make terminal"]
ulfdoz has joined #ocaml
malc_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Raziel has joined #ocaml
Nutssh has joined #ocaml
Bigbang is now known as Bigb[a]ng
Snark has quit ["Parti"]
Amorphous has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
shirogane has joined #ocaml
Skal has quit [Remote closed the connection]
ski has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
malc_ has left #ocaml []
joshcryer has quit [Connection timed out]
vodka-goo has joined #ocaml
vodka-goo has quit []
Raziel has joined #ocaml
__DL__ has quit [Remote closed the connection]
_fab has quit []
joshcryer has joined #ocaml
smimou has quit ["bli"]
Nutssh has quit ["Client exiting"]