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!)
CosmicRay has joined #ocaml
jlouis has quit ["Leaving"]
jynxzero has quit [clarke.freenode.net irc.freenode.net]
bla has quit [clarke.freenode.net irc.freenode.net]
jdev has quit [clarke.freenode.net irc.freenode.net]
jdev has joined #ocaml
jynxzero has joined #ocaml
mbishop has quit ["Konversation terminated!"]
mbishop has joined #ocaml
Morphous_ has joined #ocaml
Axioplase is now known as Axioplase_
bla has joined #ocaml
redocdam has quit []
Morphous has quit [Connection timed out]
delamarche has joined #ocaml
delamarche has quit []
delamarche has joined #ocaml
Kopophex has quit [Read error: 110 (Connection timed out)]
Kopophex has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
delamarche has quit [Connection timed out]
delamarche has joined #ocaml
delamarche has quit [Read error: 60 (Operation timed out)]
delamarche has joined #ocaml
peck has quit ["Leaving."]
delamarche has quit [Read error: 60 (Operation timed out)]
delamarche has joined #ocaml
thanhvu has joined #ocaml
thanhvu is now known as tvn1981
<tvn1981> hi
<tvn1981> I have written a function f in a file called f.ml , how would I consult function f from the interactive mode ?
delamarche has quit [Connection timed out]
delamarche has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
tvn1981 is now known as tvn1981a
delamarche_ has joined #ocaml
<tvn1981a> I have written a function f in a file called f.ml , how would I consult function f from the interactive mode ?
<hcarty> tvn1981a: #use "f.ml";;
<tvn1981a> oh
<tvn1981a> thanks -- I was using "open"
Axioplase has joined #ocaml
<tvn1981a> it says unbound value use
<hcarty> You need the # in front of #use
<hcarty> "#use" is a command specific to the toplevel
<tvn1981a> ah got it --
<tvn1981a> also the interactive mode is not very convenient -- like I cannot backspace or repeat commands
<tvn1981a> is there a better one?
<hcarty> Most people seem to use either rlwrap or ledit
<hcarty> Both act as wrappers around the toplevel
<hcarty> So rather than running "ocaml" you would run "rlwrap ocaml"
<tvn1981a> ic, thanks
<hcarty> tuareg-mode for emacs also apparently provides special support for the OCaml toplevel, though I have not used it
delamarche has quit [Read error: 110 (Connection timed out)]
Kopophex_ has joined #ocaml
<hcarty> You are quite welcome
<tvn1981a> I need to find rlwrap -- it's not installed by default on my mac
<hcarty> I'm not sure of the proper way to install it on a mac
Kopophex has quit [Connection timed out]
<hcarty> There is, I think, a Mac-specific toplevel wrapper
<hcarty> I don't remember the name though
<tvn1981a> oh it's avail at darwinport
<tvn1981a> so I should be able to get it
<tvn1981a> thanks !
<hcarty> I hope it helps
struktured has joined #ocaml
<tvn1981a> another question, is it possible to make call to ocaml libraries in a language like C++ ?
<struktured> tvn1981a, yes.
<tvn1981a> thanks -- what's wrong with this definition ? let printList l = List.iter (fun s -> Printf.printf "%d" s) l;; ?
<struktured> nothing
<struktured> works for me
Kopophex_ has quit [Read error: 110 (Connection timed out)]
Kopophex_ has joined #ocaml
Axioplase has quit ["leaving"]
Associat0r has joined #ocaml
Kopophex_ has quit [Read error: 110 (Connection timed out)]
Kopophex_ has joined #ocaml
seafood has quit []
seafood has joined #ocaml
CosmicRay has quit ["Client exiting"]
Kopophex_ has quit ["Leaving"]
Mr_Awesome has joined #ocaml
mishok13 has quit [Read error: 110 (Connection timed out)]
l_a_m has joined #ocaml
Proteus has joined #ocaml
ygrek has joined #ocaml
<flux> tvn1981a, maybe your problem is that you don't flush the output
<kig> or add a \n
asmanur has joined #ocaml
Proteus_ has joined #ocaml
struktured_ has joined #ocaml
munga_ has joined #ocaml
Proteus__ has joined #ocaml
vixey has quit [Read error: 104 (Connection reset by peer)]
Proteus has quit [Read error: 110 (Connection timed out)]
Proteus_ has quit [Read error: 110 (Connection timed out)]
GustNG has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
tomh has joined #ocaml
mishok13 has joined #ocaml
guillem has joined #ocaml
OChameau has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
OChameau has quit [Read error: 113 (No route to host)]
DacTheHork has joined #ocaml
redocdam has joined #ocaml
seafood has quit []
seafood has joined #ocaml
hml has joined #ocaml
<hml> in interpreted ocaml; when i get to an error; is it possible for me to modify the code and continue; smalltalk style?
<GustNG> Modify?
<asmanur> what do you mean ?
hml has left #ocaml []
<flux> he's gone, but in any case: it isn't
<GustNG> Well it depends.
<GustNG> You could have a function reference.
<GustNG> Metaocaml even.
Jedai has joined #ocaml
szell` has joined #ocaml
<flux> well, you're not modifying the code in that case; you're creating new code and changing your references to point that code ;)
<GustNG> Well his 'modify' was a bit ambiguous so yeah.
szell has quit [Read error: 110 (Connection timed out)]
redocdam has quit []
l_a_m has quit ["leaving"]
l_a_m has joined #ocaml
Yoric[DT] has joined #ocaml
zhoupp has joined #ocaml
<zhoupp> I thought the OCaml channel would be much hotter than Haskell channel...
<GustNG> Well, start a discussion.
<zhoupp> Can I write macro in OCaml, like the ones in Common Lisp?
<zhoupp> sorry I'm a noob
<flux> yes can, with camlp4
<flux> hm, s/yes/you/
<flux> it's a preprocessor for ocaml
<flux> (comes with the distribution)
<flux> regrettably it's not quite as simple as it is in lisp, I suspect mostly because the syntax is more complex than lisp's
<zhoupp> Will the code evolve with design, as the lisp community advocates?
<DacTheHork> flux what does s/yes/you/ come from I see a lot of people do that
<zhoupp> regex
<flux> dacthehork, sed or vi
<DacTheHork> sed or vi?
<flux> both are standard unix tools
<flux> sed is a stream editor that can, among other things ,perform search and replace
<zhoupp> and s/yes/you/ means subsitute 'yes' with 'you'
<zhoupp> flux: Can u recommend me an OCaml book? I wanted to buy Pratical OCaml but I read the comments...
<flux> I think there's been one that's available free online and has been praised
<flux> I can't remember its name though, perhaps some of the other regulars can remember it :)
<flux> however, an excellent starting point is the documentation that comes with ocaml
<zhoupp> u mean Developing Applications with Objective Caml? Docs are hard to read...
<flux> no, there's another one
<flux> and not the one for scientists either (although I understand it's not bad either, but it's very expensive)
<flux> it might be http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf, but I won't check it out now because I'm connected via a mobile phone
<flux> also, www.ocaml-tutorial.org is definitely worth checking out
<zhoupp> I checked it out, Introduction to Objective Caml(draft), do u means this? yes ocaml-tutorial.org is awesome!
<flux> I'm not sure if that's the one I meant. however, if it is quite a long document, starts from the basics and is well-written, it might be it :)
<flux> is it by jason hickey?
<flux> I happened to have an older version around on my hd, so I think it's very likely the one I mean
<zhoupp> yeah, jason hickey
<zhoupp> thank you:)
OChameau has joined #ocaml
<zhoupp> btw flux, do you really read docs? I think it's a little too dreadful:(
<flux> yes, I really read the docs :)
<zhoupp> cool
<flux> I think in the case of ocaml they are also well-written
<flux> and relatively exhaustive
zhoupp has quit []
<Associat0r> well programming is inherently dreadfull
Yoric[DT] has quit ["Ex-Chat"]
sponge45 has joined #ocaml
sporkmonger has quit []
filp has joined #ocaml
delamarche_ has quit []
bluestorm has joined #ocaml
sporkmonger has joined #ocaml
jonafan_ has joined #ocaml
seafood has quit []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome_ has joined #ocaml
struktured_ has quit [Read error: 110 (Connection timed out)]
struktured_ has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
struktured_ has quit [Read error: 104 (Connection reset by peer)]
struktured has joined #ocaml
struktured_ has joined #ocaml
bluestorm has quit ["Leaving"]
bluestorm has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
struktured_ has quit [Read error: 110 (Connection timed out)]
marmotine has joined #ocaml
RobertFischer has joined #ocaml
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
redocdam has joined #ocaml
szell has joined #ocaml
ygrek has quit [Remote closed the connection]
szell` has quit [Read error: 110 (Connection timed out)]
mishok13 has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
pango_ has quit [Remote closed the connection]
guillem has quit [Remote closed the connection]
pango_ has joined #ocaml
tvn1981a has quit [Remote closed the connection]
peck has joined #ocaml
Axioplase_ is now known as Axioplase
CosmicRay has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
DacTheHork has quit [Read error: 110 (Connection timed out)]
filp has quit [Read error: 60 (Operation timed out)]
filp has joined #ocaml
fy__ has joined #ocaml
flux has quit [Read error: 60 (Operation timed out)]
CosmicRay has quit [Read error: 110 (Connection timed out)]
flux has joined #ocaml
CosmicRay has joined #ocaml
CosmicRay has quit [Read error: 131 (Connection reset by peer)]
CosmicRay has joined #ocaml
liquidcopy has joined #ocaml
Yoric[DT] has joined #ocaml
psnively has joined #ocaml
bluestorm has quit [Remote closed the connection]
bluestorm has joined #ocaml
Kopophex has joined #ocaml
fy__ has left #ocaml []
Linktim has joined #ocaml
CosmicRay__ has joined #ocaml
CosmicRay has quit [Read error: 104 (Connection reset by peer)]
CosmicRay__ has quit [Client Quit]
OChameau has quit [Read error: 113 (No route to host)]
CosmicRay__ has joined #ocaml
guillem has joined #ocaml
Linktim_ has joined #ocaml
tomh has joined #ocaml
Associat0r has quit []
Linktim has quit [Read error: 110 (Connection timed out)]
RobertFischer has quit []
Proteus__ has quit [Read error: 104 (Connection reset by peer)]
Proteus_ has joined #ocaml
GustNG1 has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
Linktim has joined #ocaml
det__ has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
GustNG has quit [Read error: 110 (Connection timed out)]
Linktim has quit [Read error: 110 (Connection timed out)]
det__ has quit [Remote closed the connection]
Kopophex has quit [Remote closed the connection]
det has joined #ocaml
CosmicRay__ has quit [Read error: 110 (Connection timed out)]
GustNG1 has quit [Read error: 104 (Connection reset by peer)]
RobertFischer has joined #ocaml
psnively has quit []
ygrek has quit [Remote closed the connection]
aeolist has joined #ocaml
CosmicRay has joined #ocaml
<aeolist> could any of you fine gentlemen help me, http://pastebin.com/m4b41335f this keeps spewing out of memory
<bluestorm> aeolist: do you have some running example ?
<jlouis> aeolist, quick guess: You are installing an exception handler on the stack and it kills tail-calls
<aeolist> it actually hangs when it finds q1 -> assign q2 -> assign
CosmicRay has quit ["Client exiting"]
<pango_> if it's not that whole aux function looping and exhausting memory (it's not tail recursive as jlouis said), it could be some operand comparison (qX.operandY = qZ.operandT stuff) getting caught in a loop (it's that's possible with your operand_type definition)
psnively has joined #ocaml
<pango_> but I guess you had OOM exceptions even before you added this Out_of_memory try/with handler...
<aeolist> yes you are probably right
<aeolist> why is it not tail-rec again?
<aeolist> i didnt catch the tail-rec thing, sorry
<pango_> recursive call is not the last instruction of the function, the external try/with must be popped up before returning
<aeolist> ok, i think it's actually the when thing i started using today :(. this is my instinct talking, but it's more like an "if", when i need pattern matching
<aeolist> i cant actually "=" or "==" 2 tokens
struktured_ has joined #ocaml
filp has quit ["Bye"]
<aeolist> what's a man to do then?
<pango_> equality relationships don't stop with those those operators, though; for example, if they have a unique identifier as one of their components, you can compare those instead
<aeolist> the q#.operand# is a token, an enumeration or whatever you can call it, and i just want to check for matching tokens
<aeolist> (element of an enumeration)
<pango_> and you can't use = on them?
smimou has joined #ocaml
<aeolist> not after a when it seems
<aeolist> i mean, i replaced that part and now it works, so...
<aeolist> type quad is not recursive
psnively has quit []
asmanur_ has joined #ocaml
asmanur_ has quit [Client Quit]
guillem has quit [Remote closed the connection]
asmanur has quit [Read error: 110 (Connection timed out)]
<aeolist> ah yes, found it thanks :)
aeolist has left #ocaml []
love-pingoo has joined #ocaml
love-pingoo has quit [Client Quit]
struktured_ has quit [Read error: 110 (Connection timed out)]
smimou has quit [Read error: 110 (Connection timed out)]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
Jedai has quit [Read error: 110 (Connection timed out)]
struktured has joined #ocaml
tar_ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Philonous has joined #ocaml
bluestorm has quit [Remote closed the connection]
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
tar_ has left #ocaml []
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
rwmjones has quit [Read error: 104 (Connection reset by peer)]
marmotine has joined #ocaml