flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
Palomides_ has joined #ocaml
Palomides has quit [Read error: 110 (Connection timed out)]
Ched- has quit [Connection timed out]
Ched- has joined #ocaml
Palomides_ is now known as Palomides
Associat0r has quit []
pattern has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
jeddhaberstro has quit []
marmotine has quit ["mv marmotine Laurie"]
lorph has left #ocaml []
Myoma has quit [Read error: 113 (No route to host)]
Philonous1 has joined #ocaml
Philonous has quit [Connection timed out]
SanguineV has joined #ocaml
jonafan_ has joined #ocaml
maattd has quit [Remote closed the connection]
bluestorm has joined #ocaml
seafood has quit []
jonafan has quit [Read error: 110 (Connection timed out)]
coucou747 has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
SanguineV has quit []
seafood has joined #ocaml
Jedai has quit [Read error: 60 (Operation timed out)]
Myoma has joined #ocaml
hkBst has joined #ocaml
ygrek has joined #ocaml
maattd has joined #ocaml
coucou747 has joined #ocaml
Myoma has quit ["Leaving"]
Linktim has joined #ocaml
Associat0r has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
Linktim_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Client Quit]
Linktim has quit [Read error: 110 (Connection timed out)]
asmanur has joined #ocaml
Asmadeus has joined #ocaml
Linktim has joined #ocaml
Yoric[DT] has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
asmanur_ has joined #ocaml
ttamttam has joined #ocaml
mbishop has quit [Remote closed the connection]
asmanur has quit [Read error: 110 (Connection timed out)]
coucou747 has quit ["bye ca veut dire tchao en anglais"]
Linktim_ has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> mmmhh....
<Yoric[DT]> Seems we'll need some work to get the documentation to look coherent.
dmk has joined #ocaml
dmk has left #ocaml []
Linktim has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
tomh_-_ has joined #ocaml
Linktim has joined #ocaml
itewsh has joined #ocaml
ttamttam has quit ["Leaving."]
TypedLambda has joined #ocaml
Camarade_Tux_ has joined #ocaml
itewsh has quit [Read error: 113 (No route to host)]
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux_ is now known as Camarade_Tux
<Camarade_Tux> is there a Pervasives.at_exit equivalent that is not executed in case an exception is raised ?
im_alone has quit [Read error: 110 (Connection timed out)]
<bluestorm> well
<bluestorm> let exception_raised = ref false
<bluestorm> let at_exit f = at_exit (fun () -> if not !exception_raised then f ())
<bluestorm> try ..... with exn -> exception_raised := true; raise exn
<bluestorm> with the reference global, and the try .. with around your "main" part
<Camarade_Tux> the problem is I don't have control over the "main" part, it may contain a ";;" for instance. =/
<Camarade_Tux> (but since ocaml will complain at compile-time, I can do that, I'd just prefer not to)
<bluestorm> hm
<bluestorm> you want to do that as a syntax extension ?
<flux> camarade_tux, what is your problem actually?
<bluestorm> but i agree this kind of thing is facilitated by having a single point of entry in the script
<bluestorm> (on the other hand, if the constant (with no IO) parts of your code raise exceptions, it is a problem)
<flux> you could Unix.kill the process, or you could make _exit callable from ocaml..
<Camarade_Tux> bluestorm, not really a syntax extension, I want to execute an "user"-provided script but I need to have a few functions called at the end of the script ; I could have the script contain the needed calls but I prefer not to
<Camarade_Tux> and the "script" interacts with the system so it's completely error-prone
<bluestorm> i see
<bluestorm> you may achieve that by interacting with the toplevel
<bluestorm> i mean, instead of compiling+executing the script, you pass it phrase per phrase to the toplevel, and check the output
<bluestorm> it's a little messy but it, well, works
asmanur_ has quit [Read error: 60 (Operation timed out)]
<flux> camarade_tux, do could do something like this: module ContainedScript (Bar: sig end) = struct (copy script here) end;;
itewsh has joined #ocaml
<flux> and then something like let main () = try let module F = Foo (struct end) in () with exn -> ..
<Camarade_Tux> bluestorm, currently I plan to create a new toplevel with a few additional modules to do something like "init ()"
<Camarade_Tux> my first try was feeding ocaml's toplevel with an out_channel but that was messy, I may reconsider doing this right now since I only have to feed one "command"
<Camarade_Tux> flux, the script will be written by non ocamlers too so I'd like to give them an easier introduction to ocaml
<flux> camarade_tux, I was thinking you would programmatically do the wrapping
<flux> simply textual replacement
<flux> one problem might be if the user gives an extranous "end" in their source
netx has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Read error: 113 (No route to host)]
simias has joined #ocaml
simias has left #ocaml []
im_alone has joined #ocaml
maattd has quit ["Leaving."]
itewsh has joined #ocaml
ygrek has quit [Remote closed the connection]
asmanur has joined #ocaml
Linktim has quit ["Quitte"]
bluestorm has quit [Remote closed the connection]
rog1 has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Remote closed the connection]
smimram has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
tomh_-_ has joined #ocaml
smimram has joined #ocaml
rog1 has joined #ocaml
sporkmonger has joined #ocaml
guillem_ has joined #ocaml
Linktim has joined #ocaml
comglz has joined #ocaml
Linktim_ has joined #ocaml
Philonous1 has quit ["Leaving."]
Philonous has joined #ocaml
sporkmonger has quit []
italy has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
pango_ has quit [Remote closed the connection]
italy has quit ["Ex-Chat"]
Linktim_ has quit [Read error: 110 (Connection timed out)]
pango_ has joined #ocaml
jeddhaberstro has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
munga_ has joined #ocaml
Ched- has quit [Read error: 104 (Connection reset by peer)]
Ched- has joined #ocaml
Ched- has quit [Remote closed the connection]
comglz_ has joined #ocaml
bluestorm has joined #ocaml
ygrek has quit [Remote closed the connection]
Linktim has joined #ocaml
marmotine has joined #ocaml
comglz has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
yziquel has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> mmhhhhh
<Yoric[DT]> « Forward reference to Write_ml in file unsafe_read_c.cmo »
<Yoric[DT]> What could that be?
ygrek has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
itewsh has joined #ocaml
Myoma has joined #ocaml
Ched- has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit []
ygrek has quit [Remote closed the connection]
comglz_ has quit [Client Quit]
ygrek has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Ched- has quit [Remote closed the connection]
Ched- has joined #ocaml
Linktim has joined #ocaml
ygrek has quit [Remote closed the connection]
tomh_-_ has joined #ocaml
Snark has quit ["Ex-Chat"]
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
<bluestorm> gildor: i have a failure with a mail sended to a forge-hosted mailing list
<bluestorm> gildor: http://pastebin.com/d5702cb05
sporkmonger has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
bzzbzz has joined #ocaml
Linktim has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
<gildor> bluestorm: could you submit a bug report?
jeremiah has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
<gildor> bluestorm: against site admin (with full description and how to reproduce it)
<Yoric[DT]> I have the same failure.
<Yoric[DT]> The mail seems to get through anyway.
<gildor> Yoric[DT]: you mean the mail is reachning the list ?
<bluestorm> Yoric[DT]: the mail was send to you *and* the list
<bluestorm> (as i just got your last one)
<bluestorm> -d+t
Camarade_Tux has quit []
<bluestorm> Yoric[DT]: i forgot to tell about that in my mail but i actually was thinking about an other name for "Text"
<bluestorm> "Language" is misleading but more accurate
<bluestorm> it's interesting that you came to the same conclusion independently :]
Camarade_Tux has joined #ocaml
<gildor> bluestorm: bluestorm: don't forget to submit a bug against "site admin", with description on how to reproduce the bug
<bluestorm> ok
<gildor> thanks
<gildor> bluestorm: ok i will try to solve it tomorrow
<Yoric[DT]> bluestorm: ok for Language
* Yoric[DT] is currently working on a ocamldoc plug-in to actually get the documentation we want.
<bluestorm> Yoric[DT]: you're talking about I/O for Text/Language, but i'm not sure that is relevant; what about Str for example ?
<Yoric[DT]> Mmmhhh....
<Yoric[DT]> Fair enough.
<bluestorm> hm
<Yoric[DT]> Although Str *should* work on streams :)
<bluestorm> well streams are still not I/O strictly speaking
<Yoric[DT]> They're supposed to be an abstraction for I/O.
<bluestorm> hm
<bluestorm> but there could be a stream of data inside the program
<bluestorm> (that would be internal i/o :p)
<bluestorm> anyway
marmotine has quit ["mv marmotine Laurie"]
<Yoric[DT]> Let's rephrase, then: Language should produce data from strings, inputs or streams/enums or strings, inputs or streams/enums from data?
<bluestorm> hm
<Yoric[DT]> or
<Yoric[DT]> Languages should produce data from text, text from text or text from data.
<Yoric[DT]> (where text could be interpreted quite liberally)
<bluestorm> "Parsing, printing and operating on structured data" ?
<bluestorm> hm
hkBst has joined #ocaml
<bluestorm> sucks.
<bluestorm> Yoric[DT]: your description is accurate, except that we actually don't know what "data" and "text" are ;)
<bluestorm> also, sexplib is more like "Producing text producing text from data gathered from the source code text"
Camarade_Tux has quit []
<Yoric[DT]> Well, that's how it works.
<Yoric[DT]> But that's not how it looks.
<bluestorm> hm
<bluestorm> Sexplib would contain the runtime API, right ?
<bluestorm> ah, you mean that looks like Sexp.t -> string and string -> Sexp.t
<Yoric[DT]> yep
<Yoric[DT]> Anyway, time to call it a night.
<Yoric[DT]> Cheers.
Yoric[DT] has quit ["Ex-Chat"]
pleroma has joined #ocaml
Camarade_Tux has joined #ocaml
Axioplase has joined #ocaml
Camarade_Tux has quit [Client Quit]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Read error: 104 (Connection reset by peer)]
Camarade_Tux has joined #ocaml
tar_ has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
itewsh has quit ["KTHXBYE"]
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Linktim has quit ["Quitte"]
Camarade_Tux has quit []
Camarade_Tux has joined #ocaml
<det> Using that code, is it true that calling "let r = new readable file" will be more efficient than "let r = readable2 file" ?
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
coucou747 has joined #ocaml
dibblego has joined #ocaml
<bluestorm> det: i wouldn't expect any difference
<bluestorm> any noticeable difference, at least
<bluestorm> if you really care, try a benchmark
<bluestorm> but is that important ?
<det> Well, it seems that if I use a class, Ocaml will construct a class at program initialization and then reuse that class on every object construction, while if I use an immediate object, it will generate a new class for every allocation
<det> I will benchmark
<tar_> I would wager that they are almost entirely identical.
hkBst has quit [Read error: 104 (Connection reset by peer)]
<det> the immediate object version is faster by 18% o_O
Axioplase is now known as Axioplase_eat
tar_ has quit ["byebye"]
bluestorm has quit [Remote closed the connection]
tar_ has joined #ocaml
jeddhaberstro has quit []
tar_ has quit ["byebye"]
middayc has joined #ocaml