<Smerdyakov>
RobertFischer, why do you think it should do something else?
<RobertFischer>
Smerdyakov: If I know two Strings are the same length, why wouldn't the numerical comparison correspond to the string comparison?
<Smerdyakov>
Why would it?
<RobertFischer>
Because (unless I'm remembering incorrectly) the ASCII code for "2" is less than the ASCII code for "3", etc.
<Smerdyakov>
Does the OCaml documentation make some claim that implies that it will give the behavior you expect?
<Smerdyakov>
Your last line doesn't mean that an arbitrary comparison function will work like you want.
<RobertFischer>
I suppose. Probably just my Java showing, but I assumed the comparison for Strings was to compare length, then to compare contents by ASCII code.
<Smerdyakov>
I don't recall reading any guarantee that string comparison is "strcmp()".
<RobertFischer>
The OCaml documentation is pretty ambiguous on the actual comparison algorithm. Well, crap.
<RobertFischer>
Guess I'll have to write that up.
<Smerdyakov>
Write what up? What makes you think other people find this surprising?
<RobertFischer>
Write up the comparison implementation that I want.
<Smerdyakov>
It seems silly.
<RobertFischer>
It's the comparison operator that will solve my problem.
<Smerdyakov>
Or do you mean by "write up" just that you will implement it?
<RobertFischer>
I mean implement it.
<RobertFischer>
Not write it up in the sense of writing up a ticket or something.
<Smerdyakov>
I'm completely against OCaml's polymorphic comparison, anyway.
<Smerdyakov>
And, if you do use it, you should use it as an arbitrary total order.
<RobertFischer>
I wasn't using any kind of "polymorphic" anything.
<RobertFischer>
I'm just comparing strings here. :)
<Smerdyakov>
I think [String.compare] and [Pervasives.compare] have the same behavior on strings.
Associat0r has quit []
Associat0r has joined #ocaml
<Jeff_123>
Pervasives.compare is a very, very curious function.
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
Kopophex has quit ["Leaving"]
rwmjones has joined #ocaml
OChameau has joined #ocaml
Jedai has joined #ocaml
coucou747 has joined #ocaml
Yoric[DT] has joined #ocaml
Linktim has joined #ocaml
Deffie has joined #ocaml
<Deffie>
hi all, how do i compile a source which uses mysql ?
<Yoric[DT]>
Could you detail your question?
<Deffie>
Yoric[DT]: years ago i wrote an application with ocaml which uses "open Mysql - open Unix" but i didnt remember how to build it, it uses also a C library which implements usleep, so i need to link it
<Yoric[DT]>
So you need a refresher course on linking with libraries, is that it?
<Deffie>
Yoric[DT]: lol exactly :)
<Yoric[DT]>
:)
<Yoric[DT]>
mmmhhhh....
<Yoric[DT]>
Have you tried ocamlbuild?
Associat0r has quit []
<Deffie>
Yoric[DT]: this is a daemon which keeps tailing a log file and updates a mysql database, now the daemon who logs changed its way of logging so i have to modify the daemon :P
<Deffie>
Yoric[DT]: i was trying ocamlc, lets see ocamlbuild
<Yoric[DT]>
ocamlbuild automates a large part of the building process
<Yoric[DT]>
other than that, to link with library bla.cma, you just write
<Yoric[DT]>
ocamlc bla.cma your_code
<Yoric[DT]>
the tricky part being to get ocamlc to look in the right directories
<Deffie>
Yoric[DT]: hm France :)
<Yoric[DT]>
And?
<Yoric[DT]>
Oh, you mean "bla" :)
<Yoric[DT]>
s/bla/foo/
<Deffie>
Yoric[DT]: lol no you just didnt resemble the pragmatic way of ircing which is the standard today so i suspected
<Deffie>
Yoric[DT]: all of good anyway, pleased to have found you :)
<Yoric[DT]>
My pleasure.
<Yoric[DT]>
I'll have to leave in a few minutes, though.
munga has joined #ocaml
<Deffie>
pragmatic but necessary evidently :)
Deffie has quit []
leoncamel has quit ["leaving"]
Mr_Awesome has quit ["aunt jemima is the devil!"]
Jedai has quit [Read error: 113 (No route to host)]
rwmjones has quit [Read error: 104 (Connection reset by peer)]
rwmjones has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
rwmjones has quit ["Closed connection"]
Linktim has quit [Read error: 110 (Connection timed out)]
Ched- has quit []
Ched- has joined #ocaml
Yoric[DT] has joined #ocaml
sponge45 has joined #ocaml
Jedai has joined #ocaml
<coucou747>
@+ [lan time]
coucou747 has quit ["bye ca veut dire tchao en anglais"]
filp has quit ["Bye"]
filp has joined #ocaml
filp has quit [Client Quit]
seafood has quit []
tomh has joined #ocaml
marmotine has joined #ocaml
struk_atwork has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
seafood has joined #ocaml
mbk has joined #ocaml
asmanur has joined #ocaml
bluestorm has joined #ocaml
RobertFischer has joined #ocaml
Axioplase_ is now known as Axioplase
seafood has quit []
pango has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
pango has joined #ocaml
Associat0r has joined #ocaml
mbk has left #ocaml []
nysin has joined #ocaml
nysin has quit [Client Quit]
asmanur has quit [Remote closed the connection]
asmanur has joined #ocaml
LordMetroid has joined #ocaml
jlouis has quit ["Leaving"]
Associat0r has quit [Read error: 104 (Connection reset by peer)]
jlouis has joined #ocaml
OChameau has quit ["Leaving"]
Kopophex has joined #ocaml
xevz_ has joined #ocaml
xevz_ has quit [Client Quit]
Kopophex has quit [Remote closed the connection]
Linktim has joined #ocaml
Kopophex has joined #ocaml
rby has quit [Read error: 104 (Connection reset by peer)]