dark_light changed the topic of #ocaml to: OCaml 3.09.2 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/
chessguy has joined #ocaml
jcreigh has joined #ocaml
f78 has joined #ocaml
Kwisatz- has quit ["Leaving"]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different"]
fab__ has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
pango has quit [Remote closed the connection]
pango has joined #ocaml
jcreigh has joined #ocaml
jcreigh has quit ["yawn...it's bedtime"]
pango has quit [Remote closed the connection]
pango_ has joined #ocaml
shekmalhen has joined #ocaml
Smerdyakov has quit ["Leaving"]
jewel has joined #ocaml
_jol_ has joined #ocaml
_jol_ has quit ["temci lo nu gunka"]
shekmalhen has quit ["leaving"]
_velco has joined #ocaml
smimou has joined #ocaml
f78 has quit ["Leaving"]
pango_ has quit [Remote closed the connection]
velco has joined #ocaml
mnemonic has joined #ocaml
smimou has quit ["bli"]
<mnemonic> hi
<pstickne> hello again mnemonic :)
Wild_Cat has joined #ocaml
<mnemonic> pstickne :)
mnemonic has quit ["leaving"]
love-pingoo has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
<jewel> how can I make a string out of one or more chars?
<love-pingoo> string_of_char and concat, I guess
<jewel> Do I have to use the <- or set operators?
<love-pingoo> not necessarily
<love-pingoo> List.concat (List.map string_of_char ['f';'o';'o'])
<love-pingoo> although this solution isn't efficient
<love-pingoo> and string_of_char actually doesn't exist.. (String.make 1) does the job, but it looks even more over-heavy now
<jewel> ok I'll write a loop
* love-pingoo wrote crap anyway, List.concat isn't about strings
* love-pingoo hides...
<love-pingoo> I was thinking of String.concat, which also takes a string to put between elements..
<zvrba> so you just give it an empty string
<zvrba> it's a more general case of what you need
<love-pingoo> yeah, but that's a lot of more-general, it may not be very efficient
finelemo1 has joined #ocaml
jewel has quit [Read error: 110 (Connection timed out)]
finelemon has quit [Read error: 113 (No route to host)]
jewel has joined #ocaml
<zvrba> you're unneccessarily worrying about efficiency
<zvrba> and assuming too much about implementation
kencausey has joined #ocaml
Wild_Cat has quit ["Leaving"]
Wild_Cat has joined #ocaml
Wild_Cat has quit ["Leaving"]
pango has joined #ocaml
_velco has quit [Read error: 145 (Connection timed out)]
mikeX has joined #ocaml
Smerdyakov has joined #ocaml
pango_ has joined #ocaml
<flux__> hmh.. sometimes ocaml can be a bit too verbose. I suppose it's time to use that 'openin'-module
<flux__> in 22 lines I've mentioned word 'Database' 11 times
<flux__> I suppose I could make a local alias without resorting to language extensions
<Smerdyakov> Now how do I turn on syntax highlighting for caml-mode?
<flux__> M-x font-lock-mode, assuming emacs
<flux__> tuareg-mode has more colors, though
<Smerdyakov> No, I know that caml-mode has a separate color setting, independent of font lock.
pango has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
beschmi has joined #ocaml
jewel has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
love-pingoo has quit ["Leaving"]
Snark has joined #ocaml
velco has quit ["Ex-Chat"]
_velco has joined #ocaml
_velco is now known as velco
asbeta has joined #ocaml
<asbeta> hello
<asbeta> is it legal to use ocaml (as a compiler) for proprietary closed-source software?
<zmdkrbou> i don't think
<zmdkrbou> so
<zmdkrbou> the ocaml licence sucks
<asbeta> hmm... any substitutions then?
<zmdkrbou> hmm, + not
<zmdkrbou> herm sorry : the initial answer was : yes it is legal :)
<asbeta> hmm... why does it suck then? :)
<zmdkrbou> because i don't like closed-source software :)
<pango> asbeta: why not check yourself on the site ?
<asbeta> it depends on the point of view :)
<asbeta> pango, i'm not good in reading licenses
<pango> asbeta: compiler itself has some kind of QPL license
<pango> standard libs are under LGPL I think
<pango> so I think you're free to develop closed source programs
<asbeta> as far as i read, i thought it was legal, but some people were convincing me that it may be illegal
<asbeta> well, thanks :)
<pango> asbeta: the only way to convince yourself is to actually go read the licence
smimou has quit ["bli"]
<beschmi> anyone using one of the libevent bindings?
joshcryer has quit [Read error: 104 (Connection reset by peer)]
<asbeta> well, i think now i'm convinced :)
_jol_ has joined #ocaml
pango has quit ["brb"]
pango has joined #ocaml
_jol_ has quit ["temci lo nu citka"]
Mr_Awesome has joined #ocaml
<Mr_Awesome> is there a way to quickly create a .mli file from an .ml file?
<mellum> Mr_Awesome: ocamlc -i
<Mr_Awesome> ah, thanks
<Mr_Awesome> heh, ive been searching the docs on every other tool besides ocamlc
_jol_ has joined #ocaml
<Mr_Awesome> let string_of_list str_of_e delim lst = List.fold_left (fun e1 e2 -> str_of_e e1 ^ delim ^ str_of_e e2) lst;;
<Mr_Awesome> that evaluates to (string->string)->string->string list->string
<Mr_Awesome> shouldnt it be ('a->string)->string->'a list->string ?
<beschmi> let string_of_list str_of_e delim = List.fold_left (fun e1 e2 -> str_of_e e1 ^ delim ^ e2) ""
<beschmi> still wrong
<pango> first parameter of List.fold_left function parameter (where you used "e1") is the accumulator
<Mr_Awesome> forgot about that arg
<pango> so you apply str_of_e to the accumulator at each iteration, hence the string -> string signature
<Mr_Awesome> oh so its let string_of_list str_of_e delim = List.fold_left (fun e1 e2 -> e1 ^ delim str_of_e e2) "";; ?
<Mr_Awesome> *delim ^ str...
<pango> you'll get a delim at the beginning of your result string
<pango> not sure that's what you want
<Mr_Awesome> oh thats right, delim should go after str_of_e e2
<Mr_Awesome> thanks pango
<pango> then you'll get an extra delim at the end ;)
<Mr_Awesome> thats fine with me
<pango> if not,
<pango> let string_of_list str_of_e delim lst =
<pango> match lst with
<pango> | [] -> ""
<pango> | h :: q -> List.fold_left (fun acc e -> acc ^ delim ^ str_of_e e) (str_of_e h) q
<pango> also, if performance matters, you should check the Buffer module to avoid some string concatenations
<Mr_Awesome> good idea
<Mr_Awesome> nah, im only printing at most 7 things
<pango> another version:
<pango> let string_of_list str_of_e delim lst = String.concat delim (List.map str_of_e lst)
<Mr_Awesome> oh yeah, i forgot about String.concat
<asbeta> what's the best way of integrating ocaml with delphi or vb6? i'm thinking about using ocaml as a logical core with delphi code for visualization
EsotericMoniker has joined #ocaml
_jol_ has quit ["leaving"]
velco has quit [sterling.freenode.net irc.freenode.net]
velco has joined #ocaml
f78 has joined #ocaml
pstickne has quit [Connection timed out]
pstickne has joined #ocaml
pango has quit [Remote closed the connection]
chessguy has joined #ocaml
velco has quit ["I'm outta here ..."]
pstickne_ has joined #ocaml
pango has joined #ocaml
pstickne has quit [Connection timed out]
pstickne_ has quit [Client Quit]
chessguy has quit [Connection timed out]
Snark has quit ["Leaving"]
Carillon has joined #ocaml
Mr_Awesome has left #ocaml []
stesch has joined #ocaml
dark_light has joined #ocaml
marcelino has joined #ocaml
marcelino has quit ["Ex-Chat"]
descender has quit [Read error: 60 (Operation timed out)]
descender has joined #ocaml