gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
Associat0r has quit [Ping timeout: 250 seconds]
hcarty has joined #ocaml
fraggle_ has joined #ocaml
ymasory has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
hcarty has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
ulfdoz_ is now known as ulfdoz
wormphlegm has joined #ocaml
arubin has quit [Quit: arubin]
Associat0r has joined #ocaml
mneedham has quit [Quit: mneedham]
<thelema_> hcarty: the one on github is the latest.
hcarty has quit [Read error: Operation timed out]
hcarty has joined #ocaml
bobry has quit [Remote host closed the connection]
bobry has joined #ocaml
tautologico has joined #ocaml
ymasory has quit [Quit: Leaving]
hcarty has quit [Ping timeout: 260 seconds]
hcarty has joined #ocaml
<tautologico> any ocsigen users?
<tomprince> If you have a question, ask it.
boscop_ has joined #ocaml
<tautologico> newbie question: ocsigen comes with its own web server, as I understand it. Can I run ocsigen's web server alongside apache, for instance? each one serving different URLs in the same domain
<tautologico> I asked this in #ocsigen
<tomprince> I suspect what you need to do is teach one server to forward to the other, for those paths you want the other to handle.
boscop has quit [Ping timeout: 250 seconds]
bobry has quit [Remote host closed the connection]
<dcolish> thelema_: in the build scenario you described earlier today, would you need a _tags file that describes the batteries package to have it load with ocamlbuild?
fraggle_ has quit [Remote host closed the connection]
hcarty has quit [Read error: Operation timed out]
fraggle_ has joined #ocaml
hcarty has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
<thelema_> dcolish: you need 1) 3.12 or a myocamlbuild file that enables findlib and 2) the right _tags to enable batteries on your project
vivanov has joined #ocaml
tautologico has quit [Quit: tautologico]
<dcolish> ah ok cool, i was doing that but I was wondering if there were other ways
<dcolish> it would be cool if i could have a global myocamlbuild/_tags for always including batteries; haven't really looked into it yet although
lopexx has joined #ocaml
<iris1> thelema_: thank you very much! (sorry about the delay here) Unfortunately I am using 3.11.2, perhaps this will give me the impetus to finally upgrade.
lopex has quit [Ping timeout: 250 seconds]
beauby has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
vivanov has joined #ocaml
philtor has joined #ocaml
vivanov has quit [Ping timeout: 250 seconds]
vivanov has joined #ocaml
malouin has quit [Ping timeout: 240 seconds]
hcarty has quit [Read error: Operation timed out]
hcarty has joined #ocaml
beauby has quit [Ping timeout: 252 seconds]
wormphlegm has quit [Quit: leaving]
mbac has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
jderque has joined #ocaml
jderque has quit [Quit: leaving]
beauby has joined #ocaml
beauby has quit [Ping timeout: 250 seconds]
vivanov has quit [Ping timeout: 260 seconds]
vivanov has joined #ocaml
Snark has joined #ocaml
DimitryKakadu has joined #ocaml
Yoric has joined #ocaml
eikke has joined #ocaml
edwin has joined #ocaml
lopexx has quit [Ping timeout: 252 seconds]
Kerris has quit [Ping timeout: 276 seconds]
DimitryKakadu has quit [Remote host closed the connection]
Kerris has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
DimitryKakadu has joined #ocaml
hto has joined #ocaml
redfire has joined #ocaml
<redfire> hi
<redfire> Is there a solution in Ocaml to build a table with different types in ? For example, in my case I would like a table of tuple (type, value) but the value will be an int, a string or whatever...
<redfire> Just because for the moment, I found a code on the Internet which uses the Obj module to realize this but like I don't know how it works I can't modify to my needs...
<flux> redfire, well, there are dynamic type modules for ocaml, but the normal solution is knowing the types you need beforehand or use closures (or objects) and encode the requirement in a different way
<flux> redfire, I dearly recommend against using Obj for these kind of purposes. segmentation faults lie that way.
beauby has joined #ocaml
<redfire> flux, actually I'm trying to generate code for the data section of an ocaml bytecode file. And if I understand well what I have to do, I need to build a table an then do an output_value on it...
<flux> oh, and the way to get truly dynamic types in ocaml is with exceptions, as they are dynamically typed in pronciple
<redfire> But I don't know if there is another solution...
<flux> redfire, I'm not familiar with the format. but I'm guessing the type information is already removed at that stage.
<redfire> yes, the VM is untyped, the problem is to write datas at compile time in the same table.
<flux> redfire, your problem sounds so low-level that perhaps the caml mailing list would be a good place to put down your problem?
<redfire> oh, I didn't think about that there is a mailing for end users ?
<redfire> (I'm not used to this kind of stuff)
<redfire> the caml mailing list for this king of problem is caml-list@inria.fr ?
<redfire> *kind
pdhborges has joined #ocaml
<flux> yes
<flux> redfire, note that the list was recently closed from non-subscribers
<flux> due to spam
<flux> posting to the list, that is
beauby has quit [Ping timeout: 240 seconds]
Kerris has quit [Quit: Kerris]
ikaros has joined #ocaml
jderque has joined #ocaml
Kerris has joined #ocaml
Cyanure has joined #ocaml
pdhborges has left #ocaml []
sku has joined #ocaml
edwin has quit [Remote host closed the connection]
sku has quit [Quit: Leaving]
beauby has joined #ocaml
mcclurmc_home has joined #ocaml
impy has quit [Quit: impy]
impy has joined #ocaml
jamii has joined #ocaml
joelr has joined #ocaml
<joelr> good day
<joelr> what is the easiest way to format a float time with microseconds returned by Unix.gettimeofday as YYYY-mmm-DD HH:MM:SS.fffffffff
<joelr> alternatively, what's the best way to get part after the '.' in 1304252778.2164669 ?
<joelr> modf!!!
Associat0r has quit [Quit: Associat0r]
<adrien> joelr: have you tried Calendar(Lib)?
<joelr> adrien: i'm using it
<joelr> but i don;t think it has what i need in this case
<adrien> why? what is missing?
<adrien> I'm not using it but I see input from seconds as floats and a number of pretty-printing functions
sepp2k has joined #ocaml
<joelr> adrien: where are the pretty-printing functions
<joelr> Is there a shortcut for this?
<joelr> try (close_in input) with _ -> ();
<joelr> adrien: looking, thanks
<joelr> adrien: i don't see a format for microseconds
<adrien> hmmm, right, I had misread what you wrote, but you can't get both year/month/day and hour/min/sec/millisec with only gettimeofday
<adrien> I'd use calendar to get everything except the millisecond
edwin has joined #ocaml
<adrien> I guess the millisec/µsec/* are simply the non-integer part returned by gettimeofday
<joelr> adrien: you grab Unix.gettimeofday () that gives you seconds.micros
<adrien> so it's a simple matter of concatenating both
<joelr> then you convert the integer part of that into a unix tm with localtime
lopex has joined #ocaml
pdhborges has joined #ocaml
<joelr> how do you print -just- the fractional part of a float with Printf?
<adrien> snd(modf yourfloat) ?
<adrien> or fst
<adrien> fst(modf yourfloat)
<joelr> no, no
<joelr> the float is 0.xxxxxxxx
<joelr> i want to printf just the xxxxx as it comes as part of my date printout
<joelr> with %f i get 0.xxxxxx which is not what i want
<joelr> i guess i have to print it as an int, multiplied by whatever # of digits i want
<adrien> oh
ymasory has joined #ocaml
<adrien> I think that libc's printf doesn't know about such a conversion either but you can always String.substring or, maybe more efficient Buffer.add_substring if you use Buffers
lopex has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
<joelr> ok, thanks
joelr has quit [Quit: joelr]
pdhborges has left #ocaml []
mnabil has joined #ocaml
sku has joined #ocaml
DimitryKakadu has quit [Remote host closed the connection]
el-out_y has joined #ocaml
el-out_y has quit [Client Quit]
<thelema_> redfire: can you use a Variant for your types? i.e. type value = Int of int | Float of float | String of string | ...?
<thelema_> this is the normal way to tag values with their type.
jamii has quit [Ping timeout: 250 seconds]
DimitryKakadu has joined #ocaml
jamii has joined #ocaml
hto has quit [Ping timeout: 240 seconds]
dnolen has quit [Quit: dnolen]
oriba has joined #ocaml
jderque has quit [Quit: leaving]