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/
beschmi has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Leading Edge IRC"]
jcreigh has joined #ocaml
b00t has joined #ocaml
shekmalhen has joined #ocaml
pango_ has joined #ocaml
jcreigh has quit ["been up for 17 hours...time to hit the sack"]
ziggurat has joined #ocaml
pango has quit [Remote closed the connection]
shekmalhen has quit ["leaving"]
ziggurat has quit ["Leaving"]
Mr_Awesome has joined #ocaml
Mr_Awesome has left #ocaml []
Smerdyakov has quit ["Leaving"]
SEAMOSS has joined #ocaml
jewel has joined #ocaml
Wild_Cat has joined #ocaml
smimou has joined #ocaml
Carillon has quit [Connection timed out]
SEAMOSS is now known as Carillon
beschmi has quit ["Leaving"]
ramkrsna has joined #ocaml
b00t has quit [Remote closed the connection]
Snark has joined #ocaml
TSC has quit [Remote closed the connection]
Wild_Cat has quit []
ski has quit [Read error: 60 (Operation timed out)]
smimou has quit ["bli"]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
<flux__> hmm.. writing ocaml-bindings for quesoglc (opengl font-rendering-library) would be a nice little project for someone ;)
Wild_Cat has joined #ocaml
<ppsmimou> flux__: maybe you ? :)
<flux__> I'll do just after I've completed the esd-bindings ;)
jewel has quit [Read error: 110 (Connection timed out)]
<youknow365> es dificil hacer encuadernaciones en Ocaml ?
youknow365 has quit [Remote closed the connection]
<pango> (is encuadernaciones the most accurate translation of bindings in spanish, and in this context ?)
<flux__> oh, he was asking if it's difficult to write ocaml bindings?
<pango> guess so
<flux__> in any case: not really, but depends on the library
<flux__> it's just work
<pango> too bad he already left the channel :/
<flux__> oh, right, I ignore that stuff
<pango> (encuadernaciones = bookbinding)
wkh has joined #ocaml
jewel has joined #ocaml
Carillon has quit [Read error: 54 (Connection reset by peer)]
Carillon has joined #ocaml
code17 has joined #ocaml
Demitar_ is now known as Demitar
finelemon has joined #ocaml
finelemo1 has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
jewel has quit [Connection timed out]
jewel has joined #ocaml
jewel_ has joined #ocaml
jewel has quit [Connection timed out]
slipstream-- has joined #ocaml
slipstream has quit [No route to host]
|Lupin| has joined #ocaml
<|Lupin|> Hi.
<ppsmimou> hi
<|Lupin|> I'd like to write a debugfunction
<|Lupin|> that either calls Printf.printf withthe arguments it gets
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
<|Lupin|> or does nothing, depending o some condition
<|Lupin|> I triedThis:
<|Lupin|> let debug level fmt = if level <= !verbosity then Printf.printf fmt else fun x -> x
<|Lupin|> but it doesn't work
<|Lupin|> Has anybody an idea, please ?
<ppsmimou> try an eta-expansion
<|Lupin|> Is this not eta-expanded ?
<ppsmimou> hum actually it seems to work here
<ppsmimou> what's your problem with it exactly ?
<|Lupin|> Well
<|Lupin|> I cannotuse it...
<|Lupin|> debug 0 "Hello\n";;
<|Lupin|> doesn'twork
<ppsmimou> mmmm right
<|Lupin|> moreover the type looks strange:
<|Lupin|> val debug : int -> ('a -> 'a, out_channel, unit) format -> 'a -> 'a = <fun>
<flux__> |lupin|, maybe Printf.kprintf suits your purposes
<|Lupin|> In the brackets it shouldn't be a 'a -> 'a I think
<|Lupin|> An there is probably a 'a which shouldn't bAthere, at the end
slipstream has joined #ocaml
<|Lupin|> flux__: I don'tknow...
<|Lupin|> else fun x -> x <-- I suspectthat the problem comesfrom here...
<ppsmimou> |Lupin|: let debug level fmt s = if level <= !verbosity then Printf.printf fmt s else ();;
jewel_ has quit [Read error: 110 (Connection timed out)]
<ppsmimou> your identity was returning a string, whereas you want it to return unit
<|Lupin|> ahah
<|Lupin|> Just outof curiosity:
<|Lupin|> is it easy to write a function havingThesame ty pethan Printf.printf but that does nothing ?
_fab has joined #ocaml
<|Lupin|> ppsmimou: Works fine, indeed. Thanks a lot!
code17 has quit ["ERC Version 5.1.4 (IRC client for Emacs)"]
|Lupin| has left #ocaml []
Smerdyakov has joined #ocaml
<wkh> is there a way to use SSE/SSE2 processor extensions in OCaml?
chessguy has joined #ocaml
<pango> wkh: write the performance critical parts in assembler ?
<pango> or maybe in C, since it seems gcc 4 can make use of those extensions
smimou has joined #ocaml
Snark has joined #ocaml
Wild_Cat has quit ["Leaving"]
_jol_ has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
_jol_ has quit ["leaving"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
_jol_ has joined #ocaml
Snark has quit ["Leaving"]
Godeke has joined #ocaml
_jol_ has quit ["leaving"]
Amorphous has quit ["arg... must... shutdown... computer burnin..."]
Amorphous has joined #ocaml
_velco has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
mwc has joined #ocaml
mwc has left #ocaml []
_velco has quit ["I'm outta here ..."]
DRMacIve1 has joined #ocaml
shawn__ has joined #ocaml
shawn__ has quit [Client Quit]
shawn__ has joined #ocaml
DRMacIver has quit [Connection timed out]
SEAMOSS has joined #ocaml
Carillon has quit [Connection timed out]
SEAMOSS is now known as Carillon
shawn__ has quit [Connection timed out]
shawn__ has joined #ocaml
asbeta has joined #ocaml
<asbeta> hi
<asbeta> could you help me? http://paste.lisp.org/display/25498
<pango> I don't think modules can cross-reference each other
f78 has joined #ocaml
<pango> for one because they can contain values, and module linking semantics is that module declarations are "evaluated" when the module is linked in
<pango> there's would be no clear linking order if cross module references were allowed, so it's prohibited
<asbeta> hmm.. but upto compiling t1.ml there's no problem
<asbeta> so t1 at this point can reference t2
<pango> but you can't have both, it's quite clear
<pango> they're several ways around that, and you suggested one yourself
<asbeta> probably the problem is that in caml there's now "undefined values", like in haskell
<asbeta> -w
<pango> and no problem with using undefined values either, I suppose
<pango> that said, lazyness probably helps there
<asbeta> yeah, maybe
_fab has quit [Remote closed the connection]
<pango> actually, you *can* have recursive modules, if you declare them simultaneously. It's a language extension however, watch out for falling bricks
<pango> (I annotated you paste)
<pango> s/you/your/
<asbeta> but it seems there's no way to do that from shell
Wild_Cat has joined #ocaml
<pango> seems to interpret just right...
<pango> module rec T1 : sig type t = T of int val p : t -> t end
<pango> and T2 : sig val p : T1.t -> T1.t end
<pango> maybe you forgot to add some last ;; to start evaluation ?
<asbeta> no, i mean compilation
<asbeta> i have some kind of logic ast & bunch of operations, and lexer/parser in separate files
<asbeta> bunch calls parser, parser uses ast, so they "call" each other
<pango> obviously simultaneous declaration can only happen within a file, so that's not the solution for you
<pango> I suppose the simplest way out is to declare the AST type(s) separately
<asbeta> sadly there's no type synonyms
<pango> not sure what you mean, I don't know Haskell
<asbeta> i don't really know it either :)
<asbeta> i meant i'd say something like "typesyn logic = LogicAst.logic;;", so i could substitute LogicAst everywhere
<pango> just "open LogicAst" should do in your case
<asbeta> yeah, but the idea was that i do that in some module Logic
<asbeta> and anyone who open Logic see "logic" type and think it's genuine
<asbeta> i don't know whether it's mathematically possible or not at this point
<pango> you could try type logic = LogicAst.logic ... after a quick test, types seem to stay compatible...
<asbeta> emm.. ehem..
<asbeta> i tried that my logic.ml and that didn't work at that time. now it works, strange :)
<asbeta> but logic obtained seem quite abstract
<pango> mmh that doesn't import the associated constructors, too
<asbeta> it may be good to have -r option for ocamlc/ocamlopt to instruct compiler to do recursive simultaneous module definition
<smimou> you can already have recursive module definitions
<pango> it's experimental however
<pango> they're constraints, and it's partly resolved at runtime... yuck
<pango> watch out for "Undefined_recursive_module" exceptions...
<asbeta> so we need a "head branch"
Wild_Cat has quit []
<asbeta> better watch out indeed
<pango> reading http://www.dptinfo.ens-cachan.fr/STIC/Stages/Rapports05/rapport2005-bardou.pdf (french), it's probably indeed the lazyness that makes the difference
SEAMOSS has joined #ocaml
SEAMOSS is now known as Carillon_
<asbeta> is there english version?
<asbeta> oh, it's time.. g'night!
asbeta has quit []
smimou has quit ["bli"]
Carillon has quit [Success]