flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
Jarvellis has quit [Remote closed the connection]
Jarvellis has joined #ocaml
Jarvellis has quit [Remote closed the connection]
Jarvellis has joined #ocaml
Jarvellis has quit [Remote closed the connection]
mpeter is now known as Ferrenrock
Ferrenrock is now known as mpeter
anryx has quit ["Leaving"]
alexyk has quit []
fschwidom has joined #ocaml
fschwidom has quit [Remote closed the connection]
alexyk has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
mpeters has joined #ocaml
bburg has joined #ocaml
mpeter has quit [Read error: 60 (Operation timed out)]
seafood has quit []
bzzbzz has quit [Read error: 110 (Connection timed out)]
rogo has joined #ocaml
mpeters is now known as mpeter
apples` has quit ["Leaving"]
jeddhaberstro has joined #ocaml
alexyk has quit [Read error: 60 (Operation timed out)]
apples` has joined #ocaml
jeddhaberstro has quit []
seafood has joined #ocaml
CoryDambach has quit [Connection timed out]
CoryDambach has joined #ocaml
dfritz has joined #ocaml
alexyk has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Read error: 131 (Connection reset by peer)]
apples` has quit ["Leaving"]
<dfritz> Hi, I am trying to use ocaml-mysql and I have fetch a row from the database but I am having trouble dealing with the result. The type is listed as "val myrow : string option array option = Some [|Some "2"; Some "john"|]." What is a "Some [| |]"?
<thelema> [| |] is array
<thelema> Some xxx is option type
<dfritz> thelema: thanks, i see how to work with it now. One more question: if a function has at type of result -> int64 -> unit and i call it with result and 1, how do I cast the 1 to an int64?
<dfritz> thelema: ha, i solved my own problem Int64.of_int
<thelema> the return :)
seafood has quit []
_zack has joined #ocaml
RichN has joined #ocaml
RichN has quit ["Gotta go!"]
bburg has quit ["さようなら"]
_zack has quit ["Leaving."]
Axioplase has quit ["leaving"]
_zack has joined #ocaml
gdmfsob has joined #ocaml
Axioplase has joined #ocaml
asabil has quit ["Ex-Chat"]
alexyk has quit []
olgen has joined #ocaml
rwmjones_ has joined #ocaml
fschwidom has joined #ocaml
marmotine has joined #ocaml
love-pingoo has joined #ocaml
fschwidom has quit [Connection timed out]
Yoric[DT] has joined #ocaml
mpeter has quit [Read error: 110 (Connection timed out)]
johnnowak has joined #ocaml
marmotine has quit [Read error: 113 (No route to host)]
mamie_cracra has joined #ocaml
vixey has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
TaXules has quit [Remote closed the connection]
TaXules has joined #ocaml
johnnowak has quit []
mfp has joined #ocaml
Kerris7 has joined #ocaml
_zack has quit ["Leaving."]
gl has joined #ocaml
_zack has joined #ocaml
_zack has quit [Client Quit]
snhmib has joined #ocaml
snhmib has quit [kornbluth.freenode.net irc.freenode.net]
rogo has quit [kornbluth.freenode.net irc.freenode.net]
xevz has quit [kornbluth.freenode.net irc.freenode.net]
purple_ has quit [kornbluth.freenode.net irc.freenode.net]
jeremiah has quit [kornbluth.freenode.net irc.freenode.net]
svenl has quit [kornbluth.freenode.net irc.freenode.net]
mbishop has quit [kornbluth.freenode.net irc.freenode.net]
svenl has joined #ocaml
rogo has joined #ocaml
mbishop has joined #ocaml
purple_ has joined #ocaml
snhmib has joined #ocaml
gdmfsob has quit [Read error: 145 (Connection timed out)]
gl has left #ocaml []
_zack has joined #ocaml
Bisoukonrad has joined #ocaml
gdmfsob has joined #ocaml
<Bisoukonrad> hi, which standard library permits to convert an int into its binary representation ?
<flux> I don't think the standard library comes with such functions
<flux> however there are some other libraries that can do it
<Bisoukonrad> ok
<flux> for example extlib: http://ocaml-lib.sourceforge.net/doc/IO.html. you will need to go via the io layer to get what you want, though
<flux> what are you actually attempting to do?
<flux> convert an integer to string "010101" ?
<Bisoukonrad> yes, but i'll write a function this is not complicated
<flux> right, because I actually misunderstood the question, I don't think extlib has that. although it might have function unfold (also simple to write) which will slightly simplify the task
<Bisoukonrad> ok
<Bisoukonrad> also i was wondering why for some libraries we need to "#load "libname.cma"" (as Num) and for others not
<flux> well, certain libraries are linked to be core libraries, and others not :)
<flux> chapter IV of the manual will give you which libraries are built in and which are not
<Bisoukonrad> ok
<Bisoukonrad> i have a last question : if i ask : "c" ^ "a_1...a_n" ; will this be done in a time O(n) or O(1) ?
<vixey> O(1)
<Bisoukonrad> ok thanks
Anarchos has joined #ocaml
_zack has quit [Read error: 60 (Operation timed out)]
<flux> hmm..
<flux> ocaml will concatenate strings during compile time?
<Bisoukonrad> he cannot do this since a string could be Sys.argv
<flux> well, string concatenation is indeed O(length of strings to concatenate) in O'Caml
<flux> if you need to repeatedly concatenate strings, you might want to use Buffer
<Bisoukonrad> sum of the both lengths ?
<flux> well, a new string is constructed, and both the old strings are copied into it
<flux> one possible alternative is to construct a list of strings to concatenate and use String.concat in the end
<flux> and if you want to get away from all this, you might want to take a look at Batteries, which has a Rope library
<flux> its concatenation and substringing are efficient. possible even O(1), I don't quite remember..
<flux> (and your strings will no longer be mutable, which is either a pro or a con, depending on your point of view ;) )
<Bisoukonrad> ok thanks : )
petchema has joined #ocaml
olgen has quit []
vpalle has joined #ocaml
<mfp> glondu: thanks to your help the other day, I have successfully added support for statically loaded extensions/modules in custom, self-contained, native Ocsigen builds --- just sent the patches to the ML
<glondu> mfp: you're welcome
<glondu> I'll have a look at your patches (but it will probably take time...)
<mfp> I'm getting very encouraging results with the native ocsigen, with >4000 requests/sec for minimal dynamic contents (as a reference point, with -c 100 I'm getting ~6500 reqs/sec with lighttpd and a "hello, world" FastCGI process written in C using libfcgi)
<mfp> they look larger than they are; I've tried to summarize what their do quite comprehensively
<mfp> & should not affect existent code
<mfp> argh I sent it to the old ML address, trying again
<glondu> sorry for the mess...
<glondu> we discovered the address change at the same time as you...
ikaros has joined #ocaml
Camarade_Tux has joined #ocaml
jpcooper has joined #ocaml
<mfp> np, I blame myself for this (I should have updated the alias when I heard about the change a while ago, since IIRC we received a notification)
fschwidom has joined #ocaml
Anarchos has quit [Read error: 113 (No route to host)]
jpcooper has left #ocaml []
Kerris7 has quit ["Who is Candlejack? Is he going to c"]
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
Kerris7 has joined #ocaml
Camarade_Tux has quit ["Leaving"]
love-pingoo has quit ["Connection reset by pear"]
Koordin has joined #ocaml
Bisoukonrad has quit [Read error: 113 (No route to host)]
Mr_Awesome_ has joined #ocaml
vpalle has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Kerris7 has quit ["Who is Candlejack? Is he going to c"]
Mr_Awesome_ has quit [Read error: 145 (Connection timed out)]
Mr_Awesome_ has joined #ocaml
Kerris7 has joined #ocaml
Kerris7 has quit ["Who is Candlejack? Is he going to c"]
fschwidom has quit [Read error: 54 (Connection reset by peer)]
mattam has quit [Read error: 113 (No route to host)]
mpeter has joined #ocaml
Megzlna has joined #ocaml
^authentic has joined #ocaml
<Yoric[DT]> thelema: docfix in progress.
authentic has quit [Read error: 60 (Operation timed out)]
^authentic is now known as authentic
alexyk has joined #ocaml
<alexyk> how do I include a .cma which is not in a package, but in site-lib/ ? is `ocamlc -where`/site-lib the way to do it?
Camarade_Tux has joined #ocaml
<flux> I suppose yes, but I just use findlib for installing stuff and the problem goes away
<flux> it really is worth it even for your own small packages ;)
mattam has joined #ocaml
<palomer> hrmph
<palomer> how do you have locally universal variables in class definitions?
<palomer> method try_this forall 'a (f:'a -> 'b option) (k:'b) (s:string) = <--something like this
<mfp> method try_this : 'a 'b. f:('a -> 'b option) -> k:'b -> s:string -> sometype = fun f k s -> ....
<palomer> gotcha
<mfp> with the right labels in the function, that is
<mfp> (i.e. fun ~f ~k ~s)
<palomer> gotcha
<alexyk> flux: ah, -package worked
<flux> alexyk, don't forget -linkpkg in the linking stage
<alexyk> flux: so a package is just a subdirectory, nice
<flux> alexyk, not really
<flux> alexyk, there's a META file describing the package
<flux> although I suppose it does a direct package name -> directory mapping..
<flux> but a directory could provide multiple packages
<flux> findlib is actually one very well-thought piece of software
<alexyk> flux: right, a subdir with a META
anryx has joined #ocaml
Stefan_vK1 has joined #ocaml
jackie has joined #ocaml
<Yoric[DT]> thelema: documentation fixed.
Stefan_vK has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
apples` has joined #ocaml
<Megzlna> why do you guys like Ocaml more than Haskell?
<vixey> lol
<Megzlna> not you vixey
<Megzlna> you arent allowed to answer
<vixey> ocaml must be getting sick of this...
<Megzlna> SERIOUS question
jackie has quit [Remote closed the connection]
<jonafan> is there a backstory to this question
<Megzlna> no
<vixey> just amusing that every day someone comes here and compares haskell with ocaml
<vixey> will be funny in a few years when $differentlanguage is popular
<jonafan> i don't really know haskell so i guess i can't answer
jburd has joined #ocaml
_zack has joined #ocaml
apples` has quit ["installing netbsd"]
ofaurax has joined #ocaml
<alexyk> I'm trying to mutex resources from Unix.fork processes; found ocaml-sem library, which implements BSD semaphores, and it says function not implemented when run on my mac osx... how do you mutex things among processes (not threads)?
* Yoric[DT] is tired of assessing homework.
<Yoric[DT]> Megzlna: truly, I've already seen this question pop up several times this week.
* alexyk mumbles, all you haskellz belong to us
<alexyk> ocaml has 5 letters in its name vs. haskell's 7
<alexyk> ocaml has a camel animal mascot vs. some obscure british mathematician
<alexyk> with ocaml, you are exposed to the French culture vs. wrongly spelled Bristish English
<vixey> obscure british mathematician? wow
<alexyk> vixey: relatively to camels, he is
slash_ has joined #ocaml
<vixey> Oh I didn't know how widely known (other than in Discworld) that camels are mathematicians
<alexyk> camels are better known as class than mathematicians
Camarade_Tux has quit ["Leaving"]
* mpeter NODS
<Yoric[DT]> We had a camel called "Joe" in our University.
<Yoric[DT]> (that was close to the King Xavier 3.04, avenue)
<mpeter> tell me more
^authentic has joined #ocaml
<alexyk> well I like ocmal because I can copy stuff into toplevel without worrying about whitespace
<alexyk> and I don't like camlBack naming
<alexyk> and it's FAST, it compiles FAST, it runs FAST
<alexyk> it has objects, and preprocessor, and always works like a well-oiled machine
<alexyk> and it's used on Wall St too
<alexyk> and Haskell isn't; and F# is lile ocaml's sister for .net
<alexyk> like
<alexyk> (am I forgetting something important?)
<vixey> you didn't mention that F# sucks
<alexyk> vixey: F# sucks but is exists, coherentPDF guy recompiled 20K SLOC of ocaml in it and made a .net DLL, try that with Haskell
<vixey> alexyk: I never said Haskell was any good :)
authentic has quit [Connection timed out]
^authentic is now known as authentic
<alexyk> vixey: right; Churchill would have said, all cunctional languages cusk, nut ocaml sucks least of all
<alexyk> fucntional, suck... can't type
<vixey> I like the way Churchill puts it
<mfp> I like the module system, the straightforwardness of most code (Haskell is a bit punctuation heavy and feels like I have to keep many things in mind --- but I have done little Haskell), camlp4, polymorphic variants, OO system and late binding when needed, reasonable toolset, very good predictability (space & time)
<mfp> #haskell is much better at producing ludicrous situations involving bans, though :-P
<mfp> <EnQLey_> kliken dich dach douch klinkendichenachenouch. * quicksilver sets ban on *!*n=EnQLey@*.dyn.versateladsl.be * quicksilver has kicked EnQLey_ from #haskell (WTF?) lol
_zack has quit ["Leaving."]
<alexyk> mfp: I just saw how much traffic is on #haskell and ran back here
<mfp> wtf <EnQLey_> Vous me rendez mon vélo s'il vous plait ? out of the blue
<alexyk> #ocaml has just the right traffic and ppl
<alexyk> we need to hide if it grows
<alexyk> rebase to #votrelanguepue
<mfp> why does #haskell attract this sort of deranged people -> <EnQLey_> Haskell, it's jew ?
<vixey> what does votrelanguepue mean?
<mfp> your language sucks
<vixey> aw it's empty
* alexyk is proud he learned a bit from the great French culture
<alexyk> vixey: I've just made it up
<alexyk> and went there too
<alexyk> hah. i'm the founder now.
<mfp> ever seen Xavier Leroy giving a talk?
<alexyk> mfp: nope, are there some on youtube?
<mfp> oh this sucks, I was going to give you a link to his talk on compilation & typing ("du language à l'action: compilation et typage")
<mfp> but it's gone :-(
<mfp> fortunately I dl'ed it so I can upload it somewhere
<alexyk> mfp: would be lovely
<alexyk> youtube for instance, or vimeo
<mfp> not today I'm afraid, it's 280MB and would take too long with my puny ~300Kbps upload
<alexyk> anytime...
<mfp> there's a chance it'll be back, the video is listed in xleroy's homepage http://pauillac.inria.fr/~xleroy/
<alexyk> may be ping college de france then -- better someone French tho' :)
<alexyk> what a nice site. I want to go there to study now :)
<Yoric[DT]> Not quite a college in the common sense of the term.
<alexyk> yoric, right, it comes back to me -- an academy?
<Yoric[DT]> Well, more of a research institute.
<Yoric[DT]> They hold seminars but I don't think there are any formal students.
mamie_cracra has quit ["mv marmotine Laurie"]
<alexyk> so -- inter-process semaphores, anybody? or it's back to Unix books in C? :(
<alexyk> http://ocaml-sem.sourceforge.net/ -- compiled this by replacing old OCamlMakefile with Markus's fresh goodness
<alexyk> but have to replace normal unix semaphores by mac osx abnormal ones
xevz has joined #ocaml
jeddhaberstro has joined #ocaml
rwmjones_ has quit ["Closed connection"]
Yoric[DT] has quit ["Ex-Chat"]
ofaurax has quit ["Leaving"]
ikaros has quit [".quit"]
gdmfsob has quit [Read error: 110 (Connection timed out)]